Add localization via AceLocale.
This commit is contained in:
parent
8f02f9760e
commit
d607cdb3b6
12 changed files with 67 additions and 18 deletions
1
.pkgmeta
1
.pkgmeta
|
@ -8,6 +8,7 @@ externals:
|
|||
Libs/AceConfig-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk
|
||||
Libs/AceDB-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceDB-3.0
|
||||
Libs/AceEvent-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceEvent-3.0
|
||||
Libs/AceLocale-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceLocale-3.0
|
||||
Libs/LibBabble-Zone-3.0: svn://svn.wowace.com/wow/libbabble-zone-3-0/mainline/trunk
|
||||
Libs/LibQTip-1.0: svn://svn.wowace.com/wow/libqtip-1-0/mainline/trunk
|
||||
Libs/LibDBIcon-1.0: svn://svn.wowace.com/wow/libdbicon-1-0/mainline/trunk/LibDBIcon-1.0
|
|
@ -3,6 +3,9 @@ local core = ChoreTracker
|
|||
local LQT, LDB, LDBIcon, LBZ
|
||||
local db, tooltip, Z, vpResetTime
|
||||
|
||||
-- Localization
|
||||
local L = LibStub('AceLocale-3.0'):GetLocale('ChoreTracker')
|
||||
|
||||
-- Get localized instances
|
||||
LBZ = LibStub('LibBabble-Zone-3.0')
|
||||
Z = LBZ:GetLookupTable()
|
||||
|
@ -17,7 +20,6 @@ local defaults = {
|
|||
sortDirection = 1,
|
||||
vertSortDirection = 1,
|
||||
vpPos = 1,
|
||||
-- Change table? ['Baradin Hold'] = { abbreviation = 'BH', enable = true }
|
||||
instances = {
|
||||
[Z['Baradin Hold']] = { abbreviation = 'BH', enable = true, removed = false, },
|
||||
[Z['Firelands']] = { abbreviation = 'FL', enable = true, removed = false, },
|
||||
|
@ -33,42 +35,42 @@ local options = {
|
|||
type = 'group',
|
||||
args = {
|
||||
general = {
|
||||
name = 'Settings',
|
||||
name = L['Settings'],
|
||||
type = 'group',
|
||||
order = 1,
|
||||
args = {
|
||||
minimap = {
|
||||
name = 'Hide Minimap Icon',
|
||||
desc = 'Removes the icon from your minimap.',
|
||||
name = L['Hide Minimap Icon'],
|
||||
desc = L['Removes the icon from your minimap.'],
|
||||
type = 'toggle',
|
||||
order = 1,
|
||||
get = function(info) return db.profile.minimap.hide end,
|
||||
set = function(info, value) db.profile.minimap.hide = value LDBIcon[value and 'Hide' or 'Show'](LDBIcon, 'ChoreTracker') end,
|
||||
},
|
||||
verticalHeader = {
|
||||
name = 'Vertical Sorting',
|
||||
name = L['Vertical Sorting'],
|
||||
type = 'header',
|
||||
order = 2,
|
||||
},
|
||||
sortType = {
|
||||
name = 'Sort Field',
|
||||
desc = 'Field to sort the tooltip by.',
|
||||
name = L['Sort Field'],
|
||||
desc = L['Field to sort the tooltip by.'],
|
||||
type = 'select',
|
||||
order = 3,
|
||||
values = { 'Character', 'Valor Points', 'Class' },
|
||||
values = { L['Character'], L['Valor Points'], L['Class'] },
|
||||
get = function(info) return db.profile.sortType end,
|
||||
set = function(info, value) db.profile.sortType = value end,
|
||||
},
|
||||
sortingDirection = {
|
||||
name = 'Sorting Direction',
|
||||
desc = 'Which direction to sort.',
|
||||
name = L['Sorting Direction'],
|
||||
desc = L['Which direction to sort.'],
|
||||
type = 'select',
|
||||
order = 4,
|
||||
values = { 'Ascending', 'Descending' },
|
||||
values = { L['Ascending'], L['Descending'] },
|
||||
get = function(info) return db.profile.sortDirection end,
|
||||
set = function(info, value) db.profile.sortDirection = value end,
|
||||
},
|
||||
horizontalHeader = {
|
||||
--[[horizontalHeader = {
|
||||
name = 'Horizontal Sorting',
|
||||
type = 'header',
|
||||
order = 5,
|
||||
|
@ -90,11 +92,11 @@ local options = {
|
|||
values = { 'Ascending', 'Descending' },
|
||||
get = function(info) return db.profile.vertSortDirection end,
|
||||
set = function(info, value) db.profile.vertSortDirection = value end,
|
||||
},
|
||||
},]]--
|
||||
},
|
||||
},
|
||||
instances = {
|
||||
name = 'Instances',
|
||||
name = L['Instances'],
|
||||
type = 'group',
|
||||
order = 2,
|
||||
args = {
|
||||
|
@ -241,8 +243,8 @@ end
|
|||
function core:DrawInstanceOptions()
|
||||
options.args.instances.args = {
|
||||
instance = {
|
||||
name = 'Add instance to track.',
|
||||
desc = 'Enter an instance on a lockout that you would like ChoreTracker to track.',
|
||||
name = L['Add instance to track.'],
|
||||
desc = L['Enter an instance on a lockout that you would like ChoreTracker to track.'],
|
||||
type = 'input',
|
||||
order = 1,
|
||||
set = function(info, value)
|
||||
|
@ -259,7 +261,7 @@ function core:DrawInstanceOptions()
|
|||
end,
|
||||
},
|
||||
instancesHeader = {
|
||||
name = 'Instances',
|
||||
name = L['Instances'],
|
||||
type = 'header',
|
||||
order = 2,
|
||||
},
|
||||
|
@ -287,7 +289,7 @@ function core:DrawInstanceOptions()
|
|||
}
|
||||
options.args.instances.args[instance .. 'Remove'] = {
|
||||
type = 'execute',
|
||||
name = 'Remove',
|
||||
name = L['Remove'],
|
||||
order = 4 * i + 2,
|
||||
width = 'half',
|
||||
confirm = true,
|
||||
|
|
|
@ -14,9 +14,20 @@ Libs\AceConsole-3.0\AceConsole-3.0.xml
|
|||
Libs\AceConfig-3.0\AceConfig-3.0.xml
|
||||
Libs\AceDB-3.0\AceDB-3.0.xml
|
||||
Libs\AceEvent-3.0\AceEvent-3.0.xml
|
||||
Libs\AceLocale-3.0\AceLocale-3.0.xml
|
||||
Libs\LibBabble-Zone-3.0\lib.xml
|
||||
Libs\LibDataBroker-1.1\LibDataBroker-1.1.lua
|
||||
Libs\LibDBIcon-1.0\LibDBIcon-1.0.lua
|
||||
Libs\LibQTip-1.0\lib.xml
|
||||
|
||||
Locale\enUS.lua
|
||||
Locale\deDE.lua
|
||||
Locale\esES.lua
|
||||
Locale\esMX.lua
|
||||
Locale\frFR.lua
|
||||
Locale\koKR.lua
|
||||
Locale\ruRU.lua
|
||||
Locale\zhCN.lua
|
||||
Locale\zhTW.lua
|
||||
|
||||
ChoreTracker.lua
|
4
Locale/deDE.lua
Normal file
4
Locale/deDE.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
local L = LibStub("AceLocale-3.0"):NewLocale("BalerocHealers", "deDE")
|
||||
if not L then return end
|
||||
|
||||
--@localization(locale="deDE", format="lua_additive_table", handle-subnamespaces="concat")@
|
3
Locale/enUS.lua
Normal file
3
Locale/enUS.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
local L = LibStub('AceLocale-3.0'):NewLocale('ChoreTracker', 'enUS', true, true)
|
||||
|
||||
--@localization(locale='enUS', format='lua_additive_table', same-key-is-true=true, handle-subnamespaces='concat')@
|
4
Locale/esES.lua
Normal file
4
Locale/esES.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
local L = LibStub("AceLocale-3.0"):NewLocale("BalerocHealers", "esES")
|
||||
if not L then return end
|
||||
|
||||
--@localization(locale="esES", format="lua_additive_table", handle-subnamespaces="concat")@
|
4
Locale/esMX.lua
Normal file
4
Locale/esMX.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
local L = LibStub("AceLocale-3.0"):NewLocale("BalerocHealers", "esMX")
|
||||
if not L then return end
|
||||
|
||||
--@localization(locale="esMX", format="lua_additive_table", handle-subnamespaces="concat")@
|
4
Locale/frFR.lua
Normal file
4
Locale/frFR.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
local L = LibStub("AceLocale-3.0"):NewLocale("BalerocHealers", "frFR")
|
||||
if not L then return end
|
||||
|
||||
--@localization(locale="frFR", format="lua_additive_table", handle-subnamespaces="concat")@
|
4
Locale/koKR.lua
Normal file
4
Locale/koKR.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
local L = LibStub("AceLocale-3.0"):NewLocale("BalerocHealers", "koKR")
|
||||
if not L then return end
|
||||
|
||||
--@localization(locale="koKR", format="lua_additive_table", handle-subnamespaces="concat")@
|
4
Locale/ruRU.lua
Normal file
4
Locale/ruRU.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
local L = LibStub("AceLocale-3.0"):NewLocale("BalerocHealers", "ruRU")
|
||||
if not L then return end
|
||||
|
||||
--@localization(locale="ruRU", format="lua_additive_table", handle-subnamespaces="concat")@
|
4
Locale/zhCN.lua
Normal file
4
Locale/zhCN.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
local L = LibStub("AceLocale-3.0"):NewLocale("BalerocHealers", "zhCN")
|
||||
if not L then return end
|
||||
|
||||
--@localization(locale="zhCN", format="lua_additive_table", handle-subnamespaces="concat")@
|
4
Locale/zhTW.lua
Normal file
4
Locale/zhTW.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
local L = LibStub("AceLocale-3.0"):NewLocale("BalerocHealers", "zhTW")
|
||||
if not L then return end
|
||||
|
||||
--@localization(locale="zhTW", format="lua_additive_table", handle-subnamespaces="concat")@
|
Loading…
Reference in a new issue