Fix [2482968] - Translate FDialog
https://sourceforge.net/tracker2/index.php?func=detail&aid=2482968&group_id=176962&atid=955896
This commit is contained in:
parent
e1d6104ce8
commit
987956b4ea
|
@ -17,8 +17,13 @@
|
||||||
|
|
||||||
package org.adempiere.webui.component;
|
package org.adempiere.webui.component;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.adempiere.webui.LayoutUtils;
|
import org.adempiere.webui.LayoutUtils;
|
||||||
import org.adempiere.webui.apps.AEnv;
|
import org.adempiere.webui.apps.AEnv;
|
||||||
|
import org.compiere.util.Env;
|
||||||
|
import org.compiere.util.Msg;
|
||||||
|
import org.compiere.util.Util;
|
||||||
import org.zkoss.zhtml.Text;
|
import org.zkoss.zhtml.Text;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zk.ui.event.EventListener;
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
|
@ -99,24 +104,25 @@ public class Messagebox extends Window implements EventListener
|
||||||
|
|
||||||
private void init()
|
private void init()
|
||||||
{
|
{
|
||||||
|
Properties ctx = Env.getCtx();
|
||||||
lblMsg.setValue(msg);
|
lblMsg.setValue(msg);
|
||||||
|
|
||||||
btnOk.setLabel("OK");
|
btnOk.setLabel(Util.cleanAmp(Msg.getMsg(ctx, "OK")));
|
||||||
btnOk.setImage("/images/Ok16.png");
|
btnOk.setImage("/images/Ok16.png");
|
||||||
btnOk.addEventListener(Events.ON_CLICK, this);
|
btnOk.addEventListener(Events.ON_CLICK, this);
|
||||||
LayoutUtils.addSclass("action-text-button", btnOk);
|
LayoutUtils.addSclass("action-text-button", btnOk);
|
||||||
|
|
||||||
btnCancel.setLabel("Cancel");
|
btnCancel.setLabel(Util.cleanAmp(Msg.getMsg(ctx, "Cancel")));
|
||||||
btnCancel.setImage("/images/Cancel16.png");
|
btnCancel.setImage("/images/Cancel16.png");
|
||||||
btnCancel.addEventListener(Events.ON_CLICK, this);
|
btnCancel.addEventListener(Events.ON_CLICK, this);
|
||||||
LayoutUtils.addSclass("action-text-button", btnCancel);
|
LayoutUtils.addSclass("action-text-button", btnCancel);
|
||||||
|
|
||||||
btnYes.setLabel("Yes");
|
btnYes.setLabel(Util.cleanAmp(Msg.getMsg(ctx, "Yes")));
|
||||||
btnYes.setImage("/images/Ok16.png");
|
btnYes.setImage("/images/Ok16.png");
|
||||||
btnYes.addEventListener(Events.ON_CLICK, this);
|
btnYes.addEventListener(Events.ON_CLICK, this);
|
||||||
LayoutUtils.addSclass("action-text-button", btnYes);
|
LayoutUtils.addSclass("action-text-button", btnYes);
|
||||||
|
|
||||||
btnNo.setLabel("No");
|
btnNo.setLabel(Util.cleanAmp(Msg.getMsg(ctx, "No")));
|
||||||
btnNo.setImage("/images/Cancel16.png");
|
btnNo.setImage("/images/Cancel16.png");
|
||||||
btnNo.addEventListener(Events.ON_CLICK, this);
|
btnNo.addEventListener(Events.ON_CLICK, this);
|
||||||
LayoutUtils.addSclass("action-text-button", btnNo);
|
LayoutUtils.addSclass("action-text-button", btnNo);
|
||||||
|
|
|
@ -19,14 +19,15 @@ package org.adempiere.webui.window;
|
||||||
|
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.adempiere.webui.apps.AEnv;
|
|
||||||
import org.adempiere.webui.component.Messagebox;
|
|
||||||
import org.compiere.util.CLogMgt;
|
import org.compiere.util.CLogMgt;
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
import org.compiere.util.Trace;
|
import org.compiere.util.Trace;
|
||||||
|
|
||||||
import org.zkoss.zk.ui.Component;
|
import org.zkoss.zk.ui.Component;
|
||||||
|
import org.adempiere.webui.apps.AEnv;
|
||||||
|
import org.adempiere.webui.component.Messagebox;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -288,7 +289,7 @@ public class FDialog
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
String s = Msg.getMsg(Env.getCtx(), adMessage).replace("\n", "<br>");
|
String s = Msg.getMsg(Env.getCtx(), adMessage).replace("\n", "<br>");
|
||||||
int response = Messagebox.showDialog(s, "Confirmation", Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
int response = Messagebox.showDialog(s, Env.getHeader(Env.getCtx(), windowNo), Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
return (response == Messagebox.YES);
|
return (response == Messagebox.YES);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue