[Beta 1.3 RC2] localization problems
Hi Jeff,
I have noticed several localization problems in 1.2 that are still around in 1.3rc2:
- Line 293 of jigoshop_actions.php seems not be very localization friendly. In fact the long html phrase doesn't seem to get through the __() function, and and I don't think it is so nice to pass some html to the translation pipe anyway (this is actually the only example I know).
`I suggest the following cleaner version:
$message = __('Product successfully added to your cart.', 'jigoshop');
$button = __('View Cart →', 'jigoshop');
$message = '<a href="%s" class="button">' . $button . '</a> ' . $message;
jigoshop::add_message(sprintf( $message, jigoshop_cart::get_cart_url()));
break;`
(and adding the necessary localization strings.)
- In jigoshop_add_to_cart_action, same file, the last if...else condition seems to always fall into the default (line 327: wp_redirect(home_url()); ) on FireFox (10 and 13 on Mac OS), so you get back to the home page every time a product is added... I am not sure where it comes from, but I have personally changed the default action to simply "return;".
I hope this helps,
Grochat
Support Staff 2 Posted by Jeff on 22 Jul, 2012 04:00 AM
For the last comment, Firefox 13 and 14 both stay where they are on Mac OS for me:
http://d.pr/i/YVck
http://d.pr/i/2OZi
I'm curious why your '$_SERVER['HTTP_REFERER']' isn't redirecting as it does for me?
And ultimately, we might even question that too because it and the Home redirect replaced with just 'return;' seems to accomplish the same thing without restarting the page loading. That chunk of code will be one year old in August though with no complaints until now and I want to make sure I'm not missing something before changing it.
Your first suggestion is in.
3 Posted by grochat on 23 Jul, 2012 01:02 PM
Hi Jeff,
Yes, '$_SERVER['HTTP_REFERER']' wrongly redirecting is indeed the problem (perhaps it is specific to my setup, or perhaps a conflict with Add-Ons extension?)
Can you tell me how to enlist to the GitHub project? My list for is growing and I'd be happy to help on the development side - on my spare time.
Grochat
Support Staff 4 Posted by Jeff on 23 Jul, 2012 06:37 PM
Hey Grochat,
It's hard to say on why the referrer isn't in there, maybe something in .htaccess rules, something specific with your server or hosting service, I wouldn't know for sure.
https://github.com/
Sign up for an account there, download and install a client for you OS. I use Tower on the Mac, GitBox is popular, there are others and certainly the command line in the Terminal is the best 'hands on' right on the bare metal approach. :-)
GitHub has their own:
http://mac.github.com/
From there, clone our repository, make changes locally on your end, push to your cloned repo and submit a 'pull request' to our repo.
Lot's to learn and get up to speed on ... :-)