Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Salut.

    Votre interface d’administration est-elle en français ?
    Dans [réglages] => [général], est-ce la langue “Français du Canada” qui est sélectionnée ?
    Si ce n’est pas le cas, peut-être le problème vient-il de là ?
    Sinon, pourquoi ne pas prendre la langue “Français” (pas français du Canada), tout simplement ? Cela réglera peut-être le problème d’un fichier de traduction (.po) incomplet, non ?

    Voilà, j’ai fait ma part d’entraide, dans la mesure de mes moyens. 🙂
    Bien à vous et bonne chance.

    Thread Starter diepen

    (@diepen)

    Thank you very much, Sir.

    We will wait for this version to do it better, so.
    Don’t forget to add events firing after a shipping class is added an also after a new shipping method is added 😉

    You want to know my actual crazy way to achieve the goal ? 😀

    Well, I’ve put a mutation observer on the $el, as I said. When this observer detects a change (name of a method has changed, a row was added or deleted,…) it grafts another mutation observer to the $save_button [ $( ‘.wc-shipping-zone-save’ ) ], this second observer watch for a change in the prop( ‘disabled’) of the button. So when the button turns back in the state “disabled”, I know that the Woocommerce’s ajax request is terminated and then, I can post my data without having to fear for the unloadConfirmation message.

    Once again, Thank you.

    Thread Starter diepen

    (@diepen)

    I’m working on a plugin project that will duplicate the shipping settings of a blog to another one, in a multisite environment.

    if I do use the hook “woocommerce_settings_save_shipping” or even this one “woocommerce_settings_saved” (with a filter to be sure I’m on the right shipping tab), I can achieve my goal. But these hooks are only called when the data are “submitted” and not “ajaxed” 🙂

    I would like to call my own ajax to save the new zone(s) created, just after a zone is added in Woocommerce.

    I’ve found an inelegant way to do that, by “grafting” a mutationobserver to the $el DOM ($( ‘.wc-shipping-zone-rows’ )) and its childs, but it’s not 100% relevant. And I’ve another problem, when I try to post the data, I got the backbone’s unloadConfirmation function that ruins all my efforts by asking if I’m sure I want to leave the page. :-p
    Backbone is new for me, so I’ve to “study” it in emergency. I’m now trying to find a trick to refer (to target) to the view “ShippingZoneView” (“m” in the min.js version), by the Backbone.View.prototype’s way.

    If you can just give me a clue to point to “this” view, from outside, I think I can manage something to reach the aim.

    Thank you for worrying about my case.

    Hi !

    In the folder of your Mystile theme, edit the file named “header.php” and replace this __(‘Checkout’,’woothemes’) by this __(‘Checkout’,’woocommerce’)

    In the folder includes/ of you theme, open the file theme-woocommerce.php and find replace esc_attr__( ‘Search Products’, ‘woothemes’ ) by esc_attr__( ‘Search for:’, ‘woocommerce’ )

    That’s for checkout and search.

    For the word items it’s not so easy, it’s also in the template theme-woocommerce.php. You can try to replace sprintf(_n(‘%d item’, ‘%d items’, by sprintf(_n(‘%d ‘.__(“item”,”woocommerce”), ‘%d ‘.__(“items”,”woocommerce”), but I’m not sure that it won’t generate a PHP error. I haven’t tested it.

    Start with checkout and search and tell us if it works. … Two Out Of Three Ain’t Bad 😉

    • This reply was modified 9 years, 3 months ago by diepen.

    And because I’ve found a template with an “error” ( http://hookr.io/plugins/woocommerce/2.6.4/files/templates-myaccount-form-login/ ) inside, maybe you’ve the same error in the template “form-login.php” of your theme.
    The “error” I’ve found is this one: <?php _e( “Lost your password?”, “woocommerce” ); ?> instead of <?php _e(“Lost Password?”,”woocommerce”); ?>

    So, perhaps you just have to replace this wrong “Lost your password?” by a good “Lost Password?”.

    😉

    *take care that uppercase and punctuation are important: <?php _e(“Lost Password?”,”woocommerce”); ?>

    Here is an example of what I mean. It’s in the template: “form-login.php”

    https://github.com/seedprod/seedprod-v3/blob/master/myaccount/form-login.php#L39

    (Cast a glance at the end of the 39th line.)

    Normally, if your locale is set to nl, nl_NL or nl_BE, the wordpress native function _e() will translate it this way: <?php _e(“Lost Password?”,”woocommerce”); ?>

    In the NL.po, these sentences are translated.
    Look here: https://github.com/CreativelyCloudy/git-plus-wordpress/blob/master/wp-content/plugins/woocommerce/languages/woocommerce-nl_NL.po#L10118

    Maybe you’ve to change something in your template, something like <?php _e(“Lost Password?”,”woocommerce”); ?> ?

    “Billing address” and “Shipping address” seem to be translated too (“Factuuradres”/”Verzendadres”) but not “My adresses” as you wrote here above.
    See here https://github.com/CreativelyCloudy/git-plus-wordpress/blob/master/wp-content/plugins/woocommerce/languages/woocommerce-nl_NL.po#L10038

Viewing 7 replies - 1 through 7 (of 7 total)