Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit d9058f9

Browse files
PierreFritschchgeo
andauthored
Manage Orders: Switch to translatable texts (#424)
Co-authored-by: Christian Georgi <[email protected]>
1 parent affd171 commit d9058f9

File tree

2 files changed

+27
-16
lines changed

2 files changed

+27
-16
lines changed

fiori/app/_i18n/i18n.properties

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,21 @@ PlaceOfDeath = Place of Death
1616
Age = Age
1717
Lifetime = Lifetime
1818
Authors = Authors
19+
1920
Order = Order
2021
Orders = Orders
22+
OrderNo = Order Number
23+
OrderItems = Order Items
24+
Customer = Customer
25+
Product = Product
26+
ProductID = Product ID
27+
ProductTitle = Product Title
28+
UnitPrice = Unit Price
29+
Quantity = Quantity
30+
2131
Price = Price
2232
Currency = Currency
33+
Date = Date
2334
Rating = Rating
2435
NumberOfReviews = Number of Reviews
2536

orders/app/fiori.cds

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ annotate OrdersService.Orders with @(
1818
UI: {
1919
SelectionFields: [ createdBy ],
2020
LineItem: [
21-
{Value: OrderNo, Label:'OrderNo'},
22-
{Value: buyer, Label:'Customer'},
23-
{Value: currency.symbol, Label:'Currency'},
24-
{Value: createdAt, Label:'Date'},
21+
{Value: OrderNo, Label:'{i18n>OrderNo}'},
22+
{Value: buyer, Label:'{i18n>Customer}'},
23+
{Value: currency.symbol, Label:'{i18n>Currency}'},
24+
{Value: createdAt, Label:'{i18n>Date}'},
2525
],
2626
HeaderInfo: {
27-
TypeName: 'Order', TypeNamePlural: 'Orders',
27+
TypeName: '{i18n>Order}', TypeNamePlural: '{i18n>Orders}',
2828
Title: {
29-
Label: 'Order number ', //A label is possible but it is not considered on the ObjectPage yet
29+
Label: '{i18n>OrderNo}', //A label is possible but it is not considered on the ObjectPage yet
3030
Value: OrderNo
3131
},
3232
Description: {Value: createdBy}
3333
},
3434
Identification: [ //Is the main field group
35-
{Value: createdBy, Label:'Customer'},
36-
{Value: createdAt, Label:'Date'},
35+
{Value: createdBy, Label:'{i18n>Customer}'},
36+
{Value: createdAt, Label:'{i18n>Date}'},
3737
{Value: OrderNo },
3838
],
3939
HeaderFacets: [
@@ -46,7 +46,7 @@ annotate OrdersService.Orders with @(
4646
],
4747
FieldGroup#Details: {
4848
Data: [
49-
{Value: currency.code, Label:'Currency'}
49+
{Value: currency.code, Label:'{i18n>Currency}'}
5050
]
5151
},
5252
FieldGroup#Created: {
@@ -73,15 +73,15 @@ annotate OrdersService.Orders with @(
7373
annotate OrdersService.Orders.Items with @(
7474
UI: {
7575
LineItem: [
76-
{Value: product_ID, Label:'Product ID'},
77-
{Value: title, Label:'Product Title'},
78-
{Value: price, Label:'Unit Price'},
79-
{Value: quantity, Label:'Quantity'},
76+
{Value: product_ID, Label:'{i18n>ProductID}'},
77+
{Value: title, Label:'{i18n>ProductTitle}'},
78+
{Value: price, Label:'{i18n>UnitPrice}'},
79+
{Value: quantity, Label:'{i18n>Quantity}'},
8080
],
8181
Identification: [ //Is the main field group
82-
{Value: quantity, Label:'Quantity'},
83-
{Value: title, Label:'Product'},
84-
{Value: price, Label:'Unit Price'},
82+
{Value: quantity, Label:'{i18n>Quantity}'},
83+
{Value: title, Label:'{i18n>Product}'},
84+
{Value: price, Label:'{i18n>UnitPrice}'},
8585
],
8686
Facets: [
8787
{$Type: 'UI.ReferenceFacet', Label: '{i18n>OrderItems}', Target: '@UI.Identification'},

0 commit comments

Comments
 (0)