From c14f1a0209cb011b56a5f1e5d423207e58fe1665 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 23 Oct 2012 18:03:00 -0500 Subject: [PATCH] IDEMPIERE-158 Make selection of login languages more flexible / set language as locale when creating translations --- .../src/org/compiere/install/LanguageMaintenance.java | 2 ++ org.adempiere.ui/src/org/compiere/install/Translation.java | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/org.adempiere.base.process/src/org/compiere/install/LanguageMaintenance.java b/org.adempiere.base.process/src/org/compiere/install/LanguageMaintenance.java index 8880b2f6b9..b12b9125ca 100644 --- a/org.adempiere.base.process/src/org/compiere/install/LanguageMaintenance.java +++ b/org.adempiere.base.process/src/org/compiere/install/LanguageMaintenance.java @@ -95,6 +95,8 @@ public class LanguageMaintenance extends SvrProcess if (m_language.isActive() && m_language.isSystemLanguage()) { insertNo = m_language.maintain(true); + m_language.setIsLoginLocale(true); + m_language.saveEx(); } else throw new Exception ("Language not active System Language"); diff --git a/org.adempiere.ui/src/org/compiere/install/Translation.java b/org.adempiere.ui/src/org/compiere/install/Translation.java index 286e0e36ef..bcd551c771 100644 --- a/org.adempiere.ui/src/org/compiere/install/Translation.java +++ b/org.adempiere.ui/src/org/compiere/install/Translation.java @@ -129,6 +129,11 @@ public class Translation SAXParser parser = factory.newSAXParser(); parser.parse(in, handler); 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(); } catch (Exception e)