Skip to content

Commit 31ce54d

Browse files
committed
Fix incorrect localization string interpolation.
1 parent 88e135d commit 31ce54d

File tree

6 files changed

+23
-15
lines changed

6 files changed

+23
-15
lines changed

config/locales/en/member_portal/member_page.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
makerspace_access_also_activates_base_subscription: "Activating Makerspace Access Auto-renewal will also activate Base Membership auto-renewal.",
5858
errors: {
5959
no_member_introduction_title: "Cannot start subscription",
60-
no_member_introduction: "You must attend a member introduction before you can start an auto-renewal subscription. You can find them in the <0>calendar</0>.",
60+
no_member_introduction: 'You must attend a member introduction before you can start an auto-renewal subscription. You can find them in the <a href="{{calendar_url}}">calendar</a>.',
6161
},
6262
pay_dialog: {
6363
title: "Activate auto-renewal",

config/locales/sv/member_portal/member_page.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
makerspace_access_also_activates_base_subscription: "Automatisk förnyelse av Makerspace Access kommer också aktivera automatisk förnyelse av basmedlemsskapet.",
5858
errors: {
5959
no_member_introduction_title: "Kan inte påbörja en prenumeration",
60-
no_member_introduction: "Du måste genomgå en medlemsintroduktion innan du kan starta en prenumeration. Du kan hitta dem i <0>kalendern</0>.",
60+
no_member_introduction: 'Du måste genomgå en medlemsintroduktion innan du kan starta en prenumeration. Du kan hitta dem i <a href="{{calendar_url}}">kalendern</a>.',
6161
},
6262
pay_dialog: {
6363
title: "Aktivera automatisk förnyelse",

public/ts/generated_locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@
245245
"membership": "Base membership gives you voting rights at the yearly meeting, supports your local makerspace, and allows you to attend courses/social events."
246246
},
247247
"errors": {
248-
"no_member_introduction": "You must attend a member introduction before you can start an auto-renewal subscription. You can find them in the <0>calendar</0>.",
248+
"no_member_introduction": "You must attend a member introduction before you can start an auto-renewal subscription. You can find them in the <a href=\"{{calendar_url}}\">calendar</a>.",
249249
"no_member_introduction_title": "Cannot start subscription"
250250
},
251251
"makerspace_access_also_activates_base_subscription": "Activating Makerspace Access Auto-renewal will also activate Base Membership auto-renewal.",

public/ts/generated_locales/sv.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@
245245
"membership": "Basmedlemsskapet ger dig rösträtt på årsmötet, stödjer ditt lokala makerspace, och tillåter dig att delta i kurser och andra sociala event."
246246
},
247247
"errors": {
248-
"no_member_introduction": "Du måste genomgå en medlemsintroduktion innan du kan starta en prenumeration. Du kan hitta dem i <0>kalendern</0>.",
248+
"no_member_introduction": "Du måste genomgå en medlemsintroduktion innan du kan starta en prenumeration. Du kan hitta dem i <a href=\"{{calendar_url}}\">kalendern</a>.",
249249
"no_member_introduction_title": "Kan inte påbörja en prenumeration"
250250
},
251251
"makerspace_access_also_activates_base_subscription": "Automatisk förnyelse av Makerspace Access kommer också aktivera automatisk förnyelse av basmedlemsskapet.",

public/ts/locales.ts

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ export type LOCALE_SCHEMA = {
167167
| "subscriptions.auto_renewal_active"
168168
| "subscriptions.makerspace_access_also_activates_base_subscription"
169169
| "subscriptions.errors.no_member_introduction_title"
170-
| "subscriptions.errors.no_member_introduction"
171170
| "subscriptions.pay_dialog.title"
172171
| "base_membership.title"
173172
| "makerspace_access.title"
@@ -236,23 +235,27 @@ export type LOCALE_SCHEMA = {
236235
((
237236
key: "subscriptions.add_to_cart",
238237
args: {
239-
unit: string | number;
240-
count: string | number;
241238
price: string | number;
239+
count: string | number;
240+
unit: string | number;
242241
},
243242
) => string) &
244243
((
245244
key: "subscriptions.binding_period",
246-
args: { unit: string | number; count: string | number },
245+
args: { count: string | number; unit: string | number },
247246
) => string) &
248247
((
249248
key: "subscriptions.next_charge",
250-
args: { amount: string | number; formattedDate: string | number },
249+
args: { formattedDate: string | number; amount: string | number },
251250
) => string) &
252251
((
253252
key: "subscriptions.activate_auto_renewal",
254253
args: { unit: string | number; price: string | number },
255254
) => string) &
255+
((
256+
key: "subscriptions.errors.no_member_introduction",
257+
args: { calendar_url: string | number },
258+
) => string) &
256259
((key: "set_password_alert", args: { email: string | number }) => string) &
257260
((
258261
key: "failed_set_password_alert",
@@ -577,7 +580,6 @@ export type LOCALE_SCHEMA_GLOBAL = ((
577580
| "member_page:subscriptions.auto_renewal_active"
578581
| "member_page:subscriptions.makerspace_access_also_activates_base_subscription"
579582
| "member_page:subscriptions.errors.no_member_introduction_title"
580-
| "member_page:subscriptions.errors.no_member_introduction"
581583
| "member_page:subscriptions.pay_dialog.title"
582584
| "member_page:base_membership.title"
583585
| "member_page:makerspace_access.title"
@@ -646,23 +648,27 @@ export type LOCALE_SCHEMA_GLOBAL = ((
646648
((
647649
key: "member_page:subscriptions.add_to_cart",
648650
args: {
649-
unit: string | number;
650-
count: string | number;
651651
price: string | number;
652+
count: string | number;
653+
unit: string | number;
652654
},
653655
) => string) &
654656
((
655657
key: "member_page:subscriptions.binding_period",
656-
args: { unit: string | number; count: string | number },
658+
args: { count: string | number; unit: string | number },
657659
) => string) &
658660
((
659661
key: "member_page:subscriptions.next_charge",
660-
args: { amount: string | number; formattedDate: string | number },
662+
args: { formattedDate: string | number; amount: string | number },
661663
) => string) &
662664
((
663665
key: "member_page:subscriptions.activate_auto_renewal",
664666
args: { unit: string | number; price: string | number },
665667
) => string) &
668+
((
669+
key: "member_page:subscriptions.errors.no_member_introduction",
670+
args: { calendar_url: string | number },
671+
) => string) &
666672
((
667673
key: "member_page:set_password_alert",
668674
args: { email: string | number },

public/ts/member.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,9 @@ function SubscriptionPayment({
917917
e.preventDefault();
918918
if (member.labaccess_agreement_at === null) {
919919
UIkit.modal.alert(
920-
t("subscriptions.errors.no_member_introduction"),
920+
t("subscriptions.errors.no_member_introduction", {
921+
calendar_url: URL_CALENDLY_BOOK,
922+
}),
921923
);
922924
return;
923925
}

0 commit comments

Comments
 (0)