OSCOMMERCE SUPPORT CALL 702-453-3332

 

Help - Search - Members - Calendar
Full Version: AJAX Language Verification (contribution 5831)
osCommerce Community Support Forums > osCommerce Online Merchant v2.x > Contributions / Add-Ons > Languages and Zones
mparrishxx
http://addons.oscommerce.com/info/5831

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.
azer
for a first version release it s already a hell good work
i would post request, ideas and feedback wink.gif
azer
ideas :

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?
mparrishxx
Azer

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
gregy
hmm .. what about error

Fatal error: Call to undefined function: tep_hide_session_id() in /home/web/domain.com/www/admin/verify_language.php on line 309
jenswl
QUOTE (gregy @ Mar 26 2008, 02:07 PM) *
hmm .. what about error

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).
gregy
thanx .. moving on .. when i click on a file a receive

Fatal error: Call to undefined function: stripos() in /home/web/domain.com/www/admin/includes/functions/verify_language.php on line 30
jenswl
QUOTE (gregy @ Mar 26 2008, 04:34 PM) *
thanx .. moving on .. when i click on a file a receive

Fatal error: Call to undefined function: stripos() in /home/web/domain.com/www/admin/includes/functions/verify_language.php on line 30


change stripos to strpos
gregy
works like a charm .. thank you
Jamez
QUOTE (gregy @ Mar 26 2008, 04:45 PM) *
works like a charm .. thank you


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
Jamez
QUOTE (Jamez @ Mar 27 2008, 05:15 AM) *
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


Ah worked it out already, permissions error on the directories.
It didnt work for me on 755, changed it to 777 temporarily.
Jamez
I noticed a few other things too...
What is labelled the "English" directory, is actually the Spanish.

I cant get the Google AJAX translate to work either (it just hangs).
whistling.gif
jbastow
QUOTE (jenswl @ Mar 26 2008, 11:22 AM) *
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).


Good call, thanks smile.gif
jbastow
Spoke too soon - this doesn't look good:
CODE
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
jbastow
QUOTE (jbastow @ Apr 3 2008, 10:21 PM) *
Spoke too soon - this doesn't look good:
CODE
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



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
azer
REQ 1: give a maximum width to the editing page, when i edit my base_language.php the page now take more thatn the width of my screen and impossible to compare the 4 languages

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
h3dave
Great Contrib yet,
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:
CODE
<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:
CODE
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 176

or this :
CODE
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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.