mirror of https://github.com/rancher/ui.git
export text to tranlation file
This commit is contained in:
parent
c7989d2afa
commit
6375a865b3
|
|
@ -1,22 +1,15 @@
|
|||
import Component from '@ember/component';
|
||||
import layout from './template';
|
||||
import { set, get } from '@ember/object';
|
||||
import { inject as service } from '@ember/service';
|
||||
|
||||
const stepOneChoice = [{
|
||||
id: 'scm',
|
||||
}];
|
||||
|
||||
const stepsChoices = [{
|
||||
id: 'task',
|
||||
name: 'run a script'
|
||||
},{
|
||||
id: 'build',
|
||||
name: 'publish an image'
|
||||
}
|
||||
];
|
||||
|
||||
export default Component.extend({
|
||||
layout,
|
||||
intl: service(),
|
||||
selectedModel: function(){
|
||||
return get(this, 'model')[get(this, 'type')]
|
||||
}.property('model','type'),
|
||||
|
|
@ -29,7 +22,19 @@ export default Component.extend({
|
|||
if(stepMode === 'scm'){
|
||||
set(this, 'stepsTypeChoices', stepOneChoice);
|
||||
}else{
|
||||
set(this, 'stepsTypeChoices', stepsChoices);
|
||||
set(this, 'stepsTypeChoices', this.getStepsChoices());
|
||||
}
|
||||
}
|
||||
},
|
||||
getStepsChoices() {
|
||||
const intl = get(this, 'intl')
|
||||
const stepsChoices = [{
|
||||
id: 'task',
|
||||
name: intl.t('newPipelineStep.stepType.build.stepsChoices.task'),
|
||||
},{
|
||||
id: 'build',
|
||||
name: intl.t('newPipelineStep.stepType.build.stepsChoices.build'),
|
||||
}
|
||||
];
|
||||
return stepsChoices
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -40,4 +40,4 @@
|
|||
modalOpts=modalOpts
|
||||
modalState=modalState
|
||||
}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="pt-20"></div>
|
||||
<div class="inline-form">
|
||||
<label>Language Environment</label>
|
||||
<label>{{t 'newPipelineStep.stepType.language.header'}}</label>
|
||||
<div class="pt-10"></div>
|
||||
{{#each environmentTypes as |envType| }}
|
||||
{{radio-button id=envType.label selection=selectedType value=envType.label disabled=(if (eq modalOpts.type 'review') true false)}}
|
||||
|
|
@ -89,21 +89,21 @@
|
|||
</div>
|
||||
{{else}}
|
||||
<div class="inline-form">
|
||||
<label>{{t 'newPipelineStep.stepType.task.entryPoint'}}</label>
|
||||
<label>{{t 'newPipelineStep.stepType.task.entryPoint.label'}}</label>
|
||||
<div class="pt-10"></div>
|
||||
{{input
|
||||
value=runScriptConfig.entrypoint
|
||||
placeholder="If you want use the default entrypoint, just leave me empty"
|
||||
placeholder=(t 'newPipelineStep.stepType.task.entryPoint.placeholder')
|
||||
disabled=(if (eq modalOpts.type 'review') true false)
|
||||
}}
|
||||
</div>
|
||||
<div class="pt-20"></div>
|
||||
<div class="inline-form">
|
||||
<label>{{t 'newPipelineStep.stepType.task.command'}}</label>
|
||||
<label>{{t 'newPipelineStep.stepType.task.command.label'}}</label>
|
||||
<div class="pt-10"></div>
|
||||
{{input
|
||||
value=runScriptConfig.command
|
||||
placeholder="Arguments of entrypoint"
|
||||
placeholder=(t 'newPipelineStep.stepType.task.command.placeholder')
|
||||
disabled=(if (eq modalOpts.type 'review') true false)
|
||||
}}
|
||||
</div>
|
||||
|
|
@ -129,4 +129,4 @@
|
|||
disabled=(if (eq modalOpts.type 'review') true false)
|
||||
}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
</label>
|
||||
{{#if selectedModel.sourceCodeConfig.url}}
|
||||
{{#unless selectedRepo.permissions.admin}}
|
||||
{{banner-message color='bg-warning mb-0 mt-10' message='No permission to set webhook'}}
|
||||
{{banner-message color='bg-warning mb-0 mt-10' message=(t 'newPipelineStep.stepType.scm.noWebhook')}}
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
</label>
|
||||
{{#if selectedModel.sourceCodeConfig.url}}
|
||||
{{#unless selectedRepo.permissions.admin}}
|
||||
{{banner-message color='bg-warning mb-0 mt-10' message='No permission to set webhook'}}
|
||||
{{banner-message color='bg-warning mb-0 mt-10' message=(t 'newPipelineStep.stepType.scm.noWebhook')}}
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
</label>
|
||||
{{#if selectedModel.sourceCodeConfig.url}}
|
||||
{{#unless selectedRepo.permissions.admin}}
|
||||
{{banner-message color='bg-warning mb-0 mt-10' message='No permission to set webhook'}}
|
||||
{{banner-message color='bg-warning mb-0 mt-10' message=(t 'newPipelineStep.stepType.scm.noWebhook')}}
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
@ -97,4 +97,4 @@
|
|||
</div>
|
||||
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
</button>
|
||||
{{else}}
|
||||
<button class="btn bg-primary"
|
||||
disabled="disabled"
|
||||
disabled="disabled"
|
||||
>
|
||||
<i class="icon icon-spinner icon-spin"></i> {{t 'authPage.github.testAuth.buttonText.post'}}
|
||||
</button>
|
||||
|
|
@ -89,13 +89,13 @@
|
|||
optionValuePath="url"
|
||||
readOnly=readOnly
|
||||
}}
|
||||
<button {{action "fetchPipelineFromRepo"}}
|
||||
disabled={{if selectedModel.sourceCodeConfig.url fetchPipelineFromRepoState true}}
|
||||
class="mt-10 btn bg-info"
|
||||
<button {{action "fetchPipelineFromRepo"}}
|
||||
disabled={{if selectedModel.sourceCodeConfig.url fetchPipelineFromRepoState true}}
|
||||
class="mt-10 btn bg-info"
|
||||
style="color:white;"
|
||||
>
|
||||
{{#if fetchPipelineFromRepoState}}
|
||||
<i class="icon icon-spin icon-spinner"></i>
|
||||
<i class="icon icon-spin icon-spinner"></i>
|
||||
{{/if}}
|
||||
{{t 'newPipelineStep.stepType.scm.importFromRepo'}}
|
||||
</button>
|
||||
|
|
@ -118,7 +118,7 @@
|
|||
<div class="label-wrap">
|
||||
{{radio-button disabled=(or (eq modalOpts.type 'review') (and (not-eq type.value 'only') allowOnly)) id=type.value selection=selectedModel.sourceCodeConfig.branchCondition value=type.value}}
|
||||
<label class="acc-label" for={{type.value}}>
|
||||
{{type.label}}
|
||||
{{t type.label}}
|
||||
</label>
|
||||
</div>
|
||||
{{#if (not-eq type.value 'all')}}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<section class="header clearfix">
|
||||
<h1>Import pipeline.yml</h1>
|
||||
<h1>{{t 'importPage.header'}}</h1>
|
||||
</section>
|
||||
|
||||
<section class="container-fluid">
|
||||
{{input-text-file mode='yaml' accept=".yml, .yaml" name="pipeline.yml" canChangeName=false value=compose placeholder="pipelinesPage.importPlaceHolder"}}
|
||||
{{input-text-file mode='yaml' accept=".yml, .yaml" name="pipeline.yaml" canChangeName=false value=compose placeholder="pipelinesPage.importPlaceHolder"}}
|
||||
</section>
|
||||
|
||||
{{top-errors errors=errors}}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
<section class="header clearfix">
|
||||
<h1>Add Pipeline</h1>
|
||||
<h1>{{t 'newPipeline.header'}}</h1>
|
||||
</section>
|
||||
<div class="mt-10"></div>
|
||||
<section class="has-tabs clearfix row">
|
||||
<h1 class="col span-2" style="margin-top: 8px">{{input type="text" value=model.pipeline.name classNames="form-control" placeholder="Pipeline Name"}}</h1>
|
||||
<h1 class="col span-2" style="margin-top: 8px">{{input type="text" value=model.pipeline.name classNames="form-control"
|
||||
placeholder=(t 'newPipeline.name.placeholder')}}
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
<section class="pipeline-container">
|
||||
|
|
@ -30,4 +32,4 @@
|
|||
<div class="text-center pipeline-wrap-header-button">
|
||||
{{#save-cancel class="pipeline-save-cancel" createLabel="newPipeline.add" save="save" cancel="cancel"}}
|
||||
{{/save-cancel}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
export default [
|
||||
export default [
|
||||
{
|
||||
value: 'only',
|
||||
label: 'Only the branch'
|
||||
label: 'newPipelineStep.stepType.scm.branchConditionsEnums.only'
|
||||
}, {
|
||||
value: 'except',
|
||||
label: 'Everything but'
|
||||
label: 'newPipelineStep.stepType.scm.branchConditionsEnums.except'
|
||||
}, {
|
||||
value: 'all',
|
||||
label: 'All branches'
|
||||
}]
|
||||
label: 'newPipelineStep.stepType.scm.branchConditionsEnums.all'
|
||||
}]
|
||||
|
|
|
|||
|
|
@ -166,6 +166,11 @@ newPipelineStep:
|
|||
importFromRepo: Import Pipeline From Repository
|
||||
importPipelineSuccess: Imported From Branch <span class="text-info">{branch}</span>
|
||||
importPipelineFail: No Pipeline Found
|
||||
branchConditionsEnums:
|
||||
only: Only the branch
|
||||
except: Everything but
|
||||
all: All branches
|
||||
noWebhook: No permission to set webhook
|
||||
build:
|
||||
here: here
|
||||
label: publish an image
|
||||
|
|
@ -182,15 +187,22 @@ newPipelineStep:
|
|||
pushWarning3: to authenticate it.
|
||||
scope: "Scope: Available to all namespaces in this project"
|
||||
registryExist: Registry {registry} registered with {username}
|
||||
stepsChoices:
|
||||
task: run a script
|
||||
build: publish an image
|
||||
task:
|
||||
label: run a script
|
||||
runAsService: Run As a Service
|
||||
runAsServiceTip: Click this to make it a long running process/container.
|
||||
shellScript: Shell Script
|
||||
customEntryPoint: Custom Entrypoint
|
||||
command: Command
|
||||
command:
|
||||
label: Command
|
||||
placeholder: Arguments of entrypoint
|
||||
commandLabel: 'sh'
|
||||
entryPoint: EntryPoint
|
||||
entryPoint:
|
||||
label: EntryPoint
|
||||
placeholder: If you want use the default entrypoint, just leave me empty
|
||||
timeout: Timeout
|
||||
timeoutWarning: If a step does not complete by the specified amount of time (in minutes; at least 3), then the build will be terminated automatically and marked as Fail.
|
||||
minutes: minutes
|
||||
|
|
@ -204,6 +216,8 @@ newPipelineStep:
|
|||
targetEnv:
|
||||
label: Target another environment
|
||||
tip: Default target is current environment, if you want target another enviroment, then check this option.
|
||||
language:
|
||||
header: Language Environment
|
||||
|
||||
authPage:
|
||||
github:
|
||||
|
|
@ -300,3 +314,6 @@ authPage:
|
|||
pre: Authenticate with GitHub
|
||||
preVariable: Enable Pipeline
|
||||
post: Creating
|
||||
|
||||
importPage:
|
||||
header: Import pipeline.yaml
|
||||
|
|
|
|||
|
|
@ -167,6 +167,11 @@ newPipelineStep:
|
|||
importFromRepo: 从代码库导入Pipeline配置
|
||||
importPipelineSuccess: 从<span class="text-info">{branch}</span>分支导入
|
||||
importPipelineFail: 没有发现Pipeline
|
||||
branchConditionsEnums:
|
||||
only: Only the branch
|
||||
except: Everything but
|
||||
all: All branches
|
||||
noWebhook: No permission to set webhook
|
||||
build:
|
||||
here: 这里
|
||||
label: 上传镜像
|
||||
|
|
@ -183,15 +188,22 @@ newPipelineStep:
|
|||
pushWarning3: 去认证
|
||||
scope: "范围:可用于此项目中的所有命名空间"
|
||||
registryExist: 使用{username}注册的镜像仓库{registry}
|
||||
stepsChoices:
|
||||
task: run a script
|
||||
build: 发布镜像
|
||||
task:
|
||||
label: 运行一个脚本
|
||||
runAsService: 作为服务运行
|
||||
runAsServiceTip: 单击此按钮使之成为一个长时间运行的进程/容器
|
||||
shellScript: Shell脚本
|
||||
customEntryPoint: 自定义Entrypoint
|
||||
command: Command
|
||||
command:
|
||||
label: 命令
|
||||
placeholder: Arguments of entrypoint
|
||||
commandLabel: 'sh'
|
||||
entryPoint: EntryPoint
|
||||
entryPoint:
|
||||
label: EntryPoint
|
||||
placeholder: If you want use the default entrypoint, just leave me empty
|
||||
timeout: 超时时间
|
||||
timeoutWarning: 如果某个步骤在指定时间(以分钟为单位,默认3分钟)内未完成,则构建将自动终止并标记为“失败”
|
||||
minutes: 分钟
|
||||
|
|
@ -205,6 +217,8 @@ newPipelineStep:
|
|||
targetEnv:
|
||||
label: 目标环境非本环境
|
||||
tip: 默认目标环境为本环境,如果要将目标环境设定为其他环境,请勾选本选项
|
||||
language:
|
||||
header: 语言环境
|
||||
|
||||
authPage:
|
||||
github:
|
||||
|
|
@ -301,3 +315,5 @@ authPage:
|
|||
pre: GitHub验证
|
||||
preVariable: 启用Pipeline
|
||||
post: 等待GitHub返回
|
||||
importPage:
|
||||
header: 导入 pipeline.yaml
|
||||
|
|
|
|||
Loading…
Reference in New Issue