Skip to content

Commit

Permalink
Merge pull request #284 from The-Creative-Programming-Group/indonesia…
Browse files Browse the repository at this point in the history
…n-translations

feat: Indonesian translations
  • Loading branch information
FleetAdmiralJakob authored Mar 15, 2024
2 parents 30a3e45 + 42a0fee commit 71009b8
Show file tree
Hide file tree
Showing 9 changed files with 220 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/web/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const config = withMyBundleAnalyzer(withPWA(
transpilePackages: ['@weatherio/api', '@weatherio/ui', '@weatherio/types', '@weatherio/city-data'],
i18n: {
defaultLocale: 'en',
locales: ['en', 'de']
locales: ['en', 'de', 'id']
}
}))
)
Expand Down
Binary file added apps/web/src/assets/indonesian-flag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions apps/web/src/locales/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export default {

"settings.english": "Englisch",
"settings.german": "Deutsch",
"settings.indonesian": "Indonesisch",

// locationsettings page translations
"locationsettings.add new location": "Füge einen Ort hinzu",
Expand Down Expand Up @@ -187,4 +188,5 @@ export default {
"contributors.founder": "Gründer",
"contributors.engineer": "Entwickler",
"contributors.designer": "Designer",
"contributors.translator": "Übersetzer",
} as const;
2 changes: 2 additions & 0 deletions apps/web/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export default {

"settings.english": "English",
"settings.german": "German",
"settings.indonesian": "Indonesian",

// locationsettings page translations
"locationsettings.add new location": "Add new location",
Expand Down Expand Up @@ -184,4 +185,5 @@ export default {
"contributors.founder": "Founder",
"contributors.engineer": "Engineer",
"contributors.designer": "Designer",
"contributors.translator": "Translator",
} as const;
190 changes: 190 additions & 0 deletions apps/web/src/locales/id.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
export default {
// 404 page translations
"404.title": "404 - Halaman Tidak Ditemukan",

// common translations
"common.title": "Weather.io",
"common.location": "Indonesia",

"common.start button": "Temukan lokasimu",
"common.share button": "Bagikan",
"common.menu home": "Beranda",
"common.menu locations": "Lokasi",
"common.menu settings": "Pengaturan",
"common.menu contact": "Kontak",
"common.footer legal": "Hukum",
"common.footer contributors": "Kontributor",

"common.search page title": "Cari - Weather.io",

"common.miles per hour": "Mil per jam",
"common.kilometers per hour": "Kilometer per jam",
"common.knots": "Knots",
"common.meters per second": "Meter per detik",
"common.beaufort": "Beaufort",
"common.hectopascals": "Hectopascals",

"common.share text": "Lihat halaman ini: ",

"common.title 404 page": "404: This page could not be found",
"common.title offline page": "Offline",

// settings page translations
"settings.temperature units": "Satuan suhu",
"settings.wind speed units": "Satuan kecepatan angin",
"settings.language": "Bahasa",

"settings.english": "Inggris",
"settings.german": "Jerman",
"settings.indonesian": "Indonesia",

// locationsettings page translations
"locationsettings.add new location": "Tambah lokasi baru",
"locationsettings.add new location button": "Tambah lokasi baru",
"locationsettings.search input placeholder": "Cari lokasi",

"locationsettings.at least one city toast":
"Anda harus memilih setidaknya satu kota",
"locationsettings.switched to city toast": "Beralih ke kota!",
"locationsettings.added city toast": "Menambahkan kota baru!",
"locationsettings.city not found toast": "Kota tidak ditemukan!",
"locationsettings.try again toast": "Coba lagi!",

"locationsettings.my location button": "Pilih lokasi",

// offline page translations
"offline.title": "Anda sedang offline",
"offline.message": "Silakan periksa koneksi internet Anda dan coba lagi.",

// search page translations
"search.search input placeholder": "Cari lokasi",
"search.continue button": "Lanjutkan -->",

"search.my location button": "Pilih lokasi",

// legal page translations
"legal.main text":
"Isi dari situs web ini telah diperiksa dan dibuat dengan hati-hati. Namun, kami tidak menjamin akurasi, kelengkapan, dan ketepatan waktu informasi yang disediakan. Kami tidak bertanggung jawab atas kerusakan atau kerugian yang timbul dari penggunaan situs web ini. Para operator halaman yang terhubung bertanggung jawab sepenuhnya atas kontennya. Setiap tanggung jawab atas konten eksternal secara tegas dikecualikan.",
"legal.germany": "Jerman",
"legal.information disclaimer": "Informasi sesuai dengan § 5 TMG",

// home page translations
"home.today": "Hari Ini",
"home.9 day forecast": "Perkiraan 9 Hari",
"home.precipitation": "Presipitasi",
"home.feels like": "Terasa Seperti",
"home.visibility": "Visibilitas",
"home.wind pressure": "Angin & Tekanan",
"home.air quality": "Kualitas Udara",
"home.pressure": "Tekanan",
"home.speed": "Kecepatan",
"home.moon phase": "Fase Bulan",

"home.early morning": "Pagi Awal",
"home.morning": "Pagi",
"home.noon": "Siang",
"home.afternoon": "Sore",
"home.night": "Malam",

"home.feels like phrase extremely warm": "Matahari sangat menyengat hari ini",
"home.feels like phrase very warm":
"Matahari kayaknya lagi nyoba buat refreshing!",
"home.feels like phrase warm": "Es krim aja ngerasa kepanasan!",
"home.feels like phrase slightly more warm": "Hari ini terasa hangat sekali!",
"home.feels like phrase slightly warm": "Hari yang pas untuk piknik!",
"home.feels like phrase neutral":
"Cuacanya pas banget, kayaknya Goldilocks pun juga setuju!",
"home.feels like phrase slightly cold": "Mungkin perlu memakai jaket tipis.",
"home.feels like phrase slightly more cold": "Hari ini terasa cukup dingin!",
"home.feels like phrase cold":
"Penguin-penguin lagi pesen cokelat panas nih, sedingin itu!",
"home.feels like phrase very cold":
"Hari ini dinginnya sampe bikin manusia salju kedinginan!",
"home.feels like phrase extremely cold":
"Terlalu dingin, bahkan beruang kutub pun lebih memilih untuk menetap di rumahnya!",

"home.air quality text very poor": "Sangat Buruk",
"home.air quality text poor": "Buruk",
"home.air quality text fair": "Cukup Baik",
"home.air quality text moderate": "Sedang",
"home.air quality text good": "Baik",
"home.air quality text excellent": "Sangat Baik",

"home.sunset": "Matahari Terbenam",
"home.sunrise": "Matahari Terbit",

"home.moonset": "Terbenamnya Bulan",
"home.moonrise": "Terbitnya Bulan",

"home.weather state stormy": "Badai",
"home.weather state snowy": "Berawan",
"home.weather state rainy": "Hujan",
"home.weather state very cloudy": "Sangat Berawan",
"home.weather state cloudy": "Berawan",
"home.weather state windy": "Berangin",
"home.weather state sunny": "Cerah",

"home.this hour": "Jam Ini",
"home.early hour time ending": "Pagi",
"home.late hour time ending": "Malam",

"home.9 day forecast card content":
"Perkiraan untuk 9 hari ke depan. <br />Suhu rata-rata adalah suhu rata-rata selama hari. Satu untuk siang dan satu untuk malam.",

"home.precipitation card title": "Presipitasi Saat Ini",

"home.feels like card content":
"Parameter suhu ini memperhitungkan persepsi manusia terhadap cuaca",

"home.visibility card title": "Visibilitas Saat Ini",

"home.wind pressure card title": "Angin & Tekanan Saat Ini",
"home.wind pressure card content":
"<b>Tekanan atmosfer pada permukaan laut.</b> <br /> Pada permukaan laut, tekanan atmosfer adalah gaya yang diberikan oleh berat udara di atasnya, dengan rata-rata sekitar 1013.25 hPa.",

"home.not available": "Tidak Tersedia",

"home.moon phase card title": "Fase Bulan Saat Ini",
"home.moon phase card content":
"Fase bulan adalah bentuk bagian yang disinari langsung oleh Matahari dari Bulan saat dilihat dari Bumi.",

"home.moon phase new moon": "Bulan Baru",
"home.moon phase waxing crescent": "Sabit Muda",
"home.moon phase first quarter": "Kuartal Pertama",
"home.moon phase waxing gibbous": "Cembung Awal",
"home.moon phase full moon": "Purnama",
"home.moon phase waning gibbous": "Cembung Akhir",
"home.moon phase last quarter": "Kuartal Terakhir",
"home.moon phase waning crescent": "Sabit tua",

"home.more information": "Informasi Lebih Lanjut",
"home.less information": "Informasi Lebih Sedikit",

"home.sun hours": "Jam Matahari",

"home.from": "Dari",

// contact page translations
"contact.send button": "Kirim",
"contact.sent button": "Terkirim",
"contact.first name": "Nama depan",
"contact.last name": "Nama belakang",
"contact.email": "Email",
"contact.message": "Pesan",

"contact.sent toast": "Pesan terkirim!",
"contact.sending email loading toast": "Mengirim email...",

"contact.invalid email": "Alamat email tidak valid",
"contact.at least 2 characters": "Kolom ini harus berisi minimal 2 karakter",
"contact.at least 10 characters":
"Kolom ini harus berisi minimal 10 karakter",

// contributors page translations
"contributors.made with love text":
'Dibuat dengan <span class="text-4xl" style="color: rgb(239 68 68)">♥\uFE0F</span> by',
"contributors.founder": "Pendiri",
"contributors.engineer": "Insinyur",
"contributors.designer": "Desainer",
"contributors.translator": "Penerjemah",
} as const;
1 change: 1 addition & 0 deletions apps/web/src/locales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ export const {
} = createI18n({
en: () => import("./en"),
de: () => import("./de"),
id: () => import("./id"),
});
3 changes: 2 additions & 1 deletion apps/web/src/pages/contributors/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ const Contributors = () => {
/>
</Link>
<p className="flex text-center text-base md:text-xl">
{translationContributors("designer")}
{translationContributors("designer")} &{" "}
{translationContributors("translator")}
</p>
</div>
<div className="flex w-16 flex-col items-center gap-2 md:w-20">
Expand Down
20 changes: 20 additions & 0 deletions apps/web/src/pages/settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { RxCheck } from "react-icons/rx";

import type { TemperatureUnitType, WindSpeedUnitType } from "~/states";
import germanFlag from "~/assets/german-flag.png";
import indonesianFlag from "~/assets/indonesian-flag.png";
import usaFlag from "~/assets/usa-flag.png";
import Layout from "~/components/Layout";
import {
Expand Down Expand Up @@ -179,6 +180,25 @@ const Settings = observer(() => {
<RxCheck width={20} height={20} className="h-9 w-9" />
)}
</button>
<button
className={`${normalButtonClass} ${
locale === "id" ? "border-2" : ""
}`}
onClick={() => changeLocale("id")}
>
<Image
src={indonesianFlag}
alt="Flag of the Netherladns"
width={20}
height={20}
/>
<p className={`${styles.buttontext} ml-2`}>
{translationSettings("indonesian")}
</p>
{locale === "id" && (
<RxCheck width={20} height={20} className="h-9 w-9" />
)}
</button>
</div>
</div>
</Layout>
Expand Down

0 comments on commit 71009b8

Please sign in to comment.