Opened on 10/01/2017 at 02:35:17 AM
Closed on 10/01/2017 at 02:40:28 PM
#5815 closed defect (fixed)
Upload to Crowdin with non-ASCII characters in source translation fails
Reported by: | sebastian | Assignee: | sebastian |
---|---|---|---|
Priority: | P1 | Milestone: | |
Module: | Automation | Keywords: | |
Cc: | tlucas | Blocked By: | |
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | yes | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description
How to reproduce
Run ./build.py -t chrome translate <API_key> from adblockpluschrome.
Observed behaviour
No translations are submitted to Crowdin. The following error is logged to stderr:
Traceback (most recent call last): File "./build.py", line 18, in <module> buildtools.build.processArgs(BASE_DIR, sys.argv) File "/home/sebastian/src/adblockpluschrome/buildtools/build.py", line 607, in processArgs commands[command](baseDir, scriptName, opts, args, type) File "/home/sebastian/src/adblockpluschrome/buildtools/build.py", line 55, in __call__ return self._handler(baseDir, scriptName, opts, args, type) File "/home/sebastian/src/adblockpluschrome/buildtools/build.py", line 328, in updateTranslationMaster basename, key) File "/home/sebastian/src/adblockpluschrome/buildtools/localeTools.py", line 404, in updateTranslationMaster data, headers = crowdin_prepare_upload(update) File "/home/sebastian/src/adblockpluschrome/buildtools/localeTools.py", line 356, in crowdin_prepare_upload ).format(boundary=boundary, name=name, data=data, mimetype=mimetype) UnicodeEncodeError: 'ascii' codec can't encode character u'\u2026' in position 4772: ordinal not in range(128)
This seems to be a regression introduced with #5777. This bug is only being triggered when the source translation contains any non-ASCII characters.
Expected behaviour
The source translations on Crowdin should be updated with the content from _locales/en_US. No error should occur.
Attachments (0)
Change History (3)
comment:1 Changed on 10/01/2017 at 02:37:46 AM by sebastian
- Review URL(s) modified (diff)
- Status changed from new to reviewing
comment:2 Changed on 10/01/2017 at 02:40:11 PM by abpbot
comment:3 Changed on 10/01/2017 at 02:40:28 PM by sebastian
- Resolution set to fixed
- Status changed from reviewing to closed
Note: See
TracTickets for help on using
tickets.
A commit referencing this issue has landed:
Issue 5815 - Fixed Crowdin upload with non-ASCII characters