diff --git a/.github/workflows/data.yml b/.github/workflows/data.yml new file mode 100644 index 0000000..7f44cd9 --- /dev/null +++ b/.github/workflows/data.yml @@ -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' diff --git a/.github/workflows/locale.yml b/.github/workflows/locale.yml index 06817cb..7ff942c 100644 --- a/.github/workflows/locale.yml +++ b/.github/workflows/locale.yml @@ -19,7 +19,6 @@ jobs: with: token: ${{ secrets.CURSE_TOKEN }} - - uses: GuillaumeFalourd/git-commit-push@v1.3 + - uses: EndBug/add-and-commit@v9 with: - commit_message: "chore: Update locale files" - tags: false + message: 'chore: Update locale files' diff --git a/Core/Encoder.lua b/Core/Encoder.lua index 3c4f5d0..8466194 100644 --- a/Core/Encoder.lua +++ b/Core/Encoder.lua @@ -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 @@ -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 diff --git a/Core/Inspect.lua b/Core/Inspect.lua index fa0ea4e..529d526 100644 --- a/Core/Inspect.lua +++ b/Core/Inspect.lua @@ -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 diff --git a/Localization/Locale.lua b/Localization/Locale.lua new file mode 100644 index 0000000..33e4ca1 --- /dev/null +++ b/Localization/Locale.lua @@ -0,0 +1,53 @@ +-- Locale.lua +-- @Author : Dencer (tdaddon@163.com) +-- @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) diff --git a/Localization/Localization.xml b/Localization/Localization.xml index 9f4bfbc..2c4b78e 100644 --- a/Localization/Localization.xml +++ b/Localization/Localization.xml @@ -1,13 +1,6 @@