Skip to content

Commit

Permalink
fix: plus double talent
Browse files Browse the repository at this point in the history
  • Loading branch information
DengSir committed Apr 12, 2024
1 parent a41832b commit bb3c196
Show file tree
Hide file tree
Showing 16 changed files with 100 additions and 158 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: 'Generate data'
on:
push:
branches:
- 'master'
tags-ignore:
- 'v*'

jobs:
data:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: true

- uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Generate talents
run: deno task talent

- name: Generate itemset
run: deno task itemset

- name: Generate glyph
run: deno task glyph

- uses: EndBug/add-and-commit@v9
with:
message: 'chore: Update data files'
5 changes: 2 additions & 3 deletions .github/workflows/locale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
with:
token: ${{ secrets.CURSE_TOKEN }}

- uses: GuillaumeFalourd/[email protected]
- uses: EndBug/add-and-commit@v9
with:
commit_message: "chore: Update locale files"
tags: false
message: 'chore: Update locale files'
13 changes: 4 additions & 9 deletions Core/Encoder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,9 @@ end

function Encoder:UnpackRunes(code)
-- @build<2@
if not code then
return
end
if not code then
return
end
local data = strsplittable(MAJOR_SEP, code)
local runes = {}
for i, v in ipairs(data) do
Expand Down Expand Up @@ -321,12 +321,7 @@ end

function Encoder:PackTalents(isInspect)
local data = {}
-- @build<3@
local numGroups = 1
-- @end-build<3@
-- @build>3@
local numGroups = GetNumTalentGroups(isInspect)
-- @end-build>3@
local numGroups = GetNumTalentGroups and GetNumTalentGroups(isInspect) or 1
for i = 1, numGroups do
data[i] = self:PackTalent(isInspect, i, isInspect)
end
Expand Down
1 change: 1 addition & 0 deletions Core/Inspect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ function Inspect:OnComm(cmd, sender, ...)

if talents then
db.talents = Encoder:UnpackTalents(talents)
db.numGroups = #db.talents
end

if equips then
Expand Down
53 changes: 53 additions & 0 deletions Localization/Locale.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
-- Locale.lua
-- @Author : Dencer ([email protected])
-- @Link : https://dengsir.github.io
-- @Date : 4/11/2024, 3:43:22 PM
--
local ADDON = ...

local function Apply(locale, apply)
local L = LibStub('AceLocale-3.0'):NewLocale(ADDON, locale)
if L then
apply(L)
end
end

Apply('deDE', function(L)
-- @locale:language=deDE@
-- @end-locale@
end)

Apply('esES', function(L)
-- @locale:language=esES@
-- @end-locale@
end)

Apply('frFR', function(L)
-- @locale:language=frFR@
-- @end-locale@
end)

Apply('itIT', function(L)
-- @locale:language=itIT@
-- @end-locale@
end)

Apply('koKR', function(L)
-- @locale:language=koKR@
-- @end-locale@
end)

Apply('ptBR', function(L)
-- @locale:language=ptBR@
-- @end-locale@
end)

Apply('ruRU', function(L)
-- @locale:language=ruRU@
-- @end-locale@
end)

Apply('zhTW', function(L)
-- @locale:language=zhTW@
-- @end-locale@
end)
9 changes: 1 addition & 8 deletions Localization/Localization.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
<Ui xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="enUS.lua" />
<Script file="deDE.lua" />
<Script file="esES.lua" />
<Script file="frFR.lua" />
<Script file="itIT.lua" />
<Script file="koKR.lua" />
<Script file="ptBR.lua" />
<Script file="ruRU.lua" />
<Script file="zhCN.lua" />
<Script file="zhTW.lua" />
<Script file="Locale.lua" />
</Ui>
16 changes: 0 additions & 16 deletions Localization/deDE.lua

This file was deleted.

12 changes: 4 additions & 8 deletions Localization/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,19 @@ local L = LibStub('AceLocale-3.0'):NewLocale('tdInspect', 'enUS', true)
if not L then
return
end

-- @locale:language=enUS@
L = L or {}
L['Inspect mouseover'] = true
L['Inspect target'] = true
L['Last update:'] = true

L["Inspect mouseover"] = true
L["Inspect target"] = true
L["Last update:"] = true
L["Show Model"] = true
-- @end-locale@

-- @debug@
-- @import@
L['Show Model'] = true
L['Last update:'] = true
L['Inspect target'] = true
L['Inspect mouseover'] = true

-- @locale-fill@

-- @end-import@
-- @end-debug@
16 changes: 0 additions & 16 deletions Localization/esES.lua

This file was deleted.

16 changes: 0 additions & 16 deletions Localization/frFR.lua

This file was deleted.

16 changes: 0 additions & 16 deletions Localization/itIT.lua

This file was deleted.

16 changes: 0 additions & 16 deletions Localization/koKR.lua

This file was deleted.

16 changes: 0 additions & 16 deletions Localization/ptBR.lua

This file was deleted.

16 changes: 0 additions & 16 deletions Localization/ruRU.lua

This file was deleted.

16 changes: 0 additions & 16 deletions Localization/zhTW.lua

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
}
},
"builds": {
"lkc": "30403",
"classic": "11502"
"Vanilla": "11502",
"Wrath": "30403"
}
}
}

0 comments on commit bb3c196

Please sign in to comment.