Put translated documents into separate per-language directories, using the same filename

Bug #1425010 reported by Daniel Holbach
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Help App
Fix Released
High
Daniel Holbach

Bug Description

From https://code.launchpad.net/~dholbach/ubuntu-devices-help/1423871/+merge/250467

- 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-touch.en-us.html (*)
 - get-in-touch.de.html

[1] http://httpd.apache.org/docs/2.2/content-negotiation.html
(*) Note the - vs. _ and lowercase. This is for converting gettext language codes to BCP-47 language codes, which are understood by the browser: http://www.rfc-editor.org/rfc/bcp/bcp47.txt

Related branches

Revision history for this message
David Planella (dpm) wrote :

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

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
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.