IDEMPIERE-158 Make selection of login languages more flexible / set language as locale when creating translations

This commit is contained in:
Carlos Ruiz 2012-10-23 18:03:00 -05:00
parent 7b7f63f405
commit c14f1a0209
2 changed files with 7 additions and 0 deletions

View File

@ -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");

View File

@ -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)