Version 0.3.0
- fixed DB storange and debug printing
This commit is contained in:
parent
db3db16594
commit
b572203dd2
14
CHANGELOG.md
14
CHANGELOG.md
@ -3,13 +3,19 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [Unreleased] Version 1.0 - 2020-05-27
|
## [Unreleased] Version 1.0 - 2020-05-28
|
||||||
First version to be released
|
### Added
|
||||||
|
- case sensitivity
|
||||||
|
- consolidate consecutive matches
|
||||||
|
|
||||||
|
## Version 0.3.1 - 2020-05-28
|
||||||
### Added
|
### Added
|
||||||
- add replacements via options UI
|
- add replacements via options UI
|
||||||
- handle replacement via slash command
|
- handle replacement via slash command
|
||||||
- case sensitivity
|
|
||||||
- consolidate consecutive matches
|
## Version 0.3.0 - 2020-05-27
|
||||||
|
### Fixed
|
||||||
|
- fixed DB storange and debug printing
|
||||||
|
|
||||||
## Version 0.2.2 - 2020-05-26
|
## Version 0.2.2 - 2020-05-26
|
||||||
### Added
|
### Added
|
||||||
|
199
Grichelde.lua
199
Grichelde.lua
@ -14,32 +14,47 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
||||||
--------------------------------------------------------------------------]] --
|
--------------------------------------------------------------------------]] --
|
||||||
|
-- upvalues
|
||||||
|
local _G = _G
|
||||||
|
|
||||||
|
-- faster function lookups by mapping to local refs
|
||||||
|
local string_find = _G.string.find
|
||||||
|
local string_gsub = _G.string.gsub
|
||||||
|
local string_len = _G.string.len
|
||||||
|
local string_rep = _G.string.rep
|
||||||
|
local string_sub = _G.string.sub
|
||||||
|
local string_fmt = _G.string.format
|
||||||
|
local strtrim = _G.strtrim
|
||||||
|
local strmatch = _G.strmatch
|
||||||
|
local tostring = _G.tostring
|
||||||
|
local tInsert = _G.table.insert
|
||||||
|
local tContains = _G.tContains
|
||||||
|
local unpack = _G.unpack
|
||||||
|
local pairs = _G.pairs
|
||||||
|
local ipairs = _G.ipairs
|
||||||
|
|
||||||
|
-- colors:
|
||||||
|
local PREFIX_COLOR_CODE = "|c00FFAA00"
|
||||||
|
|
||||||
-- initialize addon
|
-- initialize addon
|
||||||
local AddonName, AddonTable = ...
|
local AddonName, AddonTable = ...
|
||||||
Grichelde = LibStub("AceAddon-3.0"):NewAddon(AddonName, "AceConsole-3.0", "AceEvent-3.0", "AceHook-3.0")
|
|
||||||
|
local Grichelde = LibStub("AceAddon-3.0"):NewAddon(AddonName, "AceConsole-3.0", "AceEvent-3.0", "AceHook-3.0")
|
||||||
Grichelde.L = LibStub("AceLocale-3.0"):GetLocale("Grichelde", true)
|
Grichelde.L = LibStub("AceLocale-3.0"):GetLocale("Grichelde", true)
|
||||||
Grichelde.version = GetAddOnMetadata(AddonName, "Version")
|
Grichelde.version = GetAddOnMetadata(AddonName, "Version")
|
||||||
Grichelde.build = GetAddOnMetadata(AddonName, "X-Build") or "Experimental"
|
Grichelde.build = GetAddOnMetadata(AddonName, "X-Build") or "Experimental"
|
||||||
Grichelde.hooks = {}
|
Grichelde.hooks = {}
|
||||||
|
Grichelde.classic = _G.WOW_PROJECT_ID == _G.WOW_PROJECT_CLASSIC
|
||||||
Grichelde.debug = false
|
Grichelde.debug = false
|
||||||
|
|
||||||
-- faster function lookups by mapping to local refs
|
-- publish to global env
|
||||||
local string_find = string.find
|
_G.Grichelde = Grichelde
|
||||||
local string_gsub = string.gsub
|
|
||||||
local string_len = string.len
|
|
||||||
local string_rep = string.rep
|
|
||||||
local string_sub = string.sub
|
|
||||||
local strtrim = strtrim
|
|
||||||
local strmatch = strmatch
|
|
||||||
local tostring = tostring
|
|
||||||
local tInsert = table.insert
|
|
||||||
local tContains = tContains
|
|
||||||
local pairs = pairs
|
|
||||||
local ipairs = ipairs
|
|
||||||
|
|
||||||
local Grichelde_ChatTypes = { "SAY", "EMOTE", "YELL", "PARTY", "GUILD" }
|
Grichelde.config = {
|
||||||
local Grichelde_ChatCommands = { "/s", "/e", "/me", "/y", "/p", "/pl", "/g", "/o", "/raid", "/rl", "/rw", "/i", "bg", "/w", "/r", "/tt" }
|
enabled = true,
|
||||||
|
channels = { "SAY", "EMOTE", "YELL", "PARTY", "GUILD" },
|
||||||
|
slashCommands = { "/s", "/say", "/e", "/em", "/me", "/emote", "/y", "/yell", "/sh", "/shout", "/p", "/party", "/pl", "/partyleader", "/g", "/gc", "/guild", "/o", "/osay", "/officer", "/raid", "/rsay", "/rl", "/raidleader", "/rw", "/raidwarning", "/i", "/instance", "/bg", "/battleground", "/w", "/whisper", "/t", "/tell", "/send", "/r", "/reply" }
|
||||||
|
}
|
||||||
|
|
||||||
-- Ace3 callbacks
|
-- Ace3 callbacks
|
||||||
function Grichelde:OnInitialize()
|
function Grichelde:OnInitialize()
|
||||||
@ -53,15 +68,16 @@ function Grichelde:OnInitialize()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Grichelde:OnEnable()
|
function Grichelde:OnEnable()
|
||||||
|
|
||||||
-- Hook in before message is sent to replace all character occurrences where replacements have been defined in the options
|
-- Hook in before message is sent to replace all character occurrences where replacements have been defined in the options
|
||||||
self:RawHook("SendChatMessage", true)
|
self:RawHook("SendChatMessage", true)
|
||||||
|
|
||||||
if (Misspelled) then
|
if (_G.Misspelled) then
|
||||||
print("Misspelled detected, Grichelde will have any messsage being cleansed")
|
self:PrefixedPrint(self.L.Addon_Detected_Misspelled)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- tell the world we are listening
|
-- tell the world we are listening
|
||||||
print(self.L.AddonLoaded)
|
self:DebugPrint(self.L.AddonLoaded, self.L.AddonName)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Grichelde:OnDisable()
|
function Grichelde:OnDisable()
|
||||||
@ -95,6 +111,10 @@ function Grichelde:HookIntoForOtherChatAddons(event, addonName)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if (_G.WIM) then
|
||||||
|
self:PrefixedPrint(self.L.Addon_Detected_WIM)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -133,10 +153,13 @@ function Grichelde:CheckAndReplace(message, type)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Grichelde:CheckReplacement(text, type)
|
function Grichelde:CheckReplacement(text, type)
|
||||||
-- todo: globally disabled?
|
if (not Grichelde.config.enabled) then
|
||||||
|
self:DebugPrint("CheckReplacement : globally disabled")
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
-- check type
|
-- check type
|
||||||
if (not tContains(Grichelde_ChatTypes, type)) then
|
if (not tContains(Grichelde.config.channels, type)) then
|
||||||
self:DebugPrint("CheckReplacement : skip channel type")
|
self:DebugPrint("CheckReplacement : skip channel type")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
@ -144,7 +167,7 @@ function Grichelde:CheckReplacement(text, type)
|
|||||||
-- don't replace slash commands except chat related commands
|
-- don't replace slash commands except chat related commands
|
||||||
if string_sub(text, 1, 1) == "/" then
|
if string_sub(text, 1, 1) == "/" then
|
||||||
local firstWord, _ = self:SplitOnFirstMatch(text)
|
local firstWord, _ = self:SplitOnFirstMatch(text)
|
||||||
if (firstWord == nil or not tContains(Grichelde_ChatCommands, firstWord)) then
|
if (firstWord == nil or not tContains(Grichelde.config.slashCommands, firstWord)) then
|
||||||
self:DebugPrint("CheckReplacement : ignore slash command")
|
self:DebugPrint("CheckReplacement : ignore slash command")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
@ -162,7 +185,7 @@ function Grichelde:CheckForPreversableText(text)
|
|||||||
self:DebugPrint("CheckForPreversableText : text is " .. text)
|
self:DebugPrint("CheckForPreversableText : text is " .. text)
|
||||||
|
|
||||||
-- do not replace these patterns
|
-- do not replace these patterns
|
||||||
local Grichelde_IgnorePatterns = {
|
local ignorePatterns = {
|
||||||
"|[Cc]%x%x%x%x%x%x%x%x.-|r", -- colored items (or links)
|
"|[Cc]%x%x%x%x%x%x%x%x.-|r", -- colored items (or links)
|
||||||
"|H.-|h", -- item links (http://www.wowwiki.com/ItemLink)
|
"|H.-|h", -- item links (http://www.wowwiki.com/ItemLink)
|
||||||
"|T.-|t", -- textures
|
"|T.-|t", -- textures
|
||||||
@ -181,10 +204,10 @@ function Grichelde:CheckForPreversableText(text)
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Calling find on ever pattern might be inefficient but its way less code.
|
-- Calling find on ever pattern might be inefficient but its way less code.
|
||||||
for _, pattern in ipairs(Grichelde_IgnorePatterns) do
|
for _, pattern in ipairs(ignorePatterns) do
|
||||||
local pos1, pos2 = string_find(text, pattern)
|
local pos1, pos2 = string_find(text, pattern)
|
||||||
if pos1 == 1 and pos2 ~= nil then
|
if pos1 == 1 and pos2 ~= nil then
|
||||||
self:DebugPrint("CheckForPreversableText : Found ignore pattern " .. pattern .. " at (" .. pos1 .. "," .. pos2 .. ")")
|
self:DebugPrint("CheckForPreversableText : Found ignore pattern \"%s\" at (%d, %d)", pattern, pos1, pos2)
|
||||||
return pos2
|
return pos2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -202,8 +225,8 @@ function Grichelde:ReplaceText(text)
|
|||||||
|
|
||||||
-- don't replace non-chat related slash commands
|
-- don't replace non-chat related slash commands
|
||||||
local firstWord, line = self:SplitOnFirstMatch(text)
|
local firstWord, line = self:SplitOnFirstMatch(text)
|
||||||
if (firstWord ~= nil and tContains(Grichelde_ChatCommands, firstWord)) then
|
if (firstWord ~= nil and tContains(Grichelde.config.slashCommands, firstWord)) then
|
||||||
self:DebugPrint("ReplaceText : Found slash command " .. (firstWord + "") )
|
self:DebugPrint("ReplaceText : Found slash command %s", firstWord )
|
||||||
-- skip chat slash command
|
-- skip chat slash command
|
||||||
finalText = finalText .. firstWord .. ' '
|
finalText = finalText .. firstWord .. ' '
|
||||||
newText = line
|
newText = line
|
||||||
@ -214,7 +237,7 @@ function Grichelde:ReplaceText(text)
|
|||||||
|
|
||||||
while current <= string_len(newText) do
|
while current <= string_len(newText) do
|
||||||
local currentChar = string_sub(newText, current, current)
|
local currentChar = string_sub(newText, current, current)
|
||||||
self:DebugPrint("current/char : " .. current .. "," .. currentChar)
|
self:DebugPrint("current/char : %s,%s", current, currentChar)
|
||||||
|
|
||||||
if currentChar ~= '|' and currentChar ~= '{' then
|
if currentChar ~= '|' and currentChar ~= '{' then
|
||||||
current = current + 1
|
current = current + 1
|
||||||
@ -264,7 +287,7 @@ function Grichelde:ReplaceCharacters(text)
|
|||||||
replacement = string_gsub(replacement, "S", "Ch")
|
replacement = string_gsub(replacement, "S", "Ch")
|
||||||
replacement = string_gsub(replacement, "t", "k")
|
replacement = string_gsub(replacement, "t", "k")
|
||||||
replacement = string_gsub(replacement, "T", "K")
|
replacement = string_gsub(replacement, "T", "K")
|
||||||
self:DebugPrint("ReplaceCharacters : replaced \"" .. text .. "\" with \"" .. replacement .. "\"")
|
self:DebugPrint("ReplaceCharacters : replaced \"%s\" with \"%s\"", text, replacement)
|
||||||
return replacement
|
return replacement
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -308,64 +331,114 @@ end
|
|||||||
|
|
||||||
-- split first word of a text line
|
-- split first word of a text line
|
||||||
function Grichelde:SplitOnFirstMatch(text, start)
|
function Grichelde:SplitOnFirstMatch(text, start)
|
||||||
self:DebugPrint("SplitOnFirstMatch : text: " .. text .. ", start: " .. self:EmptyIfNil(start))
|
self:DebugPrint("SplitOnFirstMatch : text: %s, start: %d", text, start)
|
||||||
local pos = 1
|
local pos = start or 1
|
||||||
if start ~= nil then pos = start end
|
|
||||||
local left, right = strmatch(text, "^.- .+", pos)
|
local left, right = strmatch(text, "^.- .+", pos)
|
||||||
self:DebugPrint("SplitOnFirstMatch : left: " .. self:EmptyIfNil(left) .. ", right: " .. self:EmptyIfNil(right))
|
self:DebugPrint("SplitOnFirstMatch : left: %s, right: %s", left, right)
|
||||||
return left, right
|
return left, right
|
||||||
end
|
end
|
||||||
|
|
||||||
function Grichelde:SplitOnLastMatch(text, start)
|
function Grichelde:SplitOnLastMatch(text, start)
|
||||||
self:DebugPrint("SplitOnLastMatch : text: " .. text .. ", start: " .. self:EmptyIfNil(start))
|
self:DebugPrint("SplitOnLastMatch : text: %s, start: %d", text, start)
|
||||||
local pos = 1
|
local pos = start or 1
|
||||||
if start ~= nil then pos = start end
|
|
||||||
local left, right = strmatch(text, ".+ .-$", pos)
|
local left, right = strmatch(text, ".+ .-$", pos)
|
||||||
self:DebugPrint("SplitOnLastMatch : left: " .. self:EmptyIfNil(left) .. ", right: " .. self:EmptyIfNil(right))
|
self:DebugPrint("SplitOnLastMatch : left: %s, right: %s", left, right)
|
||||||
return left, right
|
return left, right
|
||||||
end
|
end
|
||||||
|
|
||||||
function Grichelde:DebugPrint(message)
|
function Grichelde:Format(message,...)
|
||||||
|
local msg = message
|
||||||
|
local l = select("#", ...)
|
||||||
|
if l > 0 then
|
||||||
|
-- sanitize nil values in vararg
|
||||||
|
local packed = {...}
|
||||||
|
for i = 1,l do
|
||||||
|
packed[i] = packed[i] or "nil"
|
||||||
|
end
|
||||||
|
-- print("packed = ", packed)
|
||||||
|
-- self:tPrint(packed)
|
||||||
|
-- cannot assign unpacked to a vararg variable and print it for debug
|
||||||
|
msg = string_fmt(message, unpack(packed))
|
||||||
|
end
|
||||||
|
return msg or "nil"
|
||||||
|
end
|
||||||
|
|
||||||
|
function Grichelde:Print(...)
|
||||||
|
print(self:Format(...))
|
||||||
|
end
|
||||||
|
|
||||||
|
local function prefixedPrint(colorCode, prefix, endClose, ...)
|
||||||
|
print(colorCode .. prefix .. endClose .. ": " .. ...)
|
||||||
|
end
|
||||||
|
|
||||||
|
function Grichelde:PrefixedPrint(...)
|
||||||
|
prefixedPrint(PREFIX_COLOR_CODE, self.L.AddonName, _G.FONT_COLOR_CODE_CLOSE, self:Format(...))
|
||||||
|
end
|
||||||
|
|
||||||
|
function Grichelde:DebugPrint(...)
|
||||||
if (self.debug) then
|
if (self.debug) then
|
||||||
self:Print(message)
|
prefixedPrint(_G.GRAY_FONT_COLOR_CODE, self.L.AddonName, _G.FONT_COLOR_CODE_CLOSE, self:Format(...))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Grichelde:Print(message)
|
local function tLen(t)
|
||||||
print(GRAY_FONT_COLOR_CODE .. self.L.AddonName .. FONT_COLOR_CODE_CLOSE .. ": " .. message)
|
local count = 0
|
||||||
|
for _ in pairs(t) do count = count + 1 end
|
||||||
|
return count
|
||||||
end
|
end
|
||||||
|
|
||||||
function Grichelde:EmptyIfNil(value)
|
|
||||||
if value == nil then return "" end
|
|
||||||
return tostring(value)
|
|
||||||
end
|
|
||||||
|
|
||||||
function Grichelde:tprint(t, indent, done)
|
|
||||||
-- in case we run it standalone
|
|
||||||
local Note = Note or print
|
|
||||||
-- local Tell = Tell or io.write
|
|
||||||
|
|
||||||
-- show strings differently to distinguish them from numbers
|
-- show strings differently to distinguish them from numbers
|
||||||
local function show(val)
|
function Grichelde:PlainValue(val)
|
||||||
if type(val) == "string" then
|
if val == nil then
|
||||||
|
return "<nil>"
|
||||||
|
elseif type(val) == "string" then
|
||||||
return '"' .. val .. '"'
|
return '"' .. val .. '"'
|
||||||
|
elseif type(val) == "table" then
|
||||||
|
if tLen(val) > 0 then
|
||||||
|
return tostring(val)
|
||||||
|
else
|
||||||
|
return "{}"
|
||||||
|
end
|
||||||
else
|
else
|
||||||
return tostring(val)
|
return tostring(val)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- entry point here
|
--- Prints any value to default channel, do NOT return a string.
|
||||||
done = done or {}
|
function Grichelde:tPrint(val, indent, known)
|
||||||
|
if (not self.debug) then return end
|
||||||
|
|
||||||
indent = indent or 0
|
indent = indent or 0
|
||||||
for key, value in pairs(t) do
|
known = known or {}
|
||||||
print(string_rep(" ", indent)) -- indent it
|
|
||||||
if type(value) == "table" and not done[value] then
|
if val == nil then
|
||||||
done[value] = true
|
print(string_rep(" ", indent) .. "<nil>")
|
||||||
Note(show(key), ":");
|
elseif type(val) == "string" then
|
||||||
self:tprint(value, indent + 2, done)
|
print(string_rep(" ", indent) .. "\"" .. val .. "\"")
|
||||||
|
elseif type(val) == "table" then
|
||||||
|
if tLen(val) > 0 then
|
||||||
|
for key, value in pairs(val) do
|
||||||
|
if value == nil then
|
||||||
|
print(string_rep(" ", indent) .. self:PlainValue(key) .. "= <nil>")
|
||||||
|
elseif type(value) == "table" then
|
||||||
|
print(string_rep(" ", indent) .. self:PlainValue(key) .. "= {")
|
||||||
|
if tLen(value) > 0 then
|
||||||
|
if not known[value] then
|
||||||
|
self:tPrint(value, indent + 4, known)
|
||||||
|
known[value] = true
|
||||||
else
|
else
|
||||||
print(show(key), "=")
|
print("<known table> " .. self:PlainValue(value))
|
||||||
print(show(value))
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
print(string_rep(" ", indent) .. "}")
|
||||||
|
else
|
||||||
|
print(string_rep(" ", indent) .. self:PlainValue(key) .. " = ".. self:PlainValue(value))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
print(string_rep(" ", indent) .. "{}")
|
||||||
|
end
|
||||||
|
else
|
||||||
|
print(string_rep(" ", indent) .. tostring(val))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## Title: Grichelde
|
## Title: Grichelde
|
||||||
## Notes: Replaces characters you type in the chat box
|
## Notes: Replaces characters you type in the chat box
|
||||||
## Notes-de: Ersetzt eingegebene Zeichen in der Chat-Zeile
|
## Notes-de: Ersetzt eingegebene Zeichen in der Chat-Zeile
|
||||||
## Version: 0.2.2
|
## Version: 0.3.0
|
||||||
## Author: Teilzeit-Jedi
|
## Author: Teilzeit-Jedi
|
||||||
## eMail: tj@teilzeit-jedi.de
|
## eMail: tj@teilzeit-jedi.de
|
||||||
|
|
||||||
@ -14,8 +14,7 @@
|
|||||||
## X-Embeds: Ace3
|
## X-Embeds: Ace3
|
||||||
|
|
||||||
## OptionalDeps: Ace3
|
## OptionalDeps: Ace3
|
||||||
## SavedVariables: GrichseldeDB
|
## SavedVariables: GricheldeDB
|
||||||
## SavedVariablesPerCharacter: GrichseldePerCharDB
|
|
||||||
|
|
||||||
libs.xml
|
libs.xml
|
||||||
localisation.xml
|
localisation.xml
|
||||||
|
@ -1,122 +1,102 @@
|
|||||||
local AddonName, AddonTable = ...
|
local AddonName, _ = ...
|
||||||
local Grichelde = LibStub("AceAddon-3.0"):GetAddon(AddonName)
|
|
||||||
|
|
||||||
Grichelde.options = {
|
function Grichelde:CreateOptionsUI()
|
||||||
name = Grichelde.L.AddonName,
|
return {
|
||||||
|
name = self:Format(self.L.Options_Title, self.L.AddonName),
|
||||||
type = "group",
|
type = "group",
|
||||||
cmdHidden = true,
|
|
||||||
childGroups = "tab",
|
childGroups = "tab",
|
||||||
|
set = function(info, val) self:SyncToDatabase(info, val) end,
|
||||||
|
get = function(info) return self:ReadFromDatabase(info) end,
|
||||||
|
hidden = false,
|
||||||
|
disabled = function(info) return self:IsDisabled(info) end,
|
||||||
args = {
|
args = {
|
||||||
enabled = {
|
enabled = {
|
||||||
order = 0,
|
order = 0,
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = Grichelde.L.Options_Enabled_Name,
|
name = self.L.Options_Enabled_Name,
|
||||||
desc = Grichelde.L.Options_Enabled_Desc,
|
desc = self:Format(self.L.Options_Enabled_Desc, self.L.AddonName),
|
||||||
set = function(info, val) Grichelde.enabled = val end,
|
set = function(info, val) self.db.profile.enabled=val end,
|
||||||
get = function(info) return Grichelde.enabled end,
|
get = function(info) return self.db.profile.enabled end,
|
||||||
|
disabled = false,
|
||||||
},
|
},
|
||||||
|
|
||||||
channels = {
|
channels = {
|
||||||
order = 2,
|
order = 2,
|
||||||
type = "group",
|
type = "group",
|
||||||
name = Grichelde.L.Options_Channels_Group_Name,
|
name = self.L.Options_Channels_Group_Name,
|
||||||
desc = Grichelde.L.Options_Channels_Group_Desc,
|
desc = self:Format(self.L.Options_Channels_Group_Desc, self.L.AddonName),
|
||||||
args = {
|
args = {
|
||||||
say = {
|
say = {
|
||||||
order = 0,
|
order = 0,
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = Grichelde.L.Options_Channels_ChannelSay_Name,
|
name = self.L.Options_Channels_ChannelSay_Name,
|
||||||
desc = Grichelde.L.Options_Channels_ChannelSay_Desc,
|
desc = self:Format(self.L.Options_Channels_ChannelSay_Desc, self.L.AddonName),
|
||||||
set = function(info, val) Grichelde.enabled = val end,
|
|
||||||
get = function(info) return Grichelde.enabled end
|
|
||||||
},
|
},
|
||||||
emote = {
|
emote = {
|
||||||
order = 1,
|
order = 1,
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = Grichelde.L.Options_Channels_ChannelEmote_Name,
|
name = self.L.Options_Channels_ChannelEmote_Name,
|
||||||
desc = Grichelde.L.Options_Channels_ChannelEmote_Desc,
|
desc = self:Format(self.L.Options_Channels_ChannelEmote_Desc, self.L.AddonName),
|
||||||
set = function(info, val) Grichelde.enabled = val end,
|
|
||||||
get = function(info) return Grichelde.enabled end
|
|
||||||
},
|
},
|
||||||
yell = {
|
yell = {
|
||||||
order = 2,
|
order = 2,
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = Grichelde.L.Options_Channels_ChannelYell_Name,
|
name = self.L.Options_Channels_ChannelYell_Name,
|
||||||
desc = Grichelde.L.Options_Channels_ChannelYell_Desc,
|
desc = self:Format(self.L.Options_Channels_ChannelYell_Desc, self.L.AddonName),
|
||||||
set = function(info, val) Grichelde.enabled = val end,
|
|
||||||
get = function(info) return Grichelde.enabled end
|
|
||||||
},
|
},
|
||||||
party = {
|
party = {
|
||||||
order = 3,
|
order = 3,
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = Grichelde.L.Options_Channels_ChannelParty_Name,
|
name = self.L.Options_Channels_ChannelParty_Name,
|
||||||
desc = Grichelde.L.Options_Channels_ChannelParty_Desc,
|
desc = self:Format(self.L.Options_Channels_ChannelParty_Desc, self.L.AddonName),
|
||||||
set = function(info, val) Grichelde.enabled = val end,
|
|
||||||
get = function(info) return Grichelde.enabled end
|
|
||||||
},
|
},
|
||||||
partyLeader = {
|
partyLeader = {
|
||||||
order = 4,
|
order = 4,
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = Grichelde.L.Options_Channels_ChannelPartyLeader_Name,
|
name = self.L.Options_Channels_ChannelPartyLeader_Name,
|
||||||
desc = Grichelde.L.Options_Channels_ChannelPartyLeader_Desc,
|
desc = self:Format(self.L.Options_Channels_ChannelPartyLeader_Desc, self.L.AddonName),
|
||||||
set = function(info, val) Grichelde.enabled = val end,
|
|
||||||
get = function(info) return Grichelde.enabled end
|
|
||||||
},
|
},
|
||||||
guild = {
|
guild = {
|
||||||
order = 5,
|
order = 5,
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = Grichelde.L.Options_Channels_ChannelGuild_Name,
|
name = self.L.Options_Channels_ChannelGuild_Name,
|
||||||
desc = Grichelde.L.Options_Channels_ChannelGuild_Desc,
|
desc = self:Format(self.L.Options_Channels_ChannelGuild_Desc, self.L.AddonName),
|
||||||
set = function(info, val) Grichelde.enabled = val end,
|
|
||||||
get = function(info) return Grichelde.enabled end
|
|
||||||
},
|
},
|
||||||
officer = {
|
officer = {
|
||||||
order = 6,
|
order = 6,
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = Grichelde.L.Options_Channels_ChannelOfficer_Name,
|
name = self.L.Options_Channels_ChannelOfficer_Name,
|
||||||
desc = Grichelde.L.Options_Channels_ChannelOfficer_Desc,
|
desc = self:Format(self.L.Options_Channels_ChannelOfficer_Desc, self.L.AddonName),
|
||||||
set = function(info, val) Grichelde.enabled = val end,
|
|
||||||
get = function(info) return Grichelde.enabled end
|
|
||||||
},
|
},
|
||||||
raid = {
|
raid = {
|
||||||
order = 7,
|
order = 7,
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = Grichelde.L.Options_Channels_ChannelRaid_Name,
|
name = self.L.Options_Channels_ChannelRaid_Name,
|
||||||
desc = Grichelde.L.Options_Channels_ChannelRaid_Desc,
|
desc = self:Format(self.L.Options_Channels_ChannelRaid_Desc, self.L.AddonName),
|
||||||
set = function(info, val) Grichelde.enabled = val end,
|
|
||||||
get = function(info) return Grichelde.enabled end
|
|
||||||
},
|
},
|
||||||
raidLeader = {
|
raidLeader = {
|
||||||
order = 8,
|
order = 8,
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = Grichelde.L.Options_Channels_ChannelRaidLeader_Name,
|
name = self.L.Options_Channels_ChannelRaidLeader_Name,
|
||||||
desc = Grichelde.L.Options_Channels_ChannelRaidLeader_Desc,
|
desc = self:Format(self.L.Options_Channels_ChannelRaidLeader_Desc, self.L.AddonName),
|
||||||
set = function(info, val) Grichelde.enabled = val end,
|
|
||||||
get = function(info) return Grichelde.enabled end
|
|
||||||
},
|
},
|
||||||
instance = {
|
instance = {
|
||||||
order = 9,
|
order = 9,
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = Grichelde.L.Options_Channels_ChannelInstance_Name,
|
name = self.L.Options_Channels_ChannelInstance_Name,
|
||||||
desc = Grichelde.L.Options_Channels_ChannelInstance_Desc,
|
desc = self:Format(self.L.Options_Channels_ChannelInstance_Desc, self.L.AddonName),
|
||||||
set = function(info, val) Grichelde.enabled = val end,
|
|
||||||
get = function(info) return Grichelde.enabled end
|
|
||||||
},
|
},
|
||||||
battleground = {
|
battleground = {
|
||||||
order = 10,
|
order = 10,
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = Grichelde.L.Options_Channels_ChannelBattleground_Name,
|
name = self.L.Options_Channels_ChannelBattleground_Name,
|
||||||
desc = Grichelde.L.Options_Channels_ChannelBattleground_Desc,
|
desc = self:Format(self.L.Options_Channels_ChannelBattleground_Desc, self.L.AddonName),
|
||||||
set = function(info, val) Grichelde.enabled = val end,
|
|
||||||
get = function(info) return Grichelde.enabled end
|
|
||||||
},
|
},
|
||||||
whisper = {
|
whisper = {
|
||||||
order = 11,
|
order = 11,
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = Grichelde.L.Options_Channels_ChannelWhisper_Name,
|
name = self.L.Options_Channels_ChannelWhisper_Name,
|
||||||
desc = Grichelde.L.Options_Channels_ChannelWhisper_Desc,
|
desc = self:Format(self.L.Options_Channels_ChannelWhisper_Desc, self.L.AddonName),
|
||||||
set = function(info, val) Grichelde.enabled = val end,
|
|
||||||
get = function(info) return Grichelde.enabled end
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -124,68 +104,101 @@ Grichelde.options = {
|
|||||||
replacements = {
|
replacements = {
|
||||||
order = 3,
|
order = 3,
|
||||||
type = "group",
|
type = "group",
|
||||||
name = Grichelde.L.Options_Replacements_Group_Name,
|
name = self.L.Options_Replacements_Group_Name,
|
||||||
desc = Grichelde.L.Options_Replacements_Group_Desc,
|
desc = self.L.Options_Replacements_Group_Desc,
|
||||||
|
args = {
|
||||||
|
add = {
|
||||||
|
order = 0,
|
||||||
|
type = "execute",
|
||||||
|
name = self.L.Options_Replacements_Add_Name,
|
||||||
|
desc = self.L.Options_Replacements_Add_Desc,
|
||||||
|
},
|
||||||
|
deleteAll = {
|
||||||
|
order = 0,
|
||||||
|
type = "execute",
|
||||||
|
confirm = "",
|
||||||
|
name = self.L.Options_Replacements_DeleteAll_Name,
|
||||||
|
desc = self.L.Options_Replacements_DeleteAll_Desc,
|
||||||
|
},
|
||||||
|
replacement_0 = {
|
||||||
|
order = 0,
|
||||||
|
type = "group",
|
||||||
|
name = self.L.Options_Replacement_Group_Name,
|
||||||
|
desc = self.L.Options_Replacement_Group_Desc,
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
args = {
|
args = {
|
||||||
searchText = {
|
searchText = {
|
||||||
order = 0,
|
order = 0,
|
||||||
type = "input",
|
type = "input",
|
||||||
name = Grichelde.L.Options_Replacements_SearchText_Name,
|
name = self.L.Options_Replacement_SearchText_Name,
|
||||||
desc = Grichelde.L.Options_Replacements_SearchText_Desc,
|
desc = self.L.Options_Replacement_SearchText_Desc,
|
||||||
set = function(info, val) Grichelde.enabled = val end,
|
|
||||||
get = function(info) return Grichelde.enabled end
|
|
||||||
},
|
},
|
||||||
replacetext = {
|
replaceText = {
|
||||||
order = 1,
|
order = 1,
|
||||||
type = "input",
|
type = "input",
|
||||||
name = Grichelde.L.Options_Replacements_ReplaceText_Name,
|
name = self.L.Options_Replacement_ReplaceText_Name,
|
||||||
desc = Grichelde.L.Options_Replacements_ReplaceText_Desc,
|
desc = self.L.Options_Replacement_ReplaceText_Desc,
|
||||||
set = function(info, val) Grichelde.enabled = val end,
|
|
||||||
get = function(info) return Grichelde.enabled end
|
|
||||||
},
|
},
|
||||||
caseSensitive = {
|
caseSensitive = {
|
||||||
order = 2,
|
order = 2,
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = Grichelde.L.Options_Replacements_CaseSensitive_Name,
|
name = self.L.Options_Replacement_CaseSensitive_Name,
|
||||||
desc = Grichelde.L.Options_Replacements_CaseSensitive_Desc,
|
desc = self.L.Options_Replacement_CaseSensitive_Desc,
|
||||||
set = function(info, val) Grichelde.enabled = val end,
|
},
|
||||||
get = function(info) return Grichelde.enabled end },
|
|
||||||
consolidate = {
|
consolidate = {
|
||||||
order = 3,
|
order = 3,
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = Grichelde.L.Options_Replacements_Consolidate_Name,
|
name = self.L.Options_Replacement_Consolidate_Name,
|
||||||
desc = Grichelde.L.Options_Replacements_Consolidate_Desc,
|
desc = self.L.Options_Replacement_Consolidate_Desc,
|
||||||
set = function(info, val) Grichelde.enabled = val end,
|
width = 2
|
||||||
get = function(info) return Grichelde.enabled end
|
},
|
||||||
}
|
deleteAll = {
|
||||||
}
|
order = 4,
|
||||||
}
|
type = "execute",
|
||||||
|
confirm = "",
|
||||||
|
name = self.L.Options_Replacement_Delete_Name,
|
||||||
|
desc = self.L.Options_Replacement_Delete_Desc,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
local Grichelde_DB_Defaults = {
|
local Grichelde_DefaultConfig = {
|
||||||
|
global = {},
|
||||||
profile = {
|
profile = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
channels = {
|
channels = {
|
||||||
"SAY", "EMOTE", "YELL", "PARTY", "GUILD"
|
["*"] = false,
|
||||||
|
say = true,
|
||||||
|
emote = false,
|
||||||
|
yell = true,
|
||||||
|
party = true,
|
||||||
|
partyLeader = true,
|
||||||
|
guild = true,
|
||||||
|
officer = true,
|
||||||
},
|
},
|
||||||
replacements = {
|
replacements = {
|
||||||
["**"] = {
|
["**"] = {
|
||||||
left = "",
|
searchText = "",
|
||||||
right = "",
|
replaceText = "",
|
||||||
caseSensitive = false,
|
caseSensitive = false,
|
||||||
consolidate = true,
|
consolidate = true,
|
||||||
},
|
},
|
||||||
replacement = {
|
replacement_0 = {
|
||||||
left = "s",
|
order = 1,
|
||||||
right = "ch",
|
searchText = "s",
|
||||||
|
replaceText = "ch",
|
||||||
caseSensitive = false,
|
caseSensitive = false,
|
||||||
consolidate = true,
|
consolidate = true,
|
||||||
},
|
},
|
||||||
replacement = {
|
replacement_1 = {
|
||||||
left = "t",
|
order = 2,
|
||||||
right = "ck",
|
searchText = "t",
|
||||||
|
replaceText = "ck",
|
||||||
caseSensitive = false,
|
caseSensitive = false,
|
||||||
consolidate = true,
|
consolidate = true,
|
||||||
}
|
}
|
||||||
@ -195,23 +208,25 @@ local Grichelde_DB_Defaults = {
|
|||||||
|
|
||||||
function Grichelde:LoadDatabase()
|
function Grichelde:LoadDatabase()
|
||||||
-- Called when the addon is loaded
|
-- Called when the addon is loaded
|
||||||
self.DB = LibStub("AceDB-3.0"):New(AddonName .."DB", Grichelde_DB_Defaults, true)
|
self.db = LibStub("AceDB-3.0"):New(AddonName .."DB", Grichelde_DefaultConfig, true)
|
||||||
self.DB.RegisterCallback(self, "OnProfileChanged", "RefreshConfig")
|
self.db.RegisterCallback(self, "OnProfileChanged", "RefreshConfig")
|
||||||
self.DB.RegisterCallback(self, "OnProfileCopied", "RefreshConfig")
|
self.db.RegisterCallback(self, "OnProfileCopied", "RefreshConfig")
|
||||||
self.DB.RegisterCallback(self, "OnProfileReset", "RefreshConfig")
|
self.db.RegisterCallback(self, "OnProfileReset", "RefreshConfig")
|
||||||
|
|
||||||
local activeProfile = self.DB:GetCurrentProfile()
|
|
||||||
self:Print("current profile " .. activeProfile)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function Grichelde:SetupOptions()
|
function Grichelde:SetupOptions()
|
||||||
-- add DB-backed profiles to UI options
|
-- add DB-backed profiles to UI options
|
||||||
self.options.args.profile = LibStub("AceDBOptions-3.0"):GetOptionsTable(self.DB)
|
self.options = self:CreateOptionsUI()
|
||||||
-- self.options.args.profile.order = 1
|
self.options.args.profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(self.db)
|
||||||
|
self.options.args.profiles.disabled = false
|
||||||
|
|
||||||
|
local activeProfile = self.db:GetCurrentProfile()
|
||||||
|
self:PrefixedPrint(self.L.Profiles_Loaded, _G.GREEN_FONT_COLOR_CODE, activeProfile, "|r")
|
||||||
|
self:tPrint(self.db.profile)
|
||||||
|
|
||||||
-- Adding options to blizzard frame
|
-- Adding options to blizzard frame
|
||||||
self.Config = LibStub("AceConfig-3.0"):RegisterOptionsTable(AddonName, self.options)
|
LibStub("AceConfig-3.0"):RegisterOptionsTable(AddonName, self.options)
|
||||||
self.Dialog = LibStub("AceConfigDialog-3.0"):AddToBlizOptions(AddonName, self.L.AddonName)
|
LibStub("AceConfigDialog-3.0"):AddToBlizOptions(AddonName, self.L.AddonName)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Grichelde:SetupSlashCommands()
|
function Grichelde:SetupSlashCommands()
|
||||||
@ -229,104 +244,37 @@ function Grichelde:SetupSlashCommands()
|
|||||||
self:RegisterChatCommand("gri", HandleSlashCommand)
|
self:RegisterChatCommand("gri", HandleSlashCommand)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Grichelde:RefreshConfig(name)
|
function Grichelde:SyncToDatabase(info, val)
|
||||||
self:Print("Refreshed: " .. name)
|
local option = self.db.profile
|
||||||
|
local path = 1
|
||||||
|
while ( path < #info) do
|
||||||
|
option = option[info[path]] -- or nil
|
||||||
|
path = path + 1
|
||||||
|
end
|
||||||
|
local optionPath = strjoin(".", unpack(info, 1, #info))
|
||||||
|
self:DebugPrint("change option \"%s\" from %s to %s", optionPath, tostring(option[info[path]]), tostring(val))
|
||||||
|
option[info[path]] = val
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[
|
function Grichelde:ReadFromDatabase(info)
|
||||||
-- profile actions
|
local option = self.db.profile
|
||||||
function Grichelde:SaveProfile(name)
|
local path = 1
|
||||||
local toCopy = self.db:GetCurrentProfile()
|
while (path <= #info) do
|
||||||
if name and name ~= toCopy then
|
option = option[info[path]] -- or nil
|
||||||
self.db:SetProfile(name)
|
path = path + 1
|
||||||
self.db:CopyProfile(toCopy)
|
|
||||||
end
|
end
|
||||||
|
local optionPath = strjoin(".", unpack(info, 1, #info))
|
||||||
|
self:DebugPrint("read option \"%s\": %s", optionPath, tostring(option))
|
||||||
|
return option
|
||||||
end
|
end
|
||||||
|
|
||||||
function Grichelde:SetProfile(name)
|
function Grichelde:IsDisabled(info)
|
||||||
local profile = self:MatchProfile(name)
|
if info.option.type == "group" then
|
||||||
if profile and profile ~= self.db:GetCurrentProfile() then
|
return false
|
||||||
self.db:SetProfile(profile)
|
|
||||||
else
|
|
||||||
self:Printf(L.Options_Profile_Invalid, name or "null")
|
|
||||||
end
|
end
|
||||||
|
return not self.db.profile.enabled
|
||||||
end
|
end
|
||||||
|
|
||||||
function Grichelde:DeleteProfile(name)
|
function Grichelde:RefreshConfig(event)
|
||||||
local profile = self:MatchProfile(name)
|
self:Print(self.L.Profiles_Refreshed, _G.GREEN_FONT_COLOR_CODE, self.db:GetCurrentProfile(), "|r")
|
||||||
if profile and profile ~= self.db:GetCurrentProfile() then
|
|
||||||
self.db:DeleteProfile(profile)
|
|
||||||
else
|
|
||||||
self:Print(L.Options_Profile_DeleteError)
|
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
function Grichelde:CopyProfile(name)
|
|
||||||
if name and name ~= self.db:GetCurrentProfile() then
|
|
||||||
self.db:CopyProfile(name)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function Grichelde:ResetProfile()
|
|
||||||
self.db:ResetProfile()
|
|
||||||
end
|
|
||||||
|
|
||||||
function Grichelde:ListProfiles()
|
|
||||||
self:Print(L.Options_Profile_Available)
|
|
||||||
|
|
||||||
local current = self.db:GetCurrentProfile()
|
|
||||||
for _, k in ipairs(self.db:GetProfiles()) do
|
|
||||||
if k == current then
|
|
||||||
print(" - " .. k, 1, 1, 0)
|
|
||||||
else
|
|
||||||
print(" - " .. k)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function Grichelde:MatchProfile(name)
|
|
||||||
name = name:lower()
|
|
||||||
|
|
||||||
local nameRealm = name .. " - " .. GetRealmName():lower()
|
|
||||||
local match
|
|
||||||
|
|
||||||
for _, k in ipairs(self.db:GetProfiles()) do
|
|
||||||
local key = k:lower()
|
|
||||||
if key == name then
|
|
||||||
return k
|
|
||||||
elseif key == nameRealm then
|
|
||||||
match = k
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return match
|
|
||||||
end
|
|
||||||
|
|
||||||
-- profile events
|
|
||||||
function Grichelde:OnNewProfile(msg, db, name)
|
|
||||||
self:Printf(L.Options_Profile_Created, name)
|
|
||||||
end
|
|
||||||
|
|
||||||
function Grichelde:OnProfileDeleted(msg, db, name)
|
|
||||||
self:Printf(L.Options_Profile_Deleted, name)
|
|
||||||
end
|
|
||||||
|
|
||||||
function Grichelde:OnProfileChanged(msg, db, name)
|
|
||||||
self:Printf(L.Options_Profile_Loaded, name)
|
|
||||||
self:Load()
|
|
||||||
end
|
|
||||||
|
|
||||||
function Grichelde:OnProfileCopied(msg, db, name)
|
|
||||||
self:Printf(L.Options_Profile_Copied, name)
|
|
||||||
self:Reload()
|
|
||||||
end
|
|
||||||
|
|
||||||
function Grichelde:OnProfileReset(msg, db)
|
|
||||||
self:Printf(L.Options_Profile_Reset, db:GetCurrentProfile())
|
|
||||||
self:Reload()
|
|
||||||
end
|
|
||||||
|
|
||||||
function Grichelde:OnProfileShutdown(msg, db, name)
|
|
||||||
self:Unload()
|
|
||||||
end
|
|
||||||
]]--
|
|
||||||
|
|
||||||
|
BIN
grichelde.tga
Normal file
BIN
grichelde.tga
Normal file
Binary file not shown.
@ -3,56 +3,69 @@ if not L then return end
|
|||||||
|
|
||||||
-- system messages
|
-- system messages
|
||||||
L.AddonName = "Grichelde"
|
L.AddonName = "Grichelde"
|
||||||
L.AddonLoaded = 'Grichelde hilft Euch jetzt bei euren Sprachschwierigkeiten.'
|
L.AddonLoaded = "%s hilft Euch jetzt bei euren Sprachschwierigkeiten."
|
||||||
|
L.Addon_Detected_Misspelled = "Das Addon 'Misspelled' wurde erkannt und alle Nachrichten werden automatisch bereinigt."
|
||||||
|
L.Addon_Detected_WIM = "Das Addon 'WIM' wurde erkannt und alle Flüsternnachrichten aus IM-Fenster werden behandelt."
|
||||||
|
|
||||||
-- profiles
|
-- profiles
|
||||||
L.Options_Profile_Available = "Verf\195\188gbare Profile:"
|
L.Profiles_Available = "Verf\195\188gbare Profile:"
|
||||||
L.Options_Profile_Created = "Neues Profil \"%s\" angelegt"
|
L.Profiles_Created = "Neues Profil %s%s%s angelegt."
|
||||||
L.Options_Profile_Loaded = "Profil \"%s\" geladen"
|
L.Profiles_Loaded = "Profil %s%s%s geladen."
|
||||||
L.Options_Profile_Deleted = "Profil \"%s\" gel\195\182scht"
|
L.Profiles_Refreshed = "Profil %s%s%s aktualisiert."
|
||||||
L.Options_Profile_Copied = "Einstellungen von Profil \"%s\" \195\188bernommen"
|
L.Profiles_Deleted = "Profil %s%s%s gel\195\182scht."
|
||||||
L.Options_Profile_Reset = "Profil \"%s\" zur\195\188ckgesetzt"
|
L.Profiles_Copied = "Einstellungen von Profil %s%s%s \195\188bernommen."
|
||||||
L.Options_Profile_Invalid = "Ung\195\188ltiges Profil \"%s\""
|
L.Profiles_Reset = "Profil %s%s%s zur\195\188ckgesetzt."
|
||||||
L.Options_Profile_DeleteError = "Das aktuelle Profil kann nicht gel\195\182scht werden"
|
L.Profiles_Invalid = "Ung\195\188ltiges Profil %s%s%s!"
|
||||||
|
L.Profiles_DeleteError = "Das aktive Profil kann nicht gel\195\182scht werden!"
|
||||||
|
|
||||||
-- options
|
-- options
|
||||||
|
L.Options_Title = "%s Einstellungen"
|
||||||
L.Options_Enabled_Name = "Aktiv"
|
L.Options_Enabled_Name = "Aktiv"
|
||||||
L.Options_Enabled_Desc = "Aktiviert Grichelde"
|
L.Options_Enabled_Desc = "Aktiviert %s"
|
||||||
|
|
||||||
L.Options_Channels_Group_Name = "Kan\195\164le"
|
L.Options_Channels_Group_Name = "Kan\195\164le"
|
||||||
L.Options_Channels_Group_Desc = "Grichelde ist in folgenden Kan\195\164len aktiv."
|
L.Options_Channels_Group_Desc = "%s ist in folgenden Kan\195\164len aktiv."
|
||||||
L.Options_Channels_ChannelSay_Name = "Sagen"
|
L.Options_Channels_ChannelSay_Name = "Sagen"
|
||||||
L.Options_Channels_ChannelSay_Desc = "Aktiviert Grichelde im Kanal \"Sagen\""
|
L.Options_Channels_ChannelSay_Desc = "Aktiviert %s im Kanal \"Sagen\"."
|
||||||
L.Options_Channels_ChannelEmote_Name = "Emote"
|
L.Options_Channels_ChannelEmote_Name = "Emote"
|
||||||
L.Options_Channels_ChannelEmote_Desc = "Aktiviert Grichelde im Kanal \"Emote\""
|
L.Options_Channels_ChannelEmote_Desc = "Aktiviert %s im Kanal \"Emote\"."
|
||||||
L.Options_Channels_ChannelYell_Name = "Schreien"
|
L.Options_Channels_ChannelYell_Name = "Schreien"
|
||||||
L.Options_Channels_ChannelYell_Desc = "Aktiviert Grichelde im Kanal \"Schreien\""
|
L.Options_Channels_ChannelYell_Desc = "Aktiviert %s im Kanal \"Schreien\"."
|
||||||
L.Options_Channels_ChannelParty_Name = "Gruppe"
|
L.Options_Channels_ChannelParty_Name = "Gruppe"
|
||||||
L.Options_Channels_ChannelParty_Desc = "Aktiviert Grichelde im Kanal \"Gruppe\""
|
L.Options_Channels_ChannelParty_Desc = "Aktiviert %s im Kanal \"Gruppe\"."
|
||||||
L.Options_Channels_ChannelPartyLeader_Name = "Gruppenanf\195\188hrer"
|
L.Options_Channels_ChannelPartyLeader_Name = "Gruppenanf\195\188hrer"
|
||||||
L.Options_Channels_ChannelPartyLeader_Desc = "Aktiviert Grichelde im Kanal \"Gruppenanf\195\188hrer\""
|
L.Options_Channels_ChannelPartyLeader_Desc = "Aktiviert %s im Kanal \"Gruppenanf\195\188hrer\"."
|
||||||
L.Options_Channels_ChannelGuild_Name = "Gilde"
|
L.Options_Channels_ChannelGuild_Name = "Gilde"
|
||||||
L.Options_Channels_ChannelGuild_Desc = "Aktiviert Grichelde im Kanal \"Gilde\""
|
L.Options_Channels_ChannelGuild_Desc = "Aktiviert %s im Kanal \"Gilde\"."
|
||||||
L.Options_Channels_ChannelOfficer_Name = "Offiziere"
|
L.Options_Channels_ChannelOfficer_Name = "Offiziere"
|
||||||
L.Options_Channels_ChannelOfficer_Desc = "Aktiviert Grichelde im Kanal \"Offiziere\""
|
L.Options_Channels_ChannelOfficer_Desc = "Aktiviert %s im Kanal \"Offiziere\"."
|
||||||
L.Options_Channels_ChannelRaid_Name = "Schlachtzug"
|
L.Options_Channels_ChannelRaid_Name = "Schlachtzug"
|
||||||
L.Options_Channels_ChannelRaid_Desc = "Aktiviert Grichelde im Kanal \"Schlachtzug\""
|
L.Options_Channels_ChannelRaid_Desc = "Aktiviert %s im Kanal \"Schlachtzug\"."
|
||||||
L.Options_Channels_ChannelRaidLeader_Name = "Schlachtzugsanf\195\188hrer"
|
L.Options_Channels_ChannelRaidLeader_Name = "Schlachtzugsanf\195\188hrer"
|
||||||
L.Options_Channels_ChannelRaidLeader_Desc = "Aktiviert Grichelde im Kanal \"Schlachtzugsanf\195\188hrer\""
|
L.Options_Channels_ChannelRaidLeader_Desc = "Aktiviert %s im Kanal \"Schlachtzugsanf\195\188hrer\"."
|
||||||
L.Options_Channels_ChannelInstance_Name = "Instanz"
|
L.Options_Channels_ChannelInstance_Name = "Instanz"
|
||||||
L.Options_Channels_ChannelInstance_Desc = "Aktiviert Grichelde im Kanal \"Instanz\""
|
L.Options_Channels_ChannelInstance_Desc = "Aktiviert %s im Kanal \"Instanz\"."
|
||||||
L.Options_Channels_ChannelBattleground_Name = "Schlachtfeld"
|
L.Options_Channels_ChannelBattleground_Name = "Schlachtfeld"
|
||||||
L.Options_Channels_ChannelBattleground_Desc = "Aktiviert Grichelde im Kanal \"Schlachtfeld\""
|
L.Options_Channels_ChannelBattleground_Desc = "Aktiviert %s im Kanal \"Schlachtfeld\"."
|
||||||
L.Options_Channels_ChannelWhisper_Name = "Fl\195\188stern"
|
L.Options_Channels_ChannelWhisper_Name = "Fl\195\188stern"
|
||||||
L.Options_Channels_ChannelWhisper_Desc = "Aktiviert Grichelde im Kanal \"Fl\195\188stern\""
|
L.Options_Channels_ChannelWhisper_Desc = "Aktiviert %s im Kanal \"Fl\195\188stern\"."
|
||||||
|
|
||||||
L.Options_Replacements_Group_Name = "Ersetzungen"
|
L.Options_Replacements_Group_Name = "Ersetzungen"
|
||||||
L.Options_Replacements_Group_Desc = "Diese Vorkommen werden in den aktivierten Kan\195\164len ersetzt"
|
L.Options_Replacements_Group_Desc = "Diese Vorkommen werden in den aktivierten Kan\195\164len ersetzt."
|
||||||
L.Options_Replacements_SearchText_Name = "Suchtext:"
|
L.Options_Replacements_Add_Name = "Hinzu"
|
||||||
L.Options_Replacements_SearchText_Desc = "Dieser Text wird in der Chateingabe gesucht"
|
L.Options_Replacements_Add_Desc = "F\195\188gt eine neue Zuordnung hinzu."
|
||||||
L.Options_Replacements_ReplaceText_Name = "Ersetzung:"
|
L.Options_Replacements_DeleteAll_Name = "Alle L\195\182schen"
|
||||||
L.Options_Replacements_ReplaceText_Desc = "Jeder Suchtreffer wird mit diesem Text ersetzt"
|
L.Options_Replacements_DeleteAll_Desc = "L\195\182scht alle Zuweisungen."
|
||||||
L.Options_Replacements_CaseSensitive_Name = "Gro\195\159- und Kleinschreibung beachten"
|
|
||||||
L.Options_Replacements_CaseSensitive_Desc = "Groß\195\159buchstaben werden mit Gro\195\159buchstaben ersetzt"
|
L.Options_Replacement_Group_Name = "Ersetzung"
|
||||||
L.Options_Replacements_Consolidate_Name = "Fa\195\159e aufeinanderfolgende Treffer zusammen"
|
L.Options_Replacement_Group_Desc = "Dieses Vorkommen wird in den aktivierten Kan\195\164len ersetzt."
|
||||||
L.Options_Replacements_Consolidate_Desc = "Wenn durch die Ersetzung die Zeichenfolge mehrfach hintereinander steht,|nfasse sie zu einem Vorkommen zusammen."
|
L.Options_Replacement_SearchText_Name = "Suchtext:"
|
||||||
|
L.Options_Replacement_SearchText_Desc = "Dieser Text wird in der Chateingabe gesucht."
|
||||||
|
L.Options_Replacement_ReplaceText_Name = "Ersetzung:"
|
||||||
|
L.Options_Replacement_ReplaceText_Desc = "Jeder Suchtreffer wird mit diesem Text ersetzt."
|
||||||
|
L.Options_Replacement_CaseSensitive_Name = "Gro\195\159- und Kleinschreibung beachten"
|
||||||
|
L.Options_Replacement_CaseSensitive_Desc = "Groß\195\159buchstaben werden mit Gro\195\159buchstaben ersetzt."
|
||||||
|
L.Options_Replacement_Consolidate_Name = "Fa\195\159e aufeinanderfolgende Treffer zusammen"
|
||||||
|
L.Options_Replacement_Consolidate_Desc = "Wenn durch die Ersetzung die Zeichenfolge mehrfach hintereinander steht,|nfasse sie zu einem Vorkommen zusammen."
|
||||||
|
L.Options_Replacement_Delete_Name = "L\195\182schen"
|
||||||
|
L.Options_Replacement_Delete_Desc = "L\195\182scht diese Zuweisung."
|
||||||
|
@ -3,56 +3,70 @@ if not L then return end
|
|||||||
|
|
||||||
-- system messages
|
-- system messages
|
||||||
L.AddonName = "Grichelde"
|
L.AddonName = "Grichelde"
|
||||||
L.AddonLoaded = 'Grichelde now helps you with your spelling disabilities.'
|
L.AddonLoaded = "%s now helps you with your spelling disabilities."
|
||||||
|
L.Addon_Detected_Misspelled = "Addon 'Misspelled' has been detected and any messsage will be cleansed automatically."
|
||||||
|
L.Addon_Detected_WIM = "Das Addon 'WIM' has been detected and any whispers will be handled from IM windows."
|
||||||
|
|
||||||
|
|
||||||
-- profiles
|
-- profiles
|
||||||
L.Options_Profile_Available = "Verf\195\188gbare Profile:"
|
L.Profiles_Available = "Available profiles:"
|
||||||
L.Options_Profile_Created = "New profile \"%s\" created"
|
L.Profiles_Created = "New profile \"%s\" created."
|
||||||
L.Options_Profile_Loaded = "Profile \"%s\" loaded"
|
L.Profiles_Loaded = "Profile %s%s%s is loaded."
|
||||||
L.Options_Profile_Deleted = "Profile \"%s\" deleted"
|
L.Profiles_Refreshed = "Profil %s%s%s refreshed."
|
||||||
L.Options_Profile_Copied = "Settings applied from profile \"%s\""
|
L.Profiles_Deleted = "Profile %s%s%s deleted."
|
||||||
L.Options_Profile_Reset = "Profil \"%s\" reset"
|
L.Profiles_Copied = "Settings applied from profile %s%s%s."
|
||||||
L.Options_Profile_Invalid = "Invalid profile \"%s\""
|
L.Profiles_Reset = "Profil %s%s%s reset."
|
||||||
L.Options_Profile_DeleteError = "The current profile cannot be deleted"
|
L.Profiles_Invalid = "Invalid profile %s%s%s!"
|
||||||
|
L.Profiles_DeleteError = "The active profile cannot be deleted!"
|
||||||
|
|
||||||
-- options
|
-- options
|
||||||
|
L.Options_Title = "%s Options"
|
||||||
L.Options_Enabled_Name = "Enabled"
|
L.Options_Enabled_Name = "Enabled"
|
||||||
L.Options_Enabled_Desc = "Enables Grichelde"
|
L.Options_Enabled_Desc = "Enables %s"
|
||||||
|
|
||||||
L.Options_Channels_Group_Name = "Channels"
|
L.Options_Channels_Group_Name = "Channels"
|
||||||
L.Options_Channels_Group_Desc = "Grichelde is active in the following channels."
|
L.Options_Channels_Group_Desc = "%s is active in the following channels."
|
||||||
L.Options_Channels_ChannelSay_Name = "Say"
|
L.Options_Channels_ChannelSay_Name = "Say"
|
||||||
L.Options_Channels_ChannelSay_Desc = "Activates Grichelde in channel \"Say\""
|
L.Options_Channels_ChannelSay_Desc = "Activates %s in channel \"Say\"."
|
||||||
L.Options_Channels_ChannelEmote_Name = "Emote"
|
L.Options_Channels_ChannelEmote_Name = "Emote"
|
||||||
L.Options_Channels_ChannelEmote_Desc = "Activates Grichelde in channel \"Emote\""
|
L.Options_Channels_ChannelEmote_Desc = "Activates %s in channel \"Emote\"."
|
||||||
L.Options_Channels_ChannelYell_Name = "Yell"
|
L.Options_Channels_ChannelYell_Name = "Yell"
|
||||||
L.Options_Channels_ChannelYell_Desc = "Activates Grichelde in channel \"Yell\""
|
L.Options_Channels_ChannelYell_Desc = "Activates %s in channel \"Yell\"."
|
||||||
L.Options_Channels_ChannelParty_Name = "Party"
|
L.Options_Channels_ChannelParty_Name = "Party"
|
||||||
L.Options_Channels_ChannelParty_Desc = "Activates Grichelde in channel \"Party\""
|
L.Options_Channels_ChannelParty_Desc = "Activates %s in channel \"Party\"."
|
||||||
L.Options_Channels_ChannelPartyLeader_Name = "Party Leader"
|
L.Options_Channels_ChannelPartyLeader_Name = "Party Leader"
|
||||||
L.Options_Channels_ChannelPartyLeader_Desc = "Aktiviert Activates im in channel \"Party Leader\""
|
L.Options_Channels_ChannelPartyLeader_Desc = "Activates %s in channel \"Party Leader\"."
|
||||||
L.Options_Channels_ChannelGuild_Name = "Guild"
|
L.Options_Channels_ChannelGuild_Name = "Guild"
|
||||||
L.Options_Channels_ChannelGuild_Desc = "Activates Grichelde in channel \"Guild\""
|
L.Options_Channels_ChannelGuild_Desc = "Activates %s in channel \"Guild\"."
|
||||||
L.Options_Channels_ChannelOfficer_Name = "Officers"
|
L.Options_Channels_ChannelOfficer_Name = "Officers"
|
||||||
L.Options_Channels_ChannelOfficer_Desc = "Activates Grichelde in channel \"Officers\""
|
L.Options_Channels_ChannelOfficer_Desc = "Activates %s in channel \"Officers\"."
|
||||||
L.Options_Channels_ChannelRaid_Name = "Raid"
|
L.Options_Channels_ChannelRaid_Name = "Raid"
|
||||||
L.Options_Channels_ChannelRaid_Desc = "Activates Grichelde in channel \"Raid\""
|
L.Options_Channels_ChannelRaid_Desc = "Activates %s in channel \"Raid\"."
|
||||||
L.Options_Channels_ChannelRaidLeader_Name = "Raid Leader"
|
L.Options_Channels_ChannelRaidLeader_Name = "Raid Leader"
|
||||||
L.Options_Channels_ChannelRaidLeader_Desc = "Aktiviert Activates im in channel \"Raid Leader\""
|
L.Options_Channels_ChannelRaidLeader_Desc = "Activates %s in channel \"Raid Leader\"."
|
||||||
L.Options_Channels_ChannelInstance_Name = "Instance"
|
L.Options_Channels_ChannelInstance_Name = "Instance"
|
||||||
L.Options_Channels_ChannelInstance_Desc = "Activates Grichelde in channel \"Instance\""
|
L.Options_Channels_ChannelInstance_Desc = "Activates %s in channel \"Instance\"."
|
||||||
L.Options_Channels_ChannelBattleground_Name = "Battleground"
|
L.Options_Channels_ChannelBattleground_Name = "Battleground"
|
||||||
L.Options_Channels_ChannelBattleground_Desc = "Aktiviert Activates im in channel \"Battleground\""
|
L.Options_Channels_ChannelBattleground_Desc = "Activates %s in channel \"Battleground\"."
|
||||||
L.Options_Channels_ChannelWhisper_Name = "Whisper"
|
L.Options_Channels_ChannelWhisper_Name = "Whisper"
|
||||||
L.Options_Channels_ChannelWhisper_Desc = "Activates Grichelde in channel \"Whisper\""
|
L.Options_Channels_ChannelWhisper_Desc = "Activates %s in channel \"Whisper\"."
|
||||||
|
|
||||||
L.Options_Replacements_Group_Name = "Replacements"
|
L.Options_Replacements_Group_Name = "Replacements"
|
||||||
L.Options_Replacements_Group_Desc = "These lookups will be replaced in activated channels"
|
L.Options_Replacements_Group_Desc = "These lookups will be replaced in activated channels."
|
||||||
L.Options_Replacements_SearchText_Name = "Search for:"
|
L.Options_Replacements_Add_Name = "Add"
|
||||||
L.Options_Replacements_SearchText_Desc = "This text is looked up in your chat input box"
|
L.Options_Replacements_Add_Desc = "Add a new replacement mapping."
|
||||||
L.Options_Replacements_ReplaceText_Name = "Replacement:"
|
L.Options_Replacements_DeleteAll_Name = "Delete All"
|
||||||
L.Options_Replacements_ReplaceText_Desc = "Any match will be replaced with this text"
|
L.Options_Replacements_DeleteAll_Desc = "Delete all replacement mappings."
|
||||||
L.Options_Replacements_CaseSensitive_Name = "case sensitive"
|
|
||||||
L.Options_Replacements_CaseSensitive_Desc = "Honour uppercase and lowercase on replacement"
|
L.Options_Replacement_Group_Name = "Mapping"
|
||||||
L.Options_Replacements_Consolidate_Name = "consolidate consecutive matches"
|
L.Options_Replacement_Group_Desc = "This lookup will be replaced in activated channels."
|
||||||
L.Options_Replacements_Consolidate_Desc = "If after the replacement a text sequence is repeated directly after another, treat them as one occurrence."
|
L.Options_Replacement_SearchText_Name = "Search for:"
|
||||||
|
L.Options_Replacement_SearchText_Desc = "This text is looked up in your chat input box."
|
||||||
|
L.Options_Replacement_ReplaceText_Name = "Replacement:"
|
||||||
|
L.Options_Replacement_ReplaceText_Desc = "Any match will be replaced with this text."
|
||||||
|
L.Options_Replacement_CaseSensitive_Name = "case sensitive"
|
||||||
|
L.Options_Replacement_CaseSensitive_Desc = "Will not replace occurrences if cases differ."
|
||||||
|
L.Options_Replacement_Consolidate_Name = "consolidate consecutive matches"
|
||||||
|
L.Options_Replacement_Consolidate_Desc = "If after the replacement a text sequence is repeated|ndirectly after another, treat them as one occurrence."
|
||||||
|
L.Options_Replacement_Delete_Name = "Delete"
|
||||||
|
L.Options_Replacement_Delete_Desc = "Delete this replacement mapping."
|
||||||
|
BIN
twitch/grichelde.png
Normal file
BIN
twitch/grichelde.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
Loading…
x
Reference in New Issue
Block a user