Closed Bug 774234 Opened 12 years ago Closed 11 years ago

[bedrock] need to be able to define per locale l10n blocks


( :: Bedrock, defect, P1)



(Not tracked)



(Reporter: pascalc, Assigned: pmac)


(Blocks 1 open bug)


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

Extracting this template just for Russian is easy: 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 %}
Blocks: bedrock-l10n
Component: → General
Product: Websites →
Triaging, these needs analysis by bedrock devs.
Whiteboard: u=localizer c=l10n p=0
Target Milestone: --- → Future
Assignee: nobody → kushaldas
Pull request created in
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.
We'll most likely need this functionality as part of the MWC wave.
Priority: -- → P1
Component: General → Bedrock
Taking this and finishing up the work started by Kushal. Thanks again for the help Kushal!
Assignee: kushaldas → pmac
Commits pushed to master at
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
2nd and 3rd example, we will have the templates for all locales.
Bug 774234: Add tests for l10n blocks and langs support.

Refactor template handling and parsing.
Merge pull request #614 from pmclanahan/bug-774234-l10n-block-locales-support

Bug 774234: Add langs definition to l10n blocks.
This is in production.
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.