My patch needs commit. Changelog: Add translation Spanish to sending_patches in Wine site http://www.winehq.org/pipermail/wine-patches/2008-May/055157.html http://www.apogeus.es
Angel is asking for feedback here... can somebody look at his patch?
On Tue, May 27, 2008 at 2:05 PM, Ángel Guzmán Maeso shakaran@gmail.com wrote:
My patch needs commit. Changelog: Add translation Spanish to sending_patches in Wine site http://www.winehq.org/pipermail/wine-patches/2008-May/055157.html
Angel is asking for feedback here... can somebody look at his patch?
Looks good to me. Nice translation, too.
Angel, you might put "website" in the subject of your emails so Newman knows to look at them. --Juan
Nice translation, too.
Oops, I found a couple minor errors:
+asegúrate de que has creado las opciones adecuadas en su fichero de configuración de Git, y a continuación, ejecute:</p> should be: +asegúrese de que ha creado las opciones adecuadas en su fichero de configuración de Git, y a continuación, ejecute:</p>
and +si tienes configuradas las cabeceras del correo del archivo de configuración Git correctamente. should be +Si tiene configuradas las cabeceras del correo del archivo de configuración Git correctamente. (Pero esta frase me confunde, es posible mejorarla?)
--Juan
Nice translation, too.
Oops, I found a couple minor errors:
+asegúrate de que has creado las opciones adecuadas en su fichero de configuración de Git, y a continuación, ejecute:</p> should be: +asegúrese de que ha creado las opciones adecuadas en su fichero de configuración de Git, y a continuación, ejecute:</p>
Oks, sounds good to me
+si tienes configuradas las cabeceras del correo del archivo de
configuración Git correctamente. should be +Si tiene configuradas las cabeceras del correo del archivo de configuración Git correctamente. (Pero esta frase me confunde, es posible mejorarla?)
Maybe can be replaced by: +Si tiene configurado el archivo de cabeceras de correo Git correctamente.
I would put "website" but what is the Newman's email? Juan,Do you speak Spanish?
1. Please preface your patch with [website] so I can pick it out of the large amount of email in wine-patches.
2. The website does not support translations yet. I don't think it is much work to support it. Mainly the HTML class template() function needs to check the browser for the language, then change the template dir, if the template for the language is not found, then the EN version is loaded as a fallback.
3. Some parts, like the news and WWN are not in a system that can be easily translated. Not sure what to do about that. IOW, they are not using the html template() class, they are based on a hacky XML format.
Ángel Guzmán Maeso wrote:
My patch needs commit. Changelog: Add translation Spanish to sending_patches in Wine site http://www.winehq.org/pipermail/wine-patches/2008-May/055157.html http://www.apogeus.es
- The website does not support translations yet. I don't think it is much
work to support it. Mainly the HTML class template() function needs to check the browser for the language, then change the template dir, if the template for the language is not found, then the EN version is loaded as a fallback.
I have PHP programming for 4 years and my level still is not perfect, although the management sufficiently.
I think it's hard work, but it is not difficult. Some of my pages bear languages and this is a small sketch of the script that I use to recognize the languages and apply them in my pages
<? $lg=''; if(isset($_GET['lg'])) # First check de language variable { switch($_GET['lg']) { case en: $lg='en';break; case es: $lg='es';break; case fr: $lg='fr';break; case de: $lg='de';break; # More languages support here default: $lg='en';break; #Default language if language not support } setcookie('lg',$lg,time()+7*24*60*60,'',''); #Set cookie language for one week } elseif(isset($_COOKIE['lg'])) #Second the cookie language { switch($_COOKIE['lg']) { case EN: $lg='en';break; case ES: $lg='es';break; case FR: $lg='fr';break; case GR: $lg='gr';break; # More languages support here default: $lg='en';break; #Default language if language not support } } elseif(!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) # Third the browser language { #es-es,es;q=0.8,en-us;q=0.5,en;q=0.3 Example of my string browser language $lgs=explode(';',$_SERVER['HTTP_ACCEPT_LANGUAGE']); $lgs=explode('-',$lgs[0]); switch($lgs[0]) { case 'es': $lg='es';break; case 'en': $lg='en';break; case 'fr': $lg='fr';break; case 'de': $lg='gr';break; # More languages support here default: $lg='en';break; #Default language if language not support } } else $lg='en'; # Finally default language
/* Running this script at the beggining, we got the user language, then for each template, we load a folder with the template file, if not exits we load the default template file*/
# Examples require_once('templates/'.$lg.'/yourcoolfile.php');
# Load a wwn with support language if(!exist('wwn/'.$lg.'/wn20080428_346.xml')) $file='wwn/en/wn20080428_346.xml';
/* All codes for support language Code Pays / langue af Africain sq Albanais ar-dz Algérien de Allemand de-at Allemand (Austrian) de-li Allemand (Liechtenstein) de-lu Allemand (Luxembourg) de-ch Allemand (Suisse) en-us Américain en Anglais en-za Anglais (Afrique du sud) en-bz Anglais (Bélize) en-gb Anglais (Grande Bretagne) ar Arabe ar-sa Arabe (Arabie Saoudite) ar-bh Arabe (Bahreïn) ar-ae Arabe (Emirat arabe uni) en-au Australien eu Basque nl-be Belge be Biélorussie bg Bulgarre en-ca Canadien ca Catalan zh Chinois zh-hk Chinois (Hong-Kong) zh-cn Chinois (PRC) zh-sg Chinois (Singapourg) zh-tw Chinois (Taïwan) ko Coréein cs Crète hr Croate da Danois ar-eg Egyptien es Espagnol es-ar Espagnol (Argentine) es-bo Espagnol (Bolivie) es-cl Espagnol (Chilie) es-co Espagnol (Colombie) es-cr Espagnol (Costa Rica) es-sv Espagnol (El Salvador) es-ec Espagnol (Equateur) es-gt Espagnol (Guatemala) es-hn Espagnol (Honduras) es-mx Espagnol (Mexique) es-ni Espagnol (Nicaragua) es-pa Espagnol (Panama) es-py Espagnol (Paraguay) es-pe Espagnol (Pérou) es-pr Espagnol (Puerto Rico) en-tt Espagnol (Trinidad) es-uy Espagnol (Uruguay) es-ve Espagnol (Venezuela) et Estonien sx Estonien fo Faeroese fi Finlandais fr Français fr-fr Français fr-be Français (Belgique) fr-ca Français (Canada) fr-lu Français (Luxembourg) fr-ch Français (Suisse) gd Galicien el Gréc he Hébreux nl Hollandais hu Hongrois in Indonésien hi Indou fa Iranien ar-iq Iraquien en-ie Irlandais is Islandais it Italien it-ch Italien (Suisse) en-jm Jamaicain ja Japonais ar-jo Jordanien ar-kw Koweitien lv Lettische ar-lb Libanais lt Littuanien ar-ly Lybien mk Macédoine ms Malésien mt Maltais ar-ma Marocain en-nz Néo-zélandais no Norvégien (bokmal) no Norvégien (Nynorsk) ar-om Oman pl Polonais pt Portugais pt-br Portugais (Brésil) ar-qa Quatar rm Rhaeto-Romanic ro Roumain (Moldavie) ro-mo Roumain (Moldavie) ru Russe ru-mo Russe (Moldavie) sr Serbe (Cyrillic) sr Serbe (Latin) sk Slovaque sl Slovéne sb Sorbian sv Suèdois sv-fi Suèdois (Finlande) ar-sy Syrien th Thaïlandais ts Tsonga (Afrique du sud) tn Tswana (Afrique du sud) ar-tn Tunisien tr Turc uk Ukrainien ur Urdu vi Vietnamien xh Xhosa (Afrique) ar-ye Yémen ji Yiddish zu Zulu (Afrique) */ ?>
- Some parts, like the news and WWN are not in a system that can be easily
translated. Not sure what to do about that. IOW, they are not using the html template() class, they are based on a hacky XML format.
XML not is a problem. The contents of WWN can be easily translated. Only you must create a directory for each language and put all the files in English so that they can be loaded. After that there is only translate the contents of XML (not the label, if not the content) and the WWN will be translated.
I think the translation of the website is very important because with the growth of Wine and many new users will greatly appreciate that the contents may be in their language.
I could try to build support for website, but I have not even looked at the entire code of the website and I take a few weeks (or maybe just days) understand. It would be very helpful if the website was translated for Wine 1.0. http://www.apogeus.es
Yeah, I'm working on a patch now to enable translations of all the content. Someone will have fun jobs of sending in translations of all the WWN content, but if they are up to the challenge.
Hold off on your updates until I'm done.
FYI, your templates will need to be in UTF-8 encoded text files. Make sure your text editor is set to output that. Your original patch was not UTF-8.
Ángel Guzmán Maeso wrote:
2. The website does not support translations yet. I don't think it is much work to support it. Mainly the HTML class template() function needs to check the browser for the language, then change the template dir, if the template for the language is not found, then the EN version is loaded as a fallback.
I have PHP programming for 4 years and my level still is not perfect, although the management sufficiently.
I think it's hard work, but it is not difficult. Some of my pages bear languages and this is a small sketch of the script that I use to recognize the languages and apply them in my pages
OK. Patches are complete. The majority of the website can be translated now.
What still needs to be done is to allow translation of the sidebar nav. My plan is to move that out of the config.php file and into a separate file, possibly in XML.
People who want to send translations of the news and wwn will probably need to subscribe to wine-cvs and watch for commits from me for the files in the "en" dirs to keep the turn around time on translations shorter.
At the very least, the website will always fall back to the english version of the template.
Jeremy Newman wrote:
Yeah, I'm working on a patch now to enable translations of all the content. Someone will have fun jobs of sending in translations of all the WWN content, but if they are up to the challenge.
Hold off on your updates until I'm done.
FYI, your templates will need to be in UTF-8 encoded text files. Make sure your text editor is set to output that. Your original patch was not UTF-8.
Ángel Guzmán Maeso wrote:
2. The website does not support translations yet. I don't think it is much work to support it. Mainly the HTML class template() function needs to check the browser for the language, then change the template dir, if the template for the language is not found, then the EN version is loaded as a fallback.
I have PHP programming for 4 years and my level still is not perfect, although the management sufficiently.
I think it's hard work, but it is not difficult. Some of my pages bear languages and this is a small sketch of the script that I use to recognize the languages and apply them in my pages
OK. Patches are complete. The majority of the website can be translated now.
O_O XLNT!!!!!!
What still needs to be done is to allow translation of the sidebar nav. My plan is to move that out of the config.php file and into a separate file, possibly in XML.
Well, sound good for me.
People who want to send translations of the news and wwn will probably need
to subscribe to wine-cvs and watch for commits from me for the files in the "en" dirs to keep the turn around time on translations shorter.
Yeah, I am already subscribed to ALL lists of wine, so it's no problem (wine-cvs, wine-devel, wine-bugs...wine-santa, wine-bogeyman...).
At the very least, the website will always fall back to the english version
of the template.
Ok
Yeah, I'm working on a patch now to enable translations of all the content. Someone will have fun jobs of sending in translations of all the WWN content, but if they are up to the challenge.
Hold off on your updates until I'm done.
Well, Still not begin to translate part of WWN, but translates other templates.
FYI, your templates will need to be in UTF-8 encoded text files. Make sure
your text editor is set to output that. Your original patch was not UTF-8.
Sorry, I used Geany, Gedit and other and they are in conflict of encode.
For Your Information: Not translate NEVER with google translator or other "translators" because they are machines and they translate as if they were wild Indians or master yoda. If you use your translators, at least you know enough language to translate that, because if not the translation will be very very bad, for example, in /template/es/404.template
I send a patch with translations for many templates and 404.template (in UTF-8 believe) and a small improve in a function of file site. This improvement use array_ramdom instead of rand+count but the bound is not clear for me, so you should review
Ángel Guzmán Maeso wrote:
For Your Information: Not translate NEVER with google translator or other "translators" because they are machines and they translate as if they were wild Indians or master yoda. If you use your translators, at least you know enough language to translate that, because if not the translation will be very very bad, for example, in /template/es/404.template
I figured as much. I just needed a template to use as a test. I knew you'd end up fixing the poor translation. I had no intention to use it on more templates.
On Fri, May 30, 2008 at 5:43 AM, Jeremy Newman jnewman@codeweavers.com wrote:
Ángel Guzmán Maeso wrote:
For Your Information: Not translate NEVER with google translator or other "translators" because they are machines and they translate as if they were wild Indians or master yoda. If you use your translators, at least you know enough language to translate that, because if not the translation will be very very bad, for example, in /template/es/404.template
I figured as much. I just needed a template to use as a test. I knew you'd end up fixing the poor translation. I had no intention to use it on more templates.
i18n people sometimes do a search and replace to turn all o's into o plus o umlaut, all n's into n plus n tilde, etc. The result is longer than the original and uses funny characters, and is still understandable by the person doing the internationalization, but can't be mistaken for final text. - Dan
Jeremy Newman wrote: I figured as much. I just needed a template to use as a test. I knew you'd end up fixing the poor translation. I had no intention to use it on more templates.
Okay, then nothing happens. All right.
The templates files are well. Sorry for my fail in quote function. I thought a little more and I saw three alternatives but to make the code more quickly and efficiently:
# Alternative one (my prefer, but not is valid, because cut \n and the next character) $quotes = split("\n.",$GLOBALS[html]->template('base','quotes')); # We use the powerful slice of regex return $quotes[array_rand($quotes)]; # and then we use array_rand() more effectively
# Alternative two (better) $quotes = explode("\n",$GLOBALS[html]->template('base','quotes')); # If we don't use regex then explode() is more effective return $quotes[mt_rand(0,(sizeof($quotes)-2))]; # and also use mt_rand() and sizeof which is faster
# Alternative three (less better) $quotes = explode("\n",$GLOBALS[html]->template('base','quotes')); # If we don't use regex then explode() is more effective $num = sizeof($quotes)-2; # We use a temp variable + sizeof() + array_random() return $quotes[array_rand($num)];
You decide Jeremy.
And other small improve, show path of config file not found
diff --git a/include/config.php b/include/config.php index a5f1fe2..6016cc4 100644 --- a/include/config.php +++ b/include/config.php @@ -22,7 +22,7 @@ class config // exit if config not found if (!file_exists($path)) { - echo 'config file not found!'; + echo 'config file '.$path.' not found!'; exit(); }
i18n people sometimes do a search and replace to turn all o's into o
plus o umlaut, all n's into n plus n tilde, etc. The result is longer than the original and uses funny characters, and is still understandable by the person doing the internationalization, but can't be mistaken for final text.
- Dan
I try to do the translations as well as possible and without which vary the original meaning. Soon, more translations. http://www.apogeus.es
Yeah! I find the perfect solution (at the moment)
$quotes = explode("\n",trim($GLOBALS[html]->template('base','quotes'))); # explode + trim return $quotes[array_rand($quotes)]; # array_rand() only
Ángel Guzmán Maeso wrote:
I send a patch with translations for many templates and 404.template (in UTF-8 believe) and a small improve in a function of file site. This improvement use array_ramdom instead of rand+count but the bound is not clear for me, so you should review
I have committed the template files. I left the site quote function alone as your patch caused null matches to be returned, either with or without the n-2.