IDEMPIERE-158 Make selection of login languages more flexible / set language as locale when creating translations
This commit is contained in:
parent
7b7f63f405
commit
c14f1a0209
|
@ -95,6 +95,8 @@ public class LanguageMaintenance extends SvrProcess
|
||||||
if (m_language.isActive() && m_language.isSystemLanguage())
|
if (m_language.isActive() && m_language.isSystemLanguage())
|
||||||
{
|
{
|
||||||
insertNo = m_language.maintain(true);
|
insertNo = m_language.maintain(true);
|
||||||
|
m_language.setIsLoginLocale(true);
|
||||||
|
m_language.saveEx();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw new Exception ("Language not active System Language");
|
throw new Exception ("Language not active System Language");
|
||||||
|
|
|
@ -129,6 +129,11 @@ public class Translation
|
||||||
SAXParser parser = factory.newSAXParser();
|
SAXParser parser = factory.newSAXParser();
|
||||||
parser.parse(in, handler);
|
parser.parse(in, handler);
|
||||||
log.info("Updated=" + handler.getUpdateCount());
|
log.info("Updated=" + handler.getUpdateCount());
|
||||||
|
MLanguage lang = MLanguage.get(m_ctx, AD_Language);
|
||||||
|
if (! lang.isLoginLocale()) {
|
||||||
|
lang.setIsLoginLocale(true);
|
||||||
|
lang.saveEx();
|
||||||
|
}
|
||||||
return Msg.getMsg(m_ctx, "Updated") + "=" + handler.getUpdateCount();
|
return Msg.getMsg(m_ctx, "Updated") + "=" + handler.getUpdateCount();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
Loading…
Reference in New Issue