Skip to content

Commit c7800b6

Browse files
authored
chore: enable i18n checks via centralized wow-build-tools scripts (#29)
1 parent 9e1a0fa commit c7800b6

File tree

20 files changed

+399
-41
lines changed

20 files changed

+399
-41
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,5 @@ jobs:
1919
with:
2020
addon-name: DeviceLayoutPreset
2121
rockspec-name: devicelayoutpreset-1-1.rockspec
22-
lua-version: 5.4.4
23-
i18n-enabled: false
22+
i18n-enabled: true
2423
secrets: inherit

.github/workflows/pr-checks.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
with:
2222
addon-name: DeviceLayoutPreset
2323
rockspec-name: devicelayoutpreset-1-1.rockspec
24-
lua-version: 5.4.4
25-
i18n-enabled: false
24+
i18n-enabled: true
2625
trunk-enabled: true
2726
secrets: inherit

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ luac.out
4343

4444
node_modules
4545

46+
.wbt/

DeviceLayoutPreset/DeviceLayoutPreset.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
## X-Wago-ID: kGr0Ar6y
2424

2525
embeds.xml
26-
locale/locales.xml
26+
locale/index.xml
2727

2828
Core.lua

DeviceLayoutPreset/locale/deDE.lua

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,40 @@
1+
--@strip-comments@
12
---@type string, table
23
local _, ns = ...
34

45
---@class DLP_ns
56
local G_DLP = ns
67

8+
---@class DLP_Locale
79
local L = LibStub("AceLocale-3.0"):NewLocale(G_DLP.localeName, "deDE")
810
if not L then
911
return
1012
end
13+
14+
--- Place newest translations/locale keys at the top, wrapped in --#region and --#endregion for the version number that they were added in.
15+
--- You may translate these comments, but do not translate "region" or "endregion" as they are used by the localization tool to determine where to place the translations.
16+
--- To add translations, simply uncomment the line(s) and replace the English text after the equal sign (=) with the translated value.
17+
18+
--#region 1.0.0 - 1.4.2
19+
-- L["DO_NOT_OVERRIDE"] = "Same as default preset"
20+
-- L["ERROR_LAYOUT_INVALID"] = "No valid layout found. Visit the addon options (/dlp) to select a valid Edit Mode preset."
21+
-- L["ERROR_NO_LAYOUT_INFO"] = "There was an issue retrieving layoutInfo on startup, please report this issue on github"
22+
-- L["ERROR_NO_SPEC_INFO"] = "There was an issue retrieving specInfo on startup, please report this issue on github"
23+
-- L["EVENT_CREATED_LAYOUT"] = "New layout detected! Visit the addon options (/dlp) to use this layout in your presets."
24+
-- L["EVENT_DELETED_LAYOUT"] = "Looks like your selected layout has been deleted. Visit the addon options (/dlp) to select a new preset for this device and/or specs."
25+
-- L["LAYOUT_TYPE_DEVICE"] = "Device"
26+
-- L["LAYOUT_TYPE_SPEC"] = "Specialization"
27+
-- L["OPTIONS_DESC"] = "Automatically switch your UI layouts using Blizzard's \"Edit Mode\" when you play on multiple devices. It is a simple addon, but it gets the job done."
28+
-- L["OPTIONS_HOWTO_CONCLUSION"] = "\nNow when you play on your SteamDeck in the morning and your PC in the evening, you don't need to manually change the Edit Mode presets!"
29+
-- L["OPTIONS_HOWTO_NAME"] = "How to use"
30+
-- L["OPTIONS_HOWTO_STEP0"] = "0. Have multiple Edit Mode presets, one for each device (i.e. Steam Deck, Laptop, PC, etc.)"
31+
-- L["OPTIONS_HOWTO_STEP1"] = "1. Install this addon on all of the devices you play on."
32+
-- L["OPTIONS_HOWTO_STEP2"] = "2. Set the \"Default preset to load\" below to the layout you want for each device."
33+
-- L["OPTIONS_PRESET_DESC"] = "The Edit Mode preset to load when logging in on this device or when switching to a spec with no override defined below."
34+
-- L["OPTIONS_PRESET_NAME"] = "Default preset to load"
35+
-- L["OPTIONS_SPECS_DESC"] = "If you'd like to have different layouts for specific specializations, you can set overrides here."
36+
-- L["OPTIONS_SPECS_NAME"] = "Class Specialization Overrides"
37+
-- L["OPTIONS_SPECS_PRESET_DESC"] = "The Edit Mode preset to load in %s spec."
38+
-- L["SUCCESS_LOADED_LAYOUT"] = "Successfully loaded your %s layout: \"%s\" - Have a fun session!"
39+
-- L["WELCOME_NEW_VERSION"] = "Thanks for using DeviceLayoutPreset %s!"
40+
--#endregion

DeviceLayoutPreset/locale/enGB.lua

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,40 @@
1+
--@strip-comments@
12
---@type string, table
23
local _, ns = ...
34

45
---@class DLP_ns
56
local G_DLP = ns
67

8+
---@class DLP_Locale
79
local L = LibStub("AceLocale-3.0"):NewLocale(G_DLP.localeName, "enGB")
810
if not L then
911
return
1012
end
13+
14+
--- Place newest translations/locale keys at the top, wrapped in --#region and --#endregion for the version number that they were added in.
15+
--- You may translate these comments, but do not translate "region" or "endregion" as they are used by the localization tool to determine where to place the translations.
16+
--- To add translations, simply uncomment the line(s) and replace the English text after the equal sign (=) with the translated value.
17+
18+
--#region 1.0.0 - 1.4.2
19+
-- L["DO_NOT_OVERRIDE"] = "Same as default preset"
20+
-- L["ERROR_LAYOUT_INVALID"] = "No valid layout found. Visit the addon options (/dlp) to select a valid Edit Mode preset."
21+
-- L["ERROR_NO_LAYOUT_INFO"] = "There was an issue retrieving layoutInfo on startup, please report this issue on github"
22+
-- L["ERROR_NO_SPEC_INFO"] = "There was an issue retrieving specInfo on startup, please report this issue on github"
23+
-- L["EVENT_CREATED_LAYOUT"] = "New layout detected! Visit the addon options (/dlp) to use this layout in your presets."
24+
-- L["EVENT_DELETED_LAYOUT"] = "Looks like your selected layout has been deleted. Visit the addon options (/dlp) to select a new preset for this device and/or specs."
25+
-- L["LAYOUT_TYPE_DEVICE"] = "Device"
26+
-- L["LAYOUT_TYPE_SPEC"] = "Specialization"
27+
-- L["OPTIONS_DESC"] = "Automatically switch your UI layouts using Blizzard's \"Edit Mode\" when you play on multiple devices. It is a simple addon, but it gets the job done."
28+
-- L["OPTIONS_HOWTO_CONCLUSION"] = "\nNow when you play on your SteamDeck in the morning and your PC in the evening, you don't need to manually change the Edit Mode presets!"
29+
-- L["OPTIONS_HOWTO_NAME"] = "How to use"
30+
-- L["OPTIONS_HOWTO_STEP0"] = "0. Have multiple Edit Mode presets, one for each device (i.e. Steam Deck, Laptop, PC, etc.)"
31+
-- L["OPTIONS_HOWTO_STEP1"] = "1. Install this addon on all of the devices you play on."
32+
-- L["OPTIONS_HOWTO_STEP2"] = "2. Set the \"Default preset to load\" below to the layout you want for each device."
33+
-- L["OPTIONS_PRESET_DESC"] = "The Edit Mode preset to load when logging in on this device or when switching to a spec with no override defined below."
34+
-- L["OPTIONS_PRESET_NAME"] = "Default preset to load"
35+
-- L["OPTIONS_SPECS_DESC"] = "If you'd like to have different layouts for specific specializations, you can set overrides here."
36+
-- L["OPTIONS_SPECS_NAME"] = "Class Specialization Overrides"
37+
-- L["OPTIONS_SPECS_PRESET_DESC"] = "The Edit Mode preset to load in %s spec."
38+
-- L["SUCCESS_LOADED_LAYOUT"] = "Successfully loaded your %s layout: \"%s\" - Have a fun session!"
39+
-- L["WELCOME_NEW_VERSION"] = "Thanks for using DeviceLayoutPreset %s!"
40+
--#endregion

DeviceLayoutPreset/locale/enUS.lua

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,30 @@ local G_DLP = ns
77
---@class DLP_Locale
88
local L = LibStub("AceLocale-3.0"):NewLocale(G_DLP.localeName, "enUS", true)
99

10+
--- Place newest translations/locale keys at the top, wrapped in --#region and --#endregion for the version number that they were added in.
11+
--- You may translate these comments, but do not translate "region" or "endregion" as they are used by the localization tool to determine where to place the translations.
12+
--- To add translations, simply uncomment the line(s) and replace the English text after the equal sign (=) with the translated value.
13+
14+
--#region 1.0.0 - 1.4.2
15+
L["DO_NOT_OVERRIDE"] = "Same as default preset"
16+
L["ERROR_LAYOUT_INVALID"] = "No valid layout found. Visit the addon options (/dlp) to select a valid Edit Mode preset."
17+
L["ERROR_NO_LAYOUT_INFO"] = "There was an issue retrieving layoutInfo on startup, please report this issue on github"
18+
L["ERROR_NO_SPEC_INFO"] = "There was an issue retrieving specInfo on startup, please report this issue on github"
19+
L["EVENT_CREATED_LAYOUT"] = "New layout detected! Visit the addon options (/dlp) to use this layout in your presets."
20+
L["EVENT_DELETED_LAYOUT"] = "Looks like your selected layout has been deleted. Visit the addon options (/dlp) to select a new preset for this device and/or specs."
21+
L["LAYOUT_TYPE_DEVICE"] = "Device"
22+
L["LAYOUT_TYPE_SPEC"] = "Specialization"
1023
L["OPTIONS_DESC"] = "Automatically switch your UI layouts using Blizzard's \"Edit Mode\" when you play on multiple devices. It is a simple addon, but it gets the job done."
24+
L["OPTIONS_HOWTO_CONCLUSION"] = "\nNow when you play on your SteamDeck in the morning and your PC in the evening, you don't need to manually change the Edit Mode presets!"
1125
L["OPTIONS_HOWTO_NAME"] = "How to use"
1226
L["OPTIONS_HOWTO_STEP0"] = "0. Have multiple Edit Mode presets, one for each device (i.e. Steam Deck, Laptop, PC, etc.)"
1327
L["OPTIONS_HOWTO_STEP1"] = "1. Install this addon on all of the devices you play on."
1428
L["OPTIONS_HOWTO_STEP2"] = "2. Set the \"Default preset to load\" below to the layout you want for each device."
15-
L["OPTIONS_HOWTO_CONCLUSION"] = "\nNow when you play on your SteamDeck in the morning and your PC in the evening, you don't need to manually change the Edit Mode presets!"
16-
L["OPTIONS_PRESET_NAME"] = "Default preset to load"
1729
L["OPTIONS_PRESET_DESC"] = "The Edit Mode preset to load when logging in on this device or when switching to a spec with no override defined below."
18-
L["OPTIONS_SPECS_NAME"] = "Class Specialization Overrides"
30+
L["OPTIONS_PRESET_NAME"] = "Default preset to load"
1931
L["OPTIONS_SPECS_DESC"] = "If you'd like to have different layouts for specific specializations, you can set overrides here."
32+
L["OPTIONS_SPECS_NAME"] = "Class Specialization Overrides"
2033
L["OPTIONS_SPECS_PRESET_DESC"] = "The Edit Mode preset to load in %s spec."
21-
L["DO_NOT_OVERRIDE"] = "Same as default preset"
22-
23-
L["ERROR_NO_LAYOUT_INFO"] = "There was an issue retrieving layoutInfo on startup, please report this issue on github"
24-
L["ERROR_NO_SPEC_INFO"] = "There was an issue retrieving specInfo on startup, please report this issue on github"
25-
L["ERROR_LAYOUT_INVALID"] = "No valid layout found. Visit the addon options (/dlp) to select a valid Edit Mode preset."
26-
27-
L["LAYOUT_TYPE_DEVICE"] = "Device"
28-
L["LAYOUT_TYPE_SPEC"] = "Specialization"
29-
3034
L["SUCCESS_LOADED_LAYOUT"] = "Successfully loaded your %s layout: \"%s\" - Have a fun session!"
31-
3235
L["WELCOME_NEW_VERSION"] = "Thanks for using DeviceLayoutPreset %s!"
33-
34-
L["EVENT_DELETED_LAYOUT"] = "Looks like your selected layout has been deleted. Visit the addon options (/dlp) to select a new preset for this device and/or specs."
35-
L["EVENT_CREATED_LAYOUT"] = "New layout detected! Visit the addon options (/dlp) to use this layout in your presets."
36+
--#endregion

DeviceLayoutPreset/locale/esES.lua

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,40 @@
1+
--@strip-comments@
12
---@type string, table
23
local _, ns = ...
34

45
---@class DLP_ns
56
local G_DLP = ns
67

8+
---@class DLP_Locale
79
local L = LibStub("AceLocale-3.0"):NewLocale(G_DLP.localeName, "esES")
810
if not L then
911
return
1012
end
13+
14+
--- Place newest translations/locale keys at the top, wrapped in --#region and --#endregion for the version number that they were added in.
15+
--- You may translate these comments, but do not translate "region" or "endregion" as they are used by the localization tool to determine where to place the translations.
16+
--- To add translations, simply uncomment the line(s) and replace the English text after the equal sign (=) with the translated value.
17+
18+
--#region 1.0.0 - 1.4.2
19+
-- L["DO_NOT_OVERRIDE"] = "Same as default preset"
20+
-- L["ERROR_LAYOUT_INVALID"] = "No valid layout found. Visit the addon options (/dlp) to select a valid Edit Mode preset."
21+
-- L["ERROR_NO_LAYOUT_INFO"] = "There was an issue retrieving layoutInfo on startup, please report this issue on github"
22+
-- L["ERROR_NO_SPEC_INFO"] = "There was an issue retrieving specInfo on startup, please report this issue on github"
23+
-- L["EVENT_CREATED_LAYOUT"] = "New layout detected! Visit the addon options (/dlp) to use this layout in your presets."
24+
-- L["EVENT_DELETED_LAYOUT"] = "Looks like your selected layout has been deleted. Visit the addon options (/dlp) to select a new preset for this device and/or specs."
25+
-- L["LAYOUT_TYPE_DEVICE"] = "Device"
26+
-- L["LAYOUT_TYPE_SPEC"] = "Specialization"
27+
-- L["OPTIONS_DESC"] = "Automatically switch your UI layouts using Blizzard's \"Edit Mode\" when you play on multiple devices. It is a simple addon, but it gets the job done."
28+
-- L["OPTIONS_HOWTO_CONCLUSION"] = "\nNow when you play on your SteamDeck in the morning and your PC in the evening, you don't need to manually change the Edit Mode presets!"
29+
-- L["OPTIONS_HOWTO_NAME"] = "How to use"
30+
-- L["OPTIONS_HOWTO_STEP0"] = "0. Have multiple Edit Mode presets, one for each device (i.e. Steam Deck, Laptop, PC, etc.)"
31+
-- L["OPTIONS_HOWTO_STEP1"] = "1. Install this addon on all of the devices you play on."
32+
-- L["OPTIONS_HOWTO_STEP2"] = "2. Set the \"Default preset to load\" below to the layout you want for each device."
33+
-- L["OPTIONS_PRESET_DESC"] = "The Edit Mode preset to load when logging in on this device or when switching to a spec with no override defined below."
34+
-- L["OPTIONS_PRESET_NAME"] = "Default preset to load"
35+
-- L["OPTIONS_SPECS_DESC"] = "If you'd like to have different layouts for specific specializations, you can set overrides here."
36+
-- L["OPTIONS_SPECS_NAME"] = "Class Specialization Overrides"
37+
-- L["OPTIONS_SPECS_PRESET_DESC"] = "The Edit Mode preset to load in %s spec."
38+
-- L["SUCCESS_LOADED_LAYOUT"] = "Successfully loaded your %s layout: \"%s\" - Have a fun session!"
39+
-- L["WELCOME_NEW_VERSION"] = "Thanks for using DeviceLayoutPreset %s!"
40+
--#endregion

DeviceLayoutPreset/locale/esMX.lua

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,40 @@
1+
--@strip-comments@
12
---@type string, table
23
local _, ns = ...
34

45
---@class DLP_ns
56
local G_DLP = ns
67

8+
---@class DLP_Locale
79
local L = LibStub("AceLocale-3.0"):NewLocale(G_DLP.localeName, "esMX")
810
if not L then
911
return
1012
end
13+
14+
--- Place newest translations/locale keys at the top, wrapped in --#region and --#endregion for the version number that they were added in.
15+
--- You may translate these comments, but do not translate "region" or "endregion" as they are used by the localization tool to determine where to place the translations.
16+
--- To add translations, simply uncomment the line(s) and replace the English text after the equal sign (=) with the translated value.
17+
18+
--#region 1.0.0 - 1.4.2
19+
-- L["DO_NOT_OVERRIDE"] = "Same as default preset"
20+
-- L["ERROR_LAYOUT_INVALID"] = "No valid layout found. Visit the addon options (/dlp) to select a valid Edit Mode preset."
21+
-- L["ERROR_NO_LAYOUT_INFO"] = "There was an issue retrieving layoutInfo on startup, please report this issue on github"
22+
-- L["ERROR_NO_SPEC_INFO"] = "There was an issue retrieving specInfo on startup, please report this issue on github"
23+
-- L["EVENT_CREATED_LAYOUT"] = "New layout detected! Visit the addon options (/dlp) to use this layout in your presets."
24+
-- L["EVENT_DELETED_LAYOUT"] = "Looks like your selected layout has been deleted. Visit the addon options (/dlp) to select a new preset for this device and/or specs."
25+
-- L["LAYOUT_TYPE_DEVICE"] = "Device"
26+
-- L["LAYOUT_TYPE_SPEC"] = "Specialization"
27+
-- L["OPTIONS_DESC"] = "Automatically switch your UI layouts using Blizzard's \"Edit Mode\" when you play on multiple devices. It is a simple addon, but it gets the job done."
28+
-- L["OPTIONS_HOWTO_CONCLUSION"] = "\nNow when you play on your SteamDeck in the morning and your PC in the evening, you don't need to manually change the Edit Mode presets!"
29+
-- L["OPTIONS_HOWTO_NAME"] = "How to use"
30+
-- L["OPTIONS_HOWTO_STEP0"] = "0. Have multiple Edit Mode presets, one for each device (i.e. Steam Deck, Laptop, PC, etc.)"
31+
-- L["OPTIONS_HOWTO_STEP1"] = "1. Install this addon on all of the devices you play on."
32+
-- L["OPTIONS_HOWTO_STEP2"] = "2. Set the \"Default preset to load\" below to the layout you want for each device."
33+
-- L["OPTIONS_PRESET_DESC"] = "The Edit Mode preset to load when logging in on this device or when switching to a spec with no override defined below."
34+
-- L["OPTIONS_PRESET_NAME"] = "Default preset to load"
35+
-- L["OPTIONS_SPECS_DESC"] = "If you'd like to have different layouts for specific specializations, you can set overrides here."
36+
-- L["OPTIONS_SPECS_NAME"] = "Class Specialization Overrides"
37+
-- L["OPTIONS_SPECS_PRESET_DESC"] = "The Edit Mode preset to load in %s spec."
38+
-- L["SUCCESS_LOADED_LAYOUT"] = "Successfully loaded your %s layout: \"%s\" - Have a fun session!"
39+
-- L["WELCOME_NEW_VERSION"] = "Thanks for using DeviceLayoutPreset %s!"
40+
--#endregion

DeviceLayoutPreset/locale/frFR.lua

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,40 @@
1+
--@strip-comments@
12
---@type string, table
23
local _, ns = ...
34

45
---@class DLP_ns
56
local G_DLP = ns
67

8+
---@class DLP_Locale
79
local L = LibStub("AceLocale-3.0"):NewLocale(G_DLP.localeName, "frFR")
810
if not L then
911
return
1012
end
13+
14+
--- Place newest translations/locale keys at the top, wrapped in --#region and --#endregion for the version number that they were added in.
15+
--- You may translate these comments, but do not translate "region" or "endregion" as they are used by the localization tool to determine where to place the translations.
16+
--- To add translations, simply uncomment the line(s) and replace the English text after the equal sign (=) with the translated value.
17+
18+
--#region 1.0.0 - 1.4.2
19+
-- L["DO_NOT_OVERRIDE"] = "Same as default preset"
20+
-- L["ERROR_LAYOUT_INVALID"] = "No valid layout found. Visit the addon options (/dlp) to select a valid Edit Mode preset."
21+
-- L["ERROR_NO_LAYOUT_INFO"] = "There was an issue retrieving layoutInfo on startup, please report this issue on github"
22+
-- L["ERROR_NO_SPEC_INFO"] = "There was an issue retrieving specInfo on startup, please report this issue on github"
23+
-- L["EVENT_CREATED_LAYOUT"] = "New layout detected! Visit the addon options (/dlp) to use this layout in your presets."
24+
-- L["EVENT_DELETED_LAYOUT"] = "Looks like your selected layout has been deleted. Visit the addon options (/dlp) to select a new preset for this device and/or specs."
25+
-- L["LAYOUT_TYPE_DEVICE"] = "Device"
26+
-- L["LAYOUT_TYPE_SPEC"] = "Specialization"
27+
-- L["OPTIONS_DESC"] = "Automatically switch your UI layouts using Blizzard's \"Edit Mode\" when you play on multiple devices. It is a simple addon, but it gets the job done."
28+
-- L["OPTIONS_HOWTO_CONCLUSION"] = "\nNow when you play on your SteamDeck in the morning and your PC in the evening, you don't need to manually change the Edit Mode presets!"
29+
-- L["OPTIONS_HOWTO_NAME"] = "How to use"
30+
-- L["OPTIONS_HOWTO_STEP0"] = "0. Have multiple Edit Mode presets, one for each device (i.e. Steam Deck, Laptop, PC, etc.)"
31+
-- L["OPTIONS_HOWTO_STEP1"] = "1. Install this addon on all of the devices you play on."
32+
-- L["OPTIONS_HOWTO_STEP2"] = "2. Set the \"Default preset to load\" below to the layout you want for each device."
33+
-- L["OPTIONS_PRESET_DESC"] = "The Edit Mode preset to load when logging in on this device or when switching to a spec with no override defined below."
34+
-- L["OPTIONS_PRESET_NAME"] = "Default preset to load"
35+
-- L["OPTIONS_SPECS_DESC"] = "If you'd like to have different layouts for specific specializations, you can set overrides here."
36+
-- L["OPTIONS_SPECS_NAME"] = "Class Specialization Overrides"
37+
-- L["OPTIONS_SPECS_PRESET_DESC"] = "The Edit Mode preset to load in %s spec."
38+
-- L["SUCCESS_LOADED_LAYOUT"] = "Successfully loaded your %s layout: \"%s\" - Have a fun session!"
39+
-- L["WELCOME_NEW_VERSION"] = "Thanks for using DeviceLayoutPreset %s!"
40+
--#endregion

0 commit comments

Comments
 (0)