Skip to content

chore: Introduce localization for resource definitions - #532

Draft
mlakov wants to merge 1 commit into
mainfrom
chore/add-localization-for-resource-definitions
Draft

chore: Introduce localization for resource definitions#532
mlakov wants to merge 1 commit into
mainfrom
chore/add-localization-for-resource-definitions

Conversation

@mlakov

@mlakov mlakov commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Closes #527

@mlakov mlakov added the run-e2e Trigger e2e test pipeline label Aug 20, 2026
@hyperspace-pr-bot

hyperspace-pr-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

The following content is AI-generated and provides a summary of the pull request:


Introduce Localization for ORD Resource Definitions

Bug Fix

🐛 Resolves an issue where ORD-served OpenAPI (OAS3) and EDMX resource definitions contained raw {i18n>...} placeholder tokens instead of properly localized text. This caused ORD aggregators and SAP Business Accelerator Hub consumers to display literal i18n keys rather than human-readable strings.

The fix applies cds.localize() to resource definition outputs in both the runtime ORD service endpoint and the cds build ORD task, ensuring translations are resolved before the response is sent or written to disk.

Changes

  • lib/common/utils.js: Added a localize(model, resource) utility function that uses cds.localize to resolve {i18n>...} tokens in a JSON resource against the CDS model. Exported the function for use across the module.

  • lib/services/ord-service.js: Updated the metadataResponseHandler to apply localize(model, response) before sending the compiled metadata response, ensuring runtime-served OpenAPI/EDMX documents contain resolved localized strings.

  • lib/build.js: Imported the new localize utility and applied it to each compiled resource file during the build process (_generateResourcesFiles), so build-time ORD output files are also properly localized.

Jira Issues

GitHub Issues:

  • #527: [BUG] ORD-served OpenAPI (oas3) ships unresolved {i18n>...} tokens — not localized like cds compile -l

  • 🔄 Regenerate and Update Summary
  • ✏️ Insert as PR Description (deletes this comment)
  • 🗑️ Delete comment
PR Bot Information

Version: 1.29.33

hyperspace-pr-bot[bot]

This comment was marked as outdated.

@mlakov
mlakov force-pushed the chore/add-localization-for-resource-definitions branch from 8b425fc to 2a10679 Compare August 20, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-e2e Trigger e2e test pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] ORD-served OpenAPI (oas3) ships unresolved {i18n>...} tokens — not localized like cds compile -l

1 participant