Baggins

102 - ItemType rules does not work in ruRU locale

ItemType rules does not work in ruRU locale

>> What steps will reproduce the problem?
1. Clean install from Curse, all other addons disabled.
2. Open baggins.
3. Add New category. Rule:
Type: ItemType, Item type: Armor, Item subtype: Plate.
4. Add New section
5. Submit new category to displaying in new section.
6. To be sure you can delete all other bags and sections

>> What is the expected output?
Displaing plates armor in new section.

>> What do you see instead?
No items in new section.

>> What version of the product are you using?
r458

>> Do you have an error log of what happened?
No. I have more: i have investigated this error and i have solution.

>> Please provide any additional information below.
See post #1.
See also ticket #7: http://www.wowace.com/addons/baggins/tickets/7-item-type-rules-does-not-work-in-ru-ru-locale/
See also ticket #15: http://www.wowace.com/addons/baggins/tickets/15-item-type-rules-does-not-work-in-ru-ru-locale/

User When Change
Kiber_ Sep 09, 2013 at 19:42 UTC Create

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

  • 4 comments
  • Avatar of Kiber_ Kiber_ Sep 14, 2013 at 07:24 UTC - 0 likes

    The main problem is in the code:

    return Type == BI[rule.itype] and (rule.isubtype == nil or SubType == BI[rule.isubtype] )
    

    Subtype = "<one translation variant>"
    BI[rule.isubtype] = "<another translation varian>"
    So Subtype <> BI[rule.isubtype].

    I see 3 different solutions:
    1. Use Baggins translation, which is work good for now (see post #1 for details).
    2. Change the translation in LibBabbleInventory. But it can lead to other consequences, I will not undertake to count them.
    3. Use reverse translation from local language to English (RU -> EN for example), to the condition looked like this:

    return Type == BI[rule.itype] and (rule.isubtype == nil or ToEng[SubType] == rule.isubtype)
    
    Last edited Oct 09, 2013 by Kiber_
  • Avatar of profalbert profalbert Sep 13, 2013 at 08:05 UTC - 0 likes

    Hi,

    Your translations actually belong in LibBabbleInventory. As soon as they are in there, I can cut a new release, that includes the new version

  • Avatar of profalbert profalbert Sep 12, 2013 at 06:54 UTC - 0 likes

    Hi, I'll commit the updated translations as soon as I get to it

  • Avatar of Kiber_ Kiber_ Sep 09, 2013 at 19:46 UTC - 0 likes

    So, hello. I have spend lot of hours to investigation and now i can report this way of solution:

    1. Fix error + Involve translation: Baggins\Baggins-Filtering.lua:

    -- Search call:
    Baggins:AddCustomRule("ItemType", {
    -- Search code:
    tmp[v] = v
    -- Replace to code:
    tmp[v] = L[v]
    -- Search code:
    return Type == BI[rule.itype] and (rule.isubtype == nil or SubType == BI[rule.isubtype] )
    -- Replace to code:
    return Type == BI[rule.itype] and (rule.isubtype == nil or SubType == L[rule.isubtype] )
    

    2. Fix translation: Baggins\locales\Baggins-ruRU.lua:

    -- Insert code:
    L["Cosmetic"] = "Декоративные"
    L["Item Enhancement"] = "Улучшение вещей"
    L["Flask"] = "Настой"
    L["Elixir"] = "Эликсир"
    L["Scroll"] = "Свиток"
    L["Bandage"] = "Бинты"
    L["Potion"] = "Зелье"
    L["Materials"] = "Материалы"
    
  • 4 comments

Facts

Reported
Sep 09, 2013
Status
New - Issue has not had initial review yet.
Type
Defect - A shortcoming, fault, or imperfection
Priority
Medium - Normal priority.
Votes
0

Reported by

Possible assignees