• Resolved fred83220

    (@fred83220)


    Good morning,

    Thank you for this great plugin, light and very practical!

    I have a problem that I can’t solve I have clearly identified the original string of the woocommerce plugin: “Collection from <address\/>” (present in the order and basket process)

    I have filled in the Say What fields as follows:

    Original string: Collection from <address\/>
    Text Domain: woocommerce
    Text content:
    Replacement string: Addresse : <address\/>

    However, when I check on the page, the code indicates:

    var say_what_data = {
            “replacements”: {
                “woocommerce|Collection|”: “Retrait en magasin”,
                “woocommerce|Collection from <address\\\/>|”: “Adresse : <address\\\/>”
            }
        };

    We see that the string has been replaced by “Addresse : <address\\\/>” and not by “Address: <address\/>”

    Which means that the translation doesn’t work…

    Obviously the initial Backslash (\) of <address\/> is replaced by 3 Backslashes (\ becomes \\\)…

    Do you have a solution to translate strings with backslashes?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Lee Willis

    (@leewillis77)

    Hi;

    I think the backslashes here are just a red-herring (that’s just how they’re escaped in the Javascript), and as far as I can tell (at least on my setup) that string is processed server-side, not in Javascript anyway. I think the issue is that you’re setting up the replacement for the wrong thing.

    Setting up a replacement for the following seems to work fine for me:

    Thread Starter fred83220

    (@fred83220)

    Thanks for your answers However, I don’t see the examples you’re talking about 🙂

    The replacement is done very well for the “Collection” string (see code), which is in the same domain, and I have clearly identified in the code the string to translate, it’s precisely ““Collection from <address\/>”…

    Do you think there is a solution ?

    Plugin Author Lee Willis

    (@leewillis77)

    We were successfully able to translate the “Collection from:” string displayed on the order confirmation page using setup we provided in our last screenshot, see here to see the changes in action:

    I can’t see any bug here – we are able to set up a replacement and see it take effect, so I assume that you’re just not setting up the replacement for the correct thing (or the string when used isn’t translatable) – or there’s some confusion about what exactly you’re trying to replace.

    If you can provide step by step instructions to reproduce the issue you’re seeing, although we don’t provide support for configuring individual strings, I’d be happy to take a look and confirm if there is a bug here.

    Thread Starter fred83220

    (@fred83220)

    Thank you Lee. Sorry but I don’t see your screenshot… so I can’t see the setup you’re talking about.

    The bug is precisely the one already described 😉 and the chain is precisely “Collection from <address\/>” in the code. If you have an email I can send you a picture of what code says…

    Plugin Author Lee Willis

    (@leewillis77)

    We’ll pick it up on the support ticket you opened!

    Plugin Author Lee Willis

    (@leewillis77)

    Now resolved, was just an issue of the original string not being correct.

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

The topic ‘Translation of chain that contains a backslash’ is closed to new replies.