diff --git a/src/mibew/libs/classes/Mibew/Controller/TranslationController.php b/src/mibew/libs/classes/Mibew/Controller/TranslationController.php index 32e70a5c..8380f3d8 100644 --- a/src/mibew/libs/classes/Mibew/Controller/TranslationController.php +++ b/src/mibew/libs/classes/Mibew/Controller/TranslationController.php @@ -62,23 +62,9 @@ class TranslationController extends AbstractController $locales_list[] = array('id' => $loc, 'name' => getlocal('localeid', null, $loc)); } - // Extract needed localization constants. - $show = $request->query->get('show'); - if (!in_array($show, array('all', 's1', 's2', 's3'))) { - $show = 'all'; - } - + // Prepare localization constants to display. $result = array(); $all_keys = array_keys($lang1); - if ($show == 's1') { - $all_keys = array_intersect($all_keys, locale_load_id_list('level1')); - } elseif ($show == 's2') { - $all_keys = array_intersect($all_keys, locale_load_id_list('level2')); - } elseif ($show == 's3') { - $all_keys = array_diff($all_keys, locale_load_id_list('level1'), locale_load_id_list('level2')); - } - - // Prepare localization constants to display. foreach ($all_keys as $key) { $t_source = htmlspecialchars($lang1[$key]); if (isset($lang2[$key])) { @@ -126,13 +112,6 @@ class TranslationController extends AbstractController array('id' => 'l1', 'name' => getlocal('translate.sort.lang')), ); $page['formsort'] = $order; - $page['showOptions'] = array( - array('id' => 'all', 'name' => getlocal('translate.show.all')), - array('id' => 's1', 'name' => getlocal('translate.show.forvisitor')), - array('id' => 's2', 'name' => getlocal('translate.show.foroperator')), - array('id' => 's3', 'name' => getlocal('translate.show.foradmin')), - ); - $page['formshow'] = $show; $page['title'] = getlocal('page.translate.title'); $page['menuid'] = 'translation'; $page = array_merge($page, prepare_menu($operator)); diff --git a/src/mibew/libs/common/locale.php b/src/mibew/libs/common/locale.php index cb6a93f5..a8e1cdcf 100644 --- a/src/mibew/libs/common/locale.php +++ b/src/mibew/libs/common/locale.php @@ -290,23 +290,6 @@ function get_local_for_js($text, $params) return sanitize_string($string, 'low', 'moderate'); } -function locale_load_id_list($name) -{ - $result = array(); - $fp = @fopen(MIBEW_FS_ROOT . "/locales/names/$name", "r"); - if ($fp !== false) { - while (!feof($fp)) { - $line = trim(fgets($fp, 4096)); - if ($line && preg_match("/^[\w_\.]+$/", $line)) { - $result[] = $line; - } - } - fclose($fp); - } - - return $result; -} - function save_message($locale, $key, $value) { $result = ""; diff --git a/src/mibew/locales/names/level1 b/src/mibew/locales/names/level1 deleted file mode 100644 index 707f828b..00000000 --- a/src/mibew/locales/names/level1 +++ /dev/null @@ -1,82 +0,0 @@ -chat.came.from -chat.client.changename -chat.client.name -chat.client.visited.page -chat.default.username -chat.error_page.close -chat.error_page.head -chat.error_page.title -chat.mailthread.sent.close -chat.mailthread.sent.closewindow -chat.mailthread.sent.content -chat.mailthread.sent.title -chat.predefined_answers -chat.status.operator.changed -chat.status.operator.dead -chat.status.operator.joined -chat.status.operator.left -chat.status.operator.returned -chat.status.user.changedname -chat.status.user.dead -chat.status.user.left -chat.status.user.reopenedthread -chat.visitor.email -chat.visitor.info -chat.wait -chat.window.chatting_with -chat.window.close_title -chat.window.poweredby -chat.window.predefined.select_answer -chat.window.product_name -chat.window.send_message -chat.window.send_message_short -chat.window.title.agent -chat.window.title.user -chat.window.toolbar.mail_history -chat.window.toolbar.mute -chat.window.toolbar.redirect_user -chat.window.toolbar.refresh -company.title -errors.captcha -errors.required -errors.wrong_field -form.field.email -form.field.message -form.field.name -harderrors.header -image.chat.history -image.chat.message -image.chat.sprite -invitation.message -leavemail.body -leavemail.subject -leavemessage.close -leavemessage.descr -leavemessage.perform -leavemessage.sent.message -leavemessage.sent.title -leavemessage.title -license.title -localeid -mail.user.history.body -mail.user.history.subject -mailthread.close -mailthread.enter_email -mailthread.perform -mailthread.title -notify.new.subject -notify.new.text -page.chat.old_browser.close -page.chat.old_browser.list -page.chat.old_browser.problem -page.chat.old_browser.title -presurvey.department -presurvey.intro -presurvey.mail -presurvey.name -presurvey.question -presurvey.submit -presurvey.title -site.title -site.url -typing.remote diff --git a/src/mibew/locales/names/level2 b/src/mibew/locales/names/level2 deleted file mode 100644 index 6650da82..00000000 --- a/src/mibew/locales/names/level2 +++ /dev/null @@ -1,260 +0,0 @@ -admin.content.client_agents -admin.content.client_gen_button -admin.content.client_settings -agent.not_logged_in -app.descr -app.title -ban.error.duplicate -button.enter -button.save -button.search -canned.actions -canned.actions.del -canned.actions.edit -canned.add -canned.descr -canned.group -canned.locale -canned.title -cannededit.descr -cannededit.done -cannededit.message -cannededit.no_such -cannededit.title -cannednew.descr -cannednew.title -char.redirect.operator.away_suff -char.redirect.operator.online_suff -chat.client.spam.prefix -chat.redirect.back -chat.redirect.cannot -chat.redirect.choose -chat.redirect.group -chat.redirect.operator -chat.redirect.title -chat.redirected.close -chat.redirected.closewindow -chat.redirected.content -chat.redirected.group.content -chat.redirected.title -chat.status.operator.redirect -chat.thread.state_chatting_with_agent -chat.thread.state_closed -chat.thread.state_loading -chat.thread.state_wait -chat.thread.state_wait_for_another_agent -chat.visitor.invitation.accepted -clients.how_to -clients.intro -clients.no_clients -clients.queue.chat -clients.queue.prio -clients.queue.wait -clients.title -common.asterisk_explanation -confirm.take.head -confirm.take.message -confirm.take.no -confirm.take.yes -content.blocked -content.history -content.logoff -error.no_password -error.no_password.visit_profile -errors.footer -errors.header -errors.prefix -errors.suffix -form.field.address -form.field.address.description -form.field.ban_comment -form.field.ban_comment.description -form.field.ban_days -form.field.ban_days.description -form.field.password -form.field.password_confirm -image.button.login -image.button.save -image.button.search -install.newfeatures -install.updatedb -invitation.sent -invitation.title -lang.choose -leftMenu.client_agents -leftMenu.client_gen_button -leftMenu.client_settings -localedirection -menu.blocked -menu.canned -menu.goonline -menu.groups -menu.groups.content -menu.locale -menu.locale.content -menu.notifications -menu.notifications.content -menu.operator -menu.profile -menu.profile.content -menu.translate -menu.updates -menu.updates.content -my_settings.error.password_match -no_such_operator -notification.back_to_list -notification.intro -notification.label.subj -notification.label.time -notification.label.to -notification.title -notifications.head.msg -notifications.head.subj -notifications.head.time -notifications.head.to -notifications.kind -notifications.kind.all -notifications.kind.mail -notifications.kind.xmpp -notifications.locale -notifications.locale.all -page.analysis.search.head_browser -page.analysis.search.head_group -page.analysis.search.head_host -page.analysis.search.head_messages -page.analysis.search.head_name -page.analysis.search.head_operator -page.analysis.search.head_time -page.analysis.trackedpath.title -page.analysis.userhistory.intro -page.analysis.userhistory.title -page.gen_button.choose_group -page.gen_button.choose_image -page.gen_button.choose_locale -page.gen_button.choose_style -page.gen_button.code -page.gen_button.code.description -page.gen_button.default_group -page.gen_button.include_site_name -page.gen_button.intro -page.gen_button.modsecurity -page.gen_button.sample -page.gen_button.secure_links -page.gen_button.title -page.group.no_such -page.notifications.intro -page.notifications.title -page.preview.style_default -page_analysis.full.text.search -page_analysis.search.title -page_ban.intro -page_ban.sent -page_ban.thread -page_ban.title -page_bans.add -page_bans.title -page_bans.to -page_client.pending_users -page_getcode.tab.image -page_getcode.tab.text -page_login.error -page_login.intro -page_login.login -page_login.password -page_login.remember -page_login.title -page_search.intro -pending.menu.hide -pending.menu.show -pending.popup_notification -pending.status.setaway -pending.status.setonline -pending.table.ban -pending.table.head.contactid -pending.table.head.etc -pending.table.head.name -pending.table.head.operator -pending.table.head.state -pending.table.head.total -pending.table.head.waittime -pending.table.invite -pending.table.speak -pending.table.tracked -pending.table.view -permission.admin -permission.takeover -permission.viewthreads -report.bydate.1 -report.bydate.2 -report.bydate.3 -report.bydate.4 -report.bydate.title -report.byoperator.1 -report.byoperator.2 -report.byoperator.3 -report.byoperator.4 -report.byoperator.title -report.no_items -report.total -resetpwd.changed -resetpwd.changed.title -resetpwd.intro -resetpwd.login -resetpwd.submit -resetpwd.title -restore.back_to_login -restore.emailorlogin -restore.intro -restore.mailsubj -restore.mailtext -restore.pwd.message -restore.sent -restore.sent.title -restore.submit -restore.title -right.administration -right.main -right.other -statistics.dates -statistics.description -statistics.from -statistics.till -statistics.title -statistics.wrong.dates -tag.pagination.info -tag.pagination.next -tag.pagination.no_items -tag.pagination.no_items.elements -tag.pagination.previous -thread.back_to_search -thread.chat_log -thread.intro -time.dateformat -time.locale -time.never -time.timeformat -time.today.at -time.yesterday.at -topMenu.admin -topMenu.logoff -topMenu.main -topMenu.users -topMenu.users.nomenu -tracked.date -tracked.empty.referrer -tracked.intro -tracked.link -tracked.path -tracked.visitor.came.from -visitors.how_to -visitors.intro -visitors.no_visitors -visitors.table.head.contactid -visitors.table.head.etc -visitors.table.head.firsttimeonsite -visitors.table.head.invitations -visitors.table.head.invitationtime -visitors.table.head.invited.by -visitors.table.head.lasttimeonsite -visitors.table.head.name -visitors.title diff --git a/src/mibew/styles/pages/default/templates_src/server_side/translations.handlebars b/src/mibew/styles/pages/default/templates_src/server_side/translations.handlebars index c2341b5f..9e6f2c6e 100644 --- a/src/mibew/styles/pages/default/templates_src/server_side/translations.handlebars +++ b/src/mibew/styles/pages/default/templates_src/server_side/translations.handlebars @@ -39,15 +39,6 @@ -
- {{l10n "translate.show"}}
- -
-