1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

Feature #992: Enable translations.

Add configuration tab and configuration config support.
Add spanish translation.
This commit is contained in:
Hector Sanjuan 2012-01-02 02:57:54 +01:00
parent ae986cac02
commit 80507fb55e
16 changed files with 546 additions and 79 deletions

View File

@ -51,3 +51,6 @@
:template: large.erb
:cpu: 8
:memory: 8192
# Default language setting for Self-Service UI
:lang: en_US

View File

@ -50,6 +50,7 @@ require 'sinatra'
require 'yaml'
require 'erb'
require 'tempfile'
require 'json'
require 'OCCIServer'
require 'CloudAuth'
@ -166,16 +167,16 @@ helpers do
session[:user] = username
session[:remember] = params[:remember]
if user['TEMPLATE/LANG']
session[:lang] = user['TEMPLATE/LANG']
else
session[:lang] = settings.config[:lang]
end
if params[:remember]
env['rack.session.options'][:expire_after] = 30*60*60*24
end
if params[:lang]
session[:lang] = params[:lang]
else
session[:lang] = settings.config[:lang]
end
return [204, ""]
end
end
@ -311,6 +312,20 @@ end
## UI
##############################################
post '/config' do
begin
body = JSON.parse(request.body.read)
rescue
[500, "POST Config: Error parsing configuration JSON"]
end
body.each do | key,value |
case key
when "lang" then session[:lang]=value
end
end
end
get '/ui/login' do
File.read(File.dirname(__FILE__)+'/ui/templates/login.html')
end

View File

@ -78,24 +78,28 @@ var network_box_html = '<p>'+tr("Your compute resources connectivity is performe
//Compute tab
///////////////////////////////////////////////////////////
var compute_dashboard_image = "images/one-compute.png";
var compute_dashboard_html = '<p>' + tr("This is a list of your current compute resources. Virtual Machines use previously defined images and networks. You can easily create a new compute element by cliking \"new\" and filling-in an easy wizard.")+'</p>\
var compute_dashboard_html = '<p>' + tr("This is a list of your current compute resources. Virtual Machines use previously defined images and networks. You can easily create a new compute element by cliking \'new\' and filling-in an easy wizard.")+'</p>\
<p>'+tr("You can also manage compute resources and perform actions such as stop, resume, shutdown or cancel.")+'</p>\
<p>'+tr("Additionally, you can take a \"snapshot\" of the storage attached to these resources. They will be saved as new resources, visible from the Storage view and re-usable.")+'</p>\
<p>'+tr("There are currently")+' <b>'+$vm_count+'</b> '+tr("virtual machines")+'.</p>';
<p>'+tr("Additionally, you can take a \'snapshot\' of the storage attached to these resources. They will be saved as new resources, visible from the Storage view and re-usable.")+'</p>\
<p>'+tr("There are currently")+' <b>'+$vm_count+'</b> '+
tr("virtual machines")+'.</p>';
///////////////////////////////////////////////////////////
//Storage tab
///////////////////////////////////////////////////////////
var storage_dashboard_image = "images/one-storage.png";
var storage_dashboard_html = '<p>'+tr("The Storage view offers you an overview of your current images. Storage elements are attached to compute resources at creation time. They can also be extracted from running virtual machines by taking an snapshot.")+'</p>\
<p>'+tr("You can add new storages by clicking \"new\". Image files will be uploaded to OpenNebula and set ready to be used.")+'</p>\
<p>'+tr("You can add new storages by clicking \'new\'. Image files will be uploaded to OpenNebula and set ready to be used.")+'</p>\
<p>'+tr("Additionally, you can run several operations on defined storages, such as defining their persistance. Persistent images can only be used by 1 virtual machine, and the changes made by it have effect on the base image. Non-persistent images are cloned before being used in a Virtual Machine, therefore changes are lost unless a snapshot is taken prior to Virtual Machine shutdown.")+'</p>\
<p>'+tr("There are currently")+' <b>'+$storage_count+'</b> '+tr("images")+'.</p>';
<p>'+tr("There are currently")+' <b>'+$storage_count+'</b> '+
tr("images")+'.</p>';
///////////////////////////////////////////////////////////
//Network tab
///////////////////////////////////////////////////////////
var network_dashboard_image = "image/one-network.png";
var network_dashboard_html = '<p>'+tr("In this view you can easily manage OpenNebula Network resources. You can add, remove, publish or unpublish virtual networks.")+'</p>\
var network_dashboard_html = '<p>'+tr("In this view you can easily manage OpenNebula Network resources. You can add or remove virtual networks.")+'</p>\
<p>'+tr("Compute resources can be attached to these networks at creation time. Virtual machines will be provided with an IP and the correct parameters to ensure connectivity.")+'</p>\
<p>'+tr("There are currently")+' <b>'+$network_count+'</b> '+tr("networks")+'.</p>';
<p>'+
tr("There are currently")+' <b>'+$network_count+'</b> '+
tr("networks")+'.</p>';

View File

@ -30,8 +30,7 @@ function tr(str){
//Pops up loading new language dialog. Retrieves the user template, updates the LANG variable.
//Updates template and session configuration and reloads the view.
function setLang(lang_str){
var lang_tmp="";
var dialog = $('<div title="Changing language">Loading new language... please wait '+spinner+'</div>').dialog({
var dialog = $('<div title="'+tr("Changing language")+'">'+tr("Loading new language... please wait")+' '+spinner+'</div>').dialog({
draggable:false,
modal:true,
resizable:false,
@ -40,51 +39,14 @@ function setLang(lang_str){
minHeight: 50
});
var updateUserTemplate = function(request,user_json){
var template = user_json.USER.TEMPLATE;
var template_str="";
template["LANG"] = lang_tmp;
//convert json to ONE template format - simple conversion
$.each(template,function(key,value){
template_str += (key + '=' + '"' + value + '"\n');
});
var obj = {
data: {
id: uid,
extra_param: template_str
},
error: onError
};
OpenNebula.User.update(obj);
$.post('config',JSON.stringify({lang:lang_tmp}),function(){window.location.href = "."});
};
lang_tmp = lang_str;
if (whichUI() == "sunstone"){
var obj = {
data : {
id: uid,
},
success: updateUserTemplate
};
OpenNebula.User.show(obj);
} else {
dialog.dialog('close');
if (('localStorage' in window) && (window['localStorage'] !== null)){
localStorage['lang']=lang_str;
};
$.post('config',JSON.stringify({lang:lang_str}),function(){window.location.href = "./ui"});
};
$(document).ready(function(){
if (lang)
$('#lang_sel option[value="'+lang+'"]').attr('selected','selected');
$('#lang_sel').change(function(){
setLang($(this).val());
});
//Update static translations
$('#doc_link').text(tr("Documentation"));
$('#support_link').text(tr("Support"));

View File

@ -37,16 +37,21 @@ function auth_error(req, error){
function authenticate(){
var username = $("#username").val();
var password = $("#password").val();
password = Crypto.SHA1(password);
var remember = $("#check_remember").is(":checked");
password = Crypto.SHA1(password);
var obj = { data: {username: username,
password: password},
remember: remember,
success: auth_success,
error: auth_error
};
OCCI.Auth.login({ data: {username: username
, password: password}
, remember: remember
, success: auth_success
, error: auth_error
});
if (('localStorage' in window) && (window['localStorage'] !== null) && (localStorage['lang'])){
obj['lang'] = localStorage['lang'];
};
OCCI.Auth.login(obj);
}
$(document).ready(function(){

View File

@ -359,6 +359,7 @@ var OCCI = {
var username = params.data.username;
var password = params.data.password;
var remember = params.remember;
var lang = params.lang;
var resource = OCCI.Auth.resource;
var request = OCCI.Helper.request(resource,"login");
@ -366,7 +367,7 @@ var OCCI = {
$.ajax({
url: "ui/login",
type: "POST",
data: {remember: remember},
data: {remember: remember, lang: lang},
beforeSend : function(req) {
req.setRequestHeader( "Authorization",
"Basic " + btoa(username + ":" + password)

View File

@ -308,7 +308,7 @@ var vm_buttons = {
"VM.shutdown" : {
type: "confirm",
text: tr("Shutdown"),
tip: tr("This will initiate the shutdown process in the selected VMs")
tip: tr("This will shutdown the selected VMs")
},
"action_list" : {
@ -317,12 +317,12 @@ var vm_buttons = {
"VM.suspend" : {
type: "confirm",
text: tr("Suspend"),
tip: tr("This will suspend selected machines")
tip: tr("This will suspend the selected VMs")
},
"VM.resume" : {
type: "confirm",
text: tr("Resume"),
tip: tr("This will resume selected stopped or suspended VMs")
tip: tr("This will resume the selected VMs in stopped or suspended states")
},
"VM.stop" : {
type: "confirm",
@ -336,7 +336,7 @@ var vm_buttons = {
},
"VM.saveasmultiple" : {
type: "action",
text: tr("Save as")
text: tr("Take snapshot")
}
}
},
@ -744,7 +744,7 @@ function popUpCreateVMDialog(){
//Prepares a dialog to saveas a VM
function setupSaveasDialog(){
//Append to DOM
dialogs_context.append('<div id="saveas_vm_dialog" title=\"'+tr("VM Save As")+'\"></div>');
dialogs_context.append('<div id="saveas_vm_dialog" title=\"'+tr("Take snapshot")+'\"></div>');
$saveas_vm_dialog = $('#saveas_vm_dialog',dialogs_context);
var dialog = $saveas_vm_dialog;

View File

@ -0,0 +1,62 @@
/* -------------------------------------------------------------------------- */
/* Copyright 2002-2011, OpenNebula Project Leads (OpenNebula.org) */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */
/* not use this file except in compliance with the License. You may obtain */
/* a copy of the License at */
/* */
/* http://www.apache.org/licenses/LICENSE-2.0 */
/* */
/* Unless required by applicable law or agreed to in writing, software */
/* distributed under the License is distributed on an "AS IS" BASIS, */
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
/* See the License for the specific language governing permissions and */
/* limitations under the License. */
/* -------------------------------------------------------------------------- */
var config_tab_content =
'<form>\
<table id="config_table" style="width:100%">\
<tr>\
<td>\
<div class="panel">\
<h3>' + tr("Self-Service UI Configuration") + '</h3>\
<div class="panel_info">\
\
<table class="info_table">\
<tr>\
<td class="key_td">' + tr("Language") + '</td>\
<td class="value_td">\
<select id="lang_sel" style="width:20em;">\
<option value="en_US">'+tr("English")+'</option>\
<option value="es_ES">'+tr("Spanish")+'</option>\
</select>\
</td>\
</tr>\
</table>\
\
</div>\
</div>\
</td>\
</tr>\
</table></form>';
var config_tab = {
title: tr("Configuration"),
content: config_tab_content
}
Sunstone.addMainTab('config_tab',config_tab);
$(document).ready(function(){
if (lang)
$('table#config_table #lang_sel option[value="'+lang+'"]').attr('selected','selected');
$('table#config_table #lang_sel').change(function(){
setLang($(this).val());
});
$('#li_config_tab a').click(function(){
hideDialog();
});
});

View File

@ -78,8 +78,8 @@ var dashboard_tab_content =
<img style="float:right;width:100px;" src="'+
compute_box_image + '" />'+
compute_box_html +
'<p><span class="ui-icon ui-icon-arrowreturnthick-1-e" style="display:inline-block;vertical-align:middle;"/><a class="action_link" href="#vms_tab" action="VM.create_dialog">Create new compute resource</a><br />\
<span class="ui-icon ui-icon-arrowreturnthick-1-e" style="display:inline-block;vertical-align:middle;"/><a class="tab_link" href="#vms_tab">See more</a></p>\
'<p><span class="ui-icon ui-icon-arrowreturnthick-1-e" style="display:inline-block;vertical-align:middle;"/><a class="action_link" href="#vms_tab" action="VM.create_dialog">'+tr("Create new compute resource")+'</a><br />\
<span class="ui-icon ui-icon-arrowreturnthick-1-e" style="display:inline-block;vertical-align:middle;"/><a class="tab_link" href="#vms_tab">'+tr("See more")+'</a></p>\
</div>\
</div>\
</td>\
@ -92,8 +92,8 @@ var dashboard_tab_content =
<img style="float:right;width:100px;" src="'+
storage_box_image +'" />' +
storage_box_html +
'<p><span class="ui-icon ui-icon-arrowreturnthick-1-e" style="display:inline-block;vertical-align:middle;"/><a class="action_link" href="#images_tab" action="Image.create_dialog">Create new storage resource</a><br />\
<span class="ui-icon ui-icon-arrowreturnthick-1-e" style="display:inline-block;vertical-align:middle;"/><a class="tab_link" href="#images_tab">See more</a></p>\
'<p><span class="ui-icon ui-icon-arrowreturnthick-1-e" style="display:inline-block;vertical-align:middle;"/><a class="action_link" href="#images_tab" action="Image.create_dialog">'+tr("Create new storage resource")+'</a><br />\
<span class="ui-icon ui-icon-arrowreturnthick-1-e" style="display:inline-block;vertical-align:middle;"/><a class="tab_link" href="#images_tab">'+tr("See more")+'</a></p>\
</div>\
</div>\
</td>\
@ -106,8 +106,8 @@ var dashboard_tab_content =
<p><img style="float:right;width:100px;" src="' +
network_box_image +'" />' +
network_box_html +
'<p><span class="ui-icon ui-icon-arrowreturnthick-1-e" style="display:inline-block;vertical-align:middle;"/><a class="action_link" href="#vnets_tab" action="Network.create_dialog">Create new network resource</a><br />\
<span class="ui-icon ui-icon-arrowreturnthick-1-e" style="display:inline-block;vertical-align:middle;"/><a class="tab_link" href="#vnets_tab">See more</a><br /></p>\
'<p><span class="ui-icon ui-icon-arrowreturnthick-1-e" style="display:inline-block;vertical-align:middle;"/><a class="action_link" href="#vnets_tab" action="Network.create_dialog">'+tr("Create new network resource")+'</a><br />\
<span class="ui-icon ui-icon-arrowreturnthick-1-e" style="display:inline-block;vertical-align:middle;"/><a class="tab_link" href="#vnets_tab">'+tr("See more")+'</a><br /></p>\
</div>\
</div>\
</td>\

View File

@ -44,12 +44,12 @@ var create_image_tmpl =
<div class="img_param">\
<label for="img_name">'+tr("Name")+':</label>\
<input type="text" name="img_name" id="img_name" />\
<div class="tip">'+tr("Name that the Image will get. Every image must have a unique name.")+'</div>\
<div class="tip">'+tr("Name that the Image will get.")+'</div>\
</div>\
<div class="img_param">\
<label for="img_desc">'+tr("Description")+':</label>\
<textarea name="img_desc" id="img_desc" style="height:4em"></textarea>\
<div class="tip">'+tr("Human readable description of the image for other users.")+'</div>\
<div class="tip">'+tr("Human readable description of the image.")+'</div>\
</div>\
</fieldset>\
<fieldset>\
@ -60,7 +60,7 @@ var create_image_tmpl =
<option value="CDROM">'+tr("CD-ROM")+'</option>\
<option value="DATABLOCK">'+tr("Datablock")+'</option>\
</select>\
<div class="tip">'+tr("Type of the image, explained in detail in the following section. If omitted, the default value is the one defined in oned.conf (install default is OS).")+'</div>\
<div class="tip">'+tr("Type of the image")+'</div>\
</div>\
<div class="img_param">\
<label for="img_size">'+tr("Size")+':</label>\

View File

@ -0,0 +1,157 @@
//Translated by
lang="en_US"
datatable_lang=""
locale={
"Additionally, OpenNebula Self-Service allows easy customization of the interface (e.g. this text) and brings multi-language support.":"",
"Additionally, you can run several operations on defined storages, such as defining their persistance. Persistent images can only be used by 1 virtual machine, and the changes made by it have effect on the base image. Non-persistent images are cloned before being used in a Virtual Machine, therefore changes are lost unless a snapshot is taken prior to Virtual Machine shutdown.":"",
"Additionally, you can take a \'snapshot\' of the storage attached to these resources. They will be saved as new resources, visible from the Storage view and re-usable.":"",
"Add storage":"",
"All":"",
"are mandatory":"",
"Cancel":"",
"Cannot contact server: is it running and reachable?":"",
"Canvas not supported.":"",
"CD-ROM":"",
"Changing language":"",
"Community":"",
"Compute":"",
"Compute resource":"",
"Compute resources are Virtual Machines attached to storage and network resources. OpenNebula Self-Service allows you to easily create, remove and manage them, including the possibility of pausing a Virtual Machine or taking a snapshot of one of their disks.":"",
"Compute resources can be attached to these networks at creation time. Virtual machines will be provided with an IP and the correct parameters to ensure connectivity.":"",
"Configuration":"",
"Confirmation of action":"",
"CPU":"",
"Create network":"",
"Create new compute resource":"",
"Create new network resource":"",
"Create new storage resource":"",
"Create Virtual Machine":"",
"Create # VMs":"",
"Current resources":"",
"Dashboard":"",
"Datablock":"",
"Delete":"",
"Description":"",
"disk id":"",
"Disks":"",
"Disks information":"",
"Documentation":"",
"Do you want to proceed?":"",
"English":"",
"Error":"",
"Fields marked with":"",
"Filesystem type":"",
"FS type":"",
"Have a cloudy experience!":"",
"Human readable description of the image.":"",
"ID":"",
"Image":"",
"Image information":"",
"Image name":"",
"images":"",
"Images":"",
"Info":"",
"information":"",
"Instance type":"",
"In this view you can easily manage OpenNebula Network resources. You can add or remove virtual networks.":"",
"IP":"",
"Language":"",
"Loading":"",
"MAC":"",
"Make non persistent":"",
"Make persistent":"",
"Memory":"",
"Monitoring information":"",
"Name":"",
"Name that the Image will get.":"",
"Network":"",
"Network Address":"",
"Network information":"",
"Network is unreachable: is OpenNebula running?":"",
"Network reception":"",
"networks":"",
"Networks":"",
"Networks information":"",
"Network Size":"",
"Network transmission":"",
"+ New":"",
"No disk id or image name specified":"",
"No disks defined":"",
"No networks defined":"",
"OK":"",
"OpenNebula Self-Service is a simplified user interface to manage OpenNebula compute, storage and network resources. It is focused on easiness and usability and features a limited set of operations directed towards end-users.":"",
"Open VNC Session":"",
"OS":"",
"Persistence of the image":"",
"Persistent":"",
"Please, choose and modify the template you want to update":"",
"Please provide a network address":"",
"Please select":"",
"Previous action":"",
"Public":"",
"Public scope of the image":"",
"Publish":"",
"Refresh list":"",
"Resume":"",
"Retrieving":"",
"Saveas for VM with ID":"",
"See more":"",
"Select a template":"",
"Select disk":"",
"Self-Service UI Configuration":"",
"Shutdown":"",
"Sign out":"",
"Size":"",
"Size (Mb)":"",
"Size of the datablock in MB.":"",
"Skipping VM ":"",
"Spanish":"",
"State":"",
"Stop":"",
"Storage":"",
"Storage pool is formed by several images. These images can contain from full operating systems to be used as base for compute resources, to simple data. OpenNebula Self-Service offers you the possibility to create or upload your own images.":"",
"String":"",
"style":"",
"Submitted":"",
"Support":"",
"Suspend":"",
"Take snapshot":"",
"Target":"",
"There are currently":"",
"The Storage view offers you an overview of your current images. Storage elements are attached to compute resources at creation time. They can also be extracted from running virtual machines by taking an snapshot.":"",
"This is a list of your current compute resources. Virtual Machines use previously defined images and networks. You can easily create a new compute element by cliking \'new\' and filling-in an easy wizard.":"",
"This will cancel selected VMs":"",
"This will delete the selected VMs from the database":"",
"This will resume the selected VMs in stopped or suspended states":"",
"This will shutdown the selected VMs":"",
"This will suspend the selected VMs":"",
"Type":"",
"Type of file system to be built. This can be any value understood by mkfs unix command.":"",
"Type of the image":"",
"Unauthorized":"",
"Unpublish":"",
"Update":"",
"Update template":"",
"Upload image":"",
"Upload progress":"",
"Useful links":"",
"Virtual Machine information":"",
"virtual machines":"",
"Virtual Network":"",
"Virtual Network information":"",
"Virtual Network name missing!":"",
"VM information":"",
"VM Name":"",
"VNC connection":"",
"VNC Disabled":"",
"Welcome":"",
"Welcome to OpenNebula Self-Service":"",
"You can add new storages by clicking \'new\'. Image files will be uploaded to OpenNebula and set ready to be used.":"",
"You can also manage compute resources and perform actions such as stop, resume, shutdown or cancel.":"",
"You have to confirm this action.":"",
"You must select a file to upload":"",
"You must specify a name":"",
"You must specify size and FS type":"",
"You need to select something.":"",
"Your compute resources connectivity is performed using pre-defined virtual networks. You can create and manage these networks using OpenNebula Self-Service.":"",
};

View File

@ -0,0 +1,157 @@
//Translated by
lang="es_ES"
datatable_lang="es_datatable.txt"
locale={
"Additionally, OpenNebula Self-Service allows easy customization of the interface (e.g. this text) and brings multi-language support.":"Además, OpenNebula Self-Service permite una fácil personalización de la interfaz (por ejemplo, de este mismo texto) y viene con soporte para múltiples lenguajes.",
"Additionally, you can run several operations on defined storages, such as defining their persistance. Persistent images can only be used by 1 virtual machine, and the changes made by it have effect on the base image. Non-persistent images are cloned before being used in a Virtual Machine, therefore changes are lost unless a snapshot is taken prior to Virtual Machine shutdown.":"Además, puede ejecutar varias operaciones en los almacenamientos presentes, como definir su persistencia. Las imágenes persistentes sólo pueden ser usadas por 1 máquina virtual, y los cambios realizados por ella tiene efecto en la imágen base. Las imágenes no persistentes son clonadas antes de ser utilizadas en una máquina virtual, por tanto los cambios se pierden a menos que se tome una instantánea antes de apagar la máquina virtual.",
"Additionally, you can take a 'snapshot' of the storage attached to these resources. They will be saved as new resources, visible from the Storage view and re-usable.":"Además, puede tomar una 'instantánea' de los almacenamientos asociado a estos recursos. Ésta será salvaguardada como un nuevo recurso, visible y reutilizable desde la vista de almacenamientos.",
"Add storage":"Añadir almacenamiento",
"All":"Todos",
"are mandatory":"son obligatorios",
"Cancel":"Cancelar",
"Cannot contact server: is it running and reachable?":"No se puede contactar con el servidor: ¿está funcionando y es alcanzable?",
"Canvas not supported.":"Canvas no soportado",
"CD-ROM":"CD-ROM",
"Changing language":"Cambiando el lenguaje",
"Community":"Comunidad",
"Compute":"Máquinas Virtuales",
"Compute resource":"máquina virtual",
"Compute resources are Virtual Machines attached to storage and network resources. OpenNebula Self-Service allows you to easily create, remove and manage them, including the possibility of pausing a Virtual Machine or taking a snapshot of one of their disks.":"Las máquinas virtuales están asociadas a recursos de almacenamiento y de red. OpenNebula Self-Service le permite crearlos, borrarlos y administrarlos fácilmente, incluyendo la posibilidad de pausar una máquina virtual o de tomar una instantánea de alguno de sus discos.",
"Compute resources can be attached to these networks at creation time. Virtual machines will be provided with an IP and the correct parameters to ensure connectivity.":"Las máquinas virtuales pueden asociarse a estas redes en el momento de su creación. Las máquinas virtuales serán provistas de una IP y de los parámetros correctos para asegurar conectividad.",
"Configuration":"Configuración",
"Confirmation of action":"Confirmar operación",
"CPU":"CPU",
"Create network":"Crear red",
"Create new compute resource":"Crear nueva máquina virtual",
"Create new network resource":"Crear nueva red",
"Create new storage resource":"Crear nuevo almacenamiento",
"Create Virtual Machine":"Crear máquina virtual",
"Create # VMs":"Crear # MVs",
"Current resources":"Recursos actuales",
"Dashboard":"Portada",
"Datablock":"Datablock",
"Delete":"Borrar",
"Description":"Descripción",
"disk id":"id del disco",
"Disks":"Discos",
"Disks information":"Información de discos",
"Documentation":"Documentación",
"Do you want to proceed?":"¿Desea continuar?",
"English":"Inglés",
"Error":"Error",
"Fields marked with":"Campos marcados con",
"Filesystem type":"Sistema de ficheros",
"FS type":"tipo de FS",
"Have a cloudy experience!":"¡Nos vemos en las nubes!",
"Human readable description of the image.":"Descripción de la imagen.",
"ID":"ID",
"Image":"Imagen",
"Image information":"Información de la imagen",
"Image name":"Nombre de la imagen",
"images":"imágenes",
"Images":"Imágenes",
"Info":"Información",
"information":"Información",
"Instance type":"Tipo de instancia",
"In this view you can easily manage OpenNebula Network resources. You can add or remove virtual networks.":"En esta vista puede gestionar fácilmente los recursos de red de OpenNebula. Puede añadir o borrar redes virtuales.",
"IP":"IP",
"Language":"Lenguaje",
"Loading":"Cargando",
"MAC":"MAC",
"Make non persistent":"Hacer no persistente",
"Make persistent":"Hacer persistente",
"Memory":"Memoria",
"Monitoring information":"Información de monitorización",
"Name":"Nombre",
"Name that the Image will get.":"Nombre para la imagen.",
"Network":"Red",
"Network Address":"Dirección de red",
"Network information":"Información de red",
"Network is unreachable: is OpenNebula running?":"No se puede alcanzar la red: ¿está OpenNebula funcionando?",
"Network reception":"Recepción de red",
"networks":"redes",
"Networks":"Redes",
"Networks information":"Información de redes",
"Network Size":"Tamaño de red",
"Network transmission":"Transmisión de red",
"+ New":"+ Nuevo",
"No disk id or image name specified":"No se ha especificado ID de disco o nombre de la imagen",
"No disks defined":"No hay discos definidos",
"No networks defined":"No hay redes definidas",
"OK":"OK",
"OpenNebula Self-Service is a simplified user interface to manage OpenNebula compute, storage and network resources. It is focused on easiness and usability and features a limited set of operations directed towards end-users.":"OpenNebula Self-Service es una interfaz de usuario simplificada para administrar máquinas virtuales, almacenamiento y red de OpenNebula. Está basada en la facilidad de uso y cuenta con un número limitado de operaciones dirigidas a los usuarios finales.",
"Open VNC Session":"Abrir sesión VNC",
"OS":"OS",
"Persistence of the image":"Persistencia de la imagen",
"Persistent":"Persistente",
"Please, choose and modify the template you want to update":"Por favor, escoja y modifique la plantilla que desea actualizar",
"Please provide a network address":"Por favor, proporcione una dirección de red",
"Please select":"Por favor escoja",
"Previous action":"Acción anterior",
"Public":"Público",
"Public scope of the image":"",
"Publish":"Publicar",
"Refresh list":"Refrescar lista",
"Resume":"Reanudar",
"Retrieving":"Cargando",
"Saveas for VM with ID":"Instantánea a MV con ID",
"See more":"Ver más",
"Select a template":"Seleccione una plantilla",
"Select disk":"Seleccione un disco",
"Self-Service UI Configuration":"Configuración de la interfaz Self-Service",
"Shutdown":"Apagar",
"Sign out":"Desconectar",
"Size":"Tamaño",
"Size (Mb)":"Tamaño (Mb)",
"Size of the datablock in MB.":"Tamaño del datablcok en MB",
"Skipping VM ":"Saltando MV",
"Spanish":"Español",
"State":"Estado",
"Stop":"Detener",
"Storage":"Almacenamiento",
"Storage pool is formed by several images. These images can contain from full operating systems to be used as base for compute resources, to simple data. OpenNebula Self-Service offers you the possibility to create or upload your own images.":"La lista de almacenamiento está formada por varias imágenes. Estas imágenes pueden contener desde sistemas operativos completos para ser usados como base en máquinas virtuales, hasta simples datos. OpenNebula Self-Service ofrece la posibilidad de crear o subir sus propias imágenes.",
"String":"String",
"style":"estilo",
"Submitted":"Hecho",
"Support":"Soporte",
"Suspend":"Suspender",
"Take snapshot":"Tomar instantánea",
"Target":"Target",
"There are currently":"Actualmente hay",
"The Storage view offers you an overview of your current images. Storage elements are attached to compute resources at creation time. They can also be extracted from running virtual machines by taking an snapshot.":"La vista de almacenamiento le ofrece la visión general de sus imágenes. Los elementos de almacenamiento se asocian a máquinas virtuales en el momento de la creación. También pueden ser extraídos de una máquina virtual en ejecución tomando una instantánea",
"This is a list of your current compute resources. Virtual Machines use previously defined images and networks. You can easily create a new compute element by cliking 'new' and filling-in an easy wizard.":"Esta es una lista de sus máquinas virtuales actuales. Las máquinas virtuales utilizan imagenes y redes definidas previamente. Puede crear fácilmente una nueva máquina virtual haciendo click en 'New' y rellenado un sencillo formulario.",
"This will cancel selected VMs":"Esto cancelará las MVs seleccionadas",
"This will delete the selected VMs from the database":"Esto borrará las MVs seleccionadas de la base de datos",
"This will resume the selected VMs in stopped or suspended states":"Esto reanudará las MVs seleccionadas paradas o suspendidas",
"This will shutdown the selected VMs":"Esto apagará las MVs seleccionadas",
"This will suspend the selected VMs":"Esto suspenderá las MVs seleccionadas",
"Type":"Tipo",
"Type of file system to be built. This can be any value understood by mkfs unix command.":"Tipo de sistema de archivos a generar. Es válido cualquier valor entendido por el comando mkfs",
"Type of the image":"Tipo de la imagen",
"Unauthorized":"No autorizado",
"Unpublish":"Despublicar",
"Update":"Actualizar",
"Update template":"Actualizar plantilla",
"Upload image":"Subir imagen",
"Upload progress":"Progreso se subida",
"Useful links":"Enlances útiles",
"Virtual Machine information":"Información de máquina virtual",
"virtual machines":"máquinas virtuales",
"Virtual Network":"Red virtual",
"Virtual Network information":"Información de red virtual",
"Virtual Network name missing!":"¡Falta el nombre de la red!",
"VM information":"Información de MV",
"VM Name":"Nombre",
"VNC connection":"Conexión VNC",
"VNC Disabled":"VNC Desabilitado",
"Welcome":"Bienvenid@",
"Welcome to OpenNebula Self-Service":"Bienvenid@ a OpenNebula Self-Service",
"You can add new storages by clicking 'new'. Image files will be uploaded to OpenNebula and set ready to be used.":"Puede añadir nuevos almacenamientos haciendo click en 'new'. Los ficheros de imagen pueden ser subidos a OpenNebula y preparados para ser usado.",
"You can also manage compute resources and perform actions such as stop, resume, shutdown or cancel.":"También puede administrar las máquinas virtuales y realizar acciones como detener, reanudar, apagar o cancelar.",
"You have to confirm this action.":"Necesita confirmar esta acción",
"You must select a file to upload":"Debe seleccionar un fichero para subir",
"You must specify a name":"Debe especificar un nombre",
"You must specify size and FS type":"Debe especificar un tamaño y un tipo de FS",
"You need to select something.":"Debe seleccionar algo",
"Your compute resources connectivity is performed using pre-defined virtual networks. You can create and manage these networks using OpenNebula Self-Service.":"La conectividad de sus máquinas virtuales se realiza usando redes virtuales pre-definidas. Puede crear y administrar estas redes usando OpenNebula Self-Service.",
};

View File

@ -0,0 +1,17 @@
{
"sProcessing": "Procesando...",
"sLengthMenu": "Número de elementos",
"sZeroRecords": "No hay elementos",
"sInfo": "Mostrando del _START_ al _END_ de _TOTAL_",
"sInfoEmpty": "No hay elementos",
"sInfoFiltered": "(filtado de un total de _MAX_)",
"sInfoPostFix": "",
"sSearch": "Buscar:",
"sUrl": "",
"oPaginate": {
"sFirst": "Primero",
"sPrevious": "Anterior",
"sNext": "Siguiente",
"sLast": "Último"
}
}

View File

@ -0,0 +1,31 @@
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
# -------------------------------------------------------------------------- #
# Copyright 2002-2011, OpenNebula Project Leads (OpenNebula.org) #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
# not use this file except in compliance with the License. You may obtain #
# a copy of the License at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# Unless required by applicable law or agreed to in writing, software #
# distributed under the License is distributed on an "AS IS" BASIS, #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
# See the License for the specific language governing permissions and #
# limitations under the License. #
#--------------------------------------------------------------------------- #
tr_strings = `grep -h -o -R -e 'tr("[[:print:]]*")' ../js/* ../customize/* | cut -d'"' -f 2 | sort -u`
puts "//Translated by"
puts 'lang="en_US"'
puts 'datatable_lang=""'
puts "locale={"
tr_strings.each_line do | line |
puts " \"#{line.chomp}\":\"\","
end
puts "};"

View File

@ -0,0 +1,52 @@
#!/usr/bin/js
/* -------------------------------------------------------------------------- */
/* Copyright 2002-2011, OpenNebula Project Leads (OpenNebula.org) */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */
/* not use this file except in compliance with the License. You may obtain */
/* a copy of the License at */
/* */
/* http://www.apache.org/licenses/LICENSE-2.0 */
/* */
/* Unless required by applicable law or agreed to in writing, software */
/* distributed under the License is distributed on an "AS IS" BASIS, */
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
/* See the License for the specific language governing permissions and */
/* limitations under the License. */
/* -------------------------------------------------------------------------- */
if (!arguments[0] || !arguments[1]){
print("Usage: upgrade_translation.js <old_translation> <empty_template> > <new_translation>");
quit();
};
var from = arguments[0];
var to = arguments[1];
load(from);
var tr="";
var locale_old= {};
for (tr in locale){
locale_old[tr] = locale[tr];
};
var lang_old = lang;
var dt_lang_old = datatable_lang
load(to);
for (tr in locale){
if (locale_old[tr]){
locale[tr] = locale_old[tr]
};
};
print("//Translated by");
print('lang="'+lang_old+'"');
print('datatable_lang="'+dt_lang_old+'"');
print("locale={");
for (tr in locale){
print(' "'+tr+'":"'+locale[tr]+'",');
};
print("};");

View File

@ -42,6 +42,7 @@
<script type="text/javascript" src="js/plugins/compute.js"></script>
<script type="text/javascript" src="js/plugins/storage.js"></script>
<script type="text/javascript" src="js/plugins/network.js"></script>
<script type="text/javascript" src="js/plugins/configuration.js"></script>
@ -63,7 +64,7 @@
<img src="images/opennebula-selfservice-small.png"/>
</div>
<div id="login-info">
Welcome <span id="user"></span>&nbsp;|&nbsp;<a href="#" id="logout">Sign Out</a>
<span id="welcome">Welcome</span> <span id="user"></span>&nbsp;|&nbsp;<a href="#" id="logout">Sign Out</a>
</div>
<!--
<div id="links">