cxw42 / TabFern

Google Chrome extension for saving and restoring sets of tabs, and for switching between windows and tabs from a vertical, grouped list.
https://cxw42.github.io/TabFern/
Other
170 stars 29 forks source link

Internationalization and Localization #135

Open cxw42 opened 6 years ago

cxw42 commented 6 years ago

Translate the UI into:

cxw42 commented 6 years ago

@Procyon-b said:

Do you plan on adding language support with the standard i18n (the user has no choice), or with an alternative like in tampermonkey. I have made my own in alias bookmarks. The advantage of my solution is that you can leave original language text in place, as long as you mark the tag containing it. My localize code is 30 lines long.

Currently I'm using the standard, but I am using _T = chrome.i18n.getMessage; and then only referring to _T after that. Therefore, it should be straightforward to use a different implementation. I think you are referring to loc.js in Alias Bookmarks, right?

Either way, I would like to use the Chrome i18n messages.json format so that the Web Store listing can also be localized. As you have opportunity, would you please work on the message values in the fr file? The description and other non-message values are only for your reference and not for translation (see Chrome API docs). Thank you very much indeed!

Procyon-b commented 6 years ago

I think, IIRC, tampermonkey is using a solution maskerading as chrome.i18n.getMessage, so anything is possible.

Yes it's loc.js I have a separate function loading the locale. In that extension, in the background process. But it's easy to implement it in loc.js and have each page load the locale.

Alias bookmarks is using i18n files. Chrome is using it for the manifest file, and in the extension manager to display info in the user's interface language. (see "_locales/EN full example" for the full english file) So I'm able to edit message.json.

Procyon-b commented 6 years ago

Here is the translation.

messages.fr.zip

Edit: I will continue translating the new version

Procyon-b commented 6 years ago

In version 2 of the file (in english), line 293: "Parse" with an "e"

Procyon-b commented 6 years ago

Full translation of the current file messages.zip

cxw42 commented 6 years ago

@Procyon-b Thank you very much indeed! There will be some more messages later, after I finish updating the JavaScript and pulling them out, but I am very happy to have these in place. Thanks also for the typo correction, which I have applied to the en file.

Procyon-b commented 6 years ago

I have seen your message about "authors". What is the correct procedure to add modifications? A pull request? I thought about doing one for message.json, but since you were in the process of applying more modifications (I wasn't sure), I didn't want to get in the way.

cxw42 commented 6 years ago

@Procyon-b The "author" issue is only on GitHub's end --- technically, our current workflow should be just fine.

Yes, pull requests always work --- even if I am working on something in parallel, I will be able to merge the PR. That happened early in the life of the project, when @r4j4h and I were working on it in parallel --- there's some gnarled merge paths in the early commits :) . Also, when I merge the PR, I can make changes if necessary.

Whichever workflow makes the most sense for you is OK with me! Thanks for asking!

Procyon-b commented 6 years ago

I'm using windows and chrome with interface in english. Let me know if you need to verify the translation, and I'll start chrome in a test profile.

cxw42 commented 6 years ago

@Procyon-b if you're willing, I certainly wouldn't object! You can also just change your Chrome language to fr and restart Chrome, and you should see results.

If you do create a test profile, make sure to use the --user-data-dir command-line argument, since the language is shared between all profiles in a data directory. https://developer.chrome.com/extensions/i18n#testing-win

Thank you!

Procyon-b commented 6 years ago

I have used method 1 in the past. Here, since I don't plan on using this profile, I have used the shortcut method. At first glance TF in 'fr' seems correct.

Edit: I don't know if this should be already translated, but the extension button menu has "Add/edit a note for the current tab"

cxw42 commented 6 years ago

Good catch --- I had forgotten about that one. Added to de and en. I have some more messages to pull out of the source (e.g., Settings) and will send you, later on, an updated fr/messages.json including the "add/edit" item and those items. Thank you!