Recipe addon problem 1/2 [solved]

Guild listing of known recipes

Moderator: ds

Recipe addon problem 1/2 [solved]

Postby lesablier » Thu Aug 31, 2006 1:46 am

Solved
Fix here - http://www.wowroster.net/Forums/viewtop ... .html#5126


Hello.

I didin't find the right place for the addon Recipe, so i post here
(Sorry if it's wrong place :cyclops: )

I've notice that for the integrated recipe addon Roster, it missing
the display of the level for french roster:

A good displaying of level
Image

A wrong displaying of the level "niveau" in french (my roster :shaking: )
Image

http://guilde.le.sablier.free.fr/roster ... filterbox=

First i try to investigate in localization.php
Here the result of my translation (hope this helps !!)

Code: Select all
$wordings['deDE']['MadeBy'] = 'Rezeptesuche';
$wordings['deDE']['professionfilter'] = 'Fertigkeit:';
$wordings['deDE']['itemdescription'] = 'Beschreibung';
$wordings['deDE']['whocanmakeit'] = 'Wird hergestellt von';
$wordings['deDE']['dnotpopulatelist'] = 'Leider nichts gefunden';
$wordings['deDE']['applybutton']= 'Start';

$wordings['enUS']['MadeBy'] = 'Made By';
$wordings['enUS']['professionfilter'] = 'Profession Filter:';
$wordings['enUS']['itemdescription'] = 'Item Description:';
$wordings['enUS']['whocanmakeit'] = 'Who can make it';
$wordings['enUS']['dnotpopulatelist'] = 'did not populate list';
$wordings['enUS']['applybutton']= 'Apply';

$wordings['frFR']['MadeBy'] = 'Metiers';
$wordings['frFR']['Level'] = 'Niveau';
$wordings['frFR']['professionfilter'] = 'Filtre profession:';
$wordings['frFR']['itemdescription'] = 'Description objet:';
$wordings['frFR']['whocanmakeit'] = 'Qui peut le faire';
$wordings['frFR']['dnotpopulatelist'] = 'ne pas inclure';
$wordings['frFR']['applybutton']= 'Appliquer';
 


But it didn't solve the level displaying

I check each file of the addon but no one contains the french word of level, so it must be elsewhere :scratch:

In conf.php(of recipe) the level is 1
Code: Select all
    $display_recipe_level 1;            //Recipe Level column display ( 1 on | 0 off) 




Here is the code of the web page for my roster and found the level in french word

Code: Select all
<!-- END [open-simpleborder] container --><table class="bodyline" cellspacing="0">
<tr>
<th class="membersHeader"> Objet </th>
<th class="membersHeader"> Nom </th>
<th class="membersHeader"> Niveau </th>

<th class="membersHeader"> Réactifs </th>
<th class="membersHeader"> Qui peut le faire </th>


But i'm too dummy in php, to found where the problem is :pale:

Thanks for any help

PS: i'm modyfing in conf.php the level to 0 and tooltip to 1, that's displaying in the tooltip the required level to use tue item, but yo muste have a wide-sceen to show :cyclops2:
Code: Select all
    $display_recipe_level 0;            //Recipe Level column display ( 1 on | 0 off)
    
$display_recipe_tooltip 1;        //Recipe tooltip column display ( 1 on | 0 off ) 
Last edited by lesablier on Sat Sep 02, 2006 12:26 pm, edited 2 times in total.
lesablier
WR.net Journeyman
WR.net Journeyman
 
Posts: 77
Joined: Sat Jul 15, 2006 4:01 pm

Recipe addon problem 1/2

Postby zanix » Thu Aug 31, 2006 3:02 am

Well, you would have to edit wowdb.php as this is what pulls the level out of the tooltip

*Looks at the code*
Seems this is currently hardcoded for english
I'm pretty sure this doesn't work for deDE either
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Recipe addon problem 1/2

Postby lesablier » Thu Aug 31, 2006 3:39 am

Thank you Zanix.

Found 30 "level" in wowdb.php but i don't know what to find.... :shaking:
lesablier
WR.net Journeyman
WR.net Journeyman
 
Posts: 77
Joined: Sat Jul 15, 2006 4:01 pm

Recipe addon problem 1/2

Postby zanix » Thu Aug 31, 2006 4:35 am

wowdb.php
Lines 542-543
Code: Select all
        if (strpos($recipe['recipe_tooltip'], 'Requires Level') != 0)
            
$this->add_value('level', (rtrim(substr($recipe['recipe_tooltip'], strpos($recipe['recipe_tooltip'], 'Requires Level') + 15,2))) ); 
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Recipe addon problem 1/2

Postby zanix » Thu Aug 31, 2006 6:14 am

Moved (just made the new forum section :) )
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Recipe addon problem 1/2

Postby sturmy » Thu Aug 31, 2006 1:25 pm

If I get that right we need to change in wowdb.php

Code: Select all
      if (strpos($recipe['recipe_tooltip'], 'Requires Level') != 0)
         $this->add_value('level', (rtrim(substr($recipe['recipe_tooltip'], strpos($recipe['recipe_tooltip'], 'Requires Level') + 15,2))) );


So that 'Requires Level' becomes a localized string (we currently have a localized string for 'Level' but not for 'Requires Level') and I assume change the strpos formula so that the offset generated is the lenght of the localized string.

I have a knowledge of php which is too limited to enable me to suggest a change (diagnosis is almost fine... I hope...). Help appreciated!
sturmy
WR.net Expert
WR.net Expert
 
Posts: 160
Joined: Wed Aug 16, 2006 9:07 pm

Recipe addon problem 1/2

Postby zanix » Thu Aug 31, 2006 1:34 pm

Give me an example of a Requires Level ## line in French
(I'll also need one for German)
And I'll see what I can come up with
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Recipe addon problem 1/2

Postby sturmy » Thu Aug 31, 2006 1:51 pm

It should be like 'Niveau ## requis' (yeah, the level pattern is in the middle, bloody non english language variants! I think you'll need a regexp for that... and we can probably have a locale string for "required" and reuse the existing "Level" we have).

Can't help with German though...

Zanix, you are a my personal hero of the day if you can hammer this out!
sturmy
WR.net Expert
WR.net Expert
 
Posts: 160
Joined: Wed Aug 16, 2006 9:07 pm

Re: Recipe addon problem 1/2

Postby lesablier » Thu Aug 31, 2006 2:21 pm

Give me an example of a Requires Level ## line in French
(I'll also need one for German)
And I'll see what I can come up with


Here is the french:

Niveau requis


My german is quite "rust" but it could be
Erforderliches niveau
lesablier
WR.net Journeyman
WR.net Journeyman
 
Posts: 77
Joined: Sat Jul 15, 2006 4:01 pm

Recipe addon problem 1/2

Postby zanix » Thu Aug 31, 2006 2:27 pm

Ok, so now lets get some rex_ex to parse this
PleegWat! :)
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Recipe addon problem 1/2

Postby PleegWat » Thu Aug 31, 2006 2:45 pm

Yes?

Code: Select all
/Requires level ([\d]+)/


Then get item 1 from the matches array.
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Re: Recipe addon problem 1/2

Postby sturmy » Thu Aug 31, 2006 2:50 pm

Is this taking care of the ## between "required" and "level" in the FR locale (at least)?

I wish WoW dev had done this like:
"niveau requis: ##" for the FR locale but instead they chose "niveau ## requis" as part of the tooltip.

My regexp is rusted to the point of breaking, but I read this matching "required level" followed by the number?
sturmy
WR.net Expert
WR.net Expert
 
Posts: 160
Joined: Wed Aug 16, 2006 9:07 pm

Re: Recipe addon problem 1/2

Postby Hannah » Thu Aug 31, 2006 2:54 pm

In German it´s:
Code: Select all

Benötigtes Level


The 'ö' has to be changed to:
Code: Select all
&ouml;
 


i think :)

CU

Hannah
User avatar
Hannah
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 142
Joined: Tue Jul 04, 2006 1:41 pm
Location: Germany, Cologne

Re: Recipe addon problem 1/2

Postby PleegWat » Thu Aug 31, 2006 2:57 pm

sturmy wrote:Is this taking care of the ## between "required" and "level" in the FR locale (at least)?

I wish WoW dev had done this like:
"niveau requis: ##" for the FR locale but instead they chose "niveau ## requis" as part of the tooltip.

My regexp is rusted to the point of breaking, but I read this matching "required level" followed by the number?


Yes. The ([\d]+) part is key. Just move the localization text around it.
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Re: Recipe addon problem 1/2

Postby sturmy » Thu Aug 31, 2006 3:07 pm

Hmmmm... Silly idea popping to my mind...

It looks like the pattern will be different between locales then.

So we're talking about a regexp in the locale string that is used in the wowdb.php, aren't we? (*runs to check if this a first timer*)
sturmy
WR.net Expert
WR.net Expert
 
Posts: 160
Joined: Wed Aug 16, 2006 9:07 pm

Next

Return to Made By

Who is online

Users browsing this forum: No registered users and 0 guests

cron