DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • May 18, 2013, 03:30:57 AM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: 1 2 [3]   Go Down
  Print  
Author Topic: Translation Wizard Pulling  (Read 1820 times)
0 Members and 1 Guest are viewing this topic.
Aeo
Mod God
*****
Offline Offline

Posts: 1077


Doctor.. Who?


View Profile WWW
« Reply #30 on: June 04, 2012, 09:15:53 AM »

No, it won't be. Smiley

No? It'd be awesome if you could explain why not.
Logged


Time Lords Online - A Doctor Who RPG! Open Now!
~ My Modules: PM me if you'd like me to code something! Smiley ~
Nightborn
Captain of the Guard
***
Offline Offline

Posts: 157


View Profile
« Reply #31 on: June 06, 2012, 02:07:11 PM »

Because "pulling from en" is for the scheme - not for the folder per se.
So the error must lie elsewhere.

//edit

Add a new line:
Code:
7 $selecteddir=trim($selecteddir);

Because for some reason a whitespace appeared behind the $_POST var... that would be the pull issue.

I checked translationwizard/pull.php
Code:
9 if (!$selecteddir) $selecteddir=$languageschema;

So it does not realize you have selected a directory (it should show the directory in the dropdown).

a "solution" is the following, change line

Code:
101                         rawoutput("<option value=\"".htmlentities($link,ENT_COMPAT,$coding)."\"".((sanitize(trim($link)) == trim($selecteddir))     ? "selected" : "").">".htmlentities($link,ENT_COMPAT,$coding)."</option>");

and it will show the current folder.

the pulling works, once you set up the right folder to pull from.
« Last Edit: June 08, 2012, 02:17:03 AM by Nightborn » Logged
Aeo
Mod God
*****
Offline Offline

Posts: 1077


Doctor.. Who?


View Profile WWW
« Reply #32 on: August 04, 2012, 07:01:13 AM »

So, I decided to take this error up again.. o.o
Looking through the code more carefully, I noted several things.
The dropdown where you select the directory has the code of:
Code:
rawoutput("<select name='pulldir' onchange='this.form.submit()'>");
And earlier on in the code, you can find:
Code:
$selecteddir=httppost('pulldir');
Which is then used in:
Code:
$chosenpath=$path.$selecteddir."/";
Where $path equals $masterpath, which is:
Code:
$masterpath=get_module_setting('lookuppath')."/";

Later on, you'll see:
Code:
if (httppost("pulluntranslated")) {
$pullmodules=array();
$sql="SELECT namespace from ".db_prefix("untranslated")." group by namespace";
$result=db_query($sql);
while ($row=db_fetch_assoc($result)) {
array_push($pullmodules,$row['namespace']);
}
}
And then:
Code:
foreach ($pullmodules as $module) {
$sql="";
$file=pullurl($chosenpath.$module.".sql");

So the whole link using the language of de, for the file of home.php (for example) is http://translations.nb-core.org/de/home.sql.

Which MEANS.. There DOES need to be an English folder for pulling of English translations.

And it appears my T-Wizard WILL pull items from the server.. I tried it with the 'de' folder, and it worked.
« Last Edit: August 04, 2012, 10:06:32 AM by Aeolus » Logged


Time Lords Online - A Doctor Who RPG! Open Now!
~ My Modules: PM me if you'd like me to code something! Smiley ~
Nightborn
Captain of the Guard
***
Offline Offline

Posts: 157


View Profile
« Reply #33 on: August 04, 2012, 11:50:20 AM »

note "selected dir" ... "de" is the folder. Incidentally the language. If you want, I can rename this to "offical-German" or whatnot.

so, no, it does not mean "en/NAME" is pulled.

after "later on, you see" you see there module namespace from your untranslated table into the pullmodules.
that has nothing to do with where it gets the files Cheesy

Edit: done, so you may now check.
Logged
Aeo
Mod God
*****
Offline Offline

Posts: 1077


Doctor.. Who?


View Profile WWW
« Reply #34 on: August 04, 2012, 11:55:14 AM »

note "selected dir" ... "de" is the folder. Incidentally the language. If you want, I can rename this to "offical-German" or whatnot.

so, no, it does not mean "en/NAME" is pulled.

after "later on, you see" you see there module namespace from your untranslated table into the pullmodules.
that has nothing to do with where it gets the files Cheesy

Edit: done, so you may now check.

Yes, but the line:
Code:
$file=pullurl($chosenpath.$module.".sql");
relates directly to the server of translations. With the $chosenpath.
Logged


Time Lords Online - A Doctor Who RPG! Open Now!
~ My Modules: PM me if you'd like me to code something! Smiley ~
Nightborn
Captain of the Guard
***
Offline Offline

Posts: 157


View Profile
« Reply #35 on: August 04, 2012, 01:05:58 PM »

Yes, $chosenpath means "REPOSITORY/MODULENAME.sql".
Logged
Aeo
Mod God
*****
Offline Offline

Posts: 1077


Doctor.. Who?


View Profile WWW
« Reply #36 on: August 04, 2012, 01:09:34 PM »

Yes, $chosenpath means "REPOSITORY/MODULENAME.sql".

Okay, but.. where exactly is this file named "REPOSITORY/MODULENAME.sql" (substituting in what ever the REPOSITORY and MODULENAME are)?
Logged


Time Lords Online - A Doctor Who RPG! Open Now!
~ My Modules: PM me if you'd like me to code something! Smiley ~
Aeo
Mod God
*****
Offline Offline

Posts: 1077


Doctor.. Who?


View Profile WWW
« Reply #37 on: August 16, 2012, 10:35:04 AM »

* Aeolus bumps this, wanting to get it fixed and working, poking at his unanswered question..
Logged


Time Lords Online - A Doctor Who RPG! Open Now!
~ My Modules: PM me if you'd like me to code something! Smiley ~
Nightborn
Captain of the Guard
***
Offline Offline

Posts: 157


View Profile
« Reply #38 on: August 16, 2012, 11:24:04 AM »

use the dropdowns to make this choice.
below the mirror.


Logged
Aeo
Mod God
*****
Offline Offline

Posts: 1077


Doctor.. Who?


View Profile WWW
« Reply #39 on: August 16, 2012, 11:33:27 AM »

use the dropdowns to make this choice.
below the mirror.

That gives me a ton of German links, a Bulgarian one (I think), a Greek or two. Buuut no English.
Logged


Time Lords Online - A Doctor Who RPG! Open Now!
~ My Modules: PM me if you'd like me to code something! Smiley ~
Pages: 1 2 [3]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

Support Us
$100 raised this year
Your help is greatly appreciated!
Who's Online
25 Guests, 0 Users
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search