i18n: Remove line numbers from classref PO files

It's useful context for translators but it generates very spammy diffs whenever
a line is added or removed, changing the comments for hundreds or thousands of
msgids needlessly.

We still have the file names so it's relatively easy to search in file to find
the location of the source string.
This commit is contained in:
Rémi Verschelde 2021-12-21 12:09:29 +01:00
parent 0fe94ee6e5
commit dbfe36728e
No known key found for this signature in database
GPG Key ID: C3336907360768E1
39 changed files with 442542 additions and 443301 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -221,7 +221,7 @@ def _make_translation_catalog(classes):
## generate the catalog file
def _generate_translation_catalog_file(unique_msgs, output):
def _generate_translation_catalog_file(unique_msgs, output, location_line=False):
with open(output, "w", encoding="utf8") as f:
f.write(HEADER)
for msg in BASE_STRINGS:
@ -238,7 +238,10 @@ def _generate_translation_catalog_file(unique_msgs, output):
path = desc.desc_list.path.replace("\\", "/")
if path.startswith("./"):
path = path[2:]
f.write(" {}:{}".format(path, desc.line_no))
if location_line: # Can be skipped as diffs on line numbers are spammy.
f.write(" {}:{}".format(path, desc.line_no))
else:
f.write(" {}".format(path))
f.write("\n")
f.write('msgid "{}"\n'.format(msg))

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff