forked from MapComplete/MapComplete
Validation: enable mustHaveLanguage-check again as error
This commit is contained in:
parent
4e05671968
commit
5309d0c3d6
1 changed files with 5 additions and 2 deletions
|
@ -29,7 +29,10 @@ class ValidateLanguageCompleteness extends DesugaringStep<any> {
|
||||||
this._languages = languages ?? ["en"]
|
this._languages = languages ?? ["en"]
|
||||||
}
|
}
|
||||||
|
|
||||||
convert(obj: any, context: string): { result: LayerConfig; errors: string[] } {
|
convert(
|
||||||
|
obj: any,
|
||||||
|
context: string
|
||||||
|
): { result: LayerConfig; errors: string[]; warnings: string[] } {
|
||||||
const errors = []
|
const errors = []
|
||||||
const warnings: string[] = []
|
const warnings: string[] = []
|
||||||
const translations = Translation.ExtractAllTranslationsFrom(obj)
|
const translations = Translation.ExtractAllTranslationsFrom(obj)
|
||||||
|
@ -41,7 +44,7 @@ class ValidateLanguageCompleteness extends DesugaringStep<any> {
|
||||||
t.tr.translations["*"] === undefined
|
t.tr.translations["*"] === undefined
|
||||||
)
|
)
|
||||||
.forEach((missing) => {
|
.forEach((missing) => {
|
||||||
warnings.push(
|
errors.push(
|
||||||
context +
|
context +
|
||||||
"A theme should be translation-complete for " +
|
"A theme should be translation-complete for " +
|
||||||
neededLanguage +
|
neededLanguage +
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue