Skip to content

Commit

Permalink
feat: 選擇語言 多語系
Browse files Browse the repository at this point in the history
  • Loading branch information
sexyoung committed Aug 22, 2023
1 parent 997e559 commit 5de39b6
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 5 deletions.
8 changes: 4 additions & 4 deletions app/components/LangModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ export default function LangModal({ onClose, lang }: ModalProps) {
className="text-base font-semibold leading-6 text-gray-900"
id="modal-title"
>
切換語系
{t("menu.choose")}
</h3>
<div className="mt-2 text-sm text-gray-500">
<ul className="whitespace-nowrap bg-white py-2 text-black [&>*]:py-0.5">
<li>
<a href={`/${path}`.replace("//", "/")}>{t("menu.")}</a>
</li>
<li>
<a href={[`/zh-TW`, path].join("")}>
{t("menu.zh-TW")}
</a>
</li>
<li>
<a href={`/${path}`.replace("//", "/")}>{t("menu.")}</a>
</li>
<li>
<a href={["/ja-JP", path].join("")}>
{t("menu.ja-JP")}
Expand Down
2 changes: 1 addition & 1 deletion app/components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function Footer({ lang, openLang }: FooterProps) {
className="mx-auto block h-[auto] w-[120px] lg:mr-5 lg:inline-block"
alt="Home"
/> */}
<ul className="my-5 inline-block whitespace-nowrap [&>*]:mx-2 [&>*]:my-2 sm:[&>*]:block md:[&>*]:inline-block">
<ul className="my-5 inline-block [&>*]:mx-2 [&>*]:my-2 sm:[&>*]:block md:[&>*]:inline-block">
<Links {...{ lang }} openLang={openLang} />
</ul>
<div className="flex-1 px-4">
Expand Down
1 change: 1 addition & 0 deletions public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"curing": "Affordable Options",
"assessment": "Professional Evaluation",
"contact": "About Us",
"choose": "Choose a language",
"zh-TW": "中文",
"": "English",
"ja-JP": "日本語",
Expand Down
22 changes: 22 additions & 0 deletions public/locales/en/home.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,28 @@
"whatIsEndometriosis": "What is “Endometriosis”?",
"planFreeChoose": "Mix-and-Match Plans:",
"3step": "Have an individualized treatment plan in only three steps",
"endometriosis": [
{
"title": "All about Periods",
"text": "In general, the endometrium grows to a thick and blood vessel-rich layer approximately every month for pregnancy. If the person does not become pregnant, the thickened endometrial lining will shed and trigger menstruation, and the process recurs during the next menstrual cycle."
},
{
"title": "Relocation of Shredded Endometrium",
"text": "Normally, the blood vessel-enriched endometrium within the uterine cavity may be shredded during each menstrual cycle and excreted through the vagina. What happens if the endometrium is relocated?"
},
{
"title": "Accumulated Menstrual Blood",
"text": "Shredded endometrium may be delivered to other places for various reasons. Though with regular menstrual cycles, some menstrual blood/endometrium may accumulate at the lesion site and then release excessive inflammatory substances."
},
{
"title": "Adenomyosis",
"text": "The most common lesion site is the uterine muscle layer. As the menstrual blood and inflammatory substances accumulated within the uterine muscle layer, without an opening to the uterine cavity, the accumulated materials may induce severe menstrual pain during each cycle."
},
{
"title": "Chocolate Cyst",
"text": "The second common lesion site is the ovary. Once the menstrual blood and inflammatory substances accumulate in the ovary, the materials may turn to a thick cream like Nutella, which stretches out the ovary and causes damage to the oocytes or results in pathological changes."
}
],
"3stepArticle": [
{
"title": "Tell Us about Your Chief Complaints!",
Expand Down
1 change: 1 addition & 0 deletions public/locales/id-ID/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"curing": "Zona rasio biaya-kinerja",
"assessment": "Penilaian profesional",
"contact": "Tentang kami",
"choose": "Pilih bahasa",
"zh-TW": "中文",
"": "English",
"ja-JP": "日本語",
Expand Down
1 change: 1 addition & 0 deletions public/locales/ja-JP/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"curing": "費用VS効果",
"assessment": "専門的参考資料",
"contact": "Contact Us",
"choose": "言語を選択してください",
"zh-TW": "中文",
"": "English",
"ja-JP": "日本語",
Expand Down
1 change: 1 addition & 0 deletions public/locales/vi-VN/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"curing": "Chuyên khu trị số CP",
"assessment": "Đánh giá độ chuyên nghiệp",
"contact": "Về chúng tôi",
"choose": "Chọn một ngôn ngữ",
"zh-TW": "中文",
"": "English",
"ja-JP": "日本語",
Expand Down
1 change: 1 addition & 0 deletions public/locales/zh-TW/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"curing": "CP 值專區",
"assessment": "專業評估",
"contact": "關於我們",
"choose": "選擇語言",
"zh-TW": "中文",
"": "English",
"ja-JP": "日本語",
Expand Down

0 comments on commit 5de39b6

Please sign in to comment.