-
Notifications
You must be signed in to change notification settings - Fork 918
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial support for Pocket l10n using Fluent strings in Bedrock (#11541)
* Support running in Mozorg or Pocket modes in dev or prod via Docker, via Makefile commands * Support Mozorg or Pocket mode via env var Setting the SITE_MODE env var to Mozorg or Pocket will now switch the site into serving only the URLs for that particular mode. When in Pocket mode, its pages are served from the root path, not from the 'externalpages' namespace/module name The default behaviour, for now, remains as is: all URLs will be served, and Pocket URLs are served as 'external/pocket/*` * Flatten externalpages/pocket to just pocket * Make Mozorg the default mode, with Pocket enabled via SITE_MODE env var * Add in robots.txt for Pocket mode, based on current state of https://getpocket.com/robots.txt * Revert "Add in robots.txt for Pocket mode, based on current state of https://getpocket.com/robots.txt" This reverts commit 5934b4d. * Initial laying in of l10n-pocket directory and config files * First pass at marking up a Pocket template for Fluent There's more work to be done to wire it all up - the views aren't aware of the Fluent side, yet * Enable Fluent string replacement for Pocket About page Note how we get the brands.ftl from main l10n to _always_ be used in Pocket mode, regardless of locale. * Switch to looking up Pocket paths via named URLs * Fix slip in Fluent markup * Update README for l10n-pocket with info about namespacing * Markup spacing nitfix * Improve markup of HTML: remove ids from strings; snake_case variables * Switch BETA to title case, to avoid translation confusion with an acronym. Has no semantic impact to change it. * Fixup: two missing curly quotes * Nitfix: snake_case for all FTL variables * Fix up broken FTL markup: brands can't be used directly in a template; need to go via the template-specific FTL file * Refactor attributes for hyperlinks to reduce risk of breakage and increaase scope to tune them without triggering new translations * Collapse all press-link attrs into a single variable, to make less brittle for translation * Add a Pocket-specific brands.ftl file and wire it in The -brand-name-read-it-later-inc string is moved from l10n/en/brands.ftl into the new Pocket-specific one, and can be used as proof that the new brands file is being loaded, because the correct Read It Later, Inc string appears at the bottom of the about page. Also improve some of the brand-meets-product phrasing, to help with translation - eg Pocket Premium, Pocket for Firefox * Add 'es' locale, for mapping to non-Spain versions of Spanish * Drop 'Pocket for Firefox' as a dedicated brand name -- unnecessary * Ensure l10n-pocket/en/brands.ftl is disovered by default in Pocket mode This means we can do without the override that forces the loading of brands when in Pocket mode. We still need it for non-en locales, but at least now it behaves the same as for Mozorg mode * Update Pocket l10n README now the two modes do not share l10n files * Typo fixup * Explicitly redefine FLUENT_PATHS, to avoid pain later
- Loading branch information
1 parent
3709447
commit 1df8b3d
Showing
16 changed files
with
397 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.