]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Add missing HTML translations
authorTiago Melo <tmelo@suse.com>
Tue, 6 Nov 2018 18:30:47 +0000 (18:30 +0000)
committerTiago Melo <tmelo@suse.com>
Wed, 14 Nov 2018 18:53:03 +0000 (18:53 +0000)
Signed-off-by: Tiago Melo <tmelo@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/mirroring.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-form/rbd-form.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-details/osd-details.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.html
src/pybind/mgr/dashboard/frontend/src/app/core/auth/login/login.component.html
src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.html
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notifications/notifications.component.html
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/task-manager/task-manager.component.html

index a4e61dc5b127b32ed8e1f76bb6b15f5c58ddd03f..4f733b3a8626a7e1c38b0c6875e55441dc535e4b 100644 (file)
@@ -72,7 +72,8 @@
 </ng-template>
 
 <ng-template #syncTmpl>
-  <span class="label label-info">Syncing</span>
+  <span class="label label-info"
+        i18n>Syncing</span>
 </ng-template>
 
 <ng-template #progressTmpl
index e9c50ab38d4c38ebbe45d74b918d3f87619b9a5c..1518374ab22f7ab90f234e88429e18f08c7a40b5 100644 (file)
                     formControlName="pool"
                     *ngIf="mode !== 'editing' && poolPermission.read">
               <option *ngIf="pools === null"
-                      [ngValue]="null">Loading...
+                      [ngValue]="null"
+                      i18n>Loading...
               </option>
               <option *ngIf="pools !== null && pools.length === 0"
-                      [ngValue]="null">-- No rbd pools available --
+                      [ngValue]="null"
+                      i18n>-- No rbd pools available --
               </option>
               <option *ngIf="pools !== null && pools.length > 0"
-                      [ngValue]="null">-- Select a pool --
+                      [ngValue]="null"
+                      i18n>-- Select a pool --
               </option>
               <option *ngFor="let pool of pools"
                       [value]="pool.pool_name">{{ pool.pool_name }}</option>
              *ngIf="rbdForm.getValue('useDataPool')">
           <label class="control-label col-sm-3"
                  for="dataPool">
-            Data pool
+            <ng-container i18n>Data pool</ng-container>
             <span class="required"
                   *ngIf="mode !== 'editing'"></span>
             <cd-helper i18n-html
                     (change)="onDataPoolChange($event.target.value)"
                     *ngIf="mode !== 'editing' && poolPermission.read">
               <option *ngIf="dataPools === null"
-                      [ngValue]="null">Loading...
+                      [ngValue]="null"
+                      i18n>Loading...
               </option>
               <option *ngIf="dataPools !== null && dataPools.length === 0"
-                      [ngValue]="null">-- No data pools available --
+                      [ngValue]="null"
+                      i18n>-- No data pools available --
               </option>
               <option *ngIf="dataPools !== null && dataPools.length > 0"
                       [ngValue]="null">-- Select a data pool --
index 36effcbe755c5887f0700d0b329f383ac1d2302d..c987c7fda68a747c59bdce0422f0cd6c28ad4e99 100644 (file)
@@ -1,5 +1,6 @@
 <div class="modal-header">
-  <h4 class="modal-title pull-left">{{ editing ? 'Rename' : 'Create' }} RBD Snapshot</h4>
+  <h4 class="modal-title pull-left"
+      i18n>{ editing, select, true {Rename} other {Create}} RBD Snapshot</h4>
   <button type="button"
           class="close pull-right"
           aria-label="Close"
   <div class="modal-footer">
     <div class="button-group text-right">
       <cd-submit-button [form]="snapshotForm"
-                        (submitAction)="submit()">
-        {{ editing ? 'Rename' : 'Create' }} Snapshot
+                        (submitAction)="submit()"
+                        i18n>
+        { editing, select, true {Rename} other {Create}} Snapshot
       </cd-submit-button>
       <button type="button"
               class="btn btn-sm btn-default"
-              (click)="modalRef.hide()">Close</button>
+              (click)="modalRef.hide()"
+              i18n>Close</button>
     </div>
   </div>
 </form>
index 53237ce7f0575eccc2b53c3b97b81b5be2647d84..a1ae6cd0dcbf5ac9a663729d13c593694ea8e6a4 100644 (file)
 <ng-template #protectTpl
              let-value="value">
   <span *ngIf="value"
-        class="label label-success">PROTECTED</span>
+        class="label label-success"
+        i18n>PROTECTED</span>
   <span *ngIf="!value"
-        class="label label-info">UNPROTECTED</span>
+        class="label label-info"
+        i18n>UNPROTECTED</span>
 </ng-template>
 
 <ng-template #rollbackTpl
              let-value>
-  You are about to rollback
+  <ng-container i18n>You are about to rollback</ng-container>
   <strong>{{ value.snapName }}</strong>.
 </ng-template>
index 1264bad635496ac0331d4a8cd6288688ee56b63e..96fc72928db119c83b1f2e9d0073857a7f26e974 100644 (file)
@@ -1,10 +1,12 @@
 <tabset *ngIf="selection.hasSingleSelection">
-  <tab heading="Attributes (OSD map)">
+  <tab heading="Attributes (OSD map)"
+       i18n-heading>
     <cd-table-key-value *ngIf="osd.loaded"
                         [data]="osd.details.osd_map">
     </cd-table-key-value>
   </tab>
-  <tab heading="Metadata">
+  <tab heading="Metadata"
+       i18n-heading>
     <cd-table-key-value *ngIf="osd.loaded && osd.details.osd_metadata; else noMetaData"
                         (fetchData)="refresh()"
                         [data]="osd.details.osd_metadata">
       </cd-warning-panel>
     </ng-template>
   </tab>
-  <tab heading="Performance counter">
+  <tab heading="Performance counter"
+       i18n-heading>
     <cd-table-performance-counter *ngIf="osd.loaded"
                                   serviceType="osd"
                                   [serviceId]="osd.id">
     </cd-table-performance-counter>
   </tab>
-  <tab heading="Histogram">
-    <cd-warning-panel i18n *ngIf="osd.loaded && osd.histogram_failed">
+  <tab heading="Histogram"
+       i18n-heading>
+    <cd-warning-panel i18n
+                      *ngIf="osd.loaded && osd.histogram_failed">
       Histogram not available: {{ osd.histogram_failed }}
     </cd-warning-panel>
 
-    <div class="row" *ngIf="osd.loaded && osd.details.histogram">
+    <div class="row"
+         *ngIf="osd.loaded && osd.details.histogram">
       <div class="col-md-6">
-        <h4>Writes</h4>
+        <h4 i18n>Writes</h4>
         <cd-osd-performance-histogram [histogram]="osd.details.histogram.osd.op_w_latency_in_bytes_histogram">
         </cd-osd-performance-histogram>
       </div>
       <div class="col-md-6">
-        <h4>Reads</h4>
+        <h4 i18n>Reads</h4>
         <cd-osd-performance-histogram [histogram]="osd.details.histogram.osd.op_r_latency_out_bytes_histogram">
         </cd-osd-performance-histogram>
       </div>
index fb9a17a6ed7001a3d27c00f83d7a0843e63b5d1b..f1ff153f8a469a54796dd9ddfcebe8dd6fde8b4c 100644 (file)
@@ -75,6 +75,8 @@
       {{ safeToDestroyResult.message }}
     </cd-warning-panel>
   </div>
-  <strong>OSD {{ selection.first().id }}</strong> will be
-  <strong>{{ actionDescription }}</strong> if you proceed.
+  <ng-container i18n>
+    <strong>OSD {{ selection.first().id }}</strong> will be
+    <strong>{{ actionDescription }}</strong> if you proceed.
+  </ng-container>
 </ng-template>
index 554dd5e9235c9736e1e8bde6e70ae7d34f99dcd5..3d9d5ffef65ec699e4442b85717696bea4304b4e 100644 (file)
@@ -30,7 +30,8 @@
                  required
                  autofocus>
           <div class="help-block"
-               *ngIf="(loginForm.submitted || username.dirty) && username.invalid">Username is required</div>
+               *ngIf="(loginForm.submitted || username.dirty) && username.invalid"
+               i18n>Username is required</div>
         </div>
 
         <!-- Password -->
             </span>
           </div>
           <div class="help-block"
-               *ngIf="(loginForm.submitted || password.dirty) && password.invalid">Password is required
+               *ngIf="(loginForm.submitted || password.dirty) && password.invalid"
+               i18n>Password is required
           </div>
         </div>
 
         <input type="submit"
                class="btn btn-primary btn-block"
                [disabled]="loginForm.invalid"
-               value="Login">
+               value="Login"
+               i18n-value>
       </form>
     </div>
   </div>
index daae3dfecf2f9cbe187a5d1d3011a1bea2711b0f..ea0dc14b53890133120700a7fc20b20e02e77fec 100644 (file)
 </div>
 
 <ng-template #removeSelfUserReadUpdatePermissionTpl>
-  <p><strong>You are about to remove "user read / update" permissions from your own user.</strong></p>
+  <p><strong i18n>You are about to remove "user read / update" permissions from your own user.</strong></p>
   <br>
-  <p>If you continue, you will no longer be able to add or remove roles from any user.</p>
+  <p i18n>If you continue, you will no longer be able to add or remove roles from any user.</p>
 
-  Are you sure you want to continue?
+  <ng-container i18n>Are you sure you want to continue?</ng-container>
 </ng-template>
index 2191b00b766fcf84ed7d4989c4bd793a37d61233..51ecd548ef361ae16f1614d8379172fee71d9f71 100644 (file)
@@ -1,8 +1,7 @@
 <ng-template #popTemplate>
   <div *ngIf="notifications.length > 0">
     <div class="separator">
-      Recent Notifications
-
+      <ng-container i18n>Recent Notifications</ng-container>
       <div *ngIf="notifications.length > 0"
            class="pull-right">
         <a (click)="removeAll()"
index bb08c339e67737c63707c78fe918db72c7a00cff..344a95c9190690be1b9064807082eb131d261ef0 100644 (file)
@@ -72,7 +72,7 @@
   </div>
   <!-- Empty -->
   <div *ngIf="executingTasks.length === 0 && finishedTasks.length === 0">
-    <div class="message">
+    <div class="message" i18n>
       There are no background tasks.
     </div>
   </div>