Thanks for your interest in translating Fritzing into another language. So far we have Fritzing available in English, German, Spanish, Italian, French, European Portuguese, Dutch, Chinese (Simplified), Chinese (Traditional), Japanese, and Russian.
We manage translations on Weblate, a web-based translation platform. You translate Fritzing right in your browser—there's nothing to install—and we take care of the technical side. Here's how to get started:
1. Contact us and let us know which language you’d like to work on.
Send us a message letting us know that you're interested in translating Fritzing into another language. Our Weblate project isn't publicly open yet, so we'll create an account for you and add you to the language you'd like to translate.
2. Translate Fritzing texts in Weblate
Once you're invited, you translate one phrase at a time directly in Weblate. For each English string you'll see a text box for your translation, the context it appears in, suggestions based on previous translations, and warnings about things like missing punctuation. A few helpful notes:
- You DON'T have to translate ALL texts. It's fine to do just the major ones and leave the rest—untranslated phrases simply appear in English.
- Your work is saved as you go, and you can come back at any time to continue.
- If a phrase is unclear, the surrounding context shown in Weblate usually makes the intent clear.
3. The technical side (you don't need to touch this)
Behind the scenes Fritzing uses Qt's translation system. The English strings live in files called “fritzing_your_language.ts” in the translations subfolder of the source repository. Weblate imports and exports those files for you, so you don't need to download the source code or install any tools to translate—but the repository is there if you'd like to see the surrounding source for extra context.
4. What do you mean "%1%2%3"
No these aren't curses. They represent values to be filled in at runtime. Languages have different ways to order words in phrases, so the order of these values can be changed accordingly. Here's an explanation (from the programmer's point-of-view) from Qt. The phrase you would see in Weblate is the one inside the "tr()":
void FileCopier::showProgress(int done, int total, const QString ¤tFile){
label.setText(tr("%1 of %2 files copied.\nCopying: %3").arg(done).arg(total).arg(currentFile));
}
In some languages the order of arguments may need to change, and this can easily be achieved by changing the order of the % arguments. For example:
QString s1 = "%1 of %2 files copied. Copying: %3"; // the phrase in quotes is what you would see in Weblate
QString s2 = "Kopierer nu %3. Av totalt %2 filer er %1 kopiert."; // the phrase in quotes is how you would translate it to Norwegian in Weblate
qDebug() << s1.arg(5).arg(10).arg("somefile.txt");
qDebug() << s2.arg(5).arg(10).arg("somefile.txt");
produces the correct output in English and Norwegian:
5 of 10 files copied. Copying: somefile.txt Kopierer nu somefile.txt. Av totalt 10 filer er 5 kopiert.
There's also a special parameter form for plurals: %n. Qt gives a good explanation here.
5. Translation is an ongoing process
There's nothing to upload or send us—your translations are saved in Weblate as you work. It is not necessary to translate all of Fritzing at one go, since you translate one phrase at a time. As Fritzing is developed, new prompts, dialogs, and menu items are added, so consider returning to Weblate every so often to translate the new strings. Translations are not lost as Fritzing changes: as long as the text of a given phrase stays the same between versions (which is true in the majority of cases), your translation is preserved in future versions.
Let us know if you run into any difficulties and thanks very much for helping out.
Note for Developers
How to update existing and create new translation files:
- add the new locale to
fritzing/translations/translations.pri - run
lupdate phoenix.proto generate/update the .ts files - commit and send the link to the raw file (e.g.
https://github.com/fritzing/fritzing-app/raw/master/translations/fritzing_de.ts) to the translator - when the translation is done:
- create and commit the qm file
- add the language to the preferences list in
translatorlistmodel.cpp