Please help translating the Picard Windows installer

Tags: #<Tag:0x00007fef6a6393e8> #<Tag:0x00007fef6a639280> #<Tag:0x00007fef6a639118>

With the upcoming release Picard will support a localized Windows installer for the first time. At the moment the installer is available in English, Italian and German. But it would be great if we could provide even more languages.

If somebody is interested in helping out I think this is a great and easy way to contribute to Picard. There is not much text in the installer that needs to be translated, and it is only a single file that needs to be edited. Most of the installer text actually is already translated by the installer itself, it is just some custom text the Picard installer has that needs translation.

Simple way to help:

  1. First make sure the language you want to install to is listed at https://github.com/metabrainz/picard/blob/master/installer/picard-setup.nsi.in#L84 . These are all the languages currently supported by the NSIS installer, adding other languages is currently not easily possible.
  2. Download the English translation from https://raw.githubusercontent.com/metabrainz/picard/master/installer/languages/English.nsh and rename it to the language name in the previous list. E.g. if you want to translate into Czech name the file Czech.nsh.
  3. Translate the text in the file. A few rules:
    • Replace the ${LANG_ENGLISH} with the language name as used in the filename, but all uppercase. So for Czech translation use ${LANG_CZECH}

    • Only translate the last part in quotation marks, keep the rest of the lines as is.
      As an example this text line:

      LangString SectionRequired ${LANG_ENGLISH} "Program files (required)"
      

      becomes this for Italian:

      LangString SectionRequired ${LANG_ITALIAN} "File programma (richiesti)"
      
    • All translations must be done in a single file. If a line break is needed enter $\n where the line break should be.

    • If you need to use single or double quotation marks in a text and the used quotation marks (single or double) are identical to the ones used to surround the entire translation, encode it with $\" or $\'. E.g.

      LangString OptionRemoveSettings ${LANG_ENGLISH} "This is text with $\"quotation$\" marks :)"
      
  4. If everything is translated, post the file here and let me know how you would like to be credited in the commit message (full name, username, something else, not at all). Please note that as all of Picard code is licensed under the GPL that you need to agree that the translation will be used and distributed with Picard according to the GPL.

Advanced workflow:

The better way instead of downloading the file is to properly fork and clone the Git reporitory from Github, add the translated file directly into installer/languages, commit your changes and open a pull request on Github. See https://github.com/metabrainz/picard/blob/master/CONTRIBUTING.md#git-work-flow for details on how to do this. Feel free to ask for help here.

In addition to adding the file you should also edit installer/picard-setup.nsi.in and remove the semicolon before the line of the LOAD_LANGUAGE macro for your language. E.g. for Czech the existing line:

; !insertmacro LOAD_LANGUAGE "Czech"

becomes

!insertmacro LOAD_LANGUAGE "Czech"

Screenshots:

To help with translation here are screenshots of relevant installer views for reference. I could not capture every translation on this, but you should get the idea.

install-options

uninstall-options

dialog-uninstall

dialog-already-running

Thanks a lot in advance for everybody who wants to help. And of course if you want to help translate Picard’s user interface your help is also much appreciated. The main translation for Picard (and most of MusicBrainz) is done on Transifex, you can see the status of the Picard UI translation at https://www.transifex.com/musicbrainz/musicbrainz/picard/ .

2 Likes

Is it me or are not all strings translatable? For example I can’t find the string “Select components to install:”

Those are standard translations provided by the NSIS installer, as I noted above we only need to translate things specific for Picard.

1 Like

OK, I’ve added the Dutch translation on GitHub. I’m not a coder and this is my first ever pull request, so I hope there will be no explosions.

2 Likes

Thanks a lot. I fear I was a bit unclear in my original posting :frowning: The file to download and edit is only https://raw.githubusercontent.com/metabrainz/picard/master/installer/languages/English.nsh , the previous link included also some surrounding markup by Github. Editing the HTML file as you did was much more work, sorry for the confusion.

Also I forgot to mention that ${LANG_ENGLISH} needs to be replaced with the proper name for your language, so ${LANG_DUTCH} in your case.

I have updated my posting above to reflect both points.

1 Like

Where can we get this Picard 2.2.0.dev3_python3.7.3.xxxx binary (for Windows) to check the translations before submitting them?

@mfmeulenbelt I’m going to fix your pull request up and use it as an example for other contributors

1 Like

I just updated the translation anyway, please check if you are using the latest version.

Thanks a lot, I think it’s looking good :slight_smile: https://github.com/metabrainz/picard/pull/1233/files

2 Likes

That’s just some random older build I used to show the screenshots. You cannot use it to test your translations, you would need to build the installer from source. One way to handle this is to open a pull request on Github as described above. For each pull request Windows installers are built you could use to test run it.

E.g. if you look at the pull request by @mfmeulenbelt at https://github.com/metabrainz/picard/pull/1233 you will see at the bottom a list of “Checks”:

If you click on “Details” next to the one labeled continuous-integration/appveyor/pr you will see a list of Windows builds being performed. Click the topmost one (the one for Python 3.7), then on “Artifacts” and you will get a link to download the build installer. In this case it is on https://ci.appveyor.com/project/MetaBrainz/picard/builds/26716760/job/x4rwfh6a1cyddnuu/artifacts and includes the Dutch translation.

One note about testing: The NSIS installer automatically uses the language that is configured for your Windows. So you will see the Dutch interface only if your Windows is configured to be using Dutch as default language.

2 Likes