Closed
Bug 774234
Opened 13 years ago
Closed 12 years ago
[bedrock] need to be able to define per locale l10n blocks
Categories
(www.mozilla.org :: Bedrock, defect, P1)
www.mozilla.org
Bedrock
Tracking
(Not tracked)
RESOLVED
FIXED
Future
People
(Reporter: pascalc, Assigned: pmac)
References
(Blocks 1 open bug)
Details
(Whiteboard: u=localizer c=l10n p=0)
You can define an l10n block for a template that allow customization of a portion of the page, here is an example in the Firefox 14 whatsnew page where we added a specific paragraph to the Russian page to announce a partnership change affecting users of this locale:
https://github.com/mozilla/bedrock/commit/45e285c3b2962f425449d82f37d65ec9c47e4c85#L0R39
Extracting this template just for Russian is easy:
manage.py l10_check ru
But the next time I run an l10n_check for all locales, that l10n block is going to be extracted in the locale folder for all of our locales.
We need a way to define in the l10n block that this only affect one locale or a set of locales, something like:
{% l10n whatsnew_feature ; locales=ru,uk,es-ES ; 20120712 %}
| Reporter | ||
Updated•13 years ago
|
Blocks: bedrock-l10n
Updated•13 years ago
|
Component: www.mozilla.org → General
Product: Websites → www.mozilla.org
Comment 1•13 years ago
|
||
Triaging, these needs analysis by bedrock devs.
Whiteboard: u=localizer c=l10n p=0
Target Milestone: --- → Future
| Reporter | ||
Updated•13 years ago
|
Assignee: nobody → kushaldas
Comment 2•13 years ago
|
||
Pull request created in https://github.com/mozilla/bedrock/pull/455
Status: NEW → ASSIGNED
Comment 3•13 years ago
|
||
I think a better syntax for this would be:
{% l10n whatsnew_feature locales=ru,uk,es-ES 20120712 %}
Separator is a space. This will require changing the existing usage of this tag but it's a quick thing.
Comment 4•12 years ago
|
||
We'll most likely need this functionality as part of the MWC wave.
Priority: -- → P1
Updated•12 years ago
|
Component: General → Bedrock
| Assignee | ||
Comment 5•12 years ago
|
||
Taking this and finishing up the work started by Kushal. Thanks again for the help Kushal!
Assignee: kushaldas → pmac
Comment 6•12 years ago
|
||
Commits pushed to master at https://github.com/mozilla/bedrock
https://github.com/mozilla/bedrock/commit/106ba2120f95b56771f6a4e7ab7e39a3f1592401
Bug 774234: we can now define per locale l10n blocks
The blocks can be any of these 3 style:
{% l10n whatsnew_feature locales=ru,bn-IN 20120712 %}
{% l10n whatsnew_feature 20120712 %}
{% l10n whatsnew_feature, 20120712 %}
For the First example we will have templates in the given two
languages.
2nd and 3rd example, we will have the templates for all locales.
https://github.com/mozilla/bedrock/commit/872e98b11ec533a508a328d7a65705b33f8433c7
Bug 774234: Add tests for l10n blocks and langs support.
Refactor template handling and parsing.
https://github.com/mozilla/bedrock/commit/28bdd5e4ed5f6fae275d2bc8901568b8ed4bf97a
Merge pull request #614 from pmclanahan/bug-774234-l10n-block-locales-support
Bug 774234: Add langs definition to l10n blocks.
| Assignee | ||
Comment 7•12 years ago
|
||
This is in production.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•