aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2014-07-02 12:43:29 +0000
committerplegall <plg@piwigo.org>2014-07-02 12:43:29 +0000
commit3b9e2659b0f6043246036f237f1227bcf1e10e51 (patch)
tree2e1dba1d5d94d7d6561611c26e2ec1bc906f1a48
parent266f2f756c83881bed287311caae83592ac828a5 (diff)
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 git-svn-id: http://piwigo.org/svn/trunk@28917 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/themes/default/template/include/datepicker.inc.tpl12
-rw-r--r--admin/themes/default/template/photos_add_direct.tpl5
-rw-r--r--include/template.class.php10
-rw-r--r--language/ko_KR/common.lang.php3
-rw-r--r--language/pt_BR/common.lang.php3
-rw-r--r--language/sh_RS/common.lang.php4
-rw-r--r--language/sr_RS/common.lang.php3
-rw-r--r--language/th_TH/common.lang.php3
-rw-r--r--language/uk_UA/common.lang.php4
-rw-r--r--language/zh_CN/common.lang.php1
-rw-r--r--language/zh_TW/common.lang.php3
11 files changed, 38 insertions, 13 deletions
diff --git a/admin/themes/default/template/include/datepicker.inc.tpl b/admin/themes/default/template/include/datepicker.inc.tpl
index 87db85390..5bea0f8ff 100644
--- a/admin/themes/default/template/include/datepicker.inc.tpl
+++ b/admin/themes/default/template/include/datepicker.inc.tpl
@@ -2,16 +2,16 @@
{combine_script id='jquery.ui.timepicker-addon' load=$load_mode require='jquery.ui.datepicker,jquery.ui.slider' path="themes/default/js/ui/jquery.ui.timepicker-addon.js"}
{$require='jquery.ui.timepicker-addon'}
-{assign var="datepicker_language" value="themes/default/js/ui/i18n/jquery.ui.datepicker-`$lang_info.code`.js"}
+{assign var="datepicker_language" value="themes/default/js/ui/i18n/jquery.ui.datepicker-`$lang_info.jquery_code`.js"}
{if "PHPWG_ROOT_PATH"|@constant|@cat:$datepicker_language|@file_exists}
-{combine_script id="jquery.ui.datepicker-`$lang_info.code`" load=$load_mode require='jquery.ui.datepicker' path=$datepicker_language}
-{$require=$require|cat:",jquery.ui.datepicker-`$lang_info.code`"}
+{combine_script id="jquery.ui.datepicker-`$lang_info.jquery_code`" load=$load_mode require='jquery.ui.datepicker' path=$datepicker_language}
+{$require=$require|cat:",jquery.ui.datepicker-`$lang_info.jquery_code`"}
{/if}
-{assign var="timepicker_language" value="themes/default/js/ui/i18n/jquery.ui.timepicker-`$lang_info.code`.js"}
+{assign var="timepicker_language" value="themes/default/js/ui/i18n/jquery.ui.timepicker-`$lang_info.jquery_code`.js"}
{if "PHPWG_ROOT_PATH"|@constant|@cat:$datepicker_language|@file_exists}
-{combine_script id="jquery.ui.timepicker-`$lang_info.code`" load=$load_mode require='jquery.ui.timepicker-addon' path=$timepicker_language}
-{$require=$require|cat:",jquery.ui.timepicker-`$lang_info.code`"}
+{combine_script id="jquery.ui.timepicker-`$lang_info.jquery_code`" load=$load_mode require='jquery.ui.timepicker-addon' path=$timepicker_language}
+{$require=$require|cat:",jquery.ui.timepicker-`$lang_info.jquery_code`"}
{/if}
{combine_script id='datepicker' load=$load_mode require=$require path='admin/themes/default/js/datepicker.js'}
diff --git a/admin/themes/default/template/photos_add_direct.tpl b/admin/themes/default/template/photos_add_direct.tpl
index 17f44285d..a85e67d13 100644
--- a/admin/themes/default/template/photos_add_direct.tpl
+++ b/admin/themes/default/template/photos_add_direct.tpl
@@ -7,6 +7,11 @@
{combine_css path="themes/default/js/plugins/jquery.jgrowl.css"}
{combine_css path="themes/default/js/plugins/plupload/jquery.plupload.queue/css/jquery.plupload.queue.css"}
+{assign var="plupload_i18n" value="themes/default/js/plugins/plupload/i18n/`$lang_info.plupload_code`.js"}
+{if "PHPWG_ROOT_PATH"|@constant|@cat:$plupload_i18n|@file_exists}
+ {combine_script id="plupload_i18n-`$lang_info.plupload_code`" load="footer" path=$plupload_i18n require="jquery.plupload.queue"}
+{/if}
+
{include file='include/colorbox.inc.tpl'}
{include file='include/add_album.inc.tpl'}
diff --git a/include/template.class.php b/include/template.class.php
index 056d54102..322a78957 100644
--- a/include/template.class.php
+++ b/include/template.class.php
@@ -149,6 +149,16 @@ class Template
else
$this->set_template_dir($root);
+ if (isset($lang_info['code']) and !isset($lang_info['jquery_code']))
+ {
+ $lang_info['jquery_code'] = $lang_info['code'];
+ }
+
+ if (isset($lang_info['jquery_code']) and !isset($lang_info['plupload_code']))
+ {
+ $lang_info['plupload_code'] = str_replace('-', '_', $lang_info['jquery_code']);
+ }
+
$this->smarty->assign('lang_info', $lang_info);
if (!defined('IN_ADMIN') and isset($conf['extents_for_templates']))
diff --git a/language/ko_KR/common.lang.php b/language/ko_KR/common.lang.php
index e62c02503..b832cd0cc 100644
--- a/language/ko_KR/common.lang.php
+++ b/language/ko_KR/common.lang.php
@@ -32,6 +32,7 @@ $lang_info['language_name'] = "한국어";
$lang_info['country'] = "대한민국";
$lang_info['direction'] = "ltr";
$lang_info['code'] = "en";
+$lang_info['jquery_code'] = "ko";
$lang_info['zero_plural'] = true;
$lang['%d album updated'] = '%d 개의 앨범이 업데이트 되었습니다';
@@ -417,4 +418,4 @@ $lang['Password confirmation is missing. Please confirm the chosen password.'] =
$lang['Password is missing. Please enter the password.'] = '암호가 입력되지 않았습니다. 암호를 입력하십시오.';
$lang['%d photos per page'] = '페이지당 %d 개의 사진';
$lang['Theme'] = '테마';
-?> \ No newline at end of file
+?>
diff --git a/language/pt_BR/common.lang.php b/language/pt_BR/common.lang.php
index ff48550c0..093f0dedd 100644
--- a/language/pt_BR/common.lang.php
+++ b/language/pt_BR/common.lang.php
@@ -33,6 +33,7 @@ $lang_info['language_name'] = 'Português';
$lang_info['country'] = 'Brasil';
$lang_info['direction'] = 'ltr';
$lang_info['code'] = 'pt';
+$lang_info['jquery_code'] = 'pt-BR';
$lang_info['zero_plural'] = false;
$lang['%d Kb'] = '%d Kb';
@@ -422,4 +423,4 @@ $lang['Theme'] = 'Tema';
$lang['No results for'] = 'Nenhum resultado para';
$lang['Apply on properties'] = 'Aplicar em propriedades';
$lang['Photo description'] = 'Descrição da foto';
-$lang['Photo title'] = 'Título da foto'; \ No newline at end of file
+$lang['Photo title'] = 'Título da foto';
diff --git a/language/sh_RS/common.lang.php b/language/sh_RS/common.lang.php
index 672a97475..ddf6c6d3a 100644
--- a/language/sh_RS/common.lang.php
+++ b/language/sh_RS/common.lang.php
@@ -33,6 +33,8 @@ $lang_info['language_name'] = 'Srpski';
$lang_info['country'] = 'Srbija';
$lang_info['direction'] = 'ltr';
$lang_info['code'] = 'sh';
+$lang_info['jquery_code'] = 'sr-SR';
+$lang_info['plupload_code'] = 'sr';
$lang_info['zero_plural'] = true;
$lang['%d Kb'] = '%d Kb';
@@ -421,4 +423,4 @@ $lang['mandatory'] = 'obavezno';
$lang['Apply on properties'] = 'Примени на подешавања';
$lang['No results for'] = 'Нема резултата за';
$lang['Photo description'] = 'Опис фотографије';
-$lang['Photo title'] = 'Назив фотографије'; \ No newline at end of file
+$lang['Photo title'] = 'Назив фотографије';
diff --git a/language/sr_RS/common.lang.php b/language/sr_RS/common.lang.php
index 7cb19c37b..e23e2d84c 100644
--- a/language/sr_RS/common.lang.php
+++ b/language/sr_RS/common.lang.php
@@ -33,6 +33,7 @@ $lang_info['language_name'] = 'Српски';
$lang_info['country'] = 'Србија';
$lang_info['direction'] = 'ltr';
$lang_info['code'] = 'sr';
+$lang_info['plupload_code'] = 'sr_RS';
$lang_info['zero_plural'] = true;
$lang['%d Kb'] = '%d Kb';
@@ -421,4 +422,4 @@ $lang['Last Page'] = 'Последња страна';
$lang['Theme'] = 'Тема';
$lang['No results for'] = 'Нема резултата за';
$lang['Photo description'] = 'Опис фотографије';
-$lang['Photo title'] = 'Наслов фотографије'; \ No newline at end of file
+$lang['Photo title'] = 'Наслов фотографије';
diff --git a/language/th_TH/common.lang.php b/language/th_TH/common.lang.php
index 5deaf20a9..f6ed5e231 100644
--- a/language/th_TH/common.lang.php
+++ b/language/th_TH/common.lang.php
@@ -32,6 +32,7 @@ $lang_info['language_name'] = "ภาษาไทย";
$lang_info['country'] = "ประเทศไทย";
$lang_info['direction'] = "ltr";
$lang_info['code'] = "th";
+$lang_info['plupload_code'] = "th_TH";
$lang_info['zero_plural'] = "1";
@@ -419,4 +420,4 @@ $lang['Password is missing. Please enter the password.'] = "คุณยัง
$lang['Password confirmation is missing. Please confirm the chosen password.'] = "คุณยังไม่ได้ยืนยันรหัสผ่าน. กรุณายืนยันรหัสผ่านเดิมอีกครั้ง.";
$lang['%d photos per page'] = 'จำนวน %d รูปภาพต่อหน้า';
$lang['Theme'] = 'ธีม';
-?> \ No newline at end of file
+?>
diff --git a/language/uk_UA/common.lang.php b/language/uk_UA/common.lang.php
index 0adc1a707..44c72af67 100644
--- a/language/uk_UA/common.lang.php
+++ b/language/uk_UA/common.lang.php
@@ -33,6 +33,8 @@ $lang_info['language_name'] = "Українська";
$lang_info['country'] = "Україна";
$lang_info['direction'] = "ltr";
$lang_info['code'] = "ua";
+$lang_info['jquery_code'] = "uk";
+$lang_info['plupload_code'] = "uk_UA";
$lang_info['zero_plural'] = true;
$lang['%d album updated'] = '%d альбом оновлено';
@@ -421,4 +423,4 @@ $lang['Theme'] = 'Тема';
$lang['No results for'] = 'Нічого не знайдено для';
$lang['Apply on properties'] = 'Застосувати на властивості';
$lang['Photo description'] = 'Опис фотографії';
-$lang['Photo title'] = 'Назва фотографії'; \ No newline at end of file
+$lang['Photo title'] = 'Назва фотографії';
diff --git a/language/zh_CN/common.lang.php b/language/zh_CN/common.lang.php
index b1f63eab3..f69a52224 100644
--- a/language/zh_CN/common.lang.php
+++ b/language/zh_CN/common.lang.php
@@ -33,6 +33,7 @@ $lang_info['language_name'] = "简体中文";
$lang_info['country'] = "中国";
$lang_info['direction'] = "ltr";
$lang_info['code'] = "cn";
+$lang_info['jquery_code'] = "zh-CN";
$lang_info['zero_plural'] = true;
$lang['%d Kb'] = '%dKb';
diff --git a/language/zh_TW/common.lang.php b/language/zh_TW/common.lang.php
index fc4d4be09..84bfd868e 100644
--- a/language/zh_TW/common.lang.php
+++ b/language/zh_TW/common.lang.php
@@ -33,6 +33,7 @@ $lang_info['language_name'] = '中文';
$lang_info['country'] = '中國';
$lang_info['direction'] = 'ltr';
$lang_info['code'] = 'cn';
+$lang_info['jquery_code'] = 'zh-TW';
$lang_info['zero_plural'] = false;
$lang['%d Kb'] = '%d KB';
@@ -422,4 +423,4 @@ $lang['Theme'] = '主題';
$lang['No results for'] = '沒有結果';
$lang['Photo description'] = '圖片說明';
$lang['Photo title'] = '圖片標題';
-$lang['Apply on properties'] = '適用於性能'; \ No newline at end of file
+$lang['Apply on properties'] = '適用於性能';