Browse Source

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

【问题原因】1、部分功能模块的label显示文字未做自动换行设置。2、开始界面右键弹出框宽度被固定,未考虑不同语言的适配问题。
【改动思路】1、更改label为自动换行。2、局部微调UI(横排组件变竖排,已与产品沟通无问题)。3、根据当前语言环境确定右键弹出框宽度。
【Review建议】
release/11.0
levy 2 years ago
parent
commit
66fead7e41
  1. 15
      designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java
  2. 3
      designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties
  3. 3
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties
  4. 3
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties
  5. 3
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
  6. 3
      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.UIPopupMenu;
import com.fr.design.gui.imenu.UIScrollPopUpMenu;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate;
@ -199,17 +200,9 @@ public class MutilTempalteTabPane extends JComponent {
height += 25;
}
}
//当前i18n适配中英日,其中英日字符串长度较长,需调整popupMenu的宽度
//后续版本可考虑读取字符串像素宽度,以自适应调整menu
int popupMenuWidth;
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));
//根据当前i18n语言环境,动态调整popupMenu的宽度
menu.setPreferredSize(new Dimension((int)DesignSizeI18nManager.getInstance().
i18nDimension("com.fr.design.file.MultiTemplateTabPane.popUpMenu").getWidth(),height));
GUICoreUtils.showPopupMenu(menu, MutilTempalteTabPane.getInstance(), e.getX(), MutilTempalteTabPane.getInstance().getY() - 1 + MutilTempalteTabPane.getInstance().getHeight());
}
}

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

@ -21,4 +21,5 @@ com.fr.design.ds.column.sort.pane=250*180
com.fr.design.sort.expand.header.pane=95*10
com.fr.design.plugin.remind.PluginInvalidateRemindDialog.dialog=600*500
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

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

@ -20,4 +20,5 @@ com.fr.design.ds.column.sort.pane=250*165
com.fr.design.sort.expand.header.pane=95*10
com.fr.design.plugin.remind.PluginInvalidateRemindDialog.dialog=600*500
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

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

@ -20,4 +20,5 @@ com.fr.design.ds.column.sort.pane=250*180
com.fr.design.sort.expand.header.pane=95*10
com.fr.design.plugin.remind.PluginInvalidateRemindDialog.dialog=600*500
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

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

@ -22,4 +22,5 @@ com.fr.design.ds.column.sort.pane=220*150
com.fr.design.sort.expand.header.pane=108*10
com.fr.design.plugin.remind.PluginInvalidateRemindDialog.dialog=600*500
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

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

@ -20,4 +20,5 @@ com.fr.design.ds.column.sort.pane=220*150
com.fr.design.sort.expand.header.pane=108*10
com.fr.design.plugin.remind.PluginInvalidateRemindDialog.dialog=600*500
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