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
Merged

Feature/translate #72

merged 33 commits into from
Nov 30, 2018

Conversation

BennieMeng
Copy link
Collaborator

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 wilhelmguo added kind/feature Categorizes issue or PR as related to a new feature. sig/frontend Categorizes an issue or PR as relevant to sig-frontend. labels Nov 27, 2018
@wilhelmguo
Copy link
Collaborator

/lgtm @chengyumeng

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo ? TITLE

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@motecshine do you have interesting in constructing this issue.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

</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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APIkeys 可以暂时先不翻译

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修复了

@@ -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>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

带时间的在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"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议仔细看一下配置。除了个别通用的,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>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

水平不行啊,你来翻译?

@@ -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}}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Product -> Project

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里会改成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>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

},
"OTHER": "其他",
"OF": "的"
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@chengyumeng chengyumeng self-requested a review November 28, 2018 06:49
@wilhelmguo wilhelmguo merged commit 0f842c4 into Qihoo360:master Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. sig/frontend Categorizes an issue or PR as relevant to sig-frontend.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants