diff --git a/src/messenger/webim/locales/en/properties b/src/messenger/webim/locales/en/properties index fe1d914a..9932b3eb 100644 --- a/src/messenger/webim/locales/en/properties +++ b/src/messenger/webim/locales/en/properties @@ -250,6 +250,8 @@ page.preview.showerr=Show errors page.preview.style_default=-from general settings- page.preview.title=Site style page.preview.userchat=Chat window (user-mode) +page.translate.descr=If you don't like the translation, please send us an update. +page.translate.title=Translate Open WebIM page_agent.create_new=Here you can create new operator page_agent.tab.avatar=Photo page_agent.tab.main=General diff --git a/src/messenger/webim/locales/ru/properties b/src/messenger/webim/locales/ru/properties index 6d55f146..c6e14786 100644 --- a/src/messenger/webim/locales/ru/properties +++ b/src/messenger/webim/locales/ru/properties @@ -250,6 +250,8 @@ page.preview.showerr= page.preview.style_default=-из настроек сайта- page.preview.title=Стиль мессенджера page.preview.userchat=Chat window (user-mode) +page.translate.descr=Если вам не нравится перевод, пришлите нам ваш вариант. +page.translate.title=Переведите Open WebIM page_agent.create_new=Создание нового оператора page_agent.tab.avatar=Фотография page_agent.tab.main=Общее diff --git a/src/messenger/webim/operator/translate.php b/src/messenger/webim/operator/translate.php new file mode 100644 index 00000000..fb07237b --- /dev/null +++ b/src/messenger/webim/operator/translate.php @@ -0,0 +1,52 @@ + topage(get_operator_name($operator)), + 'lang1' => $source, + 'lang2' => $target +); + +if(!isset($messages[$source])) { + load_messages($source); +} +if(!isset($messages[$target])) { + load_messages($target); +} +$lang1 = $messages[$source]; +$lang2 = $messages[$target]; + +$page["title1"] = isset($lang1["localeid"]) ? $lang1["localeid"] : $source; +$page["title2"] = isset($lang2["localeid"]) ? $lang2["localeid"] : $target; + +$result = array(); +$allkeys = array_keys($lang1); +foreach($allkeys as $key) { + $result[] = array('id' => $key, 'l1' => $lang1[$key], 'l2' => (isset($lang2[$key]) ? $lang2[$key] : "absent") ); +} + +setup_pagination($result); + +start_html_output(); +require('../view/translate.php'); +?> \ No newline at end of file diff --git a/src/messenger/webim/view/translate.php b/src/messenger/webim/view/translate.php new file mode 100644 index 00000000..fb52dde8 --- /dev/null +++ b/src/messenger/webim/view/translate.php @@ -0,0 +1,86 @@ + + +
+ + + + + + + +
+
+
+ + +
+ + + + + |
+