Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Translations | Traductions Translation for Third-party applets
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Translations | Traductions

Subjects Author Language Messages Last message
[Locked] Translation for Third-party applets
Eduardo Mucelli English 10 fabounet [Read]
20 May 2011 à 11:39

Eduardo Mucelli, Wednesday 11 May 2011 à 12:17


Subscription date : 05 August 2009
Messages : 285
I really would like that the third-party applets could also be translated. Languages like Ruby, and Python give all the support for i18n. We would need to pack the applets with all the translations together, and maybe add some points on the CDApplet interface to make it transparent. Also would be necessary to give this support on Launchpad. It is my idea, what do you think about?

matttbe, Wednesday 11 May 2011 à 12:44


Subscription date : 24 January 2009
Messages : 12573
Yes, this is a good idea!
It's not complicated but each applet has to produce their own .pot/.po files! We can also support bash and a lot of other languages!

It can be interesting to create a script to easily generate all these .pot and update the .po files.

fabounet, Friday 13 May 2011 à 13:31


Subscription date : 30 November 2007
Messages : 17118
I'm also interested in translating the third-party applets!
I think we could produce global .po files like we do on the C applets, it's easier to translate on Launchpad than several .po files.
the only problem is the installation: applets are just copied in the user home, so no possible installation in the usual language folders (/usr/...)
so is it possible to use a given po file explicitely with gettext? I think it should be, but not sure.
and yes it should be transparent, so made in the interface class.

ppmt, Saturday 14 May 2011 à 00:44


Subscription date : 29 November 2007
Messages : 3520
Talking about translation....it has been a long time since I have gone on Launchpad to check the translation status!

fabounet, Monday 16 May 2011 à 13:17


Subscription date : 30 November 2007
Messages : 17118
ok so back from the WE, I was trying to make the applets translatable, then just before finishing I've remembered that .mo files are binary files (created with msgfmt) !
and therefore, they probably can't be placed with the third-party applets, which are pure scripts, since I don't think a .mo generated on a 64bits machine would work on a 32bits

so 3 possibilities:
- integrate the sentences with the C plug-ins .po files
- store the .po on our server and run msgfmt on the user's PC to make the .mo (but what if it's not present ?...)
- make a package for the third-party applets (with only translations), and add it to the meta-package "cairo-dock"

I think I prefer 3, which keeps third-party separated from the rest (and maybe one day we could make a package of the best third-party applets ?), but 1 has the main advantage of being easy to implement.
Matttbe, your opinion ?

matttbe, Monday 16 May 2011 à 13:52


Subscription date : 24 January 2009
Messages : 12573
, then just before finishing I've remembered that .mo files are binary files (created with msgfmt) !
It seems it's just a compression => http://www.gnu.org/software/hello/manual/gettext/MO-Files.html
So they can be placed with the third-party applets

I think the best solution is to generate these .mo files when we create tarball files. At the installation/update, the dock moves these .mo files to the '.local' directory (but where exactly?)

fabounet, Tuesday 17 May 2011 à 12:15


Subscription date : 30 November 2007
Messages : 17118
ok, let's do that
I'm still hesitating at making a global .mo (the .po are global anyway, for convenience with the launchpad tool) or split the .mo for each applets.
will probably go for 1

matttbe, Tuesday 17 May 2011 à 16:13


Subscription date : 24 January 2009
Messages : 12573
or split the .mo for each applets
If we create a package for each third-party applet, I think it's better to split the .mo for each applet

fabounet, Tuesday 17 May 2011 à 16:43


Subscription date : 30 November 2007
Messages : 17118
nope the .po is global (like for plug-ins, we found it's way easier to manage a single .po file)
but I thought that maybe the .mo can be split during the generation.
I'll check that.

taiebot65, Wednesday 18 May 2011 à 19:13


Subscription date : 26 October 2008
Messages : 1904
Would it be not more possible to do this on the website?
I am not really good with coding but would it be not possible to in the website, create a drop down list with the different languages supported by the applet? and if they are not available in their languages the file which need translation opens and can be modified, allowing people to easily contribute.

I think the all goal of those applets was the easyness of writting one. If now coders have to think about translating their applet, it will not be as open as before.

Keep it simple no?

fabounet, Friday 20 May 2011 à 11:39


Subscription date : 30 November 2007
Messages : 17118
it's plain simple, you just have to put your strings into _()
for instance:
raise_dialog("no connection")
=>
raise_dialog(_("no connection"))

nothing else

Eduardo Mucelli, Saturday 25 June 2011 à 15:56


Subscription date : 05 August 2009
Messages : 285
The .bzrignore file is listing */messages directory. Fabounet, I saw that the Python interface in the repo is already providing the "_" method. What is the "plan of action"? Finish all the interfaces before remove the ignore?

matttbe, Saturday 25 June 2011 à 21:37


Subscription date : 24 January 2009
Messages : 12573
I think these messages files contain strings from .conf files (and produced by a script available in 'cairo-dock-core/po/misc')

fabounet, Tuesday 28 June 2011 à 12:22


Subscription date : 30 November 2007
Messages : 17118
the "messages" files are just temporary files to collect all the translated sentences (from the .conf, the .py, etc)

so the plan is now :
- put _("...") in the code for all the sentences presented to the user (in dialogs and in menus)
- then run the script once again
- then wait for kind translators to do the translations

Translations | Traductions

Subjects Author Language Messages Last message
[Locked] Translation for Third-party applets
Eduardo Mucelli English 10 fabounet [Read]
20 May 2011 à 11:39


Glx-Dock / Cairo-Dock List of forums Translations | Traductions Translation for Third-party applets Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.