diff options
author | Daniel Weipert <code@drogueronin.de> | 2023-09-01 22:32:45 +0200 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2023-09-01 22:32:45 +0200 |
commit | 1d29ee6d87d3794a9319bca5bf36afdfe176072c (patch) | |
tree | 1e7e89ca87afd313b1806fcc80d456796b0af6db /resources/js/classes | |
parent | 6b3a8aef783368d0ed9a2c104eea3ff5cf9984da (diff) |
translations with fallback
Diffstat (limited to 'resources/js/classes')
-rw-r--r-- | resources/js/classes/Area.js | 2 | ||||
-rw-r--r-- | resources/js/classes/Item.js | 4 | ||||
-rw-r--r-- | resources/js/classes/Monster.js | 2 | ||||
-rw-r--r-- | resources/js/classes/Npc.js | 2 | ||||
-rw-r--r-- | resources/js/classes/StatusEffect.js | 2 | ||||
-rw-r--r-- | resources/js/classes/Technique.js | 4 |
6 files changed, 8 insertions, 8 deletions
diff --git a/resources/js/classes/Area.js b/resources/js/classes/Area.js index bafa949..1b07e35 100644 --- a/resources/js/classes/Area.js +++ b/resources/js/classes/Area.js @@ -9,7 +9,7 @@ class Area { } get name () { - return translate(this.alternateSlug) || slugToName(this.slug); + return translate(this.alternateSlug); } get isCompleted () { diff --git a/resources/js/classes/Item.js b/resources/js/classes/Item.js index 40089f2..c70c28a 100644 --- a/resources/js/classes/Item.js +++ b/resources/js/classes/Item.js @@ -4,11 +4,11 @@ class Item { } get name () { - return translate(this.slug) || slugToName(this.slug); + return translate(this.slug); } get description () { - return translate(`${this.slug}_description`) || 'ITEM_DESCRIPTION_MISSING'; + return translate(`${this.slug}_description`); } get category () { diff --git a/resources/js/classes/Monster.js b/resources/js/classes/Monster.js index c058a75..2d34d8e 100644 --- a/resources/js/classes/Monster.js +++ b/resources/js/classes/Monster.js @@ -124,7 +124,7 @@ class Monster { } get name () { - return translate(this.slug) || slugToName(this.slug); + return translate(this.slug); } /** diff --git a/resources/js/classes/Npc.js b/resources/js/classes/Npc.js index 6121bce..82dba7e 100644 --- a/resources/js/classes/Npc.js +++ b/resources/js/classes/Npc.js @@ -5,7 +5,7 @@ class Npc { constructor (slug) { this.slug = slug; - this.name = translate(slug) || slugToName(slug.replace('spyder_', '')); + this.name = translate(slug); this.spriteName = DB.npcs[slug]?.template[0].sprite_name; } diff --git a/resources/js/classes/StatusEffect.js b/resources/js/classes/StatusEffect.js index d161761..1a164a1 100644 --- a/resources/js/classes/StatusEffect.js +++ b/resources/js/classes/StatusEffect.js @@ -44,7 +44,7 @@ class StatusEffect { } get name () { - return slugToName(this.slug); + return translate(`status_${this.slug}`); } get stats () { diff --git a/resources/js/classes/Technique.js b/resources/js/classes/Technique.js index 5f01e64..0fa31c9 100644 --- a/resources/js/classes/Technique.js +++ b/resources/js/classes/Technique.js @@ -14,11 +14,11 @@ class Technique { } get name () { - return translate(this.slug) || slugToName(this.slug); + return translate(this.slug); } get description () { - return translate(`${this.slug}_description`) || 'TECHNIQUE_DESCRIPTION_MISSING'; + return translate(`${this.slug}_description`); } get types () { |