Browse Source

REPORT-80251 英文设计器国际化显示问题

【问题原因】1、部分功能模块的label显示文字未做自动换行设置。2、开始界面右键弹出框宽度被固定,未考虑不同语言的适配问题。
【改动思路】1、更改label为自动换行。2、局部微调UI(横排组件变竖排,已与产品沟通无问题)。3、根据当前语言环境确定右键弹出框宽度。
【Review建议】
newui
levy 2 years ago
parent
commit
66fead7e41
  1. 15
      designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java
  2. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties
  3. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties
  4. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties
  5. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
  6. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties

15
designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java

@ -11,6 +11,7 @@ import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.imenu.UIMenuItem; import com.fr.design.gui.imenu.UIMenuItem;
import com.fr.design.gui.imenu.UIPopupMenu; import com.fr.design.gui.imenu.UIPopupMenu;
import com.fr.design.gui.imenu.UIScrollPopUpMenu; import com.fr.design.gui.imenu.UIScrollPopUpMenu;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
@ -199,17 +200,9 @@ public class MutilTempalteTabPane extends JComponent {
height += 25; height += 25;
} }
} }
//当前i18n适配中英日,其中英日字符串长度较长,需调整popupMenu的宽度 //根据当前i18n语言环境,动态调整popupMenu的宽度
//后续版本可考虑读取字符串像素宽度,以自适应调整menu menu.setPreferredSize(new Dimension((int)DesignSizeI18nManager.getInstance().
int popupMenuWidth; i18nDimension("com.fr.design.file.MultiTemplateTabPane.popUpMenu").getWidth(),height));
if(ComparatorUtils.equals(GeneralContext.getLocale(), Locale.US)){
popupMenuWidth = 350;
}else if(ComparatorUtils.equals(GeneralContext.getLocale(), Locale.JAPAN)){
popupMenuWidth = 240;
}else {
popupMenuWidth = 170;
}
menu.setPreferredSize(new Dimension(popupMenuWidth, height));
GUICoreUtils.showPopupMenu(menu, MutilTempalteTabPane.getInstance(), e.getX(), MutilTempalteTabPane.getInstance().getY() - 1 + MutilTempalteTabPane.getInstance().getHeight()); GUICoreUtils.showPopupMenu(menu, MutilTempalteTabPane.getInstance(), e.getX(), MutilTempalteTabPane.getInstance().getY() - 1 + MutilTempalteTabPane.getInstance().getHeight());
} }
} }

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties

@ -22,3 +22,4 @@ com.fr.design.sort.expand.header.pane=95*10
com.fr.design.plugin.remind.PluginInvalidateRemindDialog.dialog=600*500 com.fr.design.plugin.remind.PluginInvalidateRemindDialog.dialog=600*500
com.fr.design.plugin.remind.PluginInvalidateRemindDialog.centerPane=580*369 com.fr.design.plugin.remind.PluginInvalidateRemindDialog.centerPane=580*369
com.fr.design.report.WatermarkSettingPane=720*600 com.fr.design.report.WatermarkSettingPane=720*600
com.fr.design.file.MultiTemplateTabPane.popUpMenu=350*65

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties

@ -21,3 +21,4 @@ com.fr.design.sort.expand.header.pane=95*10
com.fr.design.plugin.remind.PluginInvalidateRemindDialog.dialog=600*500 com.fr.design.plugin.remind.PluginInvalidateRemindDialog.dialog=600*500
com.fr.design.plugin.remind.PluginInvalidateRemindDialog.centerPane=580*369 com.fr.design.plugin.remind.PluginInvalidateRemindDialog.centerPane=580*369
com.fr.design.report.WatermarkSettingPane=720*600 com.fr.design.report.WatermarkSettingPane=720*600
com.fr.design.file.MultiTemplateTabPane.popUpMenu=240*65

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties

@ -21,3 +21,4 @@ com.fr.design.sort.expand.header.pane=95*10
com.fr.design.plugin.remind.PluginInvalidateRemindDialog.dialog=600*500 com.fr.design.plugin.remind.PluginInvalidateRemindDialog.dialog=600*500
com.fr.design.plugin.remind.PluginInvalidateRemindDialog.centerPane=580*369 com.fr.design.plugin.remind.PluginInvalidateRemindDialog.centerPane=580*369
com.fr.design.report.WatermarkSettingPane=720*600 com.fr.design.report.WatermarkSettingPane=720*600
com.fr.design.file.MultiTemplateTabPane.popUpMenu=240*65

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties

@ -23,3 +23,4 @@ com.fr.design.sort.expand.header.pane=108*10
com.fr.design.plugin.remind.PluginInvalidateRemindDialog.dialog=600*500 com.fr.design.plugin.remind.PluginInvalidateRemindDialog.dialog=600*500
com.fr.design.plugin.remind.PluginInvalidateRemindDialog.centerPane=580*369 com.fr.design.plugin.remind.PluginInvalidateRemindDialog.centerPane=580*369
com.fr.design.report.WatermarkSettingPane=720*600 com.fr.design.report.WatermarkSettingPane=720*600
com.fr.design.file.MultiTemplateTabPane.popUpMenu=170*65

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties

@ -21,3 +21,4 @@ com.fr.design.sort.expand.header.pane=108*10
com.fr.design.plugin.remind.PluginInvalidateRemindDialog.dialog=600*500 com.fr.design.plugin.remind.PluginInvalidateRemindDialog.dialog=600*500
com.fr.design.plugin.remind.PluginInvalidateRemindDialog.centerPane=580*369 com.fr.design.plugin.remind.PluginInvalidateRemindDialog.centerPane=580*369
com.fr.design.report.WatermarkSettingPane=720*600 com.fr.design.report.WatermarkSettingPane=720*600
com.fr.design.file.MultiTemplateTabPane.popUpMenu=170*65
Loading…
Cancel
Save