adamivsviatoslav
Forum Replies Created
-
Forum: Plugins
In reply to: [Loco Translate] String in woocommerce scripts not translatingI eventually found the error. I was working on a localhost server using MAMP and there the translation in the js line was not loaded, but as soon as I moved the site to a normal server, all the translation pulled up
Forum: Plugins
In reply to: [Loco Translate] String in woocommerce scripts not translatingI deactivated polylang and loco translate, switched to Twenty Twenty-Four theme. I set the site language to Ukrainian and still the strings that are in js scripts are not translated
Forum: Plugins
In reply to: [Loco Translate] String in woocommerce scripts not translatingYes, I have a file
woocommerce-uk-570aa971d82b8a56aa56aa007f1e864044f7.jsoncreated and the file consists of the following lines. But it still does not output in HTML and remains in English.!Note, I am using Polylang to make my site multilingual
{ "translation-revision-date": "2024-02-12 23:46+0000", "generator": "Loco https://localise.biz/", "source": "assets/client/blocks/cart-blocks/cart-line-items-frontend.js", "domain": "woocommerce", "locale_data": { "woocommerce": { "": { "domain": "woocommerce", "lang": "uk", "plural-forms": "nplurals=3; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : ((n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) ? 1 : 2);" }, "%d left in stock": [ "%d \u0437\u0430\u043b\u0438\u0448\u0438\u043b\u043e\u0441\u044f \u0432 \u043d\u0430\u044f\u0432\u043d\u043e\u0441\u0442\u0456" ], "Available on backorder": [ "\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u043b\u0435\u043d\u043d\u044f\u043c" ], "Product": [ "\u0422\u043e\u0432\u0430\u0440", "\u0422\u043e\u0432\u0430\u0440\u0430", "\u0422\u043e\u0432\u0430\u0440\u0456\u0432" ], "Remove %s from cart": [ "\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 %s \u0437 \u043a\u043e\u0448\u0438\u043a\u0430" ], "Remove item": [ "\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u043f\u0443\u043d\u043a\u0442" ], "Total": [ "\u0417\u0430\u0433\u0430\u043b\u043e\u043c" ] } } }Forum: Plugins
In reply to: [Loco Translate] String in woocommerce scripts not translating
I am using the newest version of woocommerce, Version 8.5.2. As you can see in the picture, loco translate shows that the translation files are fine.
Sorry, I got the file name wrong, the correct file name and path is: assets/client/blocks/cart-blocks/cart-line-items-frontend.js. That’s where the “Remove item” line is located.
I tried several times to do synchronization, changed the translation, saved and synchronized, but so and in the lines that are in the java script files nothing changed. And where there are php files, everything was translated and changed without problems
Forum: Plugins
In reply to: [Loco Translate] String in woocommerce scripts not translatingI wanted to translate the “Remove item” string, which is in the assets\client\blocks\cart-blocks\cart-totals-frontend.js file in the woocommerce plugin. There I found this code:
(0, i.__)("Remove item", "woocommerce"). And by idea it should be translated, as it is a registered string. But for some reason these strings are not translated. In the file where po and mo translations are, there are many json files like this: woocommerce-uk-2b9ad1ee5266e82cfc566a86f6541d13.json
I can give any information that will help this, just ask. Because it’s not the first time I’ve encountered this, but now I want to figure it out so I can translate these lines easily and simply- This reply was modified 2 years, 4 months ago by adamivsviatoslav.