gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-docs] branch master updated: Move to better backwards-compatible


From: gnunet
Subject: [taler-docs] branch master updated: Move to better backwards-compatible i18n format for contract terms
Date: Mon, 02 Mar 2020 21:34:34 +0100

This is an automated email from the git hooks/post-receive script.

torsten-grote pushed a commit to branch master
in repository docs.

The following commit(s) were added to refs/heads/master by this push:
     new 1cd3110  Move to better backwards-compatible i18n format for contract 
terms
1cd3110 is described below

commit 1cd31101036559e6a02c10ee2e6e60f283f925c7
Author: Torsten Grote <address@hidden>
AuthorDate: Mon Mar 2 17:34:13 2020 -0300

    Move to better backwards-compatible i18n format for contract terms
---
 core/api-merchant.rst           | 27 +++++++++++----------------
 taler-merchant-pos-terminal.rst |  6 ++++++
 2 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/core/api-merchant.rst b/core/api-merchant.rst
index 8ff89d2..f6297ae 100644
--- a/core/api-merchant.rst
+++ b/core/api-merchant.rst
@@ -734,7 +734,10 @@ The contract terms must have the following structure:
 
     interface ContractTerms {
       // Human-readable description of the whole purchase
-      summary: TranslatableString;
+      summary: string;
+
+      // Map from IETF BCP 47 language tags to localized summaries
+      summary_i18n?: { [lang_tag: string]: string };
 
       // Unique, free-form identifier for the proposal.
       // Must be unique within a merchant instance.
@@ -746,7 +749,7 @@ The contract terms must have the following structure:
 
       // Total price for the transaction.
       // The exchange will subtract deposit fees from that amount
-      // before transfering it to the merchant.
+      // before transferring it to the merchant.
       amount: Amount;
 
       // The URL for this purchase.  Every time is is visited, the merchant
@@ -846,8 +849,8 @@ The contract terms must have the following structure:
       extra?: any;
     }
 
-  The wallet must select a exchange that either the mechant accepts directly by
-  listing it in the exchanges arry, or for which the merchant accepts an 
auditor
+  The wallet must select a exchange that either the merchant accepts directly 
by
+  listing it in the exchanges array, or for which the merchant accepts an 
auditor
   that audits that exchange by listing it in the auditors array.
 
   The `Product` object describes the product being purchased from the 
merchant. It has the following structure:
@@ -856,7 +859,10 @@ The contract terms must have the following structure:
 
     interface Product {
       // Human-readable product description.
-      description: TranslatableString;
+      description: string;
+
+      // Map from IETF BCP 47 language tags to localized descriptions
+      description_i18n?: { [lang_tag: string]: string };
 
       // The quantity of the product to deliver to the customer (optional, if 
applicable)
       quantity?: string;
@@ -880,17 +886,6 @@ 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 {
diff --git a/taler-merchant-pos-terminal.rst b/taler-merchant-pos-terminal.rst
index 02cb64b..b606461 100644
--- a/taler-merchant-pos-terminal.rst
+++ b/taler-merchant-pos-terminal.rst
@@ -126,6 +126,9 @@ The elements of the JSON file are defined as follows:
 
       // The name of the category. This will be shown to users and used in the 
order summary.
       name: string;
+
+      // Map from IETF BCP 47 language tags to localized names
+      name_i18n?: { [lang_tag: string]: string };
     }
 
 
@@ -139,6 +142,9 @@ The elements of the JSON file are defined as follows:
       // that will be shown to the user and used in contract terms
       description: string;
 
+      // Map from IETF BCP 47 language tags to localized descriptions
+      description_i18n?: { [lang_tag: string]: string };
+
       // The price of the product
       price: Amount;
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]