summaryrefslogtreecommitdiff
path: root/core/api-merchant.rst
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2020-03-02 12:18:18 -0300
committerTorsten Grote <t@grobox.de>2020-03-02 12:18:46 -0300
commitbe60dad5283e0afb0ecbbb167a67fc6ce083d41b (patch)
treeafdb5f1861dd963cd5c7ba5f09a01cb32c28715b /core/api-merchant.rst
parent1e31a13c03ecb5505646e9de17cb38b7e7cbaf04 (diff)
downloaddocs-be60dad5283e0afb0ecbbb167a67fc6ce083d41b.tar.gz
docs-be60dad5283e0afb0ecbbb167a67fc6ce083d41b.tar.bz2
docs-be60dad5283e0afb0ecbbb167a67fc6ce083d41b.zip
Add i18n to merchant API contract terms
Diffstat (limited to 'core/api-merchant.rst')
-rw-r--r--core/api-merchant.rst15
1 files changed, 13 insertions, 2 deletions
diff --git a/core/api-merchant.rst b/core/api-merchant.rst
index a02b895e..8ff89d21 100644
--- a/core/api-merchant.rst
+++ b/core/api-merchant.rst
@@ -734,7 +734,7 @@ The contract terms must have the following structure:
interface ContractTerms {
// Human-readable description of the whole purchase
- summary: string;
+ summary: TranslatableString;
// Unique, free-form identifier for the proposal.
// Must be unique within a merchant instance.
@@ -856,7 +856,7 @@ The contract terms must have the following structure:
interface Product {
// Human-readable product description.
- description: string;
+ description: TranslatableString;
// The quantity of the product to deliver to the customer (optional, if applicable)
quantity?: string;
@@ -880,6 +880,17 @@ The contract terms must have the following structure:
delivery_location: string;
}
+
+ .. ts:def:: TranslatableString
+
+ interface TranslatableString {
+ // default string to be shown when there is no string for the user's locale available
+ _: string;
+ // [locale] is replaced with an IETF BCP 47 language tag for a localized string (optional)
+ // more than one locale might be added, the UI chooses the most suitable one for display
+ [locale]?: string;
+ }
+
.. ts:def:: Merchant
interface Merchant {