diff --git a/.vscode/settings.json b/.vscode/settings.json index 0987a409..6c710a8c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -19,5 +19,9 @@ "i18n-ally.keystyle": "nested", "i18n-ally.sourceLanguage": "en-US", "i18n-ally.preferredDelimiter": "_", - "i18n-ally.sortKeys": true + "i18n-ally.sortKeys": true, + "i18n-ally.keysInUse": [ + "time_ago_options.*", + "visibility.*" + ] } diff --git a/components/status/edit/StatusEditHistory.vue b/components/status/edit/StatusEditHistory.vue index a7f9fe39..6891b334 100644 --- a/components/status/edit/StatusEditHistory.vue +++ b/components/status/edit/StatusEditHistory.vue @@ -1,5 +1,6 @@ <script setup lang="ts"> import type { Status, StatusEdit } from 'masto' +import { formatTimeAgo } from '@vueuse/core' const { status } = defineProps<{ status: Status @@ -23,9 +24,17 @@ const timeAgoOptions = useTimeAgoOptions() @click="showHistory(edit)" > {{ getDisplayName(edit.account) }} - <i18n-t :keypath="`status_history.${idx === statusEdits.length - 1 ? 'created' : 'edited'}`"> - {{ useTimeAgo(edit.createdAt, timeAgoOptions).value }} - </i18n-t> + + <template v-if="idx === statusEdits.length - 1"> + <i18n-t keypath="status_history.created"> + {{ formatTimeAgo(new Date(edit.createdAt), timeAgoOptions) }} + </i18n-t> + </template> + <template v-else> + <i18n-t keypath="status_history.edited"> + {{ formatTimeAgo(new Date(edit.createdAt), timeAgoOptions) }} + </i18n-t> + </template> </CommonDropdownItem> </template> <template v-else> diff --git a/locales/ar-EG.json b/locales/ar-EG.json index 982c872a..333c7b72 100644 --- a/locales/ar-EG.json +++ b/locales/ar-EG.json @@ -57,7 +57,6 @@ "activate": "تفعيل", "complete": "أكمل", "compose_desc": "اكتب منشور جديد", - "lang": "اللغات", "n-people-in-the-past-n-days": "{0} أشخاص في الأيام ال {1} الماضية", "select_lang": "اختار اللغة", "sign_in_desc": "إضافة حساب قائم", @@ -181,8 +180,6 @@ }, "pwa": { "dismiss": "تجاهل", - "message": "@:pwa.title{','} اضغط على @:pwa.reload الزر للتحديث", - "reload": "تحديث", "title": "يتوفر تحديث Elk الجديد" }, "search": { @@ -228,7 +225,6 @@ "edited": "تم تعديله في {0}" }, "tab": { - "accounts": "الحسابات", "for_you": "مصممة لك", "hashtags": "هاشتاغ", "media": "الصور/الفيديو", diff --git a/locales/cs-CZ.json b/locales/cs-CZ.json index c4704a9c..a9b741c0 100644 --- a/locales/cs-CZ.json +++ b/locales/cs-CZ.json @@ -53,7 +53,6 @@ "activate": "Aktivovat", "complete": "Dokončit", "compose_desc": "Napsat příspěvek", - "lang": "Jazyky", "n-people-in-the-past-n-days": "{0} lidí v posledních {1} dnech", "select_lang": "Vybrat jazyk", "sign_in_desc": "Přidat existující účet", diff --git a/locales/de-DE.json b/locales/de-DE.json index 64a3a2a4..d0a39b48 100644 --- a/locales/de-DE.json +++ b/locales/de-DE.json @@ -53,7 +53,6 @@ "activate": "Aktivieren", "complete": "Vollständig", "compose_desc": "Schreib einen neuen Beitrag", - "lang": "Sprache", "n-people-in-the-past-n-days": "{0} Personen in den vergangenen {1} Tagen", "select_lang": "Sprache auswählen", "sign_in_desc": "Bestehenden Nutzer hinzufügen", @@ -187,7 +186,6 @@ "edited": "Bearbeitet: {0}" }, "tab": { - "accounts": "Nutzer", "for_you": "Für dich", "hashtags": "Hashtags", "media": "Medien", diff --git a/locales/en-US.json b/locales/en-US.json index af43d6dd..9d83ea5f 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -73,7 +73,6 @@ "activate": "Activate", "complete": "Complete", "compose_desc": "Write a new post", - "lang": "Languages", "n-people-in-the-past-n-days": "{0} people in the past {1} days", "select_lang": "Select language", "sign_in_desc": "Add an existing account", @@ -204,8 +203,6 @@ }, "pwa": { "dismiss": "Dismiss", - "message": "@:pwa.title{','} click on the @:pwa.reload button to update.", - "reload": "Reload", "title": "New Elk update available!", "update": "Update", "update_available_short": "Update Elk" @@ -282,7 +279,6 @@ "edited": "edited {0}" }, "tab": { - "accounts": "Accounts", "for_you": "For you", "hashtags": "Hashtags", "media": "Media", diff --git a/locales/es-ES.json b/locales/es-ES.json index 526044ca..872d1f2d 100644 --- a/locales/es-ES.json +++ b/locales/es-ES.json @@ -71,7 +71,6 @@ "activate": "Activar", "complete": "Completar", "compose_desc": "Escribir una nueva publicación", - "lang": "Idiomas", "n-people-in-the-past-n-days": "{0} personas en los últimos {1} días", "select_lang": "Seleccionar idioma", "sign_in_desc": "Agregar una cuenta existente", @@ -198,8 +197,6 @@ }, "pwa": { "dismiss": "Descartar", - "message": "@:pwa.title{','} haz click en el botón @:pwa.reload para actualizar.", - "reload": "Recargar", "title": "Nueva versión de Elk disponible" }, "search": { @@ -246,7 +243,6 @@ "edited": "editado el {0}" }, "tab": { - "accounts": "Cuentas", "for_you": "Para ti", "hashtags": "Etiquetas", "media": "Multimedia", diff --git a/locales/fr-FR.json b/locales/fr-FR.json index d378f945..c6cd9979 100644 --- a/locales/fr-FR.json +++ b/locales/fr-FR.json @@ -70,7 +70,6 @@ "activate": "Activer", "complete": "Compléter", "compose_desc": "Écrire un nouveau message", - "lang": "Langages", "n-people-in-the-past-n-days": "{0} personnes dans les {1} jours", "select_lang": "Sélectionner langue", "sign_in_desc": "Ajouter un compte existant", @@ -196,8 +195,6 @@ }, "pwa": { "dismiss": "Fermer", - "message": "@:pwa.title{','} cliquez sur le bouton @:pwa.reload pour mettre à jour.", - "reload": "Recharger", "title": "Nouvelle mise à jour Elk disponible !", "update": "Mettre à jour", "update_available_short": "Mettre à jour Elk" @@ -245,7 +242,6 @@ "edited": "a édité {0}" }, "tab": { - "accounts": "Comptes", "for_you": "Pour vous", "hashtags": "Hashtags", "media": "Média", diff --git a/locales/ja-JP.json b/locales/ja-JP.json index 4a153882..d2a44c5d 100644 --- a/locales/ja-JP.json +++ b/locales/ja-JP.json @@ -78,7 +78,6 @@ "uploading": "更新中..." }, "tab": { - "accounts": "アカウント", "hashtags": "ハッシュタグ", "media": "メディア", "posts": "投稿", diff --git a/locales/zh-CN.json b/locales/zh-CN.json index fa010d28..72d3e538 100644 --- a/locales/zh-CN.json +++ b/locales/zh-CN.json @@ -60,7 +60,6 @@ "activate": "执行", "complete": "完成", "compose_desc": "写一条新帖文", - "lang": "语言", "n-people-in-the-past-n-days": "{0} 人在过去 {1} 天", "select_lang": "选择语言", "sign_in_desc": "添加现有帐户", @@ -189,8 +188,6 @@ }, "pwa": { "dismiss": "忽略", - "message": "@:{'pwa.title'},点击@:{'pwa.reload'}按钮来更新。", - "reload": "重启", "title": "鹿鸣存在新的更新" }, "search": { @@ -199,7 +196,7 @@ "settings": { "feature_flags": { "avatar_on_avatar": "头像堆叠", - "github_cards": "Github 卡片", + "github_cards": "GitHub 卡片", "user_switcher_sidebar": "用户切换侧边栏", "virtual_scroll": "虚拟滚动" }, @@ -254,7 +251,6 @@ "edited": "在 {0} 编辑了" }, "tab": { - "accounts": "账号", "for_you": "推荐关注", "hashtags": "话题标签", "media": "媒体", diff --git a/pages/notifications.vue b/pages/notifications.vue index db4c6a63..dbbbde64 100644 --- a/pages/notifications.vue +++ b/pages/notifications.vue @@ -38,7 +38,7 @@ onActivated(() => { <button flex rounded-4 p1 hover:bg-active cursor-pointer transition-100 - :title="$t(showSettings ? 'notification.settings.close_btn' : 'notification.settings.show_btn')" + :title="showSettings ? t('notification.settings.close_btn') : t('notification.settings.show_btn')" @click="showSettings = !showSettings" > <span aria-hidden="true" w-1.75em h-1.75em :class="showSettings ? 'i-ri:close-line' : 'i-ri:settings-line'" />