BUG 8671 PM. 2.0 -Testing.13: Error de traducción SOLVED.

- Al asignar un nuevo usuario a una tarea, la ventana posee labels en ingles.
- Se realizaron ajustes en los hardcoded de labels.
This commit is contained in:
Hector Cortez
2012-03-12 17:09:59 -04:00
parent 8636a38142
commit 609a5d2527
3 changed files with 59 additions and 57 deletions

View File

@@ -33,7 +33,7 @@ $oHeadPublisher =& headPublisher::getSingleton();
'ID_STATUS', 'ID_ACTIVATE', 'ID_DEACTIVATE',
'ID_SELECT', 'ID_NO_SELECTION_WARNING', 'ID_MSG_REMOVE_PLUGIN',
'ID_TITLE', 'ID_VERSION', 'ID_STATUS', 'ID_TITLE', 'ID_VERSION', 'ID_DESCRIPTION',
'ID_STATUS', 'ID_PLUGIN_CANT_DELETE', 'ID_XPDL_IMPORT'
'ID_STATUS', 'ID_PLUGIN_CANT_DELETE', 'ID_XPDL_IMPORT', 'ID_DISABLE', 'ID_ENABLE', 'ID_CONFIRM'
));
$oHeadPublisher->assign('TRANSLATIONS', $translations);
G::RenderPage('publish', 'extJs');

View File

@@ -258,13 +258,15 @@ Ext.onReady(function(){
tag = r.get('ADD_TAB_TAG').replace('plugin@', '');
tag = tag.charAt(0).toUpperCase() + tag.slice(1);
switch(tag.toLowerCase()){
case 'simplereport': tag = 'Simple Report'; break;
case 'simplereport':
tag = _('ID_SIMPLE_REPORT');
break;
}
}
return r.get('ADD_TAB_TAG') ? '<span style="font-size:9px; color:green">'+tag+':</span> '+ v : v;
}});
cmodelColumns.push({header: 'Table Type', dataIndex: 'PRO_UID', width: 120, align:'left', renderer: function(v,p,r){
cmodelColumns.push({header: _('ID_TABLE_TYPE'), dataIndex: 'PRO_UID', width: 120, align:'left', renderer: function(v,p,r){
color = r.get('PRO_UID') ? 'blue' : 'green';
value = r.get('PRO_UID') ? _('ID_REPORT_TABLE') : _('ID_PMTABLE');
return '<span style="color:'+color+'">'+value+'</span> ';
@@ -348,7 +350,7 @@ Ext.onReady(function(){
var rowsSelected = Ext.getCmp('infoGrid').getSelectionModel().getSelections();
tag = rowsSelected[0].get('ADD_TAB_TAG');
text = tag? 'Convert to native Report Table': 'Convert to Simple Report';
text = (tag) ? _('ID_CONVERT_TO NATIVE_REPORT_TABLE') : _('ID_CONVERT_TO_SIMPLE_REPORT');
if (externalOption) {
externalOption.setText(text);
@@ -435,12 +437,12 @@ DeletePMTable = function() {
selections[i] = {id: rows[i].get('ADD_TAB_UID'), type: rows[i].get('TYPE')};
}
Ext.Msg.confirm(_('ID_CONFIRM'), _('ID_CONFIRM_DELETE_PM_TABLE'),
Ext.Msg.confirm( _('ID_CONFIRM'), _('ID_CONFIRM_DELETE_PM_TABLE'),
function(btn, text) {
if (btn == "yes") {
Ext.Msg.show({
title : '',
msg : 'Removing selectd table(s), please wait!',
msg : _('ID_REMOVING_SELECTD_TABLES'),
wait:true,
waitConfig: {interval:500}
});
@@ -489,7 +491,7 @@ ImportPMTable = function(){
fileUpload: true,
width: 400,
frame: true,
title: 'Import PM Table',
title: _('ID_IMPORT_PMT'), // 'Import PM Table',
autoHeight: false,
bodyStyle: 'padding: 10px 10px 0 10px;',
labelWidth: 50,
@@ -501,7 +503,7 @@ ImportPMTable = function(){
items: [{
xtype: 'fileuploadfield',
id: 'form-file',
emptyText: 'Select a .pmt file',
emptyText: _('ID_SELECT_PM_FILE'),
fieldLabel: _('ID_FILE'),
name: 'form[FILENAME]',
buttonText: '',
@@ -511,7 +513,7 @@ ImportPMTable = function(){
}, {
xtype: 'checkbox',
fieldLabel: '',
boxLabel: 'Overwrite if exists?',
boxLabel: _('ID_OVERWRITE_EXIST'), // 'Overwrite if exists?',
name: 'form[OVERWRITE]'
}],
buttons: [{
@@ -522,12 +524,12 @@ ImportPMTable = function(){
if(uploader.getForm().isValid()){
uploader.getForm().submit({
url: 'pmTablesProxy/import',
waitMsg: 'Uploading file...',
waitMsg: _('ID_UPLOADING_FILE'),
success: function(o, resp){
var result = Ext.util.JSON.decode(resp.response.responseText);
if (result.success) {
PMExt.notify('IMPORT RESULT', result.message);
PMExt.notify(_('ID_IMPORT_RESULT'), result.message);
}
else {
win = new Ext.Window({
@@ -537,7 +539,7 @@ ImportPMTable = function(){
height:300,
closeAction:'hide',
plain: true,
html: '<h3>Importing Error</h3>'+ result.message,
html: '<h3>' + _('ID_IMPORTING_ERROR') + '</h3>' + result.message,
items: [],
buttons: [{

View File

@@ -56,7 +56,7 @@ Ext.onReady(function(){
var expander = new Ext.ux.grid.RowExpander({
tpl : new Ext.Template(
'<p><b>'+TRANSLATIONS.ID_DESCRIPTION+': </b> {description}</p><br>'
'<p><b>' + _('ID_DESCRIPTION') + ': </b> {description}</p><br>'
)
});
@@ -91,12 +91,12 @@ Ext.onReady(function(){
columns: [
expander,
{id:'id', dataIndex: 'id', hidden:true, hideable:false},
{header: TRANSLATIONS.ID_DESCRIPTION, dataIndex: 'description', width: 100, hidden:true, hideable:false},
{header: _('ID_DESCRIPTION'), dataIndex: 'description', width: 100, hidden:true, hideable:false},
{header: '', dataIndex: 'namespace', width: 100, hidden:true, hideable:false},
{header: 'classname', dataIndex: 'className', width: 300, hidden:true, hideable:false},
{header: TRANSLATIONS.ID_TITLE, dataIndex: 'title'},
{header: TRANSLATIONS.ID_VERSION, dataIndex: 'version', width: 50},
{header: TRANSLATIONS.ID_STATUS, dataIndex: 'status_label', width: 40, renderer:function(v,p,r){
{header: _('ID_TITLE'), dataIndex: 'title'},
{header: _('ID_VERSION'), dataIndex: 'version', width: 50},
{header: _('ID_STATUS'), dataIndex: 'status_label', width: 40, renderer:function(v,p,r){
color = r.get('status') == '1'? 'green': 'red';
return String.format("<font color='{0}'>{1}</font>", color, v);
}},
@@ -111,32 +111,32 @@ Ext.onReady(function(){
store: store,
tbar:[{
text:TRANSLATIONS.ID_IMPORT,
text : _('ID_IMPORT'),
iconCls: 'silk-add',
icon: '/images/import.gif',
handler:importProcess
icon : '/images/import.gif',
handler: importProcess
},{
xtype: 'tbseparator'
},
{
id:'setup',
text:TRANSLATIONS.ID_CONFIGURE,
id : 'setup',
text : _('ID_CONFIGURE'),
iconCls: 'silk-add',
icon: '/images/options.png',
handler:configure
icon : '/images/options.png',
handler: configure
},
{
text:TRANSLATIONS.ID_STATUS,
id:'activator',
icon: '',
iconCls: 'silk-add',
handler: activeDeactive,
disabled:true
text : _('ID_STATUS'),
id : 'activator',
icon : '',
iconCls : 'silk-add',
handler : activeDeactive,
disabled: true
},{
text:TRANSLATIONS.ID_DELETE,
text : _('ID_DELETE'),
iconCls: 'silk-add',
icon: '/images/delete-16x16.gif',
handler:deletePlugin
icon : '/images/delete-16x16.gif',
handler: deletePlugin
}
],
listeners: {
@@ -153,10 +153,10 @@ Ext.onReady(function(){
if( rowSelected.data.status == 1 ){
activator.setIcon('/images/deactivate.png');
activator.setText('Disable');//activator.setText(TRANSLATIONS.ID_DISABLE);//activator.setText('Deactivate');
activator.setText(_('ID_DISABLE'));//activator.setText(TRANSLATIONS.ID_DISABLE);//activator.setText('Deactivate');
} else {
activator.setIcon('/images/activate.png');
activator.setText('Enable');//activator.setText(TRANSLATIONS.ID_ENABLE); //activator.setText('Activate');
activator.setText(_('ID_ENABLE'));//activator.setText(TRANSLATIONS.ID_ENABLE); //activator.setText('Activate');
}
//alert(rowSelected.data.setup);
if( rowSelected.data.setup == 1 ){
@@ -188,10 +188,10 @@ deletePlugin = function(){
status = rowSelected.get('status');
if(status == 0) {
Ext.Msg.confirm(
TRANSLATIONS.ID_CONFIRM, TRANSLATIONS.ID_MSG_REMOVE_PLUGIN,
_('ID_CONFIRM'), _('ID_MSG_REMOVE_PLUGIN'),
function(btn, text){
if ( btn == 'yes' ){
Ext.MessageBox.show({ msg: TRANSLATIONS.ID_DELETING_ELEMENTS, wait:true,waitConfig: {interval:200} });
Ext.MessageBox.show({ msg: _('ID_DELETING_ELEMENTS'), wait:true,waitConfig: {interval:200} });
Ext.Ajax.request({
url: 'pluginsRemove',
success: function(response) {
@@ -205,23 +205,23 @@ deletePlugin = function(){
);
} else {
Ext.Msg.show({
title:'',
msg: TRANSLATIONS.ID_PLUGIN_CANT_DELETE,
title : '',
msg : _('ID_PLUGIN_CANT_DELETE'),
buttons: Ext.Msg.INFO,
fn: function(){},
animEl: 'elId',
icon: Ext.MessageBox.INFO,
fn : function(){},
animEl : 'elId',
icon : Ext.MessageBox.INFO,
buttons: Ext.MessageBox.OK
});
}
} else {
Ext.Msg.show({
title:'',
msg: TRANSLATIONS.ID_NO_SELECTION_WARNING,
title : '',
msg : _('ID_NO_SELECTION_WARNING'),
buttons: Ext.Msg.INFO,
fn: function(){},
animEl: 'elId',
icon: Ext.MessageBox.INFO,
fn : function(){},
animEl : 'elId',
icon : Ext.MessageBox.INFO,
buttons: Ext.MessageBox.OK
});
}
@@ -274,12 +274,12 @@ function activeDeactive(){
//window.location = 'processes_ChangeStatus?PRO_UID='+rowSelected.data.PRO_UID;
} else {
Ext.Msg.show({
title:'',
msg: TRANSLATIONS.ID_NO_SELECTION_WARNING,
title : '',
msg : _('ID_NO_SELECTION_WARNING'),
buttons: Ext.Msg.INFO,
fn: function(){},
animEl: 'elId',
icon: Ext.MessageBox.INFO,
fn : function(){},
animEl : 'elId',
icon : Ext.MessageBox.INFO,
buttons: Ext.MessageBox.OK
});
}
@@ -295,12 +295,12 @@ var configure = function(){
} else {
Ext.Msg.show({
title:'',
msg: TRANSLATIONS.ID_NO_SELECTION_WARNING,
title : '',
msg : _('ID_NO_SELECTION_WARNING'),
buttons: Ext.Msg.INFO,
fn: function(){},
animEl: 'elId',
icon: Ext.MessageBox.INFO,
fn : function(){},
animEl : 'elId',
icon : Ext.MessageBox.INFO,
buttons: Ext.MessageBox.OK
});
}