openfoodnetwork icon indicating copy to clipboard operation
openfoodnetwork copied to clipboard

Translate error messages when creating products

Open Laurel16 opened this issue 2 years ago • 2 comments

What? Why?

Closes #9559.

This PR is adding missing translation to for name & price in spree/product in config/locales/{lang}.yml. This fixs the missing error message describe in the issue: https://github.com/openfoodfoundation/openfoodnetwork/issues/9559

What should we test?

Similar to the Steps to Reproduce in the issue: https://github.com/openfoodfoundation/openfoodnetwork/issues/9559

At first I added translation into every config/locales/{lang}.yml but @jibees warned me about this:

Actually, we use Transifex to manage our i18n. Therefore, we only update the en.yml file and then when new keys appears (ie. when PR is merged), instance managers are aware of those key and can translate those new keys inside Transifex. After that, we pull the each file from Transifex.

That's why here, you only need to modify en.yml file ;) Sorry about that! That's maybe not clear enough.

Source: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Internationalisation-%28i18n%29_

So I just changed en.yml file.

Release notes

Changelog Category: User facing changes

The title of the pull request will be included in the release notes.

Dependencies

Documentation updates

Laurel16 avatar Oct 05 '22 11:10 Laurel16

@jibees I prefer to create a new PR, easier than to modify all my yml. I am removing the older one. Tanks 🙂

Laurel16 avatar Oct 05 '22 11:10 Laurel16

I'm sorry for the confusion but variant_unit and unit_value are two different things.

* `variant_unit` is something like `weight` or `volume`.

* `unit_value` is a number like `2`.

@mkllnk you are absolutly right, thank you. It is fixed, I hope that help.

Laurel16 avatar Oct 13 '22 11:10 Laurel16

Hi @mkllnk, Yes I realise I have added all my files and not just the necessary ones, I am really sorry for the extra work 😔. Thank you 🙏

Laurel16 avatar Oct 17 '22 08:10 Laurel16

Hi @Laurel16, Thanks for this pull request! I staged this PR to one of our servers and it seems to work fine. We will only be able to really test the new translations after the translators have edited their translations and those updates have been deployed. We will have to check again in production. For now I think we can safely merge this and move forward. :partying_face: Thanks again!

drummer83 avatar Oct 24 '22 21:10 drummer83

Hi @Laurel16, Thanks for this pull request! I staged this PR to one of our servers and it seems to work fine. We will only be able to really test the new translations after the translators have edited their translations and those updates have been deployed. We will have to check again in production. For now I think we can safely merge this and move forward. 🥳 Thanks again!

Thank you @drummer83 , happy to help 🤩

Laurel16 avatar Oct 26 '22 10:10 Laurel16