From a24e8594fbbcb3db2ffa5f6ef79384287d551aa6 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Wed, 16 Feb 2022 04:17:40 +0100 Subject: [PATCH] Profiler/Localization * support non-latin realm names for guilds and arena teams also --- includes/types/arenateam.class.php | 2 +- includes/types/guild.class.php | 2 +- static/js/Profiler.js | 4 ++-- static/js/global.js | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/types/arenateam.class.php b/includes/types/arenateam.class.php index 259af976..62ee178c 100644 --- a/includes/types/arenateam.class.php +++ b/includes/types/arenateam.class.php @@ -17,7 +17,7 @@ class ArenaTeamList extends BaseType { $data[$this->id] = array( 'name' => $this->curTpl['name'], - 'realm' => Profiler::urlize($this->curTpl['realmName']), + 'realm' => Profiler::urlize($this->curTpl['realmName'], true), 'realmname' => $this->curTpl['realmName'], // 'battlegroup' => Profiler::urlize($this->curTpl['battlegroup']), // was renamed to subregion somewhere around cata release // 'battlegroupname' => $this->curTpl['battlegroup'], diff --git a/includes/types/guild.class.php b/includes/types/guild.class.php index a91d53f8..2bafc990 100644 --- a/includes/types/guild.class.php +++ b/includes/types/guild.class.php @@ -21,7 +21,7 @@ class GuildList extends BaseType 'faction' => $this->curTpl['faction'], 'achievementpoints' => $this->getField('achievementpoints'), 'gearscore' => $this->getField('gearscore'), - 'realm' => Profiler::urlize($this->curTpl['realmName']), + 'realm' => Profiler::urlize($this->curTpl['realmName'], true), 'realmname' => $this->curTpl['realmName'], // 'battlegroup' => Profiler::urlize($this->curTpl['battlegroup']), // was renamed to subregion somewhere around cata release // 'battlegroupname' => $this->curTpl['battlegroup'], diff --git a/static/js/Profiler.js b/static/js/Profiler.js index ac76f0ed..cee2e61d 100644 --- a/static/js/Profiler.js +++ b/static/js/Profiler.js @@ -1072,7 +1072,7 @@ function Profiler() { $WH.ae(_divLine2, _); _ = $WH.ce('a'); - _.href = '?guild=' + _profile.region[0] + '.' + _profile.realm[0] + '.' + g_urlize(_profile.guild); + _.href = '?guild=' + _profile.region[0] + '.' + _profile.realm[0] + '.' + g_urlize(_profile.guild, true); $WH.ae(_, $WH.ct(_profile.guild)); $WH.ae(_divLine2, _); @@ -1562,7 +1562,7 @@ function Profiler() { $WH.ae(div, $WH.ct($WH.sprintfa(LANG.pr_qf_xvxteam, i))); a = $WH.ce('a'); - a.href = '?arena-team=' + _profile.region[0] + '.' + _profile.realm[0] + '.' + g_urlize(_profile.arenateams[i]); + a.href = '?arena-team=' + _profile.region[0] + '.' + _profile.realm[0] + '.' + g_urlize(_profile.arenateams[i], true); $WH.ae(a, $WH.ct(_profile.arenateams[i])); $WH.ae(div, a); diff --git a/static/js/global.js b/static/js/global.js index 72aab2c8..35985341 100644 --- a/static/js/global.js +++ b/static/js/global.js @@ -15730,7 +15730,7 @@ Listview.templates = { if (profile.guild && typeof(profile.guild) != 'number') { var a = $WH.ce('a'); a.className = 'q1'; - a.href = '?guild=' + profile.region + '.' + profile.realm + '.' + g_urlize(profile.guild); + a.href = '?guild=' + profile.region + '.' + profile.realm + '.' + g_urlize(profile.guild, true); $WH.ae(a, $WH.ct(profile.guild)); $WH.ae(d, $WH.ct('<')); $WH.ae(d, a); @@ -16122,7 +16122,7 @@ Listview.templates = { var a = $WH.ce('a'); a.className = 'q1'; - a.href = '?guild=' + profile.region + '.' + profile.realm + '.' + g_urlize(profile.guild); + a.href = '?guild=' + profile.region + '.' + profile.realm + '.' + g_urlize(profile.guild, true); $WH.ae(a, $WH.ct(profile.guild)); $WH.ae(td, a); }, @@ -16134,10 +16134,10 @@ Listview.templates = { getItemLink: function(profile) { if (profile.size !== undefined) { - return '?arena-team=' + profile.region + '.' + profile.realm + '.' + g_urlize(profile.name); + return '?arena-team=' + profile.region + '.' + profile.realm + '.' + g_urlize(profile.name, true); } else if (profile.members !== undefined) { - return '?guild=' + profile.region + '.' + profile.realm + '.' + g_urlize(profile.name); + return '?guild=' + profile.region + '.' + profile.realm + '.' + g_urlize(profile.name, true); } else { return g_getProfileUrl(profile);