Fix: tooltips de wowhead en el idioma de la web (no siempre inglés)

El script de tooltips prioriza el atributo data-wowhead sobre el subdominio del
href, y su parámetro `domain` codifica idioma + versión: el 1.er segmento va al
mapa de locales ({es:6,...}) y el resto a la versión (wotlk=WRATH). Antes se
enviaba `domain=wotlk` (sin idioma) → locale 0 = inglés siempre.

Ahora `wowheadData(type,id,locale)` genera `domain=es.wotlk` en español (locale 6)
y `domain=wotlk` en inglés. Verificado: el endpoint de datos con locale 6 devuelve
los nombres en español.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-14 22:41:58 +00:00
parent 7d1abab9f1
commit 033ebc6861
4 changed files with 23 additions and 11 deletions
@@ -66,7 +66,7 @@ export default async function QuestCharacterPage({ params }: { params: Promise<{
{o.link ? (
<a
href={wowheadUrl(o.link.type as WowheadType, o.link.id, locale)}
data-wowhead={wowheadData(o.link.type as WowheadType, o.link.id)}
data-wowhead={wowheadData(o.link.type as WowheadType, o.link.id, locale)}
target="_blank"
rel="noopener noreferrer"
className="icontinyl"
@@ -96,8 +96,8 @@ export default async function QuestCharacterPage({ params }: { params: Promise<{
<ul>
<li>
{t.rich('quest.hodir', {
hodir: (c) => <a href={wowheadUrl('faction', 1119, locale)} data-wowhead={wowheadData('faction', 1119)} target="_blank" rel="noopener noreferrer">{c}</a>,
lille: (c) => <a href={wowheadUrl('npc', 32540, locale)} data-wowhead={wowheadData('npc', 32540)} target="_blank" rel="noopener noreferrer">{c}</a>,
hodir: (c) => <a href={wowheadUrl('faction', 1119, locale)} data-wowhead={wowheadData('faction', 1119, locale)} target="_blank" rel="noopener noreferrer">{c}</a>,
lille: (c) => <a href={wowheadUrl('npc', 32540, locale)} data-wowhead={wowheadData('npc', 32540, locale)} target="_blank" rel="noopener noreferrer">{c}</a>,
})}
</li>
</ul>