You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #527