mozilla / notes

DEPRECATED - A notepad for Firefox
https://testpilot.firefox.com/experiments/notes
Mozilla Public License 2.0
495 stars 130 forks source link

Add localization support #42

Closed vladikoff closed 7 years ago

vladikoff commented 7 years ago

See a good example: https://github.com/bwinton/SnoozeTabs

ghost commented 7 years ago

/cc @flodolo

flodolo commented 7 years ago

This is one confusing issue subject :-) I'd suggest "Add localization support".

I'm happy to answer questions if you have, I took a quick look at the repository and couldn't spot any string, so you might check at other repositories to see how they manage extracting strings to .properties, etc.

vladikoff commented 7 years ago

Sorry, I typed it during the meeting. Updated

flodolo commented 7 years ago

Some links in the meantime https://www.npmjs.com/package/pontoon-to-webext

File structure requested by Pontoon https://developer.mozilla.org/en-US/docs/Mozilla/Implementing_Pontoon_in_a_Mozilla_website

Pontoon can commit in master or in a branch, like it happens for SnoozeTabs.

Is this a TestPilot experiment?

vladikoff commented 7 years ago

Is this a TestPilot experiment?

Yeap!

Natim commented 7 years ago

Questions

flodolo commented 7 years ago

What are the steps to configure Pontoon?

That's on me as soon as soon as you create the en-US file. You'll need to tell me which repository (I assume this one) or branch to commit to, and give Pontoon's bot access to the repository.

Are there any missing steps you can see?

I'd really like to avoid having an hard-coded list of locales (I didn't realize SnoozeTabs has one), because it's easy to forget to update it. I'm not sure how Activity Stream does it, but I don't think they use an hard-coded list. https://github.com/mozilla/activity-stream/blob/master/docs/v1-test-pilot/localization.md

Do we have to do anything to configure browser.i18n?

I don't think so, but some technical details are also beyond my area of expertize.

vladikoff commented 7 years ago

From mtg:

udaraweerasinghege commented 7 years ago

I can't tag you in the pr comments @flodolo ._. Will this be sufficient for configuring pontoon on your end : https://github.com/mozilla/notes/pull/95

flodolo commented 7 years ago

Will this be sufficient for configuring pontoon on your end : #95

How complete is that localization file, i.e. how many strings are missing? I'm not sure if it makes sense to start localization if the file is far from complete.

If it's just for testing Pontoon automation, I can set it up on the dev version and try to see if it can commit (still not sure if you want commits in master or a branch).

At some point we will also need an easy way to test the dev add-on, possibly without having to install it from code (not all localizers are necessarily tech savvy).

udaraweerasinghege commented 7 years ago

Thanks for taking a look!

How complete is that localization file, i.e. how many strings are missing? I'm not sure if it makes sense to start localization if the file is far from complete.

The localization file is complete with all the strings currently in the project, as well as a couple extra that are in the designs but not in the project.

If it's just for testing Pontoon automation, I can set it up on the dev version and try to see if it can commit (still not sure if you want commits in master or a branch).

^^ cc: @vladikoff

flodolo commented 7 years ago

The user needing access is: https://github.com/mozilla-pontoon

Also cc @mathjazz, so he's aware of the incoming invite.

P.S. you can ping random people in comments, you just need to type their nicknames completely, autocomplete is available only for collaborators of the project

vladikoff commented 7 years ago

@mathjazz @flodolo added @mozilla-pontoon to the repo 👍

flodolo commented 7 years ago

I'll try to hook the repo tomorrow morning for a test (in case you'll see an incoming Italian localization).

flodolo commented 7 years ago

@vladikoff commit to master or a branch?

flodolo commented 7 years ago

A few more questions (I'll ask them here instead of #95, since that's already closed):

flodolo commented 7 years ago

Is Sync intended as generic synchronization, or Firefox Sync?

@natim already answered this one (generic sync), I'll need to add a comment in the file. Sorry for the confusion, since you saw my comment disappear in the other PR.

Natim commented 7 years ago

syncComplete=Synced. Looking at the designs, do you expect to put a date after this string?

Yes

Looks like "Verify Your Account" is not available in the file. Expected?

Yes, we know we will need this string but for this first version we removed the code related to synchronization and account management.

What's the usage of "Notes" at the top of the panel?

That's the title of the sidebar/add-on.

flodolo commented 7 years ago

That's the title of the sidebar/add-on.

Is that expected to be non localizable and identical to the add-on name?

Natim commented 7 years ago

Can we localize the name of the add-on? My understanding is that the value is coming from the manifest.json file directly.

flodolo commented 7 years ago

No, we can't. That's why I'm asking if the plan is to basically use the add-on names, or if it's a generic "annotations". For the latter, we would need a localizable string.

Natim commented 7 years ago

@vladikoff commit to master or a branch?

I think it is fine to commit localization directly to master since the review process happens in Pontoon already.

flodolo commented 7 years ago

Localization is working https://github.com/mozilla/notes/commit/b96d7682cc074f819565b4918db9adc957c59dc9 https://github.com/mozilla/notes/commit/a1b6abdeaca68d65b558887c390498dc3cfa4bcc

At this point we could enable it on the prod server. A couple more questions:

flodolo commented 7 years ago

Correct link to current description: https://mozilla-pontoon-staging.herokuapp.com/projects/test-pilot-notes/info/

Natim commented 7 years ago

Does this description make sense?

Yes

Any idea when this will be added to Test Pilot experiments?

First weeks of July.

flodolo commented 7 years ago

First weeks of July.

OK, I'm going to enable the project and send an email out to localizers. I'll also enable French: note that you will be able to submit suggestions, but you'll need someone to review them (CC @TheoChevalier so he's aware).

flodolo commented 7 years ago

On a side note: I wonder if you want to (and can) disable CI on these commits.

flodolo commented 7 years ago

Project is set up on prod https://pontoon.mozilla.org/projects/test-pilot-notes/

Email sent to dev-l10n https://groups.google.com/d/msg/mozilla.dev.l10n/axPllXUlh34/mjlfMMaiAwAJ

This discussion might be useful for the date part https://github.com/bwinton/SnoozeTabs/pull/206

flodolo commented 7 years ago

Last thing to note: the policy for updating strings is the same as Firefox https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_content_best_practices#Changing_existing_strings

If you want your change to be noticed and considered by other languages, you need to change the string ID.

vladikoff commented 7 years ago

Thanks so much @flodolo !

vladikoff commented 7 years ago

Thanks @udaraweerasinghege !! This was fixed