Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

AJAX Language Verification (contribution 5831)


mparrishxx

Recommended Posts

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.

Link to comment
Share on other sites

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?

MS2

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Edited by Jamez
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

Spoke too soon - this doesn't look good:

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

Link to comment
Share on other sites

Spoke too soon - this doesn't look good:

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

Link to comment
Share on other sites

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

MS2

Link to comment
Share on other sites

  • 2 weeks later...

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:

<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 176

or 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

Light travels faster than sound. Thats why sometimes people look bright until they speak...

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
how can i use this on my secure server?

 

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.

Light travels faster than sound. Thats why sometimes people look bright until they speak...

Link to comment
Share on other sites

  • 3 months later...

Hi. i must say that this is a great contribution. but im facing the same problem as a previous poster [h3dave]

 

<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
Link to comment
Share on other sites

  • 1 year later...

Hi all,

 

first of all: great contrib!

 

But (there is always a "but", isn't it?) after my host changed from php 4.xxx to php 5.2.11 the Google translation doesn't work anymore. I always get a popup (see screenshot).

 

error_vl.PNG

 

I get it in Firefox and Internet Explorer.

 

Can anybody help me with this?

 

Thank you.

 

Best regards from snowy Germany

Heike

Link to comment
Share on other sites

Hi there - I was wondering if anyone could help me with this module.

 

I have installed it and it works well for the text based language files.

 

However, when I switch to the images (buttons) side of things I can not get it to generate the buttons.

 

I have had a look through the code and it appears to be calling buttons.php which is not in the package ... does anyone know where I get get this file? (It appears that the author has xoops installed on there machine - is it a file from this program?)

 

There is also a language file missing but I can fix that ...

 

Any help would be welcomed.

 

Thanks in advance.

Link to comment
Share on other sites

  • 4 months later...

Been digging around on this one but still have not found out how to get the buttons to generate on the fly using the templates.

 

I suspect that this module is not longer supported - so I will leave it at that ...

 

The text language side is useful enough to use on its own without the buttons anyway ...

 

Regards,

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...