mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[enh] Translate services status and loading state.
This commit is contained in:
parent
353eb156f9
commit
52eb6201fe
4 changed files with 22 additions and 10 deletions
13
src/dist/js/script.min.js
vendored
13
src/dist/js/script.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1444,8 +1444,12 @@ var app = Sammy('#main', function (sam) {
|
||||||
data2 = { 'services': [] };
|
data2 = { 'services': [] };
|
||||||
$.each(data, function(k, v) {
|
$.each(data, function(k, v) {
|
||||||
v.name = k;
|
v.name = k;
|
||||||
|
// Handlebars want booleans
|
||||||
v.is_loaded = (v.loaded=='enabled') ? true : false;
|
v.is_loaded = (v.loaded=='enabled') ? true : false;
|
||||||
v.is_running = (v.status=='running') ? true : false;
|
v.is_running = (v.status=='running') ? true : false;
|
||||||
|
// Translate status and loaded state
|
||||||
|
v.status = y18n.t(v.status);
|
||||||
|
v.loaded = y18n.t(v.loaded);
|
||||||
data2.services.push(v);
|
data2.services.push(v);
|
||||||
});
|
});
|
||||||
c.view('service/service_list', data2);
|
c.view('service/service_list', data2);
|
||||||
|
@ -1457,9 +1461,12 @@ var app = Sammy('#main', function (sam) {
|
||||||
c.api('/services/'+ c.params['service'], function(data) { // ?
|
c.api('/services/'+ c.params['service'], function(data) { // ?
|
||||||
data2 = { 'service': data };
|
data2 = { 'service': data };
|
||||||
data2.service.name = c.params['service'];
|
data2.service.name = c.params['service'];
|
||||||
|
// Handlebars want booleans
|
||||||
data2.service.is_loaded = (data.loaded=='enabled') ? true : false;
|
data2.service.is_loaded = (data.loaded=='enabled') ? true : false;
|
||||||
data2.service.is_running = (data.status=='running') ? true : false;
|
data2.service.is_running = (data.status=='running') ? true : false;
|
||||||
|
// Translate status and loaded state
|
||||||
|
data2.service.status = y18n.t(data.status);
|
||||||
|
data2.service.loaded = y18n.t(data.loaded);
|
||||||
store.clear('slide');
|
store.clear('slide');
|
||||||
c.view('service/service_info', data2);
|
c.view('service/service_info', data2);
|
||||||
}, 'GET');
|
}, 'GET');
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
"status" : "Status",
|
"status" : "Status",
|
||||||
"disable" : "Disable",
|
"disable" : "Disable",
|
||||||
"enable" : "Enable",
|
"enable" : "Enable",
|
||||||
|
"disabled" : "Disabled",
|
||||||
|
"enabled" : "Enabled",
|
||||||
"start" : "Start",
|
"start" : "Start",
|
||||||
"stop" : "Stop",
|
"stop" : "Stop",
|
||||||
"log" : "Log",
|
"log" : "Log",
|
||||||
|
@ -156,7 +158,7 @@
|
||||||
"count_min" : "%s min",
|
"count_min" : "%s min",
|
||||||
"process" : "Process",
|
"process" : "Process",
|
||||||
"running" : "Running",
|
"running" : "Running",
|
||||||
"sleeping" : "Sleeping",
|
"inactive" : "Inactive",
|
||||||
"network" : "Network",
|
"network" : "Network",
|
||||||
"public_ip" : "Public IP: ",
|
"public_ip" : "Public IP: ",
|
||||||
"local_ip" : "Local IP",
|
"local_ip" : "Local IP",
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
"status": "Statut",
|
"status": "Statut",
|
||||||
"disable": "Désactiver",
|
"disable": "Désactiver",
|
||||||
"enable": "Activer",
|
"enable": "Activer",
|
||||||
|
"disabled": "Désactivé",
|
||||||
|
"enabled": "Activé",
|
||||||
"start": "Démarrer",
|
"start": "Démarrer",
|
||||||
"stop": "Arrêter",
|
"stop": "Arrêter",
|
||||||
"log": "Journal",
|
"log": "Journal",
|
||||||
|
@ -147,8 +149,8 @@
|
||||||
"cpu_load": "Charge CPU",
|
"cpu_load": "Charge CPU",
|
||||||
"count_min": "%s min",
|
"count_min": "%s min",
|
||||||
"process": "Process",
|
"process": "Process",
|
||||||
"running": "Running",
|
"running": "En cours d'execution",
|
||||||
"sleeping": "Sleeping",
|
"inactive": "Inactif",
|
||||||
"network": "Réseau",
|
"network": "Réseau",
|
||||||
"public_ip": "IP publique : ",
|
"public_ip": "IP publique : ",
|
||||||
"local_ip": "IP locale",
|
"local_ip": "IP locale",
|
||||||
|
|
Loading…
Reference in a new issue