Closed Meivyn closed 6 years ago
Encoding issues should now be fixed.
Hello. Thank you for helping with the translation again but I do the localization on CurseForge. I happily update the credits page with your new name but please look at https://wow.curseforge.com/projects/bestinslotredux/localization first as your previous work might already be added to the project.
I see now what you mean with the encoding errors. I'm currently going through the other localizations as the import from the old files didn't encode as they should. Stupid utf-8 annoyance.
I added your translations to the curseforge page but feel free to look over them in case the import got weird again. I'll update with your new name in the credits page with the next release.
It looks like some strings has been mixed with old translation and some have issues. I will update all strings directly from CurseForge if that's easier for you.
Would be perfect. Have been going through translations all day but I'm mostly just using google translate between what looks to match most between your old and new translations.
I will continue to maintain it since some strings maybe need edits and some of them are translated out of context, as I don't have it really. Most of them aren't used by BestInSlot in game so I couldn't figure it out.
Yeah I've noticed that too. My current plans are to get all the localization's up again and then I'm gonna go through and see what lines are unused and can be removed. Would you want me to add you as a translator on the Curse project page?
Would be a pleasure.
Let me know if I need to update it when you do some modifications. I'll start editing strings now.
Will do. What's your curse account name so I can add you?
Same as my GitHub :)
It's also because some of the features like /bis help
don't actually work. So can't see the context.
Tried my best to translate WITH the context and not blindly as it's not totally the same as english. Needs adaptations.
I could try to list you strings I "think" aren't used if that's can help you.
Also, can you "reset" the translation on CurseForge? Would be easier for me to translate from scratch.
Yeah, I've made a ticket to myself to look up why /bis help
doesn't work as it's a known bug.
A list of string you think aren't used would be useful so I can go through the files for them later. No rush though.
As for resetting the translation, I've searched for such feature but I've been forced to delete them one by one myself. I can give you permission to delete translated strings temporarily so you can remove them as you work through the lines.
That's fine for me. I'll start translating in a couple of minutes.
I will create a list of unused strings at the same time I'm translating. But be warned that some may be because /bis help
doesn't work as I can't see strings used by the command. Maybe you can let me know where are the original strings in add-on files?
And for the command, I have this LUA error in game:
21x BestInSlotRedux\Core.lua:737: attempt to call a nil value
BestInSlotRedux\Core.lua:737: in function `func'
BestInSlotRedux\Core.lua:720: in function `?'
FrameXML\ChatFrame.lua:4512: in function <FrameXML\ChatFrame.lua:4459>
[C]: in function `ChatEdit_ParseText'
FrameXML\ChatFrame.lua:4180: in function <FrameXML\ChatFrame.lua:4179>
[C]: in function `ChatEdit_SendText'
FrameXML\ChatFrame.lua:4216: in function `ChatEdit_OnEnterPressed'
[string "*:OnEnterPressed"]:1: in function <[string "*:OnEnterPressed"]:1>
Locals:
orderedList = <table> {
1 = "show"
2 = "console"
3 = "debug"
4 = "help"
5 = "reset"
6 = "versioncheck"
}
(*temporary) = nil
(*temporary) = "|cffff2020-----|cffffd200BestInSlotRedux commands|cffff2020-----|r"
(*temporary) = "attempt to call a nil value"
pairs = <function> defined =[C]:-1
slashCommands = <table> {
show = <table> {
}
console = <table> {
}
help = <table> {
}
debug = <table> {
}
versioncheck = <table> {
}
reset = <table> {
}
}
tinsert = <function> defined =[C]:-1
tsort = <function> defined =[C]:-1
tremove = <function> defined =[C]:-1
BestInSlot = <table> {
GetDifficultyIdForDungeon = <function> defined @BestInSlotRedux\Core.lua:552
comm = true
modules = <table> {
}
CancelTimer = <function> defined @Ace3\AceTimer-3.0\AceTimer-3.0.lua:145
SecureHook = <function> defined @Ace3\AceHook-3.0\AceHook-3.0.lua:336
CheckTutorials = <function> defined @BestInSlotRedux\Frames\Tutorials.lua:24
GameTooltip_OnTooltipSetItem = <function> defined @BestInSlotRedux\Frames\FramesCore.lua:272
GetItemTooltip = <function> defined @BestInSlotRedux\Frames\FramesCore.lua:214
BOSS = 4
SetDefaultModulePrototype = <function> defined @Ace3\AceAddon-3.0\AceAddon-3.0.lua:440
RegisterRaidTier = <function> defined @BestInSlotRedux\Core.lua:248
History = <table> {
}
IsEnabled = <function> defined @Ace3\AceAddon-3.0\AceAddon-3.0.lua:482
GetDifficulties = <function> defined @BestInSlotRedux\Core.lua:1244
RegisterBossLoot = <function> defined @BestInSlotRedux\Core.lua:412
RegisterTutorials = <function> defined @BestInSlotRedux\Frames\Tutorials.lua:20
GetLootTableBySlot = <function> defined @BestInSlotRedux\Core.lua:981
SetBestInSlotInfo = <function> defined @BestInSlotRedux\Core.lua:1435
RegisterCustomItem = <function> defined @BestInSlotRedux\Core.lua:1113
DIFFICULTY = 5
LegionLegendaries = <table> {
}
SendCommMessage = <function> defined @Ace3\AceComm-3.0\AceComm-3.0.lua:83
IsItemBestInSlot = <function> defined @BestInSlotRedux\Core.lua:1496
UnregisterAllComm = <function> defined @Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:200
SetEnabledState = <function> defined @Ace3\AceAddon-3.0\AceAddon-3.0.lua:455
Hook = <function> defined @Ace3\AceHook-3.0\AceHook-3.0.lua:274
GetCustomItems = <function> defined @BestInSlotRedux\Core.lua:1099
GetExpansions = <function> defined @BestInSlotRedux\Core.lua:1188
GetItemSlotID = <function> defined @BestInSlotRedux\Core.lua:758
OnEnable = <function> defined @BestInSlotRedux\Core.lua:498
UnregisterCustomItem = <function> defined @BestInSlotRedux\Core.lua:1134
GetCacheData = <function> defined @BestInSlotRedux\Core.lua:1657
SetSelected = <function> defined @BestInSlotRedux\Frames\FramesCore.lua:697
RegisterTierTokens = <function> defined @BestInSlotRedux\Core.lua:343
OnInitialize = <function> defined @BestInSlotRedux\Core.lua:481
NewModule = <function> defined @Ace3\AceAddon-3.0\AceAddon-3.0.lua:266
Artifacts = <table> {
}
GetOrderedBestInSlotItems = <function> defined @BestInSlotRedux\Core.lua:1419
AddCustomItem = <function> defined @BestInSlotRedux\Core.lua:1073
HasItem = <function> defined @BestInSlotRedux\Core.lua:662
ItemExists = <function> defined @BestInSlotRedux\Core.lua:1004
Deserialize = <function> defined @Ace3\AceSerializer-3.0\AceSerializer-3.0.lua:246
RegisterSlashCmd = <function> defined @BestInSlotRedux\Core.lua:691
RAIDTIER = 2
HasItemInBag = <function> defined @BestInSlotRedux\Core.lua:613
ValidateSelected
It's in Core.lua between the lines 729 and 749.
It should show the following in chat:
/bis help - this dialog
/bis debug - enable/disable debug messages
The error starts at line 737 where it tries to make a list with the commands. I'll look into it tomorrow though as it's getting late/early for me.
Okay, so the command only takes two strings... I feel a lot more than this are unused. Well, good night :)
Deprecated features I think or maybe they got embedded into other functions. But yeah, please do a list and I'll look through the code next week for them.
I found the error. Seems like Blizz changed how to print messages to chat in some recent patch. I'll make a new release in a moment.
Nice news, but you should go to sleep, aren't you?
I'm the kind of person who have a hard time putting a problem aside. Oh yeah, I've made a ticket for translations just so you know that I thought of using with any other translators who want to help too. But now I'm off to bed. Nighty.
By the way, I have a question about a recurrent "bug". When we first select an item by pressing the button, sometimes we have to press it again to see all items, sometimes there is just none and sometimes some are missing. You know why?
Also, is there a way I can help you to assign items to specs? I see a lot of items that aren't correctly tied or aren't at all when they should be (like legendary's gloves for rogue)
I love this add-on a lot and I would like to help as much as I can. But I'm not very used LUA-side.
You'll know what I consider unused strings by checking what's not translated on CurseForge.
I've noticed it too. I think it's because the item is not in your local cache so the WoW client have to fetch it from the server. This takes too long for the addon so it just skips the item until it tries look it up in the cache again. If you notice so does the item only do it once unless you manually delete you item cache and it have to fetch it again.
As for assign items to specs, the addon automatically tries to filter the items to the spec you're currently editing but that depends on how Blizzard have assigned the specs to the item. Like for example, if you look up an item on wowhead so can you usually pick a spec for the stats to change. But some items are not assigned a spec at all, Aman'thul's Vision is a prime example of this. Those items can you only find if you look up all items and not just your specialization to pick from.
But if some Rogue leggo gloves are wrongly assigned so will I look it up. Leggo's should all have a spec associated with them and filter correctly.
Something goes really wrong with translations on CurseForge. All namespaces and translations has been deleted?
Can you restore this or I will have to update enUS with names? xD
The English base version became all capital letters for some reason so they couldn't be linked between languanges. I'll change it back.
Please don't touch the enUS strings. They are what all the other translations are paired against for localization.
I've noticed it too. I think it's because the item is not in your local cache so the WoW client have to fetch it from the server. This takes too long for the addon so it just skips the item until it tries look it up in the cache again. If you notice so does the item only do it once unless you manually delete you item cache and it have to fetch it again.
Okay so you can't do anything for this. That's fine.
But if some Rogue leggo gloves are wrongly assigned so will I look it up. Leggo's should all have a spec associated with them and filter correctly.
That's actually the case.
Please don't touch the enUS strings. They are what all the other translations are paired against for localization.
Yes I know, I just tried to update strings again to original ones when they was all deleted for some reason. Not modified anything except that (3-4 strings as I'm writing this)
Well, you have fixed this, so I would continue on frFR.
By the way, do you think you can import original strings on frFR to resets translation? Or maybe something like that.
Edit: The translation has been (almost fully) reset when you imported enUS.
Oops, I fucked up and deleted most of the translations when I imported the enUS locale again. Oh well, will need new translators anyway.
I will need rights for some minutes to delete some strings from frFR if you can. I think you revoked them.
Which ones? Might be better that I do it.
Well, all strings that aren't red. But hey, you found how to reset! But you just reseted ALL haha
Deleted them all. You can just save a new string and it will show for me to approve.
You missed one! But yeah, I will start soon.
Thanks :D
I'll try to be quick on this so you can push it on Curse.
No worries. It's no rush.
Oops, I pressed the button 3 times on the first string because it wasn't added at first. Can you delete them? I'll wait for next ones lol
Well, third one needs review. Why the hell this thing is checked by default! Rhaaa Let me have rights on translations so I won't bother you anymore :P I'll don't touch anything except frFR strings.
Looks fine. Just save a new translation if needed and I'll approve all the ones you miss unchecking the box on later
Okay. I'll leave any string that I haven't found in game empty. When you will go through it just let me know if something empty needs a translation.
The translation is finished and reviewed. Almost 30% are unused strings. Some yellow strings really need your attention, so be sure to check them before approving.
Also I figured that the command's /bis versioncheck
options are also translated by the game and doesn't work with locales names. Like /bis versioncheck whisper [target]
will work and /bis versioncheck chuchoter [cible]
will not. By the way, I don't understand the usefulness of this command at all.
Will go through the unused strings during the week and see if I can remove them. Thanks for the help :)
Do you plan to push the translation with next release? My friends are waiting for it!
Yes, they should be automatically added with next release. Will do some small bug fixes but otherwise I'll push a release tomorrow night before US reset.
Maybe it will be better if you make a note of yellow strings, and emptying them before pushing the release. Most of them are unused strings or features that's don't work/not implemented. Only one is used but the string needs an update. Can also be deleted since it's only saying "credits are here". No tips anymore.
Yeah, I'll look through it before I push a release.
Hey, I see you pushed the release and deleted unused strings from locales. Do you want I translate strings that are still red on CurseForge? Or you didn't finished clearing it?
Yes please. You can skip "Warlords crafted options:" as that function isn't active atm.
Mastery tooltips are not supported due to technical limitations
This seems to be old as BiS don't provide informations about stats anymore.
%1$s's %2$s list for %3$s %4$s Trash Loot Warning! Editing this item will overwrite the previous item set on this itemid!
Can't find these in-game. You know how to show them?
Your version of BestInSlot is outdated! You can download the newest version at %s%s
Seems not working.
By the way, some strings have been translated by someone but are mostly unused as well: https://wow.curseforge.com/projects/bestinslotredux/localization/languages/93/phrases?filter-translator=33358412
Be sure to check them. I will also update the poor translation if they're used.
Warning! Editing this item will overwrite the previous item set on this itemid!
is used when you overwrite which raid tier a custom item should be associated with.
The other two can be ignored and I'll remove them from the localization.
I translated all strings, left Warlords one.
By the way I found localization issues in frFR too. For these strings:
L["Deleting this is irreversible. Are you sure?"] = [=[
Cette action est irr\195\169versible. Voulez-vous continuer ?]=]
L[ [=[You can't delete this custom list.
It is in use at:
%s]=] ] = [=[Vous ne pouvez pas supprimer cette liste personnalis\195\169e.
Elle est utilis\195\169e pour :
%s]=]
L["You've picked: %s"] = [=[Vous avez choisi :
%s]=]
Seems like CurseForge don't encode to \r\n
like it should.
I'll go through files and see where strings are used.
%1$s's %2$s list for %3$s %4$s
This one is in files, but you deleted it from enUS.
In BisLink.lua
:
function BiSLink:Validate(type, typeinfo, difficulty, spec, sender)
if not type or not typeinfo or not difficulty or not spec or not sender then return false, "Invalid BiS link - Arguments missing" end
difficulty = tonumber(difficulty)
local raidtier
if type == self.RAIDTIER then
raidtier = tonumber(typeinfo)
else
raidtier = self:GetRaidTiers(type, typeinfo)
end
if not raidtier or not tContains(self:GetRaidTiers(), raidtier) then return false, "Invalid BiS link - Not supported" end
local typeDescr = self:GetDescription(self.RAIDTIER, raidtier)
local difficulties = self:GetDifficulties(self.RAIDTIER, raidtier)
if not difficulties or not difficulties[difficulty] then return false, "Invalid BiS link - Difficulty not supported" end
local difficDescr = self:GetDescription(self.DIFFICULTY, raidtier, difficulty)
if not GetSpecializationInfoByID(spec) then return false, "Invalid BiS link - Unknown specialization" end
return true, L["%1$s's %2$s list for %3$s %4$s"]:format(Ambiguate(sender, "all"), self.colorHighlight.."BestInSlot"..self.colorNormal, typeDescr, difficDescr)
end
Trash Loot
Found where it's used in game. No need to look at the files.
Your version of BestInSlot is outdated! You can download the newest version at %s%s
I think this one is supposed to be linked with /bis versioncheck
but not working.
I mean, I have v7.3.13 as I'm writing, not the last version, no string is shown. Not sure of the conditions though.
In Comm.lua
:
local function OnCommReceived(prefix, msg, channel, source)
playerName = playerName or GetUnitName("player")
if prefix == BestInSlot.MSGPREFIX and source ~= playerName then
local success, msg = BestInSlot:Deserialize(msg)
if success then
local version = msg.version
local data = msg.data
local identifier = msg.id
local target = msg.target
if target and target ~= playerName then
return
end
if printUpdateReminder and BestInSlot.version < version and not msg.Alpha and version > 136 then
BestInSlot:Print((L["Your version of BestInSlot is outdated! You can download the newest version at %s%s"]):format(BestInSlot.colorHighlight, "https://www.curseforge.com/wow/addons/bestinslotredux"), true)
BestInSlot:Print(source..":"..version)
printUpdateReminder = false
end
if not identifier then BestInSlot:Print(("Invalid AddOn message received from %s"):format(source)) return end
if communication[identifier] then
BestInSlot:SendEvent(("AddonMessage_%s"):format(identifier), data, channel, source)
communication[identifier](data, channel, source, version)
end
else
BestInSlot.console:AddError("Error at unserializing the package", msg)
end
end
end
Also be sure to check strings that weren't translated by me:
Failed to get info from %s
In BisLink.lua
:
function BiSLink:OnSetHyperlink(tooltip, link, ...)
if link:sub(1,7) == "BiSLink" then
local linkid, sender, type, typeinfo, difficulty, spec = strsplit(":",link)
if sender == "invalid" then return end
type = tonumber(type)
difficulty = tonumber(difficulty)
spec = tonumber(spec)
local raidtier = type == self.RAIDTIER and tonumber(typeinfo) or self:GetRaidTiers(type, typeinfo)
if not type then return end
if sender == strjoin("-", UnitFullName("player")) then
local bislist, slots = self:GetBestInSlotItems(raidtier, difficulty, spec)
local pi = self:GetPlayerInfo()
pi.spec = self:GetSelected(BestInSlot.SPECIALIZATION)
BestInSlot.Preview:Show(bislist,difficulty, pi, slots)
else
local charinfo = nil
local bisinfo = nil
local raidtiereventid = self:RegisterEvent("AddonMessage_requestRaidTierReply", function(_, bislist, channel, source)
if (sender):find(source) then
if bislist[spec] then
bisinfo = bislist[spec]
end
end
end)
local charinfoeventid = self:RegisterEvent("AddonMessage_charinforeply", function(_, info, channel, source)
if (sender):find(source) then
charinfo = info
end
end)
local function onTimerEnd(success)
self:UnregisterEvent("AddonMessage_requestRaidTierReply",raidtiereventid)
self:UnregisterEvent("AddonMessage_charinforeply",charinfoeventid)
if success then
charinfo.spec = spec
BestInSlot.Preview:Show(bisinfo, difficulty, charinfo)
else
BiSLink:Print(L["Failed to get info from %s"]:format(sender))
end
end
local function verifySuccess()
return charinfo and bisinfo and true
end
self.Timer:NewTimer(0.1, onTimerEnd, verifySuccess, 2)
self:SendAddonMessage("requestRaidTier", {selection = raidtier, difficulty = difficulty}, "WHISPER", sender)
self:SendAddonMessage("requestcharinfo", nil, "WHISPER", sender)
end
else
self.hooks[ItemRefTooltip].SetHyperlink(tooltip, link, ...)
end
end
has been initialized, use %s to show the GUI
Should be loaded with the add-on but it's not actually.
In Core.lua
:
--- Called on initializing the add-on
function BestInSlot:OnInitialize()
self.db = LibStub("AceDB-3.0"):New("BestInSlotDB", defaults)
SLASH_BESTINSLOT1, SLASH_BESTINSLOT2 = '/bestinslot', '/bis'
self:RegisterComm(self.MSGPREFIX)
self.options.instantAnimation = self.db.global.options.instantAnimation
self.options.showBiSTooltip = self.db.char.options.showBiSTooltip
self.options.windowFixed = self.db.char.options.windowFixed
self.options.sendAutomaticUpdates = self.db.char.options.sendAutomaticUpdates
self.options.receiveAutomaticUpdates = self.db.char.options.receiveAutomaticUpdates
AceEvent:RegisterEvent("GET_ITEM_INFO_RECEIVED", function(event, itemid) BestInSlot:SendEvent("GET_ITEM_INFO_RECEIVED", itemid) end)
self:RegisterEvent("GET_ITEM_INFO_RECEIVED", "OnItemInfoGenerated")
self:Print((L["has been initialized, use %s to show the GUI"]):format((L["%s or %s"]):format(self.colorHighlight.."/bis"..self.colorNormal, self.colorHighlight.."/bestinslot"..self.colorNormal)))
end
Not enough data to filter
Can't manage to show it in game.
In RequestBestinslots.lua
:
function RequestBiS:MakeStandardOptions(submenu)
local hasItems = false
for _ in pairs(filter) do
hasItems = true
break
end
local isGuildRequest = responseContainer:GetUserData("channel") == "GUILD" or not responseContainer:GetUserData("channel")
if not hasItems or not isGuildRequest then
if not isGuildRequest then --Don't show anything for party/whisper requests
return
end
local header = AceGUI:Create("Dropdown-Item-Header")
header:SetText(L["Not enough data to filter"])
header.SetValue = emptySetValue
submenu:AddItem(header)
return
end
-- Add Select All button
local selectAll = AceGUI:Create("Dropdown-Item-Execute")
selectAll:SetText(L["Select all"])
selectAll:SetCallback("OnClick", onClickSelectAll)
selectAll.SetValue = emptySetValue
selectAll:SetUserData("select", true)
submenu:AddItem(selectAll)
--Add Deselect All button
local deselectAll = AceGUI:Create("Dropdown-Item-Execute")
deselectAll:SetText(L["Deselect all"])
deselectAll:SetCallback("OnClick", onClickSelectAll)
deselectAll.SetValue = emptySetValue
submenu:AddItem(deselectAll)
local showObtained = AceGUI:Create("Dropdown-Item-Toggle")
showObtained:SetText(L["Show obtained items"])
showObtained:SetCallback("OnValueChanged", onShowObtainedValue)
submenu:AddItem(showObtained)
showObtained:SetValue(showObtainedItems)
submenu:AddItem(self:GetDropdownSeperator())
--Add the class Menu
local classMenu = AceGUI:Create("Dropdown-Item-Menu")
classMenu:SetText(L["Class filter"])
classMenu.SetValue = emptySetValue
local classSubMenu = AceGUI:Create("Dropdown-Pullout")
classSubMenu.SetValue = emptySetValue
local classesDone = {}
for charName, charData in pairs(filter) do
local class, localizedClass = self:GetPlayerClass(charName)
if class and not classesDone[class] then
local classToggle = AceGUI:Create("Dropdown-Item-Toggle")
classToggle:SetUserData("class", class)
classToggle:SetText(self:GetClassString(class))
classToggle:SetCallback("OnValueChanged", onClassSelect)
dropdownFilter:SetUserData(class, classToggle)
classesDone[class] = classToggle
classSubMenu:AddItem(classToggle)
end
end
classMenu:SetMenu(classSubMenu)
submenu:AddItem(classMenu)
--Add the token menu
local tokenMenu = AceGUI:Create("Dropdown-Item-Menu")
tokenMenu:SetText(L["Token filter"])
tokenMenu.SetValue = emptySetValue
local tokenSubMenu = AceGUI:Create("Dropdown-Pullout")
tokenSubMenu.SetValue = emptySetValue
tokenSubMenu:SetWidth(300)
local tokensDone = {}
for tokenType, classes in pairs(classTokens) do
for i=1, #classes do
if classesDone[classes[i]] then
local tokenToggle = tokensDone[tokenType] or AceGUI:Create("Dropdown-Item-Toggle")
if not tokensDone[tokenType] then
tokenToggle:SetUserData("token", tokenType)
local text = L[tokenType].." ("
for j=1,#classes do
if j ~= 1 then
text = text.." / "
end
text = text..self:GetClassString(classes[j])
end
text = text..")"
tokenToggle:SetText(text)
tokenToggle:SetCallback("OnValueChanged", onTokenSelect)
dropdownFilter:SetUserData(tokenType, tokenToggle)
tokensDone[tokenType] = tokenToggle
tokenSubMenu:AddItem(tokenToggle)
break
end
end
end
end
tokenMenu:SetMenu(tokenSubMenu)
submenu:AddItem(tokenMenu)
--Adds the armor filter
local armorMenu = AceGUI:Create("Dropdown-Item-Menu")
armorMenu:SetText(L["Armor filter"])
armorMenu.SetValue = emptySetValue
local armorSubMenu = AceGUI:Create("Dropdown-Pullout")
armorSubMenu.SetValue = emptySetValue
for i,armorType in pairs({BabbleInventory.Cloth, BabbleInventory.Leather, BabbleInventory.Mail, BabbleInventory.Plate}) do
local armorToggle = AceGUI:Create("Dropdown-Item-Toggle")
armorToggle:SetText(armorType)
armorToggle:SetUserData("type", armorType)
armorToggle:SetCallback("OnValueChanged", onArmorSelect)
armorSubMenu:AddItem(armorToggle)
dropdownFilter:SetUserData("Armor"..i, armorToggle)
end
armorMenu:SetMenu(armorSubMenu)
submenu:AddItem(armorMenu)
--Adds the guild filter
if responseContainer:GetUserData("channel") == "GUILD" or not responseContainer:GetUserData("channel") then -- if the guild window is shown
local guildMenu = AceGUI:Create("Dropdown-Item-Menu")
guildMenu:SetText(GUILDCONTROL_GUILDRANKS)
guildMenu.SetValue = emptySetValue
local guildSubMenu = AceGUI:Create("Dropdown-Pullout")
guildSubMenu.SetValue = emptySetValue
for i=1, GuildControlGetNumRanks() do
local guildRank = AceGUI:Create("Dropdown-Item-Toggle")
guildRank:SetText(GuildControlGetRankName(i))
guildRank:SetUserData("rank", i)
guildRank:SetCallback("OnValueChanged", onGuildRankSelect)
guildSubMenu:AddItem(guildRank)
dropdownFilter:SetUserData("GuildRank"..i, guildRank)
end
guildMenu:SetMenu(guildSubMenu)
submenu:AddItem(guildMenu)
end
submenu:AddItem(self:GetDropdownSeperator())
end
Select a channel
I think this is supposed to be the dropdown menu text. Actually, it's showing Guild by default.
InRequestBestinslots.lua
:
function RequestBiS:Draw(container)
dropdownSelection = self:GetDropdown(self.INSTANCE, nil, self.CanRequest)
dropdownSelection:SetRelativeWidth(0.33)
container:AddChild(dropdownSelection)
dropdownDifficulty = self:GetDropdown(self.DIFFICULTY, nil, self.CanRequest)
dropdownDifficulty:SetRelativeWidth(0.33)
container:AddChild(dropdownDifficulty)
dropdownRequestFrom = AceGUI:Create("Dropdown")
dropdownRequestFrom:SetLabel(L["Request from"])
dropdownRequestFrom:SetRelativeWidth(0.33)
dropdownRequestFrom:SetList({
RAID = ("%s/%s"):format(_G["PARTY"], _G["RAID"]),
GUILD = _G["GUILD"],
WHISPER = _G["WHISPER"],
})
container:SetUserData("request", dropdownRequestFrom)
if not IsInGuild() then
dropdownRequestFrom:SetItemDisabled("GUILD", true)
end
if not IsInGroup() then
dropdownRequestFrom:SetItemDisabled("RAID", true)
end
dropdownRequestFrom:SetText(L["Select a channel"])
dropdownRequestFrom:SetCallback("OnValueChanged", dropdownRequestFromOnValueChanged)
container:AddChild(dropdownRequestFrom)
whisperTarget = AceGUI:Create("EditBox")
whisperTarget:SetLabel(L["Whisper target"])
whisperTarget:SetRelativeWidth(0.245)
whisperTarget:SetDisabled(true)
whisperTarget:SetCallback("OnEnterPressed", whisperToEnterPressed)
container:AddChild(whisperTarget)
container:SetUserData("wtarget", whisperTarget)
requestButton = AceGUI:Create("Button")
requestButton:SetText(L["Request"])
requestButton:SetRelativeWidth(0.245)
requestButton:SetDisabled(true)
requestButton:SetCallback("OnClick", requestButtonOnClick)
container:AddChild(requestButton)
dropdownRequestFrom:SetValue(selectedChannel)
if selectedChannel == "WHISPER" then
whisperTarget:SetDisabled(false)
end
whisperTarget:SetText(whisperTo)
dropdownFilter = AceGUI:Create("Dropdown")
dropdownFilter:SetDisabled(true)
dropdownFilter.dropdown.obj:SetDisabled(true)
dropdownFilter:SetRelativeWidth(0.49)
dropdownFilter:SetList({})
dropdownFilter:SetLabel(FILTER)
container:AddChild(dropdownFilter)
container:SetUserData("filter", dropdownFilter)
responseContainer = AceGUI:Create("ScrollFrame")
responseContainer:SetLayout("List")
responseContainer:SetFullWidth(true)
responseContainer:SetFullHeight(true)
responseContainer:SetPoint("BOTTOMRIGHT", container.frame, "BOTTOMRIGHT")
container:AddChild(responseContainer)
self:CanRequest()
end
Show all
According to locales, it's supposed to be in Overview panel. But not used at all in files.
Show history for %s
Actually, I don't understand why this is not used. The string used for history is History for %s
In GuildBiSLists.lua
:
function GuildLists:GetContextMenu(character, spec)
local menu = {}
local raidTier = dropdownRaidTier:GetValue()
local difficulty = dropdownDifficulty:GetValue()
if self.History:HasHistory(character, raidTier, difficulty) then
tinsert(menu, {text = L["Show history for %s"]:format(character), func = showHistory, arg1 = character, arg2 = {raidtier = raidTier, difficulty = difficulty}})
else
tinsert(menu, {text = L["There is no history available for %s"]:format(character), disabled = true})
end
tinsert(menu, {text = L["Delete options"], isTitle = true})
if spec ~= nil then
tinsert(menu, { text = L["Delete this specialization from this raid tier"], func = confirmDeletion, arg1 = character, arg2 = {raidtier = raidTier, difficulty = difficulty, spec = spec} })
end
tinsert(menu, {text = L["Delete %s from this difficulty"]:format(character), func = confirmDeletion, arg1 = character, arg2 = {raidtier = raidTier, difficulty = difficulty}})
tinsert(menu, { text = L["Delete %s from this raidtier"]:format(character), func = confirmDeletion, arg1 = character, arg2 = {raidtier = raidTier}})
tinsert(menu, { text = L["Delete %s completely."]:format(character), func = confirmDeletion, arg1 = character, arg2 = {all = true}})
tinsert(menu, { text = CLOSE})
if not self.dialog then
self.dialog = CreateFrame("Frame", "BiSGuildListDialog", UIParent, "UIDropDownMenuTemplate")
self.dialog:SetFrameStrata("TOOLTIP")
end
-- Make the menu appear at the cursor:
EasyMenu(menu, self.dialog, "cursor", 0 , 0, "MENU")
self.dialog:Show()
end
These items from %s are %sBestInSlot%s: You already have these %sBestInSlot%s items from %s
These 2 seems to be part of the ZoneDetection module. But I think this module don't work at all.
In ZoneDetection.lua
:
function ZoneDetect:TooltipSetUnit(tooltip)
if not self.db.char.options.tooltipCombat and UnitAffectingCombat("player") then return end
local _, unit = tooltip:GetUnit()
if not unit then return end
local guid = UnitGUID(unit)
local npcType,_,_,_,_,npcId = strsplit("-", guid)
if npcType and (npcType == "Creature" or npcType == "Vehicle") then
npcId = tonumber(npcId)
if npcId and self.options.DEBUG then
tooltip:AddLine(("%sBiS Debug%s: NPCID: "..npcId):format(self.colorHighlight, self.colorNormal))
end
if npcId and npcIds[npcId] then
local instance = npcIds[npcId][1]
local boss = npcIds[npcId][2]
local bossName = self:GetDescription(self.BOSS, instance, boss)
local raidTier = self:GetRaidTiers(self.INSTANCE, instance)
local difficulty = self:GetDifficulty()
local BiSList = self:GetBestInSlotItems(raidTier, difficulty)
local neededItems = {}
local obtainedItems = {}
self.console:Add("Needed items", neededItems)
self.console:Add("Obtained Items", obtainedItems)
for specId, specdata in pairs(BiSList) do
if type(specdata) == "table" then
for i in pairs(specdata) do
local itemid = specdata[i].item
local obtained = specdata[i].obtained
local item = self:GetItem(itemid, difficulty)
if item then
if item.multiplesources then
if item.multiplesources[instance] and item.multiplesources[instance][boss] then
if obtained then obtainedItems[itemid] = item else neededItems[itemid] = item end
end
elseif item.bossid == boss and item.dungeon == instance then
if obtained then obtainedItems[itemid] = item else neededItems[itemid] = item end
end
end
end
end
end
if self.options.DEBUG then
tooltip:AddLine(("%sBiS Debug%s: This is a known boss: "..bossName):format(self.colorHighlight, self.colorNormal))
end
local first = true
for id, item in pairs(neededItems) do
if first then
tooltip:AddLine((L["These items from %s are %sBestInSlot%s:"]):format(bossName, self.colorHighlight, self.colorNormal), nil,nil,nil,true)
first = false
end
tooltip:AddLine(("- %s"):format(self:GetItemText(item)))
end
first = true
for id, item in pairs(obtainedItems) do
if first then
tooltip:AddLine((L["You already have these %sBestInSlot%s items from %s"]):format(self.colorHighlight, self.colorNormal, bossName), nil,nil,nil,true)
first = false
end
tooltip:AddLine(("- %s"):format(self:GetItemText(item)))
end
end
end
end
I hope this can help you in some way. Be sure to also check my previous post. Edited it a lot of times.
I can also check all files to see all strings that can be translated. But I think it would be a lost of time since a lot of functions are unused.
From my point of view, this add-on needs a big cleanup.
Fully translated the add-on to french again.
I had no encoding issue in game but I will update it with UTF-8 codes if someone reports it.
By the way, thanks for maintaining BestInSlot.
Edit: Found encoding issues with my friends. I will fix it as soon as I can.