AJAX Language Verification (contribution 5831)
#1
Posted 25 March 2008 - 01:43 PM
This module is designed to help all of those with stores in multiple languages.
During the development process, it is very tedious in debugging all of the new variables which are added in one language and then translate them into another language. At times the individual variables are not found, and at other times the act of translating is quite laborious.
This module gives the ability to crawl all of the language folders, index the individual files found, and display all of the variables within the individual files in a grid.
If a file or variable is missing in a language folder, it gives you the ability to add it with one click.
It also uses Google Translate to offer a translation from one language (usually English) in 28 others.
This should help in reducing the time it takes for translating a QA tremendously.
This Module uses AJAX. The installation should take no more than 10-15 minutes, even for a novice. However, some knowledge of Ajax and Javascript may be useful should you want to change any of the functionality.
Please help us to further refine the module.
#2
Posted 25 March 2008 - 02:03 PM
i would post request, ideas and feedback
#3
Posted 25 March 2008 - 02:17 PM
1.being able to select and show only file that are missing for one or several languages
2.remove from the listing the files that are not inside the langauge subfolder ; for instance : french.php , english.php, add_ccgvdc_english.php
3. when a file is missing from a language, to have the right ALT when you want to copy the file to te languaage subfolder, for the moment it is "file not exist"
4. for the copy operation, wich is the default language from where the missing file would be copied?
#4
Posted 25 March 2008 - 11:04 PM
These are all very good suggestions.
I can do several of them, but elimination of selected directories I would like to see if someone else could do.
I think it also best to leave the language files in the root folder in the crawl, and try to align them based upon the language folders that appear. For instance, when there are two language folders
languages/english/
languages/french/
we would need to align the files (and 'define' variables) for
languages/english.php
languages/french.php
That way many of the global variables could be translated. This is also a big job!
mparrishxx
#5
Posted 26 March 2008 - 01:07 PM
Fatal error: Call to undefined function: tep_hide_session_id() in /home/web/domain.com/www/admin/verify_language.php on line 309
#6
Posted 26 March 2008 - 03:22 PM
gregy, on Mar 26 2008, 02:07 PM, said:
Fatal error: Call to undefined function: tep_hide_session_id() in /home/web/domain.com/www/admin/verify_language.php on line 309
Just copy the function tep_hide_session_id from the catalog/includes/functions/html_output.php to catalog/admin/includes/functions/html_output.php or into the verify_language.php (not the best way).
#7
Posted 26 March 2008 - 03:34 PM
Fatal error: Call to undefined function: stripos() in /home/web/domain.com/www/admin/includes/functions/verify_language.php on line 30
#9
Posted 26 March 2008 - 04:45 PM
#10
Posted 27 March 2008 - 05:15 AM
gregy, on Mar 26 2008, 04:45 PM, said:
Thanks to Jens for the 2 fixes, most of it is now working apart from..
I click a red x to copy it to another language and then get this permission denied error...
Warning: copy(/includes/languages/german/article_header_tags.php) [function.copy]: failed to open stream: Permission denied in /admin/verify_language.php on line 161
Edited by Jamez, 27 March 2008 - 05:16 AM.
#11
Posted 27 March 2008 - 05:17 AM
Jamez, on Mar 27 2008, 05:15 AM, said:
I click a red x to copy it to another language and then get this permission denied error...
Warning: copy(/includes/languages/german/article_header_tags.php) [function.copy]: failed to open stream: Permission denied in /admin/verify_language.php on line 161
Ah worked it out already, permissions error on the directories.
It didnt work for me on 755, changed it to 777 temporarily.
#12
Posted 27 March 2008 - 06:00 AM
What is labelled the "English" directory, is actually the Spanish.
I cant get the Google AJAX translate to work either (it just hangs).
#14
Posted 04 April 2008 - 02:21 AM
Warning: fopen(/home/loveher/public_html/includes/languages/english/about_us.php) [function.fopen]: failed to open stream: Permission denied in /home/loveher/public_html/admin/ajax_rewrite_fields.php on line 107 Warning: fwrite(): supplied argument is not a valid stream resource in /home/loveher/public_html/admin/ajax_rewrite_fields.php on line 108 Warning: fclose(): supplied argument is not a valid stream resource in /home/loveher/public_html/admin/ajax_rewrite_fields.php on line 109
I get this when trying to edit or add text to any of my files (I'm editing the English about_us.php file in this example)
Janna
#15
Posted 04 April 2008 - 02:32 AM
jbastow, on Apr 3 2008, 10:21 PM, said:
Warning: fopen(/home/loveher/public_html/includes/languages/english/about_us.php) [function.fopen]: failed to open stream: Permission denied in /home/loveher/public_html/admin/ajax_rewrite_fields.php on line 107 Warning: fwrite(): supplied argument is not a valid stream resource in /home/loveher/public_html/admin/ajax_rewrite_fields.php on line 108 Warning: fclose(): supplied argument is not a valid stream resource in /home/loveher/public_html/admin/ajax_rewrite_fields.php on line 109I get this when trying to edit or add text to any of my files (I'm editing the English about_us.php file in this example)
Janna
I'm not 100% sure why, but when I try to set permissions to 777 for certain folders, it just reverts back to 755. There's that little message in DW which says "This command may not work with some servers.".... I'm not sure where to go from here. Any ideas?
Thanks!
Janna
#16
Posted 08 April 2008 - 06:30 PM
QUE 1: what the red color of the sentence mean
REQ 2: i think we should really be able to switch with a dropdown menu or a radio boutton waht we want to see for me here is what is usefull:
- file missing
- file with missing fields
- when you click on the language, to see only missing fields
QUE 2: when he add a missing fields , is it created at the end of the file or at the same line than the comparaison one
REQ 3: the order of the language in the edition page is alphbetics, it should rather be the order defined in the admin of oscommerce
#17
Posted 18 April 2008 - 08:23 AM
I had the Stripos trouble first and then the tep_hide as everyone above.
After that everything seemed to work perfectly except if I'm doing a translation by google I've got a popup that says as follows:
<br /> <b>Parse error</b>: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in <b>/homepages/20/xxxxxxxxx/htdocs/xxxxxx/admin/includes/classes/google_translates.php</b> on line <b>3</b><br />So this would be my first point.
For the second point, if I'm using the menu to crawl the admin section it says:
Warning: Invalid argument supplied for foreach() in /homepages/20/d189126093/htdocs/loic2/admin/verify_language_images.php on line 160 Warning: Invalid argument supplied for foreach() in /homepages/20/d189126093/htdocs/loic2/admin/verify_language_images.php on line 176or this :
Warning: Invalid argument supplied for foreach() in /homepages/20/d189126093/htdocs/loic2/admin/verify_language.php on line 184 [b]With this where should be placed the window with comparisons :[/b] Warning: Division by zero in /homepages/20/d189126093/htdocs/loic2/admin/verify_language.php on line 357
So I am actually lost in all this there is for sure something I don't get, and yeah I noticed that all my french sometimes appear in the portugues section?!?
Kind regards,
Dave
#18
Posted 16 June 2008 - 03:05 PM
my domain is at www.domain.com and secure is secure.domain.com
i don't have admin directory on secure server!
#19
Posted 04 July 2008 - 08:09 AM
gregy, on Jun 16 2008, 11:05 AM, said:
my domain is at www.domain.com and secure is secure.domain.com
i don't have admin directory on secure server!
If what you mean by secure is ssl (https) then you have to provide some more informations as ssl are trickies on some hosts with oscommerce. But actually I am using it on secured servers and have my access to Control panel within the "location" section under "verify language" title.
#20
Posted 03 November 2008 - 09:46 AM
<br />
<b>Parse error</b>: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in
<b>/homepages/20/xxxxxxxxx/htdocs/xxxxxx/admin/includes/classes/google_translates.php</b>
on line <b>3</b><br />
i have tried to disable line 3 in that file, but for some reason it still gives me that error, so i dont know if its cached or something
EDIT:
i tried to troubleshoot and disabled the first two lines in the classe file google_translates.php
// public $opts = array("text" => "Hello", "language_pair" => "en|es");
// public $out = "";
and it seems to get me going for now
Edited by mortal, 03 November 2008 - 09:51 AM.









