Please refer to TemplateMonster Support for any issues surrounding TemplateMonster/TemplateTuning Themes – thanks, Jigoshop Team

[Beta 1.3 RC2] localization problems

grochat's Avatar

grochat

21 Jul, 2012 12:41 PM

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

  1. Support Staff 2 Posted by Jeff on 22 Jul, 2012 04:00 AM

    Jeff's Avatar

    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.

  2. 3 Posted by grochat on 23 Jul, 2012 01:02 PM

    grochat's Avatar

    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

  3. Support Staff 4 Posted by Jeff on 23 Jul, 2012 06:37 PM

    Jeff's Avatar

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

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.