IDEMPIERE-1349 Setup Wizard wrong translation
This commit is contained in:
parent
6ec33a6eea
commit
546c85b4d6
|
@ -364,6 +364,7 @@ public class MDocType extends X_C_DocType
|
||||||
*/
|
*/
|
||||||
public String getNameTrl()
|
public String getNameTrl()
|
||||||
{
|
{
|
||||||
|
// warning: to cache this translation you need to change the cache to include language (see i.e. MWFNode)
|
||||||
return get_Translation (COLUMNNAME_Name, Env.getAD_Language(getCtx()));
|
return get_Translation (COLUMNNAME_Name, Env.getAD_Language(getCtx()));
|
||||||
} // getNameTrl
|
} // getNameTrl
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class MWFNode extends X_AD_WF_Node
|
||||||
*/
|
*/
|
||||||
public static MWFNode get (Properties ctx, int AD_WF_Node_ID)
|
public static MWFNode get (Properties ctx, int AD_WF_Node_ID)
|
||||||
{
|
{
|
||||||
Integer key = new Integer (AD_WF_Node_ID);
|
String key = Env.getAD_Language(ctx) + "_" + AD_WF_Node_ID;
|
||||||
MWFNode retValue = (MWFNode) s_cache.get (key);
|
MWFNode retValue = (MWFNode) s_cache.get (key);
|
||||||
if (retValue != null)
|
if (retValue != null)
|
||||||
return retValue;
|
return retValue;
|
||||||
|
@ -75,7 +75,7 @@ public class MWFNode extends X_AD_WF_Node
|
||||||
} // get
|
} // get
|
||||||
|
|
||||||
/** Cache */
|
/** Cache */
|
||||||
private static CCache<Integer,MWFNode> s_cache = new CCache<Integer,MWFNode> (Table_Name, 50);
|
private static CCache<String,MWFNode> s_cache = new CCache<String,MWFNode> (Table_Name, 50);
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
|
@ -139,9 +139,11 @@ public class MWFNode extends X_AD_WF_Node
|
||||||
loadNext();
|
loadNext();
|
||||||
loadTrl();
|
loadTrl();
|
||||||
// Save to Cache
|
// Save to Cache
|
||||||
Integer key = null;
|
String key = null;
|
||||||
try {
|
try {
|
||||||
key = new Integer (rs.getInt("AD_WF_Node_ID"));
|
Integer wfnodeid = new Integer (rs.getInt("AD_WF_Node_ID"));
|
||||||
|
if (wfnodeid != null && wfnodeid.intValue() > 0)
|
||||||
|
key = Env.getAD_Language(ctx) + "_" + wfnodeid;
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
throw new AdempiereException(e);
|
throw new AdempiereException(e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,12 +70,13 @@ public class MWorkflow extends X_AD_Workflow
|
||||||
*/
|
*/
|
||||||
public static MWorkflow get (Properties ctx, int AD_Workflow_ID)
|
public static MWorkflow get (Properties ctx, int AD_Workflow_ID)
|
||||||
{
|
{
|
||||||
MWorkflow retValue = (MWorkflow)s_cache.get(AD_Workflow_ID);
|
String key = Env.getAD_Language(ctx) + "_" + AD_Workflow_ID;
|
||||||
|
MWorkflow retValue = (MWorkflow)s_cache.get(key);
|
||||||
if (retValue != null)
|
if (retValue != null)
|
||||||
return retValue;
|
return retValue;
|
||||||
retValue = new MWorkflow (ctx, AD_Workflow_ID, null);
|
retValue = new MWorkflow (ctx, AD_Workflow_ID, null);
|
||||||
if (retValue.get_ID() != 0)
|
if (retValue.get_ID() != 0)
|
||||||
s_cache.put(AD_Workflow_ID, retValue);
|
s_cache.put(key, retValue);
|
||||||
return retValue;
|
return retValue;
|
||||||
} // get
|
} // get
|
||||||
|
|
||||||
|
@ -144,7 +145,7 @@ public class MWorkflow extends X_AD_Workflow
|
||||||
|
|
||||||
|
|
||||||
/** Single Cache */
|
/** Single Cache */
|
||||||
private static CCache<Integer,MWorkflow> s_cache = new CCache<Integer,MWorkflow>(Table_Name, 20);
|
private static CCache<String,MWorkflow> s_cache = new CCache<String,MWorkflow>(Table_Name, 20);
|
||||||
/** Document Value Cache */
|
/** Document Value Cache */
|
||||||
private static CCache<String,MWorkflow[]> s_cacheDocValue = new CCache<String,MWorkflow[]> (Table_Name, Table_Name+"_Document_Value", 5);
|
private static CCache<String,MWorkflow[]> s_cacheDocValue = new CCache<String,MWorkflow[]> (Table_Name, Table_Name+"_Document_Value", 5);
|
||||||
/** Static Logger */
|
/** Static Logger */
|
||||||
|
|
Loading…
Reference in New Issue