View Single Post
04/06/18, 02:33 PM   #2
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
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".
Attached Files
File Type: lua PL_CombatIndicator_Static.lua (4.8 KB, 272 views)

Last edited by sirinsidiator : 04/06/18 at 02:37 PM.
  Reply With Quote