View Single Post
04/06/18, 02:40 PM   #3
Crabby654
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 19
Originally Posted by sirinsidiator View Post
You just add it in the PL_CombatIndicator_Static.lua file after the English texts.

As for the error for Russian players, that is actually a problem for all custom localizations. There is a small bug in how the addon decides it should use English as a fallback for unsupported languages. A potential fix would look like this:
Lua Code:
  1. local lang = GetCVar("language.2")
  2.     local str = t[lang] ~= nil and t[lang][k]
  3.     if str == nil then
It first needs to check if t[lang] even exists, otherwise it would try to access nil[k] which produces the error you see in the screenshots.

I attached the file with the necessary modifications and also added a German translation, but didn't test it. Feel free to use that.

EDIT: actually you should replace "if str == nil then" with "if not str then", since "local str = t[lang] ~= nil and t[lang][k]" will result in str being "false" if the table doesn't exist and that way you check for both "nil" and "false".
Holy mackeral thank you! This is exactly what I wanted to know! Hmm maybe I can mess around with language settings for the other addons now!
  Reply With Quote