Skip to content

Commit 14bb354

Browse files
committed
Web: ヘルプおよびランキングの英語対応&ヘルプのログアウト時非表示対応
1 parent 00ef7fe commit 14bb354

File tree

6 files changed

+33
-26
lines changed

6 files changed

+33
-26
lines changed

assets/texts/categories.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@
6262
"url": "about-upload",
6363
"articles": [
6464
"what-can-i-upload",
65+
"what-is-r-18",
6566
"upload-guidelines",
66-
"what-is-r-18"
67+
"nsfw-guidelines"
6768
]
6869
},
6970
{
@@ -165,6 +166,7 @@
165166
},
166167
{
167168
"url": "related-services",
169+
"hidden-on-logout": true,
168170
"articles": [
169171
"what-is-***REMOVED***-gacha",
170172
"what-is-***REMOVED***-april",

components/page/ranking/RankingScreen.vue

+13-8
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,19 @@
33
<div class="columns is-centered is-multiline">
44
<div class="column is-8">
55
<Notification>
6-
{{ pageTitle }}
76
<span v-if="apiEndpoint.includes('monthly')">
7+
{{ $t('RankingScreen.sort.monthly') }}
8+
{{ $t('RankingScreen.title') }}
89
{{ `${today.getFullYear()}/${today.getMonth()+1}` }}
910
</span>
1011
<span v-if="apiEndpoint.includes('weekly')">
12+
{{ $t('RankingScreen.sort.weekly') }}
13+
{{ $t('RankingScreen.title') }}
1114
{{ `${today.getFullYear()}/${today.getMonth()+1}/${today.getDate()} ~ ${week_ago.getFullYear()}/${week_ago.getMonth()+1}/${week_ago.getDate()}` }}
1215
</span>
1316
<span v-if="apiEndpoint.includes('daily')">
17+
{{ $t('RankingScreen.sort.daily') }}
18+
{{ $t('RankingScreen.title') }}
1419
{{ `${today.getFullYear()}/${today.getMonth()+1}/${today.getDate()}` }}
1520
</span>
1621
</Notification>
@@ -63,7 +68,7 @@
6368
</div>
6469
<div class="column is-8 has-text-centered">
6570
<p>
66-
※期間中に集計したいいね/閲覧数を表示しています。未実装なため過去のランキングは閲覧できません。
71+
{{ $t('RankingScreen.note') }}
6772
</p>
6873
</div>
6974
<div class="column is-10 has-image-centered">
@@ -86,7 +91,7 @@
8691
</div>
8792
<div v-if="results.length === 0">
8893
<p class="is-size-4">
89-
指定した期間のランキング情報が見つけられませんでした
94+
{{ $t('RankingScreen.not_found') }}
9095
</p>
9196
</div>
9297
</div>
@@ -149,12 +154,12 @@ export default {
149154
week_ago: new Date(),
150155
sortMethods: [
151156
{ text: this.$t('SearchScreen.sort.most_liked'), value: 0 },
152-
{ text: '閲覧数が多い順', value: 1 }
157+
{ text: this.$t('SearchScreen.sort.most_viewed'), value: 1 }
153158
],
154159
rankMethods: [
155-
{ text: '月間', value: 1 },
156-
{ text: '週間', value: 2 },
157-
{ text: '日間', value: 3 }
160+
{ text: this.$t('RankingScreen.sort.monthly'), value: 1 },
161+
{ text: this.$t('RankingScreen.sort.weekly'), value: 2 },
162+
{ text: this.$t('RankingScreen.sort.daily'), value: 3 }
158163
],
159164
rankYearID: 1,
160165
rankYearMethods: [
@@ -197,7 +202,7 @@ export default {
197202
return 'column is-12-mobile is-6-touch is-3-desktop'
198203
}
199204
},
200-
mounted () {
205+
created () {
201206
this.week_ago.setDate(this.week_ago.getDate() - 7)
202207
},
203208
methods: {

locales/messages.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// import helpArticlesEn from '@/locales/help/articles/en.json'
2-
// import helpCategoriesEn from '@/locales/help/categories/en.json'
2+
import helpCategoriesEn from '@/locales/help/categories/en.json'
33
import textEn from '@/locales/text/en.json'
44
import helpArticlesJa from '@/locales/help/articles/ja.json'
55
import helpCategoriesJa from '@/locales/help/categories/ja.json'
@@ -8,7 +8,7 @@ import textJa from '@/locales/text/ja.json'
88
export default {
99
en: {
1010
// ...helpArticlesEn,
11-
// ...helpCategoriesEn,
11+
...helpCategoriesEn,
1212
...textEn
1313
},
1414
ja: {

pages/help/articles/_article.vue

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<p v-for="b in article.body" :key="b" class="column is-12" v-html="b" />
1111
<div class="column is-10">
1212
<button class="button is-info is-large is-fullwidth" @click="$router.back(-1)">
13-
戻る
13+
{{ $t('help.back') }}
1414
</button>
1515
</div>
1616
</div>
@@ -19,23 +19,23 @@
1919
<div class="columns is-centered has-text-centered is-multiline">
2020
<div class="column is-12">
2121
<p class="is-size-5">
22-
この記事はお役に立ちましたか?
22+
{{ $t('help.survey.title') }}
2323
</p>
2424
</div>
2525
<div class="column is-12">
2626
<p class="is-size-7">
27-
{{ yakunitatta }}名の方が役に立ったと言っています
27+
{{ $t('help.survey.helped', [yakunitatta]) }}
2828
</p>
2929
<p class="is-size-7">
30-
{{ yakunitatanakatta }}名の方が役に立たなかったと言っています
30+
{{ $t('help.survey.not_helped', [yakunitatanakatta]) }}
3131
</p>
3232
</div>
3333
<div class="column is-6">
3434
<button class="button is-primary" @click="yakunitatta += 1">
35-
役に立った
35+
{{ $t('help.survey.yes') }}
3636
</button>
3737
<button class="button is-secondary" @click="yakunitatta += 1">
38-
役に立たなかった
38+
{{ $t('help.survey.no') }}
3939
</button>
4040
</div>
4141
</div>

pages/help/categories/_category.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<div class="columns is-centered">
4141
<div class="column is-10">
4242
<button class="button is-info is-fullwidth is-large" @click="$router.back(-1)">
43-
戻る
43+
{{ $t('help.back') }}
4444
</button>
4545
</div>
4646
</div>

pages/help/index.vue

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,28 @@
66
<div class="columns is-multiline is-centered">
77
<div class="column is-12 has-text-centered">
88
<p class="is-size-2">
9-
何かお困りですか?
9+
{{ $t('help.title') }}
1010
</p>
1111
</div>
12-
<div v-if="1 === 0" class="column is-8">
13-
<input type="text" class="input is-medium" placeholder="検索ワードをご入力ください(パスワード, パスワード, パスワードなど)">
14-
</div>
1512
<div class="column is-8 box has-text-centered">
1613
<p class="subtitle">
17-
たぶんすごくよくある質問
14+
{{ $t('help.frequently.title') }}
1815
</p>
19-
<p v-for="f in faq" :key="f" class="is-size-6">
16+
<p v-for="(f,i) in faq" :key="i" class="is-size-6">
2017
<nuxt-link :to="`/help/articles/${f}`">
21-
パスワードを忘れてしまいました
18+
{{ $t(`help.frequently.articles.${f}`) }}
2219
</nuxt-link>
2320
</p>
2421
</div>
2522
</div>
2623
<div class="columns is-multiline is-gapless is-centered">
2724
<div v-for="c in categories" :key="c.url" class="column is-4-desktop is-6">
28-
<nuxt-link class="button is-size-4 is-large is-fullwidth" :to="`/help/categories/${c.url}`">
25+
<nuxt-link v-if="!c['hidden-on-logout'] || (c['hidden-on-logout'] && $auth.loggedIn)" class="button is-size-4 is-large is-fullwidth" :to="`/help/categories/${c.url}`">
2926
{{ $t(c.url) }}
3027
</nuxt-link>
28+
<button v-else class="button is-size-4 is-large is-fullwidth" disabled>
29+
?
30+
</button>
3131
</div>
3232
</div>
3333
</div>

0 commit comments

Comments
 (0)