taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 2454609d847cf89d8fd4de622d607cc706de6e16
parent 38614c952525d8e14e72fc4ebe0e57ade191c3cb
Author: Sebastian <sebasjm@taler-systems.com>
Date:   Fri,  6 Feb 2026 11:50:35 -0300

use provider_name for tos file

Diffstat:
Apackages/challenger-ui/src/i18n/es.po | 449+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mpackages/challenger-ui/src/i18n/strings.ts | 262+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mpackages/web-util/src/forms/gana/accept-tos.ts | 7+++++--
3 files changed, 716 insertions(+), 2 deletions(-)

diff --git a/packages/challenger-ui/src/i18n/es.po b/packages/challenger-ui/src/i18n/es.po @@ -0,0 +1,449 @@ +# This file is part of GNU Taler +# (C) 2022-2024 Taler Systems S.A. +# +# GNU Taler is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 3, or (at your option) any later version. +# +# GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Challenger UI\n" +"Report-Msgid-Bugs-To: taler@gnu.org\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: packages/challenger-ui/src/components/CheckChallengeIsUpToDate.tsx:60 +#, c-format +msgid "Bad request" +msgstr "" + +#: packages/challenger-ui/src/components/CheckChallengeIsUpToDate.tsx:61 +#, c-format +msgid "Could not start the challenge, check configuration." +msgstr "" + +#: packages/challenger-ui/src/components/CheckChallengeIsUpToDate.tsx:69 +#, c-format +msgid "Not found" +msgstr "" + +#: packages/challenger-ui/src/components/CheckChallengeIsUpToDate.tsx:70 +#, c-format +msgid "Nonce not found" +msgstr "" + +#: packages/challenger-ui/src/components/CheckChallengeIsUpToDate.tsx:76 +#, c-format +msgid "Not acceptable" +msgstr "" + +#: packages/challenger-ui/src/components/CheckChallengeIsUpToDate.tsx:77 +#, c-format +msgid "Server has wrong template configuration" +msgstr "" + +#: packages/challenger-ui/src/components/CheckChallengeIsUpToDate.tsx:85 +#, c-format +msgid "Internal error" +msgstr "" + +#: packages/challenger-ui/src/components/CheckChallengeIsUpToDate.tsx:86 +#, c-format +msgid "Check logs" +msgstr "" + +#: packages/challenger-ui/src/components/CheckChallengeIsUpToDate.tsx:95 +#, c-format +msgid "Can't complete this challenge" +msgstr "" + +#: packages/challenger-ui/src/components/CheckChallengeIsUpToDate.tsx:97 +#, c-format +msgid "" +"There have been too many attempts to request challenge transmissions and " +"check the TAN code." +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:102 +#, c-format +msgid "Can't be empty" +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:152 +#, c-format +msgid "The request was not accepted, try reloading the app." +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:154 +#, c-format +msgid "Challenge not found." +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:156 +#, c-format +msgid "Server templates are missing due to misconfiguration." +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:158 +#, c-format +msgid "There have been too many attempts to request challenge transmissions." +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:160 +#, c-format +msgid "Server is unable to respond due to internal problems." +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:187 +#, c-format +msgid "Invalid pin." +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:210 +#, c-format +msgid "Last TAN code was sent to &quot;%1$s &quot; is not valid anymore." +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:216 +#, c-format +msgid "A TAN code was sent to \"%1$s\"" +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:217 +#, c-format +msgid "You should wait until &quot; %1$s &quot; to send a new one." +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:237 +#, c-format +msgid "Try with another address" +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:241 +#, c-format +msgid "You can&#39;t change the contact address anymore." +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:245 +#, c-format +msgid "You can change the contact address one last time." +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:249 +#, c-format +msgid "You can change the contact address %1$s more times." +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:264 +#, c-format +msgid "Send new code" +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:268 +#, c-format +msgid "We can&#39;t send you the code anymore." +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:272 +#, c-format +msgid "We can send the code one last time." +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:276 +#, c-format +msgid "We can send the code %1$s more times." +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:296 +#, c-format +msgid "Last TAN code can not be used." +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:315 +#, c-format +msgid "Enter the TAN you received to authenticate." +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:323 +#, c-format +msgid "You can&#39;t check the PIN anymore." +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:327 +#, c-format +msgid "You can check the PIN one last time." +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:331 +#, c-format +msgid "You can check the PIN %1$s more times." +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:354 +#, c-format +msgid "TAN code" +msgstr "" + +#: packages/challenger-ui/src/pages/AnswerChallenge.tsx:385 +#, c-format +msgid "Check" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:72 +#, c-format +msgid "loading..." +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:85 +#, c-format +msgid "Couldn't get information about the validation process" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:117 +#, c-format +msgid "Too many request" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:127 +#, c-format +msgid "Server error" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:198 +#, c-format +msgid "Enter contact details" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:202 +#, c-format +msgid "" +"You will receive an email with a TAN code that must be provided on the next " +"page." +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:209 +#, c-format +msgid "" +"You will receive an SMS with a TAN code that must be provided on the next " +"page." +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:216 +#, c-format +msgid "" +"You will receive an message with a TAN code that must be provided on the " +"next page." +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:228 +#, c-format +msgid "A code has been sent to %1$s" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:229 +#, c-format +msgid "%1$s" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:231 +#, c-format +msgid "Complete the challenge here." +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:439 +#, c-format +msgid "Send email" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:442 +#, c-format +msgid "Send letter" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:444 +#, c-format +msgid "Send SMS" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:460 +#, c-format +msgid "Confirm email" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:461 +#, c-format +msgid "Change email" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:465 +#, c-format +msgid "Confirm address" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:466 +#, c-format +msgid "Change address" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:469 +#, c-format +msgid "Confirm phone" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:470 +#, c-format +msgid "Change phone" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:517 +#, c-format +msgid "Invalid field" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:557 +#, c-format +msgid "Email" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:585 +#, c-format +msgid "Phone" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:614 +#, c-format +msgid "Contact name" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:615 +#, c-format +msgid "Person full name or name of the business" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:633 +#, c-format +msgid "Address" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:649 +#, c-format +msgid "Country" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:679 +#, c-format +msgid "Your full name" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:696 +#, c-format +msgid "Swiss address" +msgstr "" + +#: packages/challenger-ui/src/pages/AskChallenge.tsx:697 +#, c-format +msgid "Make sure that this address is for Switzerland" +msgstr "" + +#: packages/challenger-ui/src/pages/CallengeCompleted.tsx:33 +#, c-format +msgid "Challenge completed" +msgstr "" + +#: packages/challenger-ui/src/pages/CallengeCompleted.tsx:36 +#, c-format +msgid "You will be redirected to %1$s" +msgstr "" + +#: packages/challenger-ui/src/context/preferences.ts:83 +#, c-format +msgid "Show challenger setup screen" +msgstr "" + +#: packages/challenger-ui/src/context/preferences.ts:85 +#, c-format +msgid "Show debug info" +msgstr "" + +#: packages/challenger-ui/src/pages/Frame.tsx:48 +#, c-format +msgid "Internal error, please report." +msgstr "" + +#: packages/challenger-ui/src/pages/Frame.tsx:75 +#, c-format +msgid "Preferences" +msgstr "" + +#: packages/challenger-ui/src/pages/Setup.tsx:60 +#, c-format +msgid "Required" +msgstr "" + +#: packages/challenger-ui/src/pages/Setup.tsx:64 +#, c-format +msgid "Invalid format" +msgstr "" + +#: packages/challenger-ui/src/pages/Setup.tsx:89 +#, c-format +msgid "" +"The server doesn't know about this client. Either the URL or the secret is " +"wrong." +msgstr "" + +#: packages/challenger-ui/src/pages/Setup.tsx:100 +#, c-format +msgid "Setup new challenge with client ID: &quot;%1$s&quot;" +msgstr "" + +#: packages/challenger-ui/src/pages/Setup.tsx:118 +#, c-format +msgid "Password" +msgstr "" + +#: packages/challenger-ui/src/pages/Setup.tsx:147 +#, c-format +msgid "Redirect URL" +msgstr "" + +#: packages/challenger-ui/src/pages/Setup.tsx:176 +#, c-format +msgid "Start" +msgstr "" + +#: packages/challenger-ui/src/Routing.tsx:135 +#, c-format +msgid "" +"The application needs to be loaded with 4 request parameters. One or more " +"are missing:" +msgstr "" + +#: packages/challenger-ui/src/Routing.tsx:156 +#, c-format +msgid "No nonce has been found" +msgstr "" + +#: packages/challenger-ui/src/pages/NonceNotFound.tsx:33 +#, c-format +msgid "The URL is wrong" +msgstr "" + +#: packages/challenger-ui/src/pages/NonceNotFound.tsx:36 +#, c-format +msgid "Maybe the validation check expired." +msgstr "" diff --git a/packages/challenger-ui/src/i18n/strings.ts b/packages/challenger-ui/src/i18n/strings.ts @@ -10,6 +10,268 @@ export interface StringsType { }; export const strings: Record<string,StringsType> = {}; +strings['es'] = { + "locale_data": { + "messages": { + "": { + "domain": "messages", + "plural_forms": "nplurals=2; plural=(n != 1);", + "lang": "de" + }, + "Bad request": [ + "" + ], + "Could not start the challenge, check configuration.": [ + "" + ], + "Not found": [ + "" + ], + "Nonce not found": [ + "" + ], + "Not acceptable": [ + "" + ], + "Server has wrong template configuration": [ + "" + ], + "Internal error": [ + "" + ], + "Check logs": [ + "" + ], + "Can't complete this challenge": [ + "" + ], + "There have been too many attempts to request challenge transmissions and check the TAN code.": [ + "" + ], + "Can't be empty": [ + "" + ], + "The request was not accepted, try reloading the app.": [ + "" + ], + "Challenge not found.": [ + "" + ], + "Server templates are missing due to misconfiguration.": [ + "" + ], + "There have been too many attempts to request challenge transmissions.": [ + "" + ], + "Server is unable to respond due to internal problems.": [ + "" + ], + "Invalid pin.": [ + "" + ], + "Last TAN code was sent to &quot;%1$s &quot; is not valid anymore.": [ + "" + ], + "A TAN code was sent to \"%1$s\"": [ + "" + ], + "You should wait until &quot; %1$s &quot; to send a new one.": [ + "" + ], + "Try with another address": [ + "" + ], + "You can&#39;t change the contact address anymore.": [ + "" + ], + "You can change the contact address one last time.": [ + "" + ], + "You can change the contact address %1$s more times.": [ + "" + ], + "Send new code": [ + "" + ], + "We can&#39;t send you the code anymore.": [ + "" + ], + "We can send the code one last time.": [ + "" + ], + "We can send the code %1$s more times.": [ + "" + ], + "Last TAN code can not be used.": [ + "" + ], + "Enter the TAN you received to authenticate.": [ + "" + ], + "You can&#39;t check the PIN anymore.": [ + "" + ], + "You can check the PIN one last time.": [ + "" + ], + "You can check the PIN %1$s more times.": [ + "" + ], + "TAN code": [ + "" + ], + "Check": [ + "" + ], + "loading...": [ + "" + ], + "Couldn't get information about the validation process": [ + "" + ], + "Too many request": [ + "" + ], + "Server error": [ + "" + ], + "Enter contact details": [ + "" + ], + "You will receive an email with a TAN code that must be provided on the next page.": [ + "" + ], + "You will receive an SMS with a TAN code that must be provided on the next page.": [ + "" + ], + "You will receive an message with a TAN code that must be provided on the next page.": [ + "" + ], + "A code has been sent to %1$s": [ + "" + ], + "%1$s": [ + "" + ], + "Complete the challenge here.": [ + "" + ], + "Send email": [ + "" + ], + "Send letter": [ + "" + ], + "Send SMS": [ + "" + ], + "Confirm email": [ + "" + ], + "Change email": [ + "" + ], + "Confirm address": [ + "" + ], + "Change address": [ + "" + ], + "Confirm phone": [ + "" + ], + "Change phone": [ + "" + ], + "Invalid field": [ + "" + ], + "Email": [ + "" + ], + "Phone": [ + "" + ], + "Contact name": [ + "" + ], + "Person full name or name of the business": [ + "" + ], + "Address": [ + "" + ], + "Country": [ + "" + ], + "Your full name": [ + "" + ], + "Swiss address": [ + "" + ], + "Make sure that this address is for Switzerland": [ + "" + ], + "Challenge completed": [ + "" + ], + "You will be redirected to %1$s": [ + "" + ], + "Show challenger setup screen": [ + "" + ], + "Show debug info": [ + "" + ], + "Internal error, please report.": [ + "" + ], + "Preferences": [ + "" + ], + "Required": [ + "" + ], + "Invalid format": [ + "" + ], + "The server doesn't know about this client. Either the URL or the secret is wrong.": [ + "" + ], + "Setup new challenge with client ID: &quot;%1$s&quot;": [ + "" + ], + "Password": [ + "" + ], + "Redirect URL": [ + "" + ], + "Start": [ + "" + ], + "The application needs to be loaded with 4 request parameters. One or more are missing:": [ + "" + ], + "No nonce has been found": [ + "" + ], + "The URL is wrong": [ + "" + ], + "Maybe the validation check expired.": [ + "" + ] + } + }, + "domain": "messages", + "plural_forms": "nplurals=2; plural=(n != 1);", + "lang": "de", + "completeness": 0 +}; + strings['de'] = { "locale_data": { "messages": { diff --git a/packages/web-util/src/forms/gana/accept-tos.ts b/packages/web-util/src/forms/gana/accept-tos.ts @@ -43,6 +43,9 @@ export type AcceptTermOfServiceContext = { tosVersion?: string; }; +function normalize(str:string) { + return str.replace(/ /g, "-") +} /** * * @param i18n @@ -54,7 +57,7 @@ export function acceptTos( context: AcceptTermOfServiceContext, ): SingleColumnFormDesign { const myFields: UIFormElementConfig[] = []; - + const tosFileName = ! context.provider_name ? "TermsOfService.pdf" : `${normalize(context.provider_name)}_TermsOfService.PDF`; if (context.link_only) { myFields.push({ type: "external-link", @@ -80,7 +83,7 @@ export function acceptTos( label: i18n.str`Download PDF version`, required: true, media: "application/pdf", - fileName: "TermsOfService.pdf", + fileName: tosFileName, help: i18n.str`You must download to proceed`, }, );