i18n proper common localiztion + localization of Clusters page
Change-Id: Iddb9000dd2aedfb3c9635303dfc0f5b201c8c5fe
This commit is contained in:
parent
f48f8e2f19
commit
8c5fa2bb46
@ -86,12 +86,17 @@ h6.page-title {
|
||||
|
||||
.footer-lang {
|
||||
display: block;
|
||||
padding: 14px 0px 0px 5px;
|
||||
color: #7789a0;
|
||||
padding: 10px 0px 0px 5px;
|
||||
font-size: 11px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.footer-lang .current-locale {
|
||||
display: inline;
|
||||
font-size: 11px;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
/* Navigation */
|
||||
.navigation-bar {
|
||||
margin-top: -1px;
|
||||
@ -965,16 +970,16 @@ label.node-checkbox {
|
||||
|
||||
|
||||
.breadcrumb > li {
|
||||
text-shadow: 0 0 0;
|
||||
text-shadow: 0 0 0;
|
||||
}
|
||||
|
||||
.breadcrumb > li > a {
|
||||
color: #B0B0B0;
|
||||
text-decoration: underline;
|
||||
color: #B0B0B0;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.breadcrumb > li > a:hover {
|
||||
color: #d0d0d0;
|
||||
color: #d0d0d0;
|
||||
}
|
||||
|
||||
.breadcrumb > .active {
|
||||
@ -1224,6 +1229,11 @@ label.node-checkbox {
|
||||
min-height: 14px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.cluster-hardware > .row-fluid > .span6:after {
|
||||
content: ":";
|
||||
}
|
||||
|
||||
.cluster-status {
|
||||
margin-top: 20px;
|
||||
padding-top: 5px;
|
||||
|
@ -1,7 +1,13 @@
|
||||
{
|
||||
"en-US": {
|
||||
"translation": {
|
||||
"common": {
|
||||
"title": "Fuel Dashboard"
|
||||
},
|
||||
"navbar": {
|
||||
"environments": "Environments",
|
||||
"releases": "Releases",
|
||||
"support": "Support",
|
||||
"stats": {
|
||||
"total": ["Total", "node"],
|
||||
"total_plural": ["Total", "nodes"],
|
||||
@ -9,6 +15,17 @@
|
||||
"unallocated_plural": ["Unallocated", "nodes"]
|
||||
}
|
||||
},
|
||||
"breadcrumbs": {
|
||||
"home": "Home",
|
||||
"environments": "Environments",
|
||||
"releases": "Releases",
|
||||
"support": "Support",
|
||||
"notifications": "Notifications",
|
||||
"capacity": "Capacity"
|
||||
},
|
||||
"notifications_page": {
|
||||
"title": "Notifications"
|
||||
},
|
||||
"support_page": {
|
||||
"title": "Support",
|
||||
"contact_text": "Do not hesitate to report a problem or suggest an improvement by clicking the button below. We will get back to you as soon as possible.",
|
||||
@ -25,26 +42,42 @@
|
||||
"capacity_audit": "Capacity Audit",
|
||||
"capacity_audit_text": "View and download capacity log.",
|
||||
"view_capacity_audit": "View Capacity Audit"
|
||||
},
|
||||
"release_page": {
|
||||
"title": "Releases"
|
||||
},
|
||||
"clusters_page": {
|
||||
"title": "My OpenStack Environments",
|
||||
"create_cluster_text": "New OpenStack Environment",
|
||||
"cluster_hardware_nodes": "Nodes",
|
||||
"cluster_hardware_cpu": "CPU (cores)",
|
||||
"cluster_hardware_hdd": "HDD",
|
||||
"cluster_hardware_ram": "RAM",
|
||||
"cluster_status_new": "New",
|
||||
"cluster_status_deploying": "Deploying",
|
||||
"cluster_status_operational": "Operational",
|
||||
"cluster_status_error": "Error",
|
||||
"cluster_status_removing": "Removing"
|
||||
}
|
||||
}
|
||||
},
|
||||
"zh-CN": {
|
||||
"translation": {
|
||||
"navbar": {
|
||||
"Environments": "环境",
|
||||
"Releases": "版本",
|
||||
"Support": "支持",
|
||||
"environments": "环境",
|
||||
"releases": "版本",
|
||||
"support": "支持",
|
||||
"stats": {
|
||||
"total": "全部节点",
|
||||
"unallocated": "未分配节点"
|
||||
}
|
||||
},
|
||||
"breadcrumb": {
|
||||
"Home": "首页",
|
||||
"Environments": "环境",
|
||||
"Releases": "版本",
|
||||
"Support": "支持",
|
||||
"Notifications": "通知"
|
||||
"breadcrumbs": {
|
||||
"home": "首页",
|
||||
"environments": "环境",
|
||||
"releases": "版本",
|
||||
"support": "支持",
|
||||
"notifications": "通知"
|
||||
},
|
||||
"notifications_page": {
|
||||
"title": "通知"
|
||||
@ -77,13 +110,16 @@
|
||||
},
|
||||
"clusters_page": {
|
||||
"title":"我的OpenStack环境",
|
||||
"create-cluster-text": "新建OpenStack环境",
|
||||
"nodes": "节点:",
|
||||
"stat_new": "新建",
|
||||
"stat_deploying": "部署中",
|
||||
"stat_operational": "可操作",
|
||||
"stat_error": "错误",
|
||||
"stat_removing": "移除中"
|
||||
"create_cluster_text": "新建OpenStack环境",
|
||||
"cluster_hardware_nodes": "节点",
|
||||
"cluster_hardware_cpu": "CPU (cores)",
|
||||
"cluster_hardware_hdd": "HDD",
|
||||
"cluster_hardware_ram": "RAM",
|
||||
"cluster_status_new": "新建",
|
||||
"cluster_status_deploying": "部署中",
|
||||
"cluster_status_operational": "可操作",
|
||||
"cluster_status_error": "错误",
|
||||
"cluster_status_removing": "移除中"
|
||||
},
|
||||
"cluster_page": {
|
||||
"deploy_changes": "部署变更",
|
||||
|
@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Fuel Dashboard</title>
|
||||
<title></title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
|
@ -44,9 +44,9 @@ function(Coccyx, coccyxMixins, models, commonViews, ClusterPage, NodesTab, Clust
|
||||
initialize: function() {
|
||||
this.content = $('#content');
|
||||
this.navbar = new commonViews.Navbar({elements: [
|
||||
['Environments', '#clusters'],
|
||||
['Releases', '#releases'],
|
||||
['Support', '#support']
|
||||
['environments', '#clusters'],
|
||||
['releases', '#releases'],
|
||||
['support', '#support']
|
||||
]});
|
||||
this.content.before(this.navbar.render().el);
|
||||
this.breadcrumbs = new commonViews.Breadcrumbs();
|
||||
|
@ -16,7 +16,7 @@
|
||||
define(
|
||||
[
|
||||
'views/common',
|
||||
'models',
|
||||
'models',
|
||||
'text!templates/capacity/page.html'
|
||||
],
|
||||
function(commonViews, models, capacityPageTemplate) {
|
||||
@ -24,8 +24,8 @@ function(commonViews, models, capacityPageTemplate) {
|
||||
|
||||
var CapacityPage = commonViews.Page.extend({
|
||||
navbarActiveElement: 'support',
|
||||
breadcrumbsPath: [['Home', '#'], ['Support', '#support'], 'Capacity'],
|
||||
title: 'Capacity',
|
||||
breadcrumbsPath: [['home', '#'], ['support', '#support'], 'capacity'],
|
||||
title: $.t('capacity_page.title'),
|
||||
updateInterval: 2000,
|
||||
template: _.template(capacityPageTemplate),
|
||||
events: {
|
||||
|
@ -37,7 +37,7 @@ function(utils, models, commonViews, dialogViews, NodesTab, NetworkTab, Settings
|
||||
ClusterPage = commonViews.Page.extend({
|
||||
navbarActiveElement: 'clusters',
|
||||
breadcrumbsPath: function() {
|
||||
return [['Home', '#'], ['Environments', '#clusters'], this.model.get('name')];
|
||||
return [['home', '#'], ['environments', '#clusters'], this.model.get('name')];
|
||||
},
|
||||
title: function() {
|
||||
return this.model.get('name');
|
||||
|
@ -29,8 +29,8 @@ function(models, utils, commonViews, dialogViews, clustersPageTemplate, clusterT
|
||||
|
||||
ClustersPage = commonViews.Page.extend({
|
||||
navbarActiveElement: 'clusters',
|
||||
breadcrumbsPath: [['Home', '#'], 'Environments'],
|
||||
title: 'Environments',
|
||||
breadcrumbsPath: [['home', '#'], 'environments'],
|
||||
title: $.t('clusters_page.title'),
|
||||
template: _.template(clustersPageTemplate),
|
||||
render: function() {
|
||||
this.$el.html(this.template({clusters: this.collection}));
|
||||
|
@ -43,7 +43,7 @@ function(utils, models, dialogViews, navbarTemplate, nodesStatsTemplate, notific
|
||||
app.breadcrumbs.setPath(_.result(this, 'breadcrumbsPath'));
|
||||
},
|
||||
updateTitle: function() {
|
||||
var defaultTitle = 'Fuel Dashboard';
|
||||
var defaultTitle = $.t('common.title');
|
||||
var title = _.result(this, 'title');
|
||||
document.title = title ? defaultTitle + ' - ' + title : defaultTitle;
|
||||
}
|
||||
|
@ -26,8 +26,8 @@ function(utils, models, commonViews, dialogViews, notificationsListTemplate) {
|
||||
|
||||
var NotificationsPage = commonViews.Page.extend({
|
||||
navbarActiveElement: null,
|
||||
breadcrumbsPath: [['Home', '#'], 'Notifications'],
|
||||
title: 'Notifications',
|
||||
breadcrumbsPath: [['home', '#'], 'notifications'],
|
||||
title: $.t('notifications_page.title'),
|
||||
template: _.template(notificationsListTemplate),
|
||||
templateHelpers: _.pick(utils, 'urlify'),
|
||||
events: {
|
||||
|
@ -28,8 +28,8 @@ function(utils, commonViews, dialogViews, releasesListTemplate, releaseTemplate)
|
||||
|
||||
ReleasesPage = commonViews.Page.extend({
|
||||
navbarActiveElement: 'releases',
|
||||
breadcrumbsPath: [['Home', '#'], 'Releases'],
|
||||
title: 'Releases',
|
||||
breadcrumbsPath: [['home', '#'], 'releases'],
|
||||
title: $.t('release_page.title'),
|
||||
updateInterval: 5000,
|
||||
template: _.template(releasesListTemplate),
|
||||
scheduleUpdate: function() {
|
||||
|
@ -24,8 +24,8 @@ function(commonViews, models, supportPageTemplate) {
|
||||
|
||||
var SupportPage = commonViews.Page.extend({
|
||||
navbarActiveElement: 'support',
|
||||
breadcrumbsPath: [['Home', '#'], 'Support'],
|
||||
title: 'Support',
|
||||
breadcrumbsPath: [['home', '#'], 'support'],
|
||||
title: $.t('support_page.title'),
|
||||
updateInterval: 2000,
|
||||
template: _.template(supportPageTemplate),
|
||||
events: {
|
||||
|
@ -3,14 +3,14 @@
|
||||
<div class="cluster-hardware">
|
||||
<% if (!nodes.deferred || nodes.deferred.state() == 'resolved') { %>
|
||||
<div class="row-fluid">
|
||||
<div class="span6" data-i18n="clusters_page.nodes">Nodes:</div>
|
||||
<div class="span6" data-i18n="clusters_page.cluster_hardware_nodes"></div>
|
||||
<div class="span4"><%= nodes.length %></div>
|
||||
<% if (nodes.length) { %>
|
||||
<div class="span6">CPU (cores):</div>
|
||||
<div class="span6" data-i18n="clusters_page.cluster_hardware_cpu"></div>
|
||||
<div class="span4"><%= nodes.resources('cores') %></div>
|
||||
<div class="span6">HDD:</div>
|
||||
<div class="span6" data-i18n="clusters_page.cluster_hardware_hdd"></div>
|
||||
<div class="span4"><%= nodes.resources('hdd') ? showDiskSize(nodes.resources('hdd')) : '?GB' %></div>
|
||||
<div class="span6">RAM:</div>
|
||||
<div class="span6" data-i18n="clusters_page.cluster_hardware_ram"></div>
|
||||
<div class="span4"><%= nodes.resources('ram') ? showMemorySize(nodes.resources('ram')) : '?GB' %></div>
|
||||
<% } %>
|
||||
</div>
|
||||
@ -18,13 +18,12 @@
|
||||
</div>
|
||||
<div class="cluster-status">
|
||||
<% if (cluster.task('cluster_deletion', 'running')) { %>
|
||||
Removing
|
||||
<%- $.t('clusters_page.cluster_status_removing') %>
|
||||
<% } else if (cluster.task('deploy', 'running')) { %>
|
||||
<div class="cluster-status-deploy">
|
||||
<div class="bar" style="width:0"></div>
|
||||
</div>
|
||||
<% } else { %>
|
||||
<% var statuses = {'new': $.t('clusters_page.stat_new', {defaultValue: 'New'}), 'deployment': $.t('clusters_page.stat_deploying', {defaultValue: 'Deploying'}), 'operational': $.t('clusters_page.stat_operational', {defaultValue: 'Operational'}), 'error': $.t('clusters_page.stat_error', {defaultValue: 'Error'}), 'remove': $.t('clusters_page.stat_removing', {defaultValue: 'Removing'}) } %>
|
||||
<%= statuses[cluster.get('status')] %>
|
||||
<%- $.t('clusters_page.cluster_status_' + cluster.get('status'), {defaultValue: cluster.get('status')}) %>
|
||||
<% } %>
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="span3 clusterbox create-cluster">
|
||||
<div class="add-icon"><i class="icon-create"></i></div>
|
||||
<div class="create-cluster-text" data-i18n="clusters_page.create-cluster-text">New OpenStack Environment</div>
|
||||
<div class="create-cluster-text" data-i18n="clusters_page.create_cluster_text"></div>
|
||||
</div>
|
||||
|
@ -1,2 +1,2 @@
|
||||
<h3 class="page-title" data-i18n="clusters_page.title">My OpenStack Environments</h3>
|
||||
<h3 class="page-title" data-i18n="clusters_page.title"></h3>
|
||||
<div class="cluster-list"></div>
|
||||
|
@ -2,10 +2,10 @@
|
||||
<% _.each(path, function(part) { %>
|
||||
<% if (_.isArray(part)) { %>
|
||||
<li>
|
||||
<a href="<%- part[1] %>"><%- $.t('breadcrumb.'+part[0], {defaultValue: part[0]}) %></a> <span class="divider">/</span>
|
||||
<a href="<%- part[1] %>"><%- $.t('breadcrumbs.' + part[0], {defaultValue: part[0]}) %></a> <span class="divider">/</span>
|
||||
</li>
|
||||
<% } else { %>
|
||||
<li class="active"><%- $.t('breadcrumb.'+part, {defaultValue: part}) %></li>
|
||||
<li class="active"><%- $.t('breadcrumbs.' + part, {defaultValue: part}) %></li>
|
||||
<% } %>
|
||||
<% }) %>
|
||||
</ul>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<% } %>
|
||||
<div class="footer-lang pull-right">
|
||||
<div class="dropdown dropup">
|
||||
<a class="dropdown-toggle current-locale" data-toggle="dropdown" href="#"><%- currentLocale.name %></a>
|
||||
<button class="dropdown-toggle current-locale btn btn-link" data-toggle="dropdown"><%- currentLocale.name %></button>
|
||||
<ul class="dropdown-menu locales">
|
||||
<% _.each(locales, function(locale) { %>
|
||||
<li>
|
||||
|
Loading…
Reference in New Issue
Block a user