Czech translations for some plugins

Discussion corner for Developers of Serendipity.
VladaAjgl
Regular
Posts: 44
Joined: Mon Nov 19, 2007 10:00 pm
Contact:

Translation utility

Post by VladaAjgl »

BTW, I found quite difficult to maintain a lot of plugins translations up to date. To investigate which plugins have developed since my last translation and thus changed the language file. To investigate which parts of language files are alredy translated and which are pending the translation. And so on...

No to be too verbose, I have coded an application that is able to connect to s9y repository, download recent versions of language files and compare them by content, if all the language constants in english file are translated into local language. Also a simple editor of language files is present. This app is not perfect, in fact it makes only what I need, but it might be helpful also for other translators. So I would like to share it, to contribute it to s9y community.

Application: http://vlada.ajgl.cz/serendipity_transl ... slator.jar
Source code: http://vlada.ajgl.cz/serendipity_transl ... slator.zip

Vlad
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Czech translations for some plugins

Post by Don Chambers »

Vlad - my skills tend to focus more on the presentation of serendipity rather than the code aspects. But my first reaction to your post is "holy sh!t!! Impressive job"!!! :wink:

I'll let Garvin determine the merits of your effort, but I just wanted to say that I am truly impressed by your commitment and efforts!!! Awesome job!!! Thanks for all you have done, and will continue to do for the s9y community!!!
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Czech translations for some plugins

Post by garvinhicking »

Hi!

Wow, that sounds intriguing. I'm no Java-coder at all, sadly the app doesn't seem to download any files for me? Is there a way to get some kind of debug output why it's not working?

With your permission, I could add the .jar file to the additional_plugins directory for other people to easily check it out?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
VladaAjgl
Regular
Posts: 44
Joined: Mon Nov 19, 2007 10:00 pm
Contact:

Re: Czech translations for some plugins

Post by VladaAjgl »

Hi guys,

I am glad that you appreciate my work :)
Wow, that sounds intriguing. I'm no Java-coder at all, sadly the app doesn't seem to download any files for me? Is there a way to get some kind of debug output why it's not working?
First, I have sometimes troubles with repainting the table with the list of plugins. It means everything is ok, only the list of plugins does not appear. Then it is enoug to force the window to repaint (eg. by minimizing and maximizing the application).
I tried to fix it, so under the link in my previous post, there is an updated version of translator app.
I know one limitation - if you are behind http proxy that needs authentication, it is not possible to download anything at the moment.
To get some debug output, run the translator in command line:

Code: Select all

java -jar SerendipityTranslator.jar
If anything goes wrong, you will see a long error log.
With your permission, I could add the .jar file to the additional_plugins directory for other people to easily check it out?
Permission granted 8)

Vlad
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Czech translations for some plugins

Post by garvinhicking »

Hi!

Ah, great. Now it works. I love it, I committed it to the repository. It will surely provide helpful, as the GUI is much easier to use than any PHP script I had previoulsy.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
VladaAjgl
Regular
Posts: 44
Joined: Mon Nov 19, 2007 10:00 pm
Contact:

Re: Czech translations for some plugins

Post by VladaAjgl »

Hi Garvin,

I have tested my tool and created (or updated) new czech translations. Could you add them to the repository?

The main s9y language file: http://vlada.ajgl.cz/myplugins/czech_s9y_1.zip
Internal (core) plugins: http://vlada.ajgl.cz/myplugins/czech_core_3.zip
External (additional) plugins: http://vlada.ajgl.cz/myplugins/czech_extern_2.zip
Templates: http://vlada.ajgl.cz/myplugins/czech_templates_2.zip

Vlad
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Czech translations for some plugins

Post by garvinhicking »

Hi!

I'm a bit afraid that you changed the charsets from ISO-8859-2 to cp1250. Are those two fully compatible? Why is this change necessary?

I've committed all of your files except the core one, due to my question.

That must have been an awful lot of work for you. MUCH appreciated!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
VladaAjgl
Regular
Posts: 44
Joined: Mon Nov 19, 2007 10:00 pm
Contact:

Re: Czech translations for some plugins

Post by VladaAjgl »

Hi,
garvinhicking wrote:I'm a bit afraid that you changed the charsets from ISO-8859-2 to cp1250. Are those two fully compatible? Why is this change necessary?
Your doubts are reasonable. It's my mistake, I manufactured one language file and than saved it more times with different encodings. Correct version is here:
http://vlada.ajgl.cz/myplugins/czech_s9y_2.zip

And then I also found errors in language files in UTF8 encoding, caused by my encoding converter. Here are corrected files:
Internal (core) plugins: http://vlada.ajgl.cz/myplugins/czech_core_3_correct.zip
External (additional) plugins: http://vlada.ajgl.cz/myplugins/czech_ex ... orrect.zip
Templates: http://vlada.ajgl.cz/myplugins/czech_te ... orrect.zip

Vlad
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Czech translations for some plugins

Post by garvinhicking »

Hi!

Thanks, I've committed your updates!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
konus
Regular
Posts: 334
Joined: Mon Jun 16, 2008 1:57 pm
Location: Dresden, Germany
Contact:

Re: Czech translations for some plugins

Post by konus »

I really like the app. Just one small question: What is the reason I can't find bulletproof in the list of templates? Could it be because there are comments within the lang-file?

In the event window it was stating "There are 161 packages" but in the translator are only about 70. So I guess there are some more not displayed?

One suggestion: If it is easier for garvin to get the translations separated between Core plugins and Spartacus plugins, how about creating two subfolders "core" and "spartacus" within the folder "plugins_translated"?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Czech translations for some plugins

Post by garvinhicking »

Hi!
What is the reason I can't find bulletproof in the list of templates? Could it be because there are comments within the lang-file?
I guess because the app only might fetch the "additional_themes" CVS repository, and does not compare/download the internal s9y templates?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
VladaAjgl
Regular
Posts: 44
Joined: Mon Nov 19, 2007 10:00 pm
Contact:

Re: Czech translations for some plugins

Post by VladaAjgl »

Hi,
konus wrote:I really like the app. Just one small question: What is the reason I can't find bulletproof in the list of templates?
Because the app does not download internal s9y templates. This is fixed in new version (available at http://vlada.ajgl.cz/serendipity_transl ... slator.jar) and also internal templates are downloaded.

At this point I break my head a little - now, names of internal plugins and templates are hard-coded in the app. So if new a plugin/template is added in cvs (which is not frequent at all, but possible), the app won't see it. Do you know, if there is some simple list of internal plugins in cvs? It is always possible to parse the html code of cvs web interface of plugin directory, but it is not straightforward to get plugin names, lot of work... you know:-) One day I will do that if there isn't another solution, but for now I search for something more easy.
konus wrote:Could it be because there are comments within the lang-file?
No, parser, which is used to get lang-constants, skips comments. Or to be more precise - the parser separates comments and returns them back to the translated file, so the translated file has the same structure as english lang-file, comments included.
konus wrote: In the event window it was stating "There are 161 packages" but in the translator are only about 70. So I guess there are some more not displayed?
This message is confusing, because it shows the number of xml nodes in downloaded xml file with plugin information (the same xml file, which is downloaded by spartacus). Some plugins share the same lang-file, so this number is always greater than number of rows in translator. I replaced this message in new version of app by new one which shows real number of plugins in the table.
konus wrote: One suggestion: If it is easier for garvin to get the translations separated between Core plugins and Spartacus plugins, how about creating two subfolders "core" and "spartacus" within the folder "plugins_translated"?
Good suggestions, thanks:-) In new version of app, this feature is already inserted. Translated plugins are now separated in five directories - core, core_templates, spartacus, spartacus_templates and system (holds the core serendipity_lang_xx.ini.php files).

Vlad
VladaAjgl
Regular
Posts: 44
Joined: Mon Nov 19, 2007 10:00 pm
Contact:

Re: Czech translations for some plugins

Post by VladaAjgl »

And another portion of czech translations:

Core templates: http://vlada.ajgl.cz/myplugins/czech_co ... ates_1.zip
Plugins: http://vlada.ajgl.cz/myplugins/czech_extern_3.zip

Vlad
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Czech translations for some plugins

Post by garvinhicking »

Hi Vlada!
At this point I break my head a little - now, names of internal plugins and templates are hard-coded in the app. So if new a plugin/template is added in cvs (which is not frequent at all, but possible), the app won't see it. Do you know, if there is some simple list of internal plugins in cvs?
I'm not sure what you are talking of right now, so:

1. We have internal templates maintained at http://svn.berlios.de/viewcvs/serendipi ... /templates -- a list of this could be fetched through SVN commands, or parsed from raw HTML through that link

2. We have internal plugins maintained at http://svn.berlios.de/viewcvs/serendipity/trunk/plugins [same repository like for internal templates]

3. Then we have SPARTACUS templates hosted at http://php-blog.cvs.sourceforge.net/php ... al_themes/

4. And we have SPARTAUCS hosted plugins at http://php-blog.cvs.sourceforge.net/php ... l_plugins/

This separation of SVN (CORE Serendipity) and CVS (everything additional and Spartacus) happened because more developers had CVS accounts, and the infrastructure there works more reliably than mass-downloads from SVN.

XML-lists are only auto-generated for everything with SPARTACUS relevance, so I wouldn't know a way to include core/internal stuff there.

If you could implement anonymous CVS and SVN checkouts of the repository, that would most probably work easiest. I'm sure there must be Java libraries for easy CVS/SVN checkouts, maybe they are not too hard to integrate? The only downside of this would be, that a lot of data would need to be downloaded to the client.

I've also uploaded your new JAR file!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
konus
Regular
Posts: 334
Joined: Mon Jun 16, 2008 1:57 pm
Location: Dresden, Germany
Contact:

Re: Czech translations for some plugins

Post by konus »

Hi Vlad,
I used your great tool to update some german lang-files. After uploding them, I got feedback from garmin, that in serendipity_lang_de.inc.php the the tool also touched existing lines.
Therefore it is impossible to make a proper diff (I only changed a few lines).

I seems like you tool is inserting two tabs between the the name and the description but in the original file there was only one space. I guess, for totally new translations this is not a problem, but updating existing langfiles it is.

Would it be possible for you to modify your great programm not to change exisiting lines?

Greetings
konus
Post Reply