Changeset 1726 for plugins/translater
- Timestamp:
- 10/25/09 17:33:31 (14 years ago)
- Location:
- plugins/translater
- Files:
-
- 1 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/translater/_define.php
r1565 r1726 17 17 /* Description*/ "Translate your Dotclear plugins and themes", 18 18 /* Author */ "JC Denis", 19 /* Version */ '1. 2',19 /* Version */ '1.3', 20 20 /* Permissions */ 'admin,translater' 21 21 ); 22 /* date */ #200910 1022 /* date */ #20091026 23 23 ?> -
plugins/translater/_prepend.php
r1565 r1726 29 29 ); 30 30 } 31 # yahoo babelfish tools 32 $__autoload['babelfishProposal'] = dirname(__FILE__).'/inc/lib.translater.babelfish.php'; 33 $core->addBehavior('dcTranslaterAddProposal','addBabelfishProposalTool'); 34 function addBabelfishProposalTool($core,$proposal) 35 { 36 $proposal->addTool( 37 'babelfish','Babelfish translation',array('babelfishProposal','init') 38 ); 39 } 31 40 ?> -
plugins/translater/inc/class.dc.translater.php
r1622 r1726 965 965 { 966 966 # php files 967 if (preg_match_all("|__\((['\"]{1})(.*)([\"']{1})\)|",$content,$matches)) 967 //if (preg_match_all("|__\((['\"]{1})(.*)([\"']{1})\)|U",$content,$matches)) 968 if (preg_match_all("|__\((['\"]{1})(.*?)([\"']{1})\)|",$content,$matches)) 968 969 { 969 970 foreach($matches[2] as $id) … … 1010 1011 foreach($langs[$requested_lang] as $file) 1011 1012 { 1013 # .po files 1014 if (self::isPoFile($file)) 1015 { 1016 $po = self::getPoFile($locales.'/'.$file); 1017 if (!is_array($po)) continue; 1018 1019 foreach($po as $id => $str) 1020 { 1021 $is_po[$requested_lang][$id] = 1; 1022 1023 $res[] = array( 1024 'msgid' => self::encodeMsg($id), 1025 'msgstr' => self::encodeMsg($str), 1026 'lang' => $requested_lang, 1027 'type' => 'po', 1028 'path' => $locales.'/'.$file, 1029 'file' => basename($file), 1030 'group'=> str_replace('.po','',basename($file)) 1031 ); 1032 } 1033 } 1012 1034 # .lang.php files 1013 if (self::isLangphpFile($file))1035 elseif (self::isLangphpFile($file)) 1014 1036 { 1015 1037 $php = self::getLangphpFile($locales.'/'.$file); 1016 1038 foreach($php AS $id => $str) 1017 1039 { 1018 $is_php[$requested_lang][$id] = 1; 1040 # Don't overwrite .po 1041 if (isset($is_po[$requested_lang][$id])) continue; 1019 1042 $res[] = array( 1020 1043 'msgid' => self::encodeMsg($id), … … 1028 1051 } 1029 1052 } 1030 # .po files1031 elseif (self::isPoFile($file))1032 {1033 $po = self::getPoFile($locales.'/'.$file);1034 if (!is_array($po)) continue;1035 1036 foreach($po as $id => $str)1037 {1038 # Don't overwrite .lang.php1039 if (isset($is_php[$requested_lang][$id])) continue;1040 1041 $res[] = array(1042 'msgid' => self::encodeMsg($id),1043 'msgstr' => self::encodeMsg($str),1044 'lang' => $requested_lang,1045 'type' => 'po',1046 'path' => $locales.'/'.$file,1047 'file' => basename($file),1048 'group'=> str_replace('.po','',basename($file))1049 );1050 }1051 }1052 1053 } 1053 1054 return $res; … … 1225 1226 if (isset($fields[$info['msgid']])) 1226 1227 { 1227 $comments[$info['msgid']] = ( !isset($comments[$info['msgid']]) ?1228 $comments[$info['msgid']] = (isset($comments[$info['msgid']]) ? 1228 1229 $comments[$info['msgid']] : ''). 1229 1230 '#'.trim($info['file'],'/').':'.$info['line']."\n"; … … 1326 1327 } 1327 1328 $l .= 1328 '# Translated with dcTranslater -'.$this->core->plugins->moduleInfo('translater','version')."\n";1329 '# Translated with translater '.$this->core->plugins->moduleInfo('translater','version')."\n"; 1329 1330 } 1330 1331 $l .= 1331 "\nmsgid \"\"\n". 1332 'msgstr "Content-Type: text/plain; charset=UTF-8\n"'."\n\n"; 1332 "\n". 1333 "msgid \"\"\n". 1334 "msgstr \"\"\n". 1335 '"Content-Type: text/plain; charset=UTF-8\n"'."\n". 1336 '"Project-Id-Version: '.$module.' '.self::moduleInfo($module,'version').'\n"'."\n". 1337 '"POT-Creation-Date: \n"'."\n". 1338 '"PO-Revision-Date: '.date('U').'\n"'."\n". 1339 '"Last-Translator: '.$this->core->auth->getInfo('user_cn').'\n"'."\n". 1340 '"Language-Team: \n"'."\n". 1341 '"MIME-Version: 1.0\n"'."\n". 1342 '"Content-Transfer-Encoding: 8bit\n"'."\n\n"; 1333 1343 1334 1344 if ($this->parse_comment) … … 1339 1349 if (isset($fields[$info['msgid']])) 1340 1350 { 1341 $comments[$info['msgid']] = ( !isset($comments[$info['msgid']]) ?1351 $comments[$info['msgid']] = (isset($comments[$info['msgid']]) ? 1342 1352 $comments[$info['msgid']] : ''). 1343 1353 '#: '.trim($info['file'],'/').':'.$info['line']."\n"; -
plugins/translater/inc/lib.translater.google.php
r1565 r1726 60 60 { 61 61 return preg_match('/<div id=result_box dir="ltr">(.+?)<\/div>/',$rs,$m) ? 62 str ip_tags(str_replace(' ','',$m[0])) :62 str_replace('% ','%',$m[1]) : 63 63 ''; 64 64 } -
plugins/translater/inc/module.php
r1565 r1726 449 449 '</tr>'. 450 450 '</table>'. 451 '<p>'.sprintf(__('Total of %s strings.'),$i-1).'</p>'. 451 452 '<p class="col checkboxes-helpers"></p>'. 452 453 '<p class="col right">'.__('Change the group of the selected entries to:').' '. -
plugins/translater/index.php
r1565 r1726 63 63 'setting' => __('Settings'), 64 64 'summary' => __('Summary'), 65 'lang' => __(' Add/Remove/Edit'),65 'lang' => __('Translations'), 66 66 'backup' => __('Backups') 67 67 ); -
plugins/translater/locales/fr/admin.lang.php
r1565 r1726 12 12 13 13 // Language: français 14 // Module: translater - 1. 215 // Date: 2009-10- 10 02:48:1216 // Translated with dcTranslater - 1. 214 // Module: translater - 1.3 15 // Date: 2009-10-25 15:09:20 16 // Translated with dcTranslater - 1.3 17 17 18 18 #index.php:72 -
plugins/translater/locales/fr/admin.po
r1565 r1726 1 1 # Language: français 2 # Module: translater - 1. 23 # Date: 2009-10- 10 02:48:134 # Translated with dcTranslater - 1.22 # Module: translater - 1.3 3 # Date: 2009-10-25 15:09:21 4 # Translated with translater 1.3 5 5 6 6 msgid "" 7 msgstr "Content-Type: text/plain; charset=UTF-8\n" 7 msgstr "" 8 "Content-Type: text/plain; charset=UTF-8\n" 9 "Project-Id-Version: translater 1.3\n" 10 "POT-Creation-Date: \n" 11 "PO-Revision-Date: 1256483361\n" 12 "Last-Translator: JC Denis\n" 13 "Language-Team: \n" 14 "MIME-Version: 1.0\n" 15 "Content-Transfer-Encoding: 8bit\n" 8 16 9 17 #: index.php:72 -
plugins/translater/locales/fr/error.lang.php
r1565 r1726 12 12 13 13 // Language: français 14 // Module: translater - 1. 215 // Date: 2009-10- 10 02:48:1216 // Translated with dcTranslater - 1. 214 // Module: translater - 1.3 15 // Date: 2009-10-25 15:09:20 16 // Translated with dcTranslater - 1.3 17 17 18 18 #inc/class.dc.translater.php:300 … … 34 34 $GLOBALS['__l10n']['Limit of %s backups for module %s exceed'] = 'La limite de %s sauvegardes pour le module % est dépassée'; 35 35 36 #inc/class.dc.translater.php:492 37 #inc/class.dc.translater.php:855 36 38 #inc/class.dc.translater.php:921 37 39 $GLOBALS['__l10n']['Cannot find language folder %s for module %s'] = 'Impossible de trouver le dossier de langue %s pour le module %s'; … … 67 69 $GLOBALS['__l10n']['No string to write, language %s deleted for module %s'] = 'Aucune chaine à écrire, la langue %s a été effacée pour le module %s'; 68 70 69 #inc/class.dc.translater.php:11 3971 #inc/class.dc.translater.php:1140 70 72 $GLOBALS['__l10n']['Cannot grant write acces on lang file %s'] = 'Impossible d\'avoir les droits en écriture sur le fichier de langue %s'; 71 73 72 #inc/class.dc.translater.php:11 4574 #inc/class.dc.translater.php:1151 73 75 $GLOBALS['__l10n']['Cannot write lang file %s'] = 'Impossible d\'écrire le fichier de langue %s'; 74 76 75 #inc/class.dc.translater.php:14 0577 #inc/class.dc.translater.php:1425 76 78 $GLOBALS['__l10n']['Cannot find language for code %s'] = 'Impossible de trouver de langue pour le code %s'; 77 79 -
plugins/translater/locales/fr/error.po
r1565 r1726 1 1 # Language: français 2 # Module: translater - 1. 23 # Date: 2009-10- 10 02:48:124 # Translated with dcTranslater - 1.22 # Module: translater - 1.3 3 # Date: 2009-10-25 15:09:20 4 # Translated with translater 1.3 5 5 6 6 msgid "" 7 msgstr "Content-Type: text/plain; charset=UTF-8\n" 7 msgstr "" 8 "Content-Type: text/plain; charset=UTF-8\n" 9 "Project-Id-Version: translater 1.3\n" 10 "POT-Creation-Date: \n" 11 "PO-Revision-Date: 1256483360\n" 12 "Last-Translator: JC Denis\n" 13 "Language-Team: \n" 14 "MIME-Version: 1.0\n" 15 "Content-Transfer-Encoding: 8bit\n" 8 16 9 17 #: inc/class.dc.translater.php:300 … … 31 39 msgstr "La limite de %s sauvegardes pour le module % est dépassée" 32 40 41 #: inc/class.dc.translater.php:492 42 #: inc/class.dc.translater.php:855 33 43 #: inc/class.dc.translater.php:921 34 44 msgid "Cannot find language folder %s for module %s" … … 75 85 msgstr "Aucune chaine à écrire, la langue %s a été effacée pour le module %s" 76 86 77 #: inc/class.dc.translater.php:11 3987 #: inc/class.dc.translater.php:1140 78 88 msgid "Cannot grant write acces on lang file %s" 79 89 msgstr "Impossible d'avoir les droits en écriture sur le fichier de langue %s" 80 90 81 #: inc/class.dc.translater.php:11 4591 #: inc/class.dc.translater.php:1151 82 92 msgid "Cannot write lang file %s" 83 93 msgstr "Impossible d'écrire le fichier de langue %s" 84 94 85 #: inc/class.dc.translater.php:14 0595 #: inc/class.dc.translater.php:1425 86 96 msgid "Cannot find language for code %s" 87 97 msgstr "Impossible de trouver de langue pour le code %s" -
plugins/translater/locales/fr/main.lang.php
r1565 r1726 12 12 13 13 // Language: français 14 // Module: translater - 1. 215 // Date: 2009-10- 10 02:48:1216 // Translated with dcTranslater - 1. 214 // Module: translater - 1.3 15 // Date: 2009-10-25 15:09:20 16 // Translated with dcTranslater - 1.3 17 17 18 18 #_admin.php:16 … … 25 25 $GLOBALS['__l10n']['manage translations'] = 'Gèrer les traductions'; 26 26 27 #_admin.php:24 28 #inc/module.php:29 29 #inc/modules.php:18 30 #inc/simple.php:24 27 31 #index.php:269 28 32 $GLOBALS['__l10n']['Translater'] = 'Traducteur'; 29 33 34 #_admin.php:49 30 35 #index.php:59 31 36 $GLOBALS['__l10n']['Translate extensions'] = 'Traduire les extensions'; 32 37 38 #_admin.php:53 39 #inc/module.php:44 40 #inc/modules.php:111 33 41 #inc/modules.php:160 34 42 $GLOBALS['__l10n']['Name'] = 'Nom'; 35 43 44 #_admin.php:64 36 45 #inc/modules.php:124 37 46 $GLOBALS['__l10n']['Translate this plugin'] = 'Traduire cette extension'; 38 47 48 #_admin.php:81 39 49 #inc/modules.php:173 40 50 $GLOBALS['__l10n']['Translate this theme'] = 'Traduire ce thème'; … … 52 62 $GLOBALS['__l10n']['Module'] = 'Module'; 53 63 64 #inc/module.php:42 54 65 #index.php:58 55 66 $GLOBALS['__l10n']['About'] = 'À propos'; … … 58 69 $GLOBALS['__l10n']['Root'] = 'Racine'; 59 70 71 #inc/module.php:54 72 #inc/module.php:68 73 #inc/modules.php:80 60 74 #index.php:66 61 75 $GLOBALS['__l10n']['Backups'] = 'Sauvegardes'; … … 70 84 $GLOBALS['__l10n']['Edit language'] = 'Modifier la langue'; 71 85 86 #inc/module.php:109 87 #inc/module.php:128 72 88 #inc/module.php:156 73 89 $GLOBALS['__l10n']['Select language:'] = 'Selectionner une langue :'; … … 91 107 $GLOBALS['__l10n']['Delete language'] = 'Effacer une langue'; 92 108 109 #inc/module.php:158 93 110 #inc/simple.php:124 94 111 $GLOBALS['__l10n']['Delete translation'] = 'Effacer la traduction'; … … 106 123 $GLOBALS['__l10n']['List of backups'] = 'Liste des sauvegardes'; 107 124 125 #inc/module.php:219 108 126 #inc/module.php:396 109 127 $GLOBALS['__l10n']['File'] = 'Fichier'; … … 121 139 $GLOBALS['__l10n']['Delete backups'] = 'Effacer les sauvegardes'; 122 140 141 #inc/module.php:271 123 142 #inc/modules.php:211 124 143 $GLOBALS['__l10n']['Choose package to import'] = 'Choisir le paquetage à importer'; 125 144 145 #inc/module.php:291 126 146 #inc/modules.php:257 127 147 $GLOBALS['__l10n']['Choose languages to export'] = 'Choisir les langues à exporter'; … … 130 150 $GLOBALS['__l10n']['Group'] = 'Groupe'; 131 151 152 #inc/module.php:394 132 153 #inc/simple.php:190 133 154 $GLOBALS['__l10n']['String'] = 'Chaine'; 134 155 156 #inc/module.php:398 157 #inc/modules.php:42 135 158 #inc/simple.php:191 136 159 $GLOBALS['__l10n']['Translation'] = 'Traduction'; 137 160 161 #inc/module.php:399 138 162 #inc/simple.php:192 139 163 $GLOBALS['__l10n']['Existing'] = 'Existant'; … … 142 166 $GLOBALS['__l10n']['%s in %m => %f'] = '%s dans %m => %f'; 143 167 144 #inc/module.php:452 168 #inc/module.php:451 169 $GLOBALS['__l10n']['Total of %s strings.'] = 'Total de %s chaines.'; 170 171 #inc/module.php:453 145 172 $GLOBALS['__l10n']['Change the group of the selected entries to:'] = 'Changer le groupe des entrées sélectionnées vers :'; 146 173 … … 257 284 258 285 #index.php:65 259 $GLOBALS['__l10n'][' Add/Remove/Edit'] = 'Ajouter/Supprimer/Modifier';286 $GLOBALS['__l10n']['Translations'] = 'Traductions'; 260 287 261 288 #index.php:287 -
plugins/translater/locales/fr/main.po
r1565 r1726 1 1 # Language: français 2 # Module: translater - 1. 23 # Date: 2009-10- 10 02:48:124 # Translated with dcTranslater - 1.22 # Module: translater - 1.3 3 # Date: 2009-10-25 15:09:20 4 # Translated with translater 1.3 5 5 6 6 msgid "" 7 msgstr "Content-Type: text/plain; charset=UTF-8\n" 7 msgstr "" 8 "Content-Type: text/plain; charset=UTF-8\n" 9 "Project-Id-Version: translater 1.3\n" 10 "POT-Creation-Date: \n" 11 "PO-Revision-Date: 1256483360\n" 12 "Last-Translator: JC Denis\n" 13 "Language-Team: \n" 14 "MIME-Version: 1.0\n" 15 "Content-Transfer-Encoding: 8bit\n" 8 16 9 17 #: _admin.php:16 … … 19 27 msgstr "Gèrer les traductions" 20 28 29 #: _admin.php:24 30 #: inc/module.php:29 31 #: inc/modules.php:18 32 #: inc/simple.php:24 21 33 #: index.php:269 22 34 msgid "Translater" 23 35 msgstr "Traducteur" 24 36 37 #: _admin.php:49 25 38 #: index.php:59 26 39 msgid "Translate extensions" 27 40 msgstr "Traduire les extensions" 28 41 42 #: _admin.php:53 43 #: inc/module.php:44 44 #: inc/modules.php:111 29 45 #: inc/modules.php:160 30 46 msgid "Name" 31 47 msgstr "Nom" 32 48 49 #: _admin.php:64 33 50 #: inc/modules.php:124 34 51 msgid "Translate this plugin" 35 52 msgstr "Traduire cette extension" 36 53 54 #: _admin.php:81 37 55 #: inc/modules.php:173 38 56 msgid "Translate this theme" … … 55 73 msgstr "Module" 56 74 75 #: inc/module.php:42 57 76 #: index.php:58 58 77 msgid "About" … … 63 82 msgstr "Racine" 64 83 84 #: inc/module.php:54 85 #: inc/module.php:68 86 #: inc/modules.php:80 65 87 #: index.php:66 66 88 msgid "Backups" … … 79 101 msgstr "Modifier la langue" 80 102 103 #: inc/module.php:109 104 #: inc/module.php:128 81 105 #: inc/module.php:156 82 106 msgid "Select language:" … … 107 131 msgstr "Effacer une langue" 108 132 133 #: inc/module.php:158 109 134 #: inc/simple.php:124 110 135 msgid "Delete translation" … … 127 152 msgstr "Liste des sauvegardes" 128 153 154 #: inc/module.php:219 129 155 #: inc/module.php:396 130 156 msgid "File" … … 147 173 msgstr "Effacer les sauvegardes" 148 174 175 #: inc/module.php:271 149 176 #: inc/modules.php:211 150 177 msgid "Choose package to import" 151 178 msgstr "Choisir le paquetage à importer" 152 179 180 #: inc/module.php:291 153 181 #: inc/modules.php:257 154 182 msgid "Choose languages to export" … … 159 187 msgstr "Groupe" 160 188 189 #: inc/module.php:394 161 190 #: inc/simple.php:190 162 191 msgid "String" 163 192 msgstr "Chaine" 164 193 194 #: inc/module.php:398 195 #: inc/modules.php:42 165 196 #: inc/simple.php:191 166 197 msgid "Translation" 167 198 msgstr "Traduction" 168 199 200 #: inc/module.php:399 169 201 #: inc/simple.php:192 170 202 msgid "Existing" … … 175 207 msgstr "%s dans %m => %f" 176 208 177 #: inc/module.php:452 209 #: inc/module.php:451 210 msgid "Total of %s strings." 211 msgstr "Total de %s chaines." 212 213 #: inc/module.php:453 178 214 msgid "Change the group of the selected entries to:" 179 215 msgstr "Changer le groupe des entrées sélectionnées vers :" … … 328 364 329 365 #: index.php:65 330 msgid " Add/Remove/Edit"331 msgstr " Ajouter/Supprimer/Modifier"366 msgid "Translations" 367 msgstr "Traductions" 332 368 333 369 #: index.php:287 -
plugins/translater/release.txt
r1565 r1726 1 1 x.x xxxxxxxx 2 - Added help translation 2 - Add help translation 3 4 1.3 xxxxxxxx 5 * Added babelfish help 6 * Added behaviors on files writing 7 * Fixed regexp again 8 * Changed priority to .po files instead of .lang.php files 3 9 4 10 1.2 20091010
Note: See TracChangeset
for help on using the changeset viewer.