mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:50:33 +08:00
27 lines
672 B
JavaScript
Executable File
27 lines
672 B
JavaScript
Executable File
import IEntity from "./IEntity"
|
|
|
|
export default class LocalizedTextEntity extends IEntity {
|
|
|
|
static lookbehind = "NSLOCTEXT"
|
|
static attributes = {
|
|
namespace: String,
|
|
key: String,
|
|
value: String,
|
|
}
|
|
|
|
constructor(options = {}) {
|
|
super(options)
|
|
/** @type {String} */ this.namespace
|
|
/** @type {String} */ this.key
|
|
/** @type {String} */ this.value
|
|
}
|
|
|
|
toString() {
|
|
if (this.value.length === 0) {
|
|
return this.value
|
|
}
|
|
let result = this.value
|
|
return result.charAt(0).toLocaleUpperCase() + result.slice(1).toLocaleLowerCase()
|
|
}
|
|
}
|