Skip to content

Commit 7e13227

Browse files
committed
update locale
1 parent 533090a commit 7e13227

File tree

18 files changed

+107
-47
lines changed

18 files changed

+107
-47
lines changed

app/assets/locale/all.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default {
2424
apply_personal_sponsor: 'チケットを購入',
2525
personal_sponsor: '個人スポンサー',
2626
pre_order: '事前注文する',
27+
save_image: '画像を保存',
2728
add_to_calendar: 'カレンダーに追加',
2829
re_edit: '再編集',
2930
namecard: 'ネームカード',
@@ -139,6 +140,15 @@ export default {
139140
personal_sponsor_ticket: '個人スポンサーチケット',
140141
personal_sponsor_ticket_explain:
141142
'※ 当日来場される方は、別途、一般もしくは一般+アフターパーティーチケットの購入が必要です。\n※ 詳しくは {0} についてをご覧ください。',
143+
announce_your_participate: 'ネームカードが完成したらSNSで参加表明しましょう!',
144+
succeed_register: 'ネームカードの情報登録が完了しました!',
145+
succeed_register_detail:
146+
'あなたのネームカードは、当日受付にてお渡しいたします。開催を楽しみにお待ちください 😍',
147+
failed_register: 'チケット購入状況との照合に失敗しました。',
148+
failed_register_detail:
149+
'ネームカードを新しく作成した場合、チケット購入状況との照合に失敗することがあります。追って運営がチケット情報との紐付けを進めておりますため、1日ほど間をおいて再度照合をお試しください。正しい情報を入力しているにも関わらず、何度もこのエラーが表示される場合は、チケット購入時の注文番号とお名前を添えて、お問い合わせフォームよりお問い合わせください。',
150+
nouser: 'ユーザーが見つかりませんでした。',
151+
nouser_detail: 'このURLにひもづくユーザーが見つかりませんでした。',
142152
/**
143153
* volunteer section
144154
*/
@@ -245,6 +255,10 @@ export default {
245255
apply_personal_sponsor: 'Apply Personal Sponsor',
246256
personal_sponsor: 'Personal Sponsor',
247257
pre_order: 'Pre-Order',
258+
save_image: 'Save Image',
259+
add_to_calendar: 'Add to Calendar',
260+
re_edit: 'Re-Edit',
261+
namecard: 'Name Card',
248262
},
249263
category: {
250264
platinum: 'Platinum',
@@ -359,6 +373,16 @@ export default {
359373
personal_sponsor_ticket: 'Personal Sponsor Ticket',
360374
personal_sponsor_ticket_explain:
361375
'* Purchase of a General or General with After Party ticket is required for those attending on the day of the event. \n* For more information, please see {0}.',
376+
announce_your_participate:
377+
'Once you have completed your name card, announce your participation on social networking sites!',
378+
succeed_register: 'Name card information registration has been completed!',
379+
succeed_register_detail:
380+
'Your name card will be handed out at the registration desk on the day of the event. Please look forward to the event 😍',
381+
failed_register: 'Failed to match ticket purchase status.',
382+
failed_register_detail:
383+
'If you have created a new name card, it may fail to be matched with your ticket purchase status. Please wait a day or so and try again. If this error message appears again and again even though you have entered the correct information, please contact us using the Contact Us form with the order number and name of the person who purchased the ticket.',
384+
nouser: 'User not found.',
385+
nouser_detail: 'No user found for this URL.',
362386
/**
363387
* volunteer section
364388
*/

app/components/AlertBar.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
<script setup lang="ts">
2+
import { useLocaleCurrent } from '~/composables/useLocaleCurrent'
3+
24
const props = defineProps({
35
userId: {
46
type: String,
57
required: true,
68
},
79
})
810
9-
const nameCardUrl = computed(() => `/users/${props.userId}`)
11+
const { locale } = useLocaleCurrent()
12+
13+
const nameCardUrl = computed(
14+
() => `${locale.value === 'ja' ? '/' : `/${locale.value}/`}users/${props.userId}`,
15+
)
1016
</script>
1117

1218
<template>

app/components/footer/PrivacyPolicyAndCoc.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
<script setup lang="ts">
2+
import { useLocaleCurrent } from '~/composables/useLocaleCurrent'
23
import TextButton from '~/components/button/TextButton.vue'
34
45
interface PrivacyPolicyAndCocEmit {
56
(e: 'on-click'): void
67
}
78
const emit = defineEmits<PrivacyPolicyAndCocEmit>()
8-
const urlBasePath = useRuntimeConfig().app.baseURL
99
10-
const { locale } = useI18n({ useScope: 'global' })
10+
const { locale } = useLocaleCurrent()
1111
</script>
1212

1313
<template>
1414
<div class="doc-root">
1515
<TextButton
16-
:to="`${urlBasePath}${locale === 'ja' ? '' : `${locale}/`}privacy`"
16+
:to="`${locale === 'ja' ? '/' : `/${locale}/`}privacy`"
1717
underline
1818
@click.stop="$emit('on-click')"
1919
>
2020
{{ $t('words.privacypolicy') }}
2121
</TextButton>
2222
<TextButton
23-
:to="`${urlBasePath}${locale === 'ja' ? '' : `${locale}/`}code-of-conduct`"
23+
:to="`${locale === 'ja' ? '/' : `/${locale}/`}code-of-conduct`"
2424
underline
2525
@click.stop="$emit('on-click')"
2626
>

app/components/namecard/NamecardSection.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import { useNamecard } from '~/composables/useNamecard'
77
import { useUserStore } from '~/composables/useUserStore'
88
import useAuth from '~/composables/useAuth'
99
import { useDialog } from '~/composables/useDialog'
10+
import { useLocaleCurrent } from '~/composables/useLocaleCurrent'
1011
12+
const { locale } = useLocaleCurrent()
1113
const { canRegister, closedRegister } = useNamecard()
1214
const { signedUser } = useUserStore()
1315
const { hasAuth } = useAuth()
@@ -42,7 +44,12 @@ const mdPath = canRegister ? (closedRegister ? 'close-namecard' : 'namecard') :
4244
<RoundButton
4345
type="submit"
4446
:disabled="!canRegister"
45-
@click="() => (!hasAuth ? handle(true) : navigateTo(`/users/${signedUser.user_id}`))"
47+
@click="
48+
() =>
49+
!hasAuth
50+
? handle(true)
51+
: navigateTo(`${locale === 'ja' ? '/' : `/${locale}/`}users/${signedUser.user_id}`)
52+
"
4653
>
4754
{{ closedRegister ? $t('words.check_created_namecard') : $t('words.create_namecard') }}
4855
</RoundButton>

app/components/speaker/SpeakerCard.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@ import GithubLogo from '~/assets/logo/github_logo.svg'
33
import TwitterLogo from '~/assets/logo/twitter_logo.svg'
44
import MastodonLogo from '~/assets/logo/mastodon_logo.svg'
55
import { useSession } from '~/composables/useSession'
6+
import { useLocaleCurrent } from '~/composables/useLocaleCurrent'
67
import { Speaker } from '~/types/app'
78
import { twitterDomainUrl } from '~/utils/constants'
89
10+
const { locale } = useLocaleCurrent()
11+
912
const { showSpeakerInfo } = useSession()
1013
const urlBasePath = useRuntimeConfig().app.baseURL
1114
const props = defineProps({
@@ -22,7 +25,7 @@ const _nuxtLink = computed(() => resolveComponent('NuxtLink'))
2225
<div class="speaker-card">
2326
<component
2427
:is="showSpeakerInfo ? _nuxtLink : 'div'"
25-
:to="showSpeakerInfo ? `/sessions/${speaker.id}` : ''"
28+
:to="showSpeakerInfo ? `${locale === 'ja' ? '/' : `/${locale}/`}sessions/${speaker.id}` : ''"
2629
>
2730
<img
2831
width="208"

app/components/speaker/SponsorSpeakerCard.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@ import GithubLogo from '~/assets/logo/github_logo.svg'
33
import TwitterLogo from '~/assets/logo/twitter_logo.svg'
44
import MastodonLogo from '~/assets/logo/mastodon_logo.svg'
55
import { useSession } from '~/composables/useSession'
6+
import { useLocaleCurrent } from '~/composables/useLocaleCurrent'
67
import { SpeakerProfile } from '~/types/app'
78
import { twitterDomainUrl } from '~/utils/constants'
89
10+
const { locale } = useLocaleCurrent()
11+
912
const urlBasePath = useRuntimeConfig().app.baseURL
1013
const { showSpeakerInfo } = useSession()
1114
@@ -27,7 +30,7 @@ const _nuxtLink = computed(() => resolveComponent('NuxtLink'))
2730
<div class="speaker-card">
2831
<component
2932
:is="showSpeakerInfo ? _nuxtLink : 'div'"
30-
:to="showSpeakerInfo ? `/sponsor-sessions/${id}` : ''"
33+
:to="showSpeakerInfo ? `${locale === 'ja' ? '/' : `/${locale}/`}sponsor-sessions/${id}` : ''"
3134
>
3235
<img
3336
width="208"

app/components/sponsor/SponsorList.vue

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
<script setup lang="ts">
2+
import { useLocaleCurrent } from '~/composables/useLocaleCurrent'
23
import SponsorCategoryTitle from './SponsorCategoryTitle.vue'
34
import SponsorCard from './SponsorCard.vue'
45
import * as sponsors from '~/utils/sponsor.constants'
6+
7+
const { locale } = useLocaleCurrent()
58
</script>
69

710
<template>
@@ -13,7 +16,7 @@ import * as sponsors from '~/utils/sponsor.constants'
1316
<NuxtLink
1417
v-for="platinumSponsor in sponsors.platinumSponsors"
1518
:key="platinumSponsor.name"
16-
:to="`/sponsors/${platinumSponsor.id}`"
19+
:to="`${locale === 'ja' ? '/' : `/${locale}/`}sponsors/${platinumSponsor.id}`"
1720
>
1821
<SponsorCard :sponsor="platinumSponsor" category="platinum" />
1922
</NuxtLink>
@@ -25,7 +28,7 @@ import * as sponsors from '~/utils/sponsor.constants'
2528
<NuxtLink
2629
v-for="goldSponsor in sponsors.goldSponsors"
2730
:key="goldSponsor.name"
28-
:to="`/sponsors/${goldSponsor.id}`"
31+
:to="`${locale === 'ja' ? '/' : `/${locale}/`}sponsors/${goldSponsor.id}`"
2932
>
3033
<SponsorCard :sponsor="goldSponsor" category="gold" />
3134
</NuxtLink>
@@ -37,7 +40,7 @@ import * as sponsors from '~/utils/sponsor.constants'
3740
<NuxtLink
3841
v-for="silverSponsor in sponsors.silverSponsors"
3942
:key="silverSponsor.name"
40-
:to="`/sponsors/${silverSponsor.id}`"
43+
:to="`${locale === 'ja' ? '/' : `/${locale}/`}sponsors/${silverSponsor.id}`"
4144
>
4245
<SponsorCard :sponsor="silverSponsor" category="silver" />
4346
</NuxtLink>
@@ -49,7 +52,7 @@ import * as sponsors from '~/utils/sponsor.constants'
4952
<NuxtLink
5053
v-for="bronzeSponsor in sponsors.bronzeSponsors"
5154
:key="bronzeSponsor.name"
52-
:to="`/sponsors/${bronzeSponsor.id}`"
55+
:to="`${locale === 'ja' ? '/' : `/${locale}/`}sponsors/${bronzeSponsor.id}`"
5356
>
5457
<SponsorCard :sponsor="bronzeSponsor" category="bronze" />
5558
</NuxtLink>
@@ -63,7 +66,7 @@ import * as sponsors from '~/utils/sponsor.constants'
6366
<NuxtLink
6467
v-for="namingRightSponsor in sponsors.namingRightSponsors"
6568
:key="namingRightSponsor.name"
66-
:to="`/sponsors/${namingRightSponsor.id}`"
69+
:to="`${locale === 'ja' ? '/' : `/${locale}/`}sponsors/${namingRightSponsor.id}`"
6770
>
6871
<SponsorCard :sponsor="namingRightSponsor" use-column-layout category="options" />
6972
</NuxtLink>
@@ -75,7 +78,7 @@ import * as sponsors from '~/utils/sponsor.constants'
7578
<NuxtLink
7679
v-for="specialLunchSponsor in sponsors.specialLunchSponsors"
7780
:key="specialLunchSponsor.name"
78-
:to="`/sponsors/${specialLunchSponsor.id}`"
81+
:to="`${locale === 'ja' ? '/' : `/${locale}/`}sponsors/${specialLunchSponsor.id}`"
7982
>
8083
<SponsorCard :sponsor="specialLunchSponsor" use-column-layout category="options" />
8184
</NuxtLink>
@@ -89,7 +92,7 @@ import * as sponsors from '~/utils/sponsor.constants'
8992
<NuxtLink
9093
v-for="lunchSponsor in sponsors.lunchSponsors"
9194
:key="lunchSponsor.name"
92-
:to="`/sponsors/${lunchSponsor.id}`"
95+
:to="`${locale === 'ja' ? '/' : `/${locale}/`}sponsors/${lunchSponsor.id}`"
9396
>
9497
<SponsorCard :sponsor="lunchSponsor" category="options" />
9598
</NuxtLink>
@@ -101,7 +104,7 @@ import * as sponsors from '~/utils/sponsor.constants'
101104
<NuxtLink
102105
v-for="afterPartySponsor in sponsors.afterPartySponsors"
103106
:key="afterPartySponsor.name"
104-
:to="`/sponsors/${afterPartySponsor.id}`"
107+
:to="`${locale === 'ja' ? '/' : `/${locale}/`}sponsors/${afterPartySponsor.id}`"
105108
>
106109
<SponsorCard :sponsor="afterPartySponsor" category="options" />
107110
</NuxtLink>
@@ -113,7 +116,7 @@ import * as sponsors from '~/utils/sponsor.constants'
113116
<NuxtLink
114117
v-for="namecardSponsor in sponsors.namecardSponsors"
115118
:key="namecardSponsor.name"
116-
:to="`/sponsors/${namecardSponsor.id}`"
119+
:to="`${locale === 'ja' ? '/' : `/${locale}/`}sponsors/${namecardSponsor.id}`"
117120
>
118121
<SponsorCard :sponsor="namecardSponsor" category="options" />
119122
</NuxtLink>
@@ -125,7 +128,7 @@ import * as sponsors from '~/utils/sponsor.constants'
125128
<NuxtLink
126129
v-for="refreshmentSponsor in sponsors.refreshmentSponsors"
127130
:key="refreshmentSponsor.name"
128-
:to="`/sponsors/${refreshmentSponsor.id}`"
131+
:to="`${locale === 'ja' ? '/' : `/${locale}/`}sponsors/${refreshmentSponsor.id}`"
129132
>
130133
<SponsorCard :sponsor="refreshmentSponsor" category="options" />
131134
</NuxtLink>
@@ -137,7 +140,7 @@ import * as sponsors from '~/utils/sponsor.constants'
137140
<NuxtLink
138141
v-for="interpretationSponsor in sponsors.interpretationSponsors"
139142
:key="interpretationSponsor.name"
140-
:to="`/sponsors/${interpretationSponsor.id}`"
143+
:to="`${locale === 'ja' ? '/' : `/${locale}/`}sponsors/${interpretationSponsor.id}`"
141144
>
142145
<SponsorCard :sponsor="interpretationSponsor" category="options" />
143146
</NuxtLink>
@@ -149,7 +152,7 @@ import * as sponsors from '~/utils/sponsor.constants'
149152
<NuxtLink
150153
v-for="handsonSponsor in sponsors.handsonSponsors"
151154
:key="handsonSponsor.name"
152-
:to="`/sponsors/${handsonSponsor.id}`"
155+
:to="`${locale === 'ja' ? '/' : `/${locale}/`}sponsors/${handsonSponsor.id}`"
153156
>
154157
<SponsorCard :sponsor="handsonSponsor" category="options" />
155158
</NuxtLink>
@@ -163,7 +166,7 @@ import * as sponsors from '~/utils/sponsor.constants'
163166
<NuxtLink
164167
v-for="mediaSponsor in sponsors.mediaSponsors"
165168
:key="mediaSponsor.name"
166-
:to="`/sponsors/${mediaSponsor.id}`"
169+
:to="`${locale === 'ja' ? '/' : `/${locale}/`}sponsors/${mediaSponsor.id}`"
167170
>
168171
<SponsorCard :sponsor="mediaSponsor" category="options" />
169172
</NuxtLink>

app/components/timetable/TimetableBodyRow.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<script setup lang="ts">
22
import { useSession } from '~/composables/useSession'
3+
import { useLocaleCurrent } from '~/composables/useLocaleCurrent'
34
import { Track } from '~/types/timetable'
45
56
const props = defineProps<{
67
tracks: Track[]
78
}>()
89
10+
const { locale } = useLocaleCurrent()
911
const { showSpeakerInfo } = useSession()
1012
1113
// tdのclassを設定する
@@ -39,8 +41,8 @@ const _nuxtLink = computed(() => resolveComponent('NuxtLink'))
3941
:to="
4042
showSpeakerInfo && session.id
4143
? session.sponsorSession
42-
? `/sponsor-sessions/${session.id}`
43-
: `/sessions/${session.id}`
44+
? `${locale === 'ja' ? '/' : `/${locale}/`}sponsor-sessions/${session.id}`
45+
: `${locale === 'ja' ? '/' : `/${locale}/`}sessions/${session.id}`
4446
: ''
4547
"
4648
class="title"

app/components/timetable/TimetableBodyRowMobile.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<script setup lang="ts">
22
import { useSession } from '~/composables/useSession'
33
import { Session } from '~/types/timetable'
4+
import { useLocaleCurrent } from '~/composables/useLocaleCurrent'
5+
6+
const { locale } = useLocaleCurrent()
47
58
type Props = {
69
track?: string
@@ -66,8 +69,8 @@ const _nuxtLink = computed(() => resolveComponent('NuxtLink'))
6669
:to="
6770
showSpeakerInfo && session.id
6871
? sponsorSession
69-
? `/sponsor-sessions/${session.id}`
70-
: `/sessions/${session.id}`
72+
? `${locale === 'ja' ? '/' : `/${locale}/`}sponsor-sessions/${session.id}`
73+
: `${locale === 'ja' ? '/' : `/${locale}/`}sessions/${session.id}`
7174
: ''
7275
"
7376
class="title"

app/composables/useLocaleCurrent.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export function useLocaleCurrent() {
2+
const { locale } = useI18n({ useScope: 'global' })
3+
return { locale }
4+
}

0 commit comments

Comments
 (0)