Skip to content

Commit 89ac137

Browse files
author
Atanas Mirchev
committed
Localization of the Pod List and -Details pages
1 parent 3674b44 commit 89ac137

File tree

11 files changed

+168
-27
lines changed

11 files changed

+168
-27
lines changed

i18n/messages-en.xtb

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,4 +274,25 @@
274274
<translation id="100607008425520225" key="MSG_REPLICA_SET_DETAIL_PODS_FAILED_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="The message says that that many pods have failed (replica set details page)."><ph name="PODS_COUNT" /> failed</translation>
275275
<translation id="2341408397568673692" key="MSG_REPLICA_SET_DETAIL_PODS_DESIRED_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="The message says that that many pods are desired to run (replica set details page)."><ph name="PODS_COUNT" /> desired</translation>
276276
<translation id="4426855330749728668" key="MSG_SERVICE_IS_PENDING_TOOLTIP" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="tooltip for pending pod card icon">This service is in a pending state.</translation>
277-
</translationbundle>
277+
<translation id="1981947217630112340" key="MSG_POD_DETAIL_OVERVIEW_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Overview', which appears on the first navigation tab on the pod details page.">Overview</translation>
278+
<translation id="6535344598923938501" key="MSG_POD_DETAIL_RESOURCE_DETAILS_TITLE" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Title 'Resource details' at the top pod details view.">Resource details</translation>
279+
<translation id="6350033485121033701" key="MSG_POD_DETAIL_DETAILS_SUBTITLE" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Subtitle 'Details' at the top of the resource details column at the pod detail view.">Details</translation>
280+
<translation id="4406605013231859775" key="MSG_POD_DETAIL_NAME_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Name' for the pod name in details part (left) of the pod details view.">Name</translation>
281+
<translation id="5318045602425553320" key="MSG_POD_DETAIL_NAMESPACE_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Namespace' for the pod namespace in details part (left) of the pod details view.">Namespace</translation>
282+
<translation id="1061717292860935495" key="MSG_POD_DETAIL_START_TIME_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Start time' for the pod start time in details part (left) of the pod details view.">Start time</translation>
283+
<translation id="4710154815143693189" key="MSG_POD_DETAIL_LABELS_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Labels' for the pod labels in details part (left) of the pod details view.">Labels</translation>
284+
<translation id="6868243110695703441" key="MSG_POD_DETAIL_STATUS_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Status' for the pod status in details part (left) of the pod details view.">Status</translation>
285+
<translation id="7234870523729752391" key="MSG_POD_DETAIL_IMAGES_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Images' for the pod container images in details part (left) of the pod details view.">Images</translation>
286+
<translation id="4931692549009893798" key="MSG_POD_DETAIL_NETWORK_SUBTITLE" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Subtitle 'Network' at the top of the column about network connectivity (right) at the pod detail view.">Network</translation>
287+
<translation id="3641312077053067702" key="MSG_POD_DETAIL_NODE_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Node' for the node a pods is running on, appears in the connectivity part (right) of the pod details view.">Node</translation>
288+
<translation id="1489132350749911645" key="MSG_POD_DETAIL_IP_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'IP' for the pod internal IP, appears in the connectivity part (right) of the pod details view.">IP</translation>
289+
<translation id="778953502246541412" key="MSG_POD_LIST_ACTION_BAR_DEPLOY_TOOLTIP" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Tooltip 'Deploy a containerized app' which appears on the pod list page when you hover over the '+' button at the action bar.">Deploy a containerized app</translation>
290+
<translation id="240453070925206277" key="MSG_POD_LIST_STARTED_AT_TOOLTIP" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Tooltip 'Started at [some date]' showing the exact start time of the pod.">Started at <ph name="START_DATE" /> UTC</translation>
291+
<translation id="7578976692932133236" key="MSG_POD_LIST_NAME_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Name' which appears as a column label in the table of pods (pod list view).">Name</translation>
292+
<translation id="819662772032493143" key="MSG_POD_LIST_STATUS_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Status' which appears as a column label in the table of pods (pod list view).">Status</translation>
293+
<translation id="3120633571570345224" key="MSG_POD_LIST_RESTARTS_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Restarts' which appears as a column label in the table of pods (pod list view).">Restarts</translation>
294+
<translation id="2224050264054646872" key="MSG_POD_LIST_AGE_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Age' which appears as a column label in the table of pods (pod list view).">Age</translation>
295+
<translation id="2693446009711847579" key="MSG_POD_LIST_CLUSTER_IP_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Cluster IP' which appears as a column label in the table of pods (pod list view).">Cluster IP</translation>
296+
<translation id="5813142739866251633" key="MSG_POD_LIST_LOGS_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Logs' for the pod's logs which appears as a column label in the table of pods (pod list view).">Logs</translation>
297+
<translation id="7960943445839044368" key="MSG_POD_LIST_POD_TITLE" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Title 'Pod' which is used as a title for the delete/update dialogs (that can be opened from the pod list view.)">Pod</translation>
298+
</translationbundle>

i18n/messages-ja.xtb

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,4 +274,25 @@
274274
<translation id="100607008425520225" key="MSG_REPLICA_SET_DETAIL_PODS_FAILED_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="The message says that that many pods have failed (replica set details page)."><ph name="PODS_COUNT" /> failed</translation>
275275
<translation id="2341408397568673692" key="MSG_REPLICA_SET_DETAIL_PODS_DESIRED_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="The message says that that many pods are desired to run (replica set details page)."><ph name="PODS_COUNT" /> desired</translation>
276276
<translation id="4426855330749728668" key="MSG_SERVICE_IS_PENDING_TOOLTIP" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="tooltip for pending pod card icon">This service is in a pending state.</translation>
277-
</translationbundle>
277+
<translation id="1981947217630112340" key="MSG_POD_DETAIL_OVERVIEW_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Overview', which appears on the first navigation tab on the pod details page.">Overview</translation>
278+
<translation id="6535344598923938501" key="MSG_POD_DETAIL_RESOURCE_DETAILS_TITLE" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Title 'Resource details' at the top pod details view.">Resource details</translation>
279+
<translation id="6350033485121033701" key="MSG_POD_DETAIL_DETAILS_SUBTITLE" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Subtitle 'Details' at the top of the resource details column at the pod detail view.">Details</translation>
280+
<translation id="4406605013231859775" key="MSG_POD_DETAIL_NAME_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Name' for the pod name in details part (left) of the pod details view.">Name</translation>
281+
<translation id="5318045602425553320" key="MSG_POD_DETAIL_NAMESPACE_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Namespace' for the pod namespace in details part (left) of the pod details view.">Namespace</translation>
282+
<translation id="1061717292860935495" key="MSG_POD_DETAIL_START_TIME_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Start time' for the pod start time in details part (left) of the pod details view.">Start time</translation>
283+
<translation id="4710154815143693189" key="MSG_POD_DETAIL_LABELS_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Labels' for the pod labels in details part (left) of the pod details view.">Labels</translation>
284+
<translation id="6868243110695703441" key="MSG_POD_DETAIL_STATUS_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Status' for the pod status in details part (left) of the pod details view.">Status</translation>
285+
<translation id="7234870523729752391" key="MSG_POD_DETAIL_IMAGES_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Images' for the pod container images in details part (left) of the pod details view.">Images</translation>
286+
<translation id="4931692549009893798" key="MSG_POD_DETAIL_NETWORK_SUBTITLE" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Subtitle 'Network' at the top of the column about network connectivity (right) at the pod detail view.">Network</translation>
287+
<translation id="3641312077053067702" key="MSG_POD_DETAIL_NODE_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Node' for the node a pods is running on, appears in the connectivity part (right) of the pod details view.">Node</translation>
288+
<translation id="1489132350749911645" key="MSG_POD_DETAIL_IP_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'IP' for the pod internal IP, appears in the connectivity part (right) of the pod details view.">IP</translation>
289+
<translation id="778953502246541412" key="MSG_POD_LIST_ACTION_BAR_DEPLOY_TOOLTIP" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Tooltip 'Deploy a containerized app' which appears on the pod list page when you hover over the '+' button at the action bar.">Deploy a containerized app</translation>
290+
<translation id="240453070925206277" key="MSG_POD_LIST_STARTED_AT_TOOLTIP" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Tooltip 'Started at [some date]' showing the exact start time of the pod.">Started at <ph name="START_DATE" /> UTC</translation>
291+
<translation id="7578976692932133236" key="MSG_POD_LIST_NAME_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Name' which appears as a column label in the table of pods (pod list view).">Name</translation>
292+
<translation id="819662772032493143" key="MSG_POD_LIST_STATUS_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Status' which appears as a column label in the table of pods (pod list view).">Status</translation>
293+
<translation id="3120633571570345224" key="MSG_POD_LIST_RESTARTS_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Restarts' which appears as a column label in the table of pods (pod list view).">Restarts</translation>
294+
<translation id="2224050264054646872" key="MSG_POD_LIST_AGE_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Age' which appears as a column label in the table of pods (pod list view).">Age</translation>
295+
<translation id="2693446009711847579" key="MSG_POD_LIST_CLUSTER_IP_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Cluster IP' which appears as a column label in the table of pods (pod list view).">Cluster IP</translation>
296+
<translation id="5813142739866251633" key="MSG_POD_LIST_LOGS_LABEL" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Label 'Logs' for the pod's logs which appears as a column label in the table of pods (pod list view).">Logs</translation>
297+
<translation id="7960943445839044368" key="MSG_POD_LIST_POD_TITLE" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Title 'Pod' which is used as a title for the delete/update dialogs (that can be opened from the pod list view.)">Pod</translation>
298+
</translationbundle>

src/app/frontend/poddetail/poddetail.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<div layout="column">
1818
<md-content>
1919
<md-tabs md-border-bottom md-dynamic-height>
20-
<md-tab label="Overview">
20+
<md-tab label="{{::ctrl.i18n.MSG_POD_DETAIL_OVERVIEW_LABEL}}">
2121
<kd-pod-info pod="::ctrl.podDetail"></kd-pod-info>
2222
</md-tab>
2323
</md-tabs>

src/app/frontend/poddetail/poddetail_controller.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,14 @@ export class PodDetailController {
2323
constructor(podDetail) {
2424
/** @export {!backendApi.PodDetail} */
2525
this.podDetail = podDetail;
26+
27+
/** @export */
28+
this.i18n = i18n;
2629
}
2730
}
31+
32+
const i18n = {
33+
/** @export {string} @desc Label 'Overview', which appears on the first navigation tab on the pod
34+
details page. */
35+
MSG_POD_DETAIL_OVERVIEW_LABEL: goog.getMsg('Overview'),
36+
};

src/app/frontend/poddetail/podinfo.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,42 +15,42 @@
1515
-->
1616

1717
<kd-info-card>
18-
<kd-info-card-header>Resource details</kd-info-card-header>
19-
<kd-info-card-section name="Details">
20-
<kd-info-card-entry title="Name">
18+
<kd-info-card-header>{{::$ctrl.i18n.MSG_POD_DETAIL_RESOURCE_DETAILS_TITLE}}</kd-info-card-header>
19+
<kd-info-card-section name="{{::$ctrl.i18n.MSG_POD_DETAIL_DETAILS_SUBTITLE}}">
20+
<kd-info-card-entry title="{{::$ctrl.i18n.MSG_POD_DETAIL_NAME_LABEL}}">
2121
<kd-middle-ellipsis
2222
display-string="{{::$ctrl.pod.objectMeta.name}}">
2323
</kd-middle-ellipsis>
2424
</kd-info-card-entry>
25-
<kd-info-card-entry title="Namespace">
25+
<kd-info-card-entry title="{{::$ctrl.i18n.MSG_POD_DETAIL_NAMESPACE_LABEL}}">
2626
{{::$ctrl.pod.objectMeta.namespace}}
2727
</kd-info-card-entry>
28-
<kd-info-card-entry title="Start Time">
28+
<kd-info-card-entry title="{{::$ctrl.i18n.MSG_POD_DETAIL_START_TIME_LABEL}}">
2929
{{::$ctrl.pod.objectMeta.creationTimestamp | date:'d/M/yy HH:mm':'UTC'}}
3030
</kd-info-card-entry>
31-
<kd-info-card-entry title="Labels">
31+
<kd-info-card-entry title="{{::$ctrl.i18n.MSG_POD_DETAIL_LABELS_LABEL}}">
3232
<div ng-if="::$ctrl.pod.objectMeta.labels">
3333
<kd-labels labels="::$ctrl.pod.objectMeta.labels"></kd-labels>
3434
</div>
3535
<div ng-hide="::$ctrl.pod.objectMeta.labels">
3636
none
3737
</div>
3838
</kd-info-card-entry>
39-
<kd-info-card-entry title="Status">
39+
<kd-info-card-entry title="{{::$ctrl.i18n.MSG_POD_DETAIL_STATUS_LABEL}}">
4040
{{::$ctrl.pod.podPhase}}
4141
</kd-info-card-entry>
42-
<kd-info-card-entry title="Images">
42+
<kd-info-card-entry title="{{::$ctrl.i18n.MSG_POD_DETAIL_IMAGES_LABEL}}">
4343
<div ng-repeat="image in ::$ctrl.pod.containerImages">
4444
<kd-middle-ellipsis display-string="{{::image}}"></kd-middle-ellipsis>
4545
</div>
4646
</kd-info-card-entry>
4747
</kd-info-card-section>
4848

49-
<kd-info-card-section name="Network">
50-
<kd-info-card-entry title="Node">
49+
<kd-info-card-section name="{{::$ctrl.i18n.MSG_POD_DETAIL_NETWORK_SUBTITLE}}">
50+
<kd-info-card-entry title="{{::$ctrl.i18n.MSG_POD_DETAIL_NODE_LABEL}}">
5151
{{::$ctrl.pod.nodeName}}
5252
</kd-info-card-entry>
53-
<kd-info-card-entry title="IP">
53+
<kd-info-card-entry title="{{::$ctrl.i18n.MSG_POD_DETAIL_IP_LABEL}}">
5454
{{::$ctrl.pod.podIP}}
5555
</kd-info-card-entry>
5656
</kd-info-card-section>

src/app/frontend/poddetail/podinfo_component.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ export default class PodInfoController {
2525
* @export {!backendApi.PodDetail}
2626
*/
2727
this.pod;
28+
29+
/** @export */
30+
this.i18n = i18n;
2831
}
2932
}
3033

@@ -41,3 +44,40 @@ export const podInfoComponent = {
4144
'pod': '<',
4245
},
4346
};
47+
48+
const i18n = {
49+
/** @export {string} @desc Title 'Resource details' at the top pod details view. */
50+
MSG_POD_DETAIL_RESOURCE_DETAILS_TITLE: goog.getMsg('Resource details'),
51+
/** @export {string} @desc Subtitle 'Details' at the top of the resource details column at the
52+
pod detail view.*/
53+
MSG_POD_DETAIL_DETAILS_SUBTITLE: goog.getMsg('Details'),
54+
/** @export {string} @desc Label 'Name' for the pod name in details part (left) of the pod
55+
details view.*/
56+
MSG_POD_DETAIL_NAME_LABEL: goog.getMsg('Name'),
57+
/** @export {string} @desc Label 'Namespace' for the pod namespace in details part (left) of the
58+
pod
59+
details view.*/
60+
MSG_POD_DETAIL_NAMESPACE_LABEL: goog.getMsg('Namespace'),
61+
/** @export {string} @desc Label 'Start time' for the pod start time in details part (left) of the
62+
pod
63+
details view.*/
64+
MSG_POD_DETAIL_START_TIME_LABEL: goog.getMsg('Start time'),
65+
/** @export {string} @desc Label 'Labels' for the pod labels in details part (left) of the pod
66+
details view.*/
67+
MSG_POD_DETAIL_LABELS_LABEL: goog.getMsg('Labels'),
68+
/** @export {string} @desc Label 'Status' for the pod status in details part (left) of the pod
69+
details view.*/
70+
MSG_POD_DETAIL_STATUS_LABEL: goog.getMsg('Status'),
71+
/** @export {string} @desc Label 'Images' for the pod container images in details part (left) of
72+
the pod details view.*/
73+
MSG_POD_DETAIL_IMAGES_LABEL: goog.getMsg('Images'),
74+
/** @export {string} @desc Subtitle 'Network' at the top of the column about network
75+
connectivity (right) at the pod detail view.*/
76+
MSG_POD_DETAIL_NETWORK_SUBTITLE: goog.getMsg('Network'),
77+
/** @export {string} @desc Label 'Node' for the node a pods is running on, appears in the
78+
connectivity part (right) of the pod details view.*/
79+
MSG_POD_DETAIL_NODE_LABEL: goog.getMsg('Node'),
80+
/** @export {string} @desc Label 'IP' for the pod internal IP, appears in the
81+
connectivity part (right) of the pod details view.*/
82+
MSG_POD_DETAIL_IP_LABEL: goog.getMsg('IP'),
83+
};

0 commit comments

Comments
 (0)