Browse Source

Merge pull request #506 in BA/design from ~ANCHORE/design:master to master

* commit '3ab77cfb70cf2d2500f3bc94691610d5e1103a5b':
  规范国际化key
  规范代码
  修复了一些日文化问题
master
superman 8 years ago
parent
commit
fc743a0a21
  1. 11
      designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  2. 4
      designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  3. 50
      designer_base/src/com/fr/design/menu/KeySetUtils.java
  4. 5
      designer_base/src/com/fr/design/style/color/NewColorSelectPane.java

11
designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -27,6 +27,7 @@ import com.fr.file.FILE;
import com.fr.file.FileNodeFILE; import com.fr.file.FileNodeFILE;
import com.fr.file.filetree.FileNode; import com.fr.file.filetree.FileNode;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.CoreConstants; import com.fr.stable.CoreConstants;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
@ -42,6 +43,7 @@ import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import java.io.File; import java.io.File;
import java.util.HashMap; import java.util.HashMap;
import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
@ -411,7 +413,14 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
}); });
UIButton cancelButton = new UIButton(Inter.getLocText("FR-Designer_Cancel")); UIButton cancelButton = new UIButton(Inter.getLocText("FR-Designer_Cancel"));
cancelButton.setBounds(250, 90, 60, 25);
// mod by anchore 16/11/16
if (ComparatorUtils.equals(Locale.JAPAN, GeneralContext.getLocale())) {
cancelButton.setBounds(250, 90, 80, 25);
} else {
cancelButton.setBounds(180, 90, 80, 25);
}
//cancelButton.setBounds(250, 90, 60, 25);
cancelButton.addActionListener(new ActionListener() { cancelButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
jd.dispose(); jd.dispose();

4
designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -300,7 +300,9 @@ public abstract class ToolBarMenuDock {
//shortCuts.add(new TutorialAction()); //shortCuts.add(new TutorialAction());
shortCuts.add(SeparatorDef.DEFAULT); shortCuts.add(SeparatorDef.DEFAULT);
if (ComparatorUtils.equals(ProductConstants.APP_NAME,FINEREPORT)) { if (ComparatorUtils.equals(ProductConstants.APP_NAME,FINEREPORT)) {
shortCuts.add(new FeedBackAction());
// mod by anchore 16/11/17 去掉反馈
//shortCuts.add(new FeedBackAction());
shortCuts.add(SeparatorDef.DEFAULT); shortCuts.add(SeparatorDef.DEFAULT);
shortCuts.add(SeparatorDef.DEFAULT); shortCuts.add(SeparatorDef.DEFAULT);
// shortCuts.add(new ForumAction()); // shortCuts.add(new ForumAction());

50
designer_base/src/com/fr/design/menu/KeySetUtils.java

@ -4,10 +4,13 @@
package com.fr.design.menu; package com.fr.design.menu;
import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.general.Inter; import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import java.util.Locale;
/** /**
* Created by IntelliJ IDEA. * Created by IntelliJ IDEA.
@ -63,7 +66,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("M_Close_Current"); return Inter.getLocText("FR-Designer_Close");
} }
@Override @Override
@ -80,7 +83,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("M-Save"); return Inter.getLocText("FR-Designer_Save");
} }
@Override @Override
@ -148,7 +151,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("Export"); return Inter.getLocText("FR-Designer_Export");
} }
@Override @Override
@ -183,7 +186,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("Export-Excel-Page"); return Inter.getLocText("FR-Engine_Export-Excel-Page");
} }
@Override @Override
@ -201,7 +204,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("Export-Excel-Simple"); return Inter.getLocText("FR-Engine_Export-Excel-Simple");
} }
@Override @Override
@ -219,7 +222,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("Export-Excel-PageToSheet"); return Inter.getLocText("FR-Engine_Export-Excel-PageToSheet");
} }
@Override @Override
@ -362,7 +365,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("ExportAndOutput"); return Inter.getLocText("FR-Designer_ExportAndOutput");
} }
@Override @Override
@ -379,7 +382,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return "EXCEL"+Inter.getLocText("ExportAndOutput"); return "EXCEL"+Inter.getLocText("FR-Designer_ExportAndOutput");
} }
@Override @Override
@ -413,7 +416,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("M-SwitchWorkspace"); return Inter.getLocText("FR-Designer_M-SwitchWorkspace");
} }
@Override @Override
@ -430,7 +433,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("M-Exit"); return Inter.getLocText("FR-Designer_M-Exit");
} }
@Override @Override
@ -448,7 +451,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("M-Template"); return Inter.getLocText("FR-Designer_M-Template");
} }
@Override @Override
@ -639,7 +642,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("ReportColumns-Columns"); return Inter.getLocText("FR-Designer_ReportColumns-Columns");
} }
@Override @Override
@ -657,7 +660,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("M-Repeat-Freeze"); return Inter.getLocText("FR-Designer_M-Repeat-Freeze");
} }
@Override @Override
@ -675,7 +678,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("Frozen"); return Inter.getLocText("FR-Engine_Frozen");
} }
@Override @Override
@ -710,7 +713,14 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText(new String[]{"Allow", "DashBoard-Potence", "Edit"});
// mod by anchore 16/11/16
if (ComparatorUtils.equals(Locale.JAPAN, GeneralContext.getLocale())) {
return Inter.getLocText(new String[]{"FR-Engine_RP_Authority_Edit", "Allow"});
} else {
return Inter.getLocText(new String[]{"Allow", "FR-Engine_RP_Authority_Edit"});
}
//return Inter.getLocText(new String[]{"Allow", "DashBoard-Potence", "Edit"});
} }
@Override @Override
@ -727,7 +737,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("M-Cell"); return Inter.getLocText("FR-Designer_Cell");
} }
@Override @Override
@ -761,7 +771,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("Widget-Settings"); return Inter.getLocText("FR-Designer_Widget-Settings");
} }
@Override @Override
@ -795,7 +805,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("Condition_Attributes"); return Inter.getLocText("FR-Designer_Condition_Attributes");
} }
@Override @Override
@ -812,7 +822,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("Present"); return Inter.getLocText("FR-Chart-Style_Present");
} }
@Override @Override
@ -880,7 +890,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("Currency_Line"); return Inter.getLocText("FR-Designer_Currency_Line");
} }
@Override @Override

5
designer_base/src/com/fr/design/style/color/NewColorSelectPane.java

@ -93,7 +93,10 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
} }
centerPane.add(Box.createVerticalStrut(1)); centerPane.add(Box.createVerticalStrut(1));
UIButton customButton = new UIButton(Inter.getLocText(new String[]{"More", "Color"}) + "...");
// mod by anchore 16/11/16
UIButton customButton = new UIButton(Inter.getLocText("FR-Designer-Basic_More_Color"));
//UIButton customButton = new UIButton(Inter.getLocText(new String[]{"More", "Color"}) + "...");
customButton.addMouseListener(new MouseAdapter() { customButton.addMouseListener(new MouseAdapter() {
@Override @Override

Loading…
Cancel
Save