Skip to content

Commit

Permalink
Merge branch 'rc' into 'main'
Browse files Browse the repository at this point in the history
fix: /vi path keep redirecting + update text

See merge request locker/web!63
  • Loading branch information
duchunter committed Oct 12, 2023
2 parents bf544a1 + 1479567 commit 72cb350
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/renderer/components/pages/promo/PaymentDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
alt="Locker"
class="h-11 mr-4"
>
<p class="landing-font-18">Your Digital Vault</p>
<p class="landing-font-18">{{ $t('common.your_digital_vault') }}</p>
</div>
<!-- Logo end -->

Expand Down
1 change: 1 addition & 0 deletions src/renderer/locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ module.exports = {
yearly: '1 year plan',
yes: 'Yes',
you: 'You',
your_digital_vault: 'Your Digital Vault',
zip: 'Postal/Zip Code'
},
sidebar: {
Expand Down
1 change: 1 addition & 0 deletions src/renderer/locales/vi.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ module.exports = {
yearly: 'Gói 1 năm',
yes: 'Có',
you: 'Bạn',
your_digital_vault: 'Kho dữ liệu số của bạn',
zip: 'Mã bưu chính'
},
sidebar: {
Expand Down
6 changes: 4 additions & 2 deletions src/renderer/pages/lifetime/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
alt="Locker"
class="h-11 mr-4"
>
<p class="landing-font-18">Your Digital Vault</p>
<p class="landing-font-18">
{{ $t('common.your_digital_vault') }}
</p>
</div>
<!-- Logo end -->

Expand Down Expand Up @@ -48,7 +50,7 @@
<!-- Invoice -->
<div class="mb-8">
<div class="flex justify-between mb-3">
<p class="font-semibold">Price</p>
<p class="font-semibold">{{ $t('common.price') }}</p>
<p v-if="result.price" class="text-right">
${{ result.price | formatNumber }} {{ result.currency }}
</p>
Expand Down
1 change: 1 addition & 0 deletions src/renderer/pages/promotion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@
<script>
export default {
layout: 'white',
middleware: ['onlyEng'],
data () {
return ({
activeName: '1',
Expand Down
10 changes: 1 addition & 9 deletions src/renderer/plugins/router.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
export default ({ store, app, i18n, redirect, error }) => {
export default ({ store, app, i18n }) => {
// Every time the route changes (fired on initialization too)
app.router.beforeEach(async (toRoute, fromRoute, next) => {
if (toRoute.path.startsWith('/vi/promotion')) {
error({ statusCode: 404 })
next()
return
}

if (toRoute.path.startsWith('/vi')) {
if (app.$cookies.get('i18n_redirected') !== 'vi') {
i18n.setLocale('vi')
redirect(302, toRoute.path)
return
}
}

Expand Down

0 comments on commit 72cb350

Please sign in to comment.