diff --git a/locales/en/profile.json b/locales/en/profile.json index 5ead33d..f4a0719 100644 --- a/locales/en/profile.json +++ b/locales/en/profile.json @@ -13,7 +13,6 @@ "date": "November the 19th, 2001", "contact": "Get in touch", "belongs": "Organization", - "more": "More...", "grade": "B2", "icon_1": "Icon: ", "icon_2": "", diff --git a/locales/ja/profile.json b/locales/ja/profile.json index 9eb4097..78ddc64 100644 --- a/locales/ja/profile.json +++ b/locales/ja/profile.json @@ -13,7 +13,6 @@ "date": "2001年11月19日", "contact": "連絡先 / SNS", "belongs": "所属", - "more": "さらに見る...", "grade": "2年", "icon_1": "アイコン: ", "icon_2": "さん", diff --git a/pages/components/Footer.js b/pages/components/Footer.js index a65b9bb..ceb21bc 100644 --- a/pages/components/Footer.js +++ b/pages/components/Footer.js @@ -7,23 +7,21 @@ export default function Footer(props) { const router = useRouter() const { locale, locales, defaultLocale, pathname } = router const { t, lang } = useTranslation("common") - const footer = t('footer') - const source = t('source') - const tos = t('tos') - return ( - <> -
-
-
-

- {footer} / {source} -

-

- {tos} -

-
-
+ + return ( + <> +
+
+
+

+ {t('footer')} / {t('source')} +

+

+ {t('tos')} +

- - ); +
+
+ + ); } \ No newline at end of file diff --git a/pages/components/Minecraft.js b/pages/components/Minecraft.js index 2b110eb..8f0e917 100644 --- a/pages/components/Minecraft.js +++ b/pages/components/Minecraft.js @@ -11,7 +11,7 @@ export default function Minecraft(props) { const { t, lang } = useTranslation("minecraft") const [data, setData] = useState({ hits: [] }); - const fail = t('minecraft:fail') + useEffect(() => { const fetchData = async () => { const result = await axios( @@ -25,27 +25,24 @@ export default function Minecraft(props) { if (data === undefined){ console.log("[Minecraft Query] データの取得に失敗しました。 / Failed to retrieve data.") return ( -

{fail}

+

{t('minecraft:fail')}

) }else{ const status = data.online const player = data.players && data.players.online - const playing = t('minecraft:playing', {count: player}) - const no_one = t('minecraft:no_one') - const offline = t('minecraft:offline') - const loading = t('minecraft:loading') + return (
{(() => { if (status == true) { if (player == undefined || player == 0) { - return {no_one} + return {t('minecraft:no_one')} } else { - return {playing} + return {t('minecraft:playing', {count: player})} }}else if (status == false) { - return {offline} + return {t('minecraft:offline')} }else { - return {loading} + return {t('minecraft:loading')} } })()} diff --git a/pages/components/Spotify.js b/pages/components/Spotify.js index deb8f1f..246ac5a 100644 --- a/pages/components/Spotify.js +++ b/pages/components/Spotify.js @@ -23,8 +23,7 @@ function App () { }else{ if (data.isPlaying){ const status = data.artist + ' / ' + data.title - const listening = t('listening', {listening: status}) - return

{listening}

+ return

{t('listening', {listening: status})}

}else{ return

} diff --git a/pages/hcunews.js b/pages/hcunews.js index 6bd87a6..565eb5a 100644 --- a/pages/hcunews.js +++ b/pages/hcunews.js @@ -11,11 +11,11 @@ export default function Tos(props) { const router = useRouter() const { locale, locales, defaultLocale, pathname } = router const { t, lang } = useTranslation("hcunews") - const hcunews = t('hcunews') + return( - +
-

{hcunews}

+

{t('hcunews')}

{lang === 'ja' ? ( ) : ( @@ -23,5 +23,5 @@ export default function Tos(props) { )}
- ) + ) } \ No newline at end of file diff --git a/pages/house.js b/pages/house.js index 6c83b34..6384cd2 100644 --- a/pages/house.js +++ b/pages/house.js @@ -6,12 +6,11 @@ export default function About(props) { const router = useRouter() const { locale, locales, defaultLocale, pathname } = router const { t, lang } = useTranslation("house") - const house = t('house') return ( - +
-

{house}

+

{t('house')}

diff --git a/pages/minecraft.js b/pages/minecraft.js index 0fe88d2..0980fa8 100644 --- a/pages/minecraft.js +++ b/pages/minecraft.js @@ -12,15 +12,12 @@ export default function About(props) { const router = useRouter() const { locale, locales, defaultLocale, pathname } = router const { t, lang } = useTranslation("minecraft") - const title = t('title') - const address = t('address') - const version = t('version') const copyText = () => { navigator.clipboard.writeText("yude.jp"); }; return ( - +

{title}

@@ -35,7 +32,7 @@ export default function About(props) {

- {address}: yude.jp + {t('address')}: yude.jp

-

{version}: 1.17

+

{t('version')}: 1.17

@@ -180,7 +165,7 @@ export default function About(props) { className="bg-pink-600 text-white active:bg-pink-600 mt-3 font-bold text-sm px-6 py-3 rounded shadow hover:shadow-lg outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150" type="button" > - {device} + {t('device')} @@ -189,7 +174,7 @@ export default function About(props) {
-

{icon_1}Minkasy {icon_2}

+

{t('icon_1')}Minkasy {t('icon_2')}

) diff --git a/pages/status.js b/pages/status.js index 1a1f88b..6317e7a 100644 --- a/pages/status.js +++ b/pages/status.js @@ -7,46 +7,38 @@ export default function About(props) { const router = useRouter() const { locale, locales, defaultLocale, pathname } = router const { t, lang } = useTranslation("status") - const status = t('status') - const location = t('location') - const tottori = t('tottori') - const hiroshima = t('hiroshima') - const model = t('model') - const service = t('service') - const region = t('region') - const shape = t('shape') return ( - +
{ // Heading }
-

{status}

Powered / Generated by Mackerel.

+

{t('status')}

Powered / Generated by Mackerel.

{ - // cherry Mackerel + // yui Mackerel }

yui

CPU

i7-2600

RAM

DDR3 24GB

OS

Arch Linux
-

{location}

{hiroshima}
+

{t('location')}

{t('hiroshima')}
{ - // raspberry Mackerel + // yukino Mackerel }

yukino

-

{model}

Raspberry Pi 4 Model B Rev 1.2
+

{t('model')}

Raspberry Pi 4 Model B Rev 1.2

RAM

4GB

OS

Raspbian GNU/Linux 10 (buster)
-

{location}

{tottori}
+

{t('location')}

{t('tottori')}
@@ -55,11 +47,11 @@ export default function About(props) { }

iroha

-

{service}

Oracle Cloud
-

{shape}

VM.Standard.E2.1.Micro
+

{t('service')}

Oracle Cloud
+

{t('shape')}

VM.Standard.E2.1.Micro

RAM

1GB

OS

Ubuntu 20.04 LTS
-

{region}

Japan Central (Osaka)
+

{t('region')}

Japan Central (Osaka)
@@ -69,11 +61,11 @@ export default function About(props) { }

komachi

-

{service}

Oracle Cloud
-

{shape}

VM.Standard.E2.1.Micro
+

{t('service')}

Oracle Cloud
+

{t('shape')}

VM.Standard.E2.1.Micro

RAM

1GB

OS

Ubuntu 20.04 LTS
-

{region}

Japan Central (Osaka)
+

{t('region')}

Japan Central (Osaka)
diff --git a/pages/tos.js b/pages/tos.js index 038625c..c1bfb45 100644 --- a/pages/tos.js +++ b/pages/tos.js @@ -11,9 +11,8 @@ export default function Tos(props) { const router = useRouter() const { locale, locales, defaultLocale, pathname } = router const { t, lang } = useTranslation("tos") - const tos = t('tos') return( - +
{lang === 'ja' ? (