From 5d9a36917d0ee8fb039672792aad0af94fc39356 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 17 Nov 2020 10:57:04 +0100 Subject: [PATCH] Fix register sentense string See https://framacolibri.org/t/sinscrire-sur-mobilizon-affiche-au-lieu-du-nom-de-linstance/9838 Signed-off-by: Thomas Citharel --- js/src/i18n/en_US.json | 1 - js/src/i18n/fr_FR.json | 1 - js/src/mixins/identityEdition.ts | 4 ++-- js/src/views/Account/Register.vue | 14 ++++++++++++-- js/src/views/User/Register.vue | 13 ++++++++++++- 5 files changed, 26 insertions(+), 7 deletions(-) diff --git a/js/src/i18n/en_US.json b/js/src/i18n/en_US.json index 67a625d7e..bfe0ce95f 100644 --- a/js/src/i18n/en_US.json +++ b/js/src/i18n/en_US.json @@ -277,7 +277,6 @@ "Published events with {comments} comments and {participations} confirmed participations": "Published events with {comments} comments and {participations} confirmed participations", "RSS/Atom Feed": "RSS/Atom Feed", "Region": "Region", - "Register an account on Mobilizon!": "Register an account on Mobilizon!", "Registration is allowed, anyone can register.": "Registration is allowed, anyone can register.", "Registration is closed.": "Registration is closed.", "Registration is currently closed.": "Registration is currently closed.", diff --git a/js/src/i18n/fr_FR.json b/js/src/i18n/fr_FR.json index a38dadceb..5dda93cf1 100644 --- a/js/src/i18n/fr_FR.json +++ b/js/src/i18n/fr_FR.json @@ -563,7 +563,6 @@ "Refresh profile": "Rafraîchir le profil", "Region": "Région", "Register": "S'inscrire", - "Register an account on Mobilizon!": "S'inscrire sur Mobilizon !", "Register an account on {instanceName}!": "S'inscrire sur {instanceName} !", "Register for an event by choosing one of your identities": "S'inscrire à un évènement en choisissant une de vos identités", "Register on this instance": "S'inscrire sur cette instance", diff --git a/js/src/mixins/identityEdition.ts b/js/src/mixins/identityEdition.ts index e3ecd5f04..0669e99a1 100644 --- a/js/src/mixins/identityEdition.ts +++ b/js/src/mixins/identityEdition.ts @@ -8,7 +8,7 @@ export default class IdentityEditionMixin extends Mixins(Vue) { oldDisplayName: string | null = null; - autoUpdateUsername(newDisplayName: string | null) { + autoUpdateUsername(newDisplayName: string | null): void { const oldUsername = IdentityEditionMixin.convertToUsername(this.oldDisplayName); if (this.identity.preferredUsername === oldUsername) { @@ -30,7 +30,7 @@ export default class IdentityEditionMixin extends Mixins(Vue) { .replace(/[^a-z0-9_]/g, ""); } - validateUsername() { + validateUsername(): boolean { return ( this.identity.preferredUsername === IdentityEditionMixin.convertToUsername(this.identity.preferredUsername) diff --git a/js/src/views/Account/Register.vue b/js/src/views/Account/Register.vue index 926b190d0..fcb1fd319 100644 --- a/js/src/views/Account/Register.vue +++ b/js/src/views/Account/Register.vue @@ -5,7 +5,9 @@

{{ $t("Congratulations, your account is now created!") }}

-

{{ $t("Register an account on Mobilizon!") }}

+

+ {{ $t("Register an account on {instanceName}!", { instanceName: config.name }) }} +

{{ $t("Now, create your first profile:") }}

@@ -92,6 +94,8 @@