IDEMPIERE-1025 Improve translation for custom tables / do not insert translations if the language is not installed
This commit is contained in:
parent
79cf3109d0
commit
b57c8c638f
|
@ -16,6 +16,7 @@ import org.adempiere.pipo2.ElementHandler;
|
||||||
import org.adempiere.pipo2.PIPOContext;
|
import org.adempiere.pipo2.PIPOContext;
|
||||||
import org.adempiere.pipo2.PackOut;
|
import org.adempiere.pipo2.PackOut;
|
||||||
import org.adempiere.pipo2.PoExporter;
|
import org.adempiere.pipo2.PoExporter;
|
||||||
|
import org.compiere.model.MLanguage;
|
||||||
import org.compiere.model.MTable;
|
import org.compiere.model.MTable;
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
|
@ -52,6 +53,10 @@ public class CommonTranslationHandler extends AbstractElementHandler implements
|
||||||
throw new SAXException();
|
throw new SAXException();
|
||||||
|
|
||||||
String language = getStringValue(element, "AD_Language");
|
String language = getStringValue(element, "AD_Language");
|
||||||
|
MLanguage lang = MLanguage.get(ctx.ctx, language);
|
||||||
|
// skip if not system installed language
|
||||||
|
if (! lang.isSystemLanguage())
|
||||||
|
return;
|
||||||
|
|
||||||
if (log.isLoggable(Level.INFO)) log.info(elementValue+" "+getStringValue(element, "Name"));
|
if (log.isLoggable(Level.INFO)) log.info(elementValue+" "+getStringValue(element, "Name"));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue