taler-typescript-core

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

commit 9c87ba93e3c02fd8a957eb4c031d1a92a511939f
parent 8a52af9d991252b3a3c8259194e96fb42023d5d3
Author: Sebastian <sebasjm@gmail.com>
Date:   Fri,  1 Aug 2025 16:04:23 +0200

fix #10231

Diffstat:
Mpackages/aml-backoffice-ui/src/pages/Search.tsx | 10+++++-----
Mpackages/bank-ui/src/pages/admin/CreateNewAccount.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/Routing.tsx | 3+--
Mpackages/merchant-backoffice-ui/src/components/ErrorLoadingMerchant.tsx | 4++--
Mpackages/merchant-backoffice-ui/src/components/form/InputPaytoForm.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/components/form/InputSearchOnList.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/components/form/InputStock.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/components/form/InputTaxes.tsx | 3+--
Mpackages/merchant-backoffice-ui/src/components/modal/index.tsx | 13+++++--------
Mpackages/merchant-backoffice-ui/src/components/product/NonInventoryProductForm.tsx | 4++--
Mpackages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/paths/admin/list/TableActive.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/paths/instance/accessTokens/create/CreatePage.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/paths/instance/accounts/create/CreatePage.tsx | 8++++----
Mpackages/merchant-backoffice-ui/src/paths/instance/accounts/list/index.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/paths/instance/accounts/update/UpdatePage.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/paths/instance/categories/create/CreatePage.tsx | 4++--
Mpackages/merchant-backoffice-ui/src/paths/instance/orders/create/CreatePage.tsx | 8++++----
Mpackages/merchant-backoffice-ui/src/paths/instance/orders/details/DetailPage.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/paths/instance/orders/list/Table.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/paths/instance/otp_devices/create/CreatePage.tsx | 8++++----
Mpackages/merchant-backoffice-ui/src/paths/instance/password/DetailPage.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/paths/instance/products/create/CreatePage.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/paths/instance/products/list/Table.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/paths/instance/products/update/UpdatePage.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/paths/instance/templates/create/CreatePage.tsx | 4++--
Mpackages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx | 6+-----
Mpackages/merchant-backoffice-ui/src/paths/instance/templates/update/UpdatePage.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/paths/instance/templates/use/UsePage.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/paths/instance/tokenfamilies/create/CreatePage.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/paths/instance/tokenfamilies/update/UpdatePage.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/paths/instance/transfers/create/CreatePage.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx | 2+-
Mpackages/merchant-backoffice-ui/src/paths/instance/webhooks/create/CreatePage.tsx | 8++++----
Mpackages/merchant-backoffice-ui/src/paths/instance/webhooks/update/UpdatePage.tsx | 4++--
Mpackages/merchant-backoffice-ui/src/paths/settings/index.tsx | 2+-
Mpackages/taler-wallet-webextension/src/cta/Payment/views.tsx | 5+++++
Mpackages/web-util/src/components/ErrorLoading.tsx | 4++--
39 files changed, 69 insertions(+), 73 deletions(-)

diff --git a/packages/aml-backoffice-ui/src/pages/Search.tsx b/packages/aml-backoffice-ui/src/pages/Search.tsx @@ -652,15 +652,15 @@ function validateIBAN( } switch (result.code) { case IbanError.TOO_LONG: - return i18n.str`IBAN numbers usually have less that 34 digits`; + return i18n.str`IBANs usually have fewer than 34 digits.`; case IbanError.TOO_SHORT: - return i18n.str`IBAN numbers usually have more that 4 digits`; + return i18n.str`IBANs usually have more than 4 digits.`; case IbanError.INVALID_CHARSET: - return i18n.str`IBAN number is invalid, should only contain numbers and letters`; + return i18n.str`The IBAN is invalid because it should only contain numbers and letters.`; case IbanError.INVALID_COUNTRY: - return i18n.str`Unsupported country`; + return i18n.str`Unsupported country.`; case IbanError.INVALID_CHECKSUM: - return i18n.str`IBAN number is invalid, checksum is wrong`; + return i18n.str`The IBAN is invalid because the checksum is wrong.`; default: { assertUnreachable(result.code); } diff --git a/packages/bank-ui/src/pages/admin/CreateNewAccount.tsx b/packages/bank-ui/src/pages/admin/CreateNewAccount.tsx @@ -95,7 +95,7 @@ export function CreateNewAccount({ case TalerErrorCode.BANK_REGISTER_PAYTO_URI_REUSE: return notify({ type: "error", - title: i18n.str`Account id is already taken`, + title: i18n.str`Account ID is already taken`, description: resp.detail?.hint as TranslatedString, debug: resp.detail, when: AbsoluteTime.now(), diff --git a/packages/merchant-backoffice-ui/src/Routing.tsx b/packages/merchant-backoffice-ui/src/Routing.tsx @@ -782,8 +782,7 @@ function KycBanner(): VNode { <div> <p> <i18n.Translate> - Some transfers are on hold until the KYC process is completed. - Visit the KYC section in the left panel for more information + Some transfers are on hold until the KYC process is completed. Visit the KYC section in the left-hand menu for more information. </i18n.Translate> </p> <div class="buttons is-right"> diff --git a/packages/merchant-backoffice-ui/src/components/ErrorLoadingMerchant.tsx b/packages/merchant-backoffice-ui/src/components/ErrorLoadingMerchant.tsx @@ -104,7 +104,7 @@ export function ErrorLoadingMerchant({ <NotificationCard notification={{ type: "ERROR", - message: i18n.str`A lot of request were made to the same server and this action was throttled.`, + message: i18n.str`Too many requests were made to the server, and this action was throttled.`, description: error.message, details: JSON.stringify( { requestMethod, requestUrl, throttleStats }, @@ -127,7 +127,7 @@ export function ErrorLoadingMerchant({ <NotificationCard notification={{ type: "ERROR", - message: i18n.str`The response of the request is malformed.`, + message: i18n.str`The server's response was malformed.`, description: error.message, details: JSON.stringify( { requestMethod, requestUrl, httpStatusCode, validationError }, diff --git a/packages/merchant-backoffice-ui/src/components/form/InputPaytoForm.tsx b/packages/merchant-backoffice-ui/src/components/form/InputPaytoForm.tsx @@ -84,7 +84,7 @@ function validateBitcoin_path1( } catch (e) { console.log(e); } - return i18n.str`This is not a valid bitcoin address.`; + return i18n.str`This is not a valid Bitcoin address.`; } function validateEthereum_path1( diff --git a/packages/merchant-backoffice-ui/src/components/form/InputSearchOnList.tsx b/packages/merchant-backoffice-ui/src/components/form/InputSearchOnList.tsx @@ -169,7 +169,7 @@ export function DropdownList<T extends Entity>({ {!filtered.length ? ( <div class="dropdown-item"> <i18n.Translate> - no match found with that description or id + No match found for that description or ID. </i18n.Translate> </div> ) : ( diff --git a/packages/merchant-backoffice-ui/src/components/form/InputStock.tsx b/packages/merchant-backoffice-ui/src/components/form/InputStock.tsx @@ -96,7 +96,7 @@ export function InputStock<T>({ {!alreadyExist ? ( <button class="button" - data-tooltip={i18n.str`Click here to configure the stock of the product, leave it as is and the backend will not control stock.`} + data-tooltip={i18n.str`Click here to configure the product's stock. If left as is, the backend will not control stock.`} onClick={(): void => { valueHandler({ current: 0, diff --git a/packages/merchant-backoffice-ui/src/components/form/InputTaxes.tsx b/packages/merchant-backoffice-ui/src/components/form/InputTaxes.tsx @@ -110,8 +110,7 @@ export function InputTaxes<T>({ name, label }: Props<keyof T>): VNode { tooltip={i18n.str`Taxes can be in currencies that differ from the main currency used by the merchant.`} > <i18n.Translate> - Enter currency and value separated with a colon, e.g. - &quot;USD:2.3&quot;. + Enter the currency and value separated by a colon (e.g., &quot;USD:2.3&quot;). </i18n.Translate> </Input> diff --git a/packages/merchant-backoffice-ui/src/components/modal/index.tsx b/packages/merchant-backoffice-ui/src/components/modal/index.tsx @@ -353,8 +353,7 @@ export function CompareAccountsModal({ > <p> <i18n.Translate> - Testing against the account info URL succeeded but the account - information reported is different with the account details form. + The connection to the account info URL was successful, but the reported account information does not match the details in the form. </i18n.Translate> </p> <div class="table-container"> @@ -409,7 +408,7 @@ export function CompareAccountsModal({ </tr> <tr> <td> - <i18n.Translate>Account id</i18n.Translate> + <i18n.Translate>Account ID</i18n.Translate> </td> <td> {getAccountIdFromHostPath(formPayto?.targetPath) ?? "--"} @@ -524,8 +523,7 @@ export function ValidBankAccount({ <i18n.Translate>Step 1:</i18n.Translate> &nbsp; <i18n.Translate> - Copy this string and paste it into the field 'Subject' (resp. - 'Purpose') in your banking app or bank website + Copy this string and paste it into the 'Subject' or 'Purpose' field in your banking app or on your bank's website. </i18n.Translate> </td> </tr> @@ -536,8 +534,7 @@ export function ValidBankAccount({ <i18n.Translate>Step 2:</i18n.Translate> &nbsp; <i18n.Translate> - Copy and paste this IBAN and the name into the receiver fields - in your banking app or website + Copy and paste this IBAN and receiver information into the recipient fields in your banking app or on your website. </i18n.Translate> </td> </tr> @@ -1005,7 +1002,7 @@ export function LoadingModal({ onCancel }: { onCancel: () => void }): VNode { <Spinner /> <div class="column" /> </div> - <p>{i18n.str`The operation will be automatically canceled after ${DEFAULT_REQUEST_TIMEOUT} seconds`}</p> + <p>{i18n.str`The operation will be automatically cancelled after ${DEFAULT_REQUEST_TIMEOUT} seconds`}</p> </section> <footer class="modal-card-foot"> <div class="buttons is-right" style={{ width: "100%" }}> diff --git a/packages/merchant-backoffice-ui/src/components/product/NonInventoryProductForm.tsx b/packages/merchant-backoffice-ui/src/components/product/NonInventoryProductForm.tsx @@ -152,9 +152,9 @@ export function ProductForm({ onSubscribe, initial }: ProductProps): VNode { value.quantity === undefined ? i18n.str`Required` : typeof value.quantity !== "number" - ? i18n.str`Must be a number` + ? i18n.str`Must be a number.` : value.quantity < 1 - ? i18n.str`Must be grater than 0` + ? i18n.str`Must be greater than 0.` : undefined, description: !value.description ? i18n.str`Required` : undefined, unit: !value.unit ? i18n.str`Required` : undefined, diff --git a/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx @@ -223,7 +223,7 @@ export function CreatePage({ onCreate, onBack, forceId }: Props): VNode { disabled={hasErrors || !hasTokenErrors} data-tooltip={ hasErrors - ? i18n.str`Need to complete marked fields and choose authorization method` + ? i18n.str`Please complete the marked fields and choose authorization method` : i18n.str`Confirm operation` } > diff --git a/packages/merchant-backoffice-ui/src/paths/admin/list/TableActive.tsx b/packages/merchant-backoffice-ui/src/paths/admin/list/TableActive.tsx @@ -278,7 +278,7 @@ function EmptyTable(): VNode { </p> <p> <i18n.Translate> - There are no instances yet, add more pressing the + sign + There are no instances yet. Add one by pressing the '+' sign. </i18n.Translate> </p> </div> diff --git a/packages/merchant-backoffice-ui/src/paths/instance/accessTokens/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/accessTokens/create/CreatePage.tsx @@ -162,7 +162,7 @@ export function CreatePage({ onCreate, onBack }: Props): VNode { disabled={hasErrors} data-tooltip={ hasErrors - ? i18n.str`Need to complete marked fields` + ? i18n.str`Please complete the marked fields` : i18n.str`Confirm operation` } onClick={submitForm} diff --git a/packages/merchant-backoffice-ui/src/paths/instance/accounts/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/accounts/create/CreatePage.tsx @@ -287,7 +287,7 @@ export function CreatePage({ onCreate, onBack }: Props): VNode { ) : undefined} <InputToggle<Entity> label={i18n.str`Match`} - tooltip={i18n.str`Check where the information match against the server info.`} + tooltip={i18n.str`Check if the information matches the server info.`} name="verified" readonly threeState @@ -297,8 +297,8 @@ export function CreatePage({ onCreate, onBack }: Props): VNode { : state.verified === undefined ? i18n.str`Not verified` : state.verified - ? i18n.str`Last test was ok` - : i18n.str`Last test failed` + ? i18n.str`Last test was successful.` + : i18n.str`Last test failed.` } side={ <button @@ -334,7 +334,7 @@ export function CreatePage({ onCreate, onBack }: Props): VNode { disabled={hasErrors} data-tooltip={ hasErrors - ? i18n.str`Need to complete marked fields` + ? i18n.str`Please complete the marked fields` : i18n.str`Confirm operation` } onClick={submitForm} diff --git a/packages/merchant-backoffice-ui/src/paths/instance/accounts/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/accounts/list/index.tsx @@ -75,7 +75,7 @@ export default function ListOtpDevices({ onCreate, onSelect }: Props): VNode { notification={{ type: "WARN", message: i18n.str`You need to associate a bank account to receive revenue.`, - description: i18n.str`Without this the you won't be able to create new orders.`, + description: i18n.str`Without this, you won't be able to create new orders.`, }} /> )} diff --git a/packages/merchant-backoffice-ui/src/paths/instance/accounts/update/UpdatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/accounts/update/UpdatePage.tsx @@ -389,7 +389,7 @@ export function UpdatePage({ disabled={hasErrors} data-tooltip={ hasErrors - ? i18n.str`Need to complete marked fields` + ? i18n.str`Please complete the marked fields` : i18n.str`Confirm operation` } onClick={submitForm} diff --git a/packages/merchant-backoffice-ui/src/paths/instance/categories/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/categories/create/CreatePage.tsx @@ -47,7 +47,7 @@ export function CreatePage({ onCreate, onBack }: Props): VNode { name: !state.name ? i18n.str`Required` : !/[a-zA-Z0-9]*/.test(state.name) - ? i18n.str`Invalid. Please insert only characters and numbers` + ? i18n.str`Invalid. Please use only letters and numbers.` : undefined, }); @@ -86,7 +86,7 @@ export function CreatePage({ onCreate, onBack }: Props): VNode { disabled={hasErrors} data-tooltip={ hasErrors - ? i18n.str`Need to complete marked fields` + ? i18n.str`Please complete the marked fields` : i18n.str`Confirm operation` } onClick={submitForm} diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/create/CreatePage.tsx @@ -181,7 +181,7 @@ export function CreatePage({ value.payments.refund_deadline, value.payments.pay_deadline, ) === -1 - ? i18n.str`Refund deadline can't be before pay deadline` + ? i18n.str`The refund deadline cannot be earlier than the payment deadline.` : value.payments.wire_transfer_deadline && Duration.cmp( value.payments.wire_transfer_deadline, @@ -563,7 +563,7 @@ export function CreatePage({ } withForever withoutClear - tooltip={i18n.str`Time for the customer to pay for the offer before it expires. Inventory products will be reserved until this deadline. Time start to run after the order is created.`} + tooltip={i18n.str`Time for the customer to pay before the offer expires. Inventory products will be reserved until this deadline. The time starts after the order is created.`} side={ <span> <button @@ -684,7 +684,7 @@ export function CreatePage({ <InputToggle name="payments.createToken" label={i18n.str`Create token`} - tooltip={i18n.str`If the order ID is easy to guess the token will prevent users to steal orders from others.`} + tooltip={i18n.str`If the order ID is easy to guess, the token will prevent other users from claiming the order.`} /> )} {(pref.advanceOrderMode || @@ -695,7 +695,7 @@ export function CreatePage({ tooltip={i18n.str`Any value greater than 0 will limit the coins able be used to pay this contract. If empty the age restriction will be defined by the products`} help={ minAgeByProducts > 0 - ? i18n.str`Min age defined by the products is ${minAgeByProducts}` + ? i18n.str`Minimum age defined by the products is ${minAgeByProducts}` : i18n.str`No product with age restriction in this order` } /> diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/details/DetailPage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/details/DetailPage.tsx @@ -106,7 +106,7 @@ function ContractTerms({ value }: { value: CT }) { readonly name="refund_deadline" label={i18n.str`Refund deadline`} - tooltip={i18n.str`After this deadline has passed no refunds will be accepted`} + tooltip={i18n.str`After this deadline has passed, no refunds will be accepted.`} /> <InputDate<CT> readonly diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/list/Table.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/list/Table.tsx @@ -301,7 +301,7 @@ export function RefundModal({ : !Amounts.parse(form.refund) ? i18n.str`Invalid` : Amounts.cmp(totalRefundable, Amounts.parse(form.refund)!) === -1 - ? i18n.str`This value exceed the refundable amount` + ? i18n.str`This value exceeds the refundable amount.` : undefined, }; const hasErrors = Object.keys(errors).some( diff --git a/packages/merchant-backoffice-ui/src/paths/instance/otp_devices/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/otp_devices/create/CreatePage.tsx @@ -58,7 +58,7 @@ export function CreatePage({ onCreate, onBack }: Props): VNode { otp_device_id: !state.otp_device_id ? i18n.str`Required` : !/[a-zA-Z0-9]*/.test(state.otp_device_id) - ? i18n.str`Invalid. Please enter characters and numbers only` + ? i18n.str`Invalid. Please enter letters and numbers only.` : undefined, otp_algorithm: !state.otp_algorithm ? i18n.str`Required` : undefined, otp_key: !state.otp_key @@ -71,7 +71,7 @@ export function CreatePage({ onCreate, onBack }: Props): VNode { otp_device_description: !state.otp_device_description ? i18n.str`Required` : !/[a-zA-Z0-9]*/.test(state.otp_device_description) - ? i18n.str`Invalid. Please enter characters and numbers only` + ? i18n.str`Invalid. Please enter letters and numbers only.` : undefined, }); @@ -118,7 +118,7 @@ export function CreatePage({ onCreate, onBack }: Props): VNode { name="otp_key" label={i18n.str`Device key`} inputType={showKey ? "text" : "password"} - help={i18n.str`Be sure to choose a password hard to guess, alternatively use the random generator`} + help={i18n.str`Be sure to choose a password that is hard to guess, or use the random generator.`} tooltip={i18n.str`Your device needs to match exactly the same value`} fromStr={(v) => v.toUpperCase()} addonAfterAction={() => { @@ -163,7 +163,7 @@ export function CreatePage({ onCreate, onBack }: Props): VNode { disabled={hasErrors} data-tooltip={ hasErrors - ? i18n.str`Need to complete marked fields` + ? i18n.str`Please complete the marked fields` : i18n.str`Confirm operation` } onClick={submitForm} diff --git a/packages/merchant-backoffice-ui/src/paths/instance/password/DetailPage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/password/DetailPage.tsx @@ -136,7 +136,7 @@ export function DetailPage({ disabled={hasErrors} data-tooltip={ hasErrors - ? i18n.str`Need to complete marked fields` + ? i18n.str`Please complete the marked fields` : i18n.str`Confirm operation` } onClick={submitForm} diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/create/CreatePage.tsx @@ -63,7 +63,7 @@ export function CreatePage({ onCreate, onBack }: Props): VNode { onClick={submitForm} data-tooltip={ !submitForm - ? i18n.str`Need to complete marked fields` + ? i18n.str`Please complete the marked fields` : "confirm operation" } disabled={!submitForm} diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/list/Table.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/list/Table.tsx @@ -480,7 +480,7 @@ function FastProductWithManagedStockUpdateForm({ class="has-tooltip-left" data-tooltip={ hasErrors - ? i18n.str`The are value with errors` + ? i18n.str`There are values with errors.` : i18n.str`Update product with new stock and price` } > diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx @@ -171,7 +171,7 @@ export default function ProductList({ onCreate, onSelect }: Props): VNode { </p> <p class="warning"> <i18n.Translate> - Deleting an product can't be undone. + Deleting a product cannot be undone. </i18n.Translate> </p> </ConfirmModal> diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/update/UpdatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/update/UpdatePage.tsx @@ -82,7 +82,7 @@ export function UpdatePage({ product, onUpdate, onBack }: Props): VNode { onClick={submitForm} data-tooltip={ !submitForm - ? i18n.str`Need to complete marked fields` + ? i18n.str`Please complete the marked fields` : "confirm operation" } disabled={!submitForm} diff --git a/packages/merchant-backoffice-ui/src/paths/instance/templates/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/templates/create/CreatePage.tsx @@ -93,7 +93,7 @@ export function CreatePage({ onCreate, onBack }: Props): VNode { id: !state.id ? i18n.str`Required` : !/[a-zA-Z0-9]*/.test(state.id) - ? i18n.str`Invalid. Please enter characters and numbers only` + ? i18n.str`Invalid. Please enter letters and numbers only.` : undefined, description: !state.description ? i18n.str`Required` : undefined, amount: !state.amount @@ -288,7 +288,7 @@ export function CreatePage({ onCreate, onBack }: Props): VNode { disabled={hasErrors} data-tooltip={ hasErrors - ? i18n.str`Need to complete marked fields` + ? i18n.str`Please complete the marked fields` : i18n.str`Confirm operation` } onClick={submitForm} diff --git a/packages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx @@ -157,11 +157,7 @@ export default function ListTemplates({ </i18n.Translate> </p> <p class="warning"> - <i18n.Translate>Deleting an template </i18n.Translate> - <b> - <i18n.Translate>can't be undone</i18n.Translate> - </b> - . + <i18n.Translate>Deleting a template cannot be undone.</i18n.Translate> </p> </ConfirmModal> )} diff --git a/packages/merchant-backoffice-ui/src/paths/instance/templates/update/UpdatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/templates/update/UpdatePage.tsx @@ -366,7 +366,7 @@ export function UpdatePage({ template, onUpdate, onBack }: Props): VNode { disabled={hasErrors} data-tooltip={ hasErrors - ? i18n.str`Need to complete marked fields` + ? i18n.str`Please complete the marked fields` : i18n.str`Confirm operation` } onClick={submitForm} diff --git a/packages/merchant-backoffice-ui/src/paths/instance/templates/use/UsePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/templates/use/UsePage.tsx @@ -137,7 +137,7 @@ export function UsePage({ id, template, onCreateOrder, onBack }: Props): VNode { disabled={hasErrors} data-tooltip={ hasErrors - ? i18n.str`Need to complete marked fields` + ? i18n.str`Please complete the marked fields` : "confirm operation" } onClick={submitForm} diff --git a/packages/merchant-backoffice-ui/src/paths/instance/tokenfamilies/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/tokenfamilies/create/CreatePage.tsx @@ -63,7 +63,7 @@ export function CreatePage({ onCreate, onBack }: Props): VNode { onClick={submitForm} data-tooltip={ !submitForm - ? i18n.str`Need to complete marked fields` + ? i18n.str`Please complete the marked fields` : "confirm operation" } disabled={!submitForm} diff --git a/packages/merchant-backoffice-ui/src/paths/instance/tokenfamilies/update/UpdatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/tokenfamilies/update/UpdatePage.tsx @@ -128,7 +128,7 @@ export function UpdatePage({ onUpdate, onBack, tokenFamily }: Props) { disabled={hasErrors} data-tooltip={ hasErrors - ? i18n.str`Need to complete marked fields` + ? i18n.str`Please complete the marked fields` : i18n.str`Confirm operation` } onClick={submitForm} diff --git a/packages/merchant-backoffice-ui/src/paths/instance/transfers/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/transfers/create/CreatePage.tsx @@ -126,7 +126,7 @@ export function CreatePage({ accounts, onCreate, onBack }: Props): VNode { disabled={hasErrors} data-tooltip={ hasErrors - ? i18n.str`Need to complete marked fields` + ? i18n.str`Please complete the marked fields` : i18n.str`Confirm operation` } onClick={submitForm} diff --git a/packages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx @@ -156,7 +156,7 @@ export function UpdatePage({ onClick={submit} data-tooltip={ hasErrors - ? i18n.str`Need to complete marked fields` + ? i18n.str`Please complete the marked fields` : i18n.str`Confirm operation` } disabled={hasErrors} diff --git a/packages/merchant-backoffice-ui/src/paths/instance/webhooks/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/webhooks/create/CreatePage.tsx @@ -169,9 +169,9 @@ export function CreatePage({ onCreate, onBack }: Props): VNode { {/* prettier will add some nodes which we don't want because of i18n */} {/* prettier-ignore */} <i18n.Translate> - For example <pre style={{ display: "inline", padding: 0 }}> + For example, <pre style={{ display: "inline", padding: 0 }}> &#123;&#123;contract_terms.amount&#125;&#125; - </pre> will be replaced with the the order's price + </pre> will be replaced with the the order's price. </i18n.Translate> </p> <p> @@ -233,7 +233,7 @@ export function CreatePage({ onCreate, onBack }: Props): VNode { name="body_template" inputType="multiline" label={i18n.str`Http body`} - tooltip={i18n.str`Body template by the webhook`} + tooltip={i18n.str`Body template used by the webhook.`} /> </FormProvider> @@ -247,7 +247,7 @@ export function CreatePage({ onCreate, onBack }: Props): VNode { disabled={hasErrors} data-tooltip={ hasErrors - ? i18n.str`Need to complete marked fields` + ? i18n.str`Please complete the marked fields` : i18n.str`Confirm operation` } onClick={submitForm} diff --git a/packages/merchant-backoffice-ui/src/paths/instance/webhooks/update/UpdatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/webhooks/update/UpdatePage.tsx @@ -176,7 +176,7 @@ export function UpdatePage({ webhook, onUpdate, onBack }: Props): VNode { name="body_template" inputType="multiline" label={i18n.str`Body`} - tooltip={i18n.str`Body template by the webhook`} + tooltip={i18n.str`Body template used by the webhook`} /> </FormProvider> @@ -190,7 +190,7 @@ export function UpdatePage({ webhook, onUpdate, onBack }: Props): VNode { disabled={hasErrors} data-tooltip={ hasErrors - ? i18n.str`Need to complete marked fields` + ? i18n.str`Please complete the marked fields` : i18n.str`Confirm operation` } onClick={submitForm} diff --git a/packages/merchant-backoffice-ui/src/paths/settings/index.tsx b/packages/merchant-backoffice-ui/src/paths/settings/index.tsx @@ -119,7 +119,7 @@ export function Settings({ onClose }: { onClose?: () => void }): VNode { /> <InputToggle<Preferences> label={i18n.str`Developer mode`} - tooltip={i18n.str`Shows more options and tools which are not intended for general audience.`} + tooltip={i18n.str`Shows more options and tools that are not intended for a general audience.`} name="developerMode" /> </FormProvider> diff --git a/packages/taler-wallet-webextension/src/cta/Payment/views.tsx b/packages/taler-wallet-webextension/src/cta/Payment/views.tsx @@ -62,10 +62,14 @@ export function BaseView(state: SupportedStates): VNode { AbsoluteTime.now(), Duration.fromSpec({ minutes: 5 }), ); + const willExpireSoon = !expiration || expiration.t_ms === "never" ? undefined : AbsoluteTime.cmp(expiration, inFiveMinutes) === -1; + + const choices = contractTerms.version && contractTerms.version === 1 ? contractTerms.choices : []; + // choices[0].inputs[0].type === return ( <Fragment> <ShowImportantMessage state={state} /> @@ -111,6 +115,7 @@ export function BaseView(state: SupportedStates): VNode { /> </section> </EnabledBySettings> + <PaymentButtons amount={effective} payStatus={state.payStatus} diff --git a/packages/web-util/src/components/ErrorLoading.tsx b/packages/web-util/src/components/ErrorLoading.tsx @@ -71,7 +71,7 @@ export function ErrorLoading({ error, showDetail }: { error: TalerError, showDet case TalerErrorCode.WALLET_HTTP_REQUEST_THROTTLED: { if (error.hasErrorCode(TalerErrorCode.WALLET_HTTP_REQUEST_THROTTLED)) { const { requestMethod, requestUrl, throttleStats } = error.errorDetail - return <Attention type="danger" title={i18n.str`A lot of request were made to the same server and this action was throttled`}> + return <Attention type="danger" title={i18n.str`Too many requests were made to the server, and this action was throttled.`}> {error.message} {showDetail && <pre class="whitespace-break-spaces "> @@ -85,7 +85,7 @@ export function ErrorLoading({ error, showDetail }: { error: TalerError, showDet case TalerErrorCode.WALLET_RECEIVED_MALFORMED_RESPONSE: { if (error.hasErrorCode(TalerErrorCode.WALLET_RECEIVED_MALFORMED_RESPONSE)) { const { requestMethod, requestUrl, httpStatusCode, validationError } = error.errorDetail - return <Attention type="danger" title={i18n.str`The response of the request is malformed.`}> + return <Attention type="danger" title={i18n.str`The server's response was malformed.`}> {error.message} {showDetail && <pre class="whitespace-break-spaces ">