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

fix: 4497 use Translation for Recipe created #4562

Merged
merged 3 commits into from
Nov 19, 2024

Conversation

ziegenhagel
Copy link
Contributor

What type of PR is this?

  • bug

What this PR does / why we need it:

This PR fixes untranslated timeline events in the recipe creation process. Currently, when creating a new recipe, the timeline event shows a hardcoded English message "Recipe Created" regardless of the user's selected language.

Changes made:

  • Changed hardcoded string in recipe_service.py to use translation key
  • Added initial translations for:
    • de-DE: "Rezept erstellt"
    • en-US: "Recipe created"

This is the first step in fully localizing timeline events, starting with the two main languages. Additional language support will be added in follow-up PRs.

Which issue(s) this PR fixes:

Partial fix for #4497

Special notes for your reviewer:

The translation key follows the existing pattern used in recipe defaults:

  • Current: recipe.recipe-defaults.ingredient-note
  • New: recipe.recipe-created

Testing

Tested by:

  1. Creating a new recipe with German (de-DE) locale
  2. Verifying timeline event shows "Rezept erstellt"
  3. Creating a new recipe with English (en-US) locale
  4. Verifying timeline event shows "Recipe created"

All existing tests pass. Translation keys are consistent with existing naming patterns.

@Kuchenpirat
Copy link
Collaborator

Hey, thanks for your PR.
It seems like you created this PR on top of your other one.

@Kuchenpirat
Copy link
Collaborator

Kuchenpirat commented Nov 15, 2024

Also you only need to add base translations to the en_US file. The rest is handled through crowdin. You can add the german translation over there as soon as the PR including the translation is merged.

@ziegenhagel
Copy link
Contributor Author

Thank you! I hope it's correct now.

Copy link
Collaborator

@michael-genson michael-genson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! One small thing

mealie/lang/messages/en-US.json Outdated Show resolved Hide resolved
@michael-genson michael-genson enabled auto-merge (squash) November 19, 2024 00:26
Copy link
Collaborator

@michael-genson michael-genson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@michael-genson michael-genson merged commit 6e4f9a2 into mealie-recipes:mealie-next Nov 19, 2024
13 checks passed
@boc-the-git
Copy link
Collaborator

Please provide a meaningful title to the pull request.

@ziegenhagel ziegenhagel changed the title fix: 4497 fix: 4497 use Translation for Recipe created Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants