Plugin Author
Brecht
(@brechtvds)
Can you send me a screenshot of how you have that set up in Loco Translate? It should allow for both translations there.
Plugin Author
Brecht
(@brechtvds)
If you click on “vote” you should be able to set both the single and plural translation, like in this example:
https://pasteboard.co/JMFiQBX.png
i thought this was the case here, but i don’t have single and plural form there π
https://pasteboard.co/JMFqbRC.png
This is part of the source file
#: templates/admin/translations.php:349
#: includes/public/deprecated/class-wprm-template-helper.php:232
#: includes/public/shortcodes/recipe/class-wprm-sc-rating.php:151
msgid “vote”
msgstr “oceny”
#: templates/admin/translations.php:350
msgid “votes”
msgstr “ocen”
I have changed the code to this:
#: templates/admin/translations.php:349
#: includes/public/deprecated/class-wprm-template-helper.php:232
#: includes/public/shortcodes/recipe/class-wprm-sc-rating.php:151
msgid “vote”
msgid_plural “votes”
msgstr[0] “oceny”
msgstr[1] “ocen”
#: templates/admin/translations.php:350
msgid “votes”
msgstr “ocen”
If shows now the singular and plural form in Loco, but still no change in the rating system π
Plugin Author
Brecht
(@brechtvds)
Instead of editing the files directly. Try using the “Sync” button in Loco Translate.
My screenshot is from Loco Translate as well, so it should definitely work.
i did use the sync many times π – it’s third day i’m trying to figure it out.
even if i change it in the source file, after the sync i’m getting the previous version (no plural form) in the Loco
Vote is from that:
includes/public/shortcodes/recipe/class-wprm-sc-rating.php:151 includes/public/deprecated/class-wprm-template-helper.php:232 templates/admin/translations.php:349
Votes only from
templates/admin/translations.php:350
Update1:
I have checked the other languages.
Plural form is available, the entri is from non existing file : includes/public/class-wprm-template-helper.php:120
https://pasteboard.co/JMFGHkp.png
When I clikc sync, the votes are added and singular/plural form is misisng.
https://pasteboard.co/JMFH2Yr.png
Edit2:
Sync is breaking the translation file
the entry for “votes” needs to be like this
#: includes/public/class-wprm-template-helper.php:120
msgid “vote”
msgid_plural “votes”
msgstr[0] “oceny”
msgstr[1] “ocen”
msgstr[2] “ocen”
When I have entered that to the translation file, it started to work!
-
This reply was modified 5 years, 3 months ago by
krysiek.
-
This reply was modified 5 years, 3 months ago by
krysiek.
-
This reply was modified 5 years, 3 months ago by
krysiek.
Plugin Author
Brecht
(@brechtvds)
Happy to hear things are working now! Do let me know if you experience any further issues at all.
I cant get that to work π I did solve the “Equipment” issue with Loco, but also Swedish does not have the option of plural, but German and Italian has. And maybe others, I did not check.
However, I have no clue how the previous user solved it, I don’t understand a thing. Any chance someone could make it little easier? π
Thanks!
but also Swedish does not have the option of plural,
You need to check in the po-file that the plural setting for Swedish is correct. I’ve never used Loco, but translate directly on translate.ww.wp.xz.cn and in poedit, so I don’t know how to handle it specifically in Loco.
"Plural-Forms: nplurals=2; plural=n != 1;\n"