IDEMPIERE-1127 The Name of the workflow node is not translated

This commit is contained in:
Richard Morales 2013-07-06 17:44:39 -05:00
parent 45bda82abc
commit 68223ee9af
2 changed files with 13 additions and 6 deletions

View File

@ -92,10 +92,17 @@ public class WFEditor extends ADForm {
Borderlayout layout = new Borderlayout();
layout.setStyle("width: 100%; height: 100%; position: absolute;");
appendChild(layout);
String sql = MRole.getDefault().addAccessSQL(
"SELECT AD_Workflow_ID, Name FROM AD_Workflow ORDER BY 2",
String sql="";
boolean isBaseLanguage = Env.isBaseLanguage(Env.getCtx(), "AD_Workflow");
if (isBaseLanguage)
sql = MRole.getDefault().addAccessSQL(
"SELECT AD_Workflow_ID, Name FROM AD_Workflow WHERE IsActive = 'Y' ORDER BY 2",
"AD_Workflow", MRole.SQL_NOTQUALIFIED, MRole.SQL_RO); // all
else
sql = MRole.getDefault().addAccessSQL(
"SELECT AD_Workflow.AD_Workflow_ID, AD_Workflow_Trl.Name FROM AD_Workflow INNER JOIN AD_Workflow_Trl ON (AD_Workflow.AD_Workflow_ID=AD_Workflow_Trl.AD_Workflow_ID) "
+ " WHERE AD_Workflow.IsActive = 'Y' AND AD_Workflow_Trl.AD_Language='"+Env.getAD_Language(Env.getCtx())+"' ORDER BY 2","AD_Workflow", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO); // all
KeyNamePair[] pp = DB.getKeyNamePairs(sql, true);
workflowList = ListboxFactory.newDropdownListbox();

View File

@ -76,7 +76,7 @@ public class WFNodeWidget extends Widget {
}
if (image != null) {
imageWidget = new ImageWidget(scene, image);
imageWidget.setToolTipText(node.getName());
imageWidget.setToolTipText(node.getName(true));
addChild(imageWidget);
}
}
@ -97,7 +97,7 @@ public class WFNodeWidget extends Widget {
titleWidget.addChild (titleIcon);
}
String titleText = node.getName();
String titleText = node.getName(true);
if (titleText.length() > 20)
titleText = titleText.substring(0, 20) + "...";
LabelWidget titleTextWidget = new LabelWidget (scene, titleText);