1
0
Fork 0

Add localization via AceLocale.

This commit is contained in:
Andrew Tomaka 2011-09-23 06:36:34 -04:00
parent 8f02f9760e
commit d607cdb3b6
12 changed files with 67 additions and 18 deletions

View file

@ -8,6 +8,7 @@ externals:
Libs/AceConfig-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk 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/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/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/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/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 Libs/LibDBIcon-1.0: svn://svn.wowace.com/wow/libdbicon-1-0/mainline/trunk/LibDBIcon-1.0

View file

@ -3,6 +3,9 @@ local core = ChoreTracker
local LQT, LDB, LDBIcon, LBZ local LQT, LDB, LDBIcon, LBZ
local db, tooltip, Z, vpResetTime local db, tooltip, Z, vpResetTime
-- Localization
local L = LibStub('AceLocale-3.0'):GetLocale('ChoreTracker')
-- Get localized instances -- Get localized instances
LBZ = LibStub('LibBabble-Zone-3.0') LBZ = LibStub('LibBabble-Zone-3.0')
Z = LBZ:GetLookupTable() Z = LBZ:GetLookupTable()
@ -17,7 +20,6 @@ local defaults = {
sortDirection = 1, sortDirection = 1,
vertSortDirection = 1, vertSortDirection = 1,
vpPos = 1, vpPos = 1,
-- Change table? ['Baradin Hold'] = { abbreviation = 'BH', enable = true }
instances = { instances = {
[Z['Baradin Hold']] = { abbreviation = 'BH', enable = true, removed = false, }, [Z['Baradin Hold']] = { abbreviation = 'BH', enable = true, removed = false, },
[Z['Firelands']] = { abbreviation = 'FL', enable = true, removed = false, }, [Z['Firelands']] = { abbreviation = 'FL', enable = true, removed = false, },
@ -33,42 +35,42 @@ local options = {
type = 'group', type = 'group',
args = { args = {
general = { general = {
name = 'Settings', name = L['Settings'],
type = 'group', type = 'group',
order = 1, order = 1,
args = { args = {
minimap = { minimap = {
name = 'Hide Minimap Icon', name = L['Hide Minimap Icon'],
desc = 'Removes the icon from your minimap.', desc = L['Removes the icon from your minimap.'],
type = 'toggle', type = 'toggle',
order = 1, order = 1,
get = function(info) return db.profile.minimap.hide end, 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, set = function(info, value) db.profile.minimap.hide = value LDBIcon[value and 'Hide' or 'Show'](LDBIcon, 'ChoreTracker') end,
}, },
verticalHeader = { verticalHeader = {
name = 'Vertical Sorting', name = L['Vertical Sorting'],
type = 'header', type = 'header',
order = 2, order = 2,
}, },
sortType = { sortType = {
name = 'Sort Field', name = L['Sort Field'],
desc = 'Field to sort the tooltip by.', desc = L['Field to sort the tooltip by.'],
type = 'select', type = 'select',
order = 3, order = 3,
values = { 'Character', 'Valor Points', 'Class' }, values = { L['Character'], L['Valor Points'], L['Class'] },
get = function(info) return db.profile.sortType end, get = function(info) return db.profile.sortType end,
set = function(info, value) db.profile.sortType = value end, set = function(info, value) db.profile.sortType = value end,
}, },
sortingDirection = { sortingDirection = {
name = 'Sorting Direction', name = L['Sorting Direction'],
desc = 'Which direction to sort.', desc = L['Which direction to sort.'],
type = 'select', type = 'select',
order = 4, order = 4,
values = { 'Ascending', 'Descending' }, values = { L['Ascending'], L['Descending'] },
get = function(info) return db.profile.sortDirection end, get = function(info) return db.profile.sortDirection end,
set = function(info, value) db.profile.sortDirection = value end, set = function(info, value) db.profile.sortDirection = value end,
}, },
horizontalHeader = { --[[horizontalHeader = {
name = 'Horizontal Sorting', name = 'Horizontal Sorting',
type = 'header', type = 'header',
order = 5, order = 5,
@ -90,11 +92,11 @@ local options = {
values = { 'Ascending', 'Descending' }, values = { 'Ascending', 'Descending' },
get = function(info) return db.profile.vertSortDirection end, get = function(info) return db.profile.vertSortDirection end,
set = function(info, value) db.profile.vertSortDirection = value end, set = function(info, value) db.profile.vertSortDirection = value end,
}, },]]--
}, },
}, },
instances = { instances = {
name = 'Instances', name = L['Instances'],
type = 'group', type = 'group',
order = 2, order = 2,
args = { args = {
@ -241,8 +243,8 @@ end
function core:DrawInstanceOptions() function core:DrawInstanceOptions()
options.args.instances.args = { options.args.instances.args = {
instance = { instance = {
name = 'Add instance to track.', name = L['Add instance to track.'],
desc = 'Enter an instance on a lockout that you would like ChoreTracker to track.', desc = L['Enter an instance on a lockout that you would like ChoreTracker to track.'],
type = 'input', type = 'input',
order = 1, order = 1,
set = function(info, value) set = function(info, value)
@ -259,7 +261,7 @@ function core:DrawInstanceOptions()
end, end,
}, },
instancesHeader = { instancesHeader = {
name = 'Instances', name = L['Instances'],
type = 'header', type = 'header',
order = 2, order = 2,
}, },
@ -287,7 +289,7 @@ function core:DrawInstanceOptions()
} }
options.args.instances.args[instance .. 'Remove'] = { options.args.instances.args[instance .. 'Remove'] = {
type = 'execute', type = 'execute',
name = 'Remove', name = L['Remove'],
order = 4 * i + 2, order = 4 * i + 2,
width = 'half', width = 'half',
confirm = true, confirm = true,

View file

@ -14,9 +14,20 @@ Libs\AceConsole-3.0\AceConsole-3.0.xml
Libs\AceConfig-3.0\AceConfig-3.0.xml Libs\AceConfig-3.0\AceConfig-3.0.xml
Libs\AceDB-3.0\AceDB-3.0.xml Libs\AceDB-3.0\AceDB-3.0.xml
Libs\AceEvent-3.0\AceEvent-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\LibBabble-Zone-3.0\lib.xml
Libs\LibDataBroker-1.1\LibDataBroker-1.1.lua Libs\LibDataBroker-1.1\LibDataBroker-1.1.lua
Libs\LibDBIcon-1.0\LibDBIcon-1.0.lua Libs\LibDBIcon-1.0\LibDBIcon-1.0.lua
Libs\LibQTip-1.0\lib.xml 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 ChoreTracker.lua

4
Locale/deDE.lua Normal file
View 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
View 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
View 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
View 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
View 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
View 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
View 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
View 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
View 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")@