Dotclear

Changeset 3127


Ignore:
Timestamp:
05/13/13 01:48:36 (10 years ago)
Author:
JcDenis
Message:
  • Rewrited proposal tools
  • Added Microsoft translation tool
  • Updated Google translation tool
  • Removed permissions, now required superadmin
  • Fixed page title and messages and contents
  • Moved all sub-pages into one page
Location:
plugins/translater
Files:
3 added
8 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • plugins/translater/_admin.php

    r2299 r3127  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of translater, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
    1315if (!defined('DC_CONTEXT_ADMIN')){return;} 
    1416 
    15 # Additionals locales 
    16 __('translater'); 
    17 __('Translate your Dotclear plugins and themes'); 
     17$core->blog->settings->addNamespace('translater'); 
     18$core->addBehavior('pluginsToolsTabs',array('translaterAdminBehaviors','pluginsToolsTabs')); 
     19$core->addBehavior('adminCurrentThemeDetails',array('translaterAdminBehaviors','adminCurrentThemeDetails')); 
     20$core->addBehavior('addTranslaterProposalTool',array('translaterAdminBehaviors','addGoogleProposalTool')); 
     21$core->addBehavior('addTranslaterProposalTool',array('translaterAdminBehaviors','addYahooProposalTool')); 
     22$core->addBehavior('addTranslaterProposalTool',array('translaterAdminBehaviors','addMicrosoftProposalTool')); 
     23$core->rest->addFunction('getProposal',array('translaterRest','getProposal')); 
    1824 
    19 # Add auth perm 
    20 $core->auth->setPermissionType('translater',__('manage translations')); 
    21  
    22 # Admin menu 
    2325$_menu['Plugins']->addItem( 
    2426     __('Translater'), 
    25      'plugin.php?p=translater','index.php?pf=translater/icon.png', 
     27     'plugin.php?p=translater', 
     28     'index.php?pf=translater/icon.png', 
    2629     preg_match('/plugin.php\?p=translater(&.*)?$/',$_SERVER['REQUEST_URI']), 
    27      $core->auth->check('admin,translater',$core->blog->id) 
    28 ); 
    29 $core->blog->settings->addNamespace('translater'); 
    30 # Plugins tab 
    31 if ($core->blog->settings->translater->translater_plugin_menu) 
    32      $core->addBehavior('pluginsToolsTabs',array('translaterBehaviors','pluginsToolsTabs') 
     30     $core->auth->isSuperAdmin() 
    3331); 
    3432 
    35 #  Themes menu  
    36 if ($core->blog->settings->translater->translater_theme_menu) 
    37      $core->addBehavior('adminCurrentThemeDetails',array('translaterBehaviors','adminCurrentThemeDetails') 
    38 ); 
    39  
    40 # Admin rest for getting translation 
    41 $core->rest->addFunction('getProposal',array('translaterRest','getProposal')); 
    42  
    43 # Behaviors 
    44 class translaterBehaviors 
     33class translaterAdminBehaviors 
    4534{ 
     35     # Plugins tab 
    4636     public static function pluginsToolsTabs($core) 
    4737     { 
     38          if (!$core->blog->settings->translater->translater_plugin_menu || !$core->auth->isSuperAdmin()) { 
     39               return; 
     40          } 
     41           
    4842          echo  
    4943          '<div class="multi-part" id="translater" title="'. 
     
    7670     } 
    7771      
     72     # Themes menu 
    7873     public static function adminCurrentThemeDetails($core,$id,$infos) 
    7974     { 
     75          if (!$core->blog->settings->translater->translater_theme_menu || !$core->auth->isSuperAdmin()) { 
     76               return; 
     77          } 
     78           
    8079          $root = path::real($infos['root']); 
    8180           
    82           if ($id != 'default' && is_dir($root.'/locales') && $core->auth->check('translater,admin',$core->blog->id)) 
     81          if ($id != 'default' && is_dir($root.'/locales')) 
    8382          { 
    8483               return  
     
    8786          } 
    8887     } 
     88      
     89     # Google Translater tools 
     90     public static function addGoogleProposalTool($proposal) 
     91     { 
     92          $proposal->addTool('googleProposalTool'); 
     93     } 
     94      
     95     # Yahoo Babelfish tools 
     96     public static function addYahooProposalTool($proposal) 
     97     { 
     98          $proposal->addTool('yahooProposalTool'); 
     99     } 
     100      
     101     # Microsoft Bing tools 
     102     public static function addMicrosoftProposalTool($proposal) 
     103     { 
     104          $proposal->addTool('microsoftProposalTool'); 
     105     } 
    89106} 
    90107?> 
  • plugins/translater/_define.php

    r2614 r3127  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of translater, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
     
    1719     /* Description*/         "Translate your Dotclear plugins and themes", 
    1820     /* Author */        "JC Denis", 
    19      /* Version */       '1.5', 
    20      /* Permissions */        'admin,translater' 
     21     /* Version */       '2013.05.11', 
     22     /* Permissions */        null 
    2123); 
    22      /* date */          #20100901 
    2324?> 
  • plugins/translater/_install.php

    r2614 r3127  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of translater, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
    1315if (!defined('DC_CONTEXT_ADMIN')){return;} 
    1416 
     17$rdc_version = '2.5-alpha'; 
    1518$new_version = $core->plugins->moduleInfo('translater','version'); 
    1619$old_version = $core->getVersion('translater'); 
     
    2023try 
    2124{ 
    22      if (version_compare(DC_VERSION,'2.2-beta','<')) 
    23      { 
    24           throw new Exception('translater requires Dotclear 2.2'); 
     25     if (version_compare(str_replace("-r","-p",DC_VERSION),$rdc_version,'<')) { 
     26          throw new Exception(sprintf('%s requires Dotclear %s','translater',$rdc_version)); 
    2527     } 
    2628      
     
    3234     $core->blog->settings->translater->put('translater_backup_limit',20,'string','Maximum backups per module',false,true); 
    3335     $core->blog->settings->translater->put('translater_backup_folder','module','string','In which folder to store backups',false,true); 
    34      $core->blog->settings->translater->put('translater_start_tab','setting,','string','Tab to start on',false,true); 
     36     $core->blog->settings->translater->put('translater_start_page','setting,','string','Page to start on',false,true); 
    3537     $core->blog->settings->translater->put('translater_write_po',1,'boolean','Write .po languages files',false,true); 
    3638     $core->blog->settings->translater->put('translater_write_langphp',1,'boolean','Write .lang.php languages files',false,true); 
  • plugins/translater/_prepend.php

    r2399 r3127  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of translater, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
    1315if (!defined('DC_RC_PATH')){return;} 
    14 if (version_compare(DC_VERSION,'2.2-alpha','<')){return;} 
    1516 
    16 global $__autoload,$core; 
     17global $__autoload; 
    1718 
    18 # Main class 
    19 $__autoload['dcTranslater'] = dirname(__FILE__).'/inc/class.dc.translater.php'; 
    20 # Admin rest function 
    21 $__autoload['translaterRest'] = dirname(__FILE__).'/inc/class.translater.rest.php'; 
     19$__autoload['dcTranslater']             = dirname(__FILE__).'/inc/class.dc.translater.php'; 
     20$__autoload['translaterRest']           = dirname(__FILE__).'/inc/class.translater.rest.php'; 
     21$__autoload['translaterProposals']      = dirname(__FILE__).'/inc/class.translater.proposals.php'; 
    2222 
    23 # google tools 
    24 $__autoload['googleProposal'] = dirname(__FILE__).'/inc/lib.translater.google.php'; 
    25 $core->addBehavior('dcTranslaterAddProposal','addGoogleProposalTool'); 
    26 function addGoogleProposalTool($core,$proposal) 
    27 { 
    28      $proposal->addTool('google','Google translation',array('googleProposal','init')); 
    29 } 
    30 # yahoo babelfish tools 
    31 $__autoload['babelfishProposal'] = dirname(__FILE__).'/inc/lib.translater.babelfish.php'; 
    32 $core->addBehavior('dcTranslaterAddProposal','addBabelfishProposalTool'); 
    33 function addBabelfishProposalTool($core,$proposal) 
    34 { 
    35      $proposal->addTool('babelfish','Babelfish translation',array('babelfishProposal','init')); 
    36 } 
     23$__autoload['translaterProposalTool']   = dirname(__FILE__).'/inc/lib.translater.proposal.php'; 
     24$__autoload['googleProposalTool']       = dirname(__FILE__).'/inc/lib.translater.google.php'; 
     25$__autoload['microsoftProposalTool']         = dirname(__FILE__).'/inc/lib.translater.microsoft.php'; 
    3726?> 
  • plugins/translater/_uninstall.php

    r2299 r3127  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of translater, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
  • plugins/translater/inc/class.dc.translater.php

    r2614 r3127  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of translater, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
    1315if (!defined('DC_CONTEXT_ADMIN')){return;} 
    1416 
     17/** 
     18 * Translater tools. 
     19 */ 
    1520class dcTranslater 
    1621{ 
     
    7782               'label' => 'In which folder to store backups' 
    7883          ), 
    79           'start_tab' => array( 
    80                'id' => 'translater_start_tab', 
     84          'start_page' => array( 
     85               'id' => 'translater_start_page', 
    8186               'value' => 'setting', 
    8287               'type' => 'string', 
    83                'label' => 'Tab to start on' 
     88               'label' => 'Page to start on' 
    8489          ), 
    8590          'write_po' => array( 
     
    164169               'blogroll', 
    165170               'blowupConfig', 
     171               'daInstaller', 
    166172               'externalMedia', 
    167173               'fairTrackbacks', 
     
    170176               'pages', 
    171177               'pings', 
     178               'simpleMenu', 
    172179               'tags', 
    173180               'themeEditor', 
     181               'userPref', 
    174182               'widgets' 
    175183          ), 
     
    177185               'default', 
    178186               'blueSilence', 
    179                'customCSS' 
     187               'customCSS', 
     188               'ductile' 
    180189          ) 
    181190     ); 
     
    190199     { 
    191200          $this->core =& $core; 
     201          $core->blog->settings->addNamespace('translater'); 
    192202          $this->loadModules(); 
    193           $this->proposal = new dcTranslaterProposal($core); 
    194            
    195           # --BEHAVIOR-- dcTranslaterAddProposal 
    196           $core->callBehavior('dcTranslaterAddProposal',$core,$this->proposal); 
     203          $this->proposal = new translaterProposals($core); 
    197204     } 
    198205      
     
    204211      
    205212     # Get settings for current blog 
    206      public function getSettings($id='') 
     213     public function getSettings($id=null) 
    207214     {          
    208215          $res = array(); 
     
    212219               { 
    213220                    return $this->core->blog->settings->translater->get( 
    214                          $this->default_settings[$id]['id'] 
     221                         $this->default_settings[$k]['id'] 
    215222                    ); 
    216223               } 
    217                $res[$id] = $this->core->blog->settings->translater->get( 
    218                     $this->default_settings[$id]['id'] 
     224               $res[$k] = $this->core->blog->settings->translater->get( 
     225                    $this->default_settings[$k]['id'] 
    219226               ); 
    220227          } 
     
    245252          if (!isset($this->default_settings[$k])) return false; 
    246253 
    247           $this->core->blog->settings->addNamespace('translater'); 
     254          $this->dropOldSettings($this->default_settings[$k]['id']); 
    248255          $this->core->blog->settings->translater->put( 
    249256               $this->default_settings[$k]['id'], 
     
    251258               $this->default_settings[$k]['type'], 
    252259               $this->default_settings[$k]['label'], 
    253                true,false 
     260               true,true 
    254261          ); 
    255262          return true; 
     
    260267     { 
    261268          return $this->set($k,$v); 
     269     } 
     270      
     271     # Drop old "per blog" settings (as of version 2013.05.11) 
     272     private function dropOldSettings($id) 
     273     { 
     274          $this->core->blog->settings->translater->drop($id); 
    262275     } 
    263276      
     
    298311               if (!$v['root_writable']) continue; 
    299312               $this->modules['theme'][$k] = $v; 
     313               $this->modules['theme'][$k]['id'] = $k; 
     314               $this->modules['theme'][$k]['type'] = 'theme'; 
    300315          } 
    301316           
     
    305320               if (!$v['root_writable']) continue; 
    306321               $this->modules['plugin'][$k] = $v; 
     322               $this->modules['plugin'][$k]['id'] = $k; 
     323               $this->modules['plugin'][$k]['type'] = 'plugin'; 
    307324          } 
    308325     } 
     
    320337     { 
    321338          $o = new ArrayObject(); 
     339           
    322340          # Load nothing? 
    323           if (empty($type) && empty($module)) 
    324           { 
     341          if (empty($module)) { 
    325342               return false; 
    326343          } 
     344           
    327345          # Unknow type? 
    328           elseif (!in_array($type,array('plugin','theme'))) 
    329           { 
    330                throw new Exception(sprintf( 
    331                     __('Cannot work with module of type %s'),$type) 
     346          if (!in_array($type,array('plugin','theme'))) { 
     347               $modules = array_merge($this->modules['theme'],$this->modules['plugin']); 
     348          } 
     349          else { 
     350               $modules = $this->modules[$type]; 
     351          } 
     352           
     353          # Unknow module? 
     354          if (!isset($modules[$module])) { 
     355               throw new Exception(sprintf( 
     356                    __('Cannot find module %s'),$module) 
    332357               ); 
    333358               return false; 
    334359          } 
    335           # Unknow module? 
    336           elseif (!isset($this->modules[$type][$module])) 
    337           { 
    338                throw new Exception(sprintf( 
    339                     __('Cannot find module %s of type %s'),$module,$type) 
    340                ); 
    341                return false; 
    342           } 
     360           
    343361          # Module info 
    344           foreach($this->modules[$type][$module] as $a => $b) 
    345           { 
     362          foreach($modules[$module] as $a => $b) { 
    346363               $o->{$a} = $b; 
    347364          } 
     
    351368          # Module exists 
    352369          $o->exists = true; 
    353           # Module type 
    354           $o->type = $type; 
    355370          # Module Basename 
    356371          $i = path::info($o->root); 
     
    15681583     } 
    15691584} 
    1570  
    1571 # Added tools to provide a translation 
    1572 class dcTranslaterProposal 
    1573 { 
    1574      public $core; 
    1575       
    1576      private $tool; 
    1577      private $tools = array(); 
    1578       
    1579      public function __construct($core) 
    1580      { 
    1581           $this->core = $core; 
    1582      } 
    1583       
    1584      public function addTool($id,$name,$func) 
    1585      { 
    1586           if (is_callable($func)) 
    1587           { 
    1588                $this->tools[$id] = array('name'=>$name,'func'=>$func); 
    1589           } 
    1590      } 
    1591       
    1592      public function getTools($id='') 
    1593      { 
    1594           if (empty($id)) 
    1595           { 
    1596                return $this->tools; 
    1597           } 
    1598           return isset($this->tool[$id]) ? $this->tools[$id] : array(); 
    1599      } 
    1600       
    1601      public function initTool($id,$from,$to) 
    1602      { 
    1603           if (!empty($this->tools[$id]['func']) 
    1604            && is_callable($this->tools[$id]['func'])) 
    1605           { 
    1606                $this->tool = call_user_func($this->tools[$id]['func'],$this->core,$from,$to); 
    1607                return true; 
    1608           } 
    1609           return false; 
    1610      } 
    1611       
    1612      public function get($str='') 
    1613      { 
    1614           return $this->tool->get($str); 
    1615      } 
    1616       
    1617      public function __get($str) 
    1618      { 
    1619           return $this->get($str); 
    1620      } 
    1621 } 
    16221585?> 
  • plugins/translater/inc/class.translater.rest.php

    r2299 r3127  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of translater, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
    1315if (!defined('DC_CONTEXT_ADMIN')){return;} 
    1416 
    15 # Admin service de retrieve translation of a string (from translater jquery) 
     17/** 
     18 * Translater REST service. 
     19 * 
     20 * Admin service de retrieve translation of a string 
     21 * Queries come from translater jquery tools 
     22 */ 
    1623class translaterRest 
    1724{ 
     
    2229          $tool = !empty($get['langTool']) ? trim($get['langTool']) : ''; 
    2330          $str_in = !empty($get['langStr']) ? trim($get['langStr']) : ''; 
    24            
     31 
    2532          $str_in = text::toUTF8($str_in); 
     33          $str_in = trim($str_in); 
    2634          $str_out = ''; 
    27            
     35 
    2836          $rsp = new xmlTag(); 
     37 
    2938          try 
    3039          { 
    31                $O = new dcTranslater($core); 
    32                 
    3340               if (empty($from) || empty($to) || empty($tool)) 
    3441               { 
    35                          throw new Exception(__('Missing params')); 
     42                    throw new Exception(__('Missing params')); 
    3643               } 
    37                 
     44 
     45               $translater = new dcTranslater($core); 
     46 
    3847               if (!empty($str_in)) 
    3948               { 
    40                     if (!$O->proposal->initTool($tool,$from,$to)) 
     49                    if (!$translater->proposal->hasTool($tool)) 
    4150                    { 
    42                          throw new Exception(__('Failed to init translation tool')); 
     51                         throw new Exception(__('Failed to get translation tool')); 
    4352                    } 
    44                     $str_out = $O->proposal->get($str_in); 
     53                    if (!$translater->proposal->getTool($tool)->isActive()) 
     54                    { 
     55                         throw new Exception(__('Translation tool is not configured')); 
     56                    } 
     57 
     58                    $str_out = (string) $translater->proposal->getTool($tool)->translate($str_in,$from,$to); 
    4559               } 
    46                 
     60 
    4761               $x = new xmlTag('proposal'); 
    4862               $x->lang_from = $from; 
     
    5367               $rsp->insertNode($x); 
    5468          } 
    55           catch (Exception $e) { 
     69          catch (Exception $e) 
     70          { 
    5671               $core->error->add($e->getMessage()); 
    5772          } 
  • plugins/translater/inc/lib.translater.google.php

    r2299 r3127  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of translater, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
    1315if (!defined('DC_CONTEXT_ADMIN')){return;} 
    1416 
    15 # This uses google page to translate strings 
    16 class googleProposal 
     17/** 
     18 * Google proposal tool. 
     19 * 
     20 * This uses google API v2 to translate strings 
     21 */ 
     22class googleProposalTool extends translaterProposalTool 
    1723{ 
    18      public $core; 
    19      public $from; 
    20      public $to; 
    21  
    22      public $api = 'http://ajax.googleapis.com/ajax/services/language/translate'; 
    23      public $agent = 'dcTranslater - http://dotclear.jcdenis.com/go/translater'; 
    24  
    25      public function __construct($core,$from_lang,$to_lang) 
     24     private $api = 'https://www.googleapis.com/language/translate/v2'; 
     25     private $agent = 'dcTranslater - http://jcd.lv/?q=translater'; 
     26     private $key = null; //ex: AsSDqsGsfdSDSQFQsfedj9bnzY390aIg-1d 
     27      
     28     protected function setup() 
    2629     { 
    27           $this->core = $core; 
    28           $this->from = $from_lang; 
    29           $this->to = $to_lang; 
     30          $this->key = $this->core->blog->settings->translater->translater_google_proposal_key; 
     31           
     32          $this->setName(__('Google')); 
     33          $this->setDesc(__('Google Translation Tool API')); 
     34          $this->setActive(!empty($this->key)); 
    3035     } 
    31  
    32      public static function init($core,$from_lang,$to_lang) 
     36      
     37     public function form() 
    3338     { 
    34           return new self($core,$from_lang,$to_lang); 
     39          return 
     40          '<p><label class="classic" for="translater_google_proposal_key">'. 
     41          __('API Console Single Access Key').'<br />'. 
     42          form::field('translater_google_proposal_key',65,255,$this->key). 
     43          '</label></p>'. 
     44          '<p>'.__('You must have on Google API console:').'</p>'. 
     45          '<ul>'. 
     46          '<li><a href="https://code.google.com/apis/console/#access">'.__('A single access API key').'</a></li>'. 
     47          '<li><a href="https://code.google.com/apis/console/#services">'.__('Activate the "translate API" service').'</a></li>'. 
     48          '</ul>'; 
    3549     } 
    36  
    37      public function get($str) 
     50      
     51     public function save() 
    3852     { 
    39           $str = trim($str); 
    40           if (empty($str)) return ''; 
     53          $key = empty($_POST['translater_google_proposal_key']) ?  
     54               '' : $_POST['translater_google_proposal_key']; 
    4155           
     56          $this->core->blog->settings->translater->put('translater_google_proposal_key',$key,'string','',true,true); 
     57     } 
     58      
     59     public function translate($str,$from,$to) 
     60     { 
    4261          try 
    4362          { 
    4463               $data = array( 
    45                     'v' => '1.0', 
     64                    'key' => $this->key, 
    4665                    'q' => $str, 
    47                     'langpair' => $this->from.'|'.$this->to 
     66                    'source' => $from, 
     67                    'target' => $to 
    4868               ); 
    49                 
    50                $userip = http::realIP(); 
    51                if ($userip) 
    52                { 
    53                     $data['userip'] = $userip; 
    54                } 
    5569                
    5670               $path = ''; 
     
    6276 
    6377               $rs = $client->getContent(); 
    64                if (null === ($dec = json_decode($rs))) 
    65                { 
     78                
     79               if ($client->getStatus() != 200) { 
     80                    throw new Exception(__('Failed to query service.')); 
     81               } 
     82                
     83               if (null === ($dec = json_decode($rs))) { 
    6684                    throw new Exception('Failed to decode result'); 
    6785               } 
    68                if ($dec->responseStatus != 200) 
    69                { 
    70                     $detail = $dec->responseDetails != '' ? $dec->responseDetails : 'no detail'; 
    71                     throw new Exception($detail); 
    72                } 
    73                if ('' == $dec->responseData) 
    74                { 
     86                
     87               if ('' == @$dec->data->translations[0]->translatedText) { 
    7588                    throw new Exception('No data response'); 
    7689               } 
    77  
    78                return $dec->responseData->translatedText; 
     90                
     91               return $dec->data->translations[0]->translatedText; 
    7992          } 
    8093          catch (Exception $e) {} 
  • plugins/translater/index.php

    r2614 r3127  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of translater, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
    1315if (!defined('DC_CONTEXT_ADMIN')){return;} 
    1416 
    15 # Check user perms 
    16 dcPage::check('admin,translater'); 
    17  
    18 # Load translations of alert messages 
    19 $_lang = $core->auth->getInfo('user_lang'); 
    20 $_lang = preg_match('/^[a-z]{2}(-[a-z]{2})?$/',$_lang) ? $_lang : 'en'; 
    21 l10n::set(dirname(__FILE__).'/locales/'.$_lang.'/error'); 
    22 l10n::set(dirname(__FILE__).'/locales/'.$_lang.'/admin'); 
    23  
    24 # Load main class 
    25 $O = new dcTranslater($core); 
    26  
    27 # Init some vars 
    28 $starts = @explode(',',$O->start_tab); 
    29 if (count($starts) < 2) $starts = array('setting',''); 
    30 $p_url    = 'plugin.php?p=translater'; 
    31 $msg = isset($_REQUEST['msg']) ? $_REQUEST['msg'] : ''; 
    32 $default_part = isset($_REQUEST['part']) ? $_REQUEST['part'] : $starts[0]; 
    33 $section = isset($_REQUEST['section']) ? $_REQUEST['section'] : ''; 
    34 $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : ''; 
    35 $type = isset($_REQUEST['type']) ? $_REQUEST['type'] : $starts[1]; 
    36 $module = isset($_REQUEST['module']) ? $_REQUEST['module'] : ''; 
    37 $from = isset($_POST['from']) && $_POST['from'] != '-' ? $_POST['from'] : ''; 
    38 $lang = isset($_REQUEST['lang']) && $_REQUEST['lang'] != '-' ? $_REQUEST['lang'] : ''; 
    39 if ($type == '-' || $module == '-') 
    40 { 
    41      $type = $module = ''; 
    42 } 
    43  
    44 # Common page header 
    45 $header =  
    46 dcPage::jsLoad('js/_posts_list.js'). 
    47 dcPage::jsLoad('index.php?pf=translater/js/main.js'). 
    48 dcPage::jsLoad('index.php?pf=translater/js/jquery.translater.js'). 
    49 '<script type="text/javascript">'."\n//<![CDATA[\n". 
    50 dcPage::jsVar('jcToolsBox.prototype.text_wait',__('Please wait')). 
    51 dcPage::jsVar('jcToolsBox.prototype.section',$section). 
    52 "\n//]]>\n</script>\n"; 
    53  
    54 if ('' != $O->proposal_tool) 
    55 { 
    56      $header .=  
    57      '<style type="text/css">'. 
    58      ' .addfield, .togglelist { border: none; }'. 
    59      "</style>\n". 
    60      "<script type=\"text/javascript\"> \n". 
    61      "//<![CDATA[\n". 
    62      " \$(function(){if(!document.getElementById){return;} \n". 
    63      "  \$.fn.translater.defaults.url = '".html::escapeJS('services.php')."'; \n". 
    64      "  \$.fn.translater.defaults.func = '".html::escapeJS('getProposal')."'; \n". 
    65      "  \$.fn.translater.defaults.from = '".html::escapeJS($O->proposal_lang)."'; \n". 
    66      "  \$.fn.translater.defaults.to = '".html::escapeJS($lang)."'; \n". 
    67      "  \$.fn.translater.defaults.tool = '".html::escapeJS($O->proposal_tool)."'; \n". 
    68      "  \$.fn.translater.defaults.title = '".html::escapeJS(sprintf(__('Use this %s translation:'),$O->proposal_tool))."'; \n". 
    69      "  \$.fn.translater.defaults.title_go = '".html::escapeJS(sprintf(__('Translate this text with %s'),$O->proposal_tool))."'; \n". 
    70      "  \$.fn.translater.defaults.title_add = '".html::escapeJS(__('Use this text'))."'; \n". 
    71      "  \$('.translaterline').translater(); \n". 
    72      "})\n". 
    73      "//]]>\n". 
    74      "</script>\n"; 
    75 } 
    76  
    77 # Common menu 
    78 $menu =  
    79 '<h2>'.__('Translater').'%s</h2>'; 
    80  
    81 # Common page footer 
    82 $footer = '<hr class="clear"/><p class="right">'; 
    83 if ($core->auth->check('admin',$core->blog->id)) 
    84 { 
    85      $footer .= '<a class="button" href="'.$p_url.'&amp;part=setting">'.__('Settings').'</a> - '; 
    86 } 
    87 $footer .= ' 
    88 translater - '.$core->plugins->moduleInfo('translater','version').'&nbsp; 
    89 <img alt="'.__('Translater').'" src="index.php?pf=translater/icon.png" /> 
    90 </p>'; 
    91  
    92 # Combos of translation tools 
    93 $combo_proposal_tool = array('-' => ''); 
    94 foreach($O->proposal->getTools() AS $id => $tool) 
    95 { 
    96      $combo_proposal_tool[$tool['name']] = $id; 
    97 } 
    98  
    99 # Combos of backup folders 
     17dcPage::checkSuper(); 
     18 
     19# 
     20# Init some variables 
     21# 
     22 
     23$translater = new dcTranslater($core); 
     24 
     25$combo_start_page = array( 
     26     'setting' => __('Settings'), 
     27     'modules_plugin' => __('Plugins'), 
     28     'modules_theme' => __('Themes'), 
     29     'pack' => __('Import/Export') 
     30); 
     31 
     32$combo_backup_limit = array( 
     33     5 => 5, 
     34     10 => 10, 
     35     15 => 15, 
     36     20 => 20, 
     37     40 => 40, 
     38     60 => 60 
     39); 
     40 
    10041$combo_backup_folder = array( 
    10142     'module' => __('locales folders of each module'), 
     
    10647); 
    10748 
    108 # succes_codes 
    10949$succes = array( 
    11050     'save_setting' => __('Configuration successfully updated'), 
     
    11959); 
    12060 
    121 # errors_codes 
    12261$errors = array( 
    12362     'save_setting' => __('Failed to update settings: %s'), 
     
    13271); 
    13372 
    134 # Messages 
     73$p_url    = 'plugin.php?p=translater'; 
     74$start_page = @explode('_',$translater->start_page); 
     75if (count($start_page) < 2) $start_page[1] = ''; 
     76 
     77# 
     78# Parse request 
     79# 
     80 
     81$msg = isset($_REQUEST['msg']) ? $_REQUEST['msg'] : ''; 
     82$part = isset($_REQUEST['part']) ? $_REQUEST['part'] : $start_page[0]; 
     83$tab = isset($_REQUEST['tab']) ? $_REQUEST['tab'] : '';  
     84$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : ''; 
     85$type = isset($_REQUEST['type']) ? $_REQUEST['type'] : $start_page[1]; 
     86$module = isset($_REQUEST['module']) ? $_REQUEST['module'] : ''; 
     87$from = isset($_POST['from']) && $_POST['from'] != '-' ? $_POST['from'] : ''; 
     88$lang = isset($_REQUEST['lang']) && $_REQUEST['lang'] != '-' ? $_REQUEST['lang'] : ''; 
     89if ($type == '-' || $module == '-') 
     90{ 
     91     $type = $module = ''; 
     92} 
     93 
     94# 
     95# Manage action 
     96# 
     97 
     98switch ($action) 
     99{ 
     100     case '': 
     101     break; 
     102      
     103     /** 
     104      * Create lang for a module 
     105      */ 
     106     case 'module_add_lang': 
     107 
     108     try 
     109     { 
     110          if (empty($lang)) 
     111          { 
     112               throw new Exception(__('No lang to create')); 
     113          } 
     114          $translater->addLang($module,$lang,$from); 
     115 
     116          http::redirect($p_url.'&part=lang&module='.$module.'&type='.$type.'&lang='.$lang.'&msg=add_lang'); 
     117     } 
     118     catch (Exception $e) 
     119     { 
     120          $core->error->add(sprintf($errors[$action],$e->getMessage())); 
     121     } 
     122      
     123     break; 
     124 
     125     /** 
     126      * Delete lang for a module 
     127      */ 
     128     case 'module_delete_lang': 
     129 
     130     try 
     131     { 
     132          if (empty($lang)) 
     133          { 
     134               throw new Exception(__('No lang to delete')); 
     135          } 
     136          $translater->delLang($module,$lang); 
     137 
     138          http::redirect($p_url.'&part=module&module='.$module.'&type='.$type.'&tab=module-lang&msg=delete_lang'); 
     139     } 
     140     catch (Exception $e) 
     141     { 
     142          $core->error->add(sprintf($errors[$action],$e->getMessage())); 
     143     } 
     144      
     145     break; 
     146 
     147     /** 
     148      * Create backup for a module 
     149      */ 
     150     case 'module_create_backup': 
     151 
     152     try 
     153     { 
     154          if (empty($_POST['modules']) || empty($_POST['langs'])) 
     155          { 
     156               throw new Exception(__('No lang to backup')); 
     157          } 
     158 
     159          foreach($_POST['modules'] as $b_module) 
     160          { 
     161               $b_list = $translater->listLangs($b_module); 
     162               foreach($_POST['langs'] as $b_lang) 
     163               { 
     164                    if (isset($b_list[$b_lang])) 
     165                    { 
     166                         $translater->createBackup($b_module,$b_lang); 
     167                    } 
     168               } 
     169          } 
     170 
     171          http::redirect($p_url.'&part=module&module='.$module.'&type='.$type.'&tab=module-backup&msg=creat_backup'); 
     172     } 
     173     catch (Exception $e) 
     174     { 
     175          $core->error->add(sprintf($errors[$action],$e->getMessage())); 
     176     } 
     177      
     178     break; 
     179 
     180     /** 
     181      * Restore backup for a module 
     182      */ 
     183     case 'module_restore_backup': 
     184 
     185     try 
     186     { 
     187          if (empty($_POST['modules']) || empty($_POST['files'])) 
     188          { 
     189               throw New Exception(__('No blackup to restore')); 
     190          } 
     191 
     192          sort($_POST['files']); 
     193          $done = false; 
     194          foreach($_POST['modules'] as $b_module) 
     195          { 
     196               $b_list = $translater->listBackups($b_module,true); 
     197               foreach($_POST['files'] as $b_file) 
     198               { 
     199                    if (in_array($b_file,$b_list)) 
     200                    { 
     201                         $translater->restoreBackup($b_module,$b_file); 
     202                         $done = true; 
     203                    } 
     204               } 
     205          } 
     206          if (!$done) 
     207          { 
     208               throw new Exception(__('No bakcup to to restore')); 
     209          } 
     210 
     211          http::redirect($p_url.'&part=module&module='.$module.'&type='.$type.'&tab=module-backup&msg=restore_backup'); 
     212     } 
     213     catch (Exception $e) 
     214     { 
     215          $core->error->add(sprintf($errors[$action],$e->getMessage())); 
     216     } 
     217      
     218     break; 
     219 
     220     /** 
     221      * Delete backup for a module 
     222      */ 
     223     case 'module_delete_backup': 
     224 
     225     try 
     226     { 
     227          if (empty($_POST['modules']) || empty($_POST['files'])) 
     228          { 
     229               throw New Exception(__('No backup to delete')); 
     230          } 
     231 
     232          $done = false; 
     233          foreach($_POST['modules'] as $b_module) 
     234          { 
     235               $b_list = $translater->listBackups($b_module,true); 
     236               foreach($_POST['files'] as $b_file) 
     237               { 
     238                    if (in_array($b_file,$b_list)) 
     239                    { 
     240                         $translater->deleteBackup($b_module,$b_file); 
     241                         $done = true; 
     242                    } 
     243               } 
     244          } 
     245          if (!$done) 
     246          { 
     247               throw new Exception(__('No backup to delete')); 
     248          } 
     249 
     250          http::redirect($p_url.'&part=module&module='.$module.'&type='.$type.'&tab=module-backup&msg=delete_backup'); 
     251     } 
     252     catch (Exception $e) 
     253     { 
     254          $core->error->add(sprintf($errors[$action],$e->getMessage())); 
     255     } 
     256      
     257     break; 
     258 
     259     /** 
     260      * Import language package for a module 
     261      */ 
     262     case 'module_import_pack': 
     263 
     264     try 
     265     { 
     266          if (empty($_FILES['packfile']['name'])) 
     267          { 
     268               throw new Exception(__('Nothing to import')); 
     269          } 
     270          $translater->importPack($_POST['modules'],$_FILES['packfile']); 
     271 
     272          http::redirect($p_url.'&part=module&module='.$module.'&type='.$type.'&tab=module-pack&msg=import_pack'); 
     273     } 
     274     catch (Exception $e) 
     275     { 
     276          $core->error->add(sprintf($errors[$action],$e->getMessage())); 
     277     } 
     278      
     279     break; 
     280 
     281     /** 
     282      * Export language package for a module 
     283      */ 
     284     case 'module_export_pack': 
     285 
     286     try 
     287     { 
     288          if (empty($_POST['modules']) || empty($_POST['entries'])) 
     289          { 
     290               throw new Exception(__('Nothing to export')); 
     291          } 
     292          $translater->exportPack($_POST['modules'],$_POST['entries']); 
     293 
     294          http::redirect($p_url.'&part=module&module='.$module.'&type='.$type.'&tab=module-pack&msg=export_pack'); 
     295     } 
     296     catch (Exception $e) 
     297     { 
     298          $core->error->add(sprintf($errors[$action],$e->getMessage())); 
     299     } 
     300      
     301     break; 
     302 
     303     /** 
     304      * Update language 
     305      */ 
     306     case 'update_lang': 
     307 
     308     try 
     309     { 
     310          if (empty($_POST['entries']) || empty($lang) || empty($module)) 
     311          { 
     312               throw new Exception(__('No language to update')); 
     313          } 
     314          foreach($_POST['entries'] as $i => $entry) 
     315          { 
     316               if (isset($entry['check']) && isset($_POST['multigroup'])) 
     317               { 
     318                    $_POST['entries'][$i]['group'] = $_POST['multigroup']; 
     319                    unset($_POST['entries'][$i]['check']); 
     320               } 
     321          } 
     322          $translater->updLang($module,$lang,$_POST['entries']); 
     323 
     324          http::redirect($p_url.'&part=lang&module='.$module.'&type='.$type.'&lang='.$lang.'&msg='.$action); 
     325     } 
     326     catch (Exception $e) 
     327     { 
     328          $core->error->add(sprintf($errors[$action],$e->getMessage())); 
     329     } 
     330 
     331     break; 
     332 
     333     /** 
     334      * Import language packages 
     335      */ 
     336     case 'import_pack': 
     337 
     338     try 
     339     { 
     340          if (empty($_FILES['packfile']['name'])) 
     341          { 
     342               throw new Exception(__('Nothing to import')); 
     343          } 
     344          $translater->importPack($_POST['modules'],$_FILES['packfile']); 
     345           
     346          http::redirect($p_url.'&part=pack&msg='.$action.'&tab=pack-import'); 
     347     } 
     348     catch (Exception $e) 
     349     { 
     350          $core->error->add(sprintf($errors[$action],$e->getMessage())); 
     351     } 
     352 
     353     break; 
     354 
     355     /** 
     356      * Export language packages 
     357      */ 
     358     case 'export_pack': 
     359 
     360     try 
     361     { 
     362          if (empty($_POST['modules']) || empty($_POST['entries'])) 
     363          { 
     364               throw new Exception(__('Nothing to export')); 
     365          } 
     366          $translater->exportPack($_POST['modules'],$_POST['entries']); 
     367 
     368          http::redirect($p_url.'&part=pack&msg='.$action.'&tab=pack-export'); 
     369     } 
     370     catch (Exception $e) 
     371     { 
     372          $core->error->add(sprintf($errors[$action],$e->getMessage())); 
     373     } 
     374 
     375     break; 
     376 
     377     /** 
     378      * Save settings 
     379      */ 
     380     case 'save_setting': 
     381 
     382     try 
     383     { 
     384          if (empty($_POST['translater_write_po']) 
     385           && empty($_POST['translater_write_langphp'])) 
     386          { 
     387               throw new Exception('You must choose one file format at least'); 
     388          } 
     389 
     390          foreach($translater->getDefaultSettings() as $k => $v) 
     391          { 
     392               $translater->set($k,(isset($_POST['translater_'.$k]) ? $_POST['translater_'.$k] : '')); 
     393          } 
     394 
     395          foreach($translater->proposal->getTools() AS $k => $v) 
     396          { 
     397               $v->save(); 
     398          } 
     399 
     400          http::redirect($p_url.'&part=setting&msg='.$action); 
     401     } 
     402     catch (Exception $e) 
     403     { 
     404          $core->error->add(sprintf($errors[$action],$e->getMessage())); 
     405     } 
     406 
     407     break; 
     408 
     409     /** 
     410      * Modules / Unknow / None 
     411      */ 
     412     default: 
     413     break; 
     414} 
     415 
     416# 
     417# Fill in title and prepare display 
     418# 
     419 
     420switch ($part) 
     421{ 
     422     /** 
     423      * Modules 
     424      */ 
     425     case 'modules': 
     426 
     427     $title = '<span class="page-title">'.($type == 'theme' ? __('Themes') : __('Plugins')).'</span>'; 
     428 
     429     break; 
     430 
     431     /** 
     432      * Module 
     433      */ 
     434     case 'module': 
     435 
     436     # Get info about requested module 
     437     try 
     438     { 
     439          $M = $translater->getModule($module,$type); 
     440     } 
     441     catch(Exception $e) 
     442     { 
     443          $core->error->add(sprintf(__('Failed to launch translater: %s'),$e->getMessage())); 
     444          $action = $module = $type = ''; 
     445          $M = false; 
     446     } 
     447     if (!empty($module) && !empty($type) && !$M) 
     448     { 
     449          $action = $module = $type = ''; 
     450          $M = false; 
     451     } 
     452 
     453     $M->langs = $translater->listLangs($module); 
     454     $M->backups = $translater->listBackups($module); 
     455     $M->unused_langs = array_flip(array_diff($translater->getIsoCodes(),$M->langs)); 
     456     $M->used_langs = array_flip(array_diff($M->langs,array_flip($translater->getIsoCodes()))); 
     457     $allowed_groups = array_combine( 
     458          dcTranslater::$allowed_l10n_groups, 
     459          dcTranslater::$allowed_l10n_groups 
     460     ); 
     461 
     462     $title =  
     463     '<a href="'.$p_url.'&amp;part=modules&type='.$type.'">'.($type == 'theme' ? __('Themes') : __('Plugins')).'</a>'. 
     464     ' &rsaquo; <span class="page-title">'.$module.'</span>'; 
     465 
     466     break; 
     467 
     468     /** 
     469      * Lang 
     470      */ 
     471     case 'lang': 
     472 
     473     # Get infos on module wanted 
     474     try 
     475     { 
     476          $M = $translater->getModule($module,$type); 
     477           
     478          # Retrieve some infos 
     479          $M->langs = $translater->listLangs($module); 
     480          $M->backups = $translater->listBackups($module); 
     481          $M->unused_langs = array_flip(array_diff($translater->getIsoCodes(),$M->langs)); 
     482          $M->used_langs = array_flip(array_diff($M->langs,array_flip($translater->getIsoCodes()))); 
     483          $allowed_groups = array_combine( 
     484               dcTranslater::$allowed_l10n_groups, 
     485               dcTranslater::$allowed_l10n_groups 
     486          ); 
     487     } 
     488     catch(Exception $e) 
     489     { 
     490          $core->error->add(sprintf(__('Failed to launch translater: %s'),$e->getMessage())); 
     491          $action = $module = $type = ''; 
     492          $M = false; 
     493     } 
     494     if (!empty($module) && !empty($type) && !$M) 
     495     { 
     496          $action = $module = $type = ''; 
     497          $M = false; 
     498     } 
     499 
     500     $title = 
     501     '<a href="'.$p_url.'&amp;part=modules&type='.$type.'">'.($type == 'theme' ? __('Themes') : __('Plugins')).'</a>'. 
     502     ' &rsaquo; '. 
     503     '<a href="'.$p_url.'&amp;part=module&type='.$type.'&module='.$module.'&amp;tab=module-lang">'.$module.'</a>'; 
     504     if (!empty($M->langs) && isset($M->langs[$lang])) 
     505     { 
     506          $title .= ' &rsaquo; <span class="page-title">'.$M->langs[$lang].'</span>'; 
     507     } 
     508 
     509     break; 
     510 
     511     /** 
     512      * Import/Export (pack) 
     513      */ 
     514     case 'pack': 
     515 
     516     $title = '<span class="page-title">'.__('Import/Export').'</span>'; 
     517 
     518     break; 
     519 
     520     /** 
     521      * Settings 
     522      */ 
     523     case 'setting':  
     524     default: 
     525 
     526     $title = '<span class="page-title">'.__('Settings').'</span>'; 
     527 
     528     break; 
     529} 
     530 
     531# 
     532# Display page 
     533# 
     534 
     535echo ' 
     536<html> 
     537<head><title>'.__('Translater').'</title>'. 
     538dcPage::jsPageTabs($tab). 
     539dcPage::jsLoad('js/_posts_list.js'). 
     540dcPage::jsLoad('index.php?pf=translater/js/jquery.translater.js'); 
     541 
     542if ('' != $translater->proposal_tool) 
     543{ 
     544     echo   
     545     '<style type="text/css">'. 
     546     ' .addfield, .togglelist { border: none; }'. 
     547     "</style>\n". 
     548     "<script type=\"text/javascript\"> \n". 
     549     "//<![CDATA[\n". 
     550     " \$(function(){if(!document.getElementById){return;} \n". 
     551     "  \$.fn.translater.defaults.url = '".html::escapeJS('services.php')."'; \n". 
     552     "  \$.fn.translater.defaults.func = '".html::escapeJS('getProposal')."'; \n". 
     553     "  \$.fn.translater.defaults.from = '".html::escapeJS($translater->proposal_lang)."'; \n". 
     554     "  \$.fn.translater.defaults.to = '".html::escapeJS($lang)."'; \n". 
     555     "  \$.fn.translater.defaults.tool = '".html::escapeJS($translater->proposal_tool)."'; \n". 
     556     "  \$.fn.translater.defaults.title = '".html::escapeJS(sprintf(__('Use this %s translation:'),$translater->proposal_tool))."'; \n". 
     557     "  \$.fn.translater.defaults.title_go = '".html::escapeJS(sprintf(__('Translate this text with %s'),$translater->proposal_tool))."'; \n". 
     558     "  \$.fn.translater.defaults.title_add = '".html::escapeJS(__('Use this text'))."'; \n". 
     559     "  \$('.translaterline').translater(); \n". 
     560     "})\n". 
     561     "//]]>\n". 
     562     "</script>\n"; 
     563} 
     564 
     565# --BEHAVIOR-- translaterAdminHeaders 
     566$core->callBehavior('translaterAdminHeaders'); 
     567 
     568echo  
     569'</head> 
     570<body><h2>'.__('Translater').' &rsaquo; '.$title. 
     571' - <a class="button" href="'.$p_url.'&amp;part=modules&amp;type=plugin">'.__('Plugins').'</a>'. 
     572' - <a class="button" href="'.$p_url.'&amp;part=modules&amp;type=theme">'.__('Themes').'</a>'. 
     573' - <a class="button" href="'.$p_url.'&amp;part=pack">'.__('Import/Export').'</a>'. 
     574'</h2>'; 
     575 
    135576if (isset($succes[$msg])) 
    136577{ 
    137      $msg = sprintf('<p class="message">%s</p>',$succes[$msg]); 
     578     dcPage::message($succes[$msg]); 
    138579} 
    139580 
    140 # Pages 
    141 if (!file_exists(dirname(__FILE__).'/inc/index.'.$default_part.'.php')) 
     581switch ($part) 
    142582{ 
    143      $default_part = 'setting'; 
     583     /** 
     584      * Modules 
     585      */ 
     586     case 'modules': 
     587 
     588     echo '<form id="theme-form" method="post" action="'.$p_url.'">'; 
     589 
     590     $res = ''; 
     591     foreach ($translater->listModules($type) as $k => $v) 
     592     { 
     593          if ($translater->hide_default && in_array($k,dcTranslater::$default_dotclear_modules[$type])) 
     594          { 
     595               continue; 
     596          } 
     597           
     598          if ($v['root_writable']) 
     599          { 
     600               $res .=  
     601               '<tr class="line">'. 
     602               '<td class="nowrap">'. 
     603               '<a href="'.$p_url.'&amp;part=module&amp;type='.$type.'&amp;module='.$k.'" title="'. 
     604               sprintf( 
     605                    ($type == 'theme' ?  
     606                         html::escapeHTML(__('Translate theme "%s" (by %s)')) :  
     607                         html::escapeHTML(__('Translate plugin "%s" (by %s)')) 
     608                    ), 
     609                    html::escapeHTML(__($v['name'])),html::escapeHTML($v['author']) 
     610               ). 
     611               '">'.$k.'</a></td>'; 
     612          } 
     613          else 
     614          { 
     615               $res .=  
     616               '<tr class="line offline">'. 
     617               '<td class="nowrap">'.$k.'</td>'; 
     618          } 
     619          $res .=  
     620          '<td class="nowrap">'.$v['version'].'</td>'. 
     621          '<td class="nowrap">'; 
     622 
     623          $array_langs = array(); 
     624          foreach ($translater->listLangs($k) as $lang_name => $lang_infos) 
     625          { 
     626               $array_langs[$lang_name] =  
     627               '<a class="wait maximal nowrap" title="'.__('Edit translation').'" href="'.$p_url.'&amp;part=lang&amp;type='.$type.'&amp;module='.$k.'&amp;lang='.$lang_name.'">'. 
     628               $lang_name.'</a>'; 
     629          } 
     630          $res .=  implode(', ',$array_langs). 
     631          '</td>'. 
     632          '</tr>'; 
     633     } 
     634     if ($res) 
     635     { 
     636          echo ' 
     637          <table class="clear"> 
     638          <tr> 
     639          <th>'.__('Id').'</th> 
     640          <th class="nowrap">'.__('Version').'</th> 
     641          <th class="nowrap maximal">'.__('Languages').'</th> 
     642          </tr>'. 
     643          $res. 
     644          '</table>'; 
     645 
     646     } 
     647     else 
     648     { 
     649          echo '<tr><td colspan="6">'.__('There is no editable modules').'</td></tr>'; 
     650     } 
     651     echo ' 
     652     <p>&nbsp;</p> 
     653 
     654     </form>'; 
     655      
     656     break; 
     657      
     658     /** 
     659      * Module 
     660      */ 
     661     case 'module': 
     662 
     663     # Summary 
     664     echo ' 
     665     <div class="multi-part" id="module-summary" title="'.__('Summary').'"> 
     666     <h3>'.__('Module').'</h3> 
     667     <table class="clear maximal"> 
     668     <tr><th colspan="2">'.__('About').'</th></tr> 
     669     <tr class="line"> 
     670     <td class="nowrap">'.__('Name').'</td><td class="nowrap"> '.$M->name.'</td> 
     671     </tr><tr class="line"> 
     672     <td class="nowrap">'.__('Version').'</td><td class="nowrap"> '.$M->version.'</td> 
     673     </tr><tr class="line"> 
     674     <td class="nowrap">'.__('Author').'</td><td class="nowrap"> '.$M->author.'</td> 
     675     </tr><tr class="line"> 
     676     <td class="nowrap">'.__('Type').'</td><td class="nowrap"> '.$M->type.'</td> 
     677     </tr><tr class="line"> 
     678     <td class="nowrap">'.__('Root').'</td><td class="nowrap"> '.$M->root.'</td> 
     679     </tr><tr class="line"> 
     680     <td class="nowrap">'.__('Backups').'</td><td class="nowrap"> '. 
     681          $translater->getBackupFolder($module).'</td> 
     682     </tr> 
     683     </table> 
     684     <p>&nbsp;</p>'; 
     685 
     686     if (count($M->langs)) 
     687     { 
     688          echo  
     689          '<h3>'.__('l10n').'</h3>'. 
     690          '<table class="clear maximal">'. 
     691          '<tr>'. 
     692          '<th>'.__('Languages').'</th>'. 
     693          '<th>'.__('Code').'</th>'. 
     694          '<th>'.__('Backups').'</th>'. 
     695          '<th>'.__('Last backup').'</th>'. 
     696          '</tr>'; 
     697           
     698          foreach($M->langs AS $lang => $name) 
     699          { 
     700               echo  
     701               '<tr class="line">'. 
     702               '<td class="nowrap">'. 
     703               '<a href="'.$p_url.'&amp;part=lang&amp;type='.$type.'&amp;module='.$module.'&amp;lang='.$lang.'">'.$name.'</a>'. 
     704               '</td>'. 
     705               '<td class="nowrap"> '.$lang.'</td>'; 
     706                
     707               if (isset($M->backups[$lang])) 
     708               { 
     709                    foreach($M->backups[$lang] AS $file => $info) 
     710                    { 
     711                         $time[$lang] = isset($time[$lang]) && $time[$lang] > $info['time'] ?  
     712                              $time[$lang] : $info['time']; 
     713                    } 
     714                    echo  
     715                    '<td class="nowrap">'.count($M->backups[$lang]).'</td>'. 
     716                    '<td class="nowrap"> '. 
     717                    dt::str('%Y-%m-%d %H:%M',$time[$lang],$core->blog->settings->system->blog_timezone). 
     718                    '</td>'; 
     719               } 
     720               else 
     721               { 
     722                    echo '<td class="nowrap" colspan="4">'.__('no backup').'</td>'; 
     723               } 
     724               echo '</tr>'; 
     725          } 
     726          echo '</table>'; 
     727     } 
     728     echo '</div>'; 
     729 
     730     # Add/Remove/Edit lang 
     731     echo '<div class="multi-part" id="module-lang" title="'.__('Translations').'">'; 
     732 
     733     # Edit lang 
     734     if (!empty($M->langs)) 
     735     { 
     736          echo ' 
     737          <h3>'.__('Edit language').'</h3> 
     738          <form id="module-lang-edit-form" method="post" action="'.$p_url.'"> 
     739          <p>'.__('Select language:').' '.  
     740          form::combo(array('lang'),$M->used_langs,$lang).'</p> 
     741          <p><input type="submit" name="save" value="'.__('Edit translation').'" />'. 
     742          $core->formNonce(). 
     743          form::hidden(array('type'),$type). 
     744          form::hidden(array('module'),$module). 
     745          form::hidden(array('action'),''). 
     746          form::hidden(array('part'),'lang'). 
     747          form::hidden(array('p'),'translater').' 
     748          </p> 
     749          </form> 
     750          <p>&nbsp;</p>'; 
     751     } 
     752 
     753     # New lang 
     754     if (!empty($M->unused_langs)) 
     755     { 
     756          echo ' 
     757          <h3>'.__('Add language').'</h3> 
     758          <form id="muodule-lang-create-form" method="post" action="'.$p_url.'"> 
     759          <p class="nowrap">'.__('Select language:').' '.  
     760          form::combo(array('lang'),array_merge(array('-'=>'-'),$M->unused_langs),$core->auth->getInfo('user_lang')).'</p>'; 
     761          if (!empty($M->used_langs)) 
     762          { 
     763               echo  
     764               '<p>'.__('Copy from language:').' '.  
     765               form::combo(array('from'),array_merge(array('-'=>'-'),$M->used_langs)). 
     766               ' ('.__('Optionnal').')</p>'; 
     767          } 
     768          else 
     769          { 
     770               echo '<p>'.form::hidden(array('from'),'').'</p>'; 
     771          } 
     772          echo ' 
     773          <p><input type="submit" name="save" value="'.__('Add translation').'" />'. 
     774          $core->formNonce(). 
     775          form::hidden(array('type'),$type). 
     776          form::hidden(array('module'),$module). 
     777          form::hidden(array('action'),'module_add_lang'). 
     778          form::hidden(array('part'),'module'). 
     779          form::hidden(array('tab'),'module-lang'). 
     780          form::hidden(array('p'),'translater').' 
     781          </p> 
     782          </form> 
     783          <p>&nbsp;</p>'; 
     784     } 
     785 
     786     # Delete lang 
     787     if (!empty($M->used_langs)) 
     788     { 
     789          echo ' 
     790          <h3>'.__('Delete language').'</h3> 
     791          <form id="module-lang-delete-form" method="post" action="'.$p_url.'"> 
     792          <p>'.__('Select language:').' '.  
     793          form::combo(array('lang'),array_merge(array('-'=>'-'),$M->used_langs)).'</p> 
     794          <p><input type="submit" name="save" value="'.__('Delete translation').'" />'. 
     795          $core->formNonce(). 
     796          form::hidden(array('type'),$type). 
     797          form::hidden(array('module'),$module). 
     798          form::hidden(array('action'),'module_delete_lang'). 
     799          form::hidden(array('part'),'module'). 
     800          form::hidden(array('tab'),'module-lang'). 
     801          form::hidden(array('p'),'translater').' 
     802          </p> 
     803          </form> 
     804          <p>&nbsp;</p>'; 
     805     } 
     806     echo '</div>'; 
     807 
     808     # Create/delete/restore backups 
     809     if (!empty($M->used_langs) || !empty($M->backups)) { 
     810 
     811     echo '<div class="multi-part" id="module-backup" title="'.__('Backups').'">'; 
     812 
     813     if (!empty($M->used_langs)) 
     814     { 
     815          echo ' 
     816          <h3>'.__('Create backups').'</h3> 
     817          <form id="module-backup-create-form" method="post" action="'.$p_url.'"> 
     818          <p>'.__('Choose languages to backup').'</p> 
     819          <table class="clear"> 
     820          <tr><th colspan="3"></th></tr>'; 
     821          $i=0; 
     822          foreach($M->used_langs AS $name => $lang) 
     823          { 
     824               $i++; 
     825               echo ' 
     826               <tr class="line"> 
     827               <td class="minimal">'.form::checkbox(array('langs[]'),$lang,'','','',false).'</td> 
     828               <td class="maximal">'.$name.'</td> 
     829               <td class="nowrap">'.$lang.'</td> 
     830               </tr>'; 
     831          } 
     832          echo ' 
     833          </table> 
     834          <div class="two-cols"> 
     835          <p class="col checkboxes-helpers">&nbsp;</p> 
     836          <p class="col right">&nbsp;</p> 
     837          </div> 
     838          <p> 
     839          <input type="submit" name="save" value="'.__('Backup').'" />'. 
     840          form::hidden(array('modules[]'),$module). 
     841          $core->formNonce(). 
     842          form::hidden(array('type'),$type). 
     843          form::hidden(array('module'),$module). 
     844          form::hidden(array('action'),'module_create_backup'). 
     845          form::hidden(array('part'),'module'). 
     846          form::hidden(array('tab'),'module-backup'). 
     847          form::hidden(array('p'),'translater').' 
     848          </p> 
     849          </form> 
     850          <p>&nbsp;</p>'; 
     851     } 
     852 
     853     if (!empty($M->backups)) 
     854     { 
     855          echo  
     856          '<h3>'.__('List of backups').'</h3>'. 
     857          '<form id="module-backup-edit-form" method="post" action="'.$p_url.'">'. 
     858          '<table class="clear">'. 
     859          '<tr>'. 
     860          '<th colspan="2">'.__('File').'</th>'. 
     861          '<th>'.__('Date').'</th>'. 
     862          '<th>'.__('Language').'</th>'. 
     863          '<th>'.__('Size').'</th>'. 
     864          '</tr>'; 
     865          $i=0; 
     866          foreach($M->backups as $lang => $langs) 
     867          { 
     868               foreach($langs as $file => $infos) 
     869               { 
     870                    $i++; 
     871                    echo  
     872                    '<tr class="line">'. 
     873                    '<td class="minimal">'.form::checkbox(array('files[]'),$file,'','','',false).'</td>'. 
     874                    '<td class="maximal">'.$file.'</td>'. 
     875                    '<td class="nowrap">'. 
     876                    dt::str(__('%Y-%m-%d %H:%M:%S'),$infos['time'],$core->blog->settings->system->blog_timezone). 
     877                    '</td>'. 
     878                    '<td class="nowrap">'.$translater->isIsoCode($lang).'</td>'. 
     879                    '<td class="nowrap">'.files::size($infos['size']).'</td>'. 
     880                    '</tr>'; 
     881               } 
     882          } 
     883          echo ' 
     884          </table> 
     885          <div class="two-cols"> 
     886          <p class="col checkboxes-helpers">&nbsp;</p> 
     887          <p class="col right">'.__('Selected backups action:').' '. 
     888          form::combo('action',array( 
     889               __('Restore backups') => 'module_restore_backup', 
     890               __('Delete backups') => 'module_delete_backup') 
     891          ).' 
     892          <input type="submit" name="save" value="'.__('ok').'" />'. 
     893          form::hidden(array('modules[]'),$module). 
     894          $core->formNonce(). 
     895          form::hidden(array('type'),$type). 
     896          form::hidden(array('module'),$module). 
     897          form::hidden(array('part'),'module'). 
     898          form::hidden(array('tab'),'module-backup'). 
     899          form::hidden(array('p'),'translater').' 
     900          </p> 
     901          </div> 
     902          </form> 
     903          <p>&nbsp;</p>'; 
     904     } 
     905 
     906     echo '</div>'; 
     907     } // end if (!empty($M->used_langs) || !empty($M->backups)) { 
     908 
     909     # Import/Export pack 
     910     echo '<div class="multi-part" id="module-pack" title="'.__('Import/Export').'">'; 
     911 
     912     # Import 
     913     echo ' 
     914     <h3>'.__('Import').'</h3> 
     915     <form id="module-pack-import-form" method="post" action="'.$p_url.'" enctype="multipart/form-data"> 
     916     <p>'.__('Choose language package to import').'<br /> 
     917     <input type="file" name="packfile" size="40"/></p> 
     918     <p> 
     919     <input type="submit" name="save" value="'.__('Import').'" />'. 
     920     form::hidden(array('modules[]'),$module). 
     921     $core->formNonce(). 
     922     form::hidden(array('type'),$type). 
     923     form::hidden(array('module'),$module). 
     924     form::hidden(array('action'),'module_import_pack'). 
     925     form::hidden(array('part'),'module'). 
     926     form::hidden(array('tab'),'module-pack'). 
     927     form::hidden(array('p'),'translater').' 
     928     </p> 
     929     </form> 
     930     <p>&nbsp;</p>'; 
     931 
     932     # Export 
     933     if (!empty($M->used_langs)) 
     934     { 
     935          echo  
     936          '<h3>'.__('Export').'</h3>'. 
     937          '<form id="module-pack-export-form" method="post" action="'.$p_url.'">'. 
     938          '<p>'.__('Choose languages to export').'</p>'. 
     939          '<table class="clear">'. 
     940          '<tr><th colspan="3"></th></tr>'; 
     941          $i=0; 
     942          foreach($M->used_langs AS $name => $lang) 
     943          { 
     944               $i++; 
     945               echo  
     946               '<tr class="line">'. 
     947               '<td class="minimal">'. 
     948               form::checkbox(array('entries[]'),$lang,'','','',false). 
     949               '</td>'. 
     950               '<td class="maximal">'.$name.'</td>'. 
     951               '<td class="nowrap">'.$lang.'</td>'. 
     952               '</tr>'; 
     953          } 
     954          echo  
     955          '</table>'. 
     956          '<div class="two-cols">'. 
     957          '<p class="col checkboxes-helpers">&nbsp;</p>'. 
     958          '<p class="col right">&nbsp;</p>'. 
     959          '</div>'. 
     960          '<p>'. 
     961          '<input type="submit" name="save" value="'.__('Export').'" />'. 
     962          form::hidden(array('modules[]'),$module). 
     963          $core->formNonce(). 
     964          form::hidden(array('type'),$type). 
     965          form::hidden(array('module'),$module). 
     966          form::hidden(array('action'),'module_export_pack'). 
     967          form::hidden(array('part'),'module'). 
     968          form::hidden(array('tab'),'module-pack'). 
     969          form::hidden(array('p'),'translater'). 
     970          '</p>'. 
     971          '</form>'. 
     972          '<p>&nbsp;</p>'; 
     973     } 
     974     echo '</div>'; 
     975 
     976     break; 
     977 
     978     /** 
     979      * Lang 
     980      */ 
     981     case 'lang': 
     982 
     983     # Existing langs 
     984     if (empty($M->langs) || !isset($M->langs[$lang])) 
     985     { 
     986          break; 
     987     } 
     988 
     989     $iso = $M->langs[$lang]; 
     990 
     991     $i = 0; 
     992     $sort_order = 'asc'; 
     993     $lines = $translater->getMsgs($module,$lang); 
     994 
     995     # Sort array 
     996     if (isset($_GET['sort']) && !empty($lines)) 
     997     { 
     998          $sort = explode(',',$_GET['sort']); 
     999          $sort_by = $sort[0]; 
     1000          $sort_order = isset($sort[1]) && $sort[1] == 'desc' ? 'asc' : 'desc'; 
     1001 
     1002          switch($sort_by) 
     1003          { 
     1004               case 'group': 
     1005               foreach($lines AS $k => $v) 
     1006               { 
     1007                    $sort_list[] = $v['group']; 
     1008               } 
     1009               break; 
     1010 
     1011               case 'msgid': 
     1012               foreach($lines AS $k => $v) 
     1013               { 
     1014                    $sort_list[] = strtolower($k); 
     1015               } 
     1016               break; 
     1017 
     1018               case 'file': 
     1019               foreach($lines AS $k => $v) 
     1020               { 
     1021                    $file = array(); 
     1022                    foreach($v['files'] as $fv) 
     1023                    { 
     1024                         $file[] = empty($fv[0]) || empty($fv[1]) ? '' : $fv[0].($fv[1] /1000); 
     1025                    } 
     1026                    sort($file); 
     1027                    $sort_list[] = $file[0]; 
     1028               } 
     1029               break; 
     1030 
     1031               case 'msgstr': 
     1032               foreach($lines AS $k => $v) 
     1033               { 
     1034                    $sort_list[] = strtolower($v['msgstr']); 
     1035               } 
     1036               break; 
     1037 
     1038               default: 
     1039               $sort_list = false; 
     1040               break; 
     1041          } 
     1042          if ($sort_list) 
     1043          { 
     1044               array_multisort( 
     1045                    $sort_list, 
     1046                    ($sort_order == 'asc' ? SORT_DESC : SORT_ASC), 
     1047                    SORT_STRING, 
     1048                    $lines 
     1049               ); 
     1050          } 
     1051     } 
     1052 
     1053     echo  
     1054     '<div id="lang-form" title="'.$iso.'">'. 
     1055     '<form id="lang-edit-form" method="post" action="'.$p_url.'">'. 
     1056     '<table>'. 
     1057     '<tr>'. 
     1058     '<th><a href="'.$p_url.'&amp;part=lang&amp;module='.$module.'&amp;type='.$type.'&amp;lang='.$lang. 
     1059     '&amp;sort=group,'.$sort_order.'">'.__('Group').'</a></th>'. 
     1060     '<th><a href="'.$p_url.'&amp;part=lang&amp;module='.$module.'&amp;type='.$type.'&amp;lang='.$lang. 
     1061     '&amp;sort=msgid,'.$sort_order.'">'.__('String').'</a></th>'. 
     1062     '<th><a href="'.$p_url.'&amp;part=lang&amp;module='.$module.'&amp;type='.$type.'&amp;lang='.$lang. 
     1063     '&amp;sort=msgstr,'.$sort_order.'">'.__('Translation').'</a></th>'. 
     1064     '<th>'.__('Existing').'</th>'. 
     1065     '<th><a href="'.$p_url.'&amp;part=lang&amp;module='.$module.'&amp;type='.$type.'&amp;lang='.$lang. 
     1066     '&amp;sort=file,'.$sort_order.'">'.__('File').'</a></th>'. 
     1067     '</tr>'; 
     1068 
     1069     foreach ($lines AS $msgid => $rs) 
     1070     { 
     1071          $i++; 
     1072          $in_dc = ($rs['in_dc'] && $translater->parse_nodc); 
     1073 
     1074          echo  
     1075          '<tr class="line'.($in_dc ? ' offline' : ' translaterline').'">'. 
     1076 
     1077          '<td class="nowrap">'. 
     1078          form::checkbox(array('entries['.$i.'][check]'),1).' '. 
     1079          form::combo(array('entries['.$i.'][group]'), 
     1080               $allowed_groups,$rs['group'],'','',$in_dc 
     1081          ). 
     1082          '</td>'. 
     1083 
     1084          '<td'.('' != $translater->proposal_tool ? ' class="translatermsgid"' : '' ).'>'. 
     1085          html::escapeHTML($msgid).'</td>'. 
     1086 
     1087          '<td class="nowrap translatertarget">'. 
     1088          form::hidden(array('entries['.$i.'][msgid]'),html::escapeHTML($msgid)). 
     1089          form::field(array('entries['.$i.'][msgstr]'), 
     1090               75,255,html::escapeHTML($rs['msgstr']),'','',$in_dc). 
     1091          '</td>'. 
     1092 
     1093          '<td class="translatermsgstr">'; 
     1094          $strin = array(); 
     1095          foreach($rs['o_msgstrs'] AS $o_msgstr) 
     1096          { 
     1097               if (!isset($strin[$o_msgstr['msgstr']])) 
     1098               { 
     1099                    $strin[$o_msgstr['msgstr']] = ''; 
     1100               } 
     1101               $strin[$o_msgstr['msgstr']][] = array('module'=>$o_msgstr['module'],'file'=>$o_msgstr['file']); 
     1102          } 
     1103          foreach($strin as $k => $v) 
     1104          { 
     1105               echo '<div class="subtranslatermsgstr"><strong>'.html::escapeHTML($k).'</strong><div class="strlist">'; 
     1106               foreach($v as $str) 
     1107               { 
     1108                    echo '<i>'.html::escapeHTML($str['module'].' => '.$str['file']).'</i><br />'; 
     1109               } 
     1110               echo '</div></div><br />'; 
     1111          } 
     1112          echo  
     1113          '</td>'. 
     1114 
     1115          '<td class="nowrap translatermsgfile">'; 
     1116          if (empty($rs['files'][0])) 
     1117          { 
     1118               echo '&nbsp;'; 
     1119          } 
     1120          elseif (count($rs['files']) == 1) 
     1121          { 
     1122               echo $rs['files'][0][0].' : '.$rs['files'][0][1]; 
     1123          } 
     1124          else 
     1125          { 
     1126               echo 
     1127               '<strong>'.sprintf(__('%s occurrences'),count($rs['files'])).'</strong>'. 
     1128               '<div class="strlist">'; 
     1129               foreach($rs['files'] as $location) 
     1130               { 
     1131                    echo '<i>'.implode(' : ',$location).'</i><br />'; 
     1132               } 
     1133               echo '</div>'; 
     1134          } 
     1135          echo 
     1136          '</td>'. 
     1137          '</tr>'; 
     1138     } 
     1139 
     1140     $i++; 
     1141     echo  
     1142     '<tr>'. 
     1143     '<td class="nowrap">'. 
     1144     form::checkbox(array('entries['.$i.'][check]'),1).' '. 
     1145     form::combo(array('entries['.$i.'][group]'),$allowed_groups,'main'). 
     1146     '</td>'. 
     1147     '<td class="">'.form::field(array('entries['.$i.'][msgid]'),75,255,'').'</td>'. 
     1148     '<td class="nowrap">'.form::field(array('entries['.$i.'][msgstr]'),75,255,'').'</td>'. 
     1149     '<td class="">&nbsp;</td>'. 
     1150     '<td class="">&nbsp;</td>'. 
     1151     '</tr>'. 
     1152     '</table>'. 
     1153     '<p>'.sprintf(__('Total of %s strings.'),$i-1).'</p>'. 
     1154     '<p class="col checkboxes-helpers"></p>'. 
     1155     '<p class="col right">'.__('Change the group of the selected entries to:').' '. 
     1156     form::combo(array('multigroup'),$allowed_groups). 
     1157     '</p>'. 
     1158     '<p>'. 
     1159     '<input type="submit" name="save" value="'.__('save').'" />'. 
     1160     $core->formNonce(). 
     1161     form::hidden(array('lang'),$lang). 
     1162     form::hidden(array('type'),$type). 
     1163     form::hidden(array('module'),$module). 
     1164     form::hidden(array('action'),'update_lang'). 
     1165     form::hidden(array('part'),'lang'). 
     1166     form::hidden(array('p'),'translater'). 
     1167     '</p>'. 
     1168     '</form>'. 
     1169     '<p>&nbsp;</p>'. 
     1170     '</div>'; 
     1171 
     1172     break; 
     1173 
     1174     /** 
     1175      * Import/Export (Pack) 
     1176      */ 
     1177     case 'pack': 
     1178 
     1179     # Import 
     1180     echo ' 
     1181     <div class="multi-part" id="pack-import" title="'.__('Import').'"> 
     1182     <form id="pack-import-form" method="post" action="'.$p_url.'" enctype="multipart/form-data"> 
     1183     <p>'.__('Choose language package to import').'<br /> 
     1184     <input type="file" name="packfile" size="40"/></p> 
     1185     <p> 
     1186     <input type="submit" name="save" value="'.__('Import').'" />'; 
     1187     $i=0; 
     1188     foreach($translater->listModules() AS $k => $v) 
     1189     { 
     1190          if ($translater->hide_default && ( 
     1191          in_array($k,dcTranslater::$default_dotclear_modules['plugin']) ||  
     1192          in_array($k,dcTranslater::$default_dotclear_modules['theme']))) continue; 
     1193           
     1194          echo form::hidden(array('modules[]'),$k);$i++; 
     1195     } 
     1196     echo  
     1197     $core->formNonce(). 
     1198     form::hidden(array('type'),$type). 
     1199     form::hidden(array('module'),$module). 
     1200     form::hidden(array('action'),'import_pack'). 
     1201     form::hidden(array('part'),'pack'). 
     1202     form::hidden(array('tab'),'pack-import'). 
     1203     form::hidden(array('p'),'translater').' 
     1204     </p> 
     1205     </form> 
     1206     </div>'; 
     1207 
     1208     # Export 
     1209     echo ' 
     1210     <div class="multi-part" id="pack-export" title="'.__('Export').'"> 
     1211     <form id="pack-export-form" method="post" action="'.$p_url.'"> 
     1212     <p>'.__('Choose modules to export').'</p> 
     1213     <table class="clear"> 
     1214     <tr><th colspan="2">'.__('Modules').'</th><th>'.__('Languages').'</th></tr>'; 
     1215     $i=0; 
     1216     $langs_list = array(); 
     1217 
     1218     foreach($translater->listModules() AS $k => $v) 
     1219     { 
     1220          if ($translater->hide_default && ( 
     1221          in_array($k,dcTranslater::$default_dotclear_modules['plugin']) ||  
     1222          in_array($k,dcTranslater::$default_dotclear_modules['theme']))) continue; 
     1223 
     1224          $info_lang = $translater->listLangs($k); 
     1225          if (!is_array($info_lang) || 1 > count($info_lang)) continue; 
     1226 
     1227          $i++; 
     1228          $langs_list = array_merge($langs_list,$info_lang); 
     1229 
     1230          echo ' 
     1231          <tr class="line"> 
     1232          <td class="minimal">'.form::checkbox(array('modules[]'),$k,'','','',false).'</td> 
     1233          <td class="nowrap">'.$v['name'].'</td> 
     1234          <td class="maximal">'.implode(', ',$info_lang).'</td> 
     1235          </tr>'; 
     1236     } 
     1237 
     1238     echo ' 
     1239     </table> 
     1240     <p>'.__('Choose languages to export').'</p> 
     1241     <table class="clear"> 
     1242     <tr><th colspan="2">'.__('Languages').'</th><th>'.__('Code').'</th></tr>'; 
     1243     $i=0; 
     1244     foreach($langs_list AS $k => $v) 
     1245     { 
     1246          $i++; 
     1247          echo ' 
     1248          <tr class="line"> 
     1249          <td class="minimal">'.form::checkbox(array('entries[]'),$k,'','','',false).'</td> 
     1250          <td class="nowwrap">'.$v.'</td> 
     1251          <td class="maximal">'.$k.'</td> 
     1252          </tr>'; 
     1253     } 
     1254     echo ' 
     1255     </table> 
     1256     <div class="two-cols"> 
     1257     <p class="col checkboxes-helpers"></p> 
     1258     <p class="col right">&nbsp;</p> 
     1259     </div> 
     1260     <p> 
     1261     <input type="submit" name="save" value="'.__('Export').'" />'. 
     1262     $core->formNonce(). 
     1263     form::hidden(array('type'),$type). 
     1264     form::hidden(array('module'),$module). 
     1265     form::hidden(array('action'),'export_pack'). 
     1266     form::hidden(array('part'),'pack'). 
     1267     form::hidden(array('tab'),'pack-export'). 
     1268     form::hidden(array('p'),'translater').' 
     1269     </p> 
     1270     </form> 
     1271     </div>'; 
     1272 
     1273     break; 
     1274 
     1275     /** 
     1276      * Settings 
     1277      */ 
     1278     case 'setting': 
     1279     default: 
     1280 
     1281     echo ' 
     1282     <form id="setting-form" method="post" action="'.$p_url.'"> 
     1283 
     1284     <div class="multi-part" id="setting-translation" title="'.__('Translation').'"> 
     1285     <p><label class="classic">'. 
     1286     form::checkbox('translater_write_po','1',$translater->write_po).'  
     1287     '.__('Write .po files').'</label></p> 
     1288     <p><label class="classic">'. 
     1289     form::checkbox('translater_write_langphp','1',$translater->write_langphp).'  
     1290     '.__('Write .lang.php files').'</label></p> 
     1291     <p><label class="classic">'. 
     1292     form::checkbox('translater_scan_tpl','1',$translater->scan_tpl).'  
     1293     '.__('Translate also strings of template files').'</label></p> 
     1294     <p><label class="classic">'. 
     1295     form::checkbox('translater_parse_nodc','1',$translater->parse_nodc).'  
     1296     '.__('Translate only unknow strings').'</label></p> 
     1297     <p><label class="classic">'. 
     1298     form::checkbox('translater_hide_default','1',$translater->hide_default).'  
     1299     '.__('Hide default modules of Dotclear').'</label></p> 
     1300     <p><label class="classic">'. 
     1301     form::checkbox('translater_parse_comment','1',$translater->parse_comment).'  
     1302     '.__('Write comments in files').'</label></p> 
     1303     <p><label class="classic">'. 
     1304     form::checkbox('translater_parse_user','1',$translater->parse_user).'  
     1305     '.__('Write informations about author in files').'</label><br /> 
     1306     '.form::field('translater_parse_userinfo',65,255,$translater->parse_userinfo).'</p> 
     1307     </div> 
     1308 
     1309     <div class="multi-part" id="setting-tool" title="'.__('Tools').'"> 
     1310     <p><label class="classic">'.__('Default language of l10n source:').'<br />'. 
     1311     form::combo('translater_proposal_lang', 
     1312          array_flip($translater->getIsoCodes()),$translater->proposal_lang).'</label></p> 
     1313 
     1314     <h4>'.__('Select and configure the tool to use to translate strings:').'</h4>'; 
     1315 
     1316     foreach($translater->proposal->getTools() AS $k => $v) 
     1317     { 
     1318          $form = $v->form(); 
     1319 
     1320          echo ' 
     1321          <dd> 
     1322          <dt><label class="classic">'. 
     1323          form::radio('translater_proposal_tool', $k, $k == $translater->proposal_tool).'  
     1324          '.$v->getDesc().'</label></dt><dd>'. 
     1325          (empty($form) ? 
     1326               '<p>'.sprintf(__('Nothing to configure for %s tool.'),$v->getName()).'</p>' : 
     1327               $form 
     1328          ).'</dd></dl>'; 
     1329     } 
     1330 
     1331     echo ' 
     1332     </div> 
     1333 
     1334     <div class="multi-part" id="setting-pack" title="'.__('Import/Export').'"> 
     1335     <p><label class="classic">'. 
     1336     form::checkbox('translater_import_overwrite','1',$translater->import_overwrite).'  
     1337     '.__('Overwrite existing languages').'</label></p> 
     1338     <p><label class="classic">'.__('Name of exported package').'<br /> 
     1339     '.form::field('translater_export_filename',65,255,$translater->export_filename).'</label></p> 
     1340     </div> 
     1341 
     1342     <div class="multi-part" id="setting-backup" title="'.__('Backups').'"> 
     1343     <p><label class="classic">'. 
     1344     form::checkbox('translater_backup_auto','1',$translater->backup_auto).'  
     1345     '.__('Make backups when changes are made').'</label></p> 
     1346     <p><label class="classic">'.sprintf(__('Limit backups to %s files per module'), 
     1347     form::combo('translater_backup_limit', 
     1348          array_flip($combo_backup_limit),$translater->backup_limit)).'</label></p> 
     1349     <p><label class="classic">'.sprintf(__('Store backups in %s'), 
     1350     form::combo('translater_backup_folder', 
     1351          array_flip($combo_backup_folder),$translater->backup_folder)).'</label></p> 
     1352     </div> 
     1353 
     1354     <div class="multi-part" id="setting-plugin" title="'.__('Behaviors').'"> 
     1355     <p><label class="classic">'.__('Default start menu:').'<br />'. 
     1356     form::combo('translater_start_page', 
     1357          array_flip($combo_start_page),$translater->start_page).'</label></p> 
     1358     <p><label class="classic">'. 
     1359     form::checkbox('translater_plugin_menu','1',$translater->plugin_menu).'  
     1360     '.__('Enable menu on extensions page').'</label></p> 
     1361     <p><label class="classic">'. 
     1362     form::checkbox('translater_theme_menu','1',$translater->theme_menu).'  
     1363     '.__('Enable menu on themes page').'</label></p> 
     1364     </div> 
     1365 
     1366     <div class="clear"> 
     1367     <p><input type="submit" name="save" value="'.__('save').'" />'. 
     1368     $core->formNonce(). 
     1369     form::hidden(array('p'),'translater'). 
     1370     form::hidden(array('part'),'setting'). 
     1371     form::hidden(array('action'),'save_setting').' 
     1372     </p></div> 
     1373     </form>'; 
     1374 
     1375     break; 
    1441376} 
    145 define('DC_CONTEXT_TRANSLATER',$default_part); 
    146 include dirname(__FILE__).'/inc/index.'.$default_part.'.php'; 
     1377 
     1378dcPage::helpBlock('translater'); 
     1379 
     1380echo  
     1381'<hr class="clear"/><p class="right">'. 
     1382'<a class="button" href="'.$p_url.'&amp;part=setting">'.__('Settings').'</a> - '. 
     1383'translater - '.$core->plugins->moduleInfo('translater','version').'&nbsp; 
     1384<img alt="'.__('Translater').'" src="index.php?pf=translater/icon.png" /></p> 
     1385</body></html>'; 
    1471386?> 
  • plugins/translater/js/jquery.translater.js

    r2399 r3127  
    11/* -- BEGIN LICENSE BLOCK ---------------------------------- 
     2 * 
    23 * This file is part of translater, a plugin for Dotclear 2. 
    34 *  
    4  * Copyright (c) 2009-2010 JC Denis and contributors 
    5  * jcdenis@gdwd.com 
     5 * Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     6 * contact@jcdenis.fr 
    67 *  
    78 * Licensed under the GPL version 2.0 license. 
    89 * A copy of this license is available in LICENSE file or at 
    910 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     11 * 
    1012 * -- END LICENSE BLOCK ------------------------------------*/ 
    1113 
  • plugins/translater/locales/fr/help/help.html

    r1537 r3127  
    168168  <li><a href="http://forum.dotclear.net/viewtopic.php?id=39220">Sujet sur le forum Dotclear</a></li> 
    169169  <li><a href="http://lab.dotclear.org/wiki/plugin/translater">Page dédiée du lab Dotclear</a></li> 
    170   <li><a href="http://dotclear.jcdenis.com/post/2009/07/02/translater">Billet dédié sur le blog de l'auteur</a></li> 
     170  <li><a href="http://jcd.lv/?q=translater">Blog de l'auteur</a></li> 
    171171</ul> 
    172172 
  • plugins/translater/locales/fr/main.lang.php

    r2614 r3127  
    11<?php 
    22// Language: Français  
    3 // Module: translater - 1.2 
    4 // Date: 2010-09-01 12:34:55  
    5 // Translated with dcTranslater - 1.2  
    6  
    7 #_admin.php:16 
     3// Module: translater - 2013.05.11 
     4// Date: 2013-05-12 23:35:00  
     5// Translated with dcTranslater - 2013.05.11  
     6 
     7#_admin.php:26 
     8#index.php:537 
     9#index.php:570 
     10#index.php:1384 
     11$GLOBALS['__l10n']['Translater'] = 'Traducteur'; 
     12 
     13#_admin.php:44 
     14$GLOBALS['__l10n']['Translate extensions'] = 'Traduire les extensions'; 
     15 
     16#_admin.php:48 
     17#index.php:670 
     18$GLOBALS['__l10n']['Name'] = 'Nom'; 
     19 
     20#_admin.php:62 
     21$GLOBALS['__l10n']['Translate this plugin'] = 'Traduire cette extension'; 
     22 
     23#_admin.php:85 
     24$GLOBALS['__l10n']['Translate this theme'] = 'Traduire ce thème'; 
     25 
     26#inc/class.dc.translater.php:434 
     27$GLOBALS['__l10n']['Cannot find backups folder for module %s'] = 'Impossible de trouver le dossier de sauvegarde du module %s'; 
     28 
     29#inc/class.dc.translater.php:450 
     30$GLOBALS['__l10n']['Cannot find languages folder for module %s'] = 'Impossible de trouver le dossier de langue du module %s'; 
     31 
     32#inc/class.dc.translater.php:470 
     33$GLOBALS['__l10n']['Cannot find root folder for module %s'] = 'Impossible de trouver le dossier racine du module %s'; 
     34 
     35#inc/class.dc.translater.php:499 
     36$GLOBALS['__l10n']['Limit of %s backups for module %s exceed'] = 'La limite de %s sauvegardes pour le module % est dépassée'; 
     37 
     38#inc/class.dc.translater.php:561 
     39#inc/class.dc.translater.php:951 
     40#inc/class.dc.translater.php:1028 
     41$GLOBALS['__l10n']['Cannot find language folder %s for module %s'] = 'Impossible de trouver le dossier de langue %s pour le module %s'; 
     42 
     43#inc/class.dc.translater.php:616 
     44$GLOBALS['__l10n']['Cannot delete backup file %s'] = 'Impossible d\'effacer le fichier de sauvegarde %s'; 
     45 
     46#inc/class.dc.translater.php:634 
     47$GLOBALS['__l10n']['Cannot find backup file %s'] = 'Impossible de trouver le fichier de sauvegarde %s'; 
     48 
     49#inc/class.dc.translater.php:660 
     50$GLOBALS['__l10n']['Wrong export query'] = 'Mauvaise requète d\'exportation'; 
     51 
     52#inc/class.dc.translater.php:671 
     53$GLOBALS['__l10n']['Cannot use export mask %s'] = 'Impossible d\'utiliser le masque d\'exportation %s'; 
     54 
     55#inc/class.dc.translater.php:759 
     56$GLOBALS['__l10n']['Wrong import query'] = 'Mauvaise requète d\'importation'; 
     57 
     58#inc/class.dc.translater.php:808 
     59$GLOBALS['__l10n']['Nothing to import for these modules in pack %s'] = 'Rien à importer pour ces modules dans le paquetage %s'; 
     60 
     61#inc/class.dc.translater.php:837 
     62$GLOBALS['__l10n']['Zip file %s is not in translater format'] = 'Le fichier zip n\'est pas au format de translater'; 
     63 
     64#inc/class.dc.translater.php:897 
     65$GLOBALS['__l10n']['Language %s already exists for module %s'] = 'La langue %s existe dèjà pour le module %s'; 
     66 
     67#inc/class.dc.translater.php:908 
     68$GLOBALS['__l10n']['Cannot copy file from language %s for module %s'] = 'Impossible de copier le fichier depuis le langage %s pour le module %s'; 
     69 
     70#inc/class.dc.translater.php:1000 
     71$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'; 
     72 
     73#inc/class.dc.translater.php:1264 
     74$GLOBALS['__l10n']['Cannot grant write acces on lang file %s'] = 'Impossible d\'avoir les droits en écriture sur le fichier de langue %s'; 
     75 
     76#inc/class.dc.translater.php:1275 
     77$GLOBALS['__l10n']['Cannot write lang file %s'] = 'Impossible d\'écrire le fichier de langue %s'; 
     78 
     79#inc/class.dc.translater.php:1579 
     80$GLOBALS['__l10n']['Cannot find language for code %s'] = 'Impossible de trouver de langue pour le code %s'; 
     81 
     82#inc/class.translater.rest.php:42 
     83$GLOBALS['__l10n']['Missing params'] = 'Paramètres manquants'; 
     84 
     85#inc/class.translater.rest.php:51 
     86$GLOBALS['__l10n']['Failed to get translation tool'] = 'Impossible de trouver l\'outil de traduction'; 
     87 
     88#inc/class.translater.rest.php:55 
     89$GLOBALS['__l10n']['Translation tool is not configured'] = 'L\'outil de traduction n\'est pas configuré'; 
     90 
     91#inc/lib.translater.google.php:44 
     92$GLOBALS['__l10n']['You must have on Google API console:'] = 'Vous devez avoir sur la console des API Google :'; 
     93 
     94#inc/lib.translater.google.php:80 
     95$GLOBALS['__l10n']['Failed to query service.'] = 'Impossible d\'interoger le service.'; 
     96 
     97#inc/lib.translater.microsoft.php:49 
     98$GLOBALS['__l10n']['You must have:'] = 'Vous devez avoir :'; 
     99 
     100#index.php:26 
     101#index.php:526 
     102#index.php:1382 
     103$GLOBALS['__l10n']['Settings'] = 'Paramètres'; 
     104 
     105#index.php:42 
     106$GLOBALS['__l10n']['locales folders of each module'] = 'le répertoire locales de chaque module'; 
     107 
     108#index.php:43 
     109$GLOBALS['__l10n']['plugins folder root'] = 'le répertoire racine des extensions'; 
     110 
     111#index.php:44 
     112$GLOBALS['__l10n']['public folder root'] = 'le répertoire public du blog'; 
     113 
     114#index.php:45 
     115$GLOBALS['__l10n']['cache folder of Dotclear'] = 'le répertoire cache de Dotclear'; 
     116 
     117#index.php:46 
     118$GLOBALS['__l10n']['locales folder of translater'] = 'le répertoire locales de l\'extension translater'; 
     119 
     120#index.php:51 
     121$GLOBALS['__l10n']['Translation successfully updated'] = 'Traduction mise à jour avec succès'; 
     122 
     123#index.php:52 
     124$GLOBALS['__l10n']['Translation successfully created'] = 'Traduction crée avec succès'; 
     125 
     126#index.php:53 
     127$GLOBALS['__l10n']['Translation successfully deleted'] = 'Traduction effacée avec succès'; 
     128 
     129#index.php:54 
     130$GLOBALS['__l10n']['Backups successfully create'] = 'Sauvegardes crées avec succès'; 
     131 
     132#index.php:55 
     133$GLOBALS['__l10n']['Backups successfully restored'] = 'Sauvegardes effectuées avec succès'; 
     134 
     135#index.php:56 
     136$GLOBALS['__l10n']['Backups successfully deleted'] = 'Sauvegardes effacées avec succès'; 
     137 
     138#index.php:57 
     139$GLOBALS['__l10n']['Package successfully imported'] = 'Paquetage importé avec succès'; 
     140 
     141#index.php:58 
     142$GLOBALS['__l10n']['Package successfully exported'] = 'Paquetage exporté avec succès'; 
     143 
     144#index.php:62 
     145$GLOBALS['__l10n']['Failed to update settings: %s'] = 'Impossible de mettre à jour les paramètres : %s'; 
     146 
     147#index.php:63 
     148$GLOBALS['__l10n']['Failed to update translation: %s'] = 'Impossible de mettre à jour la traduction : %s'; 
     149 
     150#index.php:64 
     151$GLOBALS['__l10n']['Failed to create translation: %s'] = 'Impossible de créer la traduction : %s'; 
     152 
     153#index.php:65 
     154$GLOBALS['__l10n']['Failed to delete translation: %s'] = 'Impossible d\'effacer la traduction : %s'; 
     155 
     156#index.php:66 
     157$GLOBALS['__l10n']['Failed to create backups: %s'] = 'Impossible de créer les sauvegardes : %s'; 
     158 
     159#index.php:67 
     160$GLOBALS['__l10n']['Failed to restore backups: %s'] = 'Impossible de restaurer les sauvegardes : %s'; 
     161 
     162#index.php:68 
     163$GLOBALS['__l10n']['Failed to delete backups: %s'] = 'Impossible d\'effacer les sauvegardes : %s'; 
     164 
     165#index.php:69 
     166$GLOBALS['__l10n']['Failed to import package: %s'] = 'Impossible d\'importer le paquetage : %s'; 
     167 
     168#index.php:70 
     169$GLOBALS['__l10n']['Failed to export package: %s'] = 'Impossible d\'exporter le paquetage : %s'; 
     170 
     171#index.php:112 
     172$GLOBALS['__l10n']['No lang to create'] = 'Pas de langue à créer'; 
     173 
     174#index.php:134 
     175$GLOBALS['__l10n']['No lang to delete'] = 'Pas de langue à effacer'; 
     176 
     177#index.php:156 
     178$GLOBALS['__l10n']['No lang to backup'] = 'Pas de langue à sauvegarder'; 
     179 
     180#index.php:189 
     181$GLOBALS['__l10n']['No blackup to restore'] = 'Pas de langue à restaurer'; 
     182 
     183#index.php:208 
     184$GLOBALS['__l10n']['No bakcup to to restore'] = 'Pas de sauvegarde à restaurer'; 
     185 
     186#index.php:229 
     187#index.php:247 
     188$GLOBALS['__l10n']['No backup to delete'] = 'Pas de sauvegarde à effacer'; 
     189 
     190#index.php:290 
     191#index.php:364 
     192$GLOBALS['__l10n']['Nothing to export'] = 'Rien à exporter'; 
     193 
     194#index.php:312 
     195$GLOBALS['__l10n']['No language to update'] = 'Pas de langue à mettre à jour'; 
     196 
     197#index.php:443 
     198#index.php:490 
     199$GLOBALS['__l10n']['Failed to launch translater: %s'] = 'Impossible de démarrer translater : %s'; 
     200 
     201#index.php:556 
     202$GLOBALS['__l10n']['Use this %s translation:'] = 'Utiliser la traduction de %s :'; 
     203 
     204#index.php:557 
     205$GLOBALS['__l10n']['Translate this text with %s'] = 'Traduire ce texte avec %s'; 
     206 
     207#index.php:558 
     208$GLOBALS['__l10n']['Use this text'] = 'Utiliser ce texte'; 
     209 
     210#index.php:606 
     211$GLOBALS['__l10n']['Translate theme "%s" (by %s)'] = 'Traduire le thème "%s" (de %s)'; 
     212 
     213#index.php:607 
     214$GLOBALS['__l10n']['Translate plugin "%s" (by %s)'] = 'Traduire l\'extension "%s" (de %s)'; 
     215 
     216#index.php:627 
     217#index.php:741 
     218$GLOBALS['__l10n']['Edit translation'] = 'Modifier la traduction'; 
     219 
     220#index.php:639 
     221$GLOBALS['__l10n']['Id'] = 'Id'; 
     222 
     223#index.php:649 
     224$GLOBALS['__l10n']['There is no editable modules'] = 'Il n\'y a pas de modules modifiables.'; 
     225 
     226#index.php:665 
     227$GLOBALS['__l10n']['Summary'] = 'Résumé'; 
     228 
     229#index.php:666 
     230$GLOBALS['__l10n']['Module'] = 'Module'; 
     231 
     232#index.php:668 
     233$GLOBALS['__l10n']['About'] = 'À propos'; 
     234 
     235#index.php:678 
     236$GLOBALS['__l10n']['Root'] = 'Racine'; 
     237 
     238#index.php:680 
     239#index.php:694 
     240#index.php:811 
     241#index.php:1342 
     242$GLOBALS['__l10n']['Backups'] = 'Sauvegardes'; 
     243 
     244#index.php:695 
     245$GLOBALS['__l10n']['Last backup'] = 'Dernière sauvegarde'; 
     246 
     247#index.php:722 
     248$GLOBALS['__l10n']['no backup'] = 'Aucune sauvegarde'; 
     249 
     250#index.php:731 
     251$GLOBALS['__l10n']['Translations'] = 'Traductions'; 
     252 
     253#index.php:737 
     254$GLOBALS['__l10n']['Edit language'] = 'Modifier une langue'; 
     255 
     256#index.php:757 
     257$GLOBALS['__l10n']['Add language'] = 'Ajouter une langue'; 
     258 
     259#index.php:764 
     260$GLOBALS['__l10n']['Copy from language:'] = 'Copier depuis la langue :'; 
     261 
     262#index.php:766 
     263$GLOBALS['__l10n']['Optionnal'] = 'Optionnel'; 
     264 
     265#index.php:773 
     266$GLOBALS['__l10n']['Add translation'] = 'Ajouter la traduction'; 
     267 
     268#index.php:790 
     269$GLOBALS['__l10n']['Delete language'] = 'Effacer une langue'; 
     270 
     271#index.php:794 
     272$GLOBALS['__l10n']['Delete translation'] = 'Effacer la traduction'; 
     273 
     274#index.php:816 
     275$GLOBALS['__l10n']['Create backups'] = 'Créer une sauvegarde'; 
     276 
     277#index.php:818 
     278$GLOBALS['__l10n']['Choose languages to backup'] = 'Choisir la langue à sauvegarder'; 
     279 
     280#index.php:839 
     281$GLOBALS['__l10n']['Backup'] = 'Sauvegarde'; 
     282 
     283#index.php:856 
     284$GLOBALS['__l10n']['List of backups'] = 'Liste des sauvegardes'; 
     285 
     286#index.php:860 
     287#index.php:1066 
     288$GLOBALS['__l10n']['File'] = 'Fichier'; 
     289 
     290#index.php:863 
     291$GLOBALS['__l10n']['Size'] = 'Taille'; 
     292 
     293#index.php:887 
     294$GLOBALS['__l10n']['Selected backups action:'] = 'Action sur les sauvegardes sélectionnées :'; 
     295 
     296#index.php:889 
     297$GLOBALS['__l10n']['Restore backups'] = 'Restaurer les sauvegardes'; 
     298 
     299#index.php:890 
     300$GLOBALS['__l10n']['Delete backups'] = 'Effacer les sauvegardes'; 
     301 
     302#index.php:916 
     303#index.php:1183 
     304$GLOBALS['__l10n']['Choose language package to import'] = 'Choisir le paquetage de langue à importer'; 
     305 
     306#index.php:938 
     307#index.php:1240 
     308$GLOBALS['__l10n']['Choose languages to export'] = 'Choisir les langues à exporter'; 
     309 
     310#index.php:1059 
     311$GLOBALS['__l10n']['Group'] = 'Groupe'; 
     312 
     313#index.php:1061 
     314$GLOBALS['__l10n']['String'] = 'Chaîne'; 
     315 
     316#index.php:1063 
     317#index.php:1284 
     318$GLOBALS['__l10n']['Translation'] = 'Traduction'; 
     319 
     320#index.php:1064 
     321$GLOBALS['__l10n']['Existing'] = 'Existant'; 
     322 
     323#index.php:1127 
     324$GLOBALS['__l10n']['%s occurrences'] = '%s occurrences'; 
     325 
     326#index.php:1153 
     327$GLOBALS['__l10n']['Total of %s strings.'] = 'Total de %s chaînes.'; 
     328 
     329#index.php:1155 
     330$GLOBALS['__l10n']['Change the group of the selected entries to:'] = 'Changer le groupe des entrées sélectionnées vers :'; 
     331 
     332#index.php:1212 
     333$GLOBALS['__l10n']['Choose modules to export'] = 'Choisir les modules à exporter'; 
     334 
     335#index.php:1214 
     336$GLOBALS['__l10n']['Modules'] = 'Modules'; 
     337 
     338#index.php:1287 
     339$GLOBALS['__l10n']['Write .po files'] = 'Écrire les fichier .po'; 
     340 
     341#index.php:1290 
     342$GLOBALS['__l10n']['Write .lang.php files'] = 'Écrire les fichier .lang.php'; 
     343 
     344#index.php:1293 
     345$GLOBALS['__l10n']['Translate also strings of template files'] = 'Traduire également les chaînes des fichiers de template'; 
     346 
     347#index.php:1296 
     348$GLOBALS['__l10n']['Translate only unknow strings'] = 'Traduire uniquement les chaînes inconnues'; 
     349 
     350#index.php:1299 
     351$GLOBALS['__l10n']['Hide default modules of Dotclear'] = 'Cacher les modules d\'origine de Dotclear'; 
     352 
     353#index.php:1302 
     354$GLOBALS['__l10n']['Write comments in files'] = 'Écrire les commentaires dans les fichiers'; 
     355 
     356#index.php:1305 
     357$GLOBALS['__l10n']['Write informations about author in files'] = 'Écrire les informations à propos de l\'auteur dans les fichiers'; 
     358 
     359#index.php:1309 
     360$GLOBALS['__l10n']['Tools'] = 'Outils'; 
     361 
     362#index.php:1310 
     363$GLOBALS['__l10n']['Default language of l10n source:'] = 'Langue par défaut des sources l10n :'; 
     364 
     365#index.php:1314 
     366$GLOBALS['__l10n']['Select and configure the tool to use to translate strings:'] = 'Sélectionner et configurer un outil de traduction :'; 
     367 
     368#index.php:1326 
     369$GLOBALS['__l10n']['Nothing to configure for %s tool.'] = 'Rien à configurer pour l\'outil %s.'; 
     370 
     371#index.php:1337 
     372$GLOBALS['__l10n']['Overwrite existing languages'] = 'Écraser les langages existants'; 
     373 
     374#index.php:1338 
     375$GLOBALS['__l10n']['Name of exported package'] = 'Nom du paquetage exporté'; 
     376 
     377#index.php:1345 
     378$GLOBALS['__l10n']['Make backups when changes are made'] = 'Faire des sauvegardes lors des modifications'; 
     379 
     380#index.php:1346 
     381$GLOBALS['__l10n']['Limit backups to %s files per module'] = 'Limiter les sauvegardes à %s fichiers par module'; 
     382 
     383#index.php:1349 
     384$GLOBALS['__l10n']['Store backups in %s'] = 'Stocker les sauvegardes dans %s'; 
     385 
     386#index.php:1354 
     387$GLOBALS['__l10n']['Behaviors'] = 'Comportements'; 
     388 
     389#index.php:1355 
     390$GLOBALS['__l10n']['Default start menu:'] = 'Menu de départ par défaut :'; 
     391 
     392#index.php:1360 
     393$GLOBALS['__l10n']['Enable menu on extensions page'] = 'Activer le menu sur la page des extensions'; 
     394 
     395#index.php:1363 
     396$GLOBALS['__l10n']['Enable menu on themes page'] = 'Activer le menu sur la page des thèmes'; 
     397 
    8398$GLOBALS['__l10n']['translater'] = 'Traducteur'; 
    9399 
    10 #_admin.php:17 
    11400$GLOBALS['__l10n']['Translate your Dotclear plugins and themes'] = 'Traduire vos extensions et thèmes pour Dotclear'; 
    12401 
    13 #_admin.php:20 
    14 $GLOBALS['__l10n']['manage translations'] = 'Gérer les traductions'; 
    15  
    16 #_admin.php:24 
    17 #inc/index.lang.php:72 
    18 #inc/index.module.php:217 
    19 #inc/index.modules.php:19 
    20 #inc/index.pack.php:56 
    21 #inc/index.setting.php:50 
    22 #index.php:79 
    23 #index.php:89 
    24 $GLOBALS['__l10n']['Translater'] = 'Traducteur'; 
    25  
    26 #_admin.php:50 
    27 $GLOBALS['__l10n']['Translate extensions'] = 'Traduire les extensions'; 
    28  
    29 #_admin.php:54 
    30 #inc/index.module.php:240 
    31 $GLOBALS['__l10n']['Name'] = 'Nom'; 
    32  
    33 #_admin.php:68 
    34 $GLOBALS['__l10n']['Translate this plugin'] = 'Traduire cette extension'; 
    35  
    36 #_admin.php:86 
    37 $GLOBALS['__l10n']['Translate this theme'] = 'Traduire ce thème'; 
    38  
    39 #inc/class.dc.translater.php:331 
    40 $GLOBALS['__l10n']['Cannot work with module of type %s'] = 'Impossible de travailler avec un module de type %s'; 
    41  
    42 #inc/class.dc.translater.php:339 
    43 $GLOBALS['__l10n']['Cannot find module %s of type %s'] = 'Impossible de trouver le module %s de type %s'; 
    44  
    45 #inc/class.dc.translater.php:419 
    46 $GLOBALS['__l10n']['Cannot find backups folder for module %s'] = 'Impossible de trouver le dossier de sauvegarde du module %s'; 
    47  
    48 #inc/class.dc.translater.php:435 
    49 $GLOBALS['__l10n']['Cannot find languages folder for module %s'] = 'Impossible de trouver le dossier de langue du module %s'; 
    50  
    51 #inc/class.dc.translater.php:455 
    52 $GLOBALS['__l10n']['Cannot find root folder for module %s'] = 'Impossible de trouver le dossier racine du module %s'; 
    53  
    54 #inc/class.dc.translater.php:484 
    55 $GLOBALS['__l10n']['Limit of %s backups for module %s exceed'] = 'La limite de %s sauvegardes pour le module % est dépassée'; 
    56  
    57 #inc/class.dc.translater.php:546 
    58 #inc/class.dc.translater.php:936 
    59 #inc/class.dc.translater.php:1013 
    60 $GLOBALS['__l10n']['Cannot find language folder %s for module %s'] = 'Impossible de trouver le dossier de langue %s pour le module %s'; 
    61  
    62 #inc/class.dc.translater.php:601 
    63 $GLOBALS['__l10n']['Cannot delete backup file %s'] = 'Impossible d\'effacer le fichier de sauvegarde %s'; 
    64  
    65 #inc/class.dc.translater.php:619 
    66 $GLOBALS['__l10n']['Cannot find backup file %s'] = 'Impossible de trouver le fichier de sauvegarde %s'; 
    67  
    68 #inc/class.dc.translater.php:645 
    69 $GLOBALS['__l10n']['Wrong export query'] = 'Mauvaise requète d\'exportation'; 
    70  
    71 #inc/class.dc.translater.php:656 
    72 $GLOBALS['__l10n']['Cannot use export mask %s'] = 'Impossible d\'utiliser le masque d\'exportation %s'; 
    73  
    74 #inc/class.dc.translater.php:744 
    75 $GLOBALS['__l10n']['Wrong import query'] = 'Mauvaise requète d\'importation'; 
    76  
    77 #inc/class.dc.translater.php:793 
    78 $GLOBALS['__l10n']['Nothing to import for these modules in pack %s'] = 'Rien à importer pour ces modules dans le paquetage %s'; 
    79  
    80 #inc/class.dc.translater.php:822 
    81 $GLOBALS['__l10n']['Zip file %s is not in translater format'] = 'Le fichier zip n\'est pas au format de translater'; 
    82  
    83 #inc/class.dc.translater.php:882 
    84 $GLOBALS['__l10n']['Language %s already exists for module %s'] = 'La langue %s existe dèjà pour le module %s'; 
    85  
    86 #inc/class.dc.translater.php:893 
    87 $GLOBALS['__l10n']['Cannot copy file from language %s for module %s'] = 'Impossible de copier le fichier depuis le langage %s pour le module %s'; 
    88  
    89 #inc/class.dc.translater.php:985 
    90 $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'; 
    91  
    92 #inc/class.dc.translater.php:1249 
    93 $GLOBALS['__l10n']['Cannot grant write acces on lang file %s'] = 'Impossible d\'avoir les droits en écriture sur le fichier de langue %s'; 
    94  
    95 #inc/class.dc.translater.php:1260 
    96 $GLOBALS['__l10n']['Cannot write lang file %s'] = 'Impossible d\'écrire le fichier de langue %s'; 
    97  
    98 #inc/class.dc.translater.php:1569 
    99 $GLOBALS['__l10n']['Cannot find language for code %s'] = 'Impossible de trouver de langue pour le code %s'; 
    100  
    101 #inc/class.translater.rest.php:35 
    102 $GLOBALS['__l10n']['Missing params'] = 'Paramètres manquants'; 
    103  
    104 #inc/class.translater.rest.php:42 
    105 $GLOBALS['__l10n']['Failed to init translation tool'] = 'Impossible d\'initialiser l\'outil de traduction'; 
    106  
    107 #inc/index.lang.php:22 
    108 $GLOBALS['__l10n']['No language to update'] = 'Pas de langue à mettre à jour'; 
    109  
    110 #inc/index.lang.php:59 
    111 #inc/index.module.php:195 
    112 $GLOBALS['__l10n']['Failed to launch translater: %s'] = 'Impossible de démarrer translater : %s'; 
    113  
    114 #inc/index.lang.php:162 
    115 $GLOBALS['__l10n']['Group'] = 'Groupe'; 
    116  
    117 #inc/index.lang.php:164 
    118 $GLOBALS['__l10n']['String'] = 'Chaîne'; 
    119  
    120 #inc/index.lang.php:166 
    121 #inc/index.setting.php:64 
    122 $GLOBALS['__l10n']['Translation'] = 'Traduction'; 
    123  
    124 #inc/index.lang.php:167 
    125 $GLOBALS['__l10n']['Existing'] = 'Existant'; 
    126  
    127 #inc/index.lang.php:169 
    128 #inc/index.module.php:431 
    129 $GLOBALS['__l10n']['File'] = 'Fichier'; 
    130  
    131 #inc/index.lang.php:229 
    132 $GLOBALS['__l10n']['%s occurrences'] = '%s occurrences'; 
    133  
    134 #inc/index.lang.php:256 
    135 $GLOBALS['__l10n']['Total of %s strings.'] = 'Total de %s chaînes.'; 
    136  
    137 #inc/index.lang.php:258 
    138 $GLOBALS['__l10n']['Change the group of the selected entries to:'] = 'Changer le groupe des entrées sélectionnées vers :'; 
    139  
    140 #inc/index.module.php:22 
    141 $GLOBALS['__l10n']['No lang to create'] = 'Pas de langue à créer'; 
    142  
    143 #inc/index.module.php:40 
    144 $GLOBALS['__l10n']['No lang to delete'] = 'Pas de langue à effacer'; 
    145  
    146 #inc/index.module.php:58 
    147 $GLOBALS['__l10n']['No lang to backup'] = 'Pas de langue à sauvegarder'; 
    148  
    149 #inc/index.module.php:87 
    150 $GLOBALS['__l10n']['No blackup to restore'] = 'Pas de langue à restaurer'; 
    151  
    152 #inc/index.module.php:106 
    153 $GLOBALS['__l10n']['No bakcup to to restore'] = 'Pas de sauvegarde à restaurer'; 
    154  
    155 #inc/index.module.php:123 
    156 #inc/index.module.php:141 
    157 $GLOBALS['__l10n']['No backup to delete'] = 'Pas de sauvegarde à effacer'; 
    158  
    159 #inc/index.module.php:176 
    160 #inc/index.pack.php:42 
    161 $GLOBALS['__l10n']['Nothing to export'] = 'Rien à exporter'; 
    162  
    163 #inc/index.module.php:217 
    164 #inc/index.module.php:236 
    165 $GLOBALS['__l10n']['Module'] = 'Module'; 
    166  
    167 #inc/index.module.php:235 
    168 $GLOBALS['__l10n']['Summary'] = 'Résumé'; 
    169  
    170 #inc/index.module.php:238 
    171 $GLOBALS['__l10n']['About'] = 'À propos'; 
    172  
    173 #inc/index.module.php:248 
    174 $GLOBALS['__l10n']['Root'] = 'Racine'; 
    175  
    176 #inc/index.module.php:250 
    177 #inc/index.module.php:264 
    178 #inc/index.module.php:382 
    179 #inc/index.setting.php:106 
    180 $GLOBALS['__l10n']['Backups'] = 'Sauvegardes'; 
    181  
    182 #inc/index.module.php:265 
    183 $GLOBALS['__l10n']['Last backup'] = 'Dernière sauvegarde'; 
    184  
    185 #inc/index.module.php:292 
    186 $GLOBALS['__l10n']['no backup'] = 'Aucune sauvegarde'; 
    187  
    188 #inc/index.module.php:301 
    189 $GLOBALS['__l10n']['Translations'] = 'Traductions'; 
    190  
    191 #inc/index.module.php:308 
    192 $GLOBALS['__l10n']['Edit language'] = 'Modifier une langue'; 
    193  
    194 #inc/index.module.php:310 
    195 #inc/index.module.php:330 
    196 #inc/index.module.php:363 
    197 $GLOBALS['__l10n']['Select language:'] = 'Sélectionner une langue :'; 
    198  
    199 #inc/index.module.php:312 
    200 #inc/index.modules.php:68 
    201 $GLOBALS['__l10n']['Edit translation'] = 'Modifier la traduction'; 
    202  
    203 #inc/index.module.php:328 
    204 $GLOBALS['__l10n']['Add language'] = 'Ajouter une langue'; 
    205  
    206 #inc/index.module.php:335 
    207 $GLOBALS['__l10n']['Copy from language:'] = 'Copier depuis la langue :'; 
    208  
    209 #inc/index.module.php:337 
    210 $GLOBALS['__l10n']['Optionnal'] = 'Optionnel'; 
    211  
    212 #inc/index.module.php:344 
    213 $GLOBALS['__l10n']['Add translation'] = 'Ajouter la traduction'; 
    214  
    215 #inc/index.module.php:361 
    216 $GLOBALS['__l10n']['Delete language'] = 'Effacer une langue'; 
    217  
    218 #inc/index.module.php:365 
    219 $GLOBALS['__l10n']['Delete translation'] = 'Effacer la traduction'; 
    220  
    221 #inc/index.module.php:387 
    222 $GLOBALS['__l10n']['Create backups'] = 'Créer une sauvegarde'; 
    223  
    224 #inc/index.module.php:389 
    225 $GLOBALS['__l10n']['Choose languages to backup'] = 'Choisir la langue à sauvegarder'; 
    226  
    227 #inc/index.module.php:410 
    228 $GLOBALS['__l10n']['Backup'] = 'Sauvegarde'; 
    229  
    230 #inc/index.module.php:427 
    231 $GLOBALS['__l10n']['List of backups'] = 'Liste des sauvegardes'; 
    232  
    233 #inc/index.module.php:434 
    234 $GLOBALS['__l10n']['Size'] = 'Taille'; 
    235  
    236 #inc/index.module.php:458 
    237 $GLOBALS['__l10n']['Selected backups action:'] = 'Action sur les sauvegardes sélectionnées :'; 
    238  
    239 #inc/index.module.php:460 
    240 $GLOBALS['__l10n']['Restore backups'] = 'Restaurer les sauvegardes'; 
    241  
    242 #inc/index.module.php:461 
    243 $GLOBALS['__l10n']['Delete backups'] = 'Effacer les sauvegardes'; 
    244  
    245 #inc/index.module.php:487 
    246 #inc/index.pack.php:73 
    247 $GLOBALS['__l10n']['Choose language package to import'] = 'Choisir le paquetage de langue à importer'; 
    248  
    249 #inc/index.module.php:509 
    250 #inc/index.pack.php:130 
    251 $GLOBALS['__l10n']['Choose languages to export'] = 'Choisir les langues à exporter'; 
    252  
    253 #inc/index.modules.php:19 
    254 $GLOBALS['__l10n']['Extensions'] = 'Extensions'; 
    255  
    256 #inc/index.modules.php:47 
    257 $GLOBALS['__l10n']['Translate theme "%s" (by %s)'] = 'Traduire le thème "%s" (de %s)'; 
    258  
    259 #inc/index.modules.php:48 
    260 $GLOBALS['__l10n']['Translate plugin "%s" (by %s)'] = 'Traduire l\'extension "%s" (de %s)'; 
    261  
    262 #inc/index.modules.php:80 
    263 $GLOBALS['__l10n']['Id'] = 'Id'; 
    264  
    265 #inc/index.modules.php:90 
    266 $GLOBALS['__l10n']['There is no editable modules'] = 'Il n\'y a pas de modules modifiables.'; 
    267  
    268 #inc/index.pack.php:102 
    269 $GLOBALS['__l10n']['Choose modules to export'] = 'Choisir les modules à exporter'; 
    270  
    271 #inc/index.pack.php:104 
    272 $GLOBALS['__l10n']['Modules'] = 'Modules'; 
    273  
    274 #inc/index.setting.php:25 
    275 $GLOBALS['__l10n']['No setting update'] = 'Pas de paramètre à mettre à jour'; 
    276  
    277 #inc/index.setting.php:50 
    278 #inc/index.setting.php:57 
    279 #inc/index.setting.php:121 
    280 #index.php:85 
    281 $GLOBALS['__l10n']['Settings'] = 'Paramètres'; 
    282  
    283 #inc/index.setting.php:67 
    284 $GLOBALS['__l10n']['Write .po files'] = 'Écrire les fichier .po'; 
    285  
    286 #inc/index.setting.php:70 
    287 $GLOBALS['__l10n']['Write .lang.php files'] = 'Écrire les fichier .lang.php'; 
    288  
    289 #inc/index.setting.php:73 
    290 $GLOBALS['__l10n']['Translate also strings of template files'] = 'Traduire également les chaînes des fichiers de template'; 
    291  
    292 #inc/index.setting.php:76 
    293 $GLOBALS['__l10n']['Translate only unknow strings'] = 'Traduire uniquement les chaînes inconnues'; 
    294  
    295 #inc/index.setting.php:79 
    296 $GLOBALS['__l10n']['Hide default modules of Dotclear'] = 'Cacher les modules d\'origine de Dotclear'; 
    297  
    298 #inc/index.setting.php:82 
    299 $GLOBALS['__l10n']['Write comments in files'] = 'Écrire les commentaires dans les fichiers'; 
    300  
    301 #inc/index.setting.php:85 
    302 $GLOBALS['__l10n']['Write informations about author in files'] = 'Écrire les informations à propos de l\'auteur dans les fichiers'; 
    303  
    304 #inc/index.setting.php:89 
    305 $GLOBALS['__l10n']['Tools'] = 'Outils'; 
    306  
    307 #inc/index.setting.php:90 
    308 $GLOBALS['__l10n']['Use an help tool for translation:'] = 'Utiliser un outil d\'aide à la traduction :'; 
    309  
    310 #inc/index.setting.php:93 
    311 $GLOBALS['__l10n']['Default language of l10n source:'] = 'Langue par défaut des sources l10n :'; 
    312  
    313 #inc/index.setting.php:101 
    314 $GLOBALS['__l10n']['Overwrite existing languages'] = 'Écraser les langages existants'; 
    315  
    316 #inc/index.setting.php:102 
    317 $GLOBALS['__l10n']['Name of exported package'] = 'Nom du paquetage exporté'; 
    318  
    319 #inc/index.setting.php:109 
    320 $GLOBALS['__l10n']['Make backups when changes are made'] = 'Faire des sauvegardes lors des modifications'; 
    321  
    322 #inc/index.setting.php:110 
    323 $GLOBALS['__l10n']['Limit backups to %s files per module'] = 'Limiter les sauvegardes à %s fichiers par module'; 
    324  
    325 #inc/index.setting.php:113 
    326 $GLOBALS['__l10n']['Store backups in %s'] = 'Stocker les sauvegardes dans %s'; 
    327  
    328 #inc/index.setting.php:118 
    329 $GLOBALS['__l10n']['Behaviors'] = 'Comportements'; 
    330  
    331 #inc/index.setting.php:119 
    332 $GLOBALS['__l10n']['Default start menu:'] = 'Menu de départ par défaut :'; 
    333  
    334 #inc/index.setting.php:124 
    335 $GLOBALS['__l10n']['Enable menu on extensions page'] = 'Activer le menu sur la page des extensions'; 
    336  
    337 #inc/index.setting.php:127 
    338 $GLOBALS['__l10n']['Enable menu on themes page'] = 'Activer le menu sur la page des thèmes'; 
    339  
    340 #index.php:50 
    341 $GLOBALS['__l10n']['Please wait'] = 'Veulliez patienter'; 
    342  
    343 #index.php:68 
    344 $GLOBALS['__l10n']['Use this %s translation:'] = 'Utiliser la traduction de %s :'; 
    345  
    346 #index.php:69 
    347 $GLOBALS['__l10n']['Translate this text with %s'] = 'Traduire ce texte avec %s'; 
    348  
    349 #index.php:70 
    350 $GLOBALS['__l10n']['Use this text'] = 'Utiliser ce texte'; 
    351  
    352 #index.php:101 
    353 $GLOBALS['__l10n']['locales folders of each module'] = 'le répertoire locales de chaque module'; 
    354  
    355 #index.php:102 
    356 $GLOBALS['__l10n']['plugins folder root'] = 'le répertoire racine des extensions'; 
    357  
    358 #index.php:103 
    359 $GLOBALS['__l10n']['public folder root'] = 'le répertoire public du blog'; 
    360  
    361 #index.php:104 
    362 $GLOBALS['__l10n']['cache folder of Dotclear'] = 'le répertoire cache de Dotclear'; 
    363  
    364 #index.php:105 
    365 $GLOBALS['__l10n']['locales folder of translater'] = 'le répertoire locales de l\'extension translater'; 
    366  
    367 #index.php:111 
    368 $GLOBALS['__l10n']['Translation successfully updated'] = 'Traduction mise à jour avec succès'; 
    369  
    370 #index.php:112 
    371 $GLOBALS['__l10n']['Translation successfully created'] = 'Traduction crée avec succès'; 
    372  
    373 #index.php:113 
    374 $GLOBALS['__l10n']['Translation successfully deleted'] = 'Traduction effacée avec succès'; 
    375  
    376 #index.php:114 
    377 $GLOBALS['__l10n']['Backups successfully create'] = 'Sauvegardes crées avec succès'; 
    378  
    379 #index.php:115 
    380 $GLOBALS['__l10n']['Backups successfully restored'] = 'Sauvegardes effectuées avec succès'; 
    381  
    382 #index.php:116 
    383 $GLOBALS['__l10n']['Backups successfully deleted'] = 'Sauvegardes effacées avec succès'; 
    384  
    385 #index.php:117 
    386 $GLOBALS['__l10n']['Package successfully imported'] = 'Paquetage importé avec succès'; 
    387  
    388 #index.php:118 
    389 $GLOBALS['__l10n']['Package successfully exported'] = 'Paquetage exporté avec succès'; 
    390  
    391 #index.php:123 
    392 $GLOBALS['__l10n']['Failed to update settings: %s'] = 'Impossible de mettre à jour les paramètres : %s'; 
    393  
    394 #index.php:124 
    395 $GLOBALS['__l10n']['Failed to update translation: %s'] = 'Impossible de mettre à jour la traduction : %s'; 
    396  
    397 #index.php:125 
    398 $GLOBALS['__l10n']['Failed to create translation: %s'] = 'Impossible de créer la traduction : %s'; 
    399  
    400 #index.php:126 
    401 $GLOBALS['__l10n']['Failed to delete translation: %s'] = 'Impossible d\'effacer la traduction : %s'; 
    402  
    403 #index.php:127 
    404 $GLOBALS['__l10n']['Failed to create backups: %s'] = 'Impossible de créer les sauvegardes : %s'; 
    405  
    406 #index.php:128 
    407 $GLOBALS['__l10n']['Failed to restore backups: %s'] = 'Impossible de restaurer les sauvegardes : %s'; 
    408  
    409 #index.php:129 
    410 $GLOBALS['__l10n']['Failed to delete backups: %s'] = 'Impossible d\'effacer les sauvegardes : %s'; 
    411  
    412 #index.php:130 
    413 $GLOBALS['__l10n']['Failed to import package: %s'] = 'Impossible d\'importer le paquetage : %s'; 
    414  
    415 #index.php:131 
    416 $GLOBALS['__l10n']['Failed to export package: %s'] = 'Impossible d\'exporter le paquetage : %s'; 
    417  
    418 $GLOBALS['__l10n']['%s files'] = '%s fichiers'; 
    419  
    420402?> 
  • plugins/translater/locales/fr/main.po

    r2614 r3127  
    11# Language: Français 
    2 # Module: translater - 1.2 
    3 # Date: 2010-09-01 12:34:56 
    4 # Translated with translater 1.2 
     2# Module: translater - 2013.05.11 
     3# Date: 2013-05-12 23:35:00 
     4# Translated with translater 2013.05.11 
    55 
    66msgid "" 
    77msgstr "" 
    88"Content-Type: text/plain; charset=UTF-8\n" 
    9 "Project-Id-Version: translater 1.2\n" 
     9"Project-Id-Version: translater 2013.05.11\n" 
    1010"POT-Creation-Date: \n" 
    11 "PO-Revision-Date: 2010-09-01T12:34:56+00:00\n" 
    12 "Last-Translator: JC Denis\n" 
     11"PO-Revision-Date: 2013-05-12T23:35:00+00:00\n" 
     12"Last-Translator: Jean-Christian Denis\n" 
    1313"Language-Team: \n" 
    1414"MIME-Version: 1.0\n" 
    1515"Content-Transfer-Encoding: 8bit\n" 
    1616 
    17 #: _admin.php:16 
     17#: _admin.php:26 
     18#: index.php:537 
     19#: index.php:570 
     20#: index.php:1384 
     21msgid "Translater" 
     22msgstr "Traducteur" 
     23 
     24#: _admin.php:44 
     25msgid "Translate extensions" 
     26msgstr "Traduire les extensions" 
     27 
     28#: _admin.php:48 
     29#: index.php:670 
     30msgid "Name" 
     31msgstr "Nom" 
     32 
     33#: _admin.php:62 
     34msgid "Translate this plugin" 
     35msgstr "Traduire cette extension" 
     36 
     37#: _admin.php:85 
     38msgid "Translate this theme" 
     39msgstr "Traduire ce thème" 
     40 
     41#: inc/class.dc.translater.php:434 
     42msgid "Cannot find backups folder for module %s" 
     43msgstr "Impossible de trouver le dossier de sauvegarde du module %s" 
     44 
     45#: inc/class.dc.translater.php:450 
     46msgid "Cannot find languages folder for module %s" 
     47msgstr "Impossible de trouver le dossier de langue du module %s" 
     48 
     49#: inc/class.dc.translater.php:470 
     50msgid "Cannot find root folder for module %s" 
     51msgstr "Impossible de trouver le dossier racine du module %s" 
     52 
     53#: inc/class.dc.translater.php:499 
     54msgid "Limit of %s backups for module %s exceed" 
     55msgstr "La limite de %s sauvegardes pour le module % est dépassée" 
     56 
     57#: inc/class.dc.translater.php:561 
     58#: inc/class.dc.translater.php:951 
     59#: inc/class.dc.translater.php:1028 
     60msgid "Cannot find language folder %s for module %s" 
     61msgstr "Impossible de trouver le dossier de langue %s pour le module %s" 
     62 
     63#: inc/class.dc.translater.php:616 
     64msgid "Cannot delete backup file %s" 
     65msgstr "Impossible d'effacer le fichier de sauvegarde %s" 
     66 
     67#: inc/class.dc.translater.php:634 
     68msgid "Cannot find backup file %s" 
     69msgstr "Impossible de trouver le fichier de sauvegarde %s" 
     70 
     71#: inc/class.dc.translater.php:660 
     72msgid "Wrong export query" 
     73msgstr "Mauvaise requète d'exportation" 
     74 
     75#: inc/class.dc.translater.php:671 
     76msgid "Cannot use export mask %s" 
     77msgstr "Impossible d'utiliser le masque d'exportation %s" 
     78 
     79#: inc/class.dc.translater.php:759 
     80msgid "Wrong import query" 
     81msgstr "Mauvaise requète d'importation" 
     82 
     83#: inc/class.dc.translater.php:808 
     84msgid "Nothing to import for these modules in pack %s" 
     85msgstr "Rien à importer pour ces modules dans le paquetage %s" 
     86 
     87#: inc/class.dc.translater.php:837 
     88msgid "Zip file %s is not in translater format" 
     89msgstr "Le fichier zip n'est pas au format de translater" 
     90 
     91#: inc/class.dc.translater.php:897 
     92msgid "Language %s already exists for module %s" 
     93msgstr "La langue %s existe dèjà pour le module %s" 
     94 
     95#: inc/class.dc.translater.php:908 
     96msgid "Cannot copy file from language %s for module %s" 
     97msgstr "Impossible de copier le fichier depuis le langage %s pour le module %s" 
     98 
     99#: inc/class.dc.translater.php:1000 
     100msgid "No string to write, language %s deleted for module %s" 
     101msgstr "Aucune chaine à écrire, la langue %s a été effacée pour le module %s" 
     102 
     103#: inc/class.dc.translater.php:1264 
     104msgid "Cannot grant write acces on lang file %s" 
     105msgstr "Impossible d'avoir les droits en écriture sur le fichier de langue %s" 
     106 
     107#: inc/class.dc.translater.php:1275 
     108msgid "Cannot write lang file %s" 
     109msgstr "Impossible d'écrire le fichier de langue %s" 
     110 
     111#: inc/class.dc.translater.php:1579 
     112msgid "Cannot find language for code %s" 
     113msgstr "Impossible de trouver de langue pour le code %s" 
     114 
     115#: inc/class.translater.rest.php:42 
     116msgid "Missing params" 
     117msgstr "Paramètres manquants" 
     118 
     119#: inc/class.translater.rest.php:51 
     120msgid "Failed to get translation tool" 
     121msgstr "Impossible de trouver l'outil de traduction" 
     122 
     123#: inc/class.translater.rest.php:55 
     124msgid "Translation tool is not configured" 
     125msgstr "L'outil de traduction n'est pas configuré" 
     126 
     127#: inc/lib.translater.google.php:44 
     128msgid "You must have on Google API console:" 
     129msgstr "Vous devez avoir sur la console des API Google :" 
     130 
     131#: inc/lib.translater.google.php:80 
     132msgid "Failed to query service." 
     133msgstr "Impossible d'interoger le service." 
     134 
     135#: inc/lib.translater.microsoft.php:49 
     136msgid "You must have:" 
     137msgstr "Vous devez avoir :" 
     138 
     139#: index.php:26 
     140#: index.php:526 
     141#: index.php:1382 
     142msgid "Settings" 
     143msgstr "Paramètres" 
     144 
     145#: index.php:42 
     146msgid "locales folders of each module" 
     147msgstr "le répertoire locales de chaque module" 
     148 
     149#: index.php:43 
     150msgid "plugins folder root" 
     151msgstr "le répertoire racine des extensions" 
     152 
     153#: index.php:44 
     154msgid "public folder root" 
     155msgstr "le répertoire public du blog" 
     156 
     157#: index.php:45 
     158msgid "cache folder of Dotclear" 
     159msgstr "le répertoire cache de Dotclear" 
     160 
     161#: index.php:46 
     162msgid "locales folder of translater" 
     163msgstr "le répertoire locales de l'extension translater" 
     164 
     165#: index.php:51 
     166msgid "Translation successfully updated" 
     167msgstr "Traduction mise à jour avec succès" 
     168 
     169#: index.php:52 
     170msgid "Translation successfully created" 
     171msgstr "Traduction crée avec succès" 
     172 
     173#: index.php:53 
     174msgid "Translation successfully deleted" 
     175msgstr "Traduction effacée avec succès" 
     176 
     177#: index.php:54 
     178msgid "Backups successfully create" 
     179msgstr "Sauvegardes crées avec succès" 
     180 
     181#: index.php:55 
     182msgid "Backups successfully restored" 
     183msgstr "Sauvegardes effectuées avec succès" 
     184 
     185#: index.php:56 
     186msgid "Backups successfully deleted" 
     187msgstr "Sauvegardes effacées avec succès" 
     188 
     189#: index.php:57 
     190msgid "Package successfully imported" 
     191msgstr "Paquetage importé avec succès" 
     192 
     193#: index.php:58 
     194msgid "Package successfully exported" 
     195msgstr "Paquetage exporté avec succès" 
     196 
     197#: index.php:62 
     198msgid "Failed to update settings: %s" 
     199msgstr "Impossible de mettre à jour les paramètres : %s" 
     200 
     201#: index.php:63 
     202msgid "Failed to update translation: %s" 
     203msgstr "Impossible de mettre à jour la traduction : %s" 
     204 
     205#: index.php:64 
     206msgid "Failed to create translation: %s" 
     207msgstr "Impossible de créer la traduction : %s" 
     208 
     209#: index.php:65 
     210msgid "Failed to delete translation: %s" 
     211msgstr "Impossible d'effacer la traduction : %s" 
     212 
     213#: index.php:66 
     214msgid "Failed to create backups: %s" 
     215msgstr "Impossible de créer les sauvegardes : %s" 
     216 
     217#: index.php:67 
     218msgid "Failed to restore backups: %s" 
     219msgstr "Impossible de restaurer les sauvegardes : %s" 
     220 
     221#: index.php:68 
     222msgid "Failed to delete backups: %s" 
     223msgstr "Impossible d'effacer les sauvegardes : %s" 
     224 
     225#: index.php:69 
     226msgid "Failed to import package: %s" 
     227msgstr "Impossible d'importer le paquetage : %s" 
     228 
     229#: index.php:70 
     230msgid "Failed to export package: %s" 
     231msgstr "Impossible d'exporter le paquetage : %s" 
     232 
     233#: index.php:112 
     234msgid "No lang to create" 
     235msgstr "Pas de langue à créer" 
     236 
     237#: index.php:134 
     238msgid "No lang to delete" 
     239msgstr "Pas de langue à effacer" 
     240 
     241#: index.php:156 
     242msgid "No lang to backup" 
     243msgstr "Pas de langue à sauvegarder" 
     244 
     245#: index.php:189 
     246msgid "No blackup to restore" 
     247msgstr "Pas de langue à restaurer" 
     248 
     249#: index.php:208 
     250msgid "No bakcup to to restore" 
     251msgstr "Pas de sauvegarde à restaurer" 
     252 
     253#: index.php:229 
     254#: index.php:247 
     255msgid "No backup to delete" 
     256msgstr "Pas de sauvegarde à effacer" 
     257 
     258#: index.php:290 
     259#: index.php:364 
     260msgid "Nothing to export" 
     261msgstr "Rien à exporter" 
     262 
     263#: index.php:312 
     264msgid "No language to update" 
     265msgstr "Pas de langue à mettre à jour" 
     266 
     267#: index.php:443 
     268#: index.php:490 
     269msgid "Failed to launch translater: %s" 
     270msgstr "Impossible de démarrer translater : %s" 
     271 
     272#: index.php:556 
     273msgid "Use this %s translation:" 
     274msgstr "Utiliser la traduction de %s :" 
     275 
     276#: index.php:557 
     277msgid "Translate this text with %s" 
     278msgstr "Traduire ce texte avec %s" 
     279 
     280#: index.php:558 
     281msgid "Use this text" 
     282msgstr "Utiliser ce texte" 
     283 
     284#: index.php:606 
     285msgid "Translate theme \"%s\" (by %s)" 
     286msgstr "Traduire le thème \"%s\" (de %s)" 
     287 
     288#: index.php:607 
     289msgid "Translate plugin \"%s\" (by %s)" 
     290msgstr "Traduire l'extension \"%s\" (de %s)" 
     291 
     292#: index.php:627 
     293#: index.php:741 
     294msgid "Edit translation" 
     295msgstr "Modifier la traduction" 
     296 
     297#: index.php:639 
     298msgid "Id" 
     299msgstr "Id" 
     300 
     301#: index.php:649 
     302msgid "There is no editable modules" 
     303msgstr "Il n'y a pas de modules modifiables." 
     304 
     305#: index.php:665 
     306msgid "Summary" 
     307msgstr "Résumé" 
     308 
     309#: index.php:666 
     310msgid "Module" 
     311msgstr "Module" 
     312 
     313#: index.php:668 
     314msgid "About" 
     315msgstr "À propos" 
     316 
     317#: index.php:678 
     318msgid "Root" 
     319msgstr "Racine" 
     320 
     321#: index.php:680 
     322#: index.php:694 
     323#: index.php:811 
     324#: index.php:1342 
     325msgid "Backups" 
     326msgstr "Sauvegardes" 
     327 
     328#: index.php:695 
     329msgid "Last backup" 
     330msgstr "Dernière sauvegarde" 
     331 
     332#: index.php:722 
     333msgid "no backup" 
     334msgstr "Aucune sauvegarde" 
     335 
     336#: index.php:731 
     337msgid "Translations" 
     338msgstr "Traductions" 
     339 
     340#: index.php:737 
     341msgid "Edit language" 
     342msgstr "Modifier une langue" 
     343 
     344#: index.php:757 
     345msgid "Add language" 
     346msgstr "Ajouter une langue" 
     347 
     348#: index.php:764 
     349msgid "Copy from language:" 
     350msgstr "Copier depuis la langue :" 
     351 
     352#: index.php:766 
     353msgid "Optionnal" 
     354msgstr "Optionnel" 
     355 
     356#: index.php:773 
     357msgid "Add translation" 
     358msgstr "Ajouter la traduction" 
     359 
     360#: index.php:790 
     361msgid "Delete language" 
     362msgstr "Effacer une langue" 
     363 
     364#: index.php:794 
     365msgid "Delete translation" 
     366msgstr "Effacer la traduction" 
     367 
     368#: index.php:816 
     369msgid "Create backups" 
     370msgstr "Créer une sauvegarde" 
     371 
     372#: index.php:818 
     373msgid "Choose languages to backup" 
     374msgstr "Choisir la langue à sauvegarder" 
     375 
     376#: index.php:839 
     377msgid "Backup" 
     378msgstr "Sauvegarde" 
     379 
     380#: index.php:856 
     381msgid "List of backups" 
     382msgstr "Liste des sauvegardes" 
     383 
     384#: index.php:860 
     385#: index.php:1066 
     386msgid "File" 
     387msgstr "Fichier" 
     388 
     389#: index.php:863 
     390msgid "Size" 
     391msgstr "Taille" 
     392 
     393#: index.php:887 
     394msgid "Selected backups action:" 
     395msgstr "Action sur les sauvegardes sélectionnées :" 
     396 
     397#: index.php:889 
     398msgid "Restore backups" 
     399msgstr "Restaurer les sauvegardes" 
     400 
     401#: index.php:890 
     402msgid "Delete backups" 
     403msgstr "Effacer les sauvegardes" 
     404 
     405#: index.php:916 
     406#: index.php:1183 
     407msgid "Choose language package to import" 
     408msgstr "Choisir le paquetage de langue à importer" 
     409 
     410#: index.php:938 
     411#: index.php:1240 
     412msgid "Choose languages to export" 
     413msgstr "Choisir les langues à exporter" 
     414 
     415#: index.php:1059 
     416msgid "Group" 
     417msgstr "Groupe" 
     418 
     419#: index.php:1061 
     420msgid "String" 
     421msgstr "Chaîne" 
     422 
     423#: index.php:1063 
     424#: index.php:1284 
     425msgid "Translation" 
     426msgstr "Traduction" 
     427 
     428#: index.php:1064 
     429msgid "Existing" 
     430msgstr "Existant" 
     431 
     432#: index.php:1127 
     433msgid "%s occurrences" 
     434msgstr "%s occurrences" 
     435 
     436#: index.php:1153 
     437msgid "Total of %s strings." 
     438msgstr "Total de %s chaînes." 
     439 
     440#: index.php:1155 
     441msgid "Change the group of the selected entries to:" 
     442msgstr "Changer le groupe des entrées sélectionnées vers :" 
     443 
     444#: index.php:1212 
     445msgid "Choose modules to export" 
     446msgstr "Choisir les modules à exporter" 
     447 
     448#: index.php:1214 
     449msgid "Modules" 
     450msgstr "Modules" 
     451 
     452#: index.php:1287 
     453msgid "Write .po files" 
     454msgstr "Écrire les fichier .po" 
     455 
     456#: index.php:1290 
     457msgid "Write .lang.php files" 
     458msgstr "Écrire les fichier .lang.php" 
     459 
     460#: index.php:1293 
     461msgid "Translate also strings of template files" 
     462msgstr "Traduire également les chaînes des fichiers de template" 
     463 
     464#: index.php:1296 
     465msgid "Translate only unknow strings" 
     466msgstr "Traduire uniquement les chaînes inconnues" 
     467 
     468#: index.php:1299 
     469msgid "Hide default modules of Dotclear" 
     470msgstr "Cacher les modules d'origine de Dotclear" 
     471 
     472#: index.php:1302 
     473msgid "Write comments in files" 
     474msgstr "Écrire les commentaires dans les fichiers" 
     475 
     476#: index.php:1305 
     477msgid "Write informations about author in files" 
     478msgstr "Écrire les informations à propos de l'auteur dans les fichiers" 
     479 
     480#: index.php:1309 
     481msgid "Tools" 
     482msgstr "Outils" 
     483 
     484#: index.php:1310 
     485msgid "Default language of l10n source:" 
     486msgstr "Langue par défaut des sources l10n :" 
     487 
     488#: index.php:1314 
     489msgid "Select and configure the tool to use to translate strings:" 
     490msgstr "Sélectionner et configurer un outil de traduction :" 
     491 
     492#: index.php:1326 
     493msgid "Nothing to configure for %s tool." 
     494msgstr "Rien à configurer pour l'outil %s." 
     495 
     496#: index.php:1337 
     497msgid "Overwrite existing languages" 
     498msgstr "Écraser les langages existants" 
     499 
     500#: index.php:1338 
     501msgid "Name of exported package" 
     502msgstr "Nom du paquetage exporté" 
     503 
     504#: index.php:1345 
     505msgid "Make backups when changes are made" 
     506msgstr "Faire des sauvegardes lors des modifications" 
     507 
     508#: index.php:1346 
     509msgid "Limit backups to %s files per module" 
     510msgstr "Limiter les sauvegardes à %s fichiers par module" 
     511 
     512#: index.php:1349 
     513msgid "Store backups in %s" 
     514msgstr "Stocker les sauvegardes dans %s" 
     515 
     516#: index.php:1354 
     517msgid "Behaviors" 
     518msgstr "Comportements" 
     519 
     520#: index.php:1355 
     521msgid "Default start menu:" 
     522msgstr "Menu de départ par défaut :" 
     523 
     524#: index.php:1360 
     525msgid "Enable menu on extensions page" 
     526msgstr "Activer le menu sur la page des extensions" 
     527 
     528#: index.php:1363 
     529msgid "Enable menu on themes page" 
     530msgstr "Activer le menu sur la page des thèmes" 
     531 
    18532msgid "translater" 
    19533msgstr "Traducteur" 
    20534 
    21 #: _admin.php:17 
    22535msgid "Translate your Dotclear plugins and themes" 
    23536msgstr "Traduire vos extensions et thèmes pour Dotclear" 
    24537 
    25 #: _admin.php:20 
    26 msgid "manage translations" 
    27 msgstr "Gérer les traductions" 
    28  
    29 #: _admin.php:24 
    30 #: inc/index.lang.php:72 
    31 #: inc/index.module.php:217 
    32 #: inc/index.modules.php:19 
    33 #: inc/index.pack.php:56 
    34 #: inc/index.setting.php:50 
    35 #: index.php:79 
    36 #: index.php:89 
    37 msgid "Translater" 
    38 msgstr "Traducteur" 
    39  
    40 #: _admin.php:50 
    41 msgid "Translate extensions" 
    42 msgstr "Traduire les extensions" 
    43  
    44 #: _admin.php:54 
    45 #: inc/index.module.php:240 
    46 msgid "Name" 
    47 msgstr "Nom" 
    48  
    49 #: _admin.php:68 
    50 msgid "Translate this plugin" 
    51 msgstr "Traduire cette extension" 
    52  
    53 #: _admin.php:86 
    54 msgid "Translate this theme" 
    55 msgstr "Traduire ce thème" 
    56  
    57 #: inc/class.dc.translater.php:331 
    58 msgid "Cannot work with module of type %s" 
    59 msgstr "Impossible de travailler avec un module de type %s" 
    60  
    61 #: inc/class.dc.translater.php:339 
    62 msgid "Cannot find module %s of type %s" 
    63 msgstr "Impossible de trouver le module %s de type %s" 
    64  
    65 #: inc/class.dc.translater.php:419 
    66 msgid "Cannot find backups folder for module %s" 
    67 msgstr "Impossible de trouver le dossier de sauvegarde du module %s" 
    68  
    69 #: inc/class.dc.translater.php:435 
    70 msgid "Cannot find languages folder for module %s" 
    71 msgstr "Impossible de trouver le dossier de langue du module %s" 
    72  
    73 #: inc/class.dc.translater.php:455 
    74 msgid "Cannot find root folder for module %s" 
    75 msgstr "Impossible de trouver le dossier racine du module %s" 
    76  
    77 #: inc/class.dc.translater.php:484 
    78 msgid "Limit of %s backups for module %s exceed" 
    79 msgstr "La limite de %s sauvegardes pour le module % est dépassée" 
    80  
    81 #: inc/class.dc.translater.php:546 
    82 #: inc/class.dc.translater.php:936 
    83 #: inc/class.dc.translater.php:1013 
    84 msgid "Cannot find language folder %s for module %s" 
    85 msgstr "Impossible de trouver le dossier de langue %s pour le module %s" 
    86  
    87 #: inc/class.dc.translater.php:601 
    88 msgid "Cannot delete backup file %s" 
    89 msgstr "Impossible d'effacer le fichier de sauvegarde %s" 
    90  
    91 #: inc/class.dc.translater.php:619 
    92 msgid "Cannot find backup file %s" 
    93 msgstr "Impossible de trouver le fichier de sauvegarde %s" 
    94  
    95 #: inc/class.dc.translater.php:645 
    96 msgid "Wrong export query" 
    97 msgstr "Mauvaise requète d'exportation" 
    98  
    99 #: inc/class.dc.translater.php:656 
    100 msgid "Cannot use export mask %s" 
    101 msgstr "Impossible d'utiliser le masque d'exportation %s" 
    102  
    103 #: inc/class.dc.translater.php:744 
    104 msgid "Wrong import query" 
    105 msgstr "Mauvaise requète d'importation" 
    106  
    107 #: inc/class.dc.translater.php:793 
    108 msgid "Nothing to import for these modules in pack %s" 
    109 msgstr "Rien à importer pour ces modules dans le paquetage %s" 
    110  
    111 #: inc/class.dc.translater.php:822 
    112 msgid "Zip file %s is not in translater format" 
    113 msgstr "Le fichier zip n'est pas au format de translater" 
    114  
    115 #: inc/class.dc.translater.php:882 
    116 msgid "Language %s already exists for module %s" 
    117 msgstr "La langue %s existe dèjà pour le module %s" 
    118  
    119 #: inc/class.dc.translater.php:893 
    120 msgid "Cannot copy file from language %s for module %s" 
    121 msgstr "Impossible de copier le fichier depuis le langage %s pour le module %s" 
    122  
    123 #: inc/class.dc.translater.php:985 
    124 msgid "No string to write, language %s deleted for module %s" 
    125 msgstr "Aucune chaine à écrire, la langue %s a été effacée pour le module %s" 
    126  
    127 #: inc/class.dc.translater.php:1249 
    128 msgid "Cannot grant write acces on lang file %s" 
    129 msgstr "Impossible d'avoir les droits en écriture sur le fichier de langue %s" 
    130  
    131 #: inc/class.dc.translater.php:1260 
    132 msgid "Cannot write lang file %s" 
    133 msgstr "Impossible d'écrire le fichier de langue %s" 
    134  
    135 #: inc/class.dc.translater.php:1569 
    136 msgid "Cannot find language for code %s" 
    137 msgstr "Impossible de trouver de langue pour le code %s" 
    138  
    139 #: inc/class.translater.rest.php:35 
    140 msgid "Missing params" 
    141 msgstr "Paramètres manquants" 
    142  
    143 #: inc/class.translater.rest.php:42 
    144 msgid "Failed to init translation tool" 
    145 msgstr "Impossible d'initialiser l'outil de traduction" 
    146  
    147 #: inc/index.lang.php:22 
    148 msgid "No language to update" 
    149 msgstr "Pas de langue à mettre à jour" 
    150  
    151 #: inc/index.lang.php:59 
    152 #: inc/index.module.php:195 
    153 msgid "Failed to launch translater: %s" 
    154 msgstr "Impossible de démarrer translater : %s" 
    155  
    156 #: inc/index.lang.php:162 
    157 msgid "Group" 
    158 msgstr "Groupe" 
    159  
    160 #: inc/index.lang.php:164 
    161 msgid "String" 
    162 msgstr "Chaîne" 
    163  
    164 #: inc/index.lang.php:166 
    165 #: inc/index.setting.php:64 
    166 msgid "Translation" 
    167 msgstr "Traduction" 
    168  
    169 #: inc/index.lang.php:167 
    170 msgid "Existing" 
    171 msgstr "Existant" 
    172  
    173 #: inc/index.lang.php:169 
    174 #: inc/index.module.php:431 
    175 msgid "File" 
    176 msgstr "Fichier" 
    177  
    178 #: inc/index.lang.php:229 
    179 msgid "%s occurrences" 
    180 msgstr "%s occurrences" 
    181  
    182 #: inc/index.lang.php:256 
    183 msgid "Total of %s strings." 
    184 msgstr "Total de %s chaînes." 
    185  
    186 #: inc/index.lang.php:258 
    187 msgid "Change the group of the selected entries to:" 
    188 msgstr "Changer le groupe des entrées sélectionnées vers :" 
    189  
    190 #: inc/index.module.php:22 
    191 msgid "No lang to create" 
    192 msgstr "Pas de langue à créer" 
    193  
    194 #: inc/index.module.php:40 
    195 msgid "No lang to delete" 
    196 msgstr "Pas de langue à effacer" 
    197  
    198 #: inc/index.module.php:58 
    199 msgid "No lang to backup" 
    200 msgstr "Pas de langue à sauvegarder" 
    201  
    202 #: inc/index.module.php:87 
    203 msgid "No blackup to restore" 
    204 msgstr "Pas de langue à restaurer" 
    205  
    206 #: inc/index.module.php:106 
    207 msgid "No bakcup to to restore" 
    208 msgstr "Pas de sauvegarde à restaurer" 
    209  
    210 #: inc/index.module.php:123 
    211 #: inc/index.module.php:141 
    212 msgid "No backup to delete" 
    213 msgstr "Pas de sauvegarde à effacer" 
    214  
    215 #: inc/index.module.php:176 
    216 #: inc/index.pack.php:42 
    217 msgid "Nothing to export" 
    218 msgstr "Rien à exporter" 
    219  
    220 #: inc/index.module.php:217 
    221 #: inc/index.module.php:236 
    222 msgid "Module" 
    223 msgstr "Module" 
    224  
    225 #: inc/index.module.php:235 
    226 msgid "Summary" 
    227 msgstr "Résumé" 
    228  
    229 #: inc/index.module.php:238 
    230 msgid "About" 
    231 msgstr "À propos" 
    232  
    233 #: inc/index.module.php:248 
    234 msgid "Root" 
    235 msgstr "Racine" 
    236  
    237 #: inc/index.module.php:250 
    238 #: inc/index.module.php:264 
    239 #: inc/index.module.php:382 
    240 #: inc/index.setting.php:106 
    241 msgid "Backups" 
    242 msgstr "Sauvegardes" 
    243  
    244 #: inc/index.module.php:265 
    245 msgid "Last backup" 
    246 msgstr "Dernière sauvegarde" 
    247  
    248 #: inc/index.module.php:292 
    249 msgid "no backup" 
    250 msgstr "Aucune sauvegarde" 
    251  
    252 #: inc/index.module.php:301 
    253 msgid "Translations" 
    254 msgstr "Traductions" 
    255  
    256 #: inc/index.module.php:308 
    257 msgid "Edit language" 
    258 msgstr "Modifier une langue" 
    259  
    260 #: inc/index.module.php:310 
    261 #: inc/index.module.php:330 
    262 #: inc/index.module.php:363 
    263 msgid "Select language:" 
    264 msgstr "Sélectionner une langue :" 
    265  
    266 #: inc/index.module.php:312 
    267 #: inc/index.modules.php:68 
    268 msgid "Edit translation" 
    269 msgstr "Modifier la traduction" 
    270  
    271 #: inc/index.module.php:328 
    272 msgid "Add language" 
    273 msgstr "Ajouter une langue" 
    274  
    275 #: inc/index.module.php:335 
    276 msgid "Copy from language:" 
    277 msgstr "Copier depuis la langue :" 
    278  
    279 #: inc/index.module.php:337 
    280 msgid "Optionnal" 
    281 msgstr "Optionnel" 
    282  
    283 #: inc/index.module.php:344 
    284 msgid "Add translation" 
    285 msgstr "Ajouter la traduction" 
    286  
    287 #: inc/index.module.php:361 
    288 msgid "Delete language" 
    289 msgstr "Effacer une langue" 
    290  
    291 #: inc/index.module.php:365 
    292 msgid "Delete translation" 
    293 msgstr "Effacer la traduction" 
    294  
    295 #: inc/index.module.php:387 
    296 msgid "Create backups" 
    297 msgstr "Créer une sauvegarde" 
    298  
    299 #: inc/index.module.php:389 
    300 msgid "Choose languages to backup" 
    301 msgstr "Choisir la langue à sauvegarder" 
    302  
    303 #: inc/index.module.php:410 
    304 msgid "Backup" 
    305 msgstr "Sauvegarde" 
    306  
    307 #: inc/index.module.php:427 
    308 msgid "List of backups" 
    309 msgstr "Liste des sauvegardes" 
    310  
    311 #: inc/index.module.php:434 
    312 msgid "Size" 
    313 msgstr "Taille" 
    314  
    315 #: inc/index.module.php:458 
    316 msgid "Selected backups action:" 
    317 msgstr "Action sur les sauvegardes sélectionnées :" 
    318  
    319 #: inc/index.module.php:460 
    320 msgid "Restore backups" 
    321 msgstr "Restaurer les sauvegardes" 
    322  
    323 #: inc/index.module.php:461 
    324 msgid "Delete backups" 
    325 msgstr "Effacer les sauvegardes" 
    326  
    327 #: inc/index.module.php:487 
    328 #: inc/index.pack.php:73 
    329 msgid "Choose language package to import" 
    330 msgstr "Choisir le paquetage de langue à importer" 
    331  
    332 #: inc/index.module.php:509 
    333 #: inc/index.pack.php:130 
    334 msgid "Choose languages to export" 
    335 msgstr "Choisir les langues à exporter" 
    336  
    337 #: inc/index.modules.php:19 
    338 msgid "Extensions" 
    339 msgstr "Extensions" 
    340  
    341 #: inc/index.modules.php:47 
    342 msgid "Translate theme \"%s\" (by %s)" 
    343 msgstr "Traduire le thème \"%s\" (de %s)" 
    344  
    345 #: inc/index.modules.php:48 
    346 msgid "Translate plugin \"%s\" (by %s)" 
    347 msgstr "Traduire l'extension \"%s\" (de %s)" 
    348  
    349 #: inc/index.modules.php:80 
    350 msgid "Id" 
    351 msgstr "Id" 
    352  
    353 #: inc/index.modules.php:90 
    354 msgid "There is no editable modules" 
    355 msgstr "Il n'y a pas de modules modifiables." 
    356  
    357 #: inc/index.pack.php:102 
    358 msgid "Choose modules to export" 
    359 msgstr "Choisir les modules à exporter" 
    360  
    361 #: inc/index.pack.php:104 
    362 msgid "Modules" 
    363 msgstr "Modules" 
    364  
    365 #: inc/index.setting.php:25 
    366 msgid "No setting update" 
    367 msgstr "Pas de paramètre à mettre à jour" 
    368  
    369 #: inc/index.setting.php:50 
    370 #: inc/index.setting.php:57 
    371 #: inc/index.setting.php:121 
    372 #: index.php:85 
    373 msgid "Settings" 
    374 msgstr "Paramètres" 
    375  
    376 #: inc/index.setting.php:67 
    377 msgid "Write .po files" 
    378 msgstr "Écrire les fichier .po" 
    379  
    380 #: inc/index.setting.php:70 
    381 msgid "Write .lang.php files" 
    382 msgstr "Écrire les fichier .lang.php" 
    383  
    384 #: inc/index.setting.php:73 
    385 msgid "Translate also strings of template files" 
    386 msgstr "Traduire également les chaînes des fichiers de template" 
    387  
    388 #: inc/index.setting.php:76 
    389 msgid "Translate only unknow strings" 
    390 msgstr "Traduire uniquement les chaînes inconnues" 
    391  
    392 #: inc/index.setting.php:79 
    393 msgid "Hide default modules of Dotclear" 
    394 msgstr "Cacher les modules d'origine de Dotclear" 
    395  
    396 #: inc/index.setting.php:82 
    397 msgid "Write comments in files" 
    398 msgstr "Écrire les commentaires dans les fichiers" 
    399  
    400 #: inc/index.setting.php:85 
    401 msgid "Write informations about author in files" 
    402 msgstr "Écrire les informations à propos de l'auteur dans les fichiers" 
    403  
    404 #: inc/index.setting.php:89 
    405 msgid "Tools" 
    406 msgstr "Outils" 
    407  
    408 #: inc/index.setting.php:90 
    409 msgid "Use an help tool for translation:" 
    410 msgstr "Utiliser un outil d'aide à la traduction :" 
    411  
    412 #: inc/index.setting.php:93 
    413 msgid "Default language of l10n source:" 
    414 msgstr "Langue par défaut des sources l10n :" 
    415  
    416 #: inc/index.setting.php:101 
    417 msgid "Overwrite existing languages" 
    418 msgstr "Écraser les langages existants" 
    419  
    420 #: inc/index.setting.php:102 
    421 msgid "Name of exported package" 
    422 msgstr "Nom du paquetage exporté" 
    423  
    424 #: inc/index.setting.php:109 
    425 msgid "Make backups when changes are made" 
    426 msgstr "Faire des sauvegardes lors des modifications" 
    427  
    428 #: inc/index.setting.php:110 
    429 msgid "Limit backups to %s files per module" 
    430 msgstr "Limiter les sauvegardes à %s fichiers par module" 
    431  
    432 #: inc/index.setting.php:113 
    433 msgid "Store backups in %s" 
    434 msgstr "Stocker les sauvegardes dans %s" 
    435  
    436 #: inc/index.setting.php:118 
    437 msgid "Behaviors" 
    438 msgstr "Comportements" 
    439  
    440 #: inc/index.setting.php:119 
    441 msgid "Default start menu:" 
    442 msgstr "Menu de départ par défaut :" 
    443  
    444 #: inc/index.setting.php:124 
    445 msgid "Enable menu on extensions page" 
    446 msgstr "Activer le menu sur la page des extensions" 
    447  
    448 #: inc/index.setting.php:127 
    449 msgid "Enable menu on themes page" 
    450 msgstr "Activer le menu sur la page des thèmes" 
    451  
    452 #: index.php:50 
    453 msgid "Please wait" 
    454 msgstr "Veulliez patienter" 
    455  
    456 #: index.php:68 
    457 msgid "Use this %s translation:" 
    458 msgstr "Utiliser la traduction de %s :" 
    459  
    460 #: index.php:69 
    461 msgid "Translate this text with %s" 
    462 msgstr "Traduire ce texte avec %s" 
    463  
    464 #: index.php:70 
    465 msgid "Use this text" 
    466 msgstr "Utiliser ce texte" 
    467  
    468 #: index.php:101 
    469 msgid "locales folders of each module" 
    470 msgstr "le répertoire locales de chaque module" 
    471  
    472 #: index.php:102 
    473 msgid "plugins folder root" 
    474 msgstr "le répertoire racine des extensions" 
    475  
    476 #: index.php:103 
    477 msgid "public folder root" 
    478 msgstr "le répertoire public du blog" 
    479  
    480 #: index.php:104 
    481 msgid "cache folder of Dotclear" 
    482 msgstr "le répertoire cache de Dotclear" 
    483  
    484 #: index.php:105 
    485 msgid "locales folder of translater" 
    486 msgstr "le répertoire locales de l'extension translater" 
    487  
    488 #: index.php:111 
    489 msgid "Translation successfully updated" 
    490 msgstr "Traduction mise à jour avec succès" 
    491  
    492 #: index.php:112 
    493 msgid "Translation successfully created" 
    494 msgstr "Traduction crée avec succès" 
    495  
    496 #: index.php:113 
    497 msgid "Translation successfully deleted" 
    498 msgstr "Traduction effacée avec succès" 
    499  
    500 #: index.php:114 
    501 msgid "Backups successfully create" 
    502 msgstr "Sauvegardes crées avec succès" 
    503  
    504 #: index.php:115 
    505 msgid "Backups successfully restored" 
    506 msgstr "Sauvegardes effectuées avec succès" 
    507  
    508 #: index.php:116 
    509 msgid "Backups successfully deleted" 
    510 msgstr "Sauvegardes effacées avec succès" 
    511  
    512 #: index.php:117 
    513 msgid "Package successfully imported" 
    514 msgstr "Paquetage importé avec succès" 
    515  
    516 #: index.php:118 
    517 msgid "Package successfully exported" 
    518 msgstr "Paquetage exporté avec succès" 
    519  
    520 #: index.php:123 
    521 msgid "Failed to update settings: %s" 
    522 msgstr "Impossible de mettre à jour les paramètres : %s" 
    523  
    524 #: index.php:124 
    525 msgid "Failed to update translation: %s" 
    526 msgstr "Impossible de mettre à jour la traduction : %s" 
    527  
    528 #: index.php:125 
    529 msgid "Failed to create translation: %s" 
    530 msgstr "Impossible de créer la traduction : %s" 
    531  
    532 #: index.php:126 
    533 msgid "Failed to delete translation: %s" 
    534 msgstr "Impossible d'effacer la traduction : %s" 
    535  
    536 #: index.php:127 
    537 msgid "Failed to create backups: %s" 
    538 msgstr "Impossible de créer les sauvegardes : %s" 
    539  
    540 #: index.php:128 
    541 msgid "Failed to restore backups: %s" 
    542 msgstr "Impossible de restaurer les sauvegardes : %s" 
    543  
    544 #: index.php:129 
    545 msgid "Failed to delete backups: %s" 
    546 msgstr "Impossible d'effacer les sauvegardes : %s" 
    547  
    548 #: index.php:130 
    549 msgid "Failed to import package: %s" 
    550 msgstr "Impossible d'importer le paquetage : %s" 
    551  
    552 #: index.php:131 
    553 msgid "Failed to export package: %s" 
    554 msgstr "Impossible d'exporter le paquetage : %s" 
    555  
    556 msgid "%s files" 
    557 msgstr "%s fichiers" 
    558  
  • plugins/translater/release.txt

    r2614 r3127  
    22 - help translation 
    33 - source translation 
     4 
     52013.05.11 
     6 * Rewrited proposal tools 
     7 * Added Microsoft translation tool 
     8 * Updated Google translation tool 
     9 * Removed permissions, now required superadmin 
     10 * Fixed page title and messages and contents 
     11 * Moved all sub-pages into one page 
    412 
    5131.5 20100901 
Note: See TracChangeset for help on using the changeset viewer.

Sites map