mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[enh] Better multilingual for application views.
This commit is contained in:
parent
344146c8ed
commit
8808a5f327
3 changed files with 22 additions and 14 deletions
25
js/app.js
25
js/app.js
|
@ -713,12 +713,11 @@ app = Sammy('#main', function (sam) {
|
||||||
data.settings.allowed_users = (data.settings.allowed_users) ? data.settings.allowed_users.replace(',', ', ') : '';
|
data.settings.allowed_users = (data.settings.allowed_users) ? data.settings.allowed_users.replace(',', ', ') : '';
|
||||||
|
|
||||||
// Multilingual description
|
// Multilingual description
|
||||||
if (window.navigator && window.navigator.language) {
|
appData.description = (typeof appData.manifest.description[y18n.locale] !== 'indefined') ?
|
||||||
data.description = (typeof data.manifest.description[window.navigator.language] !== 'indefined') ?
|
appData.manifest.description[y18n.locale] :
|
||||||
data.manifest.description[window.navigator.language] :
|
appData.manifest.description['en']
|
||||||
data.manifest.description['en']
|
|
||||||
;
|
;
|
||||||
}
|
|
||||||
|
|
||||||
c.view('app/app_info', data);
|
c.view('app/app_info', data);
|
||||||
});
|
});
|
||||||
|
@ -752,7 +751,7 @@ app = Sammy('#main', function (sam) {
|
||||||
label: domain,
|
label: domain,
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
appData.manifest.arguments.install[k].help = "<a href='#/domains'>Manage domains</a>";
|
appData.manifest.arguments.install[k].help = "<a href='#/domains'>"+y18n.t('manage_domains')+"</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Special case for admin input.
|
// Special case for admin input.
|
||||||
|
@ -764,17 +763,21 @@ app = Sammy('#main', function (sam) {
|
||||||
label: user.fullname+' ('+user.mail+')'
|
label: user.fullname+' ('+user.mail+')'
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
appData.manifest.arguments.install[k].help = "<a href='#/users'>Manage users</a>";
|
appData.manifest.arguments.install[k].help = "<a href='#/users'>"+y18n.t('manage_users')+"</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Multilingual description
|
||||||
|
appData.manifest.arguments.install[k].label = (typeof appData.manifest.arguments.install[k].ask[y18n.locale] !== 'indefined') ?
|
||||||
|
appData.manifest.arguments.install[k].ask[y18n.locale] :
|
||||||
|
appData.manifest.arguments.install[k].ask['en']
|
||||||
|
;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Multilingual description
|
// Multilingual description
|
||||||
if (window.navigator && window.navigator.language) {
|
appData.description = (typeof appData.manifest.description[y18n.locale] !== 'indefined') ?
|
||||||
appData.description = (typeof appData.manifest.description[window.navigator.language] !== 'indefined') ?
|
appData.manifest.description[y18n.locale] :
|
||||||
appData.manifest.description[window.navigator.language] :
|
|
||||||
appData.manifest.description['en']
|
appData.manifest.description['en']
|
||||||
;
|
;
|
||||||
}
|
|
||||||
|
|
||||||
c.view('app/app_install', appData);
|
c.view('app/app_install', appData);
|
||||||
});
|
});
|
||||||
|
|
|
@ -104,6 +104,8 @@
|
||||||
"app_access_removeall_btn" : "Remove all access",
|
"app_access_removeall_btn" : "Remove all access",
|
||||||
"app_access_clearall_btn" : "Clear all access",
|
"app_access_clearall_btn" : "Clear all access",
|
||||||
"multi_instance" : "Multi instance",
|
"multi_instance" : "Multi instance",
|
||||||
|
"manage_domains" : "Manage domains",
|
||||||
|
"manage_users" : "Manage users",
|
||||||
|
|
||||||
"backup" : "Backup",
|
"backup" : "Backup",
|
||||||
"backup_warning_title" : "The backup system is not implemented yet.",
|
"backup_warning_title" : "The backup system is not implemented yet.",
|
||||||
|
|
|
@ -104,6 +104,9 @@
|
||||||
"app_access_removeall_btn" : "Supprimer tous les accès",
|
"app_access_removeall_btn" : "Supprimer tous les accès",
|
||||||
"app_access_clearall_btn" : "Effacer toutes les règles accès",
|
"app_access_clearall_btn" : "Effacer toutes les règles accès",
|
||||||
"multi_instance" : "Multi instance",
|
"multi_instance" : "Multi instance",
|
||||||
|
"manage_domains" : "Gerer les domaines",
|
||||||
|
"manage_users" : "Gerer les utilisateurs",
|
||||||
|
|
||||||
|
|
||||||
"backup" : "Sauvegarde",
|
"backup" : "Sauvegarde",
|
||||||
"backup_warning_title" : "Le système de sauvegarde n'est pas encore implémenté.",
|
"backup_warning_title" : "Le système de sauvegarde n'est pas encore implémenté.",
|
||||||
|
|
Loading…
Add table
Reference in a new issue