Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

Translating the WebExtension #141

Open
darktrojan opened this issue Sep 27, 2017 · 11 comments
Open

Translating the WebExtension #141

darktrojan opened this issue Sep 27, 2017 · 11 comments

Comments

@darktrojan
Copy link
Owner

darktrojan commented Sep 27, 2017

Open With will soon be released as a WebExtension. Here's some notes on how to translate it.

  • If you're okay working with Git, clone the repo to your machine. You can install it in Firefox temporarily by visiting about:debugging. Choose the webextension directory. This is probably the easiest way to check your changes, and you can reload as you go.

  • Otherwise start by getting the WebExtension from here so you know what you're looking at.

  • Locales live in the webextension/_locales directory. Copy the en/messages.json file into your own directory (e.g. de/messages.json for German) to begin. In GitHub when you create a new file in your own fork the directory will be created also, if you type it right.

  • I've tried to organise the strings in a logical way, e.g. all the browserList_… strings appear in the list of browsers and the details_… strings appear in the add/edit browser form on the options page. Some might be hard to find, for example the icon_… ones only pop up when your mouse is over the icon selection box.

  • Some strings only appear when first installed. You can see those by visiting the options page, then changing the address from options.html to installed.html. There's also action.html which is the usual toolbar popup.

  • Complicated bits like this:

	"test_success": {
		"message": "Found version $VERSION$ at $LOCATION$.",
		"placeholders": {
			"location": {
				"content": "$2",
				"example": "/home/geoff/Desktop/open_with_linux.py"
			},
			"version": {
				"content": "$1",
				"example": "7.0"
			}
		}
	},

can be reduced in your copy to:

	"test_success": {
		"message": "Found version $1 at $2.",
	},

The extra information is to make it easier for humans to understand what is going on. In fact, message is the only piece it's necessary to keep for any of the values.

  • If you want to keep the English version of a string, remove it from your file.

If you have any questions, I can answer them here.

@darktrojan
Copy link
Owner Author

@s8321414 @Cye3s @Matthaiks Here's some info for you if you want to translate the next version before release. Thanks for your help!

@darktrojan
Copy link
Owner Author

@leschek @lucasgsilva @muflone @private-lock @aguador @Krzysiu @DenDan777 @rcmero @goofy-bz

Hello Open With translation helpers! I've had to completely rewrite Open With and plan to release it in the upcoming weeks. If you'd like to translate it before it's released to most users, in this thread is some information to help with that.

If you're no longer interested, I understand that. You might want to unsubscribe from this thread so you don't get spammed with more email messages.

Thanks very much everybody. I'm sure my users like having Open With in their own language. :-)

@s8321414
Copy link
Contributor

OK, I will do it in the following days 😄

@rcmero
Copy link
Contributor

rcmero commented Oct 5, 2017

Let me take a look at that, and I'll see what I can do.

EDIT: I was taking a look at your post and one part got me a bit confused.
"test_success": {
"message": "Found version $VERSION$ at $LOCATION$.",
},

"test_success": {
"message": "Found version $1 at $2.",
},

In this case, when writing the placeholder text, should I use $1 and $2 or $VERSION$ and $LOCATION$?

@darktrojan
Copy link
Owner Author

@rcmero Use $1 and $2.

@private-lock
Copy link
Contributor

It seems zoo2translate is broken? I've updated the translations, but it won't create the pull-request. It seems the last pull-request from 2015 is hindering it.
https://zoo2translate.herokuapp.com/darktrojan/openwith/de

@darktrojan
Copy link
Owner Author

@private-lock Yeah, it's long dead. The only reason it's still accessible is because I haven't got around to turning it off.

@alexesprit
Copy link
Contributor

@darktrojan What do you think about translation platforms, e.g. Transifex? They have pretty comfortable translation editor, auto-update source file from remote URL (GitHub project) and some other useful features. I think this could make translation to other languages a bit easier.

@ScratchBuild
Copy link
Contributor

@darktrojan Crowdin of translation service seems to be able to cooperate with gihub.
https://support.crowdin.com/github-integration/

@leschek
Copy link
Contributor

leschek commented Nov 24, 2017

I downloaded extension, duplicated English file and translated it to Czech language. Can I upload it somewhere?

@miki2207
Copy link

Thank you for your great work! It's make life easier :)
I made small update to Polish translation for ver86 (16 Dec 2017)

  • "backup_button": {

  •   "message": "Kopia zapasowa…"
    
  • },

  • "backup_description": {

  •   "message": "New Tab Tools utworzy plik zawierający Twoje ustawienia, przypięte kafeki oraz obraz tła."
    
  • },

  • "backup_header": {

  •   "message": "Kopia zapasowa:"
    
  • },

  • "backup_restore_button": {

  •   "message": "Kopia zapasowa/Przywracanie ustawień…"
    
  • },

    "restore_button": {
    "message": "Przywracanie ustawień"
    },
    "restore_description": {
    "message": "Wybierz plik kopii zapasowej New Tab Tools, aby przywrócić ustawienia."
    },
    "restore_header": {
    "message": "Przywracanie ustawień:"
    },
    "restore_warning": {
    "message": "Ta operacja usunie obecne ustawienia, przypięte kafelki oraz obraz tła i nie będzie możliwości powrotu do nich."

    },

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants