Changeset 28917


Ignore:
Timestamp:
07/02/14 14:43:29 (5 years ago)
Author:
plg
Message:

i18n for the new HTML5 upload (use i18n files from plupload)

optional specific $lang_info[jquery_code] and $lang_info[plupload_code] to load the right i18n file

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/default/template/include/datepicker.inc.tpl

    r28820 r28917  
    33 
    44{$require='jquery.ui.timepicker-addon'} 
    5 {assign var="datepicker_language" value="themes/default/js/ui/i18n/jquery.ui.datepicker-`$lang_info.code`.js"} 
     5{assign var="datepicker_language" value="themes/default/js/ui/i18n/jquery.ui.datepicker-`$lang_info.jquery_code`.js"} 
    66{if "PHPWG_ROOT_PATH"|@constant|@cat:$datepicker_language|@file_exists} 
    7 {combine_script id="jquery.ui.datepicker-`$lang_info.code`" load=$load_mode require='jquery.ui.datepicker' path=$datepicker_language} 
    8 {$require=$require|cat:",jquery.ui.datepicker-`$lang_info.code`"} 
     7{combine_script id="jquery.ui.datepicker-`$lang_info.jquery_code`" load=$load_mode require='jquery.ui.datepicker' path=$datepicker_language} 
     8{$require=$require|cat:",jquery.ui.datepicker-`$lang_info.jquery_code`"} 
    99{/if} 
    1010 
    11 {assign var="timepicker_language" value="themes/default/js/ui/i18n/jquery.ui.timepicker-`$lang_info.code`.js"} 
     11{assign var="timepicker_language" value="themes/default/js/ui/i18n/jquery.ui.timepicker-`$lang_info.jquery_code`.js"} 
    1212{if "PHPWG_ROOT_PATH"|@constant|@cat:$datepicker_language|@file_exists} 
    13 {combine_script id="jquery.ui.timepicker-`$lang_info.code`" load=$load_mode require='jquery.ui.timepicker-addon' path=$timepicker_language} 
    14 {$require=$require|cat:",jquery.ui.timepicker-`$lang_info.code`"} 
     13{combine_script id="jquery.ui.timepicker-`$lang_info.jquery_code`" load=$load_mode require='jquery.ui.timepicker-addon' path=$timepicker_language} 
     14{$require=$require|cat:",jquery.ui.timepicker-`$lang_info.jquery_code`"} 
    1515{/if} 
    1616 
  • trunk/admin/themes/default/template/photos_add_direct.tpl

    r28703 r28917  
    77{combine_css path="themes/default/js/plugins/jquery.jgrowl.css"} 
    88{combine_css path="themes/default/js/plugins/plupload/jquery.plupload.queue/css/jquery.plupload.queue.css"} 
     9 
     10{assign var="plupload_i18n" value="themes/default/js/plugins/plupload/i18n/`$lang_info.plupload_code`.js"} 
     11{if "PHPWG_ROOT_PATH"|@constant|@cat:$plupload_i18n|@file_exists} 
     12  {combine_script id="plupload_i18n-`$lang_info.plupload_code`" load="footer" path=$plupload_i18n require="jquery.plupload.queue"} 
     13{/if} 
    914 
    1015{include file='include/colorbox.inc.tpl'} 
  • trunk/include/template.class.php

    r28703 r28917  
    150150      $this->set_template_dir($root); 
    151151 
     152    if (isset($lang_info['code']) and !isset($lang_info['jquery_code'])) 
     153    { 
     154      $lang_info['jquery_code'] = $lang_info['code']; 
     155    } 
     156 
     157    if (isset($lang_info['jquery_code']) and !isset($lang_info['plupload_code'])) 
     158    { 
     159      $lang_info['plupload_code'] = str_replace('-', '_', $lang_info['jquery_code']); 
     160    } 
     161     
    152162    $this->smarty->assign('lang_info', $lang_info); 
    153163 
  • trunk/language/ko_KR/common.lang.php

    r26640 r28917  
    3333$lang_info['direction'] = "ltr"; 
    3434$lang_info['code'] = "en"; 
     35$lang_info['jquery_code'] = "ko"; 
    3536$lang_info['zero_plural'] = true; 
    3637 
  • trunk/language/pt_BR/common.lang.php

    r28723 r28917  
    3434$lang_info['direction'] = 'ltr'; 
    3535$lang_info['code'] = 'pt'; 
     36$lang_info['jquery_code'] = 'pt-BR'; 
    3637$lang_info['zero_plural'] = false; 
    3738 
  • trunk/language/sh_RS/common.lang.php

    r28743 r28917  
    3434$lang_info['direction'] = 'ltr'; 
    3535$lang_info['code'] = 'sh'; 
     36$lang_info['jquery_code'] = 'sr-SR'; 
     37$lang_info['plupload_code'] = 'sr'; 
    3638$lang_info['zero_plural'] = true; 
    3739 
  • trunk/language/sr_RS/common.lang.php

    r28866 r28917  
    3434$lang_info['direction'] = 'ltr'; 
    3535$lang_info['code'] = 'sr'; 
     36$lang_info['plupload_code'] = 'sr_RS'; 
    3637$lang_info['zero_plural'] = true; 
    3738 
  • trunk/language/th_TH/common.lang.php

    r26640 r28917  
    3333$lang_info['direction'] = "ltr"; 
    3434$lang_info['code'] = "th"; 
     35$lang_info['plupload_code'] = "th_TH"; 
    3536$lang_info['zero_plural'] = "1"; 
    3637 
  • trunk/language/uk_UA/common.lang.php

    r28831 r28917  
    3434$lang_info['direction'] = "ltr"; 
    3535$lang_info['code'] = "ua"; 
     36$lang_info['jquery_code'] = "uk"; 
     37$lang_info['plupload_code'] = "uk_UA"; 
    3638$lang_info['zero_plural'] = true; 
    3739 
  • trunk/language/zh_CN/common.lang.php

    r28722 r28917  
    3434$lang_info['direction'] = "ltr"; 
    3535$lang_info['code'] = "cn"; 
     36$lang_info['jquery_code'] = "zh-CN"; 
    3637$lang_info['zero_plural'] = true; 
    3738 
  • trunk/language/zh_TW/common.lang.php

    r28768 r28917  
    3434$lang_info['direction'] = 'ltr'; 
    3535$lang_info['code'] = 'cn'; 
     36$lang_info['jquery_code'] = 'zh-TW'; 
    3637$lang_info['zero_plural'] = false; 
    3738 
Note: See TracChangeset for help on using the changeset viewer.