ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [39/64] [abbrv] ambari git commit: AMBARI-20589 Ambari Admin Web: optimize string constants definition. (ababiichuk)
Date Wed, 29 Mar 2017 11:57:43 GMT
http://git-wip-us.apache.org/repos/asf/ambari/blob/b1c88522/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
index b31e2c5..3bee2a1 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
@@ -25,7 +25,7 @@
   </ol>
 
   <div class="pull-right deregister-button" ng-switch="deleteEnabled"  ng-if="editController">
-    <button ng-switch-when="false" class="btn disabled btn-default" tooltip="Cannot delete
version already installed.">{{'versions.deregister' | translate}}</button>
+    <button ng-switch-when="false" class="btn disabled btn-default" tooltip="{{'versions.alerts.cannotDeleteInstalled'
| translate}}">{{'versions.deregister' | translate}}</button>
     <button ng-switch-when="true" class="btn btn-danger" ng-click="delete()">{{'versions.deregister'
| translate}}</button>
   </div>
 </div>
@@ -84,7 +84,7 @@
               </ul>
             </div>
             <div class="pull-right form-inline repo-version-inline" ng-if="activeStackVersion.isNonXMLdata">
-              <label class="control-label col-sm-1 repo-version-label">Name:</label>
+              <label class="control-label col-sm-1 repo-version-label">{{'common.name'
| translate}}:</label>
               <div class="col-sm-11">
                 <span class="control-label">
                   {{activeStackVersion.stackNameVersion}}
@@ -92,10 +92,10 @@
                 <span class="dot">.</span>
                 <div class="form-group" ng-class="{'has-error' : versionRegForm.version.$error.pattern}">
                   <input class="form-control" name="version" type="text" ng-model="activeStackVersion.editableDisplayName"
ng-pattern="subversionPattern"
-                         placeholder="Version Number (0.0)" ng-change="updateCurrentVersionInput()"
required/>
+                         placeholder="{{'versions.placeholder' | translate}}" ng-change="updateCurrentVersionInput()"
required/>
                 </div>
                 <div class="text-danger" ng-show="versionRegForm.version.$error.pattern">
-                    &nbsp{{activeStackVersion.displayName}} Invalid.
+                  &nbsp{{'common.alerts.isInvalid' | translate: '{term: activeStackVersion.displayName}'}}
                 </div>
               </div>
             </div>
@@ -138,7 +138,7 @@
           <button ng-show="supports.addingNewRepository" class="btn btn-primary pull-right
btn-xs pull-up"
                   ng-click="addRepository()">
             <span class="glyphicon glyphicon-plus"></span>
-            {{'common.add' | translate:'{ term: "Repository" }'}}
+            {{'versions.repository.add' | translate}}
           </button>
         </h3>
       </div>
@@ -156,7 +156,7 @@
                  tooltip="{{(isAddOsButtonDisabled() && !useRedhatSatellite)? ('versions.alerts.allOsAdded'
| translate) : ''}}"
                  dropdown>
               <button class="btn add-os-button dropdown-toggle" ng-disabled="isAddOsButtonDisabled()">
-                <i class="fa fa-plus" aria-hidden="true"></i> {{'common.add'
| translate}} &nbsp;<span
+                <i class="fa fa-plus" aria-hidden="true"></i> {{'common.controls.add'
| translate}} &nbsp;<span
                       class="caret"></span></button>
               <ul class="dropdown-menu" ng-class="{'hidden': hasNotDeletedRepo()}">
                 <li ng-repeat="os in osList"><a ng-if="os.selected==false" ng-click="addOS($event)">{{os.OperatingSystems.os_type}}</a>

http://git-wip-us.apache.org/repos/asf/ambari/blob/b1c88522/ambari-admin/src/main/resources/ui/admin-web/app/views/users/list.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/users/list.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/users/list.html
index 87e2be7..09024a5 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/users/list.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/users/list.html
@@ -33,7 +33,7 @@
           <span class="bottom-margin admin-filter glyphicon glyphicon-flash" 
             ng-class="{'no-filter' : !adminFilter}" 
             ng-click="toggleAdminFilter()"
-            tooltip="{{'users.' + (adminFilter ? 'showAll' : 'showAdmin') | translate}}"
+            tooltip="{{(adminFilter ? 'users.showAll' : 'users.showAdmin') | translate}}"
           ></span>
         </th>
         <th>
@@ -71,7 +71,7 @@
            <a href="#/users/{{user.Users.encoded_name}}">{{user.Users.user_name}}</a>
         </td>
         <td>{{user.Users.userTypeName}}</td>
-        <td><span ng-class="user.Users.active ? 'text-success' : 'text-danger'">{{'users.'
+ (user.Users.active ? 'active' : 'inactive') | translate}}</span></td>
+        <td><span ng-class="user.Users.active ? 'text-success' : 'text-danger'">{{(user.Users.active
? 'users.active' : 'users.inactive') | translate}}</span></td>
       </tr>
     </tbody>
   </table>


Mime
View raw message