web-ext-translator icon indicating copy to clipboard operation
web-ext-translator copied to clipboard

Fillin translations for same original text

Open yfdyh000 opened this issue 6 years ago • 7 comments

Idea: A button is placed on the right side of the translation box. Displayed when the source text exists in multiple strings, allow the translator to one click to fill in them, and displayed as a different background color for review before submission.

yfdyh000 avatar Aug 19 '18 02:08 yfdyh000

What do you mean by multiple strings? multiple lines? or multiple languages?

In any way, I think this might cause copy/paste errors, which I'd rather avoid.

Lusito avatar Aug 19 '18 09:08 Lusito

Maybe @yfdyh000 means if you have the ID multiple times in the original file. IMHO, however, that's bad practice and probably causes bad/unexpected browser behavior.

rugk avatar Aug 19 '18 12:08 rugk

Yeah, that's not something I'm gonna advise.

Lusito avatar Aug 19 '18 13:08 Lusito

Like some strings just retelling the extension name, the access key or others with different IDs, it may appear multiple times, I don't want to copy & paste or typed multiple times, but rather have a button or method to quickly/bulk fill the translations from source or translated text.

Or provide an export option to fill the source text to the missing translations (you can check and alert the number) so that I don't want to fill it out.

yfdyh000 avatar Aug 20 '18 06:08 yfdyh000

Hmm, don't get what you talk about IDs. IDs should (and usually even have to) be unique.

However, what I could guess this issue is about - and a feature I would support, is having to "auto-fill" the original string when translating it:

grafik

should change to this, once clicked on:

grafik

Also notice it should be auto-selected, so you can instantly write your translation if you want to ignore the source string.

rugk avatar Aug 20 '18 13:08 rugk

I think I get what you are talking about.. I thought about something similar, a while back, when I had the idea to write some middleware for the web-extension to use instead of the web-extension i18n API.

In that case, I would have allowed to use placeholders in translations.

For example, my extension has the following translations:

Key Message
extensionName Forget Me Not
actionTitle Forget Me Not
actionTitleSnooze Forget Me Not (temporarily disabled)
logo@title Forget Me Not

For this case, I would have used this instead:

Key Message
extensionName Forget Me Not
actionTitle ${extensionName}
actionTitleSnooze ${extensionName} (temporarily disabled)
logo@title ${extensionName}

And the placeholders would automatically be replaced. But I put that idea on ice, since that would require a lot of rewriting from extension authors.

If you have ideas how this can be solved without middleware, please let me know. I don't think a button to copy/paste is very intuitive.

Lusito avatar Aug 23 '18 19:08 Lusito

@Lusito I guess we have two use cases in mind.

Yours is "Parts of translations keep getting repeated. It would be good to have a placeholder.". My one is "If I want to add a new translation (aka https://github.com/Lusito/web-ext-translator/issues/27), then I want to copy-paste the original translation and translate it word-by-word or sentence-by-sentence or so 8depending on the length)".

rugk avatar Nov 04 '18 18:11 rugk