Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
89122a2
frontend: 添加en zh-Hans 俩种模板语言
BennieMeng Nov 22, 2018
0c554aa
frontend: 添加语言切换
BennieMeng Nov 22, 2018
f7d5c65
frontend: 前台nav i18n
BennieMeng Nov 22, 2018
7f2e57c
frontend: sidenav-namespance i18n
BennieMeng Nov 22, 2018
c871d71
frontend: Department i18n
BennieMeng Nov 23, 2018
b79f89d
frontend: product i18n
BennieMeng Nov 23, 2018
fde8166
frontend: namespace apikey i18n
BennieMeng Nov 23, 2018
ac5d758
frontend: deployment i18n
BennieMeng Nov 27, 2018
dc9b2f6
frontend: deployment-create-tpl i18n
BennieMeng Nov 27, 2018
a1e15ae
frontend: 语言切换位置显示
BennieMeng Nov 27, 2018
74a0344
Merge branch 'master' into feature/translate
wilhelmguo Nov 27, 2018
78c6723
Merge branch 'master' into feature/translate
wilhelmguo Nov 27, 2018
3f74bc4
frontend: replace titel with title
BennieMeng Nov 27, 2018
c51c04e
Merge branch 'feature/translate' of github.com:BennieMeng/wayne into …
BennieMeng Nov 27, 2018
85bd3cc
Merge branch 'master' into feature/translate
wilhelmguo Nov 28, 2018
a570801
Merge branch 'master' into feature/translate
wilhelmguo Nov 28, 2018
b8addd2
frontend: separate template title into TMP
BennieMeng Nov 28, 2018
0b0bbf5
Merge branch 'feature/translate' of github.com:BennieMeng/wayne into …
BennieMeng Nov 28, 2018
0617cb5
frontend: statefulset list i18n
BennieMeng Nov 28, 2018
ed1a89f
frontend: replace create_product to create_app
BennieMeng Nov 28, 2018
3bc84b4
frontend: statefulset template i18n
BennieMeng Nov 28, 2018
9ce9194
frontend: daemonset i18n create
BennieMeng Nov 28, 2018
a9ff90f
Merge branch 'master' into feature/translate
BennieMeng Nov 28, 2018
d5136da
frontend: group replace create template word
BennieMeng Nov 29, 2018
a9d74e1
Merge branch 'master' into feature/translate
BennieMeng Nov 29, 2018
43fd38b
frontend: daemonset i18n
BennieMeng Nov 29, 2018
52afaa9
frontend: group replace create i18n
BennieMeng Nov 29, 2018
f5e9b49
Merge branch 'feature/translate' of github.com:BennieMeng/wayne into …
BennieMeng Nov 29, 2018
28e0dc7
frontend: configmap i18n
BennieMeng Nov 30, 2018
5f72414
frontend: secret i18n
BennieMeng Nov 30, 2018
b5f08b9
frontend: pvc i18n
BennieMeng Nov 30, 2018
56f2f4a
frontend: update lib
BennieMeng Nov 30, 2018
9fa3b40
Merge branch 'master' of github.com:Qihoo360/wayne into feature/trans…
BennieMeng Nov 30, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
frontend: replace titel with title
  • Loading branch information
BennieMeng committed Nov 27, 2018
commit 3f74bc467716ccbd7d6cbc3bcc25530d56be7bd2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="row flex-items-xs-between flex-items-xs-top" style="padding-left: 15px; padding-right: 15px;">
<h2 class="header-title">APIKey {{'TITEL.LIST' | translate}}</h2>
<h2 class="header-title">APIKey {{'TITLE.LIST' | translate}}</h2>
</div>
<div class="table-search">
<div class="table-search-left">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h3 class="modal-title">{{title | translate}}APIKey</h3>
<section class="form-block">
<div class="form-group row">
<div class="col-lg-3 col-md-12 col-sm-12 col-xs-12">
<label for="name" class="required">{{'TITEL.NAME' | translate}}</label>
<label for="name" class="required">{{'TITLE.NAME' | translate}}</label>
</div>
<div class="col-lg-8 col-md-4 col-sm-12 col-xs-12">
<input class="form-control"
Expand All @@ -21,7 +21,7 @@ <h3 class="modal-title">{{title | translate}}APIKey</h3>
</div>
<div class="form-group row">
<div class="col-lg-3 col-md-12 col-sm-12 col-xs-12">
<label for="role" class="required">{{'TITEL.ROLE' | translate}}</label>
<label for="role" class="required">{{'TITLE.ROLE' | translate}}</label>
</div>
<div class="col-lg-8 col-md-4 col-sm-12 col-xs-12">
<div class="select">
Expand All @@ -35,7 +35,7 @@ <h3 class="modal-title">{{title | translate}}APIKey</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">{{'TITEL.EXPIRE_TIME' | translate}}</label>
<label for="expire_in" class="required">{{'TITLE.EXPIRE_TIME' | translate}}</label>
Copy link
Copy Markdown
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
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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

</div>
<div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
<input class="form-control"
Expand All @@ -50,7 +50,7 @@ <h3 class="modal-title">{{title | translate}}APIKey</h3>
</div>
<div class="form-group row">
<div class="col-lg-3 col-md-12 col-sm-12 col-xs-12">
<label for="description">{{'TITEL.DESCRIPTION' | translate}}</label>
<label for="description">{{'TITLE.DESCRIPTION' | translate}}</label>
</div>
<div class="col-lg-8 col-md-4 col-sm-12 col-xs-12">
<textarea class="form-control"
Expand Down
20 changes: 10 additions & 10 deletions src/frontend/src/app/portal/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -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> {{'TITEL.CREATE_PRODUCT' | translate}}
</svg> {{'TITLE.CREATE_PRODUCT' | translate}}
Copy link
Copy Markdown
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
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

这里会改成app,

</div>
</wayne-card>
<ng-container *ngFor="let cluster of clusters; let i = index">
<wayne-card @cardState *ngIf="cluster.state" [header]="cluster.name">
<div style="flex: 1; margin-top: 12px; display: flex; flex-direction: column; justify-content: space-around;">
<div style="display: flex;">
<div style="font-family: monospace;">{{'TITEL.CPU_USAGE_SHORT' | translate}}</div>
<div style="font-family: monospace;">{{'TITLE.CPU_USAGE_SHORT' | translate}}</div>
<wayne-progress [count]="resources[cluster.name].usage.cpu" [total]="dealLimitLogic(resources[cluster.name].limit.cpu)"></wayne-progress>
</div>
<div style="display: flex;">
<div style="font-family: monospace;">{{'TITEL.MEMORY_USAGE_SHORT' | translate}}</div>
<div style="font-family: monospace;">{{'TITLE.MEMORY_USAGE_SHORT' | translate}}</div>
Copy link
Copy Markdown
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
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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

<wayne-progress [count]="resources[cluster.name].usage.memory" [total]="dealLimitLogic(resources[cluster.name].limit.memory)"></wayne-progress>
</div>
</div>
Expand All @@ -40,15 +40,15 @@
<wayne-box>
<div class="table-search" style="padding: 0 15px;">
<div class="table-search-left">
<button class="wayne-button active" [class.active]="!starredFilter" (click)="starredChange(false)">{{'TITEL.ALL_CONTENT' | translate}}</button>
<button class="wayne-button" [class.active]="starredFilter" (click)="starredChange(true)">{{'TITEL.COLLECTED' | translate}}</button>
<button class="wayne-button active" [class.active]="!starredFilter" (click)="starredChange(false)">{{'TITLE.ALL_CONTENT' | translate}}</button>
<button class="wayne-button" [class.active]="starredFilter" (click)="starredChange(true)">{{'TITLE.COLLECTED' | translate}}</button>
<wayne-filter-box (confirm)="confirmEvent()" (cancel)="cancelEvent()">
<wayne-checkbox-group class=".filter-body-content" [(ngModel)]="showList">
<wayne-checkbox value="name">{{'TITEL.NAME' | translate}}</wayne-checkbox>
<wayne-checkbox value="description">{{'TITEL.DESCRIPTION' | translate}}</wayne-checkbox>
<wayne-checkbox value="create_time">{{'TITEL.CREATE_TIME' | translate}}</wayne-checkbox>
<wayne-checkbox value="create_user">{{'TITEL.CREATE_USER' | translate}}</wayne-checkbox>
<wayne-checkbox value="action">{{'TITEL.ACTION' | translate}}</wayne-checkbox>
<wayne-checkbox value="name">{{'TITLE.NAME' | translate}}</wayne-checkbox>
<wayne-checkbox value="description">{{'TITLE.DESCRIPTION' | translate}}</wayne-checkbox>
<wayne-checkbox value="create_time">{{'TITLE.CREATE_TIME' | translate}}</wayne-checkbox>
<wayne-checkbox value="create_user">{{'TITLE.CREATE_USER' | translate}}</wayne-checkbox>
<wayne-checkbox value="action">{{'TITLE.ACTION' | translate}}</wayne-checkbox>
</wayne-checkbox-group>
</wayne-filter-box>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ <h3 class="modal-title">{{appTitle}}</h3>
<form #appForm="ngForm">
<section class="form-block">
<div class="form-group" style="padding-left: 135px;">
<label for="app_name" class="col-md-3 form-group-label-override required">{{'TITEL.NAME' | translate}}</label>
<label for="app_name" class="col-md-3 form-group-label-override required">{{'TITLE.NAME' | translate}}</label>
<label for="app_name" aria-haspopup="true" role="tooltip" [class.invalid]="!isNameValid" class="tooltip tooltip-validation tooltip-md tooltip-bottom-left form-control">
<input class="form-control" type="text" id="app_name" [(ngModel)]="app.name"
name="app_name" size="32"
Expand All @@ -21,15 +21,15 @@ <h3 class="modal-title">{{appTitle}}</h3>
<span class="spinner spinner-inline" [hidden]="!checkOnGoing"></span>
</div>
<div hidden class="form-group" style="padding-left: 135px;">
<label for="app_metadata" class="col-md-3 form-group-label-override">{{'TITEL.METADATA' | translate}}</label>
<label for="app_metadata" class="col-md-3 form-group-label-override">{{'TITLE.METADATA' | translate}}</label>
<textarea id="app_metadata" [(ngModel)]="app.metaData"
name="app_metadata"
rows="3">
</textarea>

</div>
<div class="form-group" style="padding-left: 135px;">
<label for="app_description" class="col-md-3 form-group-label-override">{{'TITEL.DESCRIPTION' | translate}}</label>
<label for="app_description" class="col-md-3 form-group-label-override">{{'TITLE.DESCRIPTION' | translate}}</label>
<textarea id="app_description" [(ngModel)]="app.description"
name="app_description"
rows="3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ <h2 class="header-title" style="margin-top: 12px;white-space: nowrap;">{{'MENU.A
<section class="form-block form-box">
<div class="row group">
<div class="col-sm-2">
{{'TITEL.NAME' | translate}}
{{'TITLE.NAME' | translate}}
</div>
<div class="col-sm-10">
{{app.name}}
</div>
</div>
<div class="row group">
<div class="col-sm-2">
{{'TITEL.CREATE_USER' | translate}}
{{'TITLE.CREATE_USER' | translate}}
</div>
<div class="col-sm-10">
{{app.user}}
</div>
</div>
<div class="row group">
<div class="col-sm-2">
{{'TITEL.CREATE_TIME' | translate}}
{{'TITLE.CREATE_TIME' | translate}}
</div>
<div class="col-sm-10">
{{app.createTime | date:'yyyy-MM-dd HH:mm:ss'}}
</div>
</div>
<div class="row group">
<div class="col-sm-2">
{{'TITEL.EXPLAIN' | translate}}
{{'TITLE.EXPLAIN' | translate}}
</div>
<div class="col-sm-10">
{{app.description}}
Expand All @@ -41,8 +41,8 @@ <h2 class="header-title" style="margin-top: 12px;white-space: nowrap;">{{'MENU.A
<div class="row group">
<div class="col-sm-2">
<div class="flex" style="height:70px;flex-direction: column; justify-content:space-around;">
<span>{{'TITEL.CPU_USAGE' | translate}}</span>
<span>{{'TITEL.MEMORY_USAGE' | translate}}</span>
<span>{{'TITLE.CPU_USAGE' | translate}}</span>
<span>{{'TITLE.MEMORY_USAGE' | translate}}</span>
</div>
</div>
<div class="col-sm-10">
Expand Down
10 changes: 5 additions & 5 deletions src/frontend/src/app/portal/app/list-app/list-app.component.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<clr-datagrid (clrDgRefresh)="refresh($event)" class="wayne-clr-datagrid">
<clr-dg-column>
<ng-container *clrDgHideableColumn="showState['name']">{{'TITEL.NAME' | translate}}</ng-container>
<ng-container *clrDgHideableColumn="showState['name']">{{'TITLE.NAME' | translate}}</ng-container>
</clr-dg-column>
<clr-dg-column>
<ng-container *clrDgHideableColumn="showState['description']">{{'TITEL.DESCRIPTION' | translate}}</ng-container>
<ng-container *clrDgHideableColumn="showState['description']">{{'TITLE.DESCRIPTION' | translate}}</ng-container>
</clr-dg-column>
<clr-dg-column class="col-time">
<ng-container *clrDgHideableColumn="showState['create_time']">{{'TITEL.CREATE_TIME' | translate}}</ng-container>
<ng-container *clrDgHideableColumn="showState['create_time']">{{'TITLE.CREATE_TIME' | translate}}</ng-container>
</clr-dg-column>
<clr-dg-column>
<ng-container *clrDgHideableColumn="showState['create_user']">{{'TITEL.CREATE_USER' | translate}}</ng-container>
<ng-container *clrDgHideableColumn="showState['create_user']">{{'TITLE.CREATE_USER' | translate}}</ng-container>
</clr-dg-column>
<clr-dg-column class="col-operate">
<ng-container *clrDgHideableColumn="showState['action']">{{'TITEL.ACTION' | translate}}</ng-container>
<ng-container *clrDgHideableColumn="showState['action']">{{'TITLE.ACTION' | translate}}</ng-container>
</clr-dg-column>

<clr-dg-row *ngFor="let app of apps" [clrDgItem]="app">
Expand Down
Loading