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 Jul 23, 2009 at 11:15 UTC Changed status from Replied to Accepted
Droperidolum Mar 20, 2009 at 06:25 UTC Changed status from Waiting to Replied
Aezay Mar 20, 2009 at 01:52 UTC Changed status from Started to Waiting
Aezay Mar 17, 2009 at 12:12 UTC Changed status from New to Started
Droperidolum Mar 13, 2009 at 21:30 UTC Create

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

  • Avatar of Aezay Aezay Feb 29, 2012 at 15:39 UTC - 0 likes

    Please try these two patterns, and report back of how well they are working.

    local TT_LevelMatch = "[Уу]ров[ен][ня]ь?"
    local TT_LevelMatch = "[Уу]рове?н[яь]"
    
    Last edited Feb 29, 2012 by Aezay
  • Avatar of Aezay Aezay Feb 04, 2012 at 13:14 UTC - 0 likes

    The following pattern might be able to match all occurrences of the different level lines. Could someone test it out and post some feedback?

    local TT_LevelMatch = " уров[ен][ня]ь?$"
    

    Actually, never mind, just read through the old comments some more and there is also the "Существо" text, which I really have no idea about. Perhaps there just isn't a fix that can be condensed into one pattern match, like in English. Maybe the only way to fix this is to do the six pattern matches like Maqentaer or does the two pattern matches, which KingGLEB uses work fine? In any case, it would still be great if one ultimate pattern match could be found, that would work for all the different versions of the Russian level line.

    Last edited Feb 04, 2012 by Aezay
  • Avatar of Maqentaer Maqentaer Dec 13, 2010 at 03:46 UTC - 0 likes

    there are 6 level tooltips types. my universal variant of fix:

    TipTac\core.lua

    Find:

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

    Replace:

    local TT_LevelMatch1 = "^"..TOOLTIP_UNIT_LEVEL_TYPE:gsub("%%%d*%$?s",".+");
    local TT_LevelMatch2 = "^"..TOOLTIP_UNIT_LEVEL_CLASS_TYPE:gsub("%%%d*%$?s",".+");
    local TT_LevelMatch3 = "^"..TOOLTIP_UNIT_LEVEL_RACE_CLASS_TYPE:gsub("%%%d*%$?s",".+");
    local TT_LevelMatch4 = "^"..TOOLTIP_UNIT_LEVEL_RACE_CLASS:gsub("%%%d*%$?s",".+");
    local TT_LevelMatch5 = "^"..TOOLTIP_UNIT_LEVEL_CLASS:gsub("%%%d*%$?s",".+");
    local TT_LevelMatch6 = "^"..TOOLTIP_UNIT_LEVEL:gsub("%%%d*%$?s",".+");
    

    Find:

    if (u.title) and (u.title:find(TT_LevelMatch)) then
    

    Replace:

    if (u.title) and (
    	(u.title:find(TT_LevelMatch1)) or
    	(u.title:find(TT_LevelMatch2)) or
    	(u.title:find(TT_LevelMatch3)) or
    	(u.title:find(TT_LevelMatch4)) or
    	(u.title:find(TT_LevelMatch5)) or
    	(u.title:find(TT_LevelMatch6))
    ) then
    
    Last edited Dec 13, 2010 by Maqentaer
  • Avatar of KingGLEB KingGLEB Sep 18, 2009 at 18:30 UTC - 0 likes

    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 Mar 20, 2009 at 06:25 UTC - 0 likes

    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 Mar 20, 2009 at 01:49 UTC - 0 likes

    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 Mar 20, 2009 at 00:23 UTC - 0 likes
    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 Mar 20, 2009 at 00:12 UTC - 0 likes
    We have 2 variants of level strings in different cases: <font color="#ffff00">уров</font><font color="#ff0000">ень</font> - nominative case (Like "level one" in english) - thats what TT search for in tips, but he cannot find, cause there no <font color="#ffff00">уров</font><font color="#00ff00">ня</font> - genitive case (like "of first level" in english)" - thats what TT must search in tips to find So, regexp i tried for example: "*<font color="#ffff00">уров</font>(<font color="#ff0000">ень</font>|<font color="#00ff00">ня</font>)*" 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-го <font color="#ffff00">уров</font><font color="#00ff00">ня</font> (%3$s) Otherwise, TOOLTIP_UNIT_LEVEL returns <font color="#FF0000">У</font><font color="#ffff00">ров</font><font color="#FF0000">ень</font> %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 Mar 17, 2009 at 20:24 UTC - 0 likes

    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 Mar 17, 2009 at 13:49 UTC - 0 likes

    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.

Facts

Last updated
Mar 30, 2012
Reported
Mar 13, 2009
Status
Accepted - Problem reproduced / Need acknowledged.
Type
Defect - A shortcoming, fault, or imperfection
Priority
Medium - Normal priority.
Votes
3

Reported by

Possible assignees