i18n: rewrite bundles with AbstractKotlinBundle

This commit is contained in:
Dmitry Gridin
2020-02-19 16:10:36 +07:00
parent 35f4ff000b
commit dd6abec660
8 changed files with 4 additions and 42 deletions
@@ -9,7 +9,6 @@ import com.intellij.psi.codeStyle.CodeStyleSettings
import com.intellij.psi.codeStyle.CommonCodeStyleSettings import com.intellij.psi.codeStyle.CommonCodeStyleSettings
import org.jetbrains.kotlin.idea.KotlinLanguage import org.jetbrains.kotlin.idea.KotlinLanguage
import org.jetbrains.kotlin.idea.core.formatter.KotlinCodeStyleSettings import org.jetbrains.kotlin.idea.core.formatter.KotlinCodeStyleSettings
import org.jetbrains.kotlin.idea.util.KotlinFormatterBundle
class KotlinObsoleteCodeStyle : KotlinPredefinedCodeStyle(CODE_STYLE_TITLE, KotlinLanguage.INSTANCE) { class KotlinObsoleteCodeStyle : KotlinPredefinedCodeStyle(CODE_STYLE_TITLE, KotlinLanguage.INSTANCE) {
override val codeStyleId: String = CODE_STYLE_ID override val codeStyleId: String = CODE_STYLE_ID
@@ -9,7 +9,6 @@ import com.intellij.psi.codeStyle.CodeStyleSettings
import com.intellij.psi.codeStyle.CommonCodeStyleSettings import com.intellij.psi.codeStyle.CommonCodeStyleSettings
import org.jetbrains.kotlin.idea.KotlinLanguage import org.jetbrains.kotlin.idea.KotlinLanguage
import org.jetbrains.kotlin.idea.core.formatter.KotlinCodeStyleSettings import org.jetbrains.kotlin.idea.core.formatter.KotlinCodeStyleSettings
import org.jetbrains.kotlin.idea.util.KotlinFormatterBundle
class KotlinStyleGuideCodeStyle : KotlinPredefinedCodeStyle("Kotlin style guide", KotlinLanguage.INSTANCE) { class KotlinStyleGuideCodeStyle : KotlinPredefinedCodeStyle("Kotlin style guide", KotlinLanguage.INSTANCE) {
override val codeStyleId: String = CODE_STYLE_ID override val codeStyleId: String = CODE_STYLE_ID
@@ -1,18 +0,0 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.idea.util
import com.intellij.AbstractBundle
import org.jetbrains.annotations.NonNls
import org.jetbrains.annotations.PropertyKey
@NonNls
private const val BUNDLE = "messages.KotlinFormatterBundle"
object KotlinFormatterBundle : AbstractBundle(BUNDLE) {
@JvmStatic
fun message(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any): String = getMessage(key, *params)
}
@@ -1,18 +0,0 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.util
import com.intellij.AbstractBundle
import org.jetbrains.annotations.NonNls
import org.jetbrains.annotations.PropertyKey
@NonNls
private const val BUNDLE = "messages.KotlinIdeCommonBundle"
object KotlinIdeCommonBundle : AbstractBundle(BUNDLE) {
@JvmStatic
fun message(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any): String = getMessage(key, *params)
}
@@ -5,14 +5,14 @@
package org.jetbrains.kotlin.idea.core.util package org.jetbrains.kotlin.idea.core.util
import com.intellij.AbstractBundle
import org.jetbrains.annotations.NonNls import org.jetbrains.annotations.NonNls
import org.jetbrains.annotations.PropertyKey import org.jetbrains.annotations.PropertyKey
import org.jetbrains.kotlin.util.AbstractKotlinBundle
@NonNls @NonNls
private const val BUNDLE = "messages.KotlinIdeaCoreBundle" private const val BUNDLE = "messages.KotlinIdeaCoreBundle"
object KotlinIdeaCoreBundle : AbstractBundle(BUNDLE) { object KotlinIdeaCoreBundle : AbstractKotlinBundle(BUNDLE) {
@JvmStatic @JvmStatic
fun message(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any): String = getMessage(key, *params) fun message(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any): String = getMessage(key, *params)
} }
@@ -5,14 +5,14 @@
package org.jetbrains.kotlin.idea package org.jetbrains.kotlin.idea
import com.intellij.AbstractBundle
import org.jetbrains.annotations.NonNls import org.jetbrains.annotations.NonNls
import org.jetbrains.annotations.PropertyKey import org.jetbrains.annotations.PropertyKey
import org.jetbrains.kotlin.util.AbstractKotlinBundle
@NonNls @NonNls
private const val BUNDLE = "messages.KotlinIdeaGradleBundle" private const val BUNDLE = "messages.KotlinIdeaGradleBundle"
object KotlinIdeaGradleBundle : AbstractBundle(BUNDLE) { object KotlinIdeaGradleBundle : AbstractKotlinBundle(BUNDLE) {
@JvmStatic @JvmStatic
fun message(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any): String = getMessage(key, *params) fun message(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any): String = getMessage(key, *params)
} }