From b66ae3847b6f1fbcfa33eea0b24b543124a08536 Mon Sep 17 00:00:00 2001 From: Francis Dinh Date: Sun, 28 Aug 2022 14:49:22 -0400 Subject: [PATCH 1/2] refactor: use separate component for birthday dates Resolves: https://akkoma.dev/FoundKeyGang/FoundKey/issues/90 --- locales/ar-SA.yml | 1 + locales/bn-BD.yml | 1 + locales/cs-CZ.yml | 1 + locales/de-DE.yml | 1 + locales/en-US.yml | 1 + locales/es-ES.yml | 1 + locales/fr-FR.yml | 1 + locales/id-ID.yml | 1 + locales/it-IT.yml | 1 + locales/ja-JP.yml | 1 + locales/ja-KS.yml | 1 + locales/ko-KR.yml | 1 + locales/nl-NL.yml | 1 + locales/pl-PL.yml | 1 + locales/ro-RO.yml | 1 + locales/ru-RU.yml | 1 + locales/sk-SK.yml | 1 + locales/uk-UA.yml | 1 + locales/vi-VN.yml | 1 + locales/zh-CN.yml | 1 + locales/zh-TW.yml | 1 + .../client/src/components/birthday-date.vue | 18 ++++++++++++++++++ packages/client/src/pages/user/home.vue | 3 ++- 23 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 packages/client/src/components/birthday-date.vue diff --git a/locales/ar-SA.yml b/locales/ar-SA.yml index 6959dcda1..8e30b5d99 100644 --- a/locales/ar-SA.yml +++ b/locales/ar-SA.yml @@ -254,6 +254,7 @@ remoteUserCaution: "هذه المعلومات قد لا تكون مكتملة ب activity: "النشاط" images: "الصور" birthday: "تاريخ الميلاد" +yearsOld: "{age} سنة" registeredDate: "انضم في" location: "الموقع الجغرافي" theme: "المظهر" diff --git a/locales/bn-BD.yml b/locales/bn-BD.yml index 3ebd6f431..2d520a2e3 100644 --- a/locales/bn-BD.yml +++ b/locales/bn-BD.yml @@ -258,6 +258,7 @@ remoteUserCaution: "এই ব্যাবহারকারী রিমোট activity: "কার্যকলাপ" images: "ছবি" birthday: "জন্মদিন" +yearsOld: "{age} বছর" registeredDate: "যোগদানের তারিখ" location: "অবস্থান" theme: "থিম" diff --git a/locales/cs-CZ.yml b/locales/cs-CZ.yml index 0f50ef8d3..3b1bab3e9 100644 --- a/locales/cs-CZ.yml +++ b/locales/cs-CZ.yml @@ -241,6 +241,7 @@ remoteUserCaution: "Tyto informace nemusí být aktuální jelikož uživatel je activity: "Aktivita" images: "Obrázky" birthday: "Datum narození" +yearsOld: "{age} let" registeredDate: "Datum registrace" location: "Lokace" theme: "Vzhled" diff --git a/locales/de-DE.yml b/locales/de-DE.yml index c3f6c0af5..c84f6621f 100644 --- a/locales/de-DE.yml +++ b/locales/de-DE.yml @@ -259,6 +259,7 @@ remoteUserCaution: "Diese Informationen sind möglicherweise unvollständig, da activity: "Aktivität" images: "Bilder" birthday: "Geburtstag" +yearsOld: "{age} Jahre alt" registeredDate: "Registrationsdatum" location: "Ort" theme: "Farbschema" diff --git a/locales/en-US.yml b/locales/en-US.yml index fa37d467b..7038dab5c 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -259,6 +259,7 @@ remoteUserCaution: "As this user is from a remote instance, the shown informatio activity: "Activity" images: "Images" birthday: "Birthday" +yearsOld: "{age} years old" registeredDate: "Joined on" location: "Location" theme: "Themes" diff --git a/locales/es-ES.yml b/locales/es-ES.yml index 16cccdcec..60d709ed6 100644 --- a/locales/es-ES.yml +++ b/locales/es-ES.yml @@ -258,6 +258,7 @@ remoteUserCaution: "Para el usuario remoto, la información está incompleta" activity: "Actividad" images: "Imágenes" birthday: "Fecha de nacimiento" +yearsOld: "{age} años" registeredDate: "Fecha de registro" location: "Lugar" theme: "Tema" diff --git a/locales/fr-FR.yml b/locales/fr-FR.yml index 188963ae8..f6835903f 100644 --- a/locales/fr-FR.yml +++ b/locales/fr-FR.yml @@ -256,6 +256,7 @@ remoteUserCaution: "Les informations de ce compte risqueraient d’être incompl activity: "Activité" images: "Images" birthday: "Date de naissance" +yearsOld: "{age} ans" registeredDate: "Inscrit le" location: "Localisation" theme: "Thème" diff --git a/locales/id-ID.yml b/locales/id-ID.yml index d1e16f3ee..3f465e9b3 100644 --- a/locales/id-ID.yml +++ b/locales/id-ID.yml @@ -258,6 +258,7 @@ remoteUserCaution: "Informasi ini mungkin tidak mutakhir, karena pengguna ini be activity: "Aktivitas" images: "Gambar" birthday: "Tanggal lahir" +yearsOld: "{age} tahun" registeredDate: "Bergabung pada" location: "Lokasi" theme: "Tema" diff --git a/locales/it-IT.yml b/locales/it-IT.yml index e9dd2679b..a15660565 100644 --- a/locales/it-IT.yml +++ b/locales/it-IT.yml @@ -254,6 +254,7 @@ remoteUserCaution: "Può darsi che le informazioni siano incomplete perché ques activity: "Attività" images: "Immagini" birthday: "Compleanno" +yearsOld: "{age}Anni" registeredDate: "Iscrizione a.." location: "Posizione" theme: "Tema" diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 031f3d044..6b4a99c4a 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -259,6 +259,7 @@ remoteUserCaution: "リモートユーザーのため、情報が不完全です activity: "アクティビティ" images: "画像" birthday: "誕生日" +yearsOld: "{age}歳" registeredDate: "登録日" location: "場所" theme: "テーマ" diff --git a/locales/ja-KS.yml b/locales/ja-KS.yml index acb4d07b5..384cc6d52 100644 --- a/locales/ja-KS.yml +++ b/locales/ja-KS.yml @@ -258,6 +258,7 @@ remoteUserCaution: "リモートユーザーやから、足りひん情報ある activity: "アクティビティ" images: "画像" birthday: "生まれた日" +yearsOld: "{age}歳" registeredDate: "始めた日" location: "場所" theme: "テーマ" diff --git a/locales/ko-KR.yml b/locales/ko-KR.yml index 06d0c35b6..3f8a46bba 100644 --- a/locales/ko-KR.yml +++ b/locales/ko-KR.yml @@ -258,6 +258,7 @@ remoteUserCaution: "리모트 유저이기 때문에, 정보가 정확하지 않 activity: "활동" images: "이미지" birthday: "생일" +yearsOld: "{age}세" registeredDate: "등록일" location: "장소" theme: "테마" diff --git a/locales/nl-NL.yml b/locales/nl-NL.yml index 1174d1a6f..facbab444 100644 --- a/locales/nl-NL.yml +++ b/locales/nl-NL.yml @@ -244,6 +244,7 @@ remoteUserCaution: "Aangezien deze gebruiker van een externe server afkomstig is activity: "Activiteit" images: "Afbeeldingen" birthday: "Geboortedatum" +yearsOld: "{age} jaar" registeredDate: "Inschrijvingsdatum" location: "Locatie" theme: "Thema's" diff --git a/locales/pl-PL.yml b/locales/pl-PL.yml index e4765fead..a9945b481 100644 --- a/locales/pl-PL.yml +++ b/locales/pl-PL.yml @@ -253,6 +253,7 @@ remoteUserCaution: "Te informacje mogą nie być aktualne, ponieważ użytkownik activity: "Aktywność" images: "Zdjęcia" birthday: "Data urodzenia" +yearsOld: "{age} lat" registeredDate: "Zarejestrowano" location: "Lokalizacja" theme: "Motywy" diff --git a/locales/ro-RO.yml b/locales/ro-RO.yml index 351229452..1655185d8 100644 --- a/locales/ro-RO.yml +++ b/locales/ro-RO.yml @@ -258,6 +258,7 @@ remoteUserCaution: "Deoarece acest utilizator este dintr-o instanță externă, activity: "Activitate" images: "Imagini" birthday: "Zi de naștere" +yearsOld: "{age} ani" registeredDate: "Data înregistrării" location: "Locație" theme: "Teme" diff --git a/locales/ru-RU.yml b/locales/ru-RU.yml index ffc7cca2a..640500e2b 100644 --- a/locales/ru-RU.yml +++ b/locales/ru-RU.yml @@ -258,6 +258,7 @@ remoteUserCaution: "Это пользователь с другого сайта activity: "Активность" images: "Изображения" birthday: "День рождения" +yearsOld: "Возраст: {age}" registeredDate: "Дата регистрации" location: "Местоположение" theme: "Тема" diff --git a/locales/sk-SK.yml b/locales/sk-SK.yml index 49f494019..b7f4aba5e 100644 --- a/locales/sk-SK.yml +++ b/locales/sk-SK.yml @@ -258,6 +258,7 @@ remoteUserCaution: "Tieto informácie nemusia byť aktuálne, keďže používat activity: "Aktivita" images: "Obrázky" birthday: "Dátum narodenia" +yearsOld: "{age} rokov" registeredDate: "Dátum registrácie" location: "Lokalita" theme: "Téma" diff --git a/locales/uk-UA.yml b/locales/uk-UA.yml index f918bd984..9bffdf5a7 100644 --- a/locales/uk-UA.yml +++ b/locales/uk-UA.yml @@ -258,6 +258,7 @@ remoteUserCaution: "Інформація може бути неповною, о activity: "Активність" images: "Зображення" birthday: "День народження" +yearsOld: "{age} років" registeredDate: "Приєднався(лась)" location: "Локація" theme: "Тема" diff --git a/locales/vi-VN.yml b/locales/vi-VN.yml index af716775b..02ac99856 100644 --- a/locales/vi-VN.yml +++ b/locales/vi-VN.yml @@ -258,6 +258,7 @@ remoteUserCaution: "Vì người dùng này ở máy chủ khác, thông tin hi activity: "Hoạt động" images: "Hình ảnh" birthday: "Sinh nhật" +yearsOld: "{age} tuổi" registeredDate: "Tham gia" location: "Đến từ" theme: "Chủ đề" diff --git a/locales/zh-CN.yml b/locales/zh-CN.yml index b9b9b7475..a85cee466 100644 --- a/locales/zh-CN.yml +++ b/locales/zh-CN.yml @@ -258,6 +258,7 @@ remoteUserCaution: "由于此用户来自其它实例,显示的信息可能不 activity: "活动" images: "图片" birthday: "生日" +yearsOld: "{age}岁" registeredDate: "注册于" location: "位置" theme: "主题" diff --git a/locales/zh-TW.yml b/locales/zh-TW.yml index 556990842..dae242b3c 100644 --- a/locales/zh-TW.yml +++ b/locales/zh-TW.yml @@ -258,6 +258,7 @@ remoteUserCaution: "由於該使用者來自遠端實例,因此資訊可能非 activity: "動態" images: "圖片" birthday: "生日" +yearsOld: "{age}歲" registeredDate: "註冊日期" location: "位置" theme: "外觀主題" diff --git a/packages/client/src/components/birthday-date.vue b/packages/client/src/components/birthday-date.vue new file mode 100644 index 000000000..ad3a68ed7 --- /dev/null +++ b/packages/client/src/components/birthday-date.vue @@ -0,0 +1,18 @@ + + diff --git a/packages/client/src/pages/user/home.vue b/packages/client/src/pages/user/home.vue index 0e739ea21..1f60bbac6 100644 --- a/packages/client/src/pages/user/home.vue +++ b/packages/client/src/pages/user/home.vue @@ -51,7 +51,7 @@
{{ i18n.ts.birthday }}
-
+
{{ i18n.ts.registeredDate }}
@@ -112,6 +112,7 @@ import { defineAsyncComponent, onMounted, onUnmounted } from 'vue'; import * as misskey from 'foundkey-js'; import XUserTimeline from './index.timeline.vue'; import XNote from '@/components/note.vue'; +import MkBirthdayDate from '@/components/birthday-date.vue'; import MkFollowButton from '@/components/follow-button.vue'; import MkRemoteCaution from '@/components/remote-caution.vue'; import MkInfo from '@/components/ui/info.vue'; From 1d380ae3440662bc2d589dc0806caec25ea5f565 Mon Sep 17 00:00:00 2001 From: Francis Dinh Date: Sun, 28 Aug 2022 15:38:49 -0400 Subject: [PATCH 2/2] use i18n.t instead of $t --- packages/client/src/components/birthday-date.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/client/src/components/birthday-date.vue b/packages/client/src/components/birthday-date.vue index ad3a68ed7..675f3bca6 100644 --- a/packages/client/src/components/birthday-date.vue +++ b/packages/client/src/components/birthday-date.vue @@ -1,8 +1,9 @@