web-ext-translator
web-ext-translator copied to clipboard
Fillin translations for same original text
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.
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.
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.
Yeah, that's not something I'm gonna advise.
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.
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:
should change to this, once clicked on:
Also notice it should be auto-selected, so you can instantly write your translation if you want to ignore the source string.
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 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)".