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

feat: runtime-editable string collections #184

Merged
merged 5 commits into from
Dec 1, 2023
Merged

Conversation

chohner
Copy link
Member

@chohner chohner commented Nov 6, 2023

@joschka this is what we looked at last Friday.

The idea is to replace our hard-coded Singletypes that effectively just represent string lookup (like AmtsgerichtCommon and the contained fields such as featureName)

This instead would add a CollectionType (prototype name Translations, up for discussion), which allows dynamic editing of translation groups and containing fields.

pros:

  • Adding / editing translation groups & variables at runtime without re-deploy
  • No more typing of each variable in the App
  • Explicit lookup and fallback (if a variable wasn't found we could still show Amtsgericht.featureName)

cons:

  • Less type safety (we can't "know" that Amtsgericht.featureName exists via zod validation)
  • Potential of accidental deletion/editing

@chohner chohner changed the title feat: translations with fields feat: runtime-editable string collections Nov 6, 2023
@chohner chohner force-pushed the add_mutable_translations branch from 0a27f31 to 26d0bfa Compare December 1, 2023 15:47
@chohner chohner marked this pull request as ready for review December 1, 2023 15:53
chohner added a commit to digitalservicebund/a2j-rechtsantragstelle that referenced this pull request Dec 1, 2023
Only merge after digitalservicebund/a2j-rechtsantragstelle-strapi#184

Co-Authored-By: SannyNguyenHung <[email protected]>
Co-Authored-By: Joschka <[email protected]>
Co-Authored-By: Pram Gurusinga <[email protected]>
@chohner chohner merged commit 7ba0e0c into main Dec 1, 2023
5 checks passed
@chohner chohner deleted the add_mutable_translations branch December 1, 2023 16:23
chohner added a commit to digitalservicebund/a2j-rechtsantragstelle that referenced this pull request Dec 5, 2023
* feat: use strapi translations

Only merge after digitalservicebund/a2j-rechtsantragstelle-strapi#184

Co-Authored-By: SannyNguyenHung <[email protected]>
Co-Authored-By: Joschka <[email protected]>
Co-Authored-By: Pram Gurusinga <[email protected]>

* fix(cms dump): add translations

---------

Co-authored-by: SannyNguyenHung <[email protected]>
Co-authored-by: Joschka <[email protected]>
Co-authored-by: Pram Gurusinga <[email protected]>
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.

1 participant