Merge pull request #42802 from barredterra/extract-setup-wizard-data

This commit is contained in:
Raffael Meyer
2024-08-17 02:14:23 +02:00
committed by GitHub
2 changed files with 5 additions and 0 deletions

View File

@@ -1,2 +1,3 @@
**/setup/setup_wizard/data/uom_data.json,erpnext.gettext.extractors.uom_data.extract
**/setup/doctype/incoterm/incoterms.csv,erpnext.gettext.extractors.incoterms.extract
**/setup/setup_wizard/data/*.txt,erpnext.gettext.extractors.lines_from_txt_file.extract
1 **/setup/setup_wizard/data/uom_data.json erpnext.gettext.extractors.uom_data.extract
2 **/setup/doctype/incoterm/incoterms.csv erpnext.gettext.extractors.incoterms.extract
3 **/setup/setup_wizard/data/*.txt erpnext.gettext.extractors.lines_from_txt_file.extract

View File

@@ -0,0 +1,4 @@
def extract(fileobj, *args, **kwargs):
"""Split file into lines and yield one translation unit per line."""
for line_no, line in enumerate(fileobj.readlines()):
yield line_no + 1, "_", line.decode().strip(), []