fix: drop unofficial inno setup languages instead of default fallback
This commit is contained in:
1 parent
57f8081841
commit
770cfd5af4
1 file changed
+20
-15
Vendored
+20
-15
@@ -63,27 +63,32 @@ YYC MARK:
|
|||||||
The base messages file pairing (the official full translation that provides
|
The base messages file pairing (the official full translation that provides
|
||||||
the language identity) is derived from MetaGlot's best-effort conversion of
|
the language identity) is derived from MetaGlot's best-effort conversion of
|
||||||
the PO language tag to the conventional Inno Setup language name (lang.lang)
|
the PO language tag to the conventional Inno Setup language name (lang.lang)
|
||||||
and its officiality (lang.is_official). Only the official translations come
|
and its officiality (lang.is_official). A language without an official base
|
||||||
with an Inno Setup installation; the community provided conventional names,
|
file - a community provided conventional name, or a language unknown to
|
||||||
as well as the languages unknown to MetaGlot (which convert to nothing), are
|
MetaGlot which converts to nothing - is dropped instead of falling back:
|
||||||
deliberately not used and fall back to "compiler:Default.isl", so the script
|
every [Languages] entry inherits the language identity of its base file, and
|
||||||
compiles and the installer works with a bare Inno Setup installation. Pair
|
"compiler:Default.isl" carries the English identity, so a fallback entry
|
||||||
such a language with its base file explicitly (e.g. via a "case" on
|
would flood the setup language selection dialog with duplicate English
|
||||||
"lang.name") when adding one. The incremental custom messages file is named
|
items. To keep such a language, ship its base messages file with the
|
||||||
after the conventional name (or the PO language tag when no conventional
|
installer and pair it explicitly (e.g. via a "case" on "lang.name"). The
|
||||||
name exists); keep it in sync with the "--isl-path" argument in
|
incremental custom messages file is named after the conventional name; keep
|
||||||
CMakeLists.txt.
|
it in sync with the "--isl-path" argument in CMakeLists.txt. The path
|
||||||
|
rendering loop is independent of the dropping decision, so a dropped
|
||||||
|
language still gets an (unreferenced) messages file written.
|
||||||
{% endcomment -%}
|
{% endcomment -%}
|
||||||
{% for lang in langs -%}
|
{% for lang in langs -%}
|
||||||
|
{%- if lang.is_official -%}
|
||||||
{%- if lang.lang == 'Default' -%}
|
{%- if lang.lang == 'Default' -%}
|
||||||
{% assign base = 'compiler:Default.isl' -%}
|
{% assign base = 'compiler:Default.isl' -%}
|
||||||
{%- elsif lang.is_official -%}
|
|
||||||
{% assign base = 'compiler:Languages\' | append: lang.lang | append: '.isl' -%}
|
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{% assign base = 'compiler:Default.isl' -%}
|
{% assign base = 'compiler:Languages\' | append: lang.lang | append: '.isl' -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{% assign incremental = lang.lang | default: lang.name -%}
|
Name: "{{ lang.name }}"; MessagesFile: "{{ base }},Strings\{{ lang.lang }}.isl"
|
||||||
Name: "{{ lang.name }}"; MessagesFile: "{{ base }},Strings\{{ incremental }}.isl"
|
{% else -%}
|
||||||
|
{%- comment -%}
|
||||||
|
unofficial or unmapped: dropped, since a Default.isl fallback would duplicate the English identity in the Select Language dialog
|
||||||
|
{%- endcomment -%}
|
||||||
|
{% endif -%}
|
||||||
{% endfor -%}
|
{% endfor -%}
|
||||||
|
|
||||||
[Tasks]
|
[Tasks]
|
||||||
|
|||||||
Reference in new issue
Block a user