AutoGear

AutoGear

189k Downloads

Localization: AutoGear displays an error after looting a grey item from a dead enemy when the language is not English

xan2622 opened this issue ยท 3 comments

commented

Describe the bug
AutoGear displays an error after looting a grey item from a dead ennemy.

Steps to reproduce the behavior:

  1. Kill any ennemy (lower than your current level)
  2. Click on its corpse to loot its stuff
  3. You can see that its stuff moves into your bags
  4. The following error appears (an the error counter keeps increasing again and again)

Expected behavior
No error after looting

Screenshots
error_AutoGear

Version:

  • World of Warcraft (official): 9.0.5.38134
  • Server locale region: FR
  • OS: Windows 10 64bits

The error:

Message: Interface\AddOns\AutoGear\AutoGear.lua:1368: attempt to index upvalue 'weighting' (a nil value)
Time: Mon Apr  5 16:35:18 2021
Count: 86
Stack: Interface\AddOns\AutoGear\AutoGear.lua:1368: attempt to index upvalue 'weighting' (a nil value)
[string "@Interface\AddOns\AutoGear\AutoGear.lua"]:1368: in function `AutoGearSetStatWeights'
[string "@Interface\AddOns\AutoGear\AutoGear.lua"]:2147: in function `AutoGearScanBags'
[string "@Interface\AddOns\AutoGear\AutoGear.lua"]:3072: in function `AutoGearMain'
[string "@Interface\AddOns\AutoGear\AutoGear.lua"]:176: in function <Interface\AddOns\AutoGear\AutoGear.lua:175>

Locals: class = "MAGE"
spec = "Givre"
(*temporary) = nil
(*temporary) = "MAGE"
(*temporary) = "Givre"
(*temporary) = "Givre"
(*temporary) = 2
(*temporary) = 64
(*temporary) = "Givre"
(*temporary) = "attempt to index upvalue 'weighting' (a nil value)"
weighting = nil
weapons = nil
commented

A localization system has been implemented in the addon, so it's now possible to localize these spec names. That being said, I didn't write the implementation myself, so I'm not sure at this moment exactly how it should be done, but I'm commenting this in case someone would like to get started on it.

commented

Hi. Thank you for these explanations.
I am a bit sad your addon doesn't support other languages (but I guess it's similar for the majority of addons).

I hope that one day you could find this "motivation" :)
Or, in the meanwhile, the will to add a check in the code (an exception handler) if the locale is different than 'english'.

Thank you.

commented

AutoGear doesn't work in French currently. Sorry. It's reading the tooltip, seeing spec "Givre", and that spec isn't in the mage spec list, which isn't localized. We haven't had the motivation to handle non-English languages. You're free to translate the spec names in your local copy to French to make it work though.