浏览代码

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.
Rémi Verschelde 3 年之前
父节点
当前提交
dbfe36728e

文件差异内容过多而无法显示
+ 392 - 392
doc/translations/ar.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/ca.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/classes.pot


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/cs.po


文件差异内容过多而无法显示
+ 136 - 136
doc/translations/de.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/el.po


文件差异内容过多而无法显示
+ 136 - 136
doc/translations/es.po


+ 5 - 2
doc/translations/extract.py

@@ -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))

文件差异内容过多而无法显示
+ 392 - 392
doc/translations/fa.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/fi.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/fil.po


文件差异内容过多而无法显示
+ 136 - 136
doc/translations/fr.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/gl.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/hi.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/hu.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/id.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/is.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/it.po


文件差异内容过多而无法显示
+ 136 - 136
doc/translations/ja.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/ko.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/lv.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/mr.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/nb.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/nl.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/pl.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/pt.po


文件差异内容过多而无法显示
+ 136 - 136
doc/translations/pt_BR.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/ro.po


文件差异内容过多而无法显示
+ 136 - 136
doc/translations/ru.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/sk.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/sr_Cyrl.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/sv.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/th.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/tl.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/tr.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/uk.po


文件差异内容过多而无法显示
+ 136 - 136
doc/translations/vi.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/zh_CN.po


文件差异内容过多而无法显示
+ 392 - 392
doc/translations/zh_TW.po


部分文件因为文件数量过多而无法显示