doug-101 / ConvertAll-py

a flexible unit converter
http://convertall.bellz.org
39 stars 15 forks source link

How to create translations #8

Closed pereorga closed 4 years ago

pereorga commented 4 years ago

Hi,

Please could you provide instructions on how to create new translations from scratch? I would like to contribute the Catalan translation.

Thanks

doug-101 commented 4 years ago

Pere Orga wrote:

Hi,

Please could you provide instructions on how to create new translations from scratch? I would like to provide a Catalan translation.

From the source, copy the translations/working/convertall_xx.ts file to translations/working/convertall_ca.ts. Then use the Qt Linguist tool (Google for downloads) to add GUI translations to that file. After it's done, the Release command in Linguist can be used to create a binary file that ConvertAll can load.

Then copy the data/units.dat file to units_ca.dat. Translations of the unit names in this file need to be made manually using a text editor.

Let me know if you have more questions.

Thanks, Doug

pereorga commented 4 years ago

I'll have a look, thanks!

pereorga commented 4 years ago

When trying to run the program with the new files, I get:

Warning: translation file "qt_ca" could not be loaded

Do I need to create qt_ca.qm and qt_ca.ts?

pereorga commented 4 years ago

(Apart from that warning, everything works though)

doug-101 commented 4 years ago

Pere Orga wrote:

When trying to run the program with the new files, I get:

Warning: translation file "qt_ca" could not be loaded

Do I need to create qt_ca.qm and qt_ca.ts?

The first one needs to be included, but the second one isn't necessary. You don't need to create it though - it should already be part of a standard Qt installation. I can add it for you if you can't easily find it.

-Doug

pereorga commented 4 years ago

All good then!

pereorga commented 4 years ago

I am creating a PR right now, thanks