forked from MapComplete/MapComplete
Fixed custom generator by fixing dependencies
This commit is contained in:
parent
d326e56b15
commit
9c53fe9868
5 changed files with 88 additions and 78 deletions
|
@ -1,7 +1,6 @@
|
|||
import {UIEventSource} from "../../Logic/UIEventSource";
|
||||
import {UIElement} from "../UIElement";
|
||||
import {LocalStorageSource} from "../../Logic/Web/LocalStorageSource";
|
||||
import {DropDown} from "../Input/DropDown";
|
||||
|
||||
|
||||
export default class Locale {
|
||||
|
@ -18,21 +17,6 @@ export default class Locale {
|
|||
}
|
||||
return source;
|
||||
}
|
||||
|
||||
public static CreateLanguagePicker(
|
||||
languages : string[] ,
|
||||
label: string | UIElement = "") {
|
||||
|
||||
if (languages.length <= 1) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return new DropDown(label, languages.map(lang => {
|
||||
return {value: lang, shown: lang}
|
||||
}
|
||||
), Locale.language);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ export default class Translations {
|
|||
for (const subKey in tr) {
|
||||
if (Translations.isTranslation(tr[subKey])) {
|
||||
copy[subKey] = new Translation(tr[subKey]);
|
||||
} else if(tr[subKey].translations === undefined /**should not be a translation alreay*/){
|
||||
} else if(tr[subKey].translations === undefined /**should not be a translation already*/){
|
||||
queue.push(tr[subKey]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue