gradle-josm-plugin / org.openstreetmap.josm.gradle.plugin.i18n.io / MsgId

MsgId

data class MsgId

A translatable string (MsgStr) in the base language with an optional String context.

Parameters

id - the string (optonally with plural versions) to be translated

context - an optional context with additional information for which situations the string should be translated (e.g. for disambiguation of multiple identicals strings that should be translated differently in different situations)

Constructors

<init>

MsgId(id: MsgStr, context: String? = null)

A translatable string (MsgStr) in the base language with an optional String context.

Properties

context

val context: String?

an optional context with additional information for which situations the string should be translated (e.g. for disambiguation of multiple identicals strings that should be translated differently in different situations)

id

val id: MsgStr

the string (optonally with plural versions) to be translated

Functions

toByteArray

fun toByteArray(): ByteArray

Converts this object to the default ByteArray representation as used in *.mo files. The id is converted according to MsgStr.toByteArray, it is separated from the context by CONTEXT_SEPARATOR.

Companion Object Properties

CONTEXT_SEPARATOR

const val CONTEXT_SEPARATOR: Char

The 0x04 character that is used by default to separate the context from the id in the ByteArray representation of this object.