refactor: translation message variables

This commit is contained in:
Zack Spear
2023-08-01 17:03:18 -07:00
parent 06d6fe357a
commit 3658eb0a0c
4 changed files with 28 additions and 28 deletions

View File

@@ -98,7 +98,7 @@ onBeforeMount(() => {
<span class="text-right text-12px sm:text-18px hidden 2xs:block">{{ description }}</span>
<span class="text-gamma hidden md:inline-block px-8px">&bull;</span>
</template>
<button :title="t('Click to Copy LAN IP %{ip}', { ip: lanIp })" @click="copyLanIp()">
<button :title="t('Click to Copy LAN IP {0}', [lanIp])" @click="copyLanIp()">
{{ name }}
</button>
<span
@@ -106,7 +106,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"
>
<template v-if="copied">{{ t('LAN IP Copied') }}</template>
<template v-else>{{ t('LAN IP %{ip}', { ip: lanIp }) }}</template>
<template v-else>{{ t('LAN IP {0}', [lanIp]) }}</template>
</span>
</h1>

View File

@@ -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 });
/>
</div>
<p v-else>
{{ t('Copy your Key URL: %{keyUrl}', { keyUrl }) }}
{{ t('Copy your Key URL: {0}', [keyUrl]) }}
</p>
<p><a href="/Tools/Registration" class="opacity-75 hover:opacity-100 focus:opacity-100 underline transition">{{ t('Then go to Tools > Registration to manually install it') }}</a></p>
</template>

View File

@@ -59,9 +59,9 @@ watchEffect(async () => {
<template v-else>
<span v-if="computedError" class="text-unraid-red font-semibold">{{ computedError }}</span>
<template v-else>
<span v-if="isRemoteAccess || phpWanIp === wanIp && !isRemoteAccess">{{ t('Remark: your WAN IPv4 is %{ip}', { ip: wanIp }) }}</span>
<span v-if="isRemoteAccess || phpWanIp === wanIp && !isRemoteAccess">{{ t('Remark: your WAN IPv4 is {0}', [wanIp]) }}</span>
<span v-else class="inline-block w-1/2 whitespace-normal">
{{ t("Remark: Unraid's WAN IPv4 %{phpWanIp} does not match your client's WAN IPv4 %{wanIp}.", { phpWanIp, wanIp }) }}
{{ t("Remark: Unraid's WAN IPv4 {0} does not match your client's WAN IPv4 {1}.", [phpWanIp, wanIp]) }}
{{ t('This may indicate a complex network that will not work with this Remote Access solution.') }}
{{ t('Ignore this message if you are currently connected via Remote Access or VPN.') }}
</span>

View File

@@ -1,14 +1,14 @@
{
"LAN IP": "LAN IP",
"LAN IP %{ip}": "LAN IP %{ip}",
"LAN IP {0}": "LAN IP {0}",
"LAN IP Copied": "LAN IP Copied",
"Click to Copy LAN IP %{ip}": "Click to Copy LAN IP %{ip}",
"Trial Key Expired at %{time}": "Trial Key Expired at %{time}",
"Trial Key Expires at %{time}": "Trial Key Expires at %{time}",
"Trial Key Expired %{time}": "Trial Key Expired %{time}",
"Trial Key Expires in %{time}": "Trial Key Expires in %{time}",
"Server Up Since %{time}": "Server Up Since %{time}",
"Uptime %{time}": "Uptime %{time}",
"Click to Copy LAN IP {0}": "Click to Copy LAN IP {0}",
"Trial Key Expired at {0}": "Trial Key Expired at {0}",
"Trial Key Expires at {0}": "Trial Key Expires at {0}",
"Trial Key Expired {0}": "Trial Key Expired {0}",
"Trial Key Expires in {0}": "Trial Key Expires in {0}",
"Server Up Since {0}": "Server Up Since {0}",
"Uptime {0}": "Uptime {0}",
"year": "{n} year | {n} years",
"month": "{n} month | {n} months",
"day": "{n} day | {n} days",
@@ -71,12 +71,12 @@
"Something went wrong": "Something went wrong",
"Please keep this window open while we perform some actions": "Please keep this window open while we perform some actions",
"You're one step closer to enhancing your Unraid experience": "You're one step closer to enhancing your Unraid experience",
"Thank you for purchasing an Unraid %{keyType} Key!": "Thank you for purchasing an Unraid %{keyType} Key!",
"Your %{keyType} Key has been replaced!": "Your %{keyType} Key has been replaced!",
"Thank you for purchasing an Unraid {0} Key!": "Thank you for purchasing an Unraid {0} Key!",
"Your {0} Key has been replaced!": "Your {0} Key has been replaced!",
"Your Trial key has been extended!": "Your Trial key has been extended!",
"Copied": "Copied",
"Copy Key URL": "Copy Key URL",
"Copy your Key URL: %{keyUrl}": "Copy your Key URL: %{keyUrl}",
"Copy your Key URL: {0}": "Copy your Key URL: {0}",
"Then go to Tools > Registration to manually install it": "Then go to Tools > Registration to manually install it",
"Enhance your experience with Unraid Connect": "Enhance your experience with Unraid Connect",
"Sign In to utilize Unraid Connect": "Sign In to utilize Unraid Connect",
@@ -91,15 +91,15 @@
"DNS issue, unable to resolve wanip4.unraid.net": "DNS issue, unable to resolve wanip4.unraid.net",
"Unable to fetch client WAN IPv4": "Unable to fetch client WAN IPv4",
"Checking WAN IPs…": "Checking WAN IPs…",
"Remark: your WAN IPv4 is %{wanIp}": "Remark: your WAN IPv4 is %{wanIp}",
"Remark: Unraid's WAN IPv4 %{phpWanIp} does not match your client's WAN IPv4 %{wanIp}.": "Remark: Unraid's WAN IPv4 %{phpWanIp} does not match your client's WAN IPv4 %{wanIp}.",
"Remark: your WAN IPv4 is {0}": "Remark: your WAN IPv4 is {0}",
"Remark: Unraid's WAN IPv4 {0} does not match your client's WAN IPv4 {1}.": "Remark: Unraid's WAN IPv4 {0} does not match your client's WAN IPv4 {1}.",
"This may indicate a complex network that will not work with this Remote Access solution.": "This may indicate a complex network that will not work with this Remote Access solution.",
"Ignore this message if you are currently connected via Remote Access or VPN.": "Ignore this message if you are currently connected via Remote Access or VPN.",
"Ready to update Connect account configuration": "Ready to update Connect account configuration",
"Signing in %{username}…": "Signing in %{username}…",
"Signing out %{username}…": "Signing out %{username}…",
"%{username} Signed In Successfully": "%{username} Signed In Successfully",
"%{username} Signed Out Successfully": "%{username} Signed Out Successfully",
"Signing in {0}…": "Signing in {0}…",
"Signing out {0}…": "Signing out {0}…",
"{0} Signed In Successfully": "{0} Signed In Successfully",
"{0} Signed Out Successfully": "{0} Signed Out Successfully",
"Sign In Failed": "Sign In Failed",
"Sign Out Failed": "Sign Out Failed",
"Failed to update Connect account configuration": "Failed to update Connect account configuration",
@@ -109,9 +109,9 @@
"Installing Extended Trial": "Installing Extended Trial",
"Installing Recovered": "Installing Recovered",
"Installing Replaced": "Installing Replaced",
"%{txt1} %{keyType} Key…": "%{txt1} %{keyType} Key…",
"%{keyType.value} Key %{txt2} Successfully": "%{keyType.value} Key %{txt2} Successfully",
"Failed to %{txt3} %{keyType.value} Key": "Failed to %{txt3} %{keyType.value} Key",
"{0} {1} Key…": "{0} {1} Key…",
"{1} Key {0} Successfully": "{1} Key {0} Successfully",
"Failed to {0} {1} Key": "Failed to {0} {1} Key",
"Purchase Key": "Purchase Key",
"Upgrade Key": "Upgrade Key",
"Recover Key": "Recover Key",