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

Provide an option to output without hash fields

Open yfdyh000 opened this issue 6 years ago • 6 comments

This may be a good idea if the translators observes the changes on its own, just use the tool as an assistant, and outputs a clean result file to avoid rejection of the intent project.

In addition, I think you can provide more credit in the result, clearly promote the project, and a translators fileds.

yfdyh000 avatar Aug 19 '18 02:08 yfdyh000

That sounds reasonable.

I think credit should probably be managed in a separate file, since those names don't need to be translated and having to modify all translation files for this would be ugly.

Lusito avatar Aug 19 '18 09:08 Lusito

I think credit should probably be managed in a separate file, since those names don't need to be translated and having to modify all translation files for this would be ugly.

I mean, like "__WET_Generator__": { "message": "https://lusito.github.io/web-ext-translator/" } to promote, and like "__WET_Translators__": { "message": "name <[email protected]>, ..." } to fill in the translators (optional), as distribution may not contain the translator contact.

You can also refer to the meta of .po file.

yfdyh000 avatar Aug 20 '18 06:08 yfdyh000

I guess this is actually maybe an interesting idea. As then you may be able to add a "Translated into by <user>" line to the add-on.

Thinking about the details, however, I guess you may better have it in this format, as you need to translate it itself:

"aboutTranslation": {
    "message": "This add-on has been translated into $LANGUAGE$ by $AUTHOR$.",
    "description": "Tells the user which link they clicked.",
    "placeholders": {
      "language" : {
        "content" : "English (US)",
      },
      "author" : {
        "content" : "@rugk",
      }
    }
  }

And seeing this, I don't think wet can (or should) add anything automatically. The language needs to be auto-filled, but the translator has/have to enter their name anyway.

rugk avatar Aug 20 '18 13:08 rugk

I'm not sure if putting the e-mail of translators in the file is such a good idea. Having an entry "Translated into by " would be a nice thing and since it's always shown for the active language, there is no need to split this. Just let the translator enter the entire string as one message.

I think this should probably be more of a guide-line, since using wet won't automatically adjust the web-extension to show this kind of information, so the extension developers will have to use the key. And in this case, I would rather write up a recommended things to do, so that extension authors can choose the naming of the message key themselves.

For example, I would probably use something like this for my extensions:

"extensionTranslators": {
        "message": "Translated into english (en) by Beavis and Butt-Head",
        "description": "Translation credit.. write your own name here if you feel like it"
},

Someone else might prefer "extension-translators", "extension_translators" or even something entirely different.

Lusito avatar Aug 23 '18 19:08 Lusito

I guess I could add WET_Generator to the file, but that feels a bit like the 90s era where html editors like frontpage would write their generator tag into the source. I'll consider it.

Lusito avatar Aug 23 '18 19:08 Lusito

I would rather write up a recommended things to do, so that extension authors can choose the naming of the message key themselves.

👍

since it's always shown for the active language, there is no need to split this

Maybe not, but it seems to be considered a quite good practise anyway. At least, MDN Docs has examples for it.

Anyway, I agree, this thing here should be up to the extension authors.

rugk avatar Aug 24 '18 06:08 rugk