IDEMPIERE-338 Translation of Doc messages

This commit is contained in:
Nicolas Micoud 2012-07-12 16:42:05 +02:00
parent 5153f0c11c
commit a837333c93
3 changed files with 73 additions and 3 deletions

View File

@ -0,0 +1,35 @@
-- Jul 12, 2012 4:35:39 PM CEST
-- IDEMPIERE-338 Translation of Doc messages
INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,200006,0,TO_DATE('2012-07-12 16:35:37','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Cannot post inactive document','I',TO_DATE('2012-07-12 16:35:37','YYYY-MM-DD HH24:MI:SS'),100,'CannotPostInactiveDocument')
;
-- Jul 12, 2012 4:35:39 PM CEST
-- IDEMPIERE-338 Translation of Doc messages
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200006 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Jul 12, 2012 4:35:51 PM CEST
-- IDEMPIERE-338 Translation of Doc messages
INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,200007,0,TO_DATE('2012-07-12 16:35:50','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Cannot Lock - ReSubmit','I',TO_DATE('2012-07-12 16:35:50','YYYY-MM-DD HH24:MI:SS'),100,'CannotLockReSubmit')
;
-- Jul 12, 2012 4:35:51 PM CEST
-- IDEMPIERE-338 Translation of Doc messages
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200007 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Jul 12, 2012 4:35:59 PM CEST
-- IDEMPIERE-338 Translation of Doc messages
INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,200008,0,TO_DATE('2012-07-12 16:35:59','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Cannot Lock - ReSubmit or RePost with Force','I',TO_DATE('2012-07-12 16:35:59','YYYY-MM-DD HH24:MI:SS'),100,'CannotLockReSubmitOrRePostWithForce')
;
-- Jul 12, 2012 4:35:59 PM CEST
-- IDEMPIERE-338 Translation of Doc messages
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200008 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
UPDATE AD_System
SET LastMigrationScriptApplied='852_IDEMPIERE-338.sql'
WHERE LastMigrationScriptApplied<'852_IDEMPIERE-338.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,35 @@
-- Jul 12, 2012 4:35:39 PM CEST
-- IDEMPIERE-338 Translation of Doc messages
INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,200006,0,TO_TIMESTAMP('2012-07-12 16:35:37','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Cannot post inactive document','I',TO_TIMESTAMP('2012-07-12 16:35:37','YYYY-MM-DD HH24:MI:SS'),100,'CannotPostInactiveDocument')
;
-- Jul 12, 2012 4:35:39 PM CEST
-- IDEMPIERE-338 Translation of Doc messages
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200006 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Jul 12, 2012 4:35:51 PM CEST
-- IDEMPIERE-338 Translation of Doc messages
INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,200007,0,TO_TIMESTAMP('2012-07-12 16:35:50','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Cannot Lock - ReSubmit','I',TO_TIMESTAMP('2012-07-12 16:35:50','YYYY-MM-DD HH24:MI:SS'),100,'CannotLockReSubmit')
;
-- Jul 12, 2012 4:35:51 PM CEST
-- IDEMPIERE-338 Translation of Doc messages
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200007 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Jul 12, 2012 4:35:59 PM CEST
-- IDEMPIERE-338 Translation of Doc messages
INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,200008,0,TO_TIMESTAMP('2012-07-12 16:35:59','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Cannot Lock - ReSubmit or RePost with Force','I',TO_TIMESTAMP('2012-07-12 16:35:59','YYYY-MM-DD HH24:MI:SS'),100,'CannotLockReSubmitOrRePostWithForce')
;
-- Jul 12, 2012 4:35:59 PM CEST
-- IDEMPIERE-338 Translation of Doc messages
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200008 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
UPDATE AD_System
SET LastMigrationScriptApplied='852_IDEMPIERE-338.sql'
WHERE LastMigrationScriptApplied<'852_IDEMPIERE-338.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -456,10 +456,10 @@ public abstract class Doc
log.log(Level.SEVERE, "Resubmit - Cannot lock " + get_TableName() + "_ID=" log.log(Level.SEVERE, "Resubmit - Cannot lock " + get_TableName() + "_ID="
+ get_ID() + ", Force=" + force + ",RePost=" + repost); + get_ID() + ", Force=" + force + ",RePost=" + repost);
if (!p_po.isActive()) if (!p_po.isActive())
return "Cannot post inactive document"; return Msg.translate(getCtx(), "CannotPostInactiveDocument");
if (force) if (force)
return "Cannot Lock - ReSubmit"; return Msg.translate(getCtx(), "CannotLockReSubmit");
return "Cannot Lock - ReSubmit or RePost with Force"; return Msg.translate(getCtx(), "CannotLockReSubmitOrRePostWithForce");
} }
p_Error = loadDocumentDetails(); p_Error = loadDocumentDetails();