Module:AbilityHints: Difference between revisions

Use Data:Dictionary keys for hint tooltips instead of hardcoded English (with help from vergir-bot LLM)
Use the standard interacts text for the enhanced state (with help from vergir-bot LLM)
 
(One intermediate revision by one other user not shown)
Line 22: Line 22:
-- Tooltip wording for a manually placed icon, keyed by its iconbox state. Each entry
-- Tooltip wording for a manually placed icon, keyed by its iconbox state. Each entry
-- takes the item title as {{{1}}}, so translations can put the object where their
-- takes the item title as {{{1}}}, so translations can put the object where their
-- grammar wants it rather than always after the verb.
-- grammar wants it rather than always after the verb. The enhanced state has no entry
-- of its own: the glow already marks it, so it falls through to the normal wording.
local STATE_DICT_KEYS = {
local STATE_DICT_KEYS = {
     normal  = "AbilityHintsInteracts",
     normal  = "AbilityHintsInteracts",
Line 88: Line 89:
         dict_key = STATE_DICT_KEYS.partial
         dict_key = STATE_DICT_KEYS.partial
         partial = true
         partial = true
    elseif m.state == 'enhanced' then
        cls = cls .. ' ability-hint--enhanced'
     end
     end
     local tip = dictionary.translate(dict_key, nil, nil, { m.title })
     local tip = dictionary.translate(dict_key, nil, nil, { m.title })