IDEMPIERE-1127 The Name of the workflow node is not translated / peer review
This commit is contained in:
parent
68223ee9af
commit
e7abe42baa
|
@ -92,17 +92,16 @@ 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;
|
||||||
boolean isBaseLanguage = Env.isBaseLanguage(Env.getCtx(), "AD_Workflow");
|
boolean isBaseLanguage = Env.isBaseLanguage(Env.getCtx(), "AD_Workflow");
|
||||||
if (isBaseLanguage)
|
if (isBaseLanguage)
|
||||||
sql = MRole.getDefault().addAccessSQL(
|
sql = MRole.getDefault().addAccessSQL(
|
||||||
"SELECT AD_Workflow_ID, Name FROM AD_Workflow WHERE IsActive = 'Y' ORDER BY 2",
|
"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
|
||||||
else
|
else
|
||||||
sql = MRole.getDefault().addAccessSQL(
|
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) "
|
"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
|
+ " 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);
|
KeyNamePair[] pp = DB.getKeyNamePairs(sql, true);
|
||||||
|
|
||||||
workflowList = ListboxFactory.newDropdownListbox();
|
workflowList = ListboxFactory.newDropdownListbox();
|
||||||
|
@ -385,7 +384,7 @@ public class WFEditor extends ADForm {
|
||||||
addMenuItem(popupMenu, Msg.getMsg(Env.getCtx(), "Properties"), node, WFPopupItem.WFPOPUPITEM_PROPERTIES);
|
addMenuItem(popupMenu, Msg.getMsg(Env.getCtx(), "Properties"), node, WFPopupItem.WFPOPUPITEM_PROPERTIES);
|
||||||
// Delete node
|
// Delete node
|
||||||
String title = Msg.getMsg(Env.getCtx(), "DeleteNode") +
|
String title = Msg.getMsg(Env.getCtx(), "DeleteNode") +
|
||||||
": " + node.getName();
|
": " + node.getName(true);
|
||||||
addMenuItem(popupMenu, title, node, WFPopupItem.WFPOPUPITEM_DELETENODE);
|
addMenuItem(popupMenu, title, node, WFPopupItem.WFPOPUPITEM_DELETENODE);
|
||||||
}
|
}
|
||||||
MWFNode[] nodes = m_wf.getNodes(true, Env.getAD_Client_ID(Env.getCtx()));
|
MWFNode[] nodes = m_wf.getNodes(true, Env.getAD_Client_ID(Env.getCtx()));
|
||||||
|
@ -419,7 +418,7 @@ public class WFEditor extends ADForm {
|
||||||
if (!found)
|
if (!found)
|
||||||
{
|
{
|
||||||
String title = Msg.getMsg(Env.getCtx(), "AddLine")
|
String title = Msg.getMsg(Env.getCtx(), "AddLine")
|
||||||
+ ": " + node.getName() + " -> " + nn.getName();
|
+ ": " + node.getName(true) + " -> " + nn.getName(true);
|
||||||
addMenuItem(popupMenu, title, node, nn.getAD_WF_Node_ID());
|
addMenuItem(popupMenu, title, node, nn.getAD_WF_Node_ID());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -430,7 +429,7 @@ public class WFEditor extends ADForm {
|
||||||
continue;
|
continue;
|
||||||
MWFNode next = MWFNode.get(Env.getCtx(), line.getAD_WF_Next_ID());
|
MWFNode next = MWFNode.get(Env.getCtx(), line.getAD_WF_Next_ID());
|
||||||
String title = Msg.getMsg(Env.getCtx(), "DeleteLine")
|
String title = Msg.getMsg(Env.getCtx(), "DeleteLine")
|
||||||
+ ": " + node.getName() + " -> " + next.getName();
|
+ ": " + node.getName(true) + " -> " + next.getName(true);
|
||||||
addMenuItem(popupMenu, title, line);
|
addMenuItem(popupMenu, title, line);
|
||||||
}
|
}
|
||||||
popupMenu.setPage(target.getPage());
|
popupMenu.setPage(target.getPage());
|
||||||
|
|
Loading…
Reference in New Issue