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:
parent
0fe94ee6e5
commit
dbfe36728e
23310
doc/translations/ar.po
23310
doc/translations/ar.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/ca.po
23310
doc/translations/ca.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
23310
doc/translations/cs.po
23310
doc/translations/cs.po
File diff suppressed because it is too large
Load Diff
23311
doc/translations/de.po
23311
doc/translations/de.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/el.po
23310
doc/translations/el.po
File diff suppressed because it is too large
Load Diff
23334
doc/translations/es.po
23334
doc/translations/es.po
File diff suppressed because it is too large
Load Diff
@ -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))
|
||||
|
23310
doc/translations/fa.po
23310
doc/translations/fa.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/fi.po
23310
doc/translations/fi.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/fil.po
23310
doc/translations/fil.po
File diff suppressed because it is too large
Load Diff
23312
doc/translations/fr.po
23312
doc/translations/fr.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/gl.po
23310
doc/translations/gl.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/hi.po
23310
doc/translations/hi.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/hu.po
23310
doc/translations/hu.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/id.po
23310
doc/translations/id.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/is.po
23310
doc/translations/is.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/it.po
23310
doc/translations/it.po
File diff suppressed because it is too large
Load Diff
23311
doc/translations/ja.po
23311
doc/translations/ja.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/ko.po
23310
doc/translations/ko.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/lv.po
23310
doc/translations/lv.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/mr.po
23310
doc/translations/mr.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/nb.po
23310
doc/translations/nb.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/nl.po
23310
doc/translations/nl.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/pl.po
23310
doc/translations/pl.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/pt.po
23310
doc/translations/pt.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
23310
doc/translations/ro.po
23310
doc/translations/ro.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/ru.po
23310
doc/translations/ru.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/sk.po
23310
doc/translations/sk.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
23310
doc/translations/sv.po
23310
doc/translations/sv.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/th.po
23310
doc/translations/th.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/tl.po
23310
doc/translations/tl.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/tr.po
23310
doc/translations/tr.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/uk.po
23310
doc/translations/uk.po
File diff suppressed because it is too large
Load Diff
23310
doc/translations/vi.po
23310
doc/translations/vi.po
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
Loading…
Reference in New Issue
Block a user