bench update-translations | fails
See original GitHub issueSo we tried to follow this https://frappeframework.com/docs/user/en/guides/basics/translations#5-bootstrapping-a-new-language
We decided to modify just a few strings, so this is orig.csv
Shared With
Shared with everyone
Shared with {0}
Tags
Attachment
Attachments
Assigned To
Not Saved
Reviews
and then we translated, and this is trans.csv
Shared With,Compartido con,
Shared with everyone,Compartido con todos,
Shared with {0},Compartido con {0},
Tags,Etiquetas,
Attachment,Adjunto,
Attachments,Adjuntos,
Assigned To,Asignado a,
Not Saved,No guardado,
Reviews,Comentarios,
However when I run this command bench update-translations es-UY ~/orig.csv ~/trans.csv
this is the output I get.
Are we skipping a step, is the guide old?
We just want to translate our app to es-UY
with our custom strings
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/operador/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 99, in <module>
main()
File "/home/operador/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
click.Group(commands=commands)(prog_name='bench')
File "/home/operador/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/operador/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/operador/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/operador/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/operador/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/operador/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/operador/frappe-bench/env/lib/python3.8/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/operador/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 26, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File "/home/operador/frappe-bench/apps/frappe/frappe/commands/translate.py", line 68, in update_translations
frappe.translate.update_translations(lang, untranslated_file, translated_file)
File "/home/operador/frappe-bench/apps/frappe/frappe/translate.py", line 674, in update_translations
write_translations_file(app, lang, full_dict)
File "/home/operador/frappe-bench/apps/frappe/frappe/translate.py", line 708, in write_translations_file
write_csv_file(os.path.join(tpath, lang + ".csv"),
File "/home/operador/frappe-bench/apps/frappe/frappe/translate.py", line 598, in write_csv_file
for p, m in app_messages:
ValueError: too many values to unpack (expected 2)
Issue Analytics
- State:
- Created 3 years ago
- Comments:13
Top Results From Across the Web
Bench update-translations is broken · Issue #11738 - GitHub
I'm trying to update some translations after using the get-untranslated command, I edit the new file, when It's time to update the translation...
Read more >Common Errors with Exporting and Importing Translation Files
Troubleshoot issues you can encounter while exporting and importing files in Translation Workbench.
Read more >Bench Commands - Frappe Framework
download-translations Download latest translations exclude-app Exclude app from updating find Finds benches recursively from location get-app Clone an app from ...
Read more >Bench download-translations server error - ERPNext Forum
I tried bench download-translations, but the downloaded files are htm pages indic… ... The error persists, any update?
Read more >Hilarious Examples of Translation Fails in Advertising - Lytho
20 Examples of Funny Translation Fails in Advertising · 1. KFC. China translated “Finger Licking Good” (KFC) into a somewhat cannibalistic message. ·...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This still does the job and makes the other 2 commands specified work
Don’t know if this will be relevant for you, but the way I did the translating workflow is this.
I then in my custom app created a bin folder added 2 subfolders for each app translation and created a bash script to copy translations from my GIT managed app to frappe and erpnext apps. So now when I see something that needs translating I do this:
This is file structure of bin folder
This Is the Script