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

(closed in favor of #19799) feat: allow for tree-shaking unused langauges translations in custom apps #19795

Conversation

Platonn
Copy link
Contributor

@Platonn Platonn commented Dec 20, 2024

  • add a lot of missing index.ts files to re-export translations in TS for new langauges
  • update translations.ts barrel files, to export each langauge in a separate public API members (to allow for treeshaking unused langauges)
  • remove from the old wrapper const <featureName>Translations the languages other than en (which were added only in the branch epic/tew-translation before)
  • deprecate old consts <featureName>Translations (and <featureName>TranslationsChunksConfig) in favor of favour the new non-prefixed consts translationsEn, translationsDe,... for specific langauges (and non-prefixed translationChunksConfig).

By the way:

  • fixed manually the chunks mapping for the cpqQuote feature
  • comit a script that generated new translation.ts files and index.ts files. That said, the translation chunks configs were brought back manually later

TODO:

  • simplify chunks mappings - get chunks mapping with simple Object.keys() instead of hardcoded array. AND generate it with a script

related to https://jira.tools.sap/browse/CXSPA-9131

OTHER STEPS not included in this PR:

  • change the installation schematics to use new non-deprecated consts AND new { en: translationsEn }

…ns.ts export each language separately.

Moreover, deprecate the old "feature-prefixed" const with chunks config. and deprecate old "feature-prefixed" const with wrapper `translations` object
@Platonn Platonn force-pushed the epic/tew-translation--script-updating-ts-files branch from cb02806 to 901063d Compare December 20, 2024 12:03
@Platonn Platonn changed the title Epic/tew translation script updating ts files fix: allow for tree-shaking unused langauges translations in custom apps Dec 20, 2024
@Platonn Platonn changed the title fix: allow for tree-shaking unused langauges translations in custom apps feat: allow for tree-shaking unused langauges translations in custom apps Dec 20, 2024
@Platonn Platonn changed the title feat: allow for tree-shaking unused langauges translations in custom apps (closed in favor of #19799) feat: allow for tree-shaking unused langauges translations in custom apps Dec 20, 2024
@Platonn
Copy link
Contributor Author

Platonn commented Dec 20, 2024

closing in favor of #19799

@Platonn Platonn closed this Dec 20, 2024
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