forked from MapComplete/MapComplete
Fix overzealous language check for unofficial themes
This commit is contained in:
parent
b50788074b
commit
218cf3b151
2 changed files with 2 additions and 4 deletions
|
@ -15,8 +15,6 @@ import Translations from "../../../UI/i18n/Translations"
|
|||
import Svg from "../../../Svg"
|
||||
import {QuestionableTagRenderingConfigJson} from "../Json/QuestionableTagRenderingConfigJson"
|
||||
import FilterConfigJson from "../Json/FilterConfigJson";
|
||||
import {control} from "leaflet";
|
||||
import layers = control.layers;
|
||||
import DeleteConfig from "../DeleteConfig";
|
||||
|
||||
class ValidateLanguageCompleteness extends DesugaringStep<any> {
|
||||
|
@ -269,7 +267,7 @@ class ValidateTheme extends DesugaringStep<LayoutConfigJson> {
|
|||
).convert(theme, theme.id)
|
||||
errors.push(...checked.errors)
|
||||
}
|
||||
if (!json.hideFromOverview && theme.id !== "personal") {
|
||||
if (!json.hideFromOverview && theme.id !== "personal" && this._isBuiltin) {
|
||||
// The first key in the the title-field must be english, otherwise the title in the loading page will be the different language
|
||||
const targetLanguage = theme.title.SupportedLanguages()[0]
|
||||
if (targetLanguage !== "en") {
|
||||
|
|
|
@ -79,7 +79,7 @@ export default class LayoutConfig {
|
|||
}
|
||||
const context = this.id
|
||||
this.credits = json.credits
|
||||
this.language = json.mustHaveLanguage ?? Array.from(Object.keys(json.title))
|
||||
this.language = json.mustHaveLanguage ?? ( official ? ["en"] : [])
|
||||
this.usedImages = Array.from(
|
||||
new ExtractImages(official, undefined).convertStrict(
|
||||
json,
|
||||
|
|
Loading…
Reference in a new issue