Skip to content

Commit

Permalink
feat: turbo后台信息国际化 #86
Browse files Browse the repository at this point in the history
  • Loading branch information
eazence committed Aug 21, 2023
1 parent 284bae8 commit b0567fa
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,30 +242,33 @@ class TurboEngineConfigService @Autowired constructor(
return with(turboEngineConfigEntity) {
TurboEngineConfigVO(
engineCode = engineCode,
engineName = engineName,
engineName = I18NUtil.getMessage("$engineCode.engineName"),
priorityNum = priorityNum,
desc = desc,
desc = I18NUtil.getMessage("$engineCode.desc"),
spelExpression = spelExpression,
spelParamMap = spelParamMap,
enabled = enabled,
userManual = userManual,
userManual = translateEngineUserManual(engineCode, userManual ?: ""),
docUrl = docUrl,
recommend = recommend,
recommendReason = recommendReason,
recommendReason = I18NUtil.getMessage("$engineCode.recommendReason"),
paramConfig = paramConfig?.map {
ParamConfigModel(
paramKey = it.paramKey,
paramName = it.paramName,
paramName = I18NUtil.getMessage("$engineCode.paramConfig.${it.paramKey}.paramName"),
paramType = it.paramType,
paramProps = it.paramProps,
paramEnum = it.paramEnum?.map { paramEnumEntity ->
val paramName = I18NUtil.getMessage("$engineCode.paramConfig.${it.paramKey
}.paramEnum.${paramEnumEntity.paramValue}")
ParamEnumModel(
paramValue = paramEnumEntity.paramValue,
paramName = paramEnumEntity.paramName,
paramName = paramName,
visualRange = paramEnumEntity.visualRange
)
},
tips = it.tips,
tips = if (!it.tips.isNullOrBlank()) I18NUtil.getMessage("$engineCode.paramConfig.${it
.paramKey}.tips") else it.tips,
displayed = it.displayed,
defaultValue = it.defaultValue,
required = it.required,
Expand All @@ -282,7 +285,7 @@ class TurboEngineConfigService @Autowired constructor(
linkVariable = it.linkVariable
)
},
pluginTips = pluginTips,
pluginTips = I18NUtil.getMessage("$engineCode.pluginTips"),
updatedBy = updatedBy,
updatedDate = updatedDate
)
Expand Down Expand Up @@ -315,7 +318,7 @@ class TurboEngineConfigService @Autowired constructor(
docUrl = docUrl,
recommend = recommend,
recommendReason = I18NUtil.getMessage("$engineCode.recommendReason"),
pluginTips = pluginTips,
pluginTips = I18NUtil.getMessage("$engineCode.pluginTips"),
paramConfig = paramConfig?.map {
ParamConfigModel(
paramKey = it.paramKey,
Expand All @@ -327,7 +330,7 @@ class TurboEngineConfigService @Autowired constructor(
}.paramEnum.${paramEnumEntity.paramValue}")
ParamEnumModel(
paramValue = paramEnumEntity.paramValue,
paramName = paramEnumEntity.paramName,
paramName = if (I18NUtil.ERROR == paramName) paramEnumEntity.paramName else paramName,
visualRange = paramEnumEntity.visualRange
)
},
Expand Down Expand Up @@ -610,7 +613,7 @@ class TurboEngineConfigService @Autowired constructor(
},
recommend = it.recommend,
recommendReason = I18NUtil.getMessage("${it.engineCode}.recommendReason"),
pluginTips = it.pluginTips,
pluginTips = I18NUtil.getMessage("${it.engineCode}.pluginTips"),
updatedBy = it.updatedBy,
updatedDate = it.updatedDate
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
disttask-cc.desc=A brand-new, self-developed engine with zero intrusion and one-click acceleration offers faster speeds. It provides visual compilation charts to clearly control the entire process data. Features include support for PCH, Gcov, distributed preprocessing, and more.
disttask-cc.recommendReason=A brand-new, self-developed engine with zero intrusion and one-click acceleration offers faster speeds. It provides visual compilation charts to clearly control the entire process data. Features include support for PCH, Gcov, distributed preprocessing, and more.

disttask-cc.pluginTips=Example: <br> \n <code style = \"background-color: #f1f1f1;padding: 2px;\"> bk-booster -bt cc -p $ TURBO_PLAN_ID --hook -a \"<Your compilation script or command>\"</code><br><br>\nNote: If your compilation environment is a "private build machine", please run the installation script with root privileges on the machine in advance: <br>\n<code style = \"background-color: #f1f1f1;padding: 2px;\"> /bin/bash -c \"$(curl http://devgw.devops.oa.com/turbo-client/disttask/install.sh)\"</code><br><br>\nFor more detailed instructions, please refer to the <a class=\"g-accelerate-click-text\" href=\"https://iwiki.woa.com/pages/viewpage.action?pageId=800800374\" target=\"__blank\">documentation</a></span>
disttask-cc.userManual.0=After the acceleration plan is configured, there are two ways to use:
disttask-cc.userManual.1=Method 1:
disttask-cc.userManual.2=Used in the pipeline, add the [Turbo-Compilation Acceleration] plugin, select the acceleration scheme, configure the acceleration script, and execute the pipeline.
Expand All @@ -20,6 +20,7 @@ disttask-cc.paramConfig.ccache_enabled.paramName=Enable Ccache

disttask-ue4.desc=A self-developed engine for accelerating Unreal Engine builds across multiple platforms. Supports acceleration for Editor, Shader, Dedicated Servers, and more.
disttask-ue4.recommendReason=A self-developed engine for accelerating Unreal Engine builds across multiple platforms. Supports acceleration for Editor, Shader, Dedicated Servers, and more.
disttask-ue4.pluginTips=The method of integrating the UE4 solution is detailed in the <a class=\"g-accelerate-click-text\" href=\"https://iwiki.woa.com/pages/viewpage.action?pageId=611363095\" target=\"__blank\">Integration Document</a>.
disttask-ue4.userManual.0=After the acceleration plan is configured, follow the guidelines to manually access:
disttask-ue4.userManual.1=View user guide
disttask-ue4.engineName=Unreal Engine Acceleration
Expand All @@ -31,6 +32,7 @@ disttask-ue4.paramConfig.worker_version.paramEnum.tlinux2.2-generic=TLinux2.2 Ge
disttask-ue4.paramConfig.queue_name.paramName=Acceleration OS

distcc.desc=\u3010Deprecated\u3011Traditional distcc approach, suitable for C/C++ compilation under Linux.
distcc.pluginTips=Example: <br>\n<code style=\"background-color: #f1f1f1;padding: 2px;\">bk-make -p $TURBO_PLAN_ID -a \"all\"</code><br><br>\nNote: If your build environment is a \"privately imported build machine,\" please first download the client on the machine <a href=\"http://devgw.devops.oa.com/turbo-client/LD_Turbo_install.tar.gz\" class=\"external-link\" target=\"_blank\">here</a>, extract it, and install it with root privileges:<br>\n<code style=\"background-color: #f1f1f1;padding: 2px;\">tar -zxf LD_Turbo_install.tar.gz && cd LD_Turbo_install && sh install.sh</code><br/><br>\nFor more detailed instructions, please <a class=\"g-accelerate-click-text\" href=\"https://iwiki.woa.com/pages/viewpage.action?pageId=800812335\" target=\"__blank\">refer to the documentation</a>.</span>
distcc.userManual.0=After the acceleration plan is configured, there are three access methods:
distcc.userManual.1=Method 1
distcc.userManual.2=If your project has previously been associated with the "Bash" plug-in of the pipeline and executed compilation acceleration, while keeping the original access method unchanged, replace the new solution id you applied for with the original
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
disttask-cc.desc=\u5168\u65B0\u81EA\u7814\u5F15\u64CE\uFF0C\u96F6\u4FB5\u5165\u4E00\u952E\u52A0\u901F\uFF0C\u66F4\u5FEB\u7684\u901F\u5EA6\uFF0C\u63D0\u4F9B\u53EF\u89C6\u5316\u7F16\u8BD1\u56FE\u8868\uFF0C\u6E05\u6670\u638C\u63A7\u5168\u6D41\u7A0B\u6570\u636E\u3002\u652F\u6301pch\u3001gcov\u3001\u5206\u5E03\u5F0F\u9884\u5904\u7406\u7B49\u66F4\u591A\u529F\u80FD\u3002
disttask-cc.recommendReason=\u5168\u65B0\u81EA\u7814\u5F15\u64CE\uFF0C\u96F6\u4FB5\u5165\u4E00\u952E\u52A0\u901F\uFF0C\u66F4\u5FEB\u7684\u901F\u5EA6\uFF0C\u63D0\u4F9B\u53EF\u89C6\u5316\u7F16\u8BD1\u56FE\u8868\uFF0C\u6E05\u6670\u638C\u63A7\u5168\u6D41\u7A0B\u6570\u636E\u3002\u652F\u6301pch\u3001gcov\u3001\u5206\u5E03\u5F0F\u9884\u5904\u7406\u7B49\u66F4\u591A\u529F\u80FD\u3002

disttask-cc.pluginTips=\u793A\u4F8B\uFF1A<br>\n<code style=\"background-color: #f1f1f1;padding: 2px;\">bk-booster -bt cc -p $TURBO_PLAN_ID --hook -a \"<\u4F60\u7684\u7F16\u8BD1\u811A\u672C\u6216\u547D\u4EE4>\"</code><br><br>\n\u6CE8\u610F\uFF1A\u82E5\u4F60\u7684\u7F16\u8BD1\u73AF\u5883\u662F\u201C\u5BFC\u5165\u7684\u79C1\u4EBA\u6784\u5EFA\u673A\u201D\uFF0C\u8BF7\u9884\u5148\u5728\u673A\u5668\u4E0A\u7528root\u6267\u884C\u5B89\u88C5\u811A\u672C\uFF1A<br>\n<code style=\"background-color: #f1f1f1;padding: 2px;\">/bin/bash -c \"$(curl http://devgw.devops.oa.com/turbo-client/disttask/install.sh)\"</code><br><br>\n\u66F4\u591A\u8BE6\u7EC6\u6307\u5F15\u8BF7<a class=\"g-accelerate-click-text\" href=\"https://iwiki.woa.com/pages/viewpage.action?pageId=800800374\" target=\"__blank\">\u53C2\u8003\u6587\u6863</a></span>
disttask-cc.userManual.0=\u914D\u7F6E\u597D\u52A0\u901F\u65B9\u6848\u540E\uFF0C\u6709\u4E24\u79CD\u4F7F\u7528\u65B9\u5F0F\uFF1A
disttask-cc.userManual.1=\u65B9\u5F0F\u4E00\uFF1A
disttask-cc.userManual.2=\u5728\u6D41\u6C34\u7EBF\u4E2D\u4F7F\u7528\uFF0C\u6DFB\u52A0\u3010Turbo-\u7F16\u8BD1\u52A0\u901F\u3011\u63D2\u4EF6\uFF0C\u9009\u62E9\u52A0\u901F\u65B9\u6848\uFF0C\u914D\u7F6E\u52A0\u901F\u811A\u672C\u540E\u6267\u884C\u6D41\u6C34\u7EBF\u3002
Expand All @@ -20,6 +20,7 @@ disttask-cc.paramConfig.ccache_enabled.paramName=\u662F\u5426\u542F\u7528Ccache

disttask-ue4.desc=\u81EA\u7814\u5F15\u64CE\uFF0C\u591A\u5E73\u53F0\u4E0B\u7684 UE4 \u6784\u5EFA\u52A0\u901F\u3002\u652F\u6301 Editor\u3001Shader\u3001Dedicated Servers \u7B49\u52A0\u901F\u3002
disttask-ue4.recommendReason=\u81EA\u7814\u5F15\u64CE\uFF0C\u591A\u5E73\u53F0\u4E0B\u7684 UE4 \u6784\u5EFA\u52A0\u901F\u3002\u652F\u6301 Editor\u3001Shader\u3001Dedicated Servers \u7B49\u52A0\u901F\u3002
disttask-ue4.pluginTips=UE4\u65B9\u6848\u7684\u63A5\u5165\u529E\u6CD5\u8BE6\u89C1<a class=\"g-accelerate-click-text\" href=\"https://iwiki.woa.com/pages/viewpage.action?pageId=611363095\" target=\"__blank\">\u63A5\u5165\u6587\u6863</a>
disttask-ue4.userManual.0=\u914D\u7F6E\u597D\u52A0\u901F\u65B9\u6848\u540E\uFF0C\u6839\u636E\u6307\u5F15\u6765\u624B\u52A8\u63A5\u5165\uFF1A
disttask-ue4.userManual.1=\u67E5\u770B\u4F7F\u7528\u6307\u5F15
disttask-ue4.engineName=UE4\u52A0\u901F
Expand All @@ -31,6 +32,7 @@ disttask-ue4.paramConfig.worker_version.paramEnum.tlinux2.2-generic=TLinux2.2\u9
disttask-ue4.paramConfig.queue_name.paramName=\u52A0\u901F\u5E73\u53F0

distcc.desc=\u3010\u65E7\u7248\u672C\u3011\u4F20\u7EDFdistcc\u65B9\u6848, \u9002\u7528\u4E8Elinux\u4E0B\u7684c/c++\u7F16\u8BD1
distcc.pluginTips=\u793A\u4F8B\uFF1A<br>\n<code style=\"background-color: #f1f1f1;padding: 2px;\">bk-make -p $TURBO_PLAN_ID -a \"all\"</code><br><br>\n\u6CE8\u610F\uFF1A\u82E5\u4F60\u7684\u7F16\u8BD1\u73AF\u5883\u662F\u201C\u5BFC\u5165\u7684\u79C1\u4EBA\u6784\u5EFA\u673A\u201D\uFF0C\u8BF7\u9884\u5148\u5728\u673A\u5668\u4E0A<a href=\"http://devgw.devops.oa.com/turbo-client/LD_Turbo_install.tar.gz\" class=\"external-link\" target=\"_blank\">\u4E0B\u8F7Dclient</a>\uFF0C\u89E3\u538B\u540E\u7528root\u5B89\u88C5\uFF1A</span><br>\n<code style=\"background-color: #f1f1f1;padding: 2px;\">tar -zxf LD_Turbo_install.tar.gz && cd LD_Turbo_install && sh install.sh</code><br/><br>\n\u66F4\u591A\u8BE6\u7EC6\u6307\u5F15\u8BF7<a class=\"g-accelerate-click-text\" href=\"https://iwiki.woa.com/pages/viewpage.action?pageId=800812335\" target=\"__blank\">\u53C2\u8003\u6587\u6863</a></span>
distcc.userManual.0=\u914D\u7F6E\u597D\u52A0\u901F\u65B9\u6848\u540E\uFF0C\u6709\u4E09\u79CD\u63A5\u5165\u65B9\u5F0F\uFF1A
distcc.userManual.1=\u65B9\u5F0F\u4E00
distcc.userManual.2=\u5982\u679C\u4F60\u7684\u9879\u76EE\u4E4B\u524D\u7528\u6D41\u6C34\u7EBF\u7684\u201CBash\u201D\u63D2\u4EF6\u5173\u8054\u5E76\u6267\u884C\u7F16\u8BD1\u52A0\u901F\uFF0C\u4FDD\u6301\u539F\u6765\u7684\u63A5\u5165\u65B9\u5F0F\u4E0D\u53D8\u7684\u60C5\u51B5\u4E0B\uFF0C\u5C06\u7533\u8BF7\u5230\u7684\u65B0\u7684\u65B9\u6848id\uFF0C\u66FF\u6362\u5230\u539F\u6765\u7684
Expand Down

0 comments on commit b0567fa

Please sign in to comment.