Closed Bug 763913 Opened 12 years ago Closed 12 years ago

[bedrock] non breakable spaces are extracted as normal spaces with ./manage.py l10n_merge

Categories

(www.mozilla.org :: L10N, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: pascalc, Assigned: pmac)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [l10n][sb-sprint-3] u=user c=L10N p=2)

If you have a string containing a real non breakable space (not an nbsp html entity) in a template, the extraction and merge scripts convert the non breakable spaces as normal spaces into .lang files, as a consequence, even though those strings are translated, they appear in English. Currently the workaround (which is fine for me since is indicates clearly to the localizer that the words should not be split) is to use an html nbsp entity. example (hopefully bugzilla will not also convert the nbsp): string in template: Submit your app » string in .lang file: Submit your app » It would be good that the strings be extracted correctly. Thanks
Commit pushed to dev at https://github.com/mozilla/bedrock https://github.com/mozilla/bedrock/commit/46c5cb8e4888b76662f7551dc542bd12580f1b01 remove real non breakable spaces to use html entities because of bug 763913
What is the unicode character of a non-breakable space? I didn't know we ever used those. I may not have much control over that because gettext is the library that extracts strings, and it may do that conversion. However, this may be happening in the step that converts gettext files to lang files, which is my code (gettext shouldn't do too much conversion, so that's possible).
according to wikipedia, it is 0xC2 0xA0 in UTF8 (http://en.wikipedia.org/wiki/Non-breaking_space)
Whiteboard: [l10n] → [l10n][sb-sprint-1]
Assignee: nobody → anthony
Whiteboard: [l10n][sb-sprint-1] → [l10n][sb-sprint-1] u=user c=L10N p=2
Assignee: anthony → pmac
Whiteboard: [l10n][sb-sprint-1] u=user c=L10N p=2 → [l10n][sb-sprint-2] u=user c=L10N p=2
Whiteboard: [l10n][sb-sprint-2] u=user c=L10N p=2 → [l10n][sb-sprint-3] u=user c=L10N p=2
Component: www.mozilla.org → General
Product: Websites → www.mozilla.org
Assignee: pmac → nobody
Component: General → L10N
QA Contact: pascalc
Apologies, the assignees here got reset when i moved them, fixing for all.
Assignee: nobody → pmac
QA Contact: pascalc
Commit pushed to master at https://github.com/mozilla/bedrock https://github.com/mozilla/bedrock/commit/5347403198490ebb8a52d5430a22b44bb07aa13a Apply the same tweaks during translation as extraction. Fix bug 763913.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Commit pushed to master at https://github.com/mozilla/bedrock https://github.com/mozilla/bedrock/commit/49eb56134873e2424eb1dd2f4c1a3358f356783c Use a list instead of a set literal (they don't exist on Python 2.6) bug 763913
Pascal, can you verify that this is resolved.
You need to log in before you can comment on or make changes to this bug.