Module:AbilityHints: Difference between revisions

Vergir (talk | contribs)
Support the "enhanced" iconbox state on manually placed hints (with help from vergir-bot LLM)
Use the standard interacts text for the enhanced state (with help from vergir-bot LLM)
 
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",
     disabled = "AbilityHintsInteractsNot",
     disabled = "AbilityHintsInteractsNot",
     partial  = "AbilityHintsInteractsPartial",
     partial  = "AbilityHintsInteractsPartial",
    enhanced = "AbilityHintsInteractsEnhanced",
}
}


Line 91: Line 91:
     elseif m.state == 'enhanced' then
     elseif m.state == 'enhanced' then
         cls = cls .. ' ability-hint--enhanced'
         cls = cls .. ' ability-hint--enhanced'
        dict_key = STATE_DICT_KEYS.enhanced
     end
     end
     local tip = dictionary.translate(dict_key, nil, nil, { m.title })
     local tip = dictionary.translate(dict_key, nil, nil, { m.title })