Browse Source

REPORT-91074 【国际化】超链接区分设计器版本

release/11.0
obo 2 years ago
parent
commit
66ea9bec5a
  1. 4
      designer-base/src/main/java/com/fr/design/actions/community/BBSAction.java
  2. 4
      designer-base/src/main/java/com/fr/design/actions/community/BugAction.java
  3. 4
      designer-base/src/main/java/com/fr/design/actions/community/CenterAction.java
  4. 4
      designer-base/src/main/java/com/fr/design/actions/community/CusDemandAction.java
  5. 4
      designer-base/src/main/java/com/fr/design/actions/community/FacebookFansAction.java
  6. 4
      designer-base/src/main/java/com/fr/design/actions/community/NeedAction.java
  7. 4
      designer-base/src/main/java/com/fr/design/actions/community/QuestionAction.java
  8. 4
      designer-base/src/main/java/com/fr/design/actions/community/SignAction.java
  9. 4
      designer-base/src/main/java/com/fr/design/actions/community/StudyPlanAction.java
  10. 4
      designer-base/src/main/java/com/fr/design/actions/community/TechSolutionAction.java
  11. 4
      designer-base/src/main/java/com/fr/design/actions/community/TemplateStoreAction.java
  12. 4
      designer-base/src/main/java/com/fr/design/actions/community/UpAction.java
  13. 4
      designer-base/src/main/java/com/fr/design/actions/community/WorkOrderCenterAction.java
  14. 4
      designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java
  15. 4
      designer-base/src/main/java/com/fr/design/data/datapane/ESDStrategyConfigPane.java
  16. 4
      designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java
  17. 4
      designer-base/src/main/java/com/fr/design/extra/exe/callback/handle/PluginCallBackHelper.java
  18. 4
      designer-base/src/main/java/com/fr/design/gui/style/TranslucentBorderSpecialPane.java
  19. 94
      designer-base/src/main/java/com/fr/design/i18n/LocaleLinkFactory.java
  20. 47
      designer-base/src/main/java/com/fr/design/i18n/LocaleLinkProvide.java
  21. 4
      designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java
  22. 4
      designer-base/src/main/java/com/fr/design/locale/impl/BbsRegisterMark.java
  23. 4
      designer-base/src/main/java/com/fr/design/locale/impl/BbsResetMark.java
  24. 4
      designer-base/src/main/java/com/fr/design/locale/impl/BbsSpaceMark.java
  25. 4
      designer-base/src/main/java/com/fr/design/login/DesignerLoginBridge.java
  26. 4
      designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java
  27. 4
      designer-base/src/main/java/com/fr/design/update/actions/NewFeatureAction.java
  28. 4
      designer-base/src/main/java/com/fr/env/RemoteDesignLocaleMark.java
  29. 4
      designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java
  30. 6
      designer-base/src/main/java/com/fr/env/detect/base/DetectorConstants.java
  31. 4
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/actions/Jump2DetailAction.java
  32. 4
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetRepoPane.java
  33. 4
      designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java
  34. 4
      designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java
  35. 4
      designer-realize/src/main/java/com/fr/design/report/ExportUniversalPane.java

4
designer-base/src/main/java/com/fr/design/actions/community/BBSAction.java

@ -1,6 +1,6 @@
package com.fr.design.actions.community;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.login.AbstractDesignerSSO;
import com.fr.design.menu.MenuKeySet;
@ -28,7 +28,7 @@ public class BBSAction extends AbstractDesignerSSO {
@Override
public String getJumpUrl() {
return LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink();
return LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
}
public static final MenuKeySet BBS = new MenuKeySet() {

4
designer-base/src/main/java/com/fr/design/actions/community/BugAction.java

@ -1,6 +1,6 @@
package com.fr.design.actions.community;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.login.AbstractDesignerSSO;
import com.fr.design.menu.MenuKeySet;
@ -27,7 +27,7 @@ public class BugAction extends AbstractDesignerSSO {
@Override
public String getJumpUrl() {
return LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink();
return LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
}
public static final MenuKeySet BUG = new MenuKeySet() {

4
designer-base/src/main/java/com/fr/design/actions/community/CenterAction.java

@ -1,6 +1,6 @@
package com.fr.design.actions.community;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.menu.MenuKeySet;
import javax.swing.KeyStroke;
@ -29,7 +29,7 @@ public class CenterAction extends UpAction {
@Override
public String getJumpUrl() {
return LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink();
return LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
}
public static final MenuKeySet CENTER = new MenuKeySet() {

4
designer-base/src/main/java/com/fr/design/actions/community/CusDemandAction.java

@ -1,7 +1,7 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
@ -35,7 +35,7 @@ public class CusDemandAction extends UpAction{
@Override
public void actionPerformed(ActionEvent arg0)
{
String url = LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink();
String url = LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
BrowseUtils.browser(url);
}

4
designer-base/src/main/java/com/fr/design/actions/community/FacebookFansAction.java

@ -1,6 +1,6 @@
package com.fr.design.actions.community;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
@ -28,7 +28,7 @@ public class FacebookFansAction extends UpAction {
@Override
public void actionPerformed(ActionEvent arg0) {
BrowseUtils.browser(LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink());
BrowseUtils.browser(LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT));
}
public static final MenuKeySet FACEBOOKFANS = new MenuKeySet() {

4
designer-base/src/main/java/com/fr/design/actions/community/NeedAction.java

@ -1,6 +1,6 @@
package com.fr.design.actions.community;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.login.AbstractDesignerSSO;
import com.fr.design.menu.MenuKeySet;
@ -28,7 +28,7 @@ public class NeedAction extends AbstractDesignerSSO {
@Override
public String getJumpUrl() {
return LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY ,PROPS_LINK_KEY_DEFAULT).getLink();
return LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY ,PROPS_LINK_KEY_DEFAULT);
}
public static final MenuKeySet NEED = new MenuKeySet() {

4
designer-base/src/main/java/com/fr/design/actions/community/QuestionAction.java

@ -1,6 +1,6 @@
package com.fr.design.actions.community;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.login.AbstractDesignerSSO;
import com.fr.design.menu.MenuKeySet;
@ -28,7 +28,7 @@ public class QuestionAction extends AbstractDesignerSSO {
@Override
public String getJumpUrl() {
return LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY ,PROPS_LINK_KEY_DEFAULT).getLink();
return LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY ,PROPS_LINK_KEY_DEFAULT);
}
public static final MenuKeySet QUESTIONS = new MenuKeySet() {

4
designer-base/src/main/java/com/fr/design/actions/community/SignAction.java

@ -1,6 +1,6 @@
package com.fr.design.actions.community;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.login.AbstractDesignerSSO;
import com.fr.design.menu.MenuKeySet;
@ -27,7 +27,7 @@ public class SignAction extends AbstractDesignerSSO {
@Override
public String getJumpUrl() {
return LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY ,PROPS_LINK_KEY_DEFAULT).getLink();
return LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY ,PROPS_LINK_KEY_DEFAULT);
}
public static final MenuKeySet SIGN = new MenuKeySet() {

4
designer-base/src/main/java/com/fr/design/actions/community/StudyPlanAction.java

@ -1,6 +1,6 @@
package com.fr.design.actions.community;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.i18n.Toolkit;
import com.fr.design.login.AbstractDesignerSSO;
@ -23,6 +23,6 @@ public class StudyPlanAction extends AbstractDesignerSSO {
@Override
public String getJumpUrl() {
return LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY ,PROPS_LINK_KEY_DEFAULT).getLink();
return LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY ,PROPS_LINK_KEY_DEFAULT);
}
}

4
designer-base/src/main/java/com/fr/design/actions/community/TechSolutionAction.java

@ -1,6 +1,6 @@
package com.fr.design.actions.community;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.login.AbstractDesignerSSO;
import com.fr.design.menu.MenuKeySet;
@ -31,7 +31,7 @@ public class TechSolutionAction extends AbstractDesignerSSO {
@Override
public String getJumpUrl() {
return LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY ,PROPS_LINK_KEY_DEFAULT).getLink();
return LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY ,PROPS_LINK_KEY_DEFAULT);
}
public static final MenuKeySet TSO = new MenuKeySet() {

4
designer-base/src/main/java/com/fr/design/actions/community/TemplateStoreAction.java

@ -1,7 +1,7 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.login.AbstractDesignerSSO;
import com.fr.design.mainframe.share.collect.ComponentCollector;
import com.fr.design.menu.MenuKeySet;
@ -54,6 +54,6 @@ public class TemplateStoreAction extends AbstractDesignerSSO {
@Override
public String getJumpUrl() {
ComponentCollector.getInstance().collectTepMenuEnterClick();
return LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY ,PROPS_LINK_KEY_DEFAULT).getLink();
return LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY ,PROPS_LINK_KEY_DEFAULT);
}
}

4
designer-base/src/main/java/com/fr/design/actions/community/UpAction.java

@ -1,7 +1,7 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.login.AbstractDesignerSSO;
import com.fr.design.menu.MenuKeySet;
@ -28,7 +28,7 @@ public class UpAction extends AbstractDesignerSSO {
@Override
public String getJumpUrl() {
return LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY ,PROPS_LINK_KEY_DEFAULT).getLink();
return LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY ,PROPS_LINK_KEY_DEFAULT);
}
public static final MenuKeySet UPDATE = new MenuKeySet() {

4
designer-base/src/main/java/com/fr/design/actions/community/WorkOrderCenterAction.java

@ -1,6 +1,6 @@
package com.fr.design.actions.community;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.i18n.Toolkit;
/**
@ -27,6 +27,6 @@ public class WorkOrderCenterAction extends UpAction {
@Override
public String getJumpUrl() {
return LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink();
return LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
}
}

4
designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java

@ -1,6 +1,6 @@
package com.fr.design.actions.help;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.i18n.Toolkit;
import com.fr.design.login.AbstractDesignerSSO;
import com.fr.design.menu.MenuKeySet;
@ -38,7 +38,7 @@ public class TutorialAction extends AbstractDesignerSSO {
@Override
public String getJumpUrl() {
return LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink();
return LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
}
// 生成帮助文档 sitecenter key, help.zh_CN.10

4
designer-base/src/main/java/com/fr/design/data/datapane/ESDStrategyConfigPane.java

@ -6,7 +6,7 @@ import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.ActionLabel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.esd.common.CacheConstants;
@ -50,7 +50,7 @@ public class ESDStrategyConfigPane extends BasicBeanPane<StrategyConfig> {
*/
private static final String PROPS_LINK_KEY_DEFAULT = "Fine-Design-CloudCenter_Cron_Help_Default";
private static final String CRON_HELP_URL = LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink();
private static final String CRON_HELP_URL = LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
private UIRadioButton selectAutoUpdate;
private UIRadioButton selectBySchema;
private UICheckBox shouldEvolve;

4
designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java

@ -11,7 +11,7 @@ import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.link.MessageWithLink;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
@ -94,7 +94,7 @@ public class PreviewPerformedSqlPane extends JDialog implements ActionListener {
JLabel label = new JLabel(Toolkit.i18nText("Fine-Design_Basic_Preview_Performed_Sql_Message") + Toolkit.i18nText("Fine-Design_Basic_Sql_Injection_Prevention") + Toolkit.i18nText("Fine-Design_Basic_Preview_Special_Char_Sql_Back_Message"));
messagePanel.add(label);
} else {
MessageWithLink message = new MessageWithLink(Toolkit.i18nText("Fine-Design_Basic_Preview_Special_Char_Sql_Front_Message"), Toolkit.i18nText("Fine-Design_Basic_Sql_Injection_Prevention"), LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink(), Toolkit.i18nText("Fine-Design_Basic_Preview_Special_Char_Sql_Back_Message"));
MessageWithLink message = new MessageWithLink(Toolkit.i18nText("Fine-Design_Basic_Preview_Special_Char_Sql_Front_Message"), Toolkit.i18nText("Fine-Design_Basic_Sql_Injection_Prevention"), LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT), Toolkit.i18nText("Fine-Design_Basic_Preview_Special_Char_Sql_Back_Message"));
messagePanel.add(message);
}
// 提示图标

4
designer-base/src/main/java/com/fr/design/extra/exe/callback/handle/PluginCallBackHelper.java

@ -2,7 +2,7 @@ package com.fr.design.extra.exe.callback.handle;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.dialog.link.MessageWithLink;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.i18n.Toolkit;
import com.fr.plugin.error.PluginErrorCode;
import com.fr.plugin.manage.control.PluginTaskResult;
@ -29,7 +29,7 @@ public class PluginCallBackHelper {
private static final String PROPS_LINK_KEY_DEFAULT = "Fine-Design_Basic_Plugin_File_Validate_HELP_DOCUMENT_LINK_Default";
private static final String HELP_DOCUMENT_LINK = LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink();
private static final String HELP_DOCUMENT_LINK = LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
/**

4
designer-base/src/main/java/com/fr/design/gui/style/TranslucentBorderSpecialPane.java

@ -16,7 +16,7 @@ import com.fr.design.gui.frpane.UIPercentDragPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -90,7 +90,7 @@ public class TranslucentBorderSpecialPane extends AbstractBorderPackerPane imple
*/
private static final String PROPS_LINK_KEY_DEFAULT = "Fine-Design-CloudCenter_Nine_Patch_Default";
private final String TWEAK_NINE_POINT_HELP_URL = LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink();
private final String TWEAK_NINE_POINT_HELP_URL = LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
private UIObserverListener uiObserverListener;

94
designer-base/src/main/java/com/fr/design/i18n/LocaleLinkFactory.java

@ -1,94 +0,0 @@
package com.fr.design.i18n;
import com.fr.general.CloudCenter;
import com.fr.stable.StringUtils;
import java.util.HashMap;
import java.util.Map;
/**
* 生成根据配置项key获取云中心链接对应key的链接获取器的工厂类
* 目前仅放在设计器模块下使用,拓展可以结合cbb中的内容自定义资源路径
*
* @author obo
* @since 11.0
* Created on 2023/4/7
*/
public final class LocaleLinkFactory {
private LocaleLinkFactory(){};
/**
* 单一实例
*/
private static final LocaleLinkFactory INSTANCE = new LocaleLinkFactory();
/**
* 返回LocaleLinkFactory的单一实例
*
* @return LocaleLinkFactory单一实例
*/
public static LocaleLinkFactory getInstance(){
return INSTANCE;
}
/**
* 存放特定配置文件key及其对应的LinkProvider
*/
private static final Map<String, LocaleLinkProvider> MAP = new HashMap<>();
/**
* 根据配置文件项中的key初始化对应的生成器
*
* @param propsKey 配置项key
* @param defaultKey 默认链接项key
* @return 对应的生成器
*/
public LocaleLinkProvider getOrCreateProvider(String propsKey, String defaultKey) {
if(MAP.containsKey(propsKey)) {
return MAP.get(propsKey);
} else {
LocaleLinkProvider provider = new LocaleLinkProvider(propsKey, defaultKey);
MAP.put(propsKey, provider);
return provider;
}
}
/**
* 对应配置项key的链接生成器
*
* @author obo
* @since 11.0
* Created on 2023/4/7
*/
public static class LocaleLinkProvider {
/**
* 配置文件项key
*/
private final String propsKey;
/**
* 默认跳转链接配置项key
*/
private final String defaultKey;
private LocaleLinkProvider(String propsKey, String defaultKey) {
this.propsKey = propsKey;
this.defaultKey = defaultKey;
}
/**
* 获取对应链接
*
* @return 链接
*/
public String getLink() {
String cloudKey = DesignI18nImpl.getInstance().i18nText(this.propsKey);
String url = CloudCenter.getInstance().acquireUrlByKind(cloudKey);
if(StringUtils.isEmpty(url)) {
return DesignI18nImpl.getInstance().i18nText(this.defaultKey);
}
return url;
}
}
}

47
designer-base/src/main/java/com/fr/design/i18n/LocaleLinkProvide.java

@ -0,0 +1,47 @@
package com.fr.design.i18n;
import com.fr.general.CloudCenter;
import com.fr.stable.StringUtils;
/**
* 国际化链接获取工具
* 根据配置文件key获取云中心key对应的链接或者默认链接
*
* @author obo
* @since 11.0
* Created on 2023/4/7
*/
public final class LocaleLinkProvide {
private LocaleLinkProvide(){};
/**
* 单一实例
*/
private static final LocaleLinkProvide INSTANCE = new LocaleLinkProvide();
/**
* 返回LocaleLinkProvide的单一实例
*
* @return LocaleLinkProvide单一实例
*/
public static LocaleLinkProvide getInstance(){
return INSTANCE;
}
/**
* 根据配置文件项中的key获取链接
*
* @param propsKey 配置项key
* @param defaultKey 默认链接项key
* @return 对应的生成器
*/
public String getLink(String propsKey, String defaultKey) {
String cloudKey = DesignI18nImpl.getInstance().i18nText(propsKey);
String url = CloudCenter.getInstance().acquireUrlByKind(cloudKey);
if(StringUtils.isEmpty(url)) {
return DesignI18nImpl.getInstance().i18nText(defaultKey);
}
return url;
}
}

4
designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java

@ -14,7 +14,7 @@ import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.gui.itextfield.PlaceholderTextField;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.i18n.Toolkit;
import com.fr.design.javascript.jsapi.JSAPITreeHelper;
import com.fr.design.javascript.jsapi.JSAPIUserObject;
@ -361,7 +361,7 @@ public class JSContentWithDescriptionPane extends JSContentPane implements KeyLi
private void doHelpDocumentSearch() {
Object value = interfaceNameList.getSelectedValue();
if (value != null) {
String url = LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink();
String url = LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
try {
String result = HttpToolbox.get(url);
JSONObject jsonObject = new JSONObject(result);

4
designer-base/src/main/java/com/fr/design/locale/impl/BbsRegisterMark.java

@ -1,6 +1,6 @@
package com.fr.design.locale.impl;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.general.locale.LocaleMark;
/**
@ -23,6 +23,6 @@ public class BbsRegisterMark implements LocaleMark<String> {
@Override
public String getValue() {
return LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink();
return LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
}
}

4
designer-base/src/main/java/com/fr/design/locale/impl/BbsResetMark.java

@ -1,6 +1,6 @@
package com.fr.design.locale.impl;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.general.locale.LocaleMark;
/**
@ -25,6 +25,6 @@ public class BbsResetMark implements LocaleMark<String> {
@Override
public String getValue() {
return LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink();
return LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
}
}

4
designer-base/src/main/java/com/fr/design/locale/impl/BbsSpaceMark.java

@ -1,6 +1,6 @@
package com.fr.design.locale.impl;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.general.locale.LocaleMark;
/**
@ -24,6 +24,6 @@ public class BbsSpaceMark implements LocaleMark<String> {
public BbsSpaceMark() {}
@Override
public String getValue() {
return LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink();
return LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
}
}

4
designer-base/src/main/java/com/fr/design/login/DesignerLoginBridge.java

@ -5,7 +5,7 @@ import com.fr.design.bridge.exec.JSCallback;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ilable.ActionLabel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.locale.impl.BbsResetMark;
@ -83,7 +83,7 @@ public class DesignerLoginBridge {
getHyperlinkPane(
com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Guide_Login_Success_Title"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Guide_Login_Success_Hyperlink_Text"),
LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink()
LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT)
)
);
} else if (source == DesignerLoginSource.BBS_JUMP) {

4
designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java

@ -4,7 +4,7 @@ import com.fr.design.dialog.link.MessageWithLink;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
@ -55,7 +55,7 @@ public class CheckFontInfoDialog extends JDialog implements ActionListener {
JPanel imagePanel = new JPanel();
imageLabel = new UILabel(IOUtils.readIcon("com/fr/design/images/warnings/warning32.png"));
imagePanel.add(imageLabel);
String link = LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink();
String link = LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
JPanel messagePanel = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true);
MessageWithLink linkMessage = new MessageWithLink(Toolkit.i18nText("Fine_Designer_Check_Font_Message"),
Toolkit.i18nText("Fine_Designer_Check_Font_Install_Font"),

4
designer-base/src/main/java/com/fr/design/update/actions/NewFeatureAction.java

@ -1,7 +1,7 @@
package com.fr.design.update.actions;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.utils.BrowseUtils;
import com.fr.log.FineLoggerFactory;
@ -25,7 +25,7 @@ public class NewFeatureAction implements ActionListener {
*/
private static final String PROPS_LINK_KEY_DEFAULT = "Fine-Design-CloudCenter_Latest_Update_Detail_Default";
public static String DEFAULT_UPDATE_DETAIL_URL = LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink();
public static String DEFAULT_UPDATE_DETAIL_URL = LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
@Override
public void actionPerformed(ActionEvent e) {

4
designer-base/src/main/java/com/fr/env/RemoteDesignLocaleMark.java vendored

@ -1,6 +1,6 @@
package com.fr.env;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.general.locale.LocaleMark;
/**
@ -24,7 +24,7 @@ public class RemoteDesignLocaleMark implements LocaleMark<String> {
@Override
public String getValue() {
return LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink();
return LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
}
}

4
designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java vendored

@ -6,7 +6,7 @@ import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
@ -73,7 +73,7 @@ public class SyncFailedPluginsDialog extends JDialog {
JPanel messagePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
MessageWithLink messageWithLink = new MessageWithLink(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugin_Fail_Suggestion"),Toolkit.i18nText("Fine-Design_Basic_Sync_Deal_Immediately"),
LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink());
LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT));
messageWithLink.setPreferredSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.env.SyncFailedPluginsDialog.messageWithLink"));
messagePane.add(messageWithLink);

6
designer-base/src/main/java/com/fr/env/detect/base/DetectorConstants.java vendored

@ -1,6 +1,6 @@
package com.fr.env.detect.base;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
/**
* created by Harrison on 2022/05/25
@ -25,9 +25,9 @@ public class DetectorConstants {
* 云中心FineDB异常检测帮助文档默认链接在配置文件中对应的配置文件key
*/
private static final String JAR_HELP_PROPS_LINK_KEY_DEFAULT = "Fine-Design-CloudCenter_Jar_Exception_Check_Default";
public static final String JAR_HELP_LINK = LocaleLinkFactory.getInstance().getOrCreateProvider(JAR_HELP_PROPS_LINK_KEY, JAR_HELP_PROPS_LINK_KEY_DEFAULT).getLink();;
public static final String JAR_HELP_LINK = LocaleLinkProvide.getInstance().getLink(JAR_HELP_PROPS_LINK_KEY, JAR_HELP_PROPS_LINK_KEY_DEFAULT);;
public static final String FINE_DB_HELP_LINK = LocaleLinkFactory.getInstance().getOrCreateProvider(FINE_DB_HELP_PROPS_LINK_KEY, FINE_DB_HELP_PROPS_LINK_KEY_DEFAULT).getLink();
public static final String FINE_DB_HELP_LINK = LocaleLinkProvide.getInstance().getLink(FINE_DB_HELP_PROPS_LINK_KEY, FINE_DB_HELP_PROPS_LINK_KEY_DEFAULT);
public static final String SEPARATOR = "、";
public static final String BR_TAG = "<br/>";

4
designer-form/src/main/java/com/fr/design/mainframe/share/ui/actions/Jump2DetailAction.java

@ -1,6 +1,6 @@
package com.fr.design.mainframe.share.ui.actions;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.share.ui.online.CarouselStateManger;
import com.fr.stable.StringUtils;
@ -29,7 +29,7 @@ public class Jump2DetailAction extends SharedComponentPopupAction {
*/
private static final String PROPS_LINK_KEY_DEFAULT = "Fine-Design-CloudCenter_Market_Detail_Default";
private static final String ONLINE_WIDGET_DETAIL_FORMATTED_URL = LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink();
private static final String ONLINE_WIDGET_DETAIL_FORMATTED_URL = LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
private final String id;
public Jump2DetailAction(String id) {

4
designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetRepoPane.java

@ -5,7 +5,7 @@ import com.fr.base.Style;
import com.fr.design.dialog.BasicPane;
import com.fr.design.form.util.FontTransformUtil;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.share.ui.base.LoadingPane;
@ -53,7 +53,7 @@ public class OnlineWidgetRepoPane extends BasicPane {
*/
private static final String PROPS_LINK_KEY_DEFAULT = "Fine-Design-CloudCenter_Market_Default";
private static final String MARKET_URL = LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink();
private static final String MARKET_URL = LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
private static List<OnlineShareWidget>[] sharableWidgets;
private OnlineWidgetTabPane componentTabPane;
private boolean isShowPackagePanel = false;

4
designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java

@ -4,7 +4,7 @@ import com.fr.base.svg.IconUtils;
import com.fr.design.actions.replace.info.Info;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.share.ui.base.MouseClickListener;
import com.fr.design.utils.BrowseUtils;
@ -45,7 +45,7 @@ public class ITReplaceWestPanel {
* 云中心定时调度执行频率表达式设定帮助文档默认链接在配置文件中对应的配置文件key
*/
private static final String PROPS_LINK_KEY_DEFAULT = "Fine-Design-CloudCenter_Template_Level_Search_Replace_Default";
private static final String HELP_URL = LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink();
private static final String HELP_URL = LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
private static final int FILL_COUNT = 11;
public static final int LEFT_WIDTH = 100;
public static final String CONTENT_TEXT = "<html><font color = 'rgb(255,255,255)'>" + Toolkit.i18nText("Fine-Design_Basic_Templates_Content") + "</font></html>";

4
designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java

@ -7,7 +7,7 @@ import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.env.DesignerWorkspaceInfo;
import com.fr.design.env.DesignerWorkspaceInfoContext;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
@ -68,7 +68,7 @@ public class DesignerSocketIO {
*/
private static final String PROPS_LINK_KEY_DEFAULT = "Fine-Design-CloudCenter_WebSocket_Default";
private static final String WEBSOCKET_HELP_DOC = LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink();
private static final String WEBSOCKET_HELP_DOC = LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
private static final String HTTPS = "https";
private static final String HTTP = "http";
private static Socket socket = null;

4
designer-realize/src/main/java/com/fr/design/report/ExportUniversalPane.java

@ -6,7 +6,7 @@ import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.ActionLabel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.LocaleLinkFactory;
import com.fr.design.i18n.LocaleLinkProvide;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.BrowseUtils;
@ -40,7 +40,7 @@ public class ExportUniversalPane extends BasicPane {
*/
private static final String PROPS_LINK_KEY_DEFAULT = "Fine-Design-CloudCenter_Alt_Font_Export_Default";
private static final String HELP_URL = LocaleLinkFactory.getInstance().getOrCreateProvider(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT).getLink();
private static final String HELP_URL = LocaleLinkProvide.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
private UICheckBox specialCharacterExport;
// 密码支持公式

Loading…
Cancel
Save