forked from MapComplete/MapComplete
More test cleanup
This commit is contained in:
parent
b67e108056
commit
3ab373f6ec
9 changed files with 179 additions and 370 deletions
|
@ -209,6 +209,13 @@ export class Translation extends BaseUIElement {
|
|||
return new Translation(tr);
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts all images (including HTML-images) from all the embedded translations
|
||||
*
|
||||
* // should detect sources of <img>
|
||||
* const tr = new Translation({en: "XYZ <img src='a.svg'/> XYZ <img src=\"some image.svg\"></img> XYZ <img src=b.svg/>"})
|
||||
* new Set<string>(tr.ExtractImages(false)) // new Set(["a.svg", "b.svg", "some image.svg"])
|
||||
*/
|
||||
public ExtractImages(isIcon = false): string[] {
|
||||
const allIcons: string[] = []
|
||||
for (const key in this.translations) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue