M4rtinK / modrana

ModRana is a flexible GPS navigation system for mobile devices. This is the main upstream modRana source code repository - waiting for your pull requests & patches! :)
www.modrana.org
GNU General Public License v3.0
67 stars 21 forks source link

Translation guidelines #251

Open M4rtinK opened 6 years ago

M4rtinK commented 6 years ago

Create some guidelines for translations, such as:

dikonov commented 6 years ago

Modrana seems to use embedded localized strings. It means that a translator cannot install his own .qm file to test and cannot verify how the the translation looks on screen before the next release of modrana. It is necessary to make a private test localized build OR a quick re-release after a fresh translation gets fixed.

M4rtinK commented 6 years ago

Modrana seems to use embedded localized strings. It means that a translator cannot install his own .qm file to test and cannot verify how the the translation looks on screen before the next release of modrana. It is necessary to make a private test localized build OR a quick re-release after a fresh translation gets fixed.

Actually, I have that same problem myself - I have not been able to test translations myself without building and installing a new package. Also during development I usually run modRana via qmlscene, but the --translation flag also does not seem to work, IIRC even on desktop.

So if you have any suggestion what to try/change to make translation testing easier I'll definitely take a look at it.

dikonov commented 6 years ago

Some good apps use external files (.mo, .qm) to store localized strings.

I am not familiar with qt and prefer gtk since kde1/gnome1, so I can hardly offer any technical advice. I asked another man about qt and got this link with explanation about the embedded translations  https://doc.qt.io/qt-5/resources.html  . This is the wrong way unless you build a very small portable app that must work without installation.

Понедельник, 4 июня 2018, 18:42 +03:00 от Martin Kolman notifications@github.com:

Modrana seems to use embedded localized strings. It means that a translator cannot install his own .qm file to test and cannot verify how the the translation looks on screen before the next release of modrana. It is necessary to make a private test localized build OR a quick re-release after a fresh translation gets fixed. Actually, I have that same problem myself - I have not been able to test translations myself without building and installing a new package. Also during development I usually run modRana via qmlscene, but the --translation flag also does not seem to work, IIRC even on desktop. So if you have any suggestion what to try/change to make translation testing easier I'll definitely take a look at it. — You are receiving this because you commented. Reply to this email directly, view it on GitHub , or mute the thread .

M4rtinK commented 6 years ago

I am not familiar with qt and prefer gtk since kde1/gnome1, so I can hardly offer any technical advice. I asked another man about qt and got this link with explanation about the embedded translations  https://doc.qt.io/qt-5/resources.html  . This is the wrong way unless you build a very small portable app that must work without installation.

Oh, now I know what you mean - the Qt Resource mechanism (QRC) that makes it possible to include arbitrary resource, such as localization files, to the application binary. While modRana has some support for using QRC, that's only used for the ultra-hacky packaging on Android (could that platform be less sane...) but QRC is certainly not used Sailfish OS or on Linux desktop. For example on Sailfish OS, this is where the individual translation files are stored after you install a modRana package:

[nemo@Sailfish ~]$ ls /usr/share/harbour-modrana/translations/*.qm
/usr/share/harbour-modrana/translations/harbour-modrana-cs_CZ.qm  
/usr/share/harbour-modrana/translations/harbour-modrana-nl_NL.qm
/usr/share/harbour-modrana/translations/harbour-modrana-de_DE.qm 
/usr/share/harbour-modrana/translations/harbour-modrana-pl.qm
/usr/share/harbour-modrana/translations/harbour-modrana-es.qm     
/usr/share/harbour-modrana/translations/harbour-modrana-pt.qm
/usr/share/harbour-modrana/translations/harbour-modrana-fi_FI.qm  
/usr/share/harbour-modrana/translations/harbour-modrana-pt_BR.qm
/usr/share/harbour-modrana/translations/harbour-modrana-fr_FR.qm  
/usr/share/harbour-modrana/translations/harbour-modrana-ru_RU.qm
/usr/share/harbour-modrana/translations/harbour-modrana-hu.qm     
/usr/share/harbour-modrana/translations/harbour-modrana-sv.qm
/usr/share/harbour-modrana/translations/harbour-modrana-it_IT.qm  
/usr/share/harbour-modrana/translations/harbour-modrana-zh_CN.qm
/usr/share/harbour-modrana/translations/harbour-modrana-ja_JP.qm  
/usr/share/harbour-modrana/translations/harbour-modrana-zh_HK.qm
/usr/share/harbour-modrana/translations/harbour-modrana-nl.qm     
/usr/share/harbour-modrana/translations/harbour-modrana-zh_TW.qm
/usr/share/harbour-modrana/translations/harbour-modrana-nl_BE.qm

Now thinking about it, that might be a way how to test translations - just generate your own qm file and replace the corresponding existing one as root. Not ideal but definitely better than having to generate a new package to test new translations.