From b4a21f1e05ad8fe075e7997ec77ed7d329e264cf Mon Sep 17 00:00:00 2001 From: Alexey Dubovskoy Date: Mon, 28 Mar 2022 21:27:17 +0100 Subject: [PATCH 1/3] Empty template --- .../0000-support-recipes-not-in-english.md | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 proposals/0000-support-recipes-not-in-english.md diff --git a/proposals/0000-support-recipes-not-in-english.md b/proposals/0000-support-recipes-not-in-english.md new file mode 100644 index 0000000..6947218 --- /dev/null +++ b/proposals/0000-support-recipes-not-in-english.md @@ -0,0 +1,77 @@ +# Feature name + +* Proposal: [NNNN-filename](NNNN-filename.md) +* Authors: [Author 1](https://github.com/cooklangdev), [Author 2](https://github.com/cooklangdev) +* Review Manager: TBD +* Status: **Awaiting review** + +*During the review process, add the following fields as needed:* + +* Decision Notes: [Rationale](https://github.com/cooklang/spec/discussions), [Additional Commentary](https://github.com/cooklang/spec/discussions) +* Previous Revision: [1](https://github.com/cooklang/spec/blob/...commit-ID.../proposals/NNNN-filename.md) +* Previous Proposal: [XXXX-filename](XXXX-filename.md) + +## Introduction + +A short description of what the feature is. Try to keep it to a +single-paragraph "elevator pitch" so the reader understands what +problem this proposal is addressing. + +Discussion thread: [Discussion thread topic for that proposal](https://github.com/cooklang/spec/discussions). + +## Motivation + +Describe the problems that this proposal seeks to address. If the +problem is that some common pattern is currently hard to express, show +how one can currently get a similar effect and describe its +drawbacks. If it's completely new functionality that cannot be +emulated, motivate why this new functionality would help Cooklang community +use Cooklang better. + +## Proposed solution + +Describe your solution to the problem. Provide examples and describe +how they work. Show how your solution is better than current +workarounds (if any). + +## Detailed design + +Describe the design of the solution in detail. If it involves new +syntax in the language, show the additions and changes to the Cooklang +grammar. If it's a new API, show the full API and its documentation +comments detailing what it does. The detail in this section should be +sufficient for someone who is *not* one of the authors to be able to +reasonably implement the feature. + +## Effect on applications which use Cooklang + +Changes in Cooklang syntax often require supplementary UI changes in +apps which use it (otherwise why these changes if nothing will +use them). Describe in details what changes should be implemented. +The detail in this section should be sufficient for someone +who is *not* one of the authors to be able to reasonably implement +the feature. + +### CookCLI (terminal and web-server) + +Does the proposal change the output of +[CookCLI](https://github.com/cooklang/CookCLI)? Does it require adding +a new sub-command to fully use this feature? + +### Mobile applications + +Does the proposal require changes in mobile application UI? Describe +what screens should be changed and how. Give as much details as +possible. + +## Alternatives considered + +Describe alternative approaches to addressing the same problem, and +why you chose this approach instead. + +## Acknowledgments + +If significant changes or improvements suggested by members of the +community were incorporated into the proposal as it developed, take a +moment here to thank them for their contributions. Cooklang evolution is a +collaborative process, and everyone's input should receive recognition! From 8b023dc5fb75494b2501fc917865486286e879c4 Mon Sep 17 00:00:00 2001 From: Alexey Dubovskoy Date: Mon, 28 Mar 2022 21:33:08 +0100 Subject: [PATCH 2/3] Move from Roadmap --- ...> 0001-support-recipes-in-any-language.md} | 34 ++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) rename proposals/{0000-support-recipes-not-in-english.md => 0001-support-recipes-in-any-language.md} (68%) diff --git a/proposals/0000-support-recipes-not-in-english.md b/proposals/0001-support-recipes-in-any-language.md similarity index 68% rename from proposals/0000-support-recipes-not-in-english.md rename to proposals/0001-support-recipes-in-any-language.md index 6947218..a6a69b8 100644 --- a/proposals/0000-support-recipes-not-in-english.md +++ b/proposals/0001-support-recipes-in-any-language.md @@ -1,7 +1,7 @@ -# Feature name +# Support recipes in any language -* Proposal: [NNNN-filename](NNNN-filename.md) -* Authors: [Author 1](https://github.com/cooklangdev), [Author 2](https://github.com/cooklangdev) +* Proposal: [0001-support-recipes-not-in-english](0001-support-recipes-not-in-english.md) +* Authors: [Alexey Dubovskoy](https://github.com/dubadub) * Review Manager: TBD * Status: **Awaiting review** @@ -30,9 +30,24 @@ use Cooklang better. ## Proposed solution -Describe your solution to the problem. Provide examples and describe -how they work. Show how your solution is better than current -workarounds (if any). +If config has locale set it should use one instead. In file `./config/main.conf` add line `locale = ru_RU`. Or simple `locale = ru`. + +Locale of recipe can be set in file name or metadata. Name file `Koldskål.da.cook`. Or in metadata set + +``` +>> locale: da_DK +``` + +- how to singularise ingredients and convert case to base when parsing +- how to singularise units and convert case to base when parsing +- how to pluralise units and ingredients when display with numbers (this can be done by Apple?) + +For many languages plural and singular form of an ingredient or unit will be different. To keep recipe readable + +https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/language_plural_rules.html +https://cldr.unicode.org/translation/grammatical-inflection + +Depending on the locale, there could be up to 6 plural forms used: zero, one, two, few, many, other. ## Detailed design @@ -45,12 +60,7 @@ reasonably implement the feature. ## Effect on applications which use Cooklang -Changes in Cooklang syntax often require supplementary UI changes in -apps which use it (otherwise why these changes if nothing will -use them). Describe in details what changes should be implemented. -The detail in this section should be sufficient for someone -who is *not* one of the authors to be able to reasonably implement -the feature. +App should guess locale from the system. ### CookCLI (terminal and web-server) From 05513c1d20da852b0ba3c7324e9b9347c2b67d3a Mon Sep 17 00:00:00 2001 From: Alexey Dubovskoy Date: Mon, 28 Mar 2022 21:46:00 +0100 Subject: [PATCH 3/3] Add intro --- .../0001-support-recipes-in-any-language.md | 29 +++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/proposals/0001-support-recipes-in-any-language.md b/proposals/0001-support-recipes-in-any-language.md index a6a69b8..98caaeb 100644 --- a/proposals/0001-support-recipes-in-any-language.md +++ b/proposals/0001-support-recipes-in-any-language.md @@ -3,30 +3,23 @@ * Proposal: [0001-support-recipes-not-in-english](0001-support-recipes-not-in-english.md) * Authors: [Alexey Dubovskoy](https://github.com/dubadub) * Review Manager: TBD -* Status: **Awaiting review** - -*During the review process, add the following fields as needed:* - -* Decision Notes: [Rationale](https://github.com/cooklang/spec/discussions), [Additional Commentary](https://github.com/cooklang/spec/discussions) -* Previous Revision: [1](https://github.com/cooklang/spec/blob/...commit-ID.../proposals/NNNN-filename.md) -* Previous Proposal: [XXXX-filename](XXXX-filename.md) +* Status: **Brainstorming** ## Introduction -A short description of what the feature is. Try to keep it to a -single-paragraph "elevator pitch" so the reader understands what -problem this proposal is addressing. - -Discussion thread: [Discussion thread topic for that proposal](https://github.com/cooklang/spec/discussions). +Cooklang ecosystem should have unified support of recipes written in any language. ## Motivation -Describe the problems that this proposal seeks to address. If the -problem is that some common pattern is currently hard to express, show -how one can currently get a similar effect and describe its -drawbacks. If it's completely new functionality that cannot be -emulated, motivate why this new functionality would help Cooklang community -use Cooklang better. +Cooklang gives a way to store recipes in a format that human and machine readable. +Some languages (f.e. German, Finnish, many Slavic languages) would have ingredients +in the middle of sentence to be in a modified form (check an examples on Wikipedia + https://en.wikipedia.org/wiki/Grammatical_case). + +That modified form will lead to creation of multiple entries for the same ingredient +in a shopping list, while it's still the same ingredient and all amounts should be +combined. + ## Proposed solution