* change zh-tw.

This commit is contained in:
wangyidong
2015-11-13 10:55:50 +08:00
parent 5c361fdac7
commit 2d61ca8d34
14 changed files with 34 additions and 63 deletions
+6 -1
View File
@@ -89,7 +89,12 @@ class branch extends control
*/
public function delete($branchID, $confirm = 'no')
{
if($confirm == 'no') die(js::confirm($this->lang->branch->confirmDelete, inlink('delete', "branchID=$branchID&confirm=yes")));
if($confirm == 'no')
{
$this->app->loadLang('product');
$productType = $this->branch->getProductType($branchID);
die(js::confirm(str_replace('%branch%', $this->lang->product->branchName[$productType], $this->lang->branch->confirmDelete), inlink('delete', "branchID=$branchID&confirm=yes")));
}
$this->branch->delete(TABLE_BRANCH, $branchID);
die(js::reload('parent'));
+2 -1
View File
@@ -3,6 +3,7 @@ $lang->branch->common = 'Branch';
$lang->branch->manage = 'Branch manage';
$lang->branch->delete = 'Branch delete';
$lang->branch->manageTitle = '%s Manage';
$lang->branch->all = 'All';
$lang->branch->confirmDelete = 'Branch deletion, will affect the branch of the demand, module, plan, release, Bug, testcase and so on, please consider carefully. Are you sure delete the branch?';
$lang->branch->confirmDelete = '%branch% deletion, will affect the %branch% of the demand, module, plan, release, Bug, testcase and so on, please consider carefully. Are you sure delete the %branch%?';
+1 -1
View File
@@ -6,4 +6,4 @@ $lang->branch->delete = '分支删除';
$lang->branch->manageTitle = '%s管理';
$lang->branch->all = '所有';
$lang->branch->confirmDelete = '分支删除,会影响关联该分支的需求、模块、计划、发布、Bug、用例等等,请慎重考虑。是否删除改分支?';
$lang->branch->confirmDelete = '%branch%删除,会影响关联该%branch%的需求、模块、计划、发布、Bug、用例等等,请慎重考虑。是否删除该%branch%';
+3 -2
View File
@@ -3,6 +3,7 @@ $lang->branch->common = '分支';
$lang->branch->manage = '分支管理';
$lang->branch->delete = '分支刪除';
$lang->branch->all = '所有';
$lang->branch->manageTitle = '%s管理';
$lang->branch->all = '所有';
$lang->branch->confirmDelete = '分支刪除,會影響關聯該分支的需求、模組、計劃、發佈、Bug、用例等等,請慎重考慮。是否刪除改分支?';
$lang->branch->confirmDelete = '%branch%刪除,會影響關聯該%branch%的需求、模組、計劃、發佈、Bug、用例等等,請慎重考慮。是否刪除該%branch%';
+15
View File
@@ -99,4 +99,19 @@ class branchModel extends model
return $branchGroups;
}
/**
* Get product bype by branch.
*
* @param int $branchID
* @access public
* @return void
*/
public function getProductType($branchID)
{
return $this->dao->select('t2.type')->from(TABLE_BRANCH)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')
->where('t1.id')->eq($branchID)
->fetch('type');
}
}
-31
View File
@@ -255,37 +255,6 @@ class build extends control
if($varName == 'testTaskBuild') die(html::select('build', $this->build->getProjectBuildPairs($projectID, $productID, $branch, 'noempty'), $build, "class='form-control'"));
}
/**
* AJAX: get builds of a branch in html select.
*
* @param int $productID
* @param int $branchID
* @param string $operation the operation of creating a release or editing.
* @param string $build build to selected.
* @access public
* @return string
*/
public function ajaxGetBranchBuilds($productID, $branchID, $operation, $build = '')
{
$builds = $this->build->getProductBuildPairs($productID, $branchID, 'notrunk', false);
$releasedBuilds = $this->loadModel('release')->getReleaseBuilds($productID, $branchID);
if($operation == 'editRelease')
{
foreach($releasedBuilds as $buildID)
{
if($build == $buildID) continue;
unset($builds[$buildID]);
}
}
if($operation == 'createRelease')
{
foreach($releasedBuilds as $buildID) unset($builds[$buildID]);
}
die(html::select('build', $builds, $build, "class='form-control'"));
}
/**
* Link stories
*
+1 -1
View File
@@ -177,7 +177,7 @@ $lang->product->menu->plan = array('link' => '計劃|productplan|browse|produ
$lang->product->menu->release = array('link' => '發佈|release|browse|productID=%s', 'subModule' => 'release');
$lang->product->menu->roadmap = '路線圖|product|roadmap|productID=%s';
$lang->product->menu->doc = array('link' => '文檔|product|doc|productID=%s', 'subModule' => 'doc');
$lang->product->menu->branch = '分支|branch|manage|productID=%s';
$lang->product->menu->branch = '%branch%|branch|manage|productID=%s';
$lang->product->menu->module = '模組|tree|browse|productID=%s&view=story';
$lang->product->menu->view = array('link' => '概況|product|view|productID=%s', 'alias' => 'edit');
$lang->product->menu->project = "{$lang->projectCommon}|product|project|status=all&productID=%s";
+1
View File
@@ -48,6 +48,7 @@ $lang->group->copyOptions['copyPriv'] = '複製權限';
$lang->group->copyOptions['copyUser'] = '複製用戶';
$lang->group->versions[''] = '修改歷史';
$lang->group->versions['7_4'] = '禪道7.4';
$lang->group->versions['7_3'] = '禪道7.3';
$lang->group->versions['7_2'] = '禪道7.2';
$lang->group->versions['7_1'] = '禪道7.1';
+1
View File
@@ -15,6 +15,7 @@ $lang->my->profile = '我的檔案';
$lang->my->dynamic = '我的動態';
$lang->my->editProfile = '修改檔案';
$lang->my->changePassword = '修改密碼';
$lang->my->unbind = '解除然之綁定';
$lang->my->taskMenu = new stdclass();
$lang->my->taskMenu->assignedToMe = '指派給我';
+1
View File
@@ -90,6 +90,7 @@ $lang->product->typeList['normal'] = '正常';
$lang->product->typeList['branch'] = '多分支';
$lang->product->typeList['platform'] = '多平台';
$lang->product->branchName['normal'] = '';
$lang->product->branchName['branch'] = '分支';
$lang->product->branchName['platform'] = '平台';
-23
View File
@@ -2,26 +2,3 @@ $(document).ready(function()
{
$("a.preview").modalTrigger({width:1000, type:'iframe'});
})
/**
* Load branch builds.
*
* @param int $branchID
* @access public
* @return void
*/
function loadBranchBuilds(branchID)
{
if(page == 'create')
{
oldReleasedBuild = $('#build').val() ? $('#build').val() : 0;
link = createLink('build', 'ajaxGetBranchBuilds', 'productID=' + productID + '&branchID=' + branchID + '&operation=createRelease&build=' + oldReleasedBuild);
$('#buildBox').load(link, function(){$('#build').chosen(defaultChosenOptions);});
}
else
{
link = createLink('build', 'ajaxGetBranchBuilds', 'productID=' + productID + '&branchID=' + branchID + '&operation=editRelease&build=' + oldReleasedBuild);
$('#buildBox').load(link, function(){$('#build').chosen(defaultChosenOptions);});
}
}
+1 -1
View File
@@ -59,7 +59,7 @@ $lang->release->exportTypeList['bug'] = 'Bug';
$lang->release->exportTypeList['leftbug'] = '遺留Bug';
$lang->release->statusList[''] = '';
$lang->release->statusList['normal'] = '正常維護';
$lang->release->statusList['normal'] = '正常';
$lang->release->statusList['terminate'] = '停止維護';
$lang->release->changeStatusList['normal'] = '激活';
+1
View File
@@ -94,3 +94,4 @@ $lang->upgrade->fromVersions['7_1'] = '7.1';
$lang->upgrade->fromVersions['7_2'] = '7.2';
$lang->upgrade->fromVersions['7_2_4'] = '7.2.4';
$lang->upgrade->fromVersions['7_2_5'] = '7.2.5';
$lang->upgrade->fromVersions['7_3'] = '7.3';
+1 -2
View File
@@ -38,7 +38,7 @@ $lang->user->mobile = '手機';
$lang->user->phone = '電話';
$lang->user->address = '通訊地址';
$lang->user->zipcode = '郵編';
$lang->user->join = '入職時間';
$lang->user->join = '入職日期';
$lang->user->visits = '訪問次數';
$lang->user->ip = '最後IP';
$lang->user->last = '最後登錄';
@@ -140,7 +140,6 @@ $lang->user->placeholder->account = '英文、數字和下劃線的組合,
$lang->user->placeholder->password1 = '六位以上';
$lang->user->placeholder->role = '職位影響內容和用戶列表的順序。';
$lang->user->placeholder->group = '分組決定用戶的權限列表。';
$lang->user->placeholder->join = '入職日期';
$lang->user->placeholder->commiter = '版本控制系統(subversion)中的帳號';
$lang->user->placeholder->verify = '需要輸入你的密碼加以驗證';