The Black Company Forum Index The Black Company

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Localization issue.

 
Post new topic   Reply to topic    The Black Company Forum Index -> Suicide Kings
View previous topic :: View next topic  
Author Message
Guest
Guest





PostPosted: Fri Oct 06, 2006 2:31 am    Post subject: Localization issue. Reply with quote

Hello I Used the French client version of WoW and I have a cosmetic issue in the 2.09 version.

In all list (raid, class, or additional list) some color for party class are not properly display.

It´s probably du to class name (English Vs French) which are not well take into account.
i.e Paladin/Mage are ok (because = to french version) but i.e Guerrier (warrior) or Prêtre (priest) are not correcte.

I have check quicly in source code and I think issue come from
function getClassColor(class) in file SuicideKings.lua which return color according to class.

This fonction contain only :
return RAID_CLASS_COLORS[string.upper(class)];

Two possibility :
- class is in English and Table RAID_CLASS_COLORS in french
- class is in French and Table RAID_CLASS_COLORS in english.

I not found where RAID_CLASS_COLORS is initialized.

Please could you check this when you have the time Smile

Regards.

NOTA : 2.11b have the same issue.
Back to top
shan_aya
Guest





PostPosted: Sat Oct 07, 2006 8:21 am    Post subject: Reply with quote

hi,
in index.php and skparser.php change

Priest to Prêtre
Warlok to Démoniste
Hunter to Chasseur
Rogue to Voleur
Druid to Druide
Warrior to Guerrier
Shaman to

now it's working in french with french client
Back to top
shan_aya
Guest





PostPosted: Sat Oct 07, 2006 8:23 am    Post subject: Reply with quote

hum, posting quickly... sorry

it's not your question Confused , my answer was... Embarassed Embarassed
Back to top
Guest
Guest





PostPosted: Sat Oct 07, 2006 10:32 am    Post subject: Reply with quote

effectivelly my question is for Suicidkink add on and not for the php web tool.

Someone can provide me a fix for this.

Regards.
Back to top
Joehunk



Joined: 06 May 2009
Posts: 20626

PostPosted: Sun Oct 08, 2006 2:35 pm    Post subject: Reply with quote

RAID_CLASS_COLORS is actually something defined within the base WoW UI. I had assumed it would be indexed by the localized class names, but I guess it uses canonical (English) class names? It's hard for me to test without a French client. You can test this for me though. Target a player whose class name is different in English than in French. Then type:

Code:
/script DEFAULT_CHAT_FRAME:AddMessage(UnitClass("target"))


That should print out the name of the player's class in your chat window. I would be interested to know if it comes out in English or French. The, if you could do the following for me, it would be great (even though it is long):

Code:
/script for class, _ in RAID_CLASS_COLORS do DEFAULT_CHAT_FRAME:AddMessage(class); end


That should print out the names of all the classes in RAID_CLASS_COLORS to your chat window. Let me know if those are in French or English.
_________________
Wir sind die Roboter
Back to top
View user's profile Send private message Send e-mail
Guest
Guest





PostPosted: Mon Oct 09, 2006 6:48 am    Post subject: Reply with quote

Ok thanks Joehunk I will try this tonight (french time) Smile and give you here results.

Many thanks.
Back to top
Guest






PostPosted: Mon Oct 09, 2006 10:11 am    Post subject: Reply with quote

Joehunk wrote:

Code:
/script DEFAULT_CHAT_FRAME:AddMessage(UnitClass("target"))



French answer in low leter : Prêtre , Voleur, Démoniste, Chasseur, Mage, ....

Joehunk wrote:

Code:
/script for class, _ in RAID_CLASS_COLORS do DEFAULT_CHAT_FRAME:AddMessage(class); end



English list in capital letter:
HUNTER
WARRIOR
ROGUE
...

I hope this help you Smile
Back to top
Guest
Guest





PostPosted: Mon Oct 09, 2006 10:56 am    Post subject: Reply with quote

Following code work for french Guerrier Smile and I can duplicate it for Démoniste, .... but if you have a solution based on switch case or index of table French Vs English I think it will be beter.

local function getClassColor(class)
if(class=="Guerrier") then
class="WARRIOR";
end
return RAID_CLASS_COLORS[string.upper(class)];
end

Regards
Back to top
Guest
Guest





PostPosted: Tue Oct 10, 2006 5:23 pm    Post subject: Reply with quote

After several try here is the solution I have found to solve my own problem.

You can probably optimize it Very Happy

local function getClassColor(class)
local ClassEn = { "Raid", "Mage", "Druid", "Paladin", "Warrior", "Rogue", "Hunter", "Warlock",

"Priest", "Shaman" };
for index,ClasseLocalized in pairs(SUICIDEKINGS_AUTO_LISTS)
do
if (ClasseLocalized==class) then
class=ClassEn[index];
break;
end

end
return RAID_CLASS_COLORS[string.upper(class)];
end
Back to top
Guest






PostPosted: Thu Oct 19, 2006 6:20 pm    Post subject: Reply with quote

I do this :

Code:

local unitId = getUnitId(l_currentRollList[itemIndex].player);
if (unitId) then
      l_currentRollList[itemIndex].class, englishClass = UnitClass(unitId);
end

if (englishClass) then
      classColor = getClassColor(englishClass);
end
Back to top
Guest






PostPosted: Thu Oct 19, 2006 6:22 pm    Post subject: Reply with quote

Anonymous wrote:
I do this :

Code:

local unitId = getUnitId(l_currentRollList[itemIndex].player);
if (unitId) then
      l_currentRollList[itemIndex].class, englishClass = UnitClass(unitId);
end

if (englishClass) then
      classColor = getClassColor(englishClass);
end


Yes because UnitClass(unitId); return localized and English class name ! Very Happy
Back to top
Joehunk



Joined: 06 May 2009
Posts: 20626

PostPosted: Fri Oct 20, 2006 8:01 am    Post subject: Reply with quote

That is good info; thanks! WowWiki didn't used to have that info on it; I wonder if UnitClass() was updated in a patch.
_________________
Wir sind die Roboter
Back to top
View user's profile Send private message Send e-mail
Anonyous
Guest





PostPosted: Tue Dec 12, 2006 10:11 am    Post subject: Reply with quote

Hello all I have download the latest 3.04 version and I am dispointed to see this multi-language modification was not included. So i have made it again manually Confused

Please could you introduce it for the next 3.05 version to allow all localized client (french, spanish, ...) to have color displayed correctly in the SK windows.

Regards.

PS: And again sorry for my English ^^
Back to top
Display posts from previous:   
Post new topic   Reply to topic    The Black Company Forum Index -> Suicide Kings All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group