taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

commit be60dad5283e0afb0ecbbb167a67fc6ce083d41b
parent 1e31a13c03ecb5505646e9de17cb38b7e7cbaf04
Author: Torsten Grote <t@grobox.de>
Date:   Mon,  2 Mar 2020 12:18:18 -0300

Add i18n to merchant API contract terms

Diffstat:
Mcore/api-merchant.rst | 15+++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)

diff --git 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 {