mealie-recipes / mealie

Mealie is a self hosted recipe manager and meal planner with a RestAPI backend and a reactive frontend application built in Vue for a pleasant user experience for the whole family. Easily add recipes into your database by providing the url and mealie will automatically import the relevant data or add a family recipe with the UI editor
https://docs.mealie.io
GNU Affero General Public License v3.0
6.88k stars 708 forks source link

[BUG] - translation of units not working when plural is used #4380

Open Jarod2801 opened 3 days ago

Jarod2801 commented 3 days ago

First Check

What is the issue you are experiencing?

When I change the portions (e.g. from 1 to 2), the unit isn't anymore in my language (german). The singular is fine but when using the plural it gets messed up.

Steps to Reproduce

Check http://MEALIE_URL:PORT/group/data/units for the units.

I suggest the values are imported from the json file https://github.com/mealie-recipes/mealie/blob/mealie-next/mealie/repos/seed/resources/units/locales/de-DE.json

But the plurals are all in english although the german plurals are written in the file

image

... "can": { "name": "Dose", "plural_name": "Dosen", "description": "", "abbreviation": "" }, ...

Please provide relevant logs


Mealie Version

Version v1.12.0

Build 0d06494bbfc62fc8a1771a85fd308190891d6167

Deployment

Docker (Linux)

Additional Deployment Details

No response

michael-genson commented 3 days ago

We don't do any translations with food/units/labels. You have to add those yourself. Our seed data only has the singular version so you'll have to add plurals yourself (although in nightly we added support for plurals)

Jarod2801 commented 3 days ago

OK, I edited it by myself.

But still curious why it initially mixes german end english and where the information came from.

EDIT: Looks to me like I have some translation issues. In the timeline it says "Recipe Created", so also in english and not in german. But the german translation exists!

Have I done something terrible wrong when installing? Haven't read anything about it. I just noted the TZ environment variable in the docker compose.

michael-genson commented 3 days ago

curious why it initially mixes german end english and where the information came from

Do you have any other users? Until nightly we don't auto-populate those fields, we only populate the name field when seeding

In the timeline it says "Recipe Created", so also in english and not in german

I believe that only happens if you were using English when the recipe was created, but it could otherwise be a bug

Jarod2801 commented 2 days ago

Do you have any other users? Until nightly we don't auto-populate those fields, we only populate the name field when seeding

No, I am the only user as I installed it yesterday. Maybe I used some demo receipes when setting up. Cound be the cause. But I am not sure.

I believe that only happens if you were using English when the recipe was created, but it could otherwise be a bug

When importing or creating receipes manually, the Ui was set to german as well.

I will make another test-install tomorrow and have a look again.