Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated advice on testing localizations #11381

Merged
merged 3 commits into from
Dec 23, 2021

Conversation

rebloor
Copy link
Contributor

@rebloor rebloor commented Dec 22, 2021

Summary

Update the internationalization page with the best practice for testing localizations.

Motivation

The procedure described on the page does not work.

Related issues

Addresses Issue with "Internationalization": Testing information no longer accurate #4733

Metadata

This PR…

  • Adds a new document
  • Rewrites (or significantly expands) a document
  • Fixes a typo, bug, or other error

@rebloor rebloor added the Content:WebExt WebExtensions docs label Dec 22, 2021
@rebloor rebloor requested a review from rpl December 22, 2021 01:39
@rebloor rebloor self-assigned this Dec 22, 2021
@rebloor rebloor requested a review from a team as a code owner December 22, 2021 01:39
@github-actions github-actions bot added the Content:Other Any docs not covered by another "Content:" label label Dec 22, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Dec 22, 2021

Preview URLs

Flaws

None! 🎉

External URLs

URL: /en-US/docs/Mozilla/Add-ons/WebExtensions/Internationalization
Title: Internationalization
on GitHub

(this comment was updated 2021-12-22 23:06:14.657788)

Copy link
Member

@rpl rpl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Richard,
this looks good but, before signing it off, I have some doubts related to the first paragraph, in particular the way we refer to the Firefox builds that the extension developer can use to test our the localization (more on that in the review comment below, along with a proposed tweak).

Besides that (as a follow up to consider, non blocking for this PR):

while reading the content of this section, I realized that this section as is it is 100% Firefox-specific, and it made me recall of that "Testing Permissions Requests" extensionworkshop doc page that you worked on some time ago.

I'm absolutely ok with just fixing the content of the section here on MDN for now, but it looks like this content would fit slightly better in extensionworkshop than on MDN (maybe MDN could instead just link the extensionworkshop page at that point, and other browser vendors could do the same if they want).

We may file that as a follow up issue in the extensionworkshop.com, as a reminder that we would like to do that. wdyt?

@@ -392,21 +392,11 @@ padding-left: 1.5em;

## Testing out your extension

Starting in Firefox 45, you can [install extensions temporarily from disk](https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox). Do this, and then try testing out our [notify-link-clicks-i18n](https://github.com/mdn/webextensions-examples/tree/master/notify-link-clicks-i18n) extension. Go to one of your favorite websites and click a link to see if a notification appears reporting the URL of the clicked link.
To test your extension's localization, you use the public release of Firefox or [Firefox beta](https://www.mozilla.org/en-US/firefox/channel/desktop/), the versions of Firefox in which you can install language packs.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that "public release of Firefox" is how we usually refer to those release channels, an alternative rewording that I can think of right now is:

you can use the last Firefox and Firefox Beta releases, ...

We may also link Firefox to https://www.mozilla.org/en-US/firefox/new/ (mainly for consistency with linking Firefox Beta to https://www.mozilla.org/en-US/firefox/channel/desktop/).

Similarly "versions of Firefox" makes me think to the version number (95, 96 etc), while in this case we refer to release channels more than versions.
How about:

, for these Firefox builds additional installable langpacks are available.

Or maybe just omit that part and just proceed with the next paragraph that describes how to switch language in this builds.

wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point with regard to the reference to versions. I do, however, think it's useful to mention the reason for testing in these builds, so I think it's worth retaining the mention of language packs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point with regard to the reference to versions. I do, however, think it's useful to mention the reason for testing in these builds, so I think it's worth retaining the mention of language packs.

Sure, sgtm, let's keep a mention to the motivations.


Next, change Firefox's locale to one supported in the extension that you want to test.
Then, for each language you want to test, follow the instructions to [Use Firefox in another language](https://support.mozilla.org/en-US/kb/use-firefox-another-language) to switch the Firefox UI language. (If you know your way around Settings, under Language, use Set Alternatives.)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or for each locale supported in the extension that you want to test, similar with the previous version of this step.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, updated

Copy link
Member

@rpl rpl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rebloor thanks for the quick updates! I have a couple more comments for two small tweaks, after that from my perspective this should be ready to go.

@@ -392,21 +392,11 @@ padding-left: 1.5em;

## Testing out your extension

Starting in Firefox 45, you can [install extensions temporarily from disk](https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox). Do this, and then try testing out our [notify-link-clicks-i18n](https://github.com/mdn/webextensions-examples/tree/master/notify-link-clicks-i18n) extension. Go to one of your favorite websites and click a link to see if a notification appears reporting the URL of the clicked link.
To test your extension's localization, you use the public release of Firefox or [Firefox beta](https://www.mozilla.org/en-US/firefox/channel/desktop/), the versions of Firefox in which you can install language packs.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point with regard to the reference to versions. I do, however, think it's useful to mention the reason for testing in these builds, so I think it's worth retaining the mention of language packs.

Sure, sgtm, let's keep a mention to the motivations.

@@ -392,21 +392,11 @@ padding-left: 1.5em;

## Testing out your extension

Starting in Firefox 45, you can [install extensions temporarily from disk](https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox). Do this, and then try testing out our [notify-link-clicks-i18n](https://github.com/mdn/webextensions-examples/tree/master/notify-link-clicks-i18n) extension. Go to one of your favorite websites and click a link to see if a notification appears reporting the URL of the clicked link.
To test your extension's localization, you use [Firefox](https://www.mozilla.org/en-US/firefox/new/) or [Firefox beta](https://www.mozilla.org/en-US/firefox/channel/desktop/), the Firefox builds in which you can install language packs.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, beta => Beta

3. If the `intl.locale.requested` preference does not exist, right-click the list of preferences (or activate the context menu using the keyboard), and choose "New" followed by "String". Enter `intl.locale.requested` for the preference name and, "de", or "nl", etc. for the preference value, as described in step 2 above.
4. Search for `intl.locale.matchOS` and, if the preference exists and has the value `true`, double-click it  so that it is set to `false`.
5. Restart your browser to complete the change.
Once Firefox is running in your test language, [install the extension temporarily](https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox). If you've set up your extension correctly, you see the extension listed with its icon, name, and description in the chosen language. Now exercise the extension's features to ensure the translations you need are in place.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's mention about:addons and about:debugging as two places that the developer can easily and quickly check that the localized manifest properties are being localized as expected in the Firefox UI.

@rebloor
Copy link
Contributor Author

rebloor commented Dec 22, 2021

@rpl I agree with your comments regarding whether this testing information should be on extension workshop, given that it is very Firefox specific. I've created Localization testing #1185 as a follow-up.

@rebloor rebloor requested a review from rpl December 22, 2021 23:11
@rebloor rebloor merged commit 7b6ca86 into mdn:main Dec 23, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Content:Other Any docs not covered by another "Content:" label Content:WebExt WebExtensions docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants