ScribusGenerator icon indicating copy to clipboard operation
ScribusGenerator copied to clipboard

translation

Open berteh opened this issue 7 years ago • 5 comments

http://lists.scribus.net/pipermail/scribus/2017-March/054228.html

  1. How can this be translated?

berteh avatar Mar 28 '17 22:03 berteh

maybe via https://docs.python.org/2/library/gettext.html

berteh avatar Mar 28 '17 22:03 berteh

Is the Qt Localization of any value? (https://wiki.qt.io/Qt_Localization).

Translating Qt Into Other Languages Qt aims at being fully internationalized by use of its own i18n framework.

They also mention XLIFF(I have no opinion), but hopefully the chosen solution will extend to extra platforms.

I also found something related here : https://pypi.python.org/pypi/humanize

AaronDP avatar Apr 19 '17 06:04 AaronDP

Thanks Aaron for these pointers.

I would like to use one single (existing) translation framework for both the GUI and the CommandLine "interfaces" of ScribusGenerator. Therefore Qt Localization would maybe not be my prefered option as to not impose the Qt dependency to run the CLI version. What do you think?

Humanize seems like fun, thanks for the pointer ;)

Would you like to have a shot at turning all the "hard-coded" text strings into internationalizable terms in ScribusGenerator, with one framework or the other ?

berteh avatar Apr 19 '17 21:04 berteh

Hi Berteh, You are right about not using Qt Localization.

RE: INTERNATIONALIZATION HELP

I will have to take a look at the challenge and the tools and give it some thought.

Thank you for your offer, and I will give it some investigating before I commit.

On Wed, Apr 19, 2017 at 3:24 PM, Berteh [email protected] wrote:

Thanks Aaron for these pointers.

I would like to use one single (existing) translation framework for both the GUI and the CommandLine "interfaces" of ScribusGenerator. Therefore Qt Localization would maybe not be my prefered option as to not impose the Qt dependency to run the CLI version. What do you think?

Humanize seems like fun, thanks for the pointer ;)

Would you like to have a shot at turning all the "hard-coded" text strings into internationalizable terms in ScribusGenerator, with one framework or the other ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/berteh/ScribusGenerator/issues/78#issuecomment-295449495, or mute the thread https://github.com/notifications/unsubscribe-auth/AHQKwJv2Y2gkt4749DmX386kqf9XA0Qjks5rxnt8gaJpZM4MsQc1 .

AaronDP avatar Apr 20 '17 07:04 AaronDP

Take your time to giving it all the thoughts you need.

The Python native translation library seems easy enough and mature to use, if you want to have a look: https://docs.python.org/2/library/gettext.html

the resulting code would look like (from official doc)

import gettext
gettext.bindtextdomain('myapplication', '/path/to/my/language/directory')
gettext.textdomain('myapplication')
_ = gettext.gettext
# ...
print _('This is a translatable string.')

and we can use either desktop editors to edit the "standard" localisation .po and .mo files, or an online service if more users want to contribute more translations, such as https://poeditor.com or https://www.transifex.com, both free for opensource projects.

berteh avatar Apr 20 '17 18:04 berteh