Help with s9y translation

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
llampderellamp
Regular
Posts: 6
Joined: Thu Aug 16, 2007 1:30 pm

Help with s9y translation

Post by llampderellamp »

Hi!

Several days ago I installed s9y on my computer (Debian lenny). All worked fine and I started my personal blog.

My blog is written in catalan, but as s9y don't have translation to this language I configured the blog in spanish.

Finally, I decided to do myself the translation to catalan of s9y. After few days, I have ended the translation of the lang file, saved it in UTF-8 format and added 'ca' prefix to the config file.

After I have make this changes I have tried to load my blog, but the page has left blank. I have remembered that my browser default language is catalan and I have set s9y for use the users default language. So I changed my browser to spanish and the blog has loaded ok.

I have tried to change the general options combo box language to catalan but s9y seems to ignore this comand.

I suppose that there is something wrong in the catalan translation file, but I'm unable to find the error. I have used a file diff utility and all the tags seems to be ok.

Please, can anyone help me with this problem? Is there any way to debug the file? I haven't found information about other s9y translations processes.

Thanks in advance!

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

Re: Help with s9y translation

Post by garvinhicking »

Hi!

You must also add new language files to the $serendipity['languages'] combo box, in the serendipity_config.inc.php file. Did you do that?

Also make sure that your catalan UTF-8 file does not have a UTF-8 BOM order sequence at the start of the file, it confuses PHP. You might also need to use a PHP syntax analyzer to see if you introduced any PHP parse errors like unclosed quotes, or mixed quoting.

You can also show this file to me, and I could add it to the official s9y distribution?

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/
llampderellamp
Regular
Posts: 6
Joined: Thu Aug 16, 2007 1:30 pm

Solved

Post by llampderellamp »

Hi Garvin!

Thanks for your help! I had the language combo box ok and the translated file saved in UTF-8 without BOM format. So I downloaded a PHP syntax checker.

The problem was that catalan makes an intensive use of the character ' that PHP understand as start/end of string. Once I solved this problem, the translation worked pretty well.

I will be glad to send to you the catalan translation. Please give me a few days in order to test and correct typos and other mistake.

One last question: I have my debian configured in English. Is there any way to show in the blog the information about days and months in another language?

Kind regards!

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

Re: Solved

Post by garvinhicking »

Hi!

Great you figured that out!
One last question: I have my debian configured in English. Is there any way to show in the blog the information about days and months in another language?
Yes, on linux systems you can install so called "Locales". Debian uses "locale-gen" for those. You must install a locale that's suitable for catalan, then you can also specify this locale in your language file (DATE_LOCALES).

HTH,
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/
llampderellamp
Regular
Posts: 6
Joined: Thu Aug 16, 2007 1:30 pm

about date format

Post by llampderellamp »

Hi again Garvin!

I have installed the catalan locale as you suggested. Thank you!

I'm still working with the translation file. I have a problem with the date format:

@define('DATE_FORMAT_ENTRY', '%A, %e de %B de %Y');

In catalan "january 1th" is "1 de gener"
but "april 1th" is "1 d'abril"

So, for vocal started month names I need the format:
@define('DATE_FORMAT_ENTRY', '%A, %e d\' %B de %Y');

And for consonant started month names I need:
@define('DATE_FORMAT_ENTRY', '%A, %e de %B de %Y');

I understand that this is a characteristic very related to catalan. Is there a simply way to solve it? If not, I will use only the short date format.

Thank you again for your help.

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

Re: about date format

Post by garvinhicking »

Hi!

Phew, that's complicated. I'm not that expereicned with locales to tell, if there is a specific variable that holds "d'" or "de". Basically it's like the english '1st', '2nd' etc. I think this must be somehow covered through locales!?

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/
llampderellamp
Regular
Posts: 6
Joined: Thu Aug 16, 2007 1:30 pm

translation ready

Post by llampderellamp »

Hi again Garvin!

I haven't found nothing in the locale to solve the date format problem.

But, ignoring this little inconvenient, the translation is finished. I have translated the main lang file and the anti-spam plugin lang file.

Please, let me know the way to send you the files.

Best Regards,

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

Re: translation ready

Post by garvinhicking »

Hi!

If you can mail them to garvin at s9y dot org, I can commit them. Many thanks for your work!

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/
muriel
Posts: 1
Joined: Wed Jul 10, 2013 2:27 pm

Re: Help with s9y translation

Post by muriel »

Hello,

I'd like to know what is the state of this translation. Has it become obsolete?

I haven't seen "Catalan" in the list of languages, and I'll need to use it for my blog. :)

Best regards,

Muriel
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Help with s9y translation

Post by Timbalu »

And we need Volunteers... ;-)
There are quite a few european or world languages not really supported by now.

BUT, there is a Translation Help Tool available. Please read about it here:
http://board.s9y.org/viewtopic.php?f=2& ... #p10432560
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Post Reply