commit 9a206aed32d3eae48ecbd6f2863afac70c9e43dc parent 5b5185c88e8063980e40eca0d82f7b743e99e44c Author: Florian Dold <florian@dold.me> Date: Wed, 28 Jan 2026 22:23:47 +0100 formatting, improve some strings String review via Gemini 3. Diffstat:
15 files changed, 82 insertions(+), 45 deletions(-)
diff --git a/packages/bank-ui/src/pages/admin/AccountForm.tsx b/packages/bank-ui/src/pages/admin/AccountForm.tsx @@ -189,7 +189,7 @@ export function AccountForm<PurposeType extends keyof ChangeByPurposeType>({ email: !newForm.email ? undefined : !EMAIL_REGEX.test(newForm.email) - ? i18n.str`Doesn't have the pattern of an email` + ? i18n.str`Invalid email format` : undefined, phone: !newForm.phone ? undefined diff --git a/packages/merchant-backoffice-ui/src/Routing.tsx b/packages/merchant-backoffice-ui/src/Routing.tsx @@ -50,6 +50,8 @@ import BankAccountUpdatePage from "./paths/instance/accounts/update/index.js"; import CreateCategory from "./paths/instance/categories/create/index.js"; import ListCategories from "./paths/instance/categories/list/index.js"; import UpdateCategory from "./paths/instance/categories/update/index.js"; +import CreateProductGroup from "./paths/instance/groups/create/index.js"; +import ListProductGroups from "./paths/instance/groups/list/index.js"; import ListKYCPage from "./paths/instance/kyc/list/index.js"; import OrderCreatePage from "./paths/instance/orders/create/index.js"; import OrderDetailsPage from "./paths/instance/orders/details/index.js"; @@ -63,9 +65,15 @@ import PasswordPage, { AdminPassword as InstanceAdminTokenPage, Props as InstanceAdminTokenProps, } from "./paths/instance/password/index.js"; +import CreateMoneyPots from "./paths/instance/pots/create/index.js"; +import ListMoneyPots from "./paths/instance/pots/list/index.js"; +import UpdateMoneyPots from "./paths/instance/pots/update/index.js"; import ProductCreatePage from "./paths/instance/products/create/index.js"; import ProductListPage from "./paths/instance/products/list/index.js"; import ProductUpdatePage from "./paths/instance/products/update/index.js"; +import CreateScheduledReport from "./paths/instance/reports/create/index.js"; +import ListScheduledReport from "./paths/instance/reports/list/index.js"; +import UpdateScheduledReport from "./paths/instance/reports/update/index.js"; import Statistics from "./paths/instance/statistics/list/index.js"; import TemplateCreatePage from "./paths/instance/templates/create/index.js"; import TemplateListPage from "./paths/instance/templates/list/index.js"; @@ -88,14 +96,6 @@ import { NewAccount } from "./paths/newAccount/index.js"; import { ResetAccount } from "./paths/resetAccount/index.js"; import { Settings } from "./paths/settings/index.js"; import { Notification } from "./utils/types.js"; -import ListMoneyPots from "./paths/instance/pots/list/index.js"; -import UpdateMoneyPots from "./paths/instance/pots/update/index.js"; -import CreateMoneyPots from "./paths/instance/pots/create/index.js"; -import ListProductGroups from "./paths/instance/groups/list/index.js"; -import CreateProductGroup from "./paths/instance/groups/create/index.js"; -import ListScheduledReport from "./paths/instance/reports/list/index.js"; -import UpdateScheduledReport from "./paths/instance/reports/update/index.js"; -import CreateScheduledReport from "./paths/instance/reports/create/index.js"; const TALER_SCREEN_ID = 3; @@ -301,7 +301,7 @@ export function Routing(_p: Props): VNode { description: ( <Fragment> <i18n.Translate> - The application is in a unexpected state and can't recover + The application is in an unexpected state and can't recover from here. You can report the problem to the developers at{" "} <a href="https://bugs.gnunet.org/" diff --git a/packages/merchant-backoffice-ui/src/components/SolveMFA.tsx b/packages/merchant-backoffice-ui/src/components/SolveMFA.tsx @@ -103,7 +103,7 @@ function SolveChallenge({ case TalerErrorCode.MERCHANT_TAN_CHALLENGE_FAILED: return i18n.str`The code is not correct.`; case TalerErrorCode.MERCHANT_TAN_CHALLENGE_UNKNOWN: - return i18n.str`The challenge is not known anymore.`; + return i18n.str`The challenge is no longer valid.`; case TalerErrorCode.MERCHANT_TAN_TOO_MANY_ATTEMPTS: return i18n.str`Too many attempts trying to solve the challenge.`; default: @@ -344,7 +344,7 @@ export function SolveMFAChallenges({ > {currentChallenge.combi_and ? ( <i18n.Translate> - You need to complete all of this requirements. + You must complete all of these requirements. </i18n.Translate> ) : ( <i18n.Translate> diff --git a/packages/merchant-backoffice-ui/src/components/form/InputPaytoForm.tsx b/packages/merchant-backoffice-ui/src/components/form/InputPaytoForm.tsx @@ -316,8 +316,8 @@ export function InputPaytoForm<T>({ if (!targets.length) { return ( <i18n.Translate> - None of the supported wire method of the server are currently supported - by this app. Server settings: {supportedWireMethods?.join(",") ?? "-"} + None of the server's supported wire methods are currently supported by + this app. Server settings: {supportedWireMethods?.join(",") ?? "-"} </i18n.Translate> ); } diff --git a/packages/merchant-backoffice-ui/src/components/instance/DefaultInstanceFormFields.tsx b/packages/merchant-backoffice-ui/src/components/instance/DefaultInstanceFormFields.tsx @@ -112,7 +112,7 @@ export function DefaultInstanceFormFields({ <InputGroup label={i18n.str`Default cut-off times`} - tooltip={i18n.str`These will be the values are going to be used if are not overriden in the order creation.`} + tooltip={i18n.str`These values will be used if they are not overridden during order creation.`} name="" > <InputDuration<Entity> @@ -139,7 +139,7 @@ export function DefaultInstanceFormFields({ <InputSelector<Entity> name="default_wire_transfer_rounding_interval" label={i18n.str`Wire transfer rounding`} - tooltip={i18n.str`Interval to which wire deadlines should be rounded up to.`} + tooltip={i18n.str`Rounding interval for wire deadlines.`} help={i18n.str`As an example if you set the interval to day the wire transfer deadline will be rounded to midnight.`} values={[ RoundingInterval.DAY, diff --git a/packages/merchant-backoffice-ui/src/components/modal/index.tsx b/packages/merchant-backoffice-ui/src/components/modal/index.tsx @@ -277,7 +277,7 @@ export function CompareAccountsModal({ const { i18n } = useTranslationContext(); return ( <ConfirmModal - label={i18n.str`Correct form`} + label={i18n.str`Correct the form`} description={i18n.str`Comparing account details`} active onCancel={onCancel} diff --git a/packages/merchant-backoffice-ui/src/components/product/InventoryProductForm.tsx b/packages/merchant-backoffice-ui/src/components/product/InventoryProductForm.tsx @@ -64,7 +64,7 @@ export function InventoryProductForm({ onAddProduct(state.product, 1); } else { if (!state.quantity || state.quantity <= 0) { - setErrors({ quantity: i18n.str`Quantity must be greater than 0!` }); + setErrors({ quantity: i18n.str`Quantity must be greater than zero.` }); return; } const currentStock = 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 @@ -311,7 +311,7 @@ export function CreatePage({ onCreated, onBack }: Props): VNode { <ButtonBetterBulma class="button is-info" type="button" - data-tooltip={i18n.str`Compare info from server with account form`} + data-tooltip={i18n.str`Verify details with server`} onClick={test} > <i18n.Translate>Test</i18n.Translate> diff --git a/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/ListPage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/ListPage.tsx @@ -161,7 +161,7 @@ function PendingTable({ .AWAITING_AML_REVIEW: return ( <i18n.Translate> - Awaiting for account review. + Awaiting account review. </i18n.Translate> ); case TalerMerchantApi.MerchantAccountKycStatus.READY: 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 @@ -219,7 +219,7 @@ export function CreatePage({ ? i18n.str`Either fulfillment url or fulfillment message must be specified.` : !!value.shipping?.fulfillment_url && isInvalidUrl(value.shipping.fulfillment_url) - ? i18n.str`is not a valid URL` + ? i18n.str`Invalid URL` : undefined, }), }); 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 @@ -529,14 +529,14 @@ function PaidPage({ if (orderAmounts === "v1-without-index") { return ( <i18n.Translate> - The contract terms has a v1 order without choices_index. + The contract terms have a v1 order without choices_index. </i18n.Translate> ); } if (orderAmounts === "v1-wrong-index") { return ( <i18n.Translate> - The contract terms has a v1 order with a bad choices_index. + The contract terms have a v1 order with a bad choices_index. </i18n.Translate> ); } diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/details/Timeline.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/details/Timeline.tsx @@ -13,10 +13,7 @@ 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/> */ -import { - assertUnreachable, - TranslatedString -} from "@gnu-taler/taler-util"; +import { assertUnreachable, TranslatedString } from "@gnu-taler/taler-util"; import { useTranslationContext } from "@gnu-taler/web-util/browser"; import { format } from "date-fns"; import { h } from "preact"; @@ -65,19 +62,28 @@ export function Timeline({ events: e }: Props) { switch (e.type) { case "refund-deadline": return ( - <div class="timeline-marker is-icon " data-tooltip={i18n.str`This is when the time for making refund has been expired.`}> + <div + class="timeline-marker is-icon " + data-tooltip={i18n.str`This is when the refund period has expired.`} + > <i class="mdi mdi-flag" /> </div> ); case "pay-deadline": return ( - <div class="timeline-marker is-icon " data-tooltip={i18n.str`This is when the time for making the payment has been expired.`}> + <div + class="timeline-marker is-icon " + data-tooltip={i18n.str`This is when the time for making the payment has been expired.`} + > <i class="mdi mdi-flag" /> </div> ); case "wire-deadline": return ( - <div class="timeline-marker is-icon " data-tooltip={i18n.str`This is when the wire transfer is going to be executed by the payment service provider.`}> + <div + class="timeline-marker is-icon " + data-tooltip={i18n.str`This is when the wire transfer is going to be executed by the payment service provider.`} + > <i class="mdi mdi-flag" /> </div> ); @@ -95,37 +101,55 @@ export function Timeline({ events: e }: Props) { ); case "wired-pending": return ( - <div class="timeline-marker is-icon is-warning" data-tooltip={i18n.str`This is when the wire transfer is going to be executed by the payment service provider.`}> + <div + class="timeline-marker is-icon is-warning" + data-tooltip={i18n.str`This is when the wire transfer is going to be executed by the payment service provider.`} + > <i class="mdi mdi-cash" /> </div> ); case "wired-confirmed": return ( - <div class="timeline-marker is-icon is-success" data-tooltip={i18n.str`This wire transfer has been notified by the payment service provider.`}> + <div + class="timeline-marker is-icon is-success" + data-tooltip={i18n.str`This wire transfer has been notified by the payment service provider.`} + > <i class="mdi mdi-cash" /> </div> ); case "refund-created": return ( - <div class="timeline-marker is-icon is-danger" data-tooltip={i18n.str`This refund is waiting to be claimed by the customer.`}> + <div + class="timeline-marker is-icon is-danger" + data-tooltip={i18n.str`This refund is waiting to be claimed by the customer.`} + > <i class="mdi mdi-cash" /> </div> ); case "refund-taken": return ( - <div class="timeline-marker is-icon is-success" data-tooltip={i18n.str`This refund has been claimed by the customer.`}> + <div + class="timeline-marker is-icon is-success" + data-tooltip={i18n.str`This refund has been claimed by the customer.`} + > <i class="mdi mdi-cash" /> </div> ); case "now": return ( - <div class="timeline-marker is-icon is-info" data-tooltip={i18n.str`The current moment in time.`}> + <div + class="timeline-marker is-icon is-info" + data-tooltip={i18n.str`The current moment in time.`} + > <i class="mdi mdi-clock" /> </div> ); case "refund-missed": { return ( - <div class="timeline-marker is-icon is-danger" data-tooltip={i18n.str`This refund can't be claimed because the wire transfer has already be made.`}> + <div + class="timeline-marker is-icon is-danger" + data-tooltip={i18n.str`This refund can't be claimed because the wire transfer has already been made.`} + > <i class="mdi mdi-cash" /> </div> ); 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 @@ -81,7 +81,7 @@ export function CreatePage({ onCreated, onBack }: Props): VNode { otp_key: !state.otp_key ? i18n.str`Required` : !isRfc3548Base32Charset(state.otp_key) - ? i18n.str`Just letters and numbers from 2 to 7` + ? i18n.str`Use only letters and digits (2–7).` : state.otp_key.length !== 32 ? i18n.str`The size of the key must be 32 characters` : undefined, 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 @@ -148,7 +148,7 @@ export default function ListTemplates({ <i18n.Translate> If you delete the template{" "} <b>"{deleting.template_description}"</b> (ID:{" "} - <b>{deleting.template_id}</b>) you may loose information + <b>{deleting.template_id}</b>) you may lose information </i18n.Translate> </p> <p class="warning"> diff --git a/packages/merchant-backoffice-ui/src/paths/settings/index.tsx b/packages/merchant-backoffice-ui/src/paths/settings/index.tsx @@ -19,17 +19,22 @@ import { useCommonPreferences, useTranslationContext, } from "@gnu-taler/web-util/browser"; -import { VNode, h } from "preact"; +import { format } from "date-fns"; +import { h, VNode } from "preact"; import { FormErrors, FormProvider, } from "../../components/form/FormProvider.js"; import { InputSelector } from "../../components/form/InputSelector.js"; +import { NotificationCard } from "../../components/menu/index.js"; import { LangSelector } from "../../components/menu/LangSelector.js"; -import { dateFormatForPreferences, datetimeFormatForPreferences, Preferences, usePreference } from "../../hooks/preference.js"; import { useSessionContext } from "../../context/session.js"; -import { NotificationCard } from "../../components/menu/index.js"; -import { format } from "date-fns"; +import { + dateFormatForPreferences, + datetimeFormatForPreferences, + Preferences, + usePreference, +} from "../../hooks/preference.js"; const TALER_SCREEN_ID = 83; @@ -102,8 +107,16 @@ export function Settings({ onClose }: { onClose?: () => void }): VNode { expand={true} help={ <p> - {format(new Date(), dateFormatForPreferences(preferences))}<br/> - {format(new Date(), datetimeFormatForPreferences(preferences))}<br/> + {format( + new Date(), + dateFormatForPreferences(preferences), + )} + <br /> + {format( + new Date(), + datetimeFormatForPreferences(preferences), + )} + <br /> </p> } toStr={(e) => { @@ -117,7 +130,7 @@ export function Settings({ onClose }: { onClose?: () => void }): VNode { /> <InputSelector<FormType> label={i18n.str`Merchant type`} - tooltip={i18n.str`Simplify UI based on the user usage.`} + tooltip={i18n.str`Simplify the UI based on use case.`} name="persona" values={ [