From 98e7f59798ff24537437ddea09d965ae65c0f5be Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Tue, 23 Feb 2016 13:41:52 +0800 Subject: [PATCH] * finish task #2482. --- module/common/lang/en.php | 3 +++ module/common/lang/zh-cn.php | 3 +++ module/common/model.php | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 374209ca75..7c63104b21 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -70,6 +70,9 @@ $lang->duplicate = '%s has the same title'; $lang->unfold = '+'; $lang->fold = '-'; +$lang->preShortcutKey = '[Shortcut key:←]'; +$lang->nextShortcutKey = '[Shortcut key:→]'; + $lang->selectAll = 'All'; $lang->selectReverse = 'Inverse'; $lang->notFound = 'Sorry, the object not found.'; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 52958d65f0..32c56a49a5 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -70,6 +70,9 @@ $lang->duplicate = '已有相同标题的%s'; $lang->unfold = '+'; $lang->fold = '-'; +$lang->preShortcutKey = '[快捷键:←]'; +$lang->nextShortcutKey = '[快捷键:→]'; + $lang->selectAll = '全选'; $lang->selectReverse = '反选'; $lang->notFound = '抱歉,您访问的对象并不存在!'; diff --git a/module/common/model.php b/module/common/model.php index 2303f22818..6833e055d1 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -845,7 +845,7 @@ class commonModel extends model { $id = (isset($_SESSION['testcaseOnlyCondition']) and !$_SESSION['testcaseOnlyCondition'] and $app->getModuleName() == 'testcase' and isset($preAndNext->pre->case)) ? 'case' : 'id'; $title = isset($preAndNext->pre->title) ? $preAndNext->pre->title : $preAndNext->pre->name; - $title = '#' . $preAndNext->pre->$id . ' ' . $title; + $title = $lang->preShortcutKey . '#' . $preAndNext->pre->$id . ' ' . $title; $link = $linkTemplate ? sprintf($linkTemplate, $preAndNext->pre->$id) : inLink('view', "ID={$preAndNext->pre->$id}"); echo html::a($link, '', '', "id='pre' class='btn' title='{$title}'"); } @@ -853,7 +853,7 @@ class commonModel extends model { $id = (isset($_SESSION['testcaseOnlyCondition']) and !$_SESSION['testcaseOnlyCondition'] and $app->getModuleName() == 'testcase' and isset($preAndNext->next->case)) ? 'case' : 'id'; $title = isset($preAndNext->next->title) ? $preAndNext->next->title : $preAndNext->next->name; - $title = '#' . $preAndNext->next->$id . ' ' . $title; + $title = $lang->nextShortcutKey . '#' . $preAndNext->next->$id . ' ' . $title; $link = $linkTemplate ? sprintf($linkTemplate, $preAndNext->next->$id) : inLink('view', "ID={$preAndNext->next->$id}"); echo html::a($link, '', '', "id='next' class='btn' title='$title'"); }