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


How to reproduce

Run ./ -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 "./", line 18, in <module>, sys.argv)
  File "/home/sebastian/src/adblockpluschrome/buildtools/", line 607, in processArgs
    commands[command](baseDir, scriptName, opts, args, type)
  File "/home/sebastian/src/adblockpluschrome/buildtools/", line 55, in __call__
    return self._handler(baseDir, scriptName, opts, args, type)
  File "/home/sebastian/src/adblockpluschrome/buildtools/", line 328, in updateTranslationMaster
    basename, key)
  File "/home/sebastian/src/adblockpluschrome/buildtools/", line 404, in updateTranslationMaster
    data, headers = crowdin_prepare_upload(update)
  File "/home/sebastian/src/adblockpluschrome/buildtools/", 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

A commit referencing this issue has landed:
Issue 5815 - Fixed Crowdin upload with non-ASCII characters

comment:3 Changed on 10/01/2017 at 02:40:28 PM by sebastian

  • Resolution set to fixed
  • Status changed from reviewing to closed

Add Comment

Modify Ticket

Change Properties
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from sebastian.
Note: See TracTickets for help on using tickets.