From bde5dc98ad96546b59e91f5a6e552bf80cbf48e4 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Thu, 24 Aug 2023 14:42:12 +0200 Subject: translations and error handling --- resources/js/classes/Area.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'resources/js/classes/Area.js') diff --git a/resources/js/classes/Area.js b/resources/js/classes/Area.js index e8d7acc..f518f22 100644 --- a/resources/js/classes/Area.js +++ b/resources/js/classes/Area.js @@ -12,7 +12,11 @@ class Area { async initialize () {} get name () { - return DB.areas[this.slug].name; + return translate(this.alternateSlug) || slugToName(this.slug); + } + + get alternateSlug () { + return DB.areas[this.slug]['modules/tuxemon.slug']; } get encounters () { -- cgit v1.2.3