mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-18 02:50:09 +03:00
Feature #1275: Add french translation to Sunstone and correct minor things.
-Prevent scaping of html codes on onready() translations. -Translate allowed operations in ACL tables -Add french datatable translation -Translate VM state
This commit is contained in:
parent
e68bb5f63d
commit
42807e3965
@ -261,6 +261,7 @@ SUNSTONE_DIRS="$SUNSTONE_LOCATION/models \
|
||||
$SUNSTONE_LOCATION/public/locale/ru \
|
||||
$SUNSTONE_LOCATION/public/locale/it_IT \
|
||||
$SUNSTONE_LOCATION/public/locale/pt_PT \
|
||||
$SUNSTONE_LOCATION/public/locale/fr_FR \
|
||||
$SUNSTONE_LOCATION/public/vendor \
|
||||
$SUNSTONE_LOCATION/public/vendor/jQueryLayout \
|
||||
$SUNSTONE_LOCATION/public/vendor/dataTables \
|
||||
@ -475,6 +476,7 @@ INSTALL_SUNSTONE_FILES=(
|
||||
SUNSTONE_PUBLIC_LOCALE_RU:$SUNSTONE_LOCATION/public/locale/ru
|
||||
SUNSTONE_PUBLIC_LOCALE_IT_IT:$SUNSTONE_LOCATION/public/locale/it_IT
|
||||
SUNSTONE_PUBLIC_LOCALE_PT_PT:$SUNSTONE_LOCATION/public/locale/pt_PT
|
||||
SUNSTONE_PUBLIC_LOCALE_PT_PT:$SUNSTONE_LOCATION/public/locale/fr_FR
|
||||
)
|
||||
|
||||
INSTALL_SUNSTONE_ETC_FILES=(
|
||||
@ -1301,6 +1303,10 @@ SUNSTONE_PUBLIC_LOCALE_PT_PT="
|
||||
src/sunstone/public/locale/pt_PT/pt_PT.js \
|
||||
src/sunstone/public/locale/pt_PT/pt_datatable.txt"
|
||||
|
||||
SUNSTONE_PUBLIC_LOCALE_FR_FR="
|
||||
src/sunstone/public/locale/fr_FR/fr_FR.js \
|
||||
src/sunstone/public/locale/fr_FR/fr_datatable.txt"
|
||||
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
@ -86,9 +86,9 @@ function setLang(lang_str){
|
||||
|
||||
$(document).ready(function(){
|
||||
//Update static translations
|
||||
$('#doc_link').text(tr("Documentation"));
|
||||
$('#support_link').text(tr("Support"));
|
||||
$('#community_link').text(tr("Community"));
|
||||
$('#welcome').text(tr("Welcome"));
|
||||
$('#logout').text(tr("Sign out"));
|
||||
$('#doc_link').html(tr("Documentation"));
|
||||
$('#support_link').html(tr("Support"));
|
||||
$('#community_link').html(tr("Community"));
|
||||
$('#welcome').html(tr("Welcome"));
|
||||
$('#logout').html(tr("Sign out"));
|
||||
});
|
@ -48,67 +48,67 @@ var OpenNebula = {
|
||||
{
|
||||
case "HOST":
|
||||
case "host":
|
||||
return ["INIT",
|
||||
"MONITORING",
|
||||
"MONITORED",
|
||||
"ERROR",
|
||||
"DISABLED"][value];
|
||||
return tr(["INIT",
|
||||
"MONITORING",
|
||||
"MONITORED",
|
||||
"ERROR",
|
||||
"DISABLED"][value]);
|
||||
break;
|
||||
case "HOST_SIMPLE":
|
||||
case "host_simple":
|
||||
return ["ON",
|
||||
"ON",
|
||||
"ON",
|
||||
"ERROR",
|
||||
"OFF"][value];
|
||||
return tr(["ON",
|
||||
"ON",
|
||||
"ON",
|
||||
"ERROR",
|
||||
"OFF"][value]);
|
||||
break;
|
||||
case "VM":
|
||||
case "vm":
|
||||
return ["INIT",
|
||||
"PENDING",
|
||||
"HOLD",
|
||||
"ACTIVE",
|
||||
"STOPPED",
|
||||
"SUSPENDED",
|
||||
"DONE",
|
||||
"FAILED"][value];
|
||||
return tr(["INIT",
|
||||
"PENDING",
|
||||
"HOLD",
|
||||
"ACTIVE",
|
||||
"STOPPED",
|
||||
"SUSPENDED",
|
||||
"DONE",
|
||||
"FAILED"][value]);
|
||||
break;
|
||||
case "VM_LCM":
|
||||
case "vm_lcm":
|
||||
return ["LCM_INIT",
|
||||
"PROLOG",
|
||||
"BOOT",
|
||||
"RUNNING",
|
||||
"MIGRATE",
|
||||
"SAVE_STOP",
|
||||
"SAVE_SUSPEND",
|
||||
"SAVE_MIGRATE",
|
||||
"PROLOG_MIGRATE",
|
||||
"PROLOG_RESUME",
|
||||
"EPILOG_STOP",
|
||||
"EPILOG",
|
||||
"SHUTDOWN",
|
||||
"CANCEL",
|
||||
"FAILURE",
|
||||
"CLEANUP",
|
||||
"UNKNOWN"][value];
|
||||
return tr(["LCM_INIT",
|
||||
"PROLOG",
|
||||
"BOOT",
|
||||
"RUNNING",
|
||||
"MIGRATE",
|
||||
"SAVE_STOP",
|
||||
"SAVE_SUSPEND",
|
||||
"SAVE_MIGRATE",
|
||||
"PROLOG_MIGRATE",
|
||||
"PROLOG_RESUME",
|
||||
"EPILOG_STOP",
|
||||
"EPILOG",
|
||||
"SHUTDOWN",
|
||||
"CANCEL",
|
||||
"FAILURE",
|
||||
"CLEANUP",
|
||||
"UNKNOWN"][value]);
|
||||
break;
|
||||
case "IMAGE":
|
||||
case "image":
|
||||
return ["INIT",
|
||||
"READY",
|
||||
"USED",
|
||||
"DISABLED",
|
||||
"LOCKED",
|
||||
"ERROR"][value];
|
||||
return tr(["INIT",
|
||||
"READY",
|
||||
"USED",
|
||||
"DISABLED",
|
||||
"LOCKED",
|
||||
"ERROR"][value]);
|
||||
break;
|
||||
case "VM_MIGRATE_REASON":
|
||||
case "vm_migrate_reason":
|
||||
return ["NONE",
|
||||
"ERROR",
|
||||
"STOP_RESUME",
|
||||
"USER",
|
||||
"CANCEL"][value];
|
||||
return tr(["NONE",
|
||||
"ERROR",
|
||||
"STOP_RESUME",
|
||||
"USER",
|
||||
"CANCEL"][value]);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
|
@ -292,7 +292,7 @@ function aclElementArray(acl_json){
|
||||
acl_array[0],
|
||||
acl_array[1],
|
||||
acl_array[2],
|
||||
acl_array[3],
|
||||
tr(acl_array[3].charAt(0).toUpperCase()+acl_array[3].substring(1)), //capitalize 1st letter for translation
|
||||
acl.STRING
|
||||
]
|
||||
}
|
||||
|
@ -29,9 +29,10 @@ var config_tab_content =
|
||||
<td class="value_td">\
|
||||
<select id="lang_sel" style="width:20em;">\
|
||||
<option value="en_US">'+tr("English")+'</option>\
|
||||
<option value="ru">'+tr("Russian")+'</option>\
|
||||
<option value="fr_FR">'+tr("French")+'</option>\
|
||||
<option value="it_IT">'+tr("Italian")+'</option>\
|
||||
<option value="pt_PT">'+tr("Portuguese")+'</option>\
|
||||
<option value="ru">'+tr("Russian")+'</option>\
|
||||
</select>\
|
||||
</td>\
|
||||
</tr>\
|
||||
|
@ -654,7 +654,7 @@ function vMachineElementArray(vm_json){
|
||||
var state = OpenNebula.Helper.resource_state("vm",vm.STATE);
|
||||
var hostname = "--";
|
||||
|
||||
if (state == "ACTIVE" || state == "SUSPENDED"){
|
||||
if (state == tr("ACTIVE") || state == tr("SUSPENDED")){
|
||||
if (vm.HISTORY_RECORDS.HISTORY.constructor == Array){
|
||||
hostname = vm.HISTORY_RECORDS.HISTORY[vm.HISTORY_RECORDS.HISTORY.length-1].HOSTNAME;
|
||||
} else {
|
||||
@ -662,7 +662,7 @@ function vMachineElementArray(vm_json){
|
||||
};
|
||||
};
|
||||
|
||||
if (state == "ACTIVE") {
|
||||
if (state == tr("ACTIVE")) {
|
||||
state = OpenNebula.Helper.resource_state("vm_lcm",vm.LCM_STATE);
|
||||
};
|
||||
|
||||
@ -785,7 +785,7 @@ function updateVMInfo(request,vm){
|
||||
var vm_info = vm.VM;
|
||||
var vm_state = OpenNebula.Helper.resource_state("vm",vm_info.STATE);
|
||||
var hostname = "--"
|
||||
if (vm_state == "ACTIVE" || vm_state == "SUSPENDED") {
|
||||
if (vm_state == tr("ACTIVE") || vm_state == tr("SUSPENDED")) {
|
||||
if (vm_info.HISTORY_RECORDS.HISTORY.constructor == Array){
|
||||
hostname = vm_info.HISTORY_RECORDS.HISTORY[vm_info.HISTORY_RECORDS.HISTORY.length-1].HOSTNAME
|
||||
} else {
|
||||
@ -1335,7 +1335,7 @@ function vncIcon(vm){
|
||||
var graphics = vm.TEMPLATE.GRAPHICS;
|
||||
var state = OpenNebula.Helper.resource_state("vm_lcm",vm.LCM_STATE);
|
||||
var gr_icon;
|
||||
if (graphics && graphics.TYPE == "vnc" && state == "RUNNING"){
|
||||
if (graphics && graphics.TYPE == "vnc" && state == tr("RUNNING")){
|
||||
gr_icon = '<a class="vnc" href="#" vm_id="'+vm.ID+'">';
|
||||
gr_icon += '<img src="images/vnc_on.png" alt=\"'+tr("Open VNC Session")+'\" /></a>';
|
||||
}
|
||||
|
@ -1,13 +1,6 @@
|
||||
//Translated by
|
||||
// Bug detected:
|
||||
// - Community and Sign Out strings don't work with é
|
||||
// - tables like the one displaying users don't seem to use the language file
|
||||
// - Show, entries, Search, Showing x to y of z entries, First, Previous, Next, Last
|
||||
// - allowed operations like create or manage
|
||||
// - state of VM
|
||||
// - Monitoring information message 'There is no monitoring information for vm xx'
|
||||
//Translated by Patrice Lachance
|
||||
lang="fr_FR"
|
||||
datatable_lang=""
|
||||
datatable_lang="fr_datatable.txt"
|
||||
locale={
|
||||
"802.1Q":"802.1Q",
|
||||
"Accept (default)":"Accepté (défaut)",
|
||||
@ -70,7 +63,7 @@ locale={
|
||||
"Cluster information":"Information cluster",
|
||||
"Cluster name missing!":"Nom de cluster manquant",
|
||||
"Clusters":"Clusters",
|
||||
"Community":"Communauté",
|
||||
"Community":"Communauté",
|
||||
"Configuration":"Configuration",
|
||||
"Confirmation of action":"Confirmation d'action",
|
||||
"Context":"Contexte",
|
||||
@ -416,7 +409,7 @@ locale={
|
||||
"shared,ssh,iscsi,dummy":"shared,ssh,iscsi,dummy",
|
||||
"Show":"Afficher",
|
||||
"Shutdown":"Arrêter",
|
||||
"Sign out":"Déconnection",
|
||||
"Sign out":"Déconnection",
|
||||
"Size":"Taille",
|
||||
"Size in MB":"Taille en Mo",
|
||||
"Size (Mb)":"Taille (Mb)",
|
||||
|
17
src/sunstone/public/locale/fr_FR/fr_datatable.txt
Normal file
17
src/sunstone/public/locale/fr_FR/fr_datatable.txt
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"sProcessing": "En cours...",
|
||||
"sLengthMenu": "Affiche _MENU_ éléments",
|
||||
"sZeroRecords": "Pas d'enregistrement",
|
||||
"sInfo": "Affiche de _START_ à _END_ sur _TOTAL_",
|
||||
"sInfoEmpty": "Pas d'enregistrement",
|
||||
"sInfoFiltered": "(filtré sur un total de _MAX_)",
|
||||
"sInfoPostFix": "",
|
||||
"sSearch": "Rechercher:",
|
||||
"sUrl": "",
|
||||
"oPaginate": {
|
||||
"sFirst": "Premier",
|
||||
"sPrevious": "Précédent",
|
||||
"sNext": "Suivant",
|
||||
"sLast": "Dernier"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user