-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bring back behavior implemented in #258 * Change LocaleParser.getPreferredLocale to getPreferredLocales and have it return an ordered list of locales based on the Accept-Language header * Change Transformer.transform to take a list of preferred locales that also includes the fallback rather than a single locale which loses a lot of information that previously needed to be reconstructed. In addition, we no longer take the fallback locale, but assume that it is already in the preferred locale list. * Translator.getLocale (which is used by paper-handlebars to inject into the theme context) now returns the primary locale (first in the list of preferred locales). This should be equivalent to before. * LocaleParser.getLocales has now be made an internal method to the module * We now automatically inject the regionless language code if not present in the Accept-Language header. For example, if fr-FR is present, but fr is not, and this is a supported language in the theme, we add it immediately after fr-FR. We previously were only doing this if there was a single language in the Accept-Language header.
- Loading branch information
Showing
7 changed files
with
89 additions
and
99 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
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
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