You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The XLIFF target-language check currently normalizes both the filename locale and the target-language / trgLang attribute to the base language before comparison. That is intentional and pragmatic, but it silently accepts region-level inconsistencies:
Filename
XLIFF attribute
Current
Desired
de_DE.locallang.xlf
target-language="de-AT"
OK
WARNING
messages.de_DE.xlf
trgLang="de-AT"
OK
WARNING
Proposal
Keep base-language mismatches as ERROR (current behavior).
Emit a WARNING when the base language matches but regions differ.
Validating that the region itself is meaningful (e.g. de-XX is not a real region). BCP 47 conformance can be a separate ticket if it ever becomes relevant.
Follow-up to #119.
The XLIFF target-language check currently normalizes both the filename locale and the
target-language/trgLangattribute to the base language before comparison. That is intentional and pragmatic, but it silently accepts region-level inconsistencies:de_DE.locallang.xlftarget-language="de-AT"messages.de_DE.xlftrgLang="de-AT"Proposal
ERROR(current behavior).WARNINGwhen the base language matches but regions differ.LocaleUtilityso other validators can reuse it (suggested by @maikschneider in Validate target-language in XLF files #119).Out of scope
de-XXis not a real region). BCP 47 conformance can be a separate ticket if it ever becomes relevant.