Skip to content

Commit c0db63d

Browse files
committed
refactor: use hardcoded strings for the Conventional Commit language
1 parent 50398f0 commit c0db63d

4 files changed

Lines changed: 2 additions & 6 deletions

File tree

src/main/kotlin/com/github/lppedd/cc/completion/schema/ConventionalCommitSchemaFileProvider.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.github.lppedd.cc.completion.schema
22

33
import com.github.lppedd.cc.CC
4-
import com.github.lppedd.cc.CCBundle
54
import com.intellij.json.JsonFileType
65
import com.intellij.openapi.project.DumbAware
76
import com.intellij.openapi.vfs.VirtualFile
@@ -14,7 +13,7 @@ import com.jetbrains.jsonSchema.extension.SchemaType
1413
*/
1514
internal class ConventionalCommitSchemaFileProvider : JsonSchemaFileProvider, DumbAware {
1615
override fun getName(): String =
17-
CCBundle["cc.language.name"]
16+
"Conventional Commit"
1817

1918
override fun getSchemaFile(): VirtualFile? =
2019
JsonSchemaProviderFactory.getResourceFile(this::class.java, "/defaults/${CC.File.Schema}")

src/main/kotlin/com/github/lppedd/cc/language/ConventionalCommitLanguage.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.github.lppedd.cc.language
22

3-
import com.github.lppedd.cc.CCBundle
43
import com.intellij.lang.Language
54
import com.intellij.openapi.fileTypes.PlainTextLanguage
65

@@ -10,7 +9,7 @@ import com.intellij.openapi.fileTypes.PlainTextLanguage
109
@Suppress("JavaIoSerializableObjectMustHaveReadResolve")
1110
public object ConventionalCommitLanguage : Language(PlainTextLanguage.INSTANCE, "ConventionalCommit") {
1211
override fun getDisplayName(): String =
13-
CCBundle["cc.language.name"]
12+
"Conventional Commit"
1413

1514
override fun isCaseSensitive(): Boolean =
1615
false

src/main/resources/messages/ConventionalCommitBundle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
cc.plugin.name = Conventional Commit
22
cc.plugin.repository = https://github.com/lppedd/idea-conventional-commit
33

4-
cc.language.name = Conventional Commit
54
cc.language.token.type = Type
65
cc.language.token.scope = Scope
76
cc.language.token.subject = Subject

src/main/resources/messages/ConventionalCommitBundle_zh_CN.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
cc.plugin.name = Conventional Commit
22
cc.plugin.repository = https://github.com/lppedd/idea-conventional-commit
33

4-
cc.language.name = Conventional Commit
54
cc.language.token.type = \u7C7B\u578B
65
cc.language.token.scope = \u8303\u56F4
76
cc.language.token.subject = \u4E3B\u9898

0 commit comments

Comments
 (0)