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

Make sure that catalog values are properly updated #4194

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

arsalansufi
Copy link
Contributor

Overview

Noticed a quirk in app string catalog generation. While the new catalog generation logic handles the addition and removal of strings to app_strings.tsx, it doesn't handle updates to existing strings.


So imagine we have the following in app_strings.tsx:

buttonDone: () => <UiString uiStringKey="buttonDone">Done</UiString>,

The catalog will contain:

"buttonDone": "Done",

If we then edit app_strings.tsx, e.g.:

buttonDone: () => <UiString uiStringKey="buttonDone">Done!</UiString>,

The catalog should read:

"buttonDone": "Done!",

But it'll currently remain unchanged.


This PR addresses this gap with a config tweak. The relevant config field is a bit abstractly named. But you can see how it does what we want by following this issue to its conclusion: i18next/i18next-parser#267 ➡️ i18next/i18next-parser#451.

Testing Plan

  • Tested manually

@arsalansufi arsalansufi marked this pull request as ready for review November 9, 2023 20:08
@arsalansufi arsalansufi requested a review from kofi-q November 9, 2023 20:08
Copy link
Contributor

@kofi-q kofi-q left a comment

Choose a reason for hiding this comment

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

Good catch!

@arsalansufi arsalansufi merged commit 22909be into main Nov 9, 2023
@arsalansufi arsalansufi deleted the arsalan/catalog-gen-tweak branch November 9, 2023 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants