diff --git a/module/translate/control.php b/module/translate/control.php index 0f6a15f45b..42b3598e8b 100644 --- a/module/translate/control.php +++ b/module/translate/control.php @@ -162,6 +162,10 @@ class translate extends control $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload')); } + $this->view->title = $this->lang->translate->module; + $this->view->position[] = html::a($this->createLink('translate', 'index'), $this->lang->translate->common); + $this->view->position[] = $this->lang->translate->module; + $this->view->referItems = $this->translate->getModuleLangs($module, $referLang); $this->view->translations = $this->translate->getTranslations($language, $module); $this->view->moduleGroup = $moduleGroup; diff --git a/module/translate/lang/zh-cn.php b/module/translate/lang/zh-cn.php index 25d27c0144..cbad88db4e 100644 --- a/module/translate/lang/zh-cn.php +++ b/module/translate/lang/zh-cn.php @@ -11,6 +11,7 @@ $lang->translate->common = '翻译'; $lang->translate->index = '首页'; $lang->translate->addLang = '新增语言'; +$lang->translate->module = '翻译模块'; $lang->translate->chooseModule = '选择翻译模块'; $lang->translate->name = '语言名称'; diff --git a/module/translate/model.php b/module/translate/model.php index 5147e9a208..b6328c892d 100644 --- a/module/translate/model.php +++ b/module/translate/model.php @@ -142,7 +142,7 @@ class translateModel extends model if(preg_match( '/; *\/\//', $value)) $value = preg_replace('/; *\/\/.*/', '', $value); $value = trim($value, ';'); /* Trim ['] or ["] when not [.] . */ - if(preg_match('/["\'] *\./', $value) == 0 and preg_match('/\. *[\'"]/', $value) == 0) + if(preg_match('/["\'] *\.[^\.]/', $value) == 0 and preg_match('/[^\.]\. *["\']/', $value) == 0) { if($value{0} == '"' or $value{0} == "'") $value = trim($value, $value{0}); } @@ -374,7 +374,7 @@ class translateModel extends model { $result = true; if($value == 'new stdclass()') $result = false; - if(strpos($value, '$') === 0 and strpos($value, '$lang->productCommon') === false and strpos($value, '$lang->projectCommon') === false and preg_match('/["\'] *\./', $value) == 0 and preg_match('/\. *["\']/', $value) == 0) $result = false; + if(strpos($value, '$') === 0 and strpos($value, '$lang->productCommon') === false and strpos($value, '$lang->projectCommon') === false and preg_match('/["\'] *\.[^\.]/', $value) == 0 and preg_match('/[^\.]\. *["\']/', $value) == 0) $result = false; if($value == '$lang->productCommon' or $value == '$lang->projectCommon') $result = false; return $result;