Updated Branches: refs/heads/trunk 46df4981c -> c0f0abd68
AMBARI-3918 Restart message title in popup from the links use only plural form. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c0f0abd6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c0f0abd6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c0f0abd6 Branch: refs/heads/trunk Commit: c0f0abd68b944645971c47f5ced10baf0e92cde0 Parents: 46df498 Author: aBabiichuk <[email protected]> Authored: Thu Nov 28 17:52:14 2013 +0200 Committer: aBabiichuk <[email protected]> Committed: Thu Nov 28 18:01:26 2013 +0200 ---------------------------------------------------------------------- ambari-web/app/controllers/main/service/info/configs.js | 6 ++++-- ambari-web/app/messages.js | 3 +-- ambari-web/app/templates/main/service/menu_item.hbs | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f0abd6/ambari-web/app/controllers/main/service/info/configs.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js index ff2f310..c4289c9 100644 --- a/ambari-web/app/controllers/main/service/info/configs.js +++ b/ambari-web/app/controllers/main/service/info/configs.js @@ -1791,8 +1791,9 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({ for(var hostName in this.get('content.restartRequiredHostsAndComponents')) { hosts.push(hostName); } + var hostsText = hosts.length == 1 ? Em.I18n.t('common.host') : Em.I18n.t('common.hosts'); hosts = hosts.join(', '); - this.showItemsShouldBeRestarted(hosts, Em.I18n.t('service.service.config.restartService.hostsShouldBeRestarted')); + this.showItemsShouldBeRestarted(hosts, Em.I18n.t('service.service.config.restartService.shouldBeRestarted').format(hostsText)); }, showComponentsShouldBeRestarted: function() { var rhc = this.get('content.restartRequiredHostsAndComponents'); @@ -1813,8 +1814,9 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({ var componentDisplayName = (componentsObject[obj] > 1) ? obj + 's' : obj; componentsList.push(componentsObject[obj] + ' ' + componentDisplayName); } + var componentsText = componentsList.length == 1 ? Em.I18n.t('common.component') : Em.I18n.t('common.components'); hostsComponets = componentsList.join(', '); - this.showItemsShouldBeRestarted(hostsComponets, Em.I18n.t('service.service.config.restartService.componentsShouldBeRestarted')); + this.showItemsShouldBeRestarted(hostsComponets, Em.I18n.t('service.service.config.restartService.shouldBeRestarted').format(componentsText)); }, showItemsShouldBeRestarted: function(content, header) { http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f0abd6/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 3d9eb34..7ac259f 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -1103,8 +1103,7 @@ Em.I18n.translations = { 'services.service.config.restartService.TooltipMessage':'<b>Restart Service</b><br>Stale configuration used by {0} components on {1} hosts:{2}', 'services.service.config.restartService.needToRestart':'<strong>Restart Required.</strong> ', 'services.service.config.restartService.needToRestartEnd':'should be restarted', - 'service.service.config.restartService.hostsShouldBeRestarted':'Hosts Requiring Restart', - 'service.service.config.restartService.componentsShouldBeRestarted':'Components Requiring Restart', + 'service.service.config.restartService.shouldBeRestarted':'{0} Requiring Restart', 'services.service.config.saved.message':'Service configuration changes saved successfully.', 'services.service.config.msgServiceStop':'Could not save configuration changes. Please stop the service first. You will be able to save configuration changes after all of its components are stopped.', 'services.service.config.msgHDFSMapRServiceStop':'Could not save configuration changes. Please stop both HDFS and MapReduce first. You will be able to save configuration changes after all HDFS and MapReduce components are stopped.', http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f0abd6/ambari-web/app/templates/main/service/menu_item.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/service/menu_item.hbs b/ambari-web/app/templates/main/service/menu_item.hbs index 5169a50..25b21ad 100644 --- a/ambari-web/app/templates/main/service/menu_item.hbs +++ b/ambari-web/app/templates/main/service/menu_item.hbs @@ -24,5 +24,5 @@ {{view.alertsCount}} </span> {{/if}} - <i rel="tooltip" {{bindAttr class=":icon-refresh :restart-required-service view.content.isRestartRequired::hide" data-original-title="view.restartRequiredMessage"}}"></i> + <i rel="tooltip" {{bindAttr class=":icon-refresh :restart-required-service view.content.isRestartRequired::hide" data-original-title="view.restartRequiredMessage"}}></i> </a>
