Skip to content

Commit

Permalink
using localization for texts (i18n)
Browse files Browse the repository at this point in the history
  • Loading branch information
Viterbo committed Feb 27, 2024
1 parent 3a634ee commit 9d7742f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 25 deletions.
11 changes: 9 additions & 2 deletions src/i18n/en-us/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,15 @@ export default {
testnetRotation: {
title: 'Add your testnet BP to the schedule',
},
testnetDevelopers: {
title: 'Get a testnet account or testnet TLOS',
testnet_developers: {
page_title: 'Testnet Developers Tools',
page_subtitle: 'Use the following tools to create a new account, send TLOS tokens to a Telos native account, or send TLOS tokens to an EVM compatible address.',
create_new_account_title: 'Create a New Testnet Account',
create_new_account_subtitle: 'Here you can create a new account by providing a unique name and public keys for owner and active permissions.',
send_tlos_telos_title: 'Send TLOS to Telos Account',
send_tlos_telos_subtitle: 'Use this tab to send TLOS tokens to a Telos native account.',
send_tlos_evm_title: 'Send TLOS to EVM Address',
send_tlos_evm_subtitle: 'Send TLOS tokens to an EVM compatible address with this option.',
},
testnetEvmFaucet: {
title: 'Get testnet EVM TLOS',
Expand Down
26 changes: 8 additions & 18 deletions src/pages/testnet/DevelopersPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,8 @@ checkTabFromUrl();
<template>
<q-page class="p-dev-page flex flex-center">
<div class="p-dev-page__title-card">
<div class="p-dev-page__title">Testnet Developers Tools</div>
<div class="text-subtitle2">
Use the following tools to create a new account,
send TLOS tokens to a Telos native account,
or send TLOS tokens to an EVM compatible address.
</div>
<div class="p-dev-page__title">{{ $t('pages.testnet_developers.page_title') }}</div>
<div class="text-subtitle2">{{ $t('pages.testnet_developers.page_subtitle') }}</div>
</div>
<q-card class="p-dev-page__main-card">
<q-tabs class="p-dev-page__tabs-tabs text-primary shadow-2" align="justify" v-model="tab" dense>
Expand All @@ -274,11 +270,8 @@ checkTabFromUrl();
<q-tab-panels class="p-dev-page__panels" v-model="tab" animated>
<q-tab-panel class="p-dev-page__panel" name="create">
<q-card-section class="p-dev-page__panel-section">
<div class="text-h6">Create a New Testnet Account</div>
<div class="text-subtitle2">
Here you can create a new account by providing a unique
name and public keys for owner and active permissions.
</div>
<div class="text-h6">{{ $t('pages.testnet_developers.create_new_account_title') }}</div>
<div class="text-subtitle2">{{ $t('pages.testnet_developers.create_new_account_subtitle') }}</div>
</q-card-section>
<q-input
class="q-mb-lg"
Expand Down Expand Up @@ -333,8 +326,8 @@ checkTabFromUrl();

<q-tab-panel class="p-dev-page__panel" name="tlos-native">
<q-card-section class="p-dev-page__panel-section">
<div class="text-h6">Send TLOS to Telos Account</div>
<div class="text-subtitle2">Use this tab to send TLOS tokens to a Telos native account.</div>
<div class="text-h6">{{ $t('pages.testnet_developers.send_tlos_telos_title') }}</div>
<div class="text-subtitle2">{{ $t('pages.testnet_developers.send_tlos_telos_subtitle') }}</div>
</q-card-section>
<!-- we need to ensure the account does not exist with a rule -->
<q-input
Expand Down Expand Up @@ -363,16 +356,13 @@ checkTabFromUrl();
v-if="transactionId"
class="p-dev-page__panel-btn p-dev-page__trx-id"
color="secondary"
:disable="is"
><a href="#" targe="_blank">{{ transactionId }}</a></q-btn>
</q-tab-panel>

<q-tab-panel class="p-dev-page__panel" name="tlos-evm">
<q-card-section class="p-dev-page__panel-section">
<div class="text-h6">Send TLOS to EVM Address</div>
<div class="text-subtitle2">
Send TLOS tokens to an EVM compatible address with this option.
</div>
<div class="text-h6">{{ $t('pages.testnet_developers.send_tlos_evm_title') }}</div>
<div class="text-subtitle2">{{ $t('pages.testnet_developers.send_tlos_evm_subtitle') }}</div>
</q-card-section>
<!-- Inputs and button for sending TLOS to EVM address -->
<q-input
Expand Down
14 changes: 9 additions & 5 deletions src/store/accounts/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,15 @@ export const autoLogin = async function ({ dispatch, commit }, returnUrl) {
const { authenticator, idx } = getAuthenticator(this.$ual);
if (authenticator) {
commit('setAutoLogin', true);
await dispatch('login', {
idx,
returnUrl,
account: localStorage.getItem('account'),
});
try {
await dispatch('login', {
idx,
returnUrl,
account: localStorage.getItem('account'),
});
} catch (e) {
console.log('Auto login error: ', e);
}
commit('setAutoLogin', false);
}
};
Expand Down

0 comments on commit 9d7742f

Please sign in to comment.