Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language string not getting translated #90

Closed
puurinternet opened this issue Nov 6, 2018 · 3 comments
Closed

Language string not getting translated #90

puurinternet opened this issue Nov 6, 2018 · 3 comments

Comments

@puurinternet
Copy link

Hello,

We took over a Wordpress site with Woocommerce and Avada for a customer, and they had an issue with certain texts not getting translated to Dutch.
After finding out that there wasn't a language file for Avada yet, I used the one from this repository but there seems to be one string that doesn't get translated:

`#: includes/class-avada-woocommerce.php:1175
#. translators: Number.

msgid "You Have %d Item In Your Cart"
msgid_plural "You Have %s Items In Your Cart"
msgstr[0] "Je hebt %d artikel in je winkelmandje"
msgstr[1] "Je hebt %d artikelen in je winkelmandje"
`

although it is in the .po file.
Next I tried recompiling the .mo file again but that gave no different results.
After this I tried the files for different languages (german, and french), but in those languages the string isn't getting translated either.
Finally I checked the php file, and the msgid seems to match the one in the language file.

So I'm not really sure what the issue can be, maybe something went wrong with the conversion to the .mo file?

Any help is appreciated

mikka23 added a commit that referenced this issue Nov 6, 2018
@mikka23
Copy link
Contributor

mikka23 commented Nov 6, 2018

I have updated the Avada-nl_NL files in the repo. If you re-download those they should work properly. In particular I saw two issues.

  1. It was marked as a fuzzy translation
  2. The plural has an incorrect variable placeholder. It had %d when it should be %s.

@puurinternet
Copy link
Author

Thanks! That was the issue indeed.

The same thing seems to happen in the German and French files too. Maybe they copied the error from each other?
Not sure how easy it is to batch fix this, but that might be useful.

@mikka23
Copy link
Contributor

mikka23 commented Nov 6, 2018

Glad to hear that worked. Yeah, this is something we should look to try and fix in the others as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants