From f106e433eddc429238e509319b3c1caf60ffa9ff Mon Sep 17 00:00:00 2001 From: Rashmi Angadi Date: Tue, 14 Apr 2026 13:44:22 +0530 Subject: [PATCH 1/7] i18n fix --- pom.xml | 2 +- sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 802d1ef8f..a71a54c5b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ - 1.8.1-SNAPSHOT + 1.0.0-RC1 17 ${java.version} ${java.version} diff --git a/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds b/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds index ddf5c1979..ba0c00bb8 100644 --- a/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds +++ b/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds @@ -63,6 +63,10 @@ annotate Attachments with @UI: { mimeType @UI.Hidden; status @UI.Hidden; linkUrl @UI.Hidden; + modifiedAt @(title: '{i18n>modifiedAt}'); + modifiedBy @(title: '{i18n>modifiedBy}'); + createdAt @(title: '{i18n>createdAt}'); + createdBy @(title: '{i18n>createdBy}'); } annotate Attachments with @Common: {SideEffects #ContentChanged: { From c0ebe224c314097863ceb5e9c46cf515b12ca6f0 Mon Sep 17 00:00:00 2001 From: Rashmi Angadi Date: Tue, 14 Apr 2026 14:19:29 +0530 Subject: [PATCH 2/7] Update attachments.cds --- .../main/resources/cds/com.sap.cds/sdm/attachments.cds | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds b/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds index ba0c00bb8..8dfbf7ff5 100644 --- a/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds +++ b/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds @@ -1,5 +1,10 @@ namespace sap.attachments; +using { + cuid, + managed, + sap.common.CodeList +} from '@sap/cds/common'; using {sap.attachments.Attachments} from `com.sap.cds/cds-feature-attachments`; using {sap.attachments.MediaData} from `com.sap.cds/cds-feature-attachments`; using { @@ -63,10 +68,7 @@ annotate Attachments with @UI: { mimeType @UI.Hidden; status @UI.Hidden; linkUrl @UI.Hidden; - modifiedAt @(title: '{i18n>modifiedAt}'); - modifiedBy @(title: '{i18n>modifiedBy}'); - createdAt @(title: '{i18n>createdAt}'); - createdBy @(title: '{i18n>createdBy}'); + ID @(title: '{i18n>idCol}'); } annotate Attachments with @Common: {SideEffects #ContentChanged: { From b4239e12edd2c645f56acbd405e0f9d46b521180 Mon Sep 17 00:00:00 2001 From: Rashmi Angadi Date: Tue, 14 Apr 2026 14:57:35 +0530 Subject: [PATCH 3/7] Update attachments.cds --- sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds | 1 + 1 file changed, 1 insertion(+) diff --git a/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds b/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds index 8dfbf7ff5..c30fe8793 100644 --- a/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds +++ b/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds @@ -47,6 +47,7 @@ annotate Attachments with @UI: { {Value: createdAt, @HTML5.CssDefaults: {width: '20%'}}, {Value: createdBy, @HTML5.CssDefaults: {width: '15%'}}, {Value: note, @HTML5.CssDefaults: {width: '15%'}}, + {Value: up__ID, @UI.Hidden}, { Value : uploadStatus, Criticality: uploadStatusNav.criticality, From b79ae44986d893dc7efc8ba0ebc488a422cdf468 Mon Sep 17 00:00:00 2001 From: Rashmi Angadi Date: Tue, 14 Apr 2026 15:01:21 +0530 Subject: [PATCH 4/7] Update attachments.cds --- .../main/resources/cds/com.sap.cds/sdm/attachments.cds | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds b/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds index c30fe8793..3c7c5efbf 100644 --- a/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds +++ b/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds @@ -1,10 +1,5 @@ namespace sap.attachments; -using { - cuid, - managed, - sap.common.CodeList -} from '@sap/cds/common'; using {sap.attachments.Attachments} from `com.sap.cds/cds-feature-attachments`; using {sap.attachments.MediaData} from `com.sap.cds/cds-feature-attachments`; using { @@ -47,7 +42,8 @@ annotate Attachments with @UI: { {Value: createdAt, @HTML5.CssDefaults: {width: '20%'}}, {Value: createdBy, @HTML5.CssDefaults: {width: '15%'}}, {Value: note, @HTML5.CssDefaults: {width: '15%'}}, - {Value: up__ID, @UI.Hidden}, + {Value: up__ID, @UI.Hidden}, + { Value : uploadStatus, Criticality: uploadStatusNav.criticality, @@ -70,6 +66,7 @@ annotate Attachments with @UI: { status @UI.Hidden; linkUrl @UI.Hidden; ID @(title: '{i18n>idCol}'); + } annotate Attachments with @Common: {SideEffects #ContentChanged: { From 9aa3757d950eb9f64f74edf0b243abdaa0e48f68 Mon Sep 17 00:00:00 2001 From: Rashmi Angadi Date: Tue, 14 Apr 2026 15:10:47 +0530 Subject: [PATCH 5/7] Update attachments.cds --- .../cds/com.sap.cds/sdm/attachments.cds | 36 +++++++++++-------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds b/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds index 3c7c5efbf..b166704d5 100644 --- a/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds +++ b/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds @@ -52,20 +52,28 @@ annotate Attachments with @UI: { }, ] } { - note @(title: '{i18n>Description}'); - fileName @(title: '{i18n>Filename}'); - modifiedAt @(odata.etag: null); - uploadStatus @(title: '{i18n>uploadStatus}', Common.Text : uploadStatusNav.name, Common.TextArrangement : #TextOnly); - content - @Core.ContentDisposition: { Filename: fileName, Type: 'inline' } - @(title: '{i18n>Attachment}'); - folderId @UI.Hidden; - repositoryId @UI.Hidden ; - objectId @UI.Hidden ; - mimeType @UI.Hidden; - status @UI.Hidden; - linkUrl @UI.Hidden; - ID @(title: '{i18n>idCol}'); + note @(title: '{i18n>Description}'); + fileName @(title: '{i18n>Filename}'); + modifiedAt @(odata.etag: null); + uploadStatus @( + title : '{i18n>uploadStatus}', + Common.Text : uploadStatusNav.name, + Common.TextArrangement: #TextOnly + ); + content + @Core.ContentDisposition: { + Filename: fileName, + Type : 'inline' + } + @(title: '{i18n>Attachment}'); + folderId @UI.Hidden; + repositoryId @UI.Hidden; + objectId @UI.Hidden; + mimeType @UI.Hidden; + status @UI.Hidden; + linkUrl @UI.Hidden; + up__ID @UI.Hidden; + ID @(title: '{i18n>idCol}'); } From 3f7e031e7352691a3bd689d7d86447ea94da76cb Mon Sep 17 00:00:00 2001 From: Rashmi Angadi Date: Tue, 14 Apr 2026 15:11:15 +0530 Subject: [PATCH 6/7] Update attachments.cds --- sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds b/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds index b166704d5..45fa595ab 100644 --- a/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds +++ b/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds @@ -42,7 +42,6 @@ annotate Attachments with @UI: { {Value: createdAt, @HTML5.CssDefaults: {width: '20%'}}, {Value: createdBy, @HTML5.CssDefaults: {width: '15%'}}, {Value: note, @HTML5.CssDefaults: {width: '15%'}}, - {Value: up__ID, @UI.Hidden}, { Value : uploadStatus, @@ -73,7 +72,7 @@ annotate Attachments with @UI: { status @UI.Hidden; linkUrl @UI.Hidden; up__ID @UI.Hidden; - ID @(title: '{i18n>idCol}'); + ID @(title: '{i18n>attachmentID}'); } From 5003625bd11f6e413abd0cf8c1f6fedecc841b11 Mon Sep 17 00:00:00 2001 From: Rashmi Angadi Date: Tue, 14 Apr 2026 15:20:59 +0530 Subject: [PATCH 7/7] References components are not localized the following fields are hardcoded in SD and we cannot add i18n strings for these please make then as localized strings Created On, Created By, Changed By, Changed On --- README.md | 2 ++ sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a3054a6d3..6a852108f 100644 --- a/README.md +++ b/README.md @@ -1298,6 +1298,8 @@ Filename=File Name linkUrl=Link Url type=Type ``` +**Note**: For localizing the CAP managed fields use the below keys +CreatedAt,CreatedBy,ChangedAt,ChangedBy and attachmentID for ID. ### Error Messages Localization diff --git a/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds b/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds index 45fa595ab..0ec521ebe 100644 --- a/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds +++ b/sdm/src/main/resources/cds/com.sap.cds/sdm/attachments.cds @@ -71,7 +71,6 @@ annotate Attachments with @UI: { mimeType @UI.Hidden; status @UI.Hidden; linkUrl @UI.Hidden; - up__ID @UI.Hidden; ID @(title: '{i18n>attachmentID}'); }