recipes icon indicating copy to clipboard operation
recipes copied to clipboard

plural with template

Open TWART016 opened this issue 2 years ago • 3 comments

Tandoor Version

1.4.7

Setup

Docker / Docker-Compose

Reverse Proxy

No reverse proxy

Other

No response

Bug description

I set the plural for Ei(er) and Banane / Banane(n). In recipe view mode I can change the servings. In ingredients the plural name change if they are two or more.

In description with templates the name does not change to plural. 1 serving image

2 servings image

template image

Relevant logs

No response

TWART016 avatar Feb 18 '23 01:02 TWART016

filing this as an enhancement to the plural feature, should be possible to add, need to look into how complicated it would be, i remember needing to apply some dirty hacks when implementing the templating code

vabene1111 avatar Feb 18 '23 10:02 vabene1111

I suggest instead of changing the form inside the template to put both forms there, e.g.

[1] [] [Ei (Eier)]
[2] [] [Ei (Eier)]

The plural form could be also in different font style (like in the title of the ingredients editor, see e.g., https://user-images.githubusercontent.com/6549824/282423470-f69c94e6-7d0e-44b0-a9a6-621968299dd9.png)

I think, that this would be less confusing as by changing the count the ingredient it would not look like the ingredient itself is changing.

mahlzahn avatar Nov 13 '23 10:11 mahlzahn

thanks for the suggestion but we have a system in place to decide which form to show, just need to check if I can get that working with the templating which is a bit of a client hack. But I am optimistic to get it working, if not we will fallback to the other solution.

vabene1111 avatar Nov 22 '23 08:11 vabene1111