From 3658eb0a0ce1292ff95a353c805d8946a9c88d2e Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Tue, 1 Aug 2023 17:03:18 -0700 Subject: [PATCH] refactor: translation message variables --- components/UserProfile.ce.vue | 4 +-- components/UserProfile/CallbackFeedback.vue | 8 ++--- components/WanIpCheck.ce.vue | 4 +-- locales/en_US.json | 40 ++++++++++----------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/components/UserProfile.ce.vue b/components/UserProfile.ce.vue index cbe4ba08d..a2503b931 100644 --- a/components/UserProfile.ce.vue +++ b/components/UserProfile.ce.vue @@ -98,7 +98,7 @@ onBeforeMount(() => { - { class="text-white text-12px leading-none py-4px px-8px absolute right-0 bg-gradient-to-r from-unraid-red to-orange text-center block rounded" > - + diff --git a/components/UserProfile/CallbackFeedback.vue b/components/UserProfile/CallbackFeedback.vue index 6d2329a1c..2b2d74927 100644 --- a/components/UserProfile/CallbackFeedback.vue +++ b/components/UserProfile/CallbackFeedback.vue @@ -79,11 +79,11 @@ const subheading = computed(() => { if (callbackStatus.value === 'loading') { return props.t('Please keep this window open while we perform some actions'); } if (callbackStatus.value === 'success') { if (accountActionType.value === 'signIn') { return props.t('You\'re one step closer to enhancing your Unraid experience'); } - if (keyActionType.value === 'purchase') { return props.t('Thank you for purchasing an Unraid %{keyType} Key!', { keyType: keyType.value }); } - if (keyActionType.value === 'replace') { return props.t('Your %{keyType} Key has been replaced!', { keyType: keyType.value }); } + if (keyActionType.value === 'purchase') { return props.t('Thank you for purchasing an Unraid {0} Key!', [keyType.value]); } + if (keyActionType.value === 'replace') { return props.t('Your {0} Key has been replaced!', [keyType.value]); } if (keyActionType.value === 'trialExtend') { return props.t('Your Trial key has been extended!'); } if (keyActionType.value === 'trialStart') { return props.t('Your free Trial key provides all the functionality of a Pro Registration key'); } - if (keyActionType.value === 'upgrade') { return props.t('Thank you for upgrading to an Unraid %{keyType} Key!', { keyType: keyType.value }); } + if (keyActionType.value === 'upgrade') { return props.t('Thank you for upgrading to an Unraid {0} Key!', [keyType.value]); } return ''; } return ''; @@ -144,7 +144,7 @@ const { copy, copied, isSupported } = useClipboard({ source: keyUrl.value }); />

- {{ t('Copy your Key URL: %{keyUrl}', { keyUrl }) }} + {{ t('Copy your Key URL: {0}', [keyUrl]) }}

{{ t('Then go to Tools > Registration to manually install it') }}

diff --git a/components/WanIpCheck.ce.vue b/components/WanIpCheck.ce.vue index db4aa5170..48050c37a 100644 --- a/components/WanIpCheck.ce.vue +++ b/components/WanIpCheck.ce.vue @@ -59,9 +59,9 @@ watchEffect(async () => {