Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/translate #72

Merged
merged 33 commits into from Nov 30, 2018

Conversation

Projects
None yet
4 participants
@BennieMeng
Copy link
Collaborator

commented Nov 27, 2018

What type of PR is this?

/kind feature

What this PR does / why we need it:

https://github.com/Qihoo360/wayne/milestone/3

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

目前i18n 规划是先完整中文模板。
进度是首页namespace 5个item基本完成。
项目中完成了 项目概览,部署列表,创建模板。
开发了一个自动同步中文模板到其他模板的脚本 fill-lang.js , 运行 node fill-lang.js 完成同步。
@wilhelmguo

This comment has been minimized.

Copy link
Collaborator

commented Nov 27, 2018

/lgtm @chengyumeng

@BennieMeng BennieMeng referenced this pull request Nov 27, 2018

Open

International support #55

<wayne-checkbox>创建时间</wayne-checkbox>
<wayne-checkbox>创建者</wayne-checkbox>
<wayne-checkbox>操作</wayne-checkbox>
<wayne-checkbox value="name">{{'TITEL.NAME' | translate}}</wayne-checkbox>

This comment has been minimized.

Copy link
@motecshine

This comment has been minimized.

Copy link
@BennieMeng

BennieMeng Nov 27, 2018

Author Collaborator

i also use the meaning of title, ., i will change this later

This comment has been minimized.

Copy link
@BennieMeng

BennieMeng Nov 27, 2018

Author Collaborator

@motecshine do you have interesting in constructing this issue.

This comment has been minimized.

Copy link
@motecshine

motecshine Nov 27, 2018

当然, 一直关注这个项目,这个pr还是你来吧

This comment has been minimized.

Copy link
@BennieMeng

BennieMeng Nov 28, 2018

Author Collaborator

@motecshine i will optimize the design kayframe of language json. maybe the job is a little boring and longless, if insteresting, contact me. laugh~

wilhelmguo and others added some commits Nov 27, 2018

</div>
<div class="table-search">
<div class="table-search-left">
<button *ngIf="authService.currentAppPermission.apiKey.create || authService.currentUser.admin" class="wayne-button normal"
(click)="openModal()">
创建APIKey
{{'ACTION.CREATE' | translate}} APIKey

This comment has been minimized.

Copy link
@chengyumeng

chengyumeng Nov 28, 2018

Collaborator

这种为什么不把创建 APIkeys 作为一个词条去翻译?

This comment has been minimized.

Copy link
@BennieMeng

BennieMeng Nov 28, 2018

Author Collaborator

apikey 叫什么,一开始为什么就是英文

This comment has been minimized.

Copy link
@wilhelmguo

wilhelmguo Nov 29, 2018

Collaborator

APIkeys 可以暂时先不翻译

@@ -15,13 +15,13 @@ <h3 class="modal-title">{{title}}</h3>
name="name"
required
id="name"
placeholder="名称"
[placeholder]="'TITEl.NAME' | translate"

This comment has been minimized.

Copy link
@chengyumeng

chengyumeng Nov 28, 2018

Collaborator

TITEL 拼写错误,我建议,这种翻译,应该对照成:[placeholder]="'TITEl.PLACEHOLDER' | translate" 这种,不然如果存在代码交接,就很难维护了,不知道开源库有没有名字限制呢?

This comment has been minimized.

Copy link
@BennieMeng

BennieMeng Nov 28, 2018

Author Collaborator

名称太通用了。没必要建立那么多命名空间吧。

This comment has been minimized.

Copy link
@wilhelmguo

wilhelmguo Nov 29, 2018

Collaborator

TITEl.NAME 这个拼写错误修改了么?

This comment has been minimized.

Copy link
@BennieMeng

BennieMeng Nov 29, 2018

Author Collaborator

修复了

@@ -35,7 +35,7 @@ <h3 class="modal-title">{{title}}</h3>
</div>
<div class="form-group row">
<div class="col-lg-3 col-md-12 col-sm-12 col-xs-12">
<label for="expire_in" class="required">过期时间</label>
<label for="expire_in" class="required">{{'TITLE.EXPIRE_TIME' | translate}}</label>

This comment has been minimized.

Copy link
@chengyumeng

chengyumeng Nov 28, 2018

Collaborator

为什么前面叫 expire_in,后面 key 叫expire_time?按照常用用法,应该是使用expire_in

This comment has been minimized.

Copy link
@BennieMeng

BennieMeng Nov 28, 2018

Author Collaborator

带时间的在translate中统一用time, 用你这种写法好维护?

@@ -44,13 +44,13 @@ <h3 class="modal-title">{{title}}</h3>
required
name="expire_in"
id="expire_in"
placeholder="单位秒,0代表永久有效"
[placeholder]="'PLACEHOLDER.EXPIRE_TIME' | translate"

This comment has been minimized.

Copy link
@chengyumeng

chengyumeng Nov 28, 2018

Collaborator

前面有一个 placeholder 写法是: [placeholder]="'TITEl.NAME' | translate",这里又这样关联,有问题吧?

This comment has been minimized.

Copy link
@BennieMeng

BennieMeng Nov 28, 2018

Author Collaborator

建议仔细看一下配置。除了个别通用的,placeholder 都是放在PLACHOLDER里边的

@@ -1,5 +1,5 @@
<clr-modal [(clrModalOpen)]="modalOpened">
<h3 class="modal-title">查看token</h3>
<h3 class="modal-title">{{'ACTION.LOOK_UP' | translate}}token</h3>

This comment has been minimized.

Copy link
@chengyumeng

chengyumeng Nov 28, 2018

Collaborator

“查看”可以翻译为 view,是比较通用的翻译。

This comment has been minimized.

Copy link
@BennieMeng

BennieMeng Nov 28, 2018

Author Collaborator

水平不行啊,你来翻译?

@@ -8,18 +8,18 @@
<svg style="width: 16px; height: 16px;fill: #377aec; margin-right: 5px;" viewBox="0, 0, 40 , 40" xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="18.5" width="40" height="3" rx="1.5" ry="1.5"></rect>
<rect x="18.5" y="0" width="3" height="40" rx="1.5" ry="1.5"></rect>
</svg> 创建项目
</svg> {{'TITLE.CREATE_PRODUCT' | translate}}

This comment has been minimized.

Copy link
@chengyumeng

chengyumeng Nov 28, 2018

Collaborator

Product -> Project

This comment has been minimized.

Copy link
@BennieMeng

BennieMeng Nov 28, 2018

Author Collaborator

这里会改成app,

<wayne-progress [count]="resources[cluster.name].usage.cpu" [total]="dealLimitLogic(resources[cluster.name].limit.cpu)"></wayne-progress>
</div>
<div style="display: flex;">
<div>内存使用(G)</div>
<div style="font-family: monospace;">{{'TITLE.MEMORY_USAGE_SHORT' | translate}}</div>

This comment has been minimized.

Copy link
@chengyumeng

chengyumeng Nov 28, 2018

Collaborator

short 后缀是有 long 什么的 key 么?

This comment has been minimized.

Copy link
@BennieMeng

BennieMeng Nov 28, 2018

Author Collaborator

是因为有正常的,不一定是有long

},
"OTHER": "其他",
"OF": ""
}

This comment has been minimized.

Copy link
@chengyumeng

chengyumeng Nov 28, 2018

Collaborator

中英文之间加空格。建议作者自己描述下这个文件的设计规则。

@chengyumeng chengyumeng self-requested a review Nov 28, 2018

BennieMeng added some commits Nov 28, 2018

@wilhelmguo wilhelmguo merged commit 0f842c4 into Qihoo360:master Nov 30, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.