fixed: Localization of Missing Recipies :D

Quick and easy way to see what recipes your character is missing

Moderators: zeryl, Teta68

fixed: Localization of Missing Recipies :D

Postby NurMut » Thu Sep 28, 2006 4:14 pm

Hello,

I just wanted to get this Addon running for my german Roster and I think I got the Problem :D

Demo: http://nurmut.scene-hosting.net/roster/ ... singrecipe

The problem was that index.php gave the wrong wordings to missing.php, so I challanged the problem by first entering the names directly.

Afterwards I was able to get the names by using roster_lang, so it should work for the french lacalization, too.
I hope the only thing you'll need to do is entering the french wordings into localization.php.

I just added the two files in the attachment.

Greetings NurMut

p.s. woops, just didn't read the french topic, so mine is the same as there :D
Attachments
download_www2ftp_26557.zip
(3.25 KiB) Downloaded 430 times
Last edited by NurMut on Thu Sep 28, 2006 4:19 pm, edited 2 times in total.
User avatar
NurMut
WR.net Apprentice
WR.net Apprentice
 
Posts: 17
Joined: Wed Jul 12, 2006 7:15 pm
Location: Germany

Re: fixed: Localization of Missing Recipies :D

Postby Hiiri » Sat Sep 30, 2006 6:58 pm

Hi.

my roster is in german too, after this fix it works for all that use a german client.

The problem now is, i'm using an english client, so it's no more working for me.

Could you make this work for both, english and german? :)
Last edited by Hiiri on Sat Sep 30, 2006 7:03 pm, edited 1 time in total.
Image
User avatar
Hiiri
WR.net Apprentice
WR.net Apprentice
 
Posts: 3
Joined: Wed Aug 16, 2006 3:36 am

Re: fixed: Localization of Missing Recipies :D

Postby NurMut » Thu Oct 12, 2006 1:59 pm

Hmpf, I thougt it should work :scratch:

While not having that much time at the moment it could last a while doing that, but I'll do my very best.

Think this has to do something with the rosterlanguage set in the config.

Would you please offer a link to your Roster?

MfG NurMut
Last edited by NurMut on Thu Oct 12, 2006 2:16 pm, edited 2 times in total.
User avatar
NurMut
WR.net Apprentice
WR.net Apprentice
 
Posts: 17
Joined: Wed Jul 12, 2006 7:15 pm
Location: Germany

fixed: Localization of Missing Recipies :D

Postby Hiiri » Fri Oct 13, 2006 4:55 am

http://www.zinzi.de/epiphany/roster/

The language is set to german, but some of us are using an english wow client.
Image
User avatar
Hiiri
WR.net Apprentice
WR.net Apprentice
 
Posts: 3
Joined: Wed Aug 16, 2006 3:36 am

Re: fixed: Localization of Missing Recipies :D

Postby NurMut » Mon Oct 16, 2006 1:27 pm

OK, thanks.

I think I know where the problem lies, but it will need a little time to code a workaround.

I'll do my very best to get it working as fast as possible.
Last edited by NurMut on Mon Oct 16, 2006 1:34 pm, edited 1 time in total.
Image
User avatar
NurMut
WR.net Apprentice
WR.net Apprentice
 
Posts: 17
Joined: Wed Jul 12, 2006 7:15 pm
Location: Germany

Re: fixed: Localization of Missing Recipies :D

Postby NurMut » Wed Oct 18, 2006 10:39 pm

I think I got it :D

Try using the attached files and please give some feedback, if it's working or not.

I'm on vacation from 20.10.06 to 31.10.06 so please don't bother if I don't answer in that time.

Greetings NurMut
Attachments
recipies.zip
(3.69 KiB) Downloaded 429 times
Image
User avatar
NurMut
WR.net Apprentice
WR.net Apprentice
 
Posts: 17
Joined: Wed Jul 12, 2006 7:15 pm
Location: Germany

fixed: Localization of Missing Recipies :D

Postby SethDeBlade » Wed Oct 18, 2006 11:41 pm

:woot: works great, thank you :)

haste jut jemacht ;)
User avatar
SethDeBlade
WR.net Expert
WR.net Expert
 
Posts: 192
Joined: Thu Jul 06, 2006 1:02 am
Location: Germany

fixed: Localization of Missing Recipies :D

Postby Hiiri » Thu Oct 19, 2006 7:38 pm

Hallo,
danke erstmal dafür.

Es funktioniert zwar soweit aber mir gefällt das mit der Trennung nicht.
Ich fände besser wenn die Auswahl auf deutsch ist und das Script schaut dann beim Char nach ob zB entweder Alchimie unter den Skills ist oder eben Alchemy bei englischen Clients wenn man einen Char und Alchimie auswählt.
Image
User avatar
Hiiri
WR.net Apprentice
WR.net Apprentice
 
Posts: 3
Joined: Wed Aug 16, 2006 3:36 am

fixed: Localization of Missing Recipies :D

Postby SethDeBlade » Thu Oct 19, 2006 9:49 pm

@hiiri that would be the best solution which i would prefer as well :)
User avatar
SethDeBlade
WR.net Expert
WR.net Expert
 
Posts: 192
Joined: Thu Jul 06, 2006 1:02 am
Location: Germany

Re: fixed: Localization of Missing Recipies :D

Postby NurMut » Wed Nov 08, 2006 7:04 pm

Hello,

I just wanted to tell you, that I don't have much time at the moment.
There are a few things in RL that have to be finished first.

I hope there's some time in the next weeks.
Please just wait a little.

Greetings NurMut
Image
User avatar
NurMut
WR.net Apprentice
WR.net Apprentice
 
Posts: 17
Joined: Wed Jul 12, 2006 7:15 pm
Location: Germany

fixed: Localization of Missing Recipies :D

Postby Maernon » Sun Nov 26, 2006 2:34 pm

Thx for the Fix NurMut! Worked great.
Maernon
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Sun Nov 26, 2006 2:27 pm

Re: fixed: Localization of Missing Recipies :D

Postby Borsti » Mon Feb 26, 2007 7:36 pm

Its a great addon for roster but I had a problem in the German version, I´m missing "Lederverarbeitung" (leatherworking?) on my Roster.

http://www.magicroster.de.ki

*sorry for my english*
Hope you understand what I mean.

Code: Select all
<form method="get" action=""><input name="roster_addon_name" value="missingrecipe" type="hidden">Profession: <select name="skill"><option value="Alchimie">Alchimie
</option><option value="Schmiedekunst">Schmiedekunst
</option><option value="Kochkunst">Kochkunst
</option><option value="Verzauberkunst">Verzauberkunst
</option><option value="Ingenieurskunst">Ingenieurskunst
</option><option value="Erste Hilfe">Erste Hilfe
</option><option value="Juwelenschleifen">Juwelenschleifen
</option><option value="" selected="selected">
</option><option value="Schneiderei">Schneiderei
</option></select><br><br>Name: <select name="cnameadd">
Last edited by Borsti on Mon Feb 26, 2007 7:38 pm, edited 1 time in total.
User avatar
Borsti
WR.net Journeyman
WR.net Journeyman
 
Posts: 87
Joined: Sat Jul 08, 2006 11:37 am
Location: Hamburg/Germany

Re: fixed: Localization of Missing Recipies :D

Postby ragon » Sun Apr 29, 2007 12:17 am

Hi, I just wrote a patch to add german translations and fix up the two sql queries in missing.php. On second thought I changed the allakhazam url to match the selected locale.
I think with this patch you can just add french translations to localization.php and it should work too.

Code: Select all
--- localization.php.org        2007-04-28 18:18:23.483687760 +0200
+++ localization.php    2007-04-28 18:32:19.932244915 +0200
@@ -23,12 +23,21 @@ $wordings['enUS']['professionunknown'] =
 $wordings['enUS']['failedretrieve'] = "Sorry, the query failed, and cannot determine what patterns are not known.";
 $wordings['enUS']['profession'] = "Profession";
 
-$wordings['deDE']['missingrecipes_addon'] = 'Missing Recipes';
-$wordings['deDE']['mr_curlerror'] = "cURL could not be initialized, or is not installed.";
-$wordings['deDE']['unknownrecipes'] = "Unknown Recipes";
-$wordings['deDE']['professionunknown'] = "Sorry, this character does not know that profession, or knows no recipes at all.";
-$wordings['deDE']['failedretrieve'] = "Sorry, the query failed, and cannot determine what patterns are not known.";
-$wordings['deDE']['profession'] = "Profession";
+$wordings['deDE']['missingrecipes_addon'] = 'Fehlende Rezepte';
+$wordings['deDE']['mr_curlerror'] = "cURL konnte nicht initialisiert werden oder ist nicht installiert.";
+$wordings['deDE']['unknownrecipes'] = "Unbekannte Rezepte";
+$wordings['deDE']['professionunknown'] = "Dieser Charackter hat diesen Beruf nicht, oder kennt gar keine Rezepte.";
+$wordings['deDE']['failedretrieve'] = "Die Datenbankabfrage ist gescheitert und es kann nicht bestimmt werden welche Rezepte bekannt sind.";
+$wordings['deDE']['profession'] = "Beruf";
+$wordings['deDE']['Alchemy'] = "Alchemie";
+$wordings['deDE']['Blacksmithing'] = "Schmiedekunst";
+$wordings['deDE']['Cooking'] = "Kochkunst";
+$wordings['deDE']['Enchanting'] = "Verzauberkunst";
+$wordings['deDE']['Engineering'] = "Ingenieurskunst";
+$wordings['deDE']['First Aid'] = "Erste Hilfe";
+$wordings['deDE']['Jewelcrafting'] = "Juwelenschleifen";
+$wordings['deDE']['Leatherworking'] = "Lederverarbeitung";
+$wordings['deDE']['Tailoring'] = "Schneiderei";
 
 $wordings['addoncredits']['missingrecipes'] = array(
        array(  "name"=>        "Zeryl",
--- missing.php.org     2007-04-28 18:13:04.328605168 +0200
+++ missing.php 2007-04-28 18:32:19.944243374 +0200
@@ -19,34 +19,41 @@ if(isset($_GET['skill']))
 {
 
        $skill = $_GET['skill'];
+
+       $locale = '';
+       if ($roster_conf['roster_lang'] != 'enUS' )
+       {
+               $locale = '&locale='.$roster_conf['roster_lang'];
+       }
+
 
        $skill = mysql_real_escape_string($skill);
        switch($skill)
        {
                case 'Alchemy':
-                       $url = 'http://wow.allakhazam.com/db/skill.html?line=171';
+                       $url = 'http://wow.allakhazam.com/db/skill.html?line=171'.$locale;
                        break;
                case 'Blacksmithing':
-                       $url = 'http://wow.allakhazam.com/db/skill.html?line=164';
+                       $url = 'http://wow.allakhazam.com/db/skill.html?line=164'.$locale;
                        break;
                case 'Cooking':
-                       $url = 'http://wow.allakhazam.com/db/skill.html?line=185';
+                       $url = 'http://wow.allakhazam.com/db/skill.html?line=185'.$locale;
                        break;
                case 'Enchanting':
-                       $url = 'http://wow.allakhazam.com/db/skill.html?line=333';
+                       $url = 'http://wow.allakhazam.com/db/skill.html?line=333'.$locale;
                        break;
                case 'Engineering':
-                       $url = 'http://wow.allakhazam.com/db/skill.html?line=202';
+                       $url = 'http://wow.allakhazam.com/db/skill.html?line=202'.$locale;
                        break;
                case 'Firstaid':
-                       $url = 'http://wow.allakhazam.com/db/skill.html?line=129';
+                       $url = 'http://wow.allakhazam.com/db/skill.html?line=129'.$locale;
                        $skill = 'First Aid';
                        break;
                case 'Leatherworking':
-                       $url = 'http://wow.allakhazam.com/db/skill.html?line=165';
+                       $url = 'http://wow.allakhazam.com/db/skill.html?line=165'.$locale;
                        break;
                case 'Tailoring':
-                       $url = 'http://wow.allakhazam.com/db/skill.html?line=197';
+                       $url = 'http://wow.allakhazam.com/db/skill.html?line=197'.$locale;
                        break;
                default:
                        $url ='';
@@ -102,7 +109,8 @@ foreach ($matches[0] as $nr => $recipe)
 
 $id = nametoid($_GET[cnameadd]);
 
-$query = "select recipe_name from ".ROSTER_RECIPESTABLE." where member_id = '$id' and skill_name = '$skill';";
+$skill_loc = $wordings[$roster_conf['roster_lang']][$skill];
+$query = "select recipe_name from ".ROSTER_RECIPESTABLE." where member_id = '$id' and skill_name = '$skill_loc';";
 
 $results = $wowdb->query($query) or die_quietly($wowdb->error(),'Database Error',basename(__FILE__),__LINE__,$query);
 
@@ -132,7 +140,7 @@ foreach($recipes as $nr => $keys)
 
 $diff = array_diff($allrecipes, $known);
 
-$skillsql = "select skill_level from ".ROSTER_SKILLSTABLE." where member_id = '$id' and skill_name = '$skill';";
+$skillsql = "select skill_level from ".ROSTER_SKILLSTABLE." where member_id = '$id' and skill_name = '$skill_loc';";
 
 
 if($skillres = $wowdb->query($skillsql)){
Last edited by ragon on Sun Apr 29, 2007 12:34 am, edited 2 times in total.
ragon
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Sun Apr 29, 2007 12:15 am


Return to Missing Recipes

Who is online

Users browsing this forum: No registered users and 0 guests

cron