TT#4813 Move hardcoded text to locales file

Move hardcoded text to locale file, and access as variables to enable
quick input of language translations. Also switched out usage of
Ext.manifest.locale with localStorage value, and added locale id
fields for all languages in locale.js.

Change-Id: I91a709397585b048d67104881c371117257ac461
changes/00/9000/1
Robert Axelsen 9 years ago
parent 0b1f572816
commit 87120f51b9

@ -2,100 +2,270 @@ Ext.define('Ngcp.csc.locales', {
statics: { statics: {
summary: { summary: {
title: { title: {
en: 'Welcome to your personal desktop.' en: 'Welcome to your personal desktop.',
it: 'Welcome to your personal desktop.',
de: 'Welcome to your personal desktop.',
fr: 'Welcome to your personal desktop.',
sp: 'Welcome to your personal desktop.'
}, },
account_balance: { account_balance: {
en: 'ACCOUNT BALANCE' en: 'ACCOUNT BALANCE',
it: 'ACCOUNT BALANCE',
de: 'ACCOUNT BALANCE',
fr: 'ACCOUNT BALANCE',
sp: 'ACCOUNT BALANCE'
}, },
clients: { clients: {
en: 'CLIENTS' en: 'CLIENTS',
it: 'CLIENTS',
de: 'CLIENTS',
fr: 'CLIENTS',
sp: 'CLIENTS'
}, },
clients_label: { clients_label: {
en: 'client devices registered' en: 'client devices registered',
it: 'client devices registered',
de: 'client devices registered',
fr: 'client devices registered',
sp: 'client devices registered'
}, },
new_voicemails: { new_voicemails: {
en: 'NEW VOICEMAILS' en: 'NEW VOICEMAILS',
it: 'NEW VOICEMAILS',
de: 'NEW VOICEMAILS',
fr: 'NEW VOICEMAILS',
sp: 'NEW VOICEMAILS'
}, },
call_forwards: { call_forwards: {
en: 'CALL FORWARDS' en: 'CALL FORWARDS',
it: 'CALL FORWARDS',
de: 'CALL FORWARDS',
fr: 'CALL FORWARDS',
sp: 'CALL FORWARDS'
}, },
all_voicemails: { all_voicemails: {
en: 'all voicemails' en: 'all voicemails',
it: 'all voicemails',
de: 'all voicemails',
fr: 'all voicemails',
sp: 'all voicemails'
}, },
reminder: { reminder: {
en: 'view settings' en: 'view settings',
it: 'view settings',
de: 'view settings',
fr: 'view settings',
sp: 'view settings'
} }
}, },
calls: { calls: {
section_title: { section_title: {
en: 'Incoming and outgoing calls.' en: 'Incoming and outgoing calls.',
it: 'Incoming and outgoing calls.',
de: 'Incoming and outgoing calls.',
fr: 'Incoming and outgoing calls.',
sp: 'Incoming and outgoing calls.'
}, },
recent_calls: { recent_calls: {
en: 'RECENT CALLS' en: 'RECENT CALLS',
it: 'RECENT CALLS',
de: 'RECENT CALLS',
fr: 'RECENT CALLS',
sp: 'RECENT CALLS'
}, },
columns: { columns: {
number: { number: {
en: 'number' en: 'number',
it: 'number',
de: 'number',
fr: 'number',
sp: 'number'
}, },
duration: { duration: {
en: 'duration' en: 'duration',
it: 'duration',
de: 'duration',
fr: 'duration',
sp: 'duration'
}, },
charges: { charges: {
en: 'charges' en: 'charges',
it: 'charges',
de: 'charges',
fr: 'charges',
sp: 'charges'
}, },
date: { date: {
en: 'date' en: 'date',
it: 'date',
de: 'date',
fr: 'date',
sp: 'date'
} }
}, },
call_type: { call_type: {
incoming: { incoming: {
en: 'incoming' en: 'incoming',
it: 'incoming',
de: 'incoming',
fr: 'incoming',
sp: 'incoming'
}, },
outgoing: { outgoing: {
en: 'outgoing' en: 'outgoing',
it: 'outgoing',
de: 'outgoing',
fr: 'outgoing',
sp: 'outgoing'
}, },
forwarded: { forwarded: {
en: 'forwarded' en: 'forwarded',
it: 'forwarded',
de: 'forwarded',
fr: 'forwarded',
sp: 'forwarded'
} }
}, },
all_calls: { all_calls: {
en: 'all calls' en: 'all calls',
it: 'all calls',
de: 'all calls',
fr: 'all calls',
sp: 'all calls'
} }
}, },
filters: { filters: {
search: { search: {
en: 'SEARCH' en: 'SEARCH',
it: 'SEARCH',
de: 'SEARCH',
fr: 'SEARCH',
sp: 'SEARCH'
}, },
from: { from: {
en: 'time range (DD.MM.YYYY)' en: 'time range (DD.MM.YYYY)',
it: 'time range (DD.MM.YYYY)',
de: 'time range (DD.MM.YYYY)',
fr: 'time range (DD.MM.YYYY)',
sp: 'time range (DD.MM.YYYY)'
}, },
to: { to: {
en: 'to' en: 'to',
it: 'to',
de: 'to',
fr: 'to',
sp: 'to'
}, },
search_term: { search_term: {
en: 'search term' en: 'search term',
it: 'search term',
de: 'search term',
fr: 'search term',
sp: 'search term'
}, },
apply: { apply: {
en: 'apply filter' en: 'apply filter',
it: 'apply filter',
de: 'apply filter',
fr: 'apply filter',
sp: 'apply filter'
}, },
reset: { reset: {
en: 'reset filter' en: 'reset filter',
it: 'reset filter',
de: 'reset filter',
fr: 'reset filter',
sp: 'reset filter'
} }
}, },
common: { common: {
today: { today: {
en: 'Today' en: 'Today',
it: 'Today',
de: 'Today',
fr: 'Today',
sp: 'Today'
}, },
last_week: { last_week: {
en: 'Last week' en: 'Last week',
it: 'Last week',
de: 'Last week',
fr: 'Last week',
sp: 'Last week'
}, },
past: { past: {
en: 'Past' en: 'Past',
it: 'Past',
de: 'Past',
fr: 'Past',
sp: 'Past'
}, },
no: { no: {
en: 'no' en: 'no',
it: 'no',
de: 'no',
fr: 'no',
sp: 'no'
}
},
login: {
title: {
en: 'Self Care Login',
it: 'Connessione all\'Area di Amministrazione',
de: 'Ihr persönliches Portal',
fr: 'Connexion à l\'espace d\'administration',
sp: 'Acceso al panel de administración'
},
username: {
en: 'Username',
it: 'Username',
de: 'Benutzername',
fr: 'Identifiant',
sp: 'Nombre de usuario'
},
password: {
en: 'Password',
it: 'Password',
de: 'Passwort',
fr: 'Mot de passe',
sp: 'Contraseña'
},
choose_language: {
en: 'Choose language',
it: 'Choose language',
de: 'Choose language',
fr: 'Choose language',
sp: 'Choose language'
},
button_text: {
en: 'Login',
it: 'Connetti',
de: 'Einloggen',
fr: 'Identifiant',
sp: 'Iniciar sesión'
},
missing_username: {
en: 'Please enter your username.',
it: 'Prego immettere il proprio username.',
de: 'Bitte geben Sie Ihren Usernamen ein.',
fr: 'Entrer votre nom dutilisateur.',
sp: 'Por favor, introduzca su nombre de usuario.'
},
missing_password: {
en: 'Please enter your password.',
it: 'Prego immettere la propria password.',
de: 'Bitte geben Sie Ihr Passwort ein.',
fr: 'Entrer votre mot de passe.',
sp: 'Por favor, introduzca su contraseña.'
},
invalid_credentials: {
en: 'Login failed, please verify username and password.',
it: 'Login fallito, prego verificare le credenziali.',
de: 'Login fehlgeschlagen, bitte überprüfen Sie Ihren Usernamen und Ihr Passwort.',
fr: 'L\'établissement de la connexion a échoué, vérifiez le nom dutilisateur et le mot de passe.',
sp: 'Acceso denegado. Por favor, compruebe el nombre de usuario y la contraseña.'
} }
} }
} }

@ -31,11 +31,11 @@ Ext.define('NgcpCsc.store.Calls', {
Ext.each(recs, function(rec) { Ext.each(recs, function(rec) {
callStartTime = new Date(rec.get('start_time')).getTime(); callStartTime = new Date(rec.get('start_time')).getTime();
if (callStartTime >= today.getTime()) { if (callStartTime >= today.getTime()) {
rec.set('timeGroup', '1.' + Ngcp.csc.locales.common.today[Ext.manifest.locale]) rec.set('timeGroup', '1.' + Ngcp.csc.locales.common.today[localStorage.getItem('languageSelected')])
} else if (callStartTime < today.getTime() && callStartTime > oneWeekAgo.getTime()) { } else if (callStartTime < today.getTime() && callStartTime > oneWeekAgo.getTime()) {
rec.set('timeGroup', '2.' + Ngcp.csc.locales.common.last_week[Ext.manifest.locale]) rec.set('timeGroup', '2.' + Ngcp.csc.locales.common.last_week[localStorage.getItem('languageSelected')])
} else { } else {
rec.set('timeGroup', '3.' + Ngcp.csc.locales.common.past[Ext.manifest.locale]) rec.set('timeGroup', '3.' + Ngcp.csc.locales.common.past[localStorage.getItem('languageSelected')])
} }
}); });
this.group(); this.group();

@ -8,14 +8,14 @@ Ext.define('NgcpCsc.view.common.gridfilters.GridFilters.js', {
margin: '0 10 0 0', margin: '0 10 0 0',
items: [{ items: [{
html: Ngcp.csc.locales.filters.search[Ext.manifest.locale], html: Ngcp.csc.locales.filters.search[localStorage.getItem('languageSelected')],
padding: '10 0 10 0' padding: '10 0 10 0'
}, { }, {
xtype: 'datefield', xtype: 'datefield',
format: 'd.m.Y', format: 'd.m.Y',
labelAlign: 'top', labelAlign: 'top',
width: '100%', width: '100%',
fieldLabel: Ngcp.csc.locales.filters.from[Ext.manifest.locale], fieldLabel: Ngcp.csc.locales.filters.from[localStorage.getItem('languageSelected')],
name: 'from_date' name: 'from_date'
}, { }, {
xtype: 'datefield', xtype: 'datefield',
@ -27,7 +27,7 @@ Ext.define('NgcpCsc.view.common.gridfilters.GridFilters.js', {
xtype: 'textfield', xtype: 'textfield',
labelAlign: 'top', labelAlign: 'top',
width: '100%', width: '100%',
fieldLabel: Ngcp.csc.locales.filters.search_term[Ext.manifest.locale] fieldLabel: Ngcp.csc.locales.filters.search_term[localStorage.getItem('languageSelected')]
}, { }, {
layout: 'hbox', layout: 'hbox',
margin: '10 0 0 0', margin: '10 0 0 0',
@ -36,11 +36,11 @@ Ext.define('NgcpCsc.view.common.gridfilters.GridFilters.js', {
flex: 1 flex: 1
}, },
items: [{ items: [{
text: Ngcp.csc.locales.filters.apply[Ext.manifest.locale], text: Ngcp.csc.locales.filters.apply[localStorage.getItem('languageSelected')],
margin: '0 5 0 0', margin: '0 5 0 0',
handler: 'submitFilters' handler: 'submitFilters'
}, { }, {
text: Ngcp.csc.locales.filters.reset[Ext.manifest.locale], text: Ngcp.csc.locales.filters.reset[localStorage.getItem('languageSelected')],
handler: 'resetFilters' handler: 'resetFilters'
}] }]
}] }]

@ -4,7 +4,7 @@ Ext.define('NgcpCsc.view.login.Login', {
controller: 'login', controller: 'login',
bodyPadding: 10, bodyPadding: 10,
title: 'Login Window', title: Ngcp.csc.locales.login.title[localStorage.getItem('languageSelected')],
closable: false, closable: false,
autoShow: true, autoShow: true,
standardSubmit: true, standardSubmit: true,
@ -18,30 +18,33 @@ Ext.define('NgcpCsc.view.login.Login', {
items: [{ items: [{
xtype: 'textfield', xtype: 'textfield',
name: 'username', name: 'username',
fieldLabel: 'Username', id: 'login-username',
fieldLabel: Ngcp.csc.locales.login.username[localStorage.getItem('languageSelected')],
allowBlank: false, allowBlank: false,
padding: '10 0 0 15', padding: '10 0 0 15',
listeners: { listeners: {
specialKey: 'onPressEnter' specialKey: 'onPressEnter'
}, },
bind:'{username}' bind: '{username}'
}, { }, {
xtype: 'textfield', xtype: 'textfield',
name: 'password', name: 'password',
id: 'login-password',
inputType: 'password', inputType: 'password',
fieldLabel: 'Password', fieldLabel: Ngcp.csc.locales.login.password[localStorage.getItem('languageSelected')],
allowBlank: false, allowBlank: false,
padding: '0 0 0 15', padding: '0 0 0 15',
listeners: { listeners: {
specialKey: 'onPressEnter' specialKey: 'onPressEnter'
}, },
bind:'{password}' bind: '{password}'
}, { }, {
xtype: 'combo', xtype: 'combo',
fieldLabel: 'Choose language', fieldLabel: Ngcp.csc.locales.login.choose_language[localStorage.getItem('languageSelected')],
padding: '0 0 0 15', padding: '0 0 0 15',
store: 'Languages', store: 'Languages',
queryMode: 'local', queryMode: 'local',
id: 'login-language',
valueField: 'id', valueField: 'id',
displayField: 'language', displayField: 'language',
value: localStorage.getItem('languageSelected') || 'en', value: localStorage.getItem('languageSelected') || 'en',
@ -51,14 +54,14 @@ Ext.define('NgcpCsc.view.login.Login', {
}, { }, {
xtype: 'displayfield', xtype: 'displayfield',
hideEmptyLabel: false, hideEmptyLabel: false,
itemId: 'login-message',
padding: '0 0 5 15', padding: '0 0 5 15',
hidden: true, hidden: true,
width: 310, id: 'login-message',
bind:'{message}' bind: '{message}'
}], }],
buttons: [{ buttons: [{
text: 'Login', text: Ngcp.csc.locales.login.button_text[localStorage.getItem('languageSelected')],
id: 'login-button',
listeners: { listeners: {
click: 'onLoginClick' click: 'onLoginClick'
} }

@ -16,6 +16,11 @@ Ext.define('NgcpCsc.view.login.LoginController', {
languageSelection: function (cmp, rec) { languageSelection: function (cmp, rec) {
languageSelected = localStorage.setItem('languageSelected', rec.get('id')); languageSelected = localStorage.setItem('languageSelected', rec.get('id'));
this.getView().down('#login-username').setFieldLabel(Ngcp.csc.locales.login.username[localStorage.getItem('languageSelected')]);
this.getView().down('#login-password').setFieldLabel(Ngcp.csc.locales.login.password[localStorage.getItem('languageSelected')]);
this.getView().down('#login-language').setFieldLabel(Ngcp.csc.locales.login.choose_language[localStorage.getItem('languageSelected')]);
this.getView().down('#login-button').setConfig('text', Ngcp.csc.locales.login.button_text[localStorage.getItem('languageSelected')]);
this.getView().setConfig('title', Ngcp.csc.locales.login.title[localStorage.getItem('languageSelected')]);
}, },
showMessage: function (message) { showMessage: function (message) {
@ -37,11 +42,11 @@ Ext.define('NgcpCsc.view.login.LoginController', {
xtype: 'ngcp-main' xtype: 'ngcp-main'
}); });
} else if (inputUsername === '' && inputPassword === '' || inputUsername === '' ) { } else if (inputUsername === '' && inputPassword === '' || inputUsername === '' ) {
this.showMessage('Please enter your username.'); this.showMessage(Ngcp.csc.locales.login.missing_username[localStorage.getItem('languageSelected')]);
} else if (inputPassword === '') { } else if (inputPassword === '') {
this.showMessage('Please enter your password.'); this.showMessage(Ngcp.csc.locales.login.missing_password[localStorage.getItem('languageSelected')]);
} else if (inputUsername !== defaultCredential || inputPassword !== defaultCredential) { } else if (inputUsername !== defaultCredential || inputPassword !== defaultCredential) {
this.showMessage('Login failed, please verify username and password.'); this.showMessage(Ngcp.csc.locales.login.invalid_credentialse[localStorage.getItem('languageSelected')]);
} }
} }

@ -13,7 +13,7 @@ Ext.define('NgcpCsc.view.pages.calls.Calls', {
initComponent: function() { initComponent: function() {
var callsGrid = Ext.create('NgcpCsc.view.pages.calls.CallsGrid'); var callsGrid = Ext.create('NgcpCsc.view.pages.calls.CallsGrid');
if (!this._isDesktopSection) { if (!this._isDesktopSection) {
this.setTitle(Ngcp.csc.locales.calls.section_title[Ext.manifest.locale]); this.setTitle(Ngcp.csc.locales.calls.section_title[localStorage.getItem('languageSelected')]);
} }
this.items = [{ this.items = [{
flex: 4, flex: 4,
@ -21,7 +21,7 @@ Ext.define('NgcpCsc.view.pages.calls.Calls', {
padding: 20 padding: 20
}, },
items: [{ items: [{
html: Ngcp.csc.locales.calls.recent_calls[Ext.manifest.locale], html: Ngcp.csc.locales.calls.recent_calls[localStorage.getItem('languageSelected')]
}, { }, {
xtype: 'container', xtype: 'container',
anchor: '100%', anchor: '100%',
@ -34,11 +34,11 @@ Ext.define('NgcpCsc.view.pages.calls.Calls', {
height: 20 height: 20
}, },
items: [{ items: [{
html: Ext.String.format('<span class="fa fa-arrow-circle-up calls-icon"></span><span>{0}</span>', Ngcp.csc.locales.calls.call_type.incoming[Ext.manifest.locale]) html: Ext.String.format('<span class="fa fa-arrow-circle-up calls-icon"></span><span>{0}</span>', Ngcp.csc.locales.calls.call_type.incoming[localStorage.getItem('languageSelected')])
}, { }, {
html: Ext.String.format('<span class="fa fa-arrow-circle-down calls-icon"></span><span>{0}</span>', Ngcp.csc.locales.calls.call_type.outgoing[Ext.manifest.locale]) html: Ext.String.format('<span class="fa fa-arrow-circle-down calls-icon"></span><span>{0}</span>', Ngcp.csc.locales.calls.call_type.outgoing[localStorage.getItem('languageSelected')])
}, { }, {
html: Ext.String.format('<span class="fa fa-arrow-circle-right calls-icon"></span><span>{0}</span>', Ngcp.csc.locales.calls.call_type.forwarded[Ext.manifest.locale]) html: Ext.String.format('<span class="fa fa-arrow-circle-right calls-icon"></span><span>{0}</span>', Ngcp.csc.locales.calls.call_type.forwarded[localStorage.getItem('languageSelected')])
}] }]
}, },
callsGrid, { callsGrid, {
@ -47,7 +47,7 @@ Ext.define('NgcpCsc.view.pages.calls.Calls', {
height: 40, height: 40,
padding: 10, padding: 10,
hidden: !this._isDesktopSection, hidden: !this._isDesktopSection,
html: Ext.String.format('<div class="link">{0}</div>', Ngcp.csc.locales.calls.all_calls[Ext.manifest.locale]), html: Ext.String.format('<div class="link">{0}</div>', Ngcp.csc.locales.calls.all_calls[localStorage.getItem('languageSelected')]),
listeners: { listeners: {
click: { click: {
element: 'el', element: 'el',

@ -35,23 +35,23 @@ Ext.define('NgcpCsc.view.pages.calls.CallsGrid', {
renderer: 'renderCallTypeIcons', renderer: 'renderCallTypeIcons',
width: 30 width: 30
}, { }, {
text: (!summaryView) ? Ngcp.csc.locales.calls.columns.number[Ext.manifest.locale] : '', text: (!summaryView) ? Ngcp.csc.locales.calls.columns.number[localStorage.getItem('languageSelected')] : '',
flex: 1, flex: 1,
dataIndex: 'source_cli' dataIndex: 'source_cli'
}, { }, {
renderer: 'renderPhoneIcon', renderer: 'renderPhoneIcon',
width: 30 width: 30
}, { }, {
text: (!summaryView) ? Ngcp.csc.locales.calls.columns.duration[Ext.manifest.locale] : '', text: (!summaryView) ? Ngcp.csc.locales.calls.columns.duration[localStorage.getItem('languageSelected')] : '',
flex: 1, flex: 1,
dataIndex: 'duration' dataIndex: 'duration'
}, { }, {
text: (!summaryView) ? Ngcp.csc.locales.calls.columns.charges[Ext.manifest.locale] : '', text: (!summaryView) ? Ngcp.csc.locales.calls.columns.charges[localStorage.getItem('languageSelected')] : '',
flex: 1, flex: 1,
dataIndex: 'charges' dataIndex: 'charges'
}, { }, {
xtype: 'datecolumn', xtype: 'datecolumn',
text: (!summaryView) ? Ngcp.csc.locales.calls.columns.date[Ext.manifest.locale] : '', text: (!summaryView) ? Ngcp.csc.locales.calls.columns.date[localStorage.getItem('languageSelected')] : '',
flex: 1, flex: 1,
dataIndex: 'start_time', dataIndex: 'start_time',
format: 'd-m-Y h:i:s' format: 'd-m-Y h:i:s'

@ -9,7 +9,7 @@ Ext.define('NgcpCsc.view.pages.summary.Summary', {
layout: 'fit', layout: 'fit',
title: Ngcp.csc.locales.summary.title[Ext.manifest.locale], title: Ngcp.csc.locales.summary.title[localStorage.getItem('languageSelected')],
layout: 'hbox', layout: 'hbox',
@ -35,18 +35,18 @@ Ext.define('NgcpCsc.view.pages.summary.Summary', {
width: '90%' width: '90%'
}, },
items: [{ items: [{
fieldLabel: Ngcp.csc.locales.summary.account_balance[Ext.manifest.locale], fieldLabel: Ngcp.csc.locales.summary.account_balance[localStorage.getItem('languageSelected')],
bind: { bind: {
value: '{initial_balance}', value: '{initial_balance}',
hidden: '{checkInitialBalance}', hidden: '{checkInitialBalance}',
} }
}, { }, {
fieldLabel: Ngcp.csc.locales.summary.clients[Ext.manifest.locale], fieldLabel: Ngcp.csc.locales.summary.clients[localStorage.getItem('languageSelected')],
bind: { bind: {
value: '{clients_total_count} ' + Ngcp.csc.locales.summary.clients_label[Ext.manifest.locale] value: '{clients_total_count} ' + Ngcp.csc.locales.summary.clients_label[localStorage.getItem('languageSelected')]
} }
}, { }, {
fieldLabel: Ngcp.csc.locales.summary.new_voicemails[Ext.manifest.locale], fieldLabel: Ngcp.csc.locales.summary.new_voicemails[localStorage.getItem('languageSelected')],
bind: { bind: {
value: '{checkVoiceMails}' value: '{checkVoiceMails}'
} }
@ -54,7 +54,7 @@ Ext.define('NgcpCsc.view.pages.summary.Summary', {
xtype: 'container', xtype: 'container',
height: 40, height: 40,
padding: 10, padding: 10,
html: Ext.String.format('<div class="link">{0}</div>', Ngcp.csc.locales.summary.all_voicemails[Ext.manifest.locale]), html: Ext.String.format('<div class="link">{0}</div>', Ngcp.csc.locales.summary.all_voicemails[localStorage.getItem('languageSelected')]),
listeners: { listeners: {
click: { click: {
element: 'el', element: 'el',
@ -65,7 +65,7 @@ Ext.define('NgcpCsc.view.pages.summary.Summary', {
}, { }, {
padding: 20, padding: 20,
items: [{ items: [{
html: Ngcp.csc.locales.summary.call_forwards[Ext.manifest.locale] html: Ngcp.csc.locales.summary.call_forwards[localStorage.getItem('languageSelected')]
}, { }, {
padding: 5, padding: 5,
bind: { bind: {
@ -75,7 +75,7 @@ Ext.define('NgcpCsc.view.pages.summary.Summary', {
xtype: 'container', xtype: 'container',
height: 40, height: 40,
padding: 10, padding: 10,
html: Ext.String.format('<div class="link">{0}</div>', Ngcp.csc.locales.summary.reminder[Ext.manifest.locale]), html: Ext.String.format('<div class="link">{0}</div>', Ngcp.csc.locales.summary.reminder[localStorage.getItem('languageSelected')]),
listeners: { listeners: {
click: { click: {
element: 'el', element: 'el',
@ -83,7 +83,7 @@ Ext.define('NgcpCsc.view.pages.summary.Summary', {
} }
} }
}, { }, {
html: Ngcp.csc.locales.summary.clients[Ext.manifest.locale] html: Ngcp.csc.locales.summary.clients[localStorage.getItem('languageSelected')]
}, { }, {
padding: 5, padding: 5,
@ -94,7 +94,7 @@ Ext.define('NgcpCsc.view.pages.summary.Summary', {
xtype: 'container', xtype: 'container',
height: 40, height: 40,
padding: 10, padding: 10,
html: Ext.String.format('<div class="link">{0}</div>', Ngcp.csc.locales.summary.reminder[Ext.manifest.locale]), html: Ext.String.format('<div class="link">{0}</div>', Ngcp.csc.locales.summary.reminder[localStorage.getItem('languageSelected')]),
listeners: { listeners: {
click: { click: {
element: 'el', element: 'el',

@ -16,15 +16,15 @@ Ext.define('NgcpCsc.view.pages.summary.SummaryModel', {
}, },
checkVoiceMails: function(get) { checkVoiceMails: function(get) {
var count; var count;
count = (get('voicemails_total_count') == 0) ? Ngcp.csc.locales.common.no[Ext.manifest.locale] : get('voicemails_total_count'); count = (get('voicemails_total_count') == 0) ? Ngcp.csc.locales.common.no[localStorage.getItem('languageSelected')] : get('voicemails_total_count');
return Ext.String.format('{0} {1}', count, Ngcp.csc.locales.summary.new_voicemails[Ext.manifest.locale].toLowerCase()); return Ext.String.format('{0} {1}', count, Ngcp.csc.locales.summary.new_voicemails[localStorage.getItem('languageSelected')].toLowerCase());
}, },
checkCallFwd: function(get) { checkCallFwd: function(get) {
var active = get('call_forward_active') ? 'active' : 'inactive'; var active = get('call_forward_active') ? 'active' : 'inactive';
return Ext.String.format('<span class="fa fa-rotate-left fa-3x"></span><span>{0} {1}</span>', Ngcp.csc.locales.summary.call_forwards[Ext.manifest.locale].toLowerCase(), active); return Ext.String.format('<span class="fa fa-rotate-left fa-3x"></span><span>{0} {1}</span>', Ngcp.csc.locales.summary.call_forwards[localStorage.getItem('languageSelected')].toLowerCase(), active);
}, },
checkReminder: function() { checkReminder: function() {
return Ext.String.format('<span class="fa fa-exclamation fa-3x"></span><span>{0}</span>', Ngcp.csc.locales.calls.call_type.forwarded[Ext.manifest.locale]); return Ext.String.format('<span class="fa fa-exclamation fa-3x"></span><span>{0}</span>', Ngcp.csc.locales.calls.call_type.forwarded[localStorage.getItem('languageSelected')]);
} }
} }
}); });

Loading…
Cancel
Save