diff --git a/2025/src/components/LanguagePicker.astro b/2025/src/components/LanguagePicker.astro index 69c6b023..ce105c02 100644 --- a/2025/src/components/LanguagePicker.astro +++ b/2025/src/components/LanguagePicker.astro @@ -1,25 +1,20 @@ --- +import { LANGUAGES } from '@/i18n'; // @ts-expect-error not found import { base } from 'astro:config/client'; -const languages - = Object.keys(import.meta.glob('../pages/*.astro')) - .map(p => p.split('/') - .at(-1)! - .replace('.astro', '')) - .filter(lang => lang !== 'index') - .sort(); const pathname = Astro.url.pathname.replace(import.meta.env.BASE_URL, ''); const currentLang = pathname.split('/')[1]; + ---
- {languages.map((lang, i) => ( + {LANGUAGES.map((lang, i) => ( <> {lang.toUpperCase()} - {i < languages.length - 1 && /} - + {i < LANGUAGES.length - 1 && /} + ))}
diff --git a/2025/src/i18n/index.ts b/2025/src/i18n/index.ts new file mode 100644 index 00000000..4d9ab988 --- /dev/null +++ b/2025/src/i18n/index.ts @@ -0,0 +1,7 @@ +export const LANGUAGES = ['ja', 'en'] as const; + +type Lang = typeof LANGUAGES[number]; + +export function useTranslate(lang: Lang): (...translations: string[]) => string { + return (...translations: string[]) => translations[LANGUAGES.indexOf(lang)]; ; +} diff --git a/2025/src/pages/[lang]/index.astro b/2025/src/pages/[lang]/index.astro new file mode 100644 index 00000000..780adfd3 --- /dev/null +++ b/2025/src/pages/[lang]/index.astro @@ -0,0 +1,247 @@ +--- +import AnnouncementSlides from '@/components/AnnouncementSlides.astro'; +import VenueMap from '@/components/VenueMap.astro'; +import { MAIN_BACKGROUND_COLOR } from '@/consts'; +import { LANGUAGES, useTranslate } from '@/i18n'; + +import Layout from '@/layouts/Layout.astro'; + +export function getStaticPaths() { + return LANGUAGES.map(lang => ({ params: { lang } })); +} + +const { lang } = Astro.params; +const t = useTranslate(lang); +--- + + +
+
+

+ + {t('VimConf 2025 とは?', 'What is VimConf 2025?')} + +

+

+ {t( + 'VimConf は、世界初かつ世界で唯一のコミュニティによって定期運営されているVimの国際カンファレンスです。', + `VimConf is the world's first and only regularly organized international Vim conference run by the community.`, + )} +

+

{t('概要', 'Event Details')}

+ + + + + + + + + + + + + + +
+ {t('VimConf 2025の概要', 'Details Of VimConf 2025')} +
+ {t('開催日(予定)', 'Date(Planned)')} + {t('2025年11月2日(日)', 'November 2, 2025 (Sunday)')}
{t('時間', 'Time')}{t( + '9:30 - 17:30 (懇親会: 17:30 - 19:30)', + '9:30 AM - 5:30 PM JST (Networking Party: 5:30 PM - 7:30 PM JST)', + )}
{t('会場', 'Venue')} + + {t( + 'アキバプラザ・アキバホール', + 'Akiba Plaza - Akiba Hall', + )} + + {/* XXX: Workaround for https://github.com/withastro/compiler/issues/958 */} +
+ +

{t('その他', 'Additional Information')}

+

{t( + '発表スライドはすべて英語です。発表は英語または日本語のいずれかの言語で行われます。', + 'All presentation slides will be in English. Presentations will be given in either English or Japanese.', + )}

+

{t( + '登壇の様子を撮影し、後日 YouTube にアップロードします。', + 'The presentations will be recorded and uploaded to YouTube after the event.', + )}

+

{t( + '会場内ではカメラマンによる写真撮影が行われますのでご了承ください。', + 'Please note that professional photographers will be taking pictures during the event.', + )}

+

{t( + '写真もまとめてWeb上に掲載されます。', + 'Photos will be published online after the event.', + )}

+
+
+ +
+
+

+ + {t('なぜスポンサーが必要なのか?', 'Why We Need Sponsors')} + +

+

+ {t( + 'VimConf 2025は、普段なかなか顔を合わせられないVimmer同士が情熱を交わし、知見を共有するための貴重な場です。\n今年は、イベント継続の担保と柔軟な運営のため、必要な資金をスポンサー様のご支援で集める仕組みを採用します。', + 'VimConf 2025 is a valuable opportunity for Vimmers, who rarely get to meet in person, to share their passion and knowledge.\nThis year, to ensure the event\'s sustainability and flexible operation, we are seeking financial support through sponsorships.', + )} +

+
+
+ +
+ +
+ +
+
+

{t('スポンサーに関するお問い合わせ', 'Sponsorship Inquiries')}

+

+ {t( + 'スポンサーシップに関するご質問、ご提案などにつきましては、下記のフォームまたはメールにてお気軽にお問い合わせください。\n※最新情報は随時更新していきます。', + 'For questions or proposals regarding sponsorship, please feel free to contact us through the form below or via email.\n※ Information will be updated regularly.', + )} +

+ +

+ + {t('お問い合わせフォームへ', 'Contact Form')} + +

+
+
+
+ + diff --git a/2025/src/pages/en.astro b/2025/src/pages/en.astro deleted file mode 100644 index 9eec5d5f..00000000 --- a/2025/src/pages/en.astro +++ /dev/null @@ -1,169 +0,0 @@ ---- -import AnnouncementSlides from '@/components/AnnouncementSlides.astro'; -import VenueMap from '@/components/VenueMap.astro'; -import { MAIN_BACKGROUND_COLOR } from '@/consts'; -import Layout from '@/layouts/Layout.astro'; ---- - - -
-
-

What is VimConf 2025?

-

VimConf is the world's first and only regularly organized international Vim conference run by the community.

-

Event Details

- - - - - - - - - - - - - - -
- Details Of VimConf 2025 -
Date(Planned)November 2, 2025 (Sunday)
Time9:30 AM - 5:30 PM JST (Networking Party: 5:30 PM - 7:30 PM JST)
VenueAkiba Plaza - Akiba Hall
- -

Additional Information

-

All presentation slides will be in English. Presentations will be given in either English or Japanese.

-

The presentations will be recorded and uploaded to YouTube after the event.

-

Please note that professional photographers will be taking pictures during the event.

-

Photos will be published online after the event.

-
-
- -
-
-

Why We Need Sponsors

-

- VimConf 2025 is a valuable opportunity for Vimmers, who rarely get to meet in person, to share their passion and knowledge.
- This year, to ensure the event's sustainability and flexible operation, we are seeking financial support through sponsorships. -

-
-
- -
- -
- -
-
-

Sponsorship Inquiries

-

- For questions or proposals regarding sponsorship, please feel free to contact us through the form below or via email.
- ※ Information will be updated regularly. -

- -

- - Contact Form - -

-
-
-
- - diff --git a/2025/src/pages/ja.astro b/2025/src/pages/ja.astro deleted file mode 100644 index 267f1b8c..00000000 --- a/2025/src/pages/ja.astro +++ /dev/null @@ -1,172 +0,0 @@ ---- -import AnnouncementSlides from '@/components/AnnouncementSlides.astro'; -import VenueMap from '@/components/VenueMap.astro'; -import { MAIN_BACKGROUND_COLOR } from '@/consts'; -import Layout from '@/layouts/Layout.astro'; ---- - - -
-
-

VimConf 2025 とは?

-

VimConf は、世界初かつ世界で唯一のコミュニティによって定期運営されているVimの国際カンファレンスです。

-

概要

- - - - - - - - - - - - - - -
- VimConf 2025の概要 -
開催日(予定)2025-11-02(日)
時間9:30 - 17:30 (懇親会: 17:30 - 19:30)
会場アキバプラザ・アキバホール
- -

その他

-

発表スライドはすべて英語です。発表は英語または日本語のいずれかの言語で行われます。

-

登壇の様子を撮影し、後日 YouTube にアップロードします。

-

会場内ではカメラマンによる写真撮影が行われますのでご了承ください。

-

写真もまとめてWeb上に掲載されます。

-

-

-
-
- - -
-
-

なぜスポンサーが必要なのか?

-

- VimConf 2025は、普段なかなか顔を合わせられないVimmer同士が情熱を交わし、知見を共有するための貴重な場です。
- 今年は、イベント継続の担保と柔軟な運営のため、必要な資金をスポンサー様のご支援で集める仕組みを採用します。 -

-
-
-
- -
- - -
-
-

スポンサーに関するお問い合わせ

-

- スポンサーシップに関するご質問、ご提案などにつきましては、下記のフォームまたはメールにてお気軽にお問い合わせください。
- ※最新情報は随時更新していきます。 -

- -

- - お問い合わせフォームへ - -

-
-
-
- -