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,11 +92,18 @@ public class WFEditor extends ADForm {
Borderlayout layout = new Borderlayout(); Borderlayout layout = new Borderlayout();
layout.setStyle("width: 100%; height: 100%; position: absolute;"); layout.setStyle("width: 100%; height: 100%; position: absolute;");
appendChild(layout); appendChild(layout);
String sql="";
String sql = MRole.getDefault().addAccessSQL( boolean isBaseLanguage = Env.isBaseLanguage(Env.getCtx(), "AD_Workflow");
"SELECT AD_Workflow_ID, Name FROM AD_Workflow ORDER BY 2", 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 "AD_Workflow", MRole.SQL_NOTQUALIFIED, MRole.SQL_RO); // all
KeyNamePair[] pp = DB.getKeyNamePairs(sql, true); 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(); workflowList = ListboxFactory.newDropdownListbox();
for (KeyNamePair knp : pp) { for (KeyNamePair knp : pp) {

View File

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