Closed Bug 920113 Opened 11 years ago Closed 10 years ago

Lang file activation should use those specified in template

Categories

(www.mozilla.org :: Bedrock, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: pmac, Assigned: pmac)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [kb=1125982] )

Attachments

(1 file)

Currently activation always looks to the lang file for the template name, but templates can specify other lang files to which its strings should be extracted. That file is the one that makes sense to need to be activated for the locale to be activated for the page. So if a template specifies lang files the first in the list should be the one checked for locale activation.
Whiteboard: [kb=1125982]
For backward compatibility I've also left it so that it will be active if the lang file for the template name is active. This check is a bit more efficient, so we can leave those nearly blank lang files there for as long as we want, but we can also delete them if the specified lang file for the template is active.
Status: NEW → ASSIGNED
Commits pushed to master at https://github.com/mozilla/bedrock https://github.com/mozilla/bedrock/commit/933609e6a7921ffccc768c81a307ea21f394aee8 Bug 920113: Use the specified lang file for activation. If a template uses the "set_lang_files" template tag we should check the first lang file in that list if the lang file for the specific template name isn't active. https://github.com/mozilla/bedrock/commit/03872ec212bd837cde1271eedfc85503ada2cfd3 Merge pull request #1286 from pmclanahan/lang-files-tag-sets-activation-file-920113 Bug 920113: Use the specified lang file for activation.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Can we safely remove the empty lang files that just have the active tag in now?
(In reply to Pascal Chevrel:pascalc from comment #4) > Can we safely remove the empty lang files that just have the active tag in > now? We should be able to do that now, yes. As long as the reference lang file also has the active tag.
Since I had to enable home.lang for "gd", I added the active tag only to home.lang in r121568 and the page is online, so it's working :-) http://www.mozilla.org/gd/
Blocks: 931046
Commits pushed to master at https://github.com/mozilla/bedrock https://github.com/mozilla/bedrock/commit/6bd799113662422bce5940656ddb6cc7013b7e5a Fix bug 920113, 949163: tags should be from all lang files. Tags (including "active") should be from all .lang files associated with a template. So l10n_has_tag() as well as the active state of a page should include information from all included .lang files from add_lang_file and set_lang_files calls. This also moves the check for DEV==True to the helpers, so checking settings.DEV in templates is no longer necessary. https://github.com/mozilla/bedrock/commit/cd372f930c61a6075ad2a885489770b67a083b1c Merge pull request #2501 from pmclanahan/l10n_has_tag_use_all_lang_files Fix bug 920113, 949163: tags should be from all lang files.
Status: VERIFIED → RESOLVED
Closed: 11 years ago10 years ago
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: