diff --git a/install.sh b/install.sh index 083c65d0fd..5954975f19 100755 --- a/install.sh +++ b/install.sh @@ -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" + #----------------------------------------------------------------------------- diff --git a/src/sunstone/public/js/locale.js b/src/sunstone/public/js/locale.js index a029ff8d34..fedfc42cc6 100644 --- a/src/sunstone/public/js/locale.js +++ b/src/sunstone/public/js/locale.js @@ -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")); }); \ No newline at end of file diff --git a/src/sunstone/public/js/opennebula.js b/src/sunstone/public/js/opennebula.js index a69f0e9809..71ffc29d70 100644 --- a/src/sunstone/public/js/opennebula.js +++ b/src/sunstone/public/js/opennebula.js @@ -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; diff --git a/src/sunstone/public/js/plugins/acls-tab.js b/src/sunstone/public/js/plugins/acls-tab.js index d53b4f81f7..4c5616de35 100644 --- a/src/sunstone/public/js/plugins/acls-tab.js +++ b/src/sunstone/public/js/plugins/acls-tab.js @@ -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 ] } diff --git a/src/sunstone/public/js/plugins/config-tab.js b/src/sunstone/public/js/plugins/config-tab.js index c56e84cd0f..3bab4fda6d 100644 --- a/src/sunstone/public/js/plugins/config-tab.js +++ b/src/sunstone/public/js/plugins/config-tab.js @@ -29,9 +29,10 @@ var config_tab_content =