French translation

Questions about interface translations go here
matcauthron
Bear Rating Trainee
Bear Rating Trainee
Posts: 21
Joined: 10 Aug 2007, 13:32

French translation

Postby matcauthron » 10 Aug 2007, 14:09

Right now tt-rss has no French translation. I see that it uses a gettext mechanism, which I'm alreadly familiar with. So two questions:

- I volunteer for this translation. Is it OK?
- Which character encoding must I use for the .po file? UTF-8?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Postby fox » 10 Aug 2007, 14:25

- I volunteer for this translation. Is it OK?


Not just OK, this is great!

- Which character encoding must I use for the .po file? UTF-8?


Yep, UTF-8.

You can get the latest trunk .pot file here to get you started.

matcauthron
Bear Rating Trainee
Bear Rating Trainee
Posts: 21
Joined: 10 Aug 2007, 13:32

Postby matcauthron » 10 Aug 2007, 14:31

OK, I've got it. 319 strings, it'll be a quick work compared to other projects I did previously. :)

I found your email address in the README, I'll send it to you soon.

matcauthron
Bear Rating Trainee
Bear Rating Trainee
Posts: 21
Joined: 10 Aug 2007, 13:32

Postby matcauthron » 10 Aug 2007, 16:30

I've just finished the first draft. Only the translations about labels must be a bit approximative, since I didn't enable that feature.

Problem is, I can't test it. ;) TT-RSS stubbornly stays in English.

I switched ENABLE_TRANSLATIONS to true in config.php, created fr_FR/LC_MESSAGES folders in locale/ and copied my messages.mo file in it.

My browsers are of course configured to request a French translation if one is available.

I tried to give other names to the localization folder : fr, FR, fr-fr... No matter.

Oh, and I'm sure that my PHP has gettext support, since I use it for other web apps installed.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Postby fox » 10 Aug 2007, 17:20

Hmmm... should have worked at least with fr. Are you sure you didn't forget to compile your translated .po file into binary .mo? Try running update-translations.sh.

I could have broken the translation system, tho. I'll try to drink about it (yay, friday!) later today.

Another thing - tt-rss doesn't use PHP's native gettext, it has php-native implementation in gettext/.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Postby fox » 10 Aug 2007, 17:25

Another thing, just tested with

Code: Select all

user_pref("camino.accept_languages", "ru,ru-RU,en,en-US");


At least, russian translation worked.

matcauthron
Bear Rating Trainee
Bear Rating Trainee
Posts: 21
Joined: 10 Aug 2007, 13:32

Postby matcauthron » 10 Aug 2007, 17:56

Nope. I hadn't forgotten to generate the .mo file (I did it by hand with msgfmt, as usual). Nevertheless I tried your update-translations.sh script, it doesn't change anything.

I left two French folders in locale/ : fr_Fr (the correct one) and fr (as a fallback).

I ran your test with Camino, with fr then ru... I get the page in Russian, so French is skipped.

I'm pretty sure than my .mo file is correct, since 1) I've done this a lot before and 2) your script generates the same .mo as I did. The permissions on the web server are identical for Russian and French...

Right now I have no idea what's wrong. I'll try to figure something out... Do you have a couple of minutes to try from your side? If yes, I can send you the .po file.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Postby fox » 10 Aug 2007, 18:00

Sure thing, just mail it to me.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Postby fox » 10 Aug 2007, 18:02

Aha! I'm an idiot: look at functions.php:18.

matcauthron
Bear Rating Trainee
Bear Rating Trainee
Posts: 21
Joined: 10 Aug 2007, 13:32

Postby matcauthron » 10 Aug 2007, 18:03

Thank you. :) It's on its way.

matcauthron
Bear Rating Trainee
Bear Rating Trainee
Posts: 21
Joined: 10 Aug 2007, 13:32

Postby matcauthron » 10 Aug 2007, 18:04

fox wrote:Aha! I'm an idiot: look at functions.php:18.


:lol: That explains something. I'll modify it and try again.

Edit: now it works!! I'm proofreading my translations now.
Last edited by matcauthron on 10 Aug 2007, 18:05, edited 1 time in total.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Postby fox » 10 Aug 2007, 18:04

Just change the aforementioned line, e.g.:

Code: Select all

$lang = al2gt(array("en_US", "ru_RU", "fr_FR", "zh_CN"), "text/html");


It should fix it.

matcauthron
Bear Rating Trainee
Bear Rating Trainee
Posts: 21
Joined: 10 Aug 2007, 13:32

Postby matcauthron » 10 Aug 2007, 18:35

To complete the thread: yes, modifying functions.php indeed works. Translation is now on the way. :)

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Postby fox » 11 Aug 2007, 10:26

heads up: I've fixed a lot of missing translations you noticed, if would be great if you take a look at updated .po file :)

http://madoka.spb.ru/~fox/testbox/tt-rs ... essages.po

There is one small problem, tho, when translations are used for javascript popups:

Image

matcauthron
Bear Rating Trainee
Bear Rating Trainee
Posts: 21
Joined: 10 Aug 2007, 13:32

Postby matcauthron » 11 Aug 2007, 13:13

OK, that means no HTML entity in the popups. I'll correct that. :)

I'm not sure I'll have to time to change the translations before monday, but I'll do my best.


Return to “Translations”

Who is online

Users browsing this forum: No registered users and 1 guest