TipTac

3 - Overachiever ruRU compatibility

What steps will reproduce the problem?
Overachiever + TipTac installed, both from curse.com
WoW 3.09 Russian

What is the expected output? What do you see instead?
Expected: achievements progress shown in tips, like animals "need /love" etc.
See: achievements progress shown in tips only when "Enable TipTac Unit Tips Appearance" option (and therefore most TipTac features) is disabled.
In enGB version all works fine regardless any TipTac options enabled or disabled.

What version of the product are you using?
Overachiever 0.38
TipTac 09.03.12 fixed
WoW 3.09 Russian

Thanks! =)

User When Change
Aezay Thu, 23 Jul 2009 11:15:33 Changed status from Replied to Accepted
Droperidolum Fri, 20 Mar 2009 06:25:48 Changed status from Waiting to Replied
Aezay Fri, 20 Mar 2009 01:52:36 Changed status from Started to Waiting
Aezay Tue, 17 Mar 2009 12:12:02 Changed status from New to Started
Droperidolum Fri, 13 Mar 2009 21:30:50 Create

You must login to post a comment. Don't have an account? Register to get one!

  • 10 comments
  • Avatar of KingGLEB KingGLEB Fri, 18 Sep 2009 18:30:07

    Full decision for Russian servers.

    TipTac\core.lua

    Find:

    local TT_LevelMatch = "^"..TOOLTIP_UNIT_LEVEL:gsub("%%s",".+");
    

    Replace:

    local TT_LevelMatch;
    local TT_LevelMatch2;
    if (GetLocale()=="ruRU") then
    	TT_LevelMatch = ".+ уровня";
    	TT_LevelMatch2 = "^"..TOOLTIP_UNIT_LEVEL:gsub("%%s",".+");
    else
    	TT_LevelMatch = "^"..TOOLTIP_UNIT_LEVEL:gsub("%%s",".+");
    	TT_LevelMatch2 = "^"..TOOLTIP_UNIT_LEVEL:gsub("%%s",".+");
    end
    

    Find:

    if (u.title) and (u.title:find(TT_LevelMatch)) then
    	u.title = nil;
    end
    

    Replace:

    if (u.title) and ((u.title:find(TT_LevelMatch)) or (u.title:find(TT_LevelMatch2))) then
    	u.title = nil;
    end
    
  • Avatar of Droperidolum Droperidolum Fri, 20 Mar 2009 06:25:48

    Thank you, Aezay! Trouble fixed.

    Final variant as you said above:

    local TT_LevelMatch;
    if (GetLocale()=="ruRU") then
    TT_LevelMatch = ".+ уровня";
    else
    TT_LevelMatch = "^"..TOOLTIP_UNIT_LEVEL:gsub("%%s",".+");
    end

    It causes some issues:
    -Some NPC`s (for ex. guardians) have "Уровень %s" format string (from TOOLTIP_UNIT_LEVEL), so here TipTac shows bliz text and TipTac text next string. (Anyway its much better than creatures without OA strings =))
    Pic:
    http://img27.imageshack.us/img27/5554/49761109.th.jpg
    -File must be in UTF-8 format.

    P.S. Hope 3.1 will have no level string surprises =)

  • Avatar of Aezay Aezay Fri, 20 Mar 2009 01:49:19

    A "local" variable is only local inside the block it is defined. So after that if-then-end you used, the LevelMatch is no longer valid. Try this instead.

    local TT_LevelMatch; if (GetLocale()=="ruRU") then TT_LevelMatch = ".+ уровня"; else TT_LevelMatch = "^"..TOOLTIP_UNIT_LEVEL:gsub("%%s",".+"); end

    After some tests with TOOLTIP_UNIT_LEVEL_CLASS_TYPE I don't think it's really possible to make a pattern that would match the level level for all locals. Not really sure how to fix this, I would hate to add localisations to TipTac to be honest. Maybe there is another way in detecting which line is the level line, will have to think a bit?

    Also, let me know if you come up with something, if you test more.

  • Avatar of Droperidolum Droperidolum Fri, 20 Mar 2009 00:23:15

    Most simple variant becomes workable =)
    local TT_LevelMatch = ".+ уровня";

    Not sure why this buggy:
    if (GetLocale()=="ruRU") then
    local TT_LevelMatch = ".+ уровня";
    else
    local TT_LevelMatch = "^"..TOOLTIP_UNIT_LEVEL:gsub("%%s",".+");
    end

  • Avatar of Droperidolum Droperidolum Fri, 20 Mar 2009 00:12:25

    We have 2 variants of level strings in different cases:
    уровень - nominative case (Like "level one" in english) - thats what TT search for in tips, but he cannot find, cause there no
    уровня - genitive case (like "of first level" in english)" - thats what TT must search in tips to find

    So, regexp i tried for example:
    "*уров(ень|ня)*"

    I tried smthing about this:
    if(GetLocale()=="ruRU") then
    local TT_LevelMatch = "*уров(ень|ня)*";
    else
    local TT_LevelMatch = "^"..TOOLTIP_UNIT_LEVEL:gsub("%%s",".+");
    end

    But it won`t works and/or tiptac even not loading.

    I found maybe more interesting and universal solution for any locale.
    There are some vars and their results in enGB:
    TOOLTIP_UNIT_LEVEL = "Level %s";
    TOOLTIP_UNIT_LEVEL_CLASS = "Level %s %s";
    TOOLTIP_UNIT_LEVEL_CLASS_TYPE = "Level %s %s (%s)";
    TOOLTIP_UNIT_LEVEL_TYPE = "Level %s (%s)";
    All of them match in "Level..." So, you use first and most simple var. Its reasonable =)

    But, in russian (and maybe other?) locales, tips uses TOOLTIP_UNIT_LEVEL_CLASS_TYPE, which in ruRU returns right string:
    %2$s %1$s-го уровня (%3$s)

    Otherwise, TOOLTIP_UNIT_LEVEL returns
    Уровень %s
    which unmatch with firsl letter (its capital), and 3 last letters.

    So, i tried to insert TOOLTIP_UNIT_LEVEL_CLASS_TYPE instead of TOOLTIP_UNIT_LEVEL, but it also woh`t work, cause parameters are wrong. Could you help me with its right syntax?

    Also there are feature: after lvl number (%1$s), there are "-го" suffix, this is the same as 1st, 2nd, 3rd, 4th, etc. endings in english. I hope it will not hinder.

    Best regards! =)

  • Avatar of Aezay Aezay Tue, 17 Mar 2009 20:24:05

    This problem is rather simple to fix, but since I cannot write, read or use russian text I cannot do it, and you will have to debug it.

    What TipTac does is to replace the lines in the tooltip with those modified depending on options, to do this, it has to know which line contains the title/guild and if there is actually one there at all. It also has to find the line containing the level/race/class text.

    TipTac uses the code I posted in the last comment, to find the line containing the level text, this one:
    local TT_LevelMatch = "^"..TOOLTIP_UNIT_LEVEL:gsub("%%s",".+");

    This code is to be found on line 129 in TipTac\core.lua. What you'll have to do it to replace this variable TT_LevelMatch with a pattern that will match the level line on all tooltips. I don't know if you are familiar with string patterns matching or regex?

    What I can understand from your last post is that there is no way Уровень can match уровня, they seem awfully close, but the last letter isn't the same.

    The other issue you mention about the health bar covering some of the text is a known issue. It can happen when an addon adds more lines to the tip. The only real work around is to disable the healthbar in TipTac and use the default one.

  • Avatar of Droperidolum Droperidolum Tue, 17 Mar 2009 13:49:29

    Hi! Glad that you help me =) I`ll try to do anything, that you need to fix this problem, and i could use this beautiful favorite addons together.

    TOOLTIP_UNIT_LEVEL returns next expression:
    ^Уровень .+

    Level string in russian:
    <Существо 1-го уровня>

    This means (literally):
    Critter 1-st level
    (also, in enGB client there no angle brackets <> )

    Here is one more picture, maybe it will help.
    I tried to find a "bad" option, which disabling fixes OA compatibility. And I found one interesting thing. I increased tip updating interval (ex. 2 seconds), so there is 2 tip conditions: on mouseover and after 2 sec mouseover. On first condition OA text is visible, but its covered by HP bar.
    http://img22.imageshack.us/img22/8757/87510772.th.jpg

    My notepad is ready to lua something =)
    Thanx a lot!
    P.S. Tuhljin goes to vacation so we not be able to ask him for about a week.

  • Avatar of Aezay Aezay Tue, 17 Mar 2009 11:56:27

    Nice picture! I think I know what is going on, but I assumed this problem had been fixed a long time ago. What happens is TipTac cannot find the tooltip line which contains the level information, and then it thinks that line is the npc title, like <Banker> or something.

    Fixing this problem could become quite difficult as I don't have a russian client. But could you try and run this code and tell me exactly what it says:
    /run DEFAULT_CHAT_FRAME:AddMessage("^"..TOOLTIP_UNIT_LEVEL:gsub("%%s",".+"))

    And could you also write exactly what a level line normally looks like in the tooltip, I know I can see that on the picture you posted, but since it's russian, I prefer to have something I can copy/paste.

  • Avatar of Droperidolum Droperidolum Tue, 17 Mar 2009 01:15:46

    Thx for quick answer! So, can i try to fix this with your and Tuhljin help ?
    It looks like blizzard string, which must be hidden, covering Overachiever text or/and Overachiever text is situated in wrong string (4th).
    http://img3.imageshack.us/img3/2669/71655731.th.png
    My skill in lua not so high, but it higher than 0... so can you help me, what can i do to trace and /kill the bug?
    Thanks a lot for your great addon!
    Sorry for bad english.

  • Avatar of Aezay Aezay Sun, 15 Mar 2009 01:28:27

    No idea why this is happening, TipTac doesn't have any localizations in any form, all is pulled from the UI, which is localized.
    And since I don't use a russian client, this is not something I can fix.

  • 10 comments

Facts

Last updated on
23 Jul 2009
Reported on
13 Mar 2009
Status
Accepted - Problem reproduced / Need acknowledged.
Type
Defect - A shortcoming, fault, or imperfection
Priority
Medium - Normal priority.

Reported by

Possible assignees