Put translated documents into separate per-language directories, using the same filename
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Ubuntu Help App |
High
|
Daniel Holbach | ||
Bug Description
From https:/
- I initially suggested using a directory for each language to contain the generated files. In a conversation on IRC, Daniel mentioned that this presents an issue with CSS/JS relative imports' for the toolkit theme.
- On second thoughts, and if we cannot use the above, I'd suggest keeping the same filename for all files, but adding the language as a suffix, just as the Apache docs suggest to load translations [1]. That is:
- index.en-us.html
- index.de.html
- get-in-
- get-in-
[1] http://
(*) Note the - vs. _ and lowercase. This is for converting gettext language codes to BCP-47 language codes, which are understood by the browser: http://
Related branches
- Daniel Holbach (community): Approve on 2015-02-26
- David Planella: Needs Fixing on 2015-02-26
-
Diff: 427 lines (+109/-125)11 files modified.bzrignore (+2/-1)
Makefile (+0/-1)
edit-here/Makefile (+1/-0)
edit-here/content/pages/apps.md (+0/-1)
edit-here/content/pages/faq.md (+0/-1)
edit-here/content/pages/get-in-touch.md (+0/-1)
edit-here/content/pages/index.md (+0/-1)
edit-here/generate-pot (+0/-2)
edit-here/pelicanconf.py (+6/-4)
edit-here/po/de.po (+3/-3)
edit-here/translations.py (+97/-110)
| David Planella (dpm) wrote : | #1 |
| Changed in ubuntu-devices-help: | |
| assignee: | nobody → Daniel Holbach (dholbach) |
| importance: | Undecided → High |
| status: | New → In Progress |
| summary: |
- Put translated documents into per separate directory, using the same - filename + Put translated documents into separate per-language directories, using + the same filename |
| Changed in ubuntu-devices-help: | |
| status: | In Progress → Fix Released |

Note: when converting gettext language codes to BCP-47 ones, it might be worth having a separate function, as there are some exceptions that don't follow the "convert to lowercase and dashes". The most notable:
zh_CN -> zh-hans
zh_TW -> zh-hant