english translation

This commit is contained in:
aaronchen2k
2020-02-03 15:37:02 +08:00
parent 56392dd151
commit 4e08aed4f6
8 changed files with 67 additions and 38 deletions
-1
View File
@@ -32,7 +32,6 @@ CREATE TABLE `zt_cijob` (
`repo` mediumint(8) unsigned NOT NULL,
`jenkins` mediumint(8) unsigned NOT NULL,
`jenkinsJob` varchar(500) NOT NULL,
`buildType` varchar(255) NOT NULL,
`triggerType` varchar(255) NOT NULL,
`scheduleType` varchar(255) NOT NULL,
`cronExpression` varchar(255) DEFAULT NULL,
+2 -2
View File
@@ -1,3 +1,3 @@
<?php
$config->job->create->requiredFields = 'name,repo,buildType,jenkins,jenkinsJob,triggerType';
$config->job->edit->requiredFields = 'name,repo,buildType,jenkins,jenkinsJob,triggerType';
$config->job->create->requiredFields = 'name,repo,jenkins,jenkinsJob,triggerType';
$config->job->edit->requiredFields = 'name,repo,jenkins,jenkinsJob,triggerType';
+1 -2
View File
@@ -1,6 +1,6 @@
$(function()
{
triggerTypeChanged('tag');
triggerTypeChanged(triggerType);
});
function triggerTypeChanged(type) {
@@ -22,7 +22,6 @@ function triggerTypeChanged(type) {
$('.comment-fields').addClass('hidden');
var val = $("input[name='scheduleType']:checked").val();
console.log(val);
scheduleTypeChanged(val? val: 'cron');
}
}
+1 -1
View File
@@ -27,7 +27,7 @@ function triggerTypeChanged(type) {
$('.tag-fields').addClass('hidden');
$('.comment-fields').removeClass('hidden');
$('.corn-fields').addClass('hidden');
$('.cron-fields').addClass('hidden');
$('.custom-fields').addClass('hidden');
scheduleTypeChanged();
+45
View File
@@ -1,2 +1,47 @@
<?php
$lang->ci->common = 'CI';
$lang->ci->at = ' at ';
$lang->ci->jenkins = 'Jenkins';
$lang->ci->repo = 'Repo';
$lang->ci->job = 'Job';
$lang->ci->browse = 'View';
$lang->ci->create = 'Create';
$lang->ci->edit = 'Edit';
$lang->job->browseBuild = 'Build Histories';
$lang->job->viewLogs = 'Build Logs';
$lang->job->exeNow = 'Execute now';
$lang->job->delete = 'Delete';
$lang->job->confirmDelete = 'Do you want to delete this Jenkins server?';
$lang->job->buildStatus = 'Build Status';
$lang->job->buildTime = 'Build Time';
$lang->job->id = 'ID';
$lang->job->name = 'Name';
$lang->job->repo = 'Repo';
$lang->job->jenkins = 'Jenkins Server';
$lang->job->jenkinsJob = 'Jenkins Task';
$lang->job->triggerType = 'Trigger';
$lang->job->scheduleType = 'Schedule';
$lang->job->cronExpression = 'Cron Expression';
$lang->job->custom = 'Custom';
$lang->job->at = 'executed on';
$lang->job->exe = '';
$lang->job->scheduleInterval = 'Every';
$lang->job->day = 'days';
$lang->job->lastExe = 'Last Executed';
$lang->job->scheduleTime = 'Time';
$lang->job->example = 'e.g.';
$lang->job->tagEx = 'build_#15, to build Jenkins job that id is 15.';
$lang->job->commitEx = 'start build #15, to build Jenkins job that id is 15.';
$lang->job->cronSample = 'e.g. 0 0 2 * * 2-6/1 means 2:00 a.m. every weekday.';
$lang->job->buildStatusList = array('success' => 'Success', 'fail' => 'Fail', 'created' => 'Created', 'building' => 'Building');
$lang->job->dayTypeList = array('workDay' => 'Weekdays', 'everyDay' => 'Every Day');
$lang->job->triggerTypeList = array('tag' => 'Tag', 'commit' => 'Code Commit', 'schedule' => 'Schedule');
$lang->job->scheduleTypeList = array('cron' => 'Cron', 'custom' => 'Custom');
+1 -11
View File
@@ -1,6 +1,5 @@
<?php
$lang->ci->common = '持续集成';
$lang->ci->de = '的';
$lang->ci->at = '于';
$lang->ci->jenkins = 'Jenkins';
@@ -10,9 +9,6 @@ $lang->ci->browse = '浏览';
$lang->ci->create = '新建';
$lang->ci->edit = '编辑';
$lang->ci->list = '列表';
$lang->ci->create = '新增构建';
$lang->job->browseBuild = '构建历史';
$lang->job->viewLogs = '构建日志';
@@ -29,21 +25,15 @@ $lang->job->name = '名称';
$lang->job->repo = '代码库';
$lang->job->jenkins = 'Jenkins服务';
$lang->job->jenkinsJob = 'Jenkins任务名';
$lang->job->buildType = '构建类型';
$lang->job->triggerType = '触发方式';
$lang->job->scheduleType = '时间计划';
$lang->job->cornExpression = 'Corn表达式';
$lang->job->cronExpression = 'Cron表达式';
$lang->job->custom = '自定义';
$lang->job->tagKeywords = '标签关键字';
$lang->job->commentKeywords = '注释关键字';
$lang->job->extJob = '执行任务';
$lang->job->at = '在';
$lang->job->time = '时间';
$lang->job->exe = '执行';
$lang->job->scheduleInterval = '每隔';
$lang->job->scheduleDay = '天数';
$lang->job->day = '天';
$lang->job->lastExe = '最后执行';
$lang->job->scheduleTime = '时间';
+10 -11
View File
@@ -12,6 +12,8 @@
?>
<?php include '../../common/view/header.html.php'; ?>
<?php js::set('triggerType', 'tag')?>
<div id='mainContent' class='main-row'>
<div class='main-col main-content'>
<div class='center-block'>
@@ -26,10 +28,7 @@
</tr>
<tr>
<th><?php echo $lang->job->repo; ?></th>
<td><?php echo html::select('repo', $repoList, '', "class='form-control chosen'"); ?></td>
<th><?php echo $lang->job->buildType; ?></th>
<td><?php echo html::select('buildType', $lang->job->buildTypeList, 'buildAndDeploy', "class='form-control chosen'"); ?></td>
<td colspan="3"><?php echo html::select('repo', $repoList, '', "class='form-control chosen'"); ?></td>
</tr>
<tr>
<th><?php echo $lang->job->jenkins; ?></th>
@@ -47,16 +46,16 @@
<td class="schedule-fields"><?php echo html::radio('scheduleType', $lang->job->scheduleTypeList, 'cron',
"onclick='scheduleTypeChanged(this.value)'");?></td>
</tr>
<tr class="tag-fields">
<tr class="tag-fields" class="tag-fields">
<th><?php echo $lang->job->example; ?></th>
<td colspan="3"><?php echo $lang->job->tagEx; ?></td>
</tr>
<tr class="comment-fields">
<tr class="comment-fields" class="comment-fields">
<th><?php echo $lang->job->example; ?></th>
<td colspan="3"><?php echo $lang->job->commitEx; ?></td>
</tr>
<tr class="cron-fields">
<tr class="cron-fields" class="cron-fields">
<th><?php echo $lang->job->cronExpression; ?></th>
<td><?php echo html::input('cronExpression', '', "class='form-control'"); ?></td>
<td colspan="2"><span style="font-style: italic"><?php echo $lang->job->cronSample; ?></span></td>
@@ -71,21 +70,21 @@
<div class="col w-100px">
<?php echo html::number('scheduleInterval', '1', "class='form-control'"); ?>
</div>
<div class="col w-30px">
<div class="col w-40px">
<?php echo $lang->job->day; ?>
</div>
<div class="col w-40px">
<div class="col <?php echo $this->app->getClientLang() == 'en' ? 'w-100px' : '2-30px'; ?>">
<?php echo $lang->job->at; ?>
</div>
<div class="col w-120px">
<div class="col w-150px">
<?php echo html::select('scheduleDay', $lang->job->dayTypeList, '',"class='form-control chosen'"); ?>
</div>
<div class="col w-100px">
<?php echo html::input('scheduleTime', '2:00',
"class='form-control form-time time-only' min='1'"); ?>
</div>
<div class="col w-60px">
<div class="col w-120px">
<?php echo $lang->job->exe; ?>。
</div>
</div>
+7 -10
View File
@@ -28,10 +28,7 @@
</tr>
<tr>
<th><?php echo $lang->job->repo; ?></th>
<td><?php echo html::select('repo', $repoList, $job->repo, "class='form-control chosen'"); ?></td>
<th><?php echo $lang->job->buildType; ?></th>
<td><?php echo html::select('buildType', $lang->job->buildTypeList, 'buildAndDeploy', "class='form-control chosen'"); ?></td>
<td colspan="3"><?php echo html::select('repo', $repoList, $job->repo, "class='form-control chosen'"); ?></td>
</tr>
<tr>
<th><?php echo $lang->job->jenkins; ?></th>
@@ -73,22 +70,22 @@
<div class="col w-100px">
<?php echo html::number('scheduleInterval', $job->scheduleInterval, "class='form-control'"); ?>
</div>
<div class="col w-30px">
<?php echo $lang->job->day; ?>
<div class="col w-40px">
<?php echo $lang->job->day; ?>,&nbsp;&nbsp;
</div>
<div class="col w-40px">
<div class="col <?php echo $this->app->getClientLang() == 'en' ? 'w-100px' : '2-30px'; ?>">
<?php echo $lang->job->at; ?>
</div>
<div class="col w-120px">
<div class="col w-150px">
<?php echo html::select('scheduleDay', $lang->job->dayTypeList, $job->scheduleDay,"class='form-control chosen'"); ?>
</div>
<div class="col w-100px">
<?php echo html::input('scheduleTime', $job->scheduleTime,
"class='form-control form-time time-only' min='1'"); ?>
</div>
<div class="col w-60px">
<?php echo $lang->job->exe; ?>
<div class="col w-120px">
<?php echo $lang->job->exe; ?>.
</div>
</div>
</td>