Achievements
Uso
A Predefinição:Achievements mostra a listagem completa de conquistas. Na página: {{Achievements}} uma vez, depois dos blocos PageLang (intro em PT e intro em EN). Não invoque Widget:Achievements direto no artigo. Não use {{#invoke:Achievements|renderTab}} na página (lento).
O que faz
O includeonly envolve só o Widget:Achievements num wrapper data-gla-i18n (grupo achievements, modo client). O widget busca MediaWiki:GlaAchievements.json (action=raw) e monta os cards no cliente.
O chrome (abas, busca, filtros, fita SECRETA) traduz no cliente via gla:langChanged e data-gla-lang. Nomes e descrições dos cards vêm do JSON (pt / en); se não houver en, o texto permanece em português nos dois idiomas.
Recompensas: chips .item-wrapper com ident + quantidade. Na listagem, o Widget:Achievements monta o HTML no cliente; Widget:Item (ícone/tooltip) e Widget:ItemChip (CSS da fileira) hidratam. O Módulo:ItemChip monta HTML/qty nos caminhos Lua: Módulo:Achievements (renderTab legado, require("Módulo:ItemChip")) e Predefinição:Achievement.
Deep link
Âncora em inglês, idioma no final: #Quests#PT, #Chests#EN. Slugs: General, Characters, Quests (alias Quest), Chests, Navigation, PvP, PvE, Colosseum, Poneglyph, Referral, Mobile, BossRush. Trocar a aba usa history.replaceState. O toggle PT/EN no MediaWiki:Common.js preserva o slug da categoria.
Páginas
| Grupo | Página | Função |
|---|---|---|
| Principal | Predefinição:Achievements | {{Achievements}} + wrapper i18n |
| Widget:Achievements | UI, abas, busca, cards no cliente, textos PT/EN | |
| MediaWiki:GlaAchievements.json | Índice leve (action=raw)
| |
| Módulo:AchievementsDB | Dados (export Lua; o índice JSON sai no mesmo export) | |
| Apoio | Módulo:Achievements | renderTab / renderRest (debug/legado; a página oficial não invoca)
|
| Predefinição:Achievement | Card avulso em artigo | |
| Módulo:ItemChip | HTML/qty dos chips no Lua (require em Módulo:Achievements e Módulo:Achievement)
| |
| Widget:ItemChip | CSS da fileira de chips | |
| Widget:Item | Ícone e tooltip dos chips | |
| Predefinição:Reward | Recompensa avulsa | |
| MediaWiki:Common.js | Toggle PT/EN (glaLang / gla:langChanged)
|
O que editar quando
- Dados (nome, aba, reward, oculta, spoiler)
- Exportar Módulo:AchievementsDB (o editor também publica MediaWiki:GlaAchievements.json), depois purge
- Layout, abas, busca, filtros, textos PT/EN, dark mode
- Widget:Achievements, purge
- Item novo na recompensa
- Cadastrar no editor (Itens) antes do AchievementsDB
- CSS ou JS do ícone / tooltip dos chips
- Widget:Item, purge
- CSS da fileira de chips
- Widget:ItemChip, purge
- HTML do chip / quantidade (card avulso e
renderTablegado) - Módulo:ItemChip, purge
- Dados do item (nome, ícone)
- Módulo:ItemDB
- Toggle global PT/EN
- MediaWiki:Common.js / MediaWiki:Common.css
Usage
Predefinição:Achievements lists every achievement. On the article, call {{Achievements}} once, after the PageLang blocks (PT intro and EN intro). Do not invoke Widget:Achievements directly. Do not put {{#invoke:Achievements|renderTab}} on the article (slow).
What it does
The includeonly wraps only Widget:Achievements in a data-gla-i18n wrapper (group achievements, mode client). The widget fetches MediaWiki:GlaAchievements.json (action=raw) and builds the cards on the client.
Chrome (tabs, search, filters, SECRET ribbon) switches on the client via gla:langChanged and data-gla-lang. Card names and descriptions come from the JSON (pt / en); if en is missing, the Portuguese text stays in both languages.
Rewards: .item-wrapper chips with ident + qty. On the listing, Widget:Achievements builds the HTML on the client; Widget:Item (icon/tooltip) and Widget:ItemChip (row CSS) hydrate. Módulo:ItemChip builds HTML/qty on Lua paths: Módulo:Achievements (legacy renderTab, require("Módulo:ItemChip")) and Predefinição:Achievement.
Deep link
English anchor, language last: #Quests#PT, #Chests#EN. Slugs: General, Characters, Quests (alias Quest), Chests, Navigation, PvP, PvE, Colosseum, Poneglyph, Referral, Mobile, BossRush. Tab changes use history.replaceState. The PT/EN toggle in MediaWiki:Common.js keeps the category slug.
Pages
| Group | Page | Role |
|---|---|---|
| Main | Predefinição:Achievements | {{Achievements}} + i18n wrapper |
| Widget:Achievements | UI, tabs, search, client-side cards, PT/EN strings | |
| MediaWiki:GlaAchievements.json | Light index (action=raw)
| |
| Módulo:AchievementsDB | Data (Lua export; the JSON index is published in the same export) | |
| Support | Módulo:Achievements | renderTab / renderRest (debug/legacy; the official page does not invoke them)
|
| Predefinição:Achievement | Standalone card | |
| Módulo:ItemChip | Chip HTML/qty in Lua (require in Módulo:Achievements and Módulo:Achievement)
| |
| Widget:ItemChip | Chip row CSS | |
| Widget:Item | Chip icon and tooltip | |
| Predefinição:Reward | Standalone reward | |
| MediaWiki:Common.js | PT/EN toggle (glaLang / gla:langChanged)
|
What to edit
- Data (name, tab, reward, hidden, spoiler)
- Export Módulo:AchievementsDB (the editor also publishes MediaWiki:GlaAchievements.json), then purge
- Layout, tabs, search, filters, PT/EN chrome, dark mode
- Widget:Achievements, then purge
- New reward item
- Register it in the item editor before AchievementsDB
- Chip icon / tooltip CSS or JS
- Widget:Item, then purge
- Chip row CSS
- Widget:ItemChip, then purge
- Chip HTML / qty (standalone card and legacy
renderTab) - Módulo:ItemChip, then purge
- Item data (name, icon)
- Módulo:ItemDB
- Global PT/EN toggle
- MediaWiki:Common.js / MediaWiki:Common.css