News:

Looking for documentation? Take a look on our wiki

Main Menu

Some hard coded language found in admin panel VM 1.1b

Started by safemode, September 02, 2007, 02:20:04 AM

Previous topic - Next topic

safemode

I have found some hardcoded language in 2 backend files of Virtuemart 1.1 beta.
Afected files are:
admin.show_cfg.php
product.csv_upload.php
File that also should be changed for sure is default english.php (I did not check all).

admin.show_cfg.php
line #670 and #757 was "Display" and "Layout".
I corrected this by adding 2 new labels in english.php and put proper definitions in admin.show_cfg.php

product.csf_upload.php
In line #226 was the beginning of huge hardcoded piece of documentation.
It should be $_PHPSHOP_CSV_EXPLANATION_DOCUMENTATION definition, but it wasn't and it was also missing in language file (it was in 1.0.x lang).

If you are interested, find attachment where are all mentioned files after changes.
Regards.

Edit: 10:35
Small cosmetic change in attachment.


[attachment cleanup by admin]

gregdev

Quote
admin.show_cfg.php
line #670 and #757 was "Display" and "Layout".
I corrected this by adding 2 new labels in english.php and put proper definitions in admin.show_cfg.php

Thanks. The first one (admin.show_cfg.php) is now fixed in SVN (rev. 915).

Greg

[tr][td]
[/td][td]
www.plainlycode.com[/td][/tr]
[/table]

safemode

Thanks.
What about second one?
I have found more hardcoded strings in other modules:
ps_authorize.php
ps_payflow_pro.php
ps_echeck.php
ps_epn.php
ps_eway.php
ps_montrada.php
ps_nochex.php
ps-paymenow.php
ps_paypal.php
....
Wooooh!

Actually it looks like the almost all payment modules have hardcoded strings!

Tell me what is your policy about those strings? Are they should be prepared for multi language support? Is there any guidelines for this?

Yesterday I  finished (I thought I do) polish translation for VM 1.1 all strings was translated...
But now I see that there is a long way to the end...
I can prepare english.php file for VM and all releated files for language variables for example for todays revision.
Is it OK for you?

Regards.
Tomasz

gregdev

No, I haven't done the csv strings yet. In fact, we are possibly removing the csv code from VM 1.1, since there are very good components out there to handle csv import (csvImproved, for example). So, I'm not too keen on spending the time on that. But if you provide them, I will add them too

Yes, please do! Notice that newer strings begin with _VM (not _PHPSHOP). Please also come up with a way to indicate that these are payment method strings, and that they belong to a particular payment method. Eventually, we will be separating strings into files that are specific to the area of code they support. So, naming will be important in the future to aid in this.

If you are interested in helping the VirtueMart project more, please feel free. This post describes how you can help. (In particular, contact Joachim and tell him I sent you his way.) We'd really appreciate the help.

Thanks,

Greg

[tr][td]
[/td][td]
www.plainlycode.com[/td][/tr]
[/table]

safemode

OK, I wrote to Joachim and I`m waiting for reply. In the meantime there are some patched files (vol. 1):
english.php
+ variables for strings fixed in featured payment module files
+ variable for csv (from previous messages in this thread)
For some modules I have unified variables, because they are  almost identical (except service name) on the tab are always clear visible which service is modify.
polish.php
same as above... but in polish

And scripts for payment modules:
ps_autorize.php
ps_epn.php
ps_paymenow.php
ps_twocheckout.php
ps_paypal.php

more coming soon...

[attachment cleanup by admin]