i18n: Add bundle for idea-native

This commit is contained in:
Yan Zhulanow
2020-02-18 22:25:56 +09:00
committed by Dmitry Gridin
parent 2702be564a
commit f1d21b02e9
4 changed files with 33 additions and 3 deletions
@@ -0,0 +1,4 @@
kotlin.native.metadata.short=Kotlin/Native Metadata
kotlin.native.definitions.short=Kotlin/Native Def
kotlin.native.definitions.description=Definitions file for Kotlin/Native C interoperability
@@ -0,0 +1,24 @@
/*
* 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.ide.konan
import com.intellij.CommonBundle
import org.jetbrains.annotations.NonNls
import org.jetbrains.annotations.PropertyKey
import org.jetbrains.kotlin.idea.core.util.KotlinBundleBase
import java.util.*
object KotlinNativeBundle : KotlinBundleBase() {
@NonNls
private const val BUNDLE = "org.jetbrains.kotlin.ide.konan.KotlinNativeBundle"
override fun createBundle(): ResourceBundle = ResourceBundle.getBundle(BUNDLE)
@JvmStatic
fun message(@NonNls @PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any?): String {
return CommonBundle.message(bundle, key, *params)
}
}
@@ -24,8 +24,9 @@ import org.jetbrains.kotlin.idea.KotlinIcons
const val KOTLIN_NATIVE_DEFINITIONS_FILE_EXTENSION = "def"
const val KOTLIN_NATIVE_DEFINITIONS_ID = "KND"
const val KOTLIN_NATIVE_DEFINITIONS_NAME = "Kotlin/Native Def"
const val KOTLIN_NATIVE_DEFINITIONS_DESCRIPTION = "Definitions file for Kotlin/Native C interop"
val KOTLIN_NATIVE_DEFINITIONS_NAME = KotlinNativeBundle.message("kotlin.native.definitions.short")
val KOTLIN_NATIVE_DEFINITIONS_DESCRIPTION = KotlinNativeBundle.message("kotlin.native.definitions.description")
object NativeDefinitionsFileType : LanguageFileType(NativeDefinitionsLanguage.INSTANCE) {
@@ -7,11 +7,12 @@ package org.jetbrains.kotlin.ide.konan.decompiler
import com.intellij.openapi.fileTypes.FileType
import com.intellij.openapi.vfs.VirtualFile
import org.jetbrains.kotlin.ide.konan.KotlinNativeBundle
import org.jetbrains.kotlin.library.KLIB_METADATA_FILE_EXTENSION
object KotlinNativeMetaFileType : FileType {
override fun getName() = "KNM"
override fun getDescription() = "Kotlin/Native Metadata"
override fun getDescription() = KotlinNativeBundle.message("kotlin.native.metadata.short")
override fun getDefaultExtension() = KLIB_METADATA_FILE_EXTENSION
override fun getIcon(): Nothing? = null
override fun isBinary() = true