ThingEngineering / choretracker

WoW addon for keeping track of chores
MIT License
5 stars 9 forks source link

[Bug] Localization funtionality does not work #18

Closed Sefank closed 2 months ago

Sefank commented 2 months ago

I'm trying to translate the text built-in this addon. After looking into the source, I'd expected that add a translation file of Locales/enUS.lua (Locales/zhCN.lua in my case) would be good enough, but it does not work at all.

I'm not familiar with the addon development. Can anyone help me to figure out what's the problem and how to fix it?

In case you're curious, the translation file woule be something like the following (partially, for demo purpose, it's still WIP) :

local L = LibStub('AceLocale-3.0'):NewLocale('ChoreTracker', 'zhCN', true, true)

L['key_binding:toggle'] = '开关 ChoreTracker 窗口'

L['option:appearance'] = '外观'
L['option:appearance:backgroundColor'] = '背景颜色'
L['option:appearance:borderColor'] = '边框颜色'
L['option:appearance:strata'] = '显示图层'