Skip to content

Commit 9be920f

Browse files
committed
refactor: prefer using localized strings
1 parent c78dcf6 commit 9be920f

4 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/main/kotlin/com/github/lppedd/cc/configuration/component/CoAuthorsFilePickerPanel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ internal class CoAuthorsFilePickerPanel(
154154
.createPanel()
155155

156156
private object MyFileChooserDescriptor : CCFileChooserDescriptor() {
157-
override val okActionName = "Select File"
157+
override val okActionName = CCBundle["cc.config.fileDialog.selectFile"]
158158
override val validFileIcon = CC.Icon.FileType.CoAuthors
159159
override val validFileTest: (VirtualFile) -> Boolean = {
160160
it.isValid && !it.isDirectory && it.isWritable && "coauthors".equals(it.extension, true)

src/main/kotlin/com/github/lppedd/cc/configuration/component/DefaultTokensFilePickerPanel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ internal class DefaultTokensFilePickerPanel(
189189
}
190190

191191
private object MyFileChooserDescriptor : CCFileChooserDescriptor() {
192-
override val okActionName = "Select File"
192+
override val okActionName = CCBundle["cc.config.fileDialog.selectFile"]
193193
override val validFileIcon = CC.Icon.FileType.Json
194194
override val validFileTest: (VirtualFile) -> Boolean = {
195195
it.isValid && "json".equals(it.extension, true)

src/main/resources/messages/ConventionalCommitBundle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ cc.config.providers.footerValue.title = Footer value providers:
112112
cc.config.providersPriority = Personalize the providers priority (higher in the list equals higher priority).
113113
cc.config.fileDialog.title = Select File
114114
cc.config.fileDialog.description = Only JSON files are allowed
115+
cc.config.fileDialog.selectFile = Select File
115116
cc.config.exportDialog.title = Select Export Path
116117
cc.config.coAuthors.description = View, modify and select co-authors in a specialized dialog
117118
cc.config.coAuthorsDialog.title = Select co-authors

src/main/resources/messages/ConventionalCommitBundle_zh_CN.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ cc.config.providers.footerValue.title = \u811A\u6CE8\u5185\u5BB9\uFF1A
111111
cc.config.providersPriority = \u81EA\u5B9A\u4E49\u63D0\u4F9B\u7A0B\u5E8F\u4F18\u5148\u7EA7\uFF08\u8D8A\u9760\u524D\u4F18\u5148\u7EA7\u8D8A\u9AD8\uFF09\u3002
112112
cc.config.fileDialog.title = \u9009\u62E9\u6587\u4EF6
113113
cc.config.fileDialog.description = \u4EC5\u5141\u8BB8 JSON \u6587\u4EF6
114+
cc.config.fileDialog.selectFile = \u9009\u62E9\u6587\u4EF6
114115
cc.config.exportDialog.title = \u9009\u62E9\u5BFC\u51FA\u8DEF\u5F84
115116
cc.config.coAuthors.description = \u5728\u4E13\u6709\u5BF9\u8BDD\u6846\u4E2D\u67E5\u770B\u3001\u4FEE\u6539\u6216\u9009\u62E9\u534F\u4F5C\u8005
116117
cc.config.coAuthorsDialog.title = \u9009\u62E9\u534F\u4F5C\u8005

0 commit comments

Comments
 (0)