From 82fd3cd57782c3816c08dcdd2ed386efbd4aa095 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 14:34:12 +0100 Subject: [PATCH] l10n script: With --lang output the !Language header --- scripts/find_localised_strings.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/find_localised_strings.py b/scripts/find_localised_strings.py index 7b38aa1e..fe33327d 100644 --- a/scripts/find_localised_strings.py +++ b/scripts/find_localised_strings.py @@ -239,7 +239,10 @@ def generate_lang_template(data: dict[pathlib.Path, list[ast.Call]]) -> str: entries.append(LangEntry([FileLocation.from_call(path, c)], get_arg(c), [getattr(c, 'comment')])) deduped = dedupe_lang_entries(entries) - out = '' + out = ''' +/* Language name */ +"!Language" = "English"; +''' print(f'Done Deduping entries {len(entries)=} {len(deduped)=}', file=sys.stderr) for entry in deduped: assert len(entry.comments) == len(entry.locations)