IDEMPIERE-1127 The Name of the workflow node is not translated
This commit is contained in:
parent
45bda82abc
commit
68223ee9af
|
@ -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) {
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue