Error with frFR at startup #40


  • New
  • Defect
Open
Assigned to whitetooth3
  • Forge_User_76915999 created this issue Oct 1, 2012

    LibStatlogic return an error at startup in french (and probably few other languages).

    This is caused because there is no StatIDLookup in frFR locales
    This can be fixed by adding a blank setup in the locale (line 177)

    ["StatIDLookup"] = {
    }
    

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    On a side note, I have a trouble with critRating in frFR with ratingbuster. I didnt check all the code so maybe you can give me an insight:

    With debug, I can see the pattern "Score de coup critique" (that is the name in frFR) is found in libstatlogic, (it's also listed in the summarize section of Rating Buster tooltip)

    but I can't have the rating displayed in the original stat line with ratingBuster (I have all other stats displayed correctly but that one).
    I have tried few adjustments in RB locale, with no luck.

    After some investigation, I saw that in globalstring the critrating can have two names in frFR
    Long: "score de coup critique"
    Short: "score de critique"
    can this be the cause of the trouble? is so, any idea how I can fix it?

    (sorry for my frenchy english)

  • Forge_User_76915999 added the tags New Defect Oct 1, 2012
  • Forge_User_76915999 added an attachment LogicRB.jpg Oct 1, 2012

    LogicRB.jpg

    <p>LibLogic</p>

  • Forge_User_76915999 added an attachment 166.jpg Oct 1, 2012

    166.jpg

    <p>rev166</p>

  • Forge_User_76915999 added an attachment frFR.zip Oct 1, 2012

    frFR.zip

    <p>frFR locale for SL</p>

  • Forge_User_76915999 added an attachment RB_frFR.zip Oct 1, 2012

    RB_frFR.zip

    <p>frFR locales for RB</p>

  • Forge_User_76915999 posted a comment Oct 1, 2012

    forgot to mention that both issues are occuring in the latest Alpha, with the brand new local system

    Anyway, congratz on that change, it's a really great improvement ^^


    Edited Oct 1, 2012
  • mcremor posted a comment Oct 1, 2012

    Sorry, my fault. Will fix it when I get home (in about 5 hours).

    About the crit: What exactly does the Blizzard tooltip show? And isn't it recognized in both versions (long, like in "Equip: Increases your critical strike by x." and short like "+x Critical Strike") or only in one version?

    And do I understand you correctly that the crit is recognized and shown in the summary section of the tooltip? So it's basically working and just the rating conversion to % is missing in the crit line itself?

  • _ForgeUser581183 posted a comment Oct 1, 2012

    i was gonna say:

    Looks like someone broke the build. And it wasn't me for once.

    But i won't.


    @Tixu. Could you enable debug messages by typing

    /sl debug
    

    and then hover over the item? It will give you a lot of information, including everything LibStatLogic tried to find the text. Take a screenshot of that and post it.

    Or you could just enable warnings:

    /sl warnings
    

    and give the exact text that fails.


    @cremor This. This is exactly why i wanted warnings enabled by default. You have to pull teeth to get the warning information, that shouldn't be happening in the first place. On the other hand, there's no way China, Taiwan, Mexico, Spain, Portugal, Brazil, France, and probably even Germany, are localized enough.


    Edited Oct 1, 2012
  • Forge_User_76915999 posted a comment Oct 1, 2012

    Hi, thanks for the answer.
    I made a screenshot in the ticket attachment.

    As you see the crit is in the summary, but does not showup in the line.
    I tried various Regex in RB locale, I also checked if there was no "unseccable space" issue (since I got some sometimes ago) but nothing seems to work.

    "de.-(%d+)" should does the trick but it's not... (and its working for everything else but Crit rating)
    However crit is recognized in the 5th img, but it's the short string

    I am also suspecting error in the dualspec detection, because the parade (parry) shouldnt be in the summary. (i have double check my RB options)

    @JackTripper:

    Here are warning for the first object in my screenshot:

    13:21:21 LibStatLogic: No Match for "Niveau 90 requis"
    13:21:21 LibStatLogic: No Match for "Niveau d'objet 450"
    


    and the debug (I have manually enabled debug in the libstatlogic code:

    13:23:24 Item being analysed: [Chaîne de veuve]
    13:23:24    SinglePlus: +444 Force, STR=+444
    13:23:24    SinglePlus: +666 Endurance, STA=+666
    13:23:24 S1: 'Niveau 90 requis'
    13:23:24 S1-1: 'Niveau 90 requis'
    13:23:24   DeepScan2 Lookup Fail: 'niveau requis', pattern = '^(.-) ?([%d%,]+)( ?.-)%.?$'
    13:23:24   DeepScan2 Fail: 'Niveau 90 requis'
    13:23:24 LibStatLogic: No Match for "Niveau 90 requis"
    13:23:24 S1: 'Niveau d'objet 450'
    13:23:24 S1-1: 'Niveau d'objet 450'
    13:23:24   DeepScan2 Lookup Fail: 'niveau d'objet', pattern = '^(.-) ?([%d%,]+)( ?.-)%.?$'
    13:23:24   DeepScan2 Fail: 'Niveau d'objet 450'
    13:23:24 LibStatLogic: No Match for "Niveau d'objet 450"
    13:23:24    SingleEquipStatCheck Lookup Fail: ''
    13:23:24 S1: 'Augmente de 317 la Maîtrise'
    13:23:24   DeepScan: Augmente de 317 la Maîtrise, MASTERY_RATING=317
    13:23:24    SingleEquipStatCheck Lookup Fail: ''
    13:23:24 S1: 'Augmente de 260 le score de coup critique'
    13:23:24   DeepScan: Augmente de 260 le score de coup critique, MELEE_CRIT_RATING=260, SPELL_CRIT_RATING=260
    13:23:24 StatLogic:GetDiff
    13:23:24 StatLogic:GetDiff
    


    You can see crit rating is recognized as it should


    Edited Oct 1, 2012
  • mcremor posted a comment Oct 1, 2012

    @Tixu:
    Thanks for the screenshots and the debug output. I think the problem lies in RatingBuster and not in LibStatLogic since the rating is correctly identified.

    Unrelated point: It doesn't find it by SingleEquipStatCheck because of a wrong space before the ":" (expects non-breakable space but Blizzard uses normal space). I'll also change that to use ITEM_SPELL_TRIGGER_ONEQUIP in frFR too. That won't change anything for your problem but will give better performance.

    About the warnings: I don't understand why you get these since they should be excluded by the line "["Nivea"] = true,". Weird.

    @JackTripper:
    That's the revenge for the missing "}" in r163 ;-)

    More seriously: I would have no problem with warnings enabled by default in deDE. All items I own on all my characters don't show any warnings. And if some use reports a warning for deDE I can try to fix it. But I agree that enabling them for anything other than enUS or deDE won't be a good idea until someone works on the excludings for 5.0.

    Any idea why lines starting with "Nivea" aren't correctly excluded in frFR?

    Btw, have you noticed that the by default enabled warnings for you only work after reloading the UI but not on initial login?

  • Forge_User_76915999 posted a comment Oct 1, 2012

    You are right for the "nivea" exclusion, it's weird..

    also, I just checked in GlobalStrings.lua.

    ITEM_SPELL_TRIGGER_ONEQUIP = "Équipé :";
    


    The space between é and : is $A0 not $20
    So I am not sure of the reason of the SingleEquipStatCheck failure...


    Edited Oct 1, 2012
  • mcremor posted a comment Oct 1, 2012

    Oh, ok. Then maybe the problem is the ".-" at the end of SingleEquipStatCheck. That isn't there in enUS and deDE. Maybe because of that the "(.-)" before it only captures an empty string. That would also explain the empty string in the "SingleEquipStatCheck Lookup Fail" debug output. I'd also see no reason why there might be some additional text after a "." in a simple "Equip: " line.

    Do you have the knowledge and time to debug these two problems (or three, including you initial crit problem with RatingBuster)? If not, I'd try it when I find some time, but I fear that it might be hard without a frFR client.

  • Forge_User_76915999 posted a comment Oct 1, 2012

    I have some knowledge, but time may be the issue ;). I will try.
    (I made the first frFR translation a long time ago, and some updates, but I stopped for a while after that, I guess some people put their hands on it since then)

    I think I know what the SingleEquipStatCheck issue is, base string are now very differents. Some regex will need a big checkup, I can do that, I guess.

    However I made a mistake, I thought that I was using the very last RB+SL version, but it was not, I was using the version just before the "neutral" strings addition.

    I just updated the whole thing and the critRating issue is still here, but a bit worse now.
    I made a new screen shot.
    As you see, haste and expertise are shown in the tooltip-line, but not anymore in the summary.
    Also, debug in SL seems broken, because everything is marked as fail, when obviously it's not (the stats are in the tooltip)

    14:55:26 LibStatLogic: No Match for "Équipé : Augmente de 228 le score de coup critique."
    14:55:26 LibStatLogic: No Match for "Équipé : Augmente de 155 la hâte."
    14:55:26 LibStatLogic: No Match for "Équipé : Augmente de 102 l’expertise."
    
    14:54:17 Item being analysed: [Plaques de bras de lart martial]
    14:54:17    PreScan: Armure : 1897, ARMOR=1897
    14:54:17    SinglePlus: +369 Force, STR=+369
    14:54:17    SinglePlus: +553 Endurance, STA=+553
    14:54:17    SingleEquipStatCheck Lookup Fail: ''
    14:54:17 S1: 'Augmente de 228 le score de coup critique'
    14:54:17 S1-1: 'Augmente de 228 le score de coup critique'
    14:54:17   DeepScan2 Lookup Fail: 'augmente de le score de coup critique', pattern = '^(.-) ?([%d%,]+)( ?.-)%.?$'
    14:54:17   DeepScan2 Fail: 'Augmente de 228 le score de coup critique'
    14:54:17 LibStatLogic: No Match for "Équipé : Augmente de 228 le score de coup critique."
    14:54:17    SingleEquipStatCheck Lookup Fail: ''
    14:54:17 S1: 'Augmente de 155 la hâte'
    14:54:17 S1-1: 'Augmente de 155 la hâte'
    14:54:17   DeepScan2 Lookup Fail: 'augmente de la hâte', pattern = '^(.-) ?([%d%,]+)( ?.-)%.?$'
    14:54:17   DeepScan2 Fail: 'Augmente de 155 la hâte'
    14:54:17 LibStatLogic: No Match for "Équipé : Augmente de 155 la hâte."
    14:54:17    SingleEquipStatCheck Lookup Fail: ''
    

    Edited Oct 1, 2012
  • mcremor posted a comment Oct 1, 2012

    So it seems I broke it :-( But that also explains the not working exclude lines. Those were broken for all languages other than enUS before my commit. Can you confirm that they work now?

    Please ignore the fact that the ratings are converted to percent in the stat line. As far as I know, that detection is done by RatingBuster and not by LibStatLogic. If /sldebug or /slwarning says that someting isn't recognized, then there is a problem.

    Please try to remove the ".-" before the "$" at the end of SingleEquipStatCheck. That might already be enough to get it working. If not, you might want to enable the two prints in ProcessNeutralStatIDLookupPlaceholders. The second printed value must match what SingleEquipStatCheck captures in the two "(.-)" groups (concatenated without a seperator).


    Edited Oct 1, 2012
  • Forge_User_76915999 posted a comment Oct 1, 2012

    mmh, actually I am thinking that the PatternLocale.frFR.ProcessNeutralStatIDLookupPlaceholders() function is never used. I placed a Print at the first line, and it never shows up...

    I didnt know that RB has is own stats detection, I was thinking everything was done by StatLogic... I will check there if I can find something.


    Edited Oct 1, 2012
  • _ForgeUser581183 posted a comment Oct 1, 2012

    <<reply 983905="">>

    Those were broken for all languages other than enUS before my commit.

    But how was it working for you in deDE?

  • Forge_User_76915999 posted a comment Oct 1, 2012

    Aaahhh
    My mistake, I thought that the function was used at each item, but no, It fires at start. (I know understand how it's working, you pull out the name of the stats from global string)
    so that seems ok. (there is a trick to be able to see the whole starting log? i only have the last lines)
    Well I think the problem is in regex at this point.

    'Augmente de %s le score de coup critique en mêlée.' -> 'Augmentele scorecoup critique en mêlée'

    both "de" are removed, so it's not working.

    I will try to find a correct way to handle the french specificities
    edit: instead of

    newKey = gsub(newKey, "de ?", "")
    

    this should probably be:

    newKey = gsub(newKey, "[aA]ugmente de ?", "")
    

    edit:
    However, I my last debug session, it seems that SingleEquipStatCheck isnt used. SL go directly to deepscan2 lookup: (and no nil error are popping up, so it's probably not a "localized strind not found" issue

    6:52:29 Item being analysed: [Plaques de bras de lart martial]
    16:52:29    PreScan: Armure : 1897, ARMOR=1897
    16:52:29    SinglePlus: +369 Force, STR=+369
    16:52:29    SinglePlus: +553 Endurance, STA=+553
    16:52:29 S1: 'Augmente de 228 le score de coup critique'
    16:52:29 S1-1: 'Augmente de 228 le score de coup critique'
    16:52:29   DeepScan2 Lookup Fail: 'augmente de le score de coup critique', pattern = '^(.-) ?([%d%,]+)( ?.-)%.?$'
    16:52:29   DeepScan2 Fail: 'Augmente de 228 le score de coup critique'
    16:52:29 LibStatLogic: No Match for "Équipé : Augmente de 228 le score de coup critique."
    16:52:29 S1: 'Augmente de 155 la hâte'
    16:52:29 S1-1: 'Augmente de 155 la hâte'
    16:52:29   DeepScan2 Lookup Fail: 'augmente de la hâte', pattern = '^(.-) ?([%d%,]+)( ?.-)%.?$'
    16:52:29   DeepScan2 Fail: 'Augmente de 155 la hâte'
    16:52:29 LibStatLogic: No Match for "Équipé : Augmente de 155 la hâte."
    16:52:29 S1: 'Augmente de 102 l’expertise'
    16:52:29 S1-1: 'Augmente de 102 l’expertise'
    16:52:29   DeepScan2 Lookup Fail: 'augmente de l’expertise', pattern = '^(.-) ?([%d%,]+)( ?.-)%.?$'
    16:52:29   DeepScan2 Fail: 'Augmente de 102 l’expertise'
    16:52:29 LibStatLogic: No Match for "Équipé : Augmente de 102 l’expertise."
    16:52:29 StatLogic:GetDiff
    16:52:29 StatLogic:GetDiff
    

    Edited Oct 1, 2012
  • mcremor posted a comment Oct 1, 2012
    Quote from JackTripper:

    But how was it working for you in deDE?

    It wasn't working before r164. That was the reason why I created ticket 38. Only english strings (or pre localized constant strings) were used for excluding between r145 and r164.

    Quote from Tixu:

    there is a trick to be able to see the whole starting log? i only have the last lines

    Works fine for me, but I'm using Chatter. Maybe the default Blizzard chat (or the Addon you are using) doesn't save that much lines.

    Quote from Tixu:

    this should probably be:
    newKey = gsub(newKey, "[aA]ugmente de ?", "")

    Ah, I didn't notice the "Augmente" in the SingleEquipStatCheck. Either remove that from the SingleEquipStatCheck pattern or remove it in ProcessNeutralStatIDLookupPlaceholders. But in the function you might need two gsub calls since there is something between "Augmente" and "de" that you don't want to remove (at least that's like the SingleEquipStatCheck pattern looks like).

    Btw, I'm at home now, I'll check in some changes shortly that fix the nil errors and remove some duplicated code.

  • Forge_User_76915999 posted a comment Oct 1, 2012

    About the "[aA]ugmente de ?", I think it's probably better like this/

    The old SingleEquipStatCheck try to catch something between "augmente" and "de" because, sometimes ago the line was like
    "augmente la STAT de %d"
    today it's always
    "augmente de %d la STAT"

    I have checked some old stuff, and everything seems to follow this new rule. I guess they have unified all these labels

    (i will investigate about the chat issue, it's weird, I have Chatter too)


    Edited Oct 1, 2012
  • mcremor posted a comment Oct 1, 2012

    If it isn't needed any more than better remove it, yes. That will simplify the code.

    Btw, I've checked in the fix for the startup error. Maybe you'll want to update now instead of merge later ;-)

  • Forge_User_76915999 posted a comment Oct 2, 2012

    Hi
    I have made some change in the frFR locales (uploaded in attachment)
    Most of strings are now found through SinglePlusStatCheck or SingleEquipStatCheck.
    There is still a lot of cleanup to do, but at least this works for a lot of stats.

    however I didnt found how to fix that odd crit rating issue ...
    I didnt search yet where ratingbuster is reading strings, but that sounds very odd to me to have StatLogic and not using it...


    Edited Oct 2, 2012
  • mcremor posted a comment Oct 2, 2012

    It's an open repository, you can commit the changes yourself. If you don't know how to use SVN I can commit it for you of course.

    About the RatingBuster crit issue: Since it works for deDE it must be a localization problem.
    As far as I understand the RatingBuster code, it first applies the patterns from L["numberPatterns"] to get the value and rating type text. Then it searches for the rating type text in the patterns that are defined in L["statList"]. The L["statList"] table is filled by GlobalString constants and again the ones with placeholders are processed first.
    I think this is again a similar problem that the captures in the patterns don't match the entries in L["statList"].

    Don't ask me why RatingBuster implements its own pattern matching ;-)


    Edited Oct 2, 2012
  • Forge_User_76915999 posted a comment Oct 2, 2012

    Oh, I see, the statlist is defined in enUS locale.
    it's ok then I have fixed the issue.
    However, I have a lack of Lua knowledge here: is there a way to add some pattern to existing list?

    the list is defined like this:

    L["statList"] = {
    	{pattern = string.lower(SPELL_STAT1_NAME), id = SPELL_STAT1_NAME}, -- Strength
    	{pattern = string.lower(SPELL_STAT2_NAME), id = SPELL_STAT2_NAME}, -- Agility
    	{pattern = string.lower(SPELL_STAT3_NAME), id = SPELL_STAT3_NAME}, -- Stamina
    [...]
    }
    

    How can I add 2 new lines to the list in the frFR locales without having to copypaste the whole list from the enUS Locales?
    I need these lines:

    	{pattern = "score de critique", id = CR_CRIT_MELEE}, --Crit
    	{pattern = "score de coup critique", id = CR_CRIT_MELEE}, --Crit
    

    For the files:
    I dont have any svn tool installed at this time. If I continue to make update I will install such tool, for sure. For now, could you upload the file?

    thx!


    Edited Oct 2, 2012
  • mcremor posted a comment Oct 2, 2012

    You can try it like that:

    table.insert(L["statList"], {pattern = "score de critique", id = CR_CRIT_MELEE})
    table.insert(L["statList"], {pattern = "score de coup critique", id = CR_CRIT_MELEE})
    

    I hope that works with an AceLocale table.

    About the file: Yeah, no problem, will commit it in about 2-3 hours.

  • Forge_User_76915999 posted a comment Oct 2, 2012

    Thx, but, aceLocale is whining^^

    I have finally copied and simplified the statlist for frFR, so it's ok
    i have uploaded RB_frFR locales here too, then all main frFR fixes are up to date now.

    Thx!


    Edited Oct 2, 2012
  • mcremor posted a comment Oct 2, 2012

    I've commited both files. But we should really find a way to insert the two crit entries without copying the whole table from enUS.

  • Forge_User_76915999 posted a comment Oct 2, 2012

    Thank you

    Yes I dont like the full copy too, but, i really dont see how to do that without having error in acelocale... if someone know...

    I have installed tortoise SVN, i will try to update frFR locales myself next time.


    Edited Oct 2, 2012

To post a comment, please login or register a new account.