Bug-1381580 cascading locales support release note#39013
Conversation
|
Preview URLs (comment last updated: 2025-04-18 18:31:03) |
carlosjeurissen
left a comment
There was a problem hiding this comment.
Suggesting to use properly formatted bcp-47 language tags when possible as this is the default for web.
files/en-us/mozilla/add-ons/webextensions/internationalization/index.md
Outdated
Show resolved
Hide resolved
files/en-us/mozilla/add-ons/webextensions/internationalization/index.md
Outdated
Show resolved
Hide resolved
| 1. if there is a `messages.json` file for the exact current locale, and it contains the string, return it. | ||
| 2. Otherwise, if the current locale is qualified with a region (e.g., `en_US`) and there is a `messages.json` file for the regionless version of that locale (e.g., `en`), and that file contains the string, return it. | ||
| 1. Return the string if there is a `messages.json` file for the user's set browser locale containing the string. For example, if the user has set their browser to `en_US` and the extension provides an `en_US` `messages.json` file. | ||
| 2. Otherwise, if the browser locale is qualified with a script or region (e.g., `en_US` or `zh-Hans-CN`) and there is a `messages.json` file for the regionless version and failing that the scriptless version of that locale and that file contains the string, return it. For example, if the user has set their browser to `zh-Hans-CN`, the i18n system looks for a string in `zh-Hans`, and if that isn't available, `zh.` |
There was a problem hiding this comment.
| 2. Otherwise, if the browser locale is qualified with a script or region (e.g., `en_US` or `zh-Hans-CN`) and there is a `messages.json` file for the regionless version and failing that the scriptless version of that locale and that file contains the string, return it. For example, if the user has set their browser to `zh-Hans-CN`, the i18n system looks for a string in `zh-Hans`, and if that isn't available, `zh.` | |
| 2. Otherwise, if the browser locale is qualified with a script or region (e.g., `en_US` or `zh-Hans-CN`) and there is a `messages.json` file for the regionless version and failing that the scriptless version of that locale and that file contains the string, return it. For example, if the user has set their browser to `zh-Hans-CN`, the i18n system looks for a string in `zh_Hans-CN`, if unavailable, look for `zh_Hans`, and if that isn't available, `zh.` |
There was a problem hiding this comment.
@carlosjeurissen given that we've already covered the case of an exact match between the browser's set language and a locale file in point 1, I've rephrased this for clarity.
files/en-us/mozilla/add-ons/webextensions/internationalization/index.md
Outdated
Show resolved
Hide resolved
Co-authored-by: carlosjeurissen <1038267+carlosjeurissen@users.noreply.github.com>
|
This pull request has merge conflicts that must be resolved before it can be merged. |
|
@pepelsbey - this PR is targeting |
…multiple-locales-fallbacks # Conflicts: # files/en-us/mozilla/firefox/releases/139/index.md
|
@bsmth can I clarify your comment
Also, is everything OK with the 139 release notes? I got a merge conflict, and on checking, despite the fact that you appeared to have merged it earlier, it isn't listed in the source and now appears to be indicated as added in this PR. |
|
@rebloor was surprised to see the same. However when checking file changes since all commits, only the PR changes appear. |
|
According to the page commits, it was created by Brian https://github.com/mdn/content/commits/a56169ec1548a24c8d946773b6a645d4726ed74a/files/en-us/mozilla/firefox/releases/139/index.md |
|
@rebloor starting from the Firefox 139 release, we’ll be changing the release notes workflow a bit. We keep release notes for upcoming Firefox versions in the Do you mind creating a separate PR with 139 release notes targeting the Thank you! |
Rob--W
left a comment
There was a problem hiding this comment.
Split the 139 notes to a separate PR as requested above, and then this is good to squash and merge.
|
Release notes now in #39188 |
Description
Provides a release note for Bug 1381580 "Support multiple fallback locales in i18n API". This change amended the way that localized extensions identified a translation string by cascading through region, language, and then extension default.