trufont
trufont copied to clipboard
Internationalisation
Do we have room for translation of UI later. This could be modules or extensions that is added as langauge packs.
I think translation files are small enough to just be bundled with the main installer/archive? I'm sure Qt provides all necessary facilities.
I would prefer all translations are bundled
I prefer that if it's small files. Having the sytem in place early on would be easier :)
It was a nightmare running FontForge workshops in Sweden... :)
Qt has a good i18n story, it should be a few hours worth of work to get everything in place.
@adrientetar is there a specific reason you built the UI by hand? I'm looking at helping out with i18n here to learn PyQt5 and wonder if it can be done solely by using Qt Designer and Linguist.
http://pyqt.sourceforge.net/Docs/PyQt5/i18n.html
is there a specific reason you built the UI by hand?
Well a choice is made somewhere, it's like choosing bw using a CMS and programming your own website I imagine.
I speculate that the specific reason is that this ensures scripting the application is the same as developing its core.
No need to justify yourself, I was just wondering if the choice was based on whim or deliberation. I was thinking about redoing the UI in Designer to separate UI construction from implementation, but maybe that's unnecessary busy work. Maybe later ;)
Currently looking into setting up translations.
There's no upside to doing that, and I think explicit programming is preferrable to a WYSIWYG output. Now if you want to separate UI you may want to work on a QtQuick UI. That would be interesting and QtQuick/QML is newer and faster. Using the OpenGL SceneGraph for thr glyphView in particular may be a thing.
/ot
The upside is decluttering the source code, iterating through UI changes faster and getting user-visible text marked for translation automatically. pyuic5 generates plain Python source. Will put QtQuick on my "Maybe" list :)
Have a look at https://github.com/madig/trufont :) There are several things in the font info dialog that I did not mark for translation because they seem to be technical terms. I also did not translate stuff in QComboBoxes because it might break stuff if you read .text and expect English words. Not sure what to do about them.
Oh, and translations will only work if you do the python3 -m defconQt
thing, as I haven't found a way yet to get at the translations when invoking trufont
. Compile translations into the resource file the icons are in?
Any user visible string should be translatable IMO, technical or not, it is up to each localiser to decide if it makes sense to localise the string for the target language or not.
@khaledhosny alright, commited.
@adrientetar how did you package the icons into a resource file? I want to put the translations inside. Also, can I safely mark the items at fontInfo.py:290, 553 and 917?
We have room for translation now :) I'd hold off for now though, the UI still seems volatile.
@madig Ok cool Thanks!!! Can you document How to add a new translation? Maybe to README? or a new doc?
https://github.com/trufont/trufont/blob/master/Lib/defconQt/translations.pro
:grin:
Hm. Maybe that file should go to the top level?