This commit is contained in:
Roly Rudy Gutierrez Pinto
2015-09-15 11:50:23 -04:00
committed by Enrique Ponce De Leon
parent b8e7ce738e
commit a644c18fa5
6 changed files with 72 additions and 56 deletions

View File

@@ -129,6 +129,21 @@ class Language extends BaseLanguage
public function import ($sLanguageFile, $updateXml = true, $updateDB = true, $generateMafe = true)
{
try {
//get labels MichelangeloFE
try {
$oTranslation = new Translation();
$MichelangeloFE = PATH_HOME . "../workflow/public_html/lib/js";
if (file_exists($MichelangeloFE)) {
$labels = $this->readLabelsDirectory($MichelangeloFE, true);
foreach ($labels as $label) {
$oTranslation->addTranslation('LABEL', 'ID_MAFE_' . G::encryptOld($label), 'en', $label);
}
}
} catch (Exception $e) {
error_log($e->getMessage());
}
G::LoadSystem( 'i18n_po' );
$POFile = new i18n_PO( $sLanguageFile );
$POFile->readInit();
@@ -297,7 +312,7 @@ class Language extends BaseLanguage
try {
$oTranslation = new Translation();
$MichelangeloFE = PATH_HOME . "../workflow/public_html/lib/js";
if ($_GET['LOCALE'] === "en" & file_exists($MichelangeloFE)) {
if (file_exists($MichelangeloFE)) {
$labels = $this->readLabelsDirectory($MichelangeloFE, true);
foreach ($labels as $label) {
$oTranslation->addTranslation('LABEL', 'ID_MAFE_' . G::encryptOld($label), 'en', $label);

View File

@@ -55,7 +55,7 @@ var ldapFormAutoRegister = new Ext.form.ComboBox({
displayField: 'VALUE',
value: '0',
fieldLabel: '<span style="color: red">*</span>' + "Enable automatic register",
fieldLabel: '<span style="color: red">*</span>' + _("ID_ENABLE_AUTOMATIC_REGISTER"),
typeAhead: true,
forceSelection: true,
triggerAction: 'all',
@@ -68,7 +68,7 @@ var ldapFormAutoRegister = new Ext.form.ComboBox({
});
var ldapFormServerName = new Ext.form.TextField({
fieldLabel: '<span style="color: red">*</span>' + "Server Address",
fieldLabel: '<span style="color: red">*</span>' + _("ID_SERVER_ADDRESS"),
name: 'AUTH_SOURCE_SERVER_NAME',
id: 'AUTH_SOURCE_SERVER_NAME',
autoCreate: {tag: 'input', type: 'text', maxlength: '50'},
@@ -158,7 +158,7 @@ var ldapFormPassword = new Ext.form.TextField({
});
var ldapFormIdentifier = new Ext.form.TextField({
fieldLabel: '<span style="color: red">*</span>' + "User Identifier",
fieldLabel: '<span style="color: red">*</span>' + _("ID_USER_IDENTIFIER"),
name: 'AUTH_SOURCE_IDENTIFIER_FOR_USER',
id: 'AUTH_SOURCE_IDENTIFIER_FOR_USER',
autoCreate: {tag: 'input', type: 'text', maxlength: '20'},
@@ -168,7 +168,7 @@ var ldapFormIdentifier = new Ext.form.TextField({
});
var ldapFormUsersFilter = new Ext.form.TextField({
fieldLabel: "Filter to search users",
fieldLabel: _("ID_FILTER_TO_SEARCH_USERS"),
name: 'AUTH_SOURCE_USERS_FILTER',
id: 'AUTH_SOURCE_USERS_FILTER',
autoCreate: {tag: 'input', type: 'text', maxlength: '200'},
@@ -177,7 +177,7 @@ var ldapFormUsersFilter = new Ext.form.TextField({
});
var ldapFormRetiredEmployees = new Ext.form.TextField({
fieldLabel: "OU for Retired Employees OU",
fieldLabel: _("ID_OU_FOR_RETIRED_EMPLOYEES_OU"),
name: 'AUTH_SOURCE_RETIRED_OU',
id: 'AUTH_SOURCE_RETIRED_OU',
autoCreate: {tag: 'input', type: 'text', maxlength: '128'},
@@ -219,7 +219,7 @@ var ldapFormData = new Ext.form.FieldSet({
id:'passwordReview',
width: 300,
style: 'font: 9px tahoma,arial,helvetica,sans-serif;',
text: "(Default set to (&(!(objectClass=organizationalUnit))))",
text: _("ID_DEFAULT_SET_TO"),
labelSeparator: ''
}, ldapFormAttrinuteIds, ldapFormShowGrid, ldapFormGridText
]

View File

@@ -140,7 +140,7 @@ Ext.onReady(function() {
hideable:false
},{
id: 'ATTRIBUTE_LDAP',
header: "LDAP Field",
header: _("ID_LDAP_FIELD"),
dataIndex: 'ATTRIBUTE_LDAP',
width: 10,
sortable: true,
@@ -148,7 +148,7 @@ Ext.onReady(function() {
},
{
id: 'ATTRIBUTE_USER',
header: "User Field",
header: _("ID_USER_FIELD"),
dataIndex: 'ATTRIBUTE_USER',
width: 10,
sortable: true,
@@ -158,6 +158,7 @@ Ext.onReady(function() {
var ldapGridEditor = new Ext.ux.grid.RowEditor({
saveText: _('ID_SAVE'),
cancelText: _('ID_CANCEL'),
listeners: {
canceledit: function(grid,obj){
//
@@ -238,7 +239,7 @@ Ext.onReady(function() {
var chk = new Ext.form.Checkbox({
id: "AUTH_SOURCE_SHOWGRID-checkbox",
name: "AUTH_SOURCE_SHOWGRID-checkbox",
boxLabel: "Match attributes to sync",
boxLabel: _("ID_MATCH_ATTRIBUTES_TO_SYNC"),
renderTo: "containerChkAttribute",
listeners: {
@@ -277,7 +278,7 @@ Ext.onReady(function() {
ldapForm.getForm().submit({
method: "POST",
waitTitle: "Connecting...",
waitTitle: _('ID_CONNECTING'),
waitMsg: _("ID_SAVING"),
success: function (form, action)
{
@@ -293,7 +294,7 @@ Ext.onReady(function() {
var ldapForm = new Ext.FormPanel({
url : 'ldapAdvancedProxy.php?functionAccion=ldapSave',
frame : true,
title : "Authentication Source Information",
title : _("ID_AUTHENTICATION_SOURCE_INFORMATION"),
border : false,
autoScroll: true,
monitorValid : true,
@@ -325,7 +326,7 @@ Ext.onReady(function() {
{
columnWidth: 1,
bodyStyle: "border: 0px;",
html: "Minimum data required to run the \"Test Connection\": \"Server Address, " + _("ID_PORT") + ", " + _("ID_ENABLED_TLS") + ", " + _("ID_ANONYMOUS") + ", " + _("ID_USERNAME") + ", " + _("ID_PASSWORD") + "\""
html: _("ID_MINIMUM_DATA_REQUIRED_TO_RUN_THE")
}
]
}
@@ -379,11 +380,11 @@ Ext.onReady(function() {
}
},
{
text: "Test connection",
text: _('ID_TEST_CONNECTION'),
formBind: true,
handler: function ()
{
var loadMaskAux = new Ext.LoadMask(Ext.getBody(), {msg: "Testing connection..."});
var loadMaskAux = new Ext.LoadMask(Ext.getBody(), {msg: _('ID_TESTING_CONNECTION')});
loadMaskAux.show();
Ext.Ajax.request({
@@ -406,8 +407,8 @@ Ext.onReady(function() {
if (dataResponse.status) {
Ext.MessageBox.show({
title: "Test connection",
msg: (dataResponse.status == "OK")? "Successfully connected" : dataResponse.message,
title: _('ID_TEST_CONNECTION'),
msg: (dataResponse.status == "OK")? _('ID_SUCCESSFULLY_CONNECTED') : dataResponse.message,
icon: (dataResponse.status == "OK")? "ext-mb-ok" : Ext.MessageBox.ERROR,
buttons: {ok: _("ID_ACCEPT")}

View File

@@ -30,7 +30,7 @@ Ext.onReady(function() {
{
xtype: 'button',
iconCls: 'button_menu_ext ss_sprite ss_magnifier',
text: 'Search',
text: _('ID_SEARCH'),
width : 40,
handler: function(){
storeGridSearch.load({ params: {sKeyword: searchUsersText.getValue()} });
@@ -47,7 +47,7 @@ Ext.onReady(function() {
labelAlign: 'left',
align: 'center',
labelStyle: 'font-weight:bold; padding: 3px 3px 3px 15px;',
title: "<div><div style=\"float: left;\">" + "Search for user" + "</div><div id=\"divBack\" style=\"float: right;\"></div><div style=\"clear: both; height: 0; line-height:0; font-size: 0;\"></div></div>",
title: "<div><div style=\"float: left;\">" + _('ID_SEARCH_FOR_USER') + "</div><div id=\"divBack\" style=\"float: right;\"></div><div style=\"clear: both; height: 0; line-height:0; font-size: 0;\"></div></div>",
items: [
new Ext.FormPanel({
labelWidth : 120,
@@ -129,7 +129,7 @@ Ext.onReady(function() {
var tbarSearch = [
{
id: 'BUTTON_IMPORT',
text: 'Import',
text: _('ID_IMPORT'),
iconCls: 'button_menu_ext ss_sprite ss_group_go ',
disabled: true,
handler: function () {
@@ -163,8 +163,8 @@ Ext.onReady(function() {
Ext.MessageBox.confirm('Confirm', 'Are you sure you want to import the selected users?', function (val) {
if (val == 'yes') {
Ext.MessageBox.show({
msg: 'Importing Users...',
progressText: 'Saving...',
msg: _('ID_IMPORTING_USERS'),
progressText: _('ID_SAVING'),
width:300,
wait:true,
waitConfig: {interval:200},
@@ -183,8 +183,8 @@ Ext.onReady(function() {
Ext.MessageBox.hide();
if (resp.success) {
Ext.MessageBox.show({
title: 'Import Users',
msg: 'Imported Successfully',
title: _('ID_IMPORT_USERS'),
msg: _('ID_IMPORTED_SUCCESSFULLY'),
buttons: Ext.MessageBox.OK,
animEl: 'mb9',
icon: Ext.MessageBox.INFO
@@ -193,16 +193,16 @@ Ext.onReady(function() {
}
},
failure: function () {
Ext.MessageBox.alert('ERROR', 'Error in server');
Ext.MessageBox.alert('ERROR', _('ID_ERROR_IN_SERVER'));
}
});
}
});
} else {
PMExt.notify('WARNING', 'You do not select any user to import');
PMExt.notify('WARNING', _('ID_YOU_DO_NOT_SELECT_ANY_USER_TO_IMPORT'));
}
} else {
PMExt.notify('WARNING', 'You do not select any user to import');
PMExt.notify('WARNING', _('ID_YOU_DO_NOT_SELECT_ANY_USER_TO_IMPORT'));
}
}
}
@@ -251,8 +251,8 @@ Ext.onReady(function() {
pageSize: pageSize,
store: storeGridSearch,
displayInfo: true,
displayMsg: "LDAP Users" + " {0} - {1} " + "of" + " {2}",
emptyMsg: "There are no LDAP Users"
displayMsg: _('ID_LDAP_USERS') + " {0} - {1} " + "of" + " {2}",
emptyMsg: _('ID_THERE_ARE_NO_LDAP_USERS')
});
var selectModelList = new Ext.grid.CheckboxSelectionModel({
@@ -282,11 +282,11 @@ Ext.onReady(function() {
},
columns: [
selectModelList,
{header: 'Username', width: 15, dataIndex: 'sUsername', sortable: true},
{header: 'First Name', width: 15, dataIndex: 'sFirstname', sortable: true},
{header: 'Last Name', width: 15, dataIndex: 'sLastname', sortable: true},
{header: 'Email', width: 15, dataIndex: 'sEmail', sortable: true},
{header: 'Distinguished Name', width: 35, dataIndex: 'sDN'},
{header: _('ID_USER_ID'), width: 15, dataIndex: 'sUsername', sortable: true},
{header: _('ID_FIRST_NAME'), width: 15, dataIndex: 'sFirstname', sortable: true},
{header: _('ID_LAST_NAME'), width: 15, dataIndex: 'sLastname', sortable: true},
{header: _('ID_EMAIL'), width: 15, dataIndex: 'sEmail', sortable: true},
{header: _('ID_DISTINGUISHED_NAME'), width: 35, dataIndex: 'sDN'},
{dataIndex: "STATUS", header: _("ID_STATUS"), width: 10, css: "background: #D4D4D4; font-weight: bold;", align: "center", renderer: renderStatus}
]
}),
@@ -304,7 +304,7 @@ Ext.onReady(function() {
viewConfig: {
forceFit:true,
emptyText: '<div align="center"><b> ' + ' There are no LDAP Users ' + ' </b></div>'
emptyText: '<div align="center"><b> ' + _('ID_THERE_ARE_NO_LDAP_USERS') + ' </b></div>'
}
});

View File

@@ -1,56 +1,56 @@
var caseData = '';
var appTitle = new Ext.form.Label({
fieldLabel: "Case Title",
fieldLabel: _('ID_CASE_TITLE'),
labelStyle: 'font-weight:bold;padding-right:30px;'
});
var process = new Ext.form.Label({
fieldLabel: "Process Uid",
fieldLabel: _('ID_PROCESS_UID'),
labelStyle: 'font-weight:bold;padding-right:35px;'
});
var processTitle = new Ext.form.Label({
fieldLabel: "Process",
fieldLabel: _('ID_PROCESS'),
labelStyle: 'font-weight:bold;padding-right:35px;'
});
var appUid = new Ext.form.Label({
fieldLabel: "App Uid",
fieldLabel: _('ID_APP_UID'),
labelStyle: 'font-weight:bold;padding-right:35px;'
});
var caseNumber = new Ext.form.Label({
fieldLabel: "Case number",
fieldLabel: _('ID_CASE_NUMBER'),
labelStyle: 'font-weight:bold;padding-right:35px;'
});
var initUser = new Ext.form.Label({
fieldLabel: "Init user",
fieldLabel: _('ID_INIT_USER'),
labelStyle: 'font-weight:bold;padding-right:35px;'
});
var finishUser = new Ext.form.Label({
fieldLabel: "Finish user",
fieldLabel: _('ID_FINISH_USER'),
labelStyle: 'font-weight:bold;padding-right:35px;'
});
var createDate = new Ext.form.Label({
fieldLabel: "Create date",
fieldLabel: _('ID_CREATE_DATE'),
labelStyle: 'font-weight:bold;padding-right:35px;'
});
var finishDate = new Ext.form.Label({
fieldLabel: "Finish date",
fieldLabel: _('ID_FINISH_DATE'),
labelStyle: 'font-weight:bold;padding-right:35px;'
});
var fileName = new Ext.form.Label({
fieldLabel: "File Name",
fieldLabel: _('ID_FILE_NAME'),
labelStyle: 'font-weight:bold;padding-right:35px;'
});
var statusCaseWin = new Ext.form.Label({
fieldLabel: "Status",
fieldLabel: _('ID_CASESLIST_APP_STATUS'),
labelStyle: 'font-weight:bold;padding-right:35px;'
});
@@ -82,8 +82,8 @@ var formCase = new Ext.FormPanel({
if (val == 'yes') {
dataCase = caseData;
Ext.MessageBox.show({
msg: "Restoring case" + ' ' + dataCase.CASE_NUMBER + ' ...',
progressText: 'Saving...',
msg: _('ID_RESTORING_CASE') + ' ' + dataCase.CASE_NUMBER + ' ...',
progressText: _('ID_SAVING'),
width:300,
wait:true,
waitConfig: {interval:200},
@@ -102,15 +102,15 @@ var formCase = new Ext.FormPanel({
var resp = Ext.decode(returnData.responseText);
if (resp.success) {
Ext.MessageBox.show({
title: 'Case Unarhive',
msg: "Case" + ' ' + dataCase.CASE_NUMBER + ' ' + "Restored sucessfully",
title: _('ID_CASE_UNARHIVE'),
msg: _('ID_CASE') + ' ' + dataCase.CASE_NUMBER + ' ' + _('ID_RESTORED_SUCESSFULLY'),
buttons: Ext.MessageBox.OK,
animEl: 'mb9',
icon: Ext.MessageBox.INFO
});
} else {
Ext.MessageBox.show({
title: "Error",
title: _('ID_ERROR'),
msg: resp.message,
buttons: Ext.MessageBox.OK,
animEl: 'mb9',
@@ -121,7 +121,7 @@ var formCase = new Ext.FormPanel({
storeGridSearch.load();
},
failure: function () {
Ext.MessageBox.alert("Error", "Error in server");
Ext.MessageBox.alert("Error", _('ID_ERROR_IN_SERVER'));
}
});
}
@@ -140,7 +140,7 @@ var formCase = new Ext.FormPanel({
});
var summaryWindow = new Ext.Window({
title: "Detail Case",
title: _('ID_DETAIL_CASE'),
layout: 'fit',
width: 500,
height: 320,

View File

@@ -179,7 +179,7 @@ Ext.onReady(function(){
}) */
var mnuNewBpmnProject = {
text: "New BPMN Project",
text: _('ID_NEW_BPMN_PROJECT'),
iconCls: "silk-add",
icon: "",
handler: function ()
@@ -189,7 +189,7 @@ Ext.onReady(function(){
};
var mnuNewProject = {
text: "New Project",
text: _('ID_NEW_PROJECT'),
iconCls: "silk-add",
icon: "",
handler: function ()
@@ -512,7 +512,7 @@ function newProcess(params)
params = typeof params == 'undefined' ? {type:'classicProject'} : params;
// TODO this variable have hardcoded labels, it must be changed on the future
var formTitle = params.type == "classicProject" ? "New Project" : "New BPMN Project"
var formTitle = params.type == "classicProject" ? _('ID_NEW_PROJECT') : _('ID_NEW_BPMN_PROJECT')
// window.location = 'processes_New';
var ProcessCategories = new Ext.form.ComboBox({