Skip to content

Commit

Permalink
Remove unnecessary i18n of currency names and tickers
Browse files Browse the repository at this point in the history
It's just more work for translators, and a possible source of incorrect translations
  • Loading branch information
danimoh committed Nov 25, 2024
1 parent 345213a commit 7390ce0
Show file tree
Hide file tree
Showing 18 changed files with 441 additions and 627 deletions.
6 changes: 3 additions & 3 deletions src/components/AddressList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export default defineComponent({
const btcInfo = computed(() => ({
address: availableExternalAddresses.value[0] || 'bitcoin',
label: context.root.$t('Bitcoin') as string,
label: 'Bitcoin',
balance: btcAccountBalance.value,
type: CryptoCurrency.BTC,
}));
Expand All @@ -194,7 +194,7 @@ export default defineComponent({
if (stablecoin.value === CryptoCurrency.USDC) {
return {
address: polygonAddressInfo.value?.address || 'usdc',
label: context.root.$t('USD Coin') as string,
label: 'USD Coin',
balance: accountUsdcBalance.value
+ accountUsdcBridgedBalance.value,
type: CryptoCurrency.USDC,
Expand All @@ -204,7 +204,7 @@ export default defineComponent({
if (stablecoin.value === CryptoCurrency.USDT) {
return {
address: polygonAddressInfo.value?.address || 'usdt',
label: context.root.$t('Tether USD') as string,
label: 'Tether USD',
balance: accountUsdtBridgedBalance.value,
type: CryptoCurrency.USDT,
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/LegacyAccountNotice.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<div class="flex-row">
<BitcoinIcon/>
<div class="text">
<h2 class="nq-h2">{{ $t('Bitcoin') }}</h2>
<h2 class="nq-h2">Bitcoin</h2>
<p class="nq-text">{{ $t('Send, receive and hold BTC in your wallet.') }}</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/UsdcAddressInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
v-model="localLabel"
/>
<span v-else-if="isOwnAddress" class="label">
{{ localLabel || (stablecoin === CryptoCurrency.USDC ? $t('USD Coin') : $t('Tether USD')) }}
{{ localLabel || (stablecoin === CryptoCurrency.USDC ? 'USD Coin' : 'Tether USD') }}
</span>
<span v-else class="label" :class="{ unlabelled: !localLabel }">
{{ localLabel || $t('unknown') }}
Expand Down
6 changes: 3 additions & 3 deletions src/components/layouts/AccountOverview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
}"
>
<div class="bitcoin-account-item reset flex-column" @click="selectBitcoin">
<div class="bitcoin-account-item-name flex-row"><BitcoinIcon/>{{ $t('Bitcoin') }}</div>
<div class="bitcoin-account-item-name flex-row"><BitcoinIcon/>Bitcoin</div>
<div class="balances" v-if="hasBitcoinAddresses">
<div class="flex-row">
<AlertTriangleIcon v-if="btcConsensus === 'connecting'" />
Expand Down Expand Up @@ -210,10 +210,10 @@
<UsdcIcon/><UsdtIconPadded class="pull-left"/>USDC/USDT
</template>
<template v-if="stablecoin === CryptoCurrency.USDC">
<UsdcIcon/>{{ $t('USD Coin') }}
<UsdcIcon/>USD Coin
</template>
<template v-if="stablecoin === CryptoCurrency.USDT">
<UsdtIcon/>{{ $t('Tether USD') }}
<UsdtIcon/>Tether USD
</template>
</div>
<div class="balances" v-if="hasPolygonAddresses">
Expand Down
6 changes: 3 additions & 3 deletions src/components/layouts/AddressOverview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@
{{ activeAddressInfo.label }}
</div>
<div v-if="activeCurrency === CryptoCurrency.BTC" class="label bitcoin">
{{ $t('Bitcoin') }}
Bitcoin
</div>
<div v-if="activeCurrency === CryptoCurrency.USDC" class="label usdc">
{{ $t('USD Coin') }}
USD Coin
</div>
<div v-if="activeCurrency === CryptoCurrency.USDT" class="label usdt">
{{ $t('Tether USD') }}
Tether USD
</div>
<Amount v-if="activeCurrency === CryptoCurrency.NIM" :amount="activeAddressInfo.balance"
value-mask/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/layouts/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
</section>

<section v-if="$config.enableBitcoin">
<h2 class="nq-label">{{ $t('Bitcoin') }}</h2>
<h2 class="nq-label">Bitcoin</h2>

<div class="setting">
<div class="description">
Expand Down
4 changes: 2 additions & 2 deletions src/components/modals/BtcTransactionModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
<ArrowRightIcon class="arrow"/>
<div class="address-info flex-column">
<BitcoinIcon/>
<span class="label">{{ $t('Bitcoin') }}</span>
<span class="label">Bitcoin</span>
<InteractiveShortAddress v-for="address in ownAddresses.slice(0, 3)" :key="address"
:address="address" copyable tooltipPosition="bottom left"/>

Expand All @@ -133,7 +133,7 @@
<div v-else class="flex-row sender-recipient">
<div class="address-info flex-column">
<BitcoinIcon/>
<span class="label">{{ $t('Bitcoin') }}</span>
<span class="label">Bitcoin</span>
<InteractiveShortAddress v-for="address in ownAddresses.slice(0, 3)" :key="address"
:address="address" copyable tooltipPosition="bottom right"/>
<a v-if="ownAddresses.length > 3" :href="blockExplorerLink"
Expand Down
6 changes: 3 additions & 3 deletions src/components/staking/StakingGraph.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<div class="staking-graph">
<img class="graph-image" src="../../assets/staking/staking-graph.svg" alt="staking graph">
<div class="bubbles" v-if="!loading">
<div class="bubble">~&nbsp;{{ estimatedRewards['4M'] }}&nbsp;{{ $t('NIM') }}</div>
<div class="bubble">~&nbsp;{{ estimatedRewards['8M'] }}&nbsp;{{ $t('NIM') }}</div>
<div class="bubble">~&nbsp;{{ estimatedRewards['12M'] }}&nbsp;{{ $t('NIM') }}</div>
<div class="bubble">~&nbsp;{{ estimatedRewards['4M'] }}&nbsp;NIM</div>
<div class="bubble">~&nbsp;{{ estimatedRewards['8M'] }}&nbsp;NIM</div>
<div class="bubble">~&nbsp;{{ estimatedRewards['12M'] }}&nbsp;NIM</div>
</div>
<div class="scale">
<div class="scale-item">{{ $t('4M') }}</div>
Expand Down
12 changes: 6 additions & 6 deletions src/components/swap/SwapBalanceBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
</button>
<div v-if="leftAsset === SwapAsset.BTC" class="currency left bitcoin">
<BitcoinIcon />
<label>{{ $t('Bitcoin') }}</label>
<label>Bitcoin</label>
<Amount :amount="newLeftBalance" currency="btc" :currency-decimals="8" />
</div>
<div v-if="leftAsset === SwapAsset.USDC_MATIC" class="currency left usdc">
<UsdcIcon />
<label>{{ $t('USD Coin') }}</label>
<label>USD Coin</label>
<Amount :amount="newLeftBalance" currency="usdc" :decimals="2" :currency-decimals="6" />
</div>
<div v-if="leftAsset === SwapAsset.USDT_MATIC" class="currency left usdt">
<UsdtIcon />
<label>{{ $t('Tether USD') }}</label>
<label>Tether USD</label>
<Amount :amount="newLeftBalance" currency="usdt" :decimals="2" :currency-decimals="6" />
</div>
<button v-if="rightAsset === SwapAsset.NIM" class="reset right nimiq currency"
Expand All @@ -42,17 +42,17 @@
</div>
</button>
<div v-if="rightAsset === SwapAsset.BTC" class="currency right bitcoin">
<label>{{ $t('Bitcoin') }}</label>
<label>Bitcoin</label>
<Amount :amount="newRightBalance" currency="btc" :currency-decimals="8" />
<BitcoinIcon />
</div>
<div v-if="rightAsset === SwapAsset.USDC_MATIC" class="currency right usdc">
<label>{{ $t('USD Coin') }}</label>
<label>USD Coin</label>
<Amount :amount="newRightBalance" currency="usdc" :decimals="2" :currency-decimals="6" />
<UsdcIcon />
</div>
<div v-if="rightAsset === SwapAsset.USDT_MATIC" class="currency right usdt">
<label>{{ $t('Tether USD') }}</label>
<label>Tether USD</label>
<Amount :amount="newRightBalance" currency="usdt" :decimals="2" :currency-decimals="6" />
<UsdtIcon />
</div>
Expand Down
Loading

0 comments on commit 7390ce0

Please sign in to comment.