From 385f31df298b0061f3fe6cf9d06a3fc35d75fb52 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Sun, 18 Jun 2023 20:34:57 -0700 Subject: [PATCH] refactor: :recycle: better edited timestamp display --- locales/ca-ES.yml | 2 +- locales/cs-CZ.yml | 2 +- locales/da-DK.yml | 2 +- locales/de-DE.yml | 2 +- locales/en-US.yml | 2 +- locales/es-ES.yml | 2 +- locales/fi.yml | 2 +- locales/fr-FR.yml | 2 +- locales/ja-JP.yml | 4 ++-- locales/nl-NL.yml | 2 +- locales/pl-PL.yml | 2 +- locales/pt_BR.yml | 2 +- locales/ru-RU.yml | 2 +- locales/zh-TW.yml | 2 +- .../client/src/components/MkNoteHeader.vue | 24 +++++++++++-------- .../client/src/components/global/MkTime.vue | 2 +- packages/client/src/pages/user/home.vue | 9 +++++-- 17 files changed, 37 insertions(+), 28 deletions(-) diff --git a/locales/ca-ES.yml b/locales/ca-ES.yml index 2cba104ac..54de37d8b 100644 --- a/locales/ca-ES.yml +++ b/locales/ca-ES.yml @@ -2060,7 +2060,7 @@ _relayStatus: rejected: Rebutjat deleted: Eliminat editNote: Edita la nota -edited: Editat +edited: 'Editat a {date} {time}' findOtherInstance: Cercar un altre servidor signupsDisabled: Actualment, les inscripcions en aquest servidor estan desactivades, però sempre podeu registrar-vos en un altre servidor. Si teniu un codi d'invitació diff --git a/locales/cs-CZ.yml b/locales/cs-CZ.yml index 1fe16135e..e6394f3ee 100644 --- a/locales/cs-CZ.yml +++ b/locales/cs-CZ.yml @@ -963,7 +963,7 @@ disablingTimelinesInfo: Administrátoři a moderátoři budou vždy mít příst časovým osám, i pokud jsou vypnuté. deleted: Vymazáno editNote: Upravit poznámku -edited: Upraveno +edited: 'Upraveno dne {date} {time}' silencedInstancesDescription: Vypište hostnames instancí, které chcete ztlumit. Účty v uvedených instancích jsou považovány za "ztlumené", mohou pouze zadávat požadavky na sledování a nemohou zmiňovat místní účty, pokud nejsou sledovány. Na blokované diff --git a/locales/da-DK.yml b/locales/da-DK.yml index 6e8380891..f0e6523eb 100644 --- a/locales/da-DK.yml +++ b/locales/da-DK.yml @@ -83,7 +83,7 @@ deleteAndEditConfirm: Er du sikker på at du vil slet denne opslag og ændre det vil tabe alle reaktioner, forstærkninger og svarer indenfor denne opslag. editNote: Ændre note deleted: Slettet -edited: Ændret +edited: 'Ændret den {date} {time}' sendMessage: Send en besked youShouldUpgradeClient: Til at vise denne side, vær sød at refresh til at opdatere din brugerenhed. diff --git a/locales/de-DE.yml b/locales/de-DE.yml index e8615b6f5..ba525cf6c 100644 --- a/locales/de-DE.yml +++ b/locales/de-DE.yml @@ -1972,7 +1972,7 @@ silencedInstancesDescription: Liste die Hostnamen der Server auf, die du stummsc wenn sie nicht gefolgt werden. Dies wirkt sich nicht auf die blockierten Server aus. editNote: Beitrag bearbeiten -edited: Bearbeitet +edited: 'Bearbeitet um {date} {time}' silenceThisInstance: Diesen Server stummschalten silencedInstances: Stummgeschaltete Server silenced: Stummgeschaltet diff --git a/locales/en-US.yml b/locales/en-US.yml index 8d2d5e323..cd29cebda 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -52,7 +52,7 @@ deleteAndEdit: "Delete and edit" deleteAndEditConfirm: "Are you sure you want to delete this post and edit it? You will lose all reactions, boosts and replies to it." editNote: "Edit note" -edited: "Edited" +edited: "Edited at {date} {time}" addToList: "Add to list" sendMessage: "Send a message" copyUsername: "Copy username" diff --git a/locales/es-ES.yml b/locales/es-ES.yml index a4016b7bb..6d1d88ffe 100644 --- a/locales/es-ES.yml +++ b/locales/es-ES.yml @@ -1922,7 +1922,7 @@ apps: Aplicaciones migration: Migración silenced: Silenciado deleted: Eliminado -edited: Editado +edited: 'Editado a las {date} {time}' editNote: Editar nota silenceThisInstance: Silenciar esta instancia findOtherInstance: Buscar otro servidor diff --git a/locales/fi.yml b/locales/fi.yml index aa9699cca..9646231f4 100644 --- a/locales/fi.yml +++ b/locales/fi.yml @@ -831,7 +831,7 @@ makeReactionsPublic: Aseta reaktiohistoria julkiseksi unread: Lukematon deleted: Poistettu editNote: Muokkaa viestiä -edited: Muokattu +edited: 'Muokattu klo {date} {time}' avoidMultiCaptchaConfirm: Useiden Captcha-järjestelmien käyttö voi aiheuttaa häiriöitä niiden välillä. Haluatko poistaa käytöstä muut tällä hetkellä käytössä olevat Captcha-järjestelmät? Jos haluat, että ne pysyvät käytössä, paina peruutusnäppäintä. diff --git a/locales/fr-FR.yml b/locales/fr-FR.yml index 2e6b1400f..5a61870c4 100644 --- a/locales/fr-FR.yml +++ b/locales/fr-FR.yml @@ -2022,7 +2022,7 @@ silencedInstances: Instances silencieuses silenced: Silencieux deleted: Effacé editNote: Modifier note -edited: Modifié +edited: 'Modifié à {date} {time}' flagShowTimelineRepliesDescription: Si activé, affiche dans le fil les réponses des personnes aux publications des autres. _experiments: diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index afd290b8c..617930db1 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1889,13 +1889,13 @@ _experiments: enablePostEditing: 投稿の編集機能を有効にする title: 試験的な機能 postEditingCaption: 投稿のメニューに既存の投稿を編集するボタンを表示し、他サーバーの編集も受信できるようにします。 - postImportsCaption: + postImportsCaption: ユーザーが過去の投稿をCalckey・Misskey・Mastodon・Akkoma・Pleromaからインポートすることを許可します。キューが溜まっているときにインポートするとサーバーに負荷がかかる可能性があります。 enablePostImports: 投稿のインポートを有効にする sendModMail: モデレーション通知を送る deleted: 削除済み editNote: 投稿を編集 -edited: 編集済み +edited: '編集済み: {date} {time}' signupsDisabled: 現在、このサーバーでは新規登録が一般開放されていません。招待コードをお持ちの場合には、以下の欄に入力してください。招待コードをお持ちでない場合にも、新規登録を開放している他のサーバーには入れますよ! findOtherInstance: 他のサーバーを探す diff --git a/locales/nl-NL.yml b/locales/nl-NL.yml index 32cd0b730..45bc36278 100644 --- a/locales/nl-NL.yml +++ b/locales/nl-NL.yml @@ -413,7 +413,7 @@ selectList: Selecteer een lijst selectAntenna: Selecteer een antenne deleted: Verwijderd editNote: Bewerk notitie -edited: Bewerkt +edited: 'Bewerkt om {date} {time}' emojis: Emojis emojiName: Emoji naam emojiUrl: Emoji URL diff --git a/locales/pl-PL.yml b/locales/pl-PL.yml index e82d8532e..571f6af95 100644 --- a/locales/pl-PL.yml +++ b/locales/pl-PL.yml @@ -1998,7 +1998,7 @@ silenceThisInstance: Wycisz ten serwer silencedInstances: Wyciszone serwery deleted: Usunięte editNote: Edytuj wpis -edited: Edytowany +edited: 'Edytowano o {date} {time}' silenced: Wyciszony findOtherInstance: Znajdź inny serwer userSaysSomethingReasonReply: '{name} odpowiedział na wpis zawierający {reason}' diff --git a/locales/pt_BR.yml b/locales/pt_BR.yml index a02b7069e..2cc22c86a 100644 --- a/locales/pt_BR.yml +++ b/locales/pt_BR.yml @@ -30,7 +30,7 @@ showLess: Fechar importRequested: Você requisitou uma importação. Isso pode demorar um pouco. listsDesc: Listas deixam você criar linhas do tempo com usuários específicos. Elas podem ser acessadas pela página de linhas do tempo. -edited: Editado +edited: 'Editado às {date} {time}' sendMessage: Enviar uma mensagem older: antigo createList: Criar lista diff --git a/locales/ru-RU.yml b/locales/ru-RU.yml index fe90f23d9..8b3e05a17 100644 --- a/locales/ru-RU.yml +++ b/locales/ru-RU.yml @@ -1987,5 +1987,5 @@ apps: Приложения silenceThisInstance: Заглушить инстанс silencedInstances: Заглушенные инстансы editNote: Редактировать заметку -edited: Редактировано +edited: 'Редактировано в {date} {time}' deleted: Удалённое diff --git a/locales/zh-TW.yml b/locales/zh-TW.yml index b4a9fea96..d373daf5d 100644 --- a/locales/zh-TW.yml +++ b/locales/zh-TW.yml @@ -1829,7 +1829,7 @@ indexPosts: 索引帖子 indexNotice: 現在開始索引。 這可能需要一段時間,請不要在一個小時內重啟你的伺服器。 deleted: 已刪除 editNote: 編輯筆記 -edited: 已修改 +edited: '於 {date} {time} 編輯' userSaysSomethingReason: '{name} 說了 {reason}' allowedInstancesDescription: 要加入聯邦白名單的服務器,每台伺服器用新行分隔(僅適用於私有模式)。 defaultReaction: 默認的表情符號反應 diff --git a/packages/client/src/components/MkNoteHeader.vue b/packages/client/src/components/MkNoteHeader.vue index dc8b71d93..b25ffa329 100644 --- a/packages/client/src/components/MkNoteHeader.vue +++ b/packages/client/src/components/MkNoteHeader.vue @@ -18,17 +18,21 @@
- - - + v-tooltip.noDelay=" + i18n.t('edited', { + date: new Date( + note.updatedAt + ).toLocaleDateString(), + time: new Date( + note.updatedAt + ).toLocaleTimeString(), + }) + " + class="ph-pencil ph-bold" + style="margin-left: 0.4rem" + >
diff --git a/packages/client/src/components/global/MkTime.vue b/packages/client/src/components/global/MkTime.vue index db53248bb..5d9295433 100644 --- a/packages/client/src/components/global/MkTime.vue +++ b/packages/client/src/components/global/MkTime.vue @@ -16,7 +16,7 @@ import { i18n } from "@/i18n"; const props = withDefaults( defineProps<{ time: Date | string; - mode?: "relative" | "absolute" | "detail" | "none"; + mode?: "relative" | "absolute" | "detail"; }>(), { mode: "relative", diff --git a/packages/client/src/pages/user/home.vue b/packages/client/src/pages/user/home.vue index ab39ac63f..9e9dfcc7c 100644 --- a/packages/client/src/pages/user/home.vue +++ b/packages/client/src/pages/user/home.vue @@ -174,8 +174,13 @@