MRatWork Forum by Mustafa Ramadhan

Language Specific Discussions => Translations => Topic started by: ynuyasha on 2013-06-21, 21:37:58

Title: Italian translation
Post by: ynuyasha on 2013-06-21, 21:37:58
There is an italian translation for the panel or anyone starting to translate it?
Title: Re: Italian translation
Post by: MRatWork on 2013-06-21, 22:50:32
You can translate for Italian and then share here.

Steps:

1. Copy /usr/local/lxlabs/kloxo/httpdocs/lang/en-us to /usr/local/lxlabs/kloxo/httpdocs/lang/it-it
2. Translate files inside /usr/local/lxlabs/kloxo/httpdocs/lang/it-it
3. Change 'Language' inside 'Appearance' on panel.
Title: Re: Italian translation
Post by: ynuyasha on 2013-06-24, 22:27:16
I have made a first version of Italian Translation but i have same problems with plurals.
I take a screenshot and signed with red circles same words that have an "s" appended.
I thik the problem is the function in langfunctionlib.php.
Any suggests to fix him


Regards

Antonio
Title: Re: Italian translation
Post by: MRatWork on 2013-06-24, 23:05:00
This is the code of /usr/local/lxlabs/kloxo/httpdocs/lang/en-us/langfunctionlib.php:
Code: [Select]
<?php 
function get_plural($word)
{
if ($word[strlen($word) - 1] === 's') {
$ret "{$word}es";
} else if ($word[strlen($word) - 1] === 'y') {
if ($word[strlen($word) - 2] === 'e') {
$ret "{$word}s";
} else {
$ret substr($word0strlen($word) - 1) . "ies";
}
} else if ($word[strlen($word) - 1] === 'x') {
$ret substr($word0strlen($word) - 1) . "xes";
} else {
$ret "{$word}s";
}
return ucfirst($ret);
}

// This is an alternate get_plural, which has the all the plurals are defined in a file.
function get_plural_alternate($word)
{
include_once "lang/en-us/lang_plural.inc";

if (isset($__plural_desc[$word])) {
return $__plural_desc[$word];
}

return "{$word}s";
}

So, please explain Italian rule for plural word.
Title: Re: Italian translation
Post by: ynuyasha on 2013-06-25, 15:21:41
Italian rules are more complicated then English with many exceptions.
I made a function for this that include more cases (not all  :D )

Before to give you the translation i have another question.
Some words seems doesn't appair in the lang files to translate:
I made a screenshot for this words:
Title: Re: Italian translation
Post by: MRatWork on 2013-06-26, 16:32:28
Yes, certain word not write directly to code like 'unlimited'.
Title: Re: Italian translation
Post by: ynuyasha on 2013-06-26, 19:31:56
Ok thanks.
I finished first version of translation.
Where can i put the translation pack to share to all?
Title: Re: Italian translation
Post by: MRatWork on 2013-06-26, 21:13:38
I will compile to rpm and add to kloxo-mr.repo server.

You can add as attachment in your post.
Title: Re: Italian translation
Post by: ynuyasha on 2013-06-26, 21:40:26
Here tar file of translation
Title: Re: Italian translation
Post by: MRatWork on 2013-06-27, 15:31:40
Already added in latest upload (6.5.0.f-2013031825). After update, run 'yum install kloxomr-lang*'.