Profiler/Guilds

* fixed forcing guildnames to string for js
 * made static string localized
This commit is contained in:
Sarjuuk 2018-03-26 21:49:58 +02:00
parent bc834245d7
commit 72c1dacd3f
8 changed files with 12 additions and 14 deletions

View file

@ -16,14 +16,14 @@ class GuildList extends BaseType
foreach ($this->iterate() as $__)
{
$data[$this->id] = array(
'name' => "$'".$this->curTpl['name']."'", // MUST be a string
'name' => '$"'.str_replace ('"', '', $this->curTpl['name']).'"', // MUST be a string, omit any quotes in name
'members' => $this->curTpl['members'],
'faction' => $this->curTpl['faction'],
'achievementpoints' => $this->getField('achievementpoints'),
'gearscore' => $this->getField('gearscore'),
'realm' => Profiler::urlize($this->curTpl['realmName']),
'realmname' => $this->curTpl['realmName'],
// 'battlegroup' => Profiler::urlize($this->curTpl['battlegroup']), // was renamed to subregion somewhere around cata release
// 'battlegroup' => Profiler::urlize($this->curTpl['battlegroup']), // was renamed to subregion somewhere around cata release
// 'battlegroupname' => $this->curTpl['battlegroup'],
'region' => Profiler::urlize($this->curTpl['region'])
);

View file

@ -33,18 +33,17 @@ class ProfileList extends BaseType
'talenttree1' => $this->getField('talenttree1'),
'talenttree2' => $this->getField('talenttree2'),
'talenttree3' => $this->getField('talenttree3'),
'talentspec' => $this->getField('activespec') + 1, // 0 => 1; 1 => 2
'talentspec' => $this->getField('activespec') + 1, // 0 => 1; 1 => 2
'achievementpoints' => $this->getField('achievementpoints'),
'guild' => '$"'.$this->getField('guildname').'"', // force this to be a string
'guild' => '$"'.str_replace ('"', '', $this->curTpl['name']).'"', // force this to be a string
'guildrank' => $this->getField('guildrank'),
'realm' => Profiler::urlize($this->getField('realmName')),
'realmname' => $this->getField('realmName'),
// 'battlegroup' => Profiler::urlize($this->getField('battlegroup')), // was renamed to subregion somewhere around cata release
// 'battlegroup' => Profiler::urlize($this->getField('battlegroup')), // was renamed to subregion somewhere around cata release
// 'battlegroupname' => $this->getField('battlegroup'),
'gearscore' => $this->getField('gearscore')
);
// for the lv this determins if the link is profile=<id> or profile=<region>.<realm>.<name>
if ($this->isCustom())
$data[$this->id]['published'] = (int)!!($this->getField('cuFlags') & PROFILER_CU_PUBLISHED);
@ -92,7 +91,7 @@ class ProfileList extends BaseType
$title = (new TitleList(array(['bitIdx', $_])))->getField($this->getField('gender') ? 'female' : 'male', true);
if ($this->isCustom())
$name .= ' (Custom Profile)';
$name .= Lang::profiler('customProfile');
else if ($title)
$name = sprintf($title, $name);

View file

@ -156,7 +156,7 @@ $lang = array(
'_cpFooter' => "Falls Ihr eine genauere Suche möchtet, probiert unsere <a href=\"?profiles\">erweiterten Suchoptionen</a>. Ihr könnt außerdem ein <a href=\"?profile&amp;new\">neues individuelles Profil</a> erstellen.",
'firstUseTitle' => "%s von %s",
'complexFilter' => "Komplexer Filter ausgewählt! Suchergebnisse sind auf gecachte Charaktere beschränkt.",
'customProfile' => " (Benutzerprofil)",
'resync' => "Resynchronisieren",
'guildRoster' => "Gildenliste für &lt;%s&gt;",
'arenaRoster' => "Arena-Teamliste für &lt;%s&gt",

View file

@ -156,7 +156,7 @@ $lang = array(
'_cpFooter' => "If you want a more refined search try out our <a href=\"?profiles\">advanced search</a> options. You can also create a <a href=\"?profile&amp;new\">new custom profile</a>.",
'firstUseTitle' => "%s of %s",
'complexFilter' => "Complex filter selected! Search results are limited to cached Characters.",
'customProfile' => " (Custom Profile)",
'resync' => "Resync",
'guildRoster' => "Guild Roster for &lt;%s&gt;",
'arenaRoster' => "Arena Team Roster for &lt;%s&gt",

View file

@ -156,7 +156,7 @@ $lang = array(
'_cpFooter' => "Si quieres una búsqueda más refinada, prueba con nuestras opciones de <a href=\"?profiles\">búsqueda avanzada</a>. También puedes crear un <a href=\"?profile&amp;new\">perfil nuevo personalizado</a>.",
'firstUseTitle' => "%s de %s",
'complexFilter' => "[Complex filter selected! Search results are limited to cached Characters.]",
'customProfile' => " ([Custom Profile])",
'resync' => "Resincronizar",
'guildRoster' => "Lista de miembros de hermandad para &lt;%s&gt",
'arenaRoster' => "Personajes del Equipo de Arena para &lt;%s&gt",

View file

@ -156,7 +156,7 @@ $lang = array(
'_cpFooter' => "Si vous voulez une recherche plus raffinée, essayez nos options de <a href=\"?profiles\">recherche avancée</a>. Vous pouvez aussi créer un <a href=\"?profile&amp;new\">nouveau profile personnalisé</a>.",
'firstUseTitle' => "%s de %s",
'complexFilter' => "[Complex filter selected! Search results are limited to cached Characters.]",
'customProfile' => " ([Custom Profile])",
'resync' => "Resynchronisation",
'guildRoster' => "Liste des membres pour la guilde de &lt;%s&gt",
'arenaRoster' => "[Arena Team Roster for &lt;%s&gt]", // string probably lost

View file

@ -156,7 +156,7 @@ $lang = array(
'_cpFooter' => "Если вам нужен более точный поиск, вы можете использовать <a href=\"?profiles\">дополнительные опции</a>. Также, вы можете создать <a href=\"?profile&amp;new\">новый собственный профиль</a>.",
'firstUseTitle' => "%s", // yes, thats correct. No nonsense, just the name
'complexFilter' => "[Complex filter selected! Search results are limited to cached Characters.]",
'customProfile' => " ([Custom Profile])",
'resync' => "Ресинхронизация",
'guildRoster' => "Список членов гильдии &lt;%s&gt",
'arenaRoster' => "[Arena Team Roster for &lt;%s&gt]", // string probably lost

View file

@ -164,13 +164,12 @@ class ProfilePage extends GenericPage
$ra = $this->subject->getField('race');
$cl = $this->subject->getField('class');
$gender = $this->subject->getField('gender');
// $desc = $this->subject->getField('description');
$title = '';
if ($_ = $this->subject->getField('chosenTitle'))
$title = (new TitleList(array(['bitIdx', $_])))->getField($gender ? 'female' : 'male', true);
if ($this->isCustom)
$name .= ' (Custom Profile)';
$name .= Lang::profiler('customProfile');
else if ($title)
$name = sprintf($title, $name);