From 117f95799ba7683fd565b976df233bdd14465f94 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Fri, 2 Jun 2023 22:11:34 -0700 Subject: [PATCH] refactor: :recycle: sync note summaries --- locales/ar-SA.yml | 1 - locales/bn-BD.yml | 1 - locales/ca-ES.yml | 1 - locales/cs-CZ.yml | 1 - locales/da-DK.yml | 1 - locales/de-DE.yml | 1 - locales/el-GR.yml | 1 - locales/en-US.yml | 1 - locales/es-ES.yml | 1 - locales/fi.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/pt-PT.yml | 1 - locales/ro-RO.yml | 1 - locales/ru-RU.yml | 1 - locales/sk-SK.yml | 1 - locales/sv-SE.yml | 1 - locales/th-TH.yml | 1 - locales/uk-UA.yml | 1 - locales/vi-VN.yml | 1 - locales/zh-CN.yml | 1 - locales/zh-TW.yml | 1 - packages/backend/src/misc/get-note-summary.ts | 5 +++-- packages/client/src/scripts/get-note-summary.ts | 5 +++-- 30 files changed, 6 insertions(+), 32 deletions(-) diff --git a/locales/ar-SA.yml b/locales/ar-SA.yml index 148cd32a0..3ce83ebcc 100644 --- a/locales/ar-SA.yml +++ b/locales/ar-SA.yml @@ -176,7 +176,6 @@ operations: "الإجراءات" software: "البرمجية" version: "الإصدار" metadata: "البيانات الوصفية" -withNFiles: "{n} ملف (ملفات)" monitor: "شاشة التحكم" jobQueue: "قائمة الانتظار" cpuAndMemory: "وحدة المعالجة المركزية والذاكرة" diff --git a/locales/bn-BD.yml b/locales/bn-BD.yml index cde425d7f..f08e4bfc2 100644 --- a/locales/bn-BD.yml +++ b/locales/bn-BD.yml @@ -177,7 +177,6 @@ operations: "ক্রিয়াকলাপ" software: "সফটওয়্যার" version: "সংস্করণ" metadata: "মেটাডাটা" -withNFiles: "{n} টি ফাইল" monitor: "মনিটর" jobQueue: "জব কিউ" cpuAndMemory: "সিপিউ এবং মেমরি" diff --git a/locales/ca-ES.yml b/locales/ca-ES.yml index f438b4f9a..857caac1f 100644 --- a/locales/ca-ES.yml +++ b/locales/ca-ES.yml @@ -791,7 +791,6 @@ selectUser: Selecciona un usuari latestStatus: Últim estat storageUsage: Ús del emmagatzematge metadata: Metadades -withNFiles: '{n} fitxer(s)' monitor: Seguiment software: Programari version: Versió diff --git a/locales/cs-CZ.yml b/locales/cs-CZ.yml index 1d12e69ab..8b502762f 100644 --- a/locales/cs-CZ.yml +++ b/locales/cs-CZ.yml @@ -189,7 +189,6 @@ operations: "Operace" software: "Software" version: "Verze" metadata: "Metadata" -withNFiles: "{n} soubor(ů)" monitor: "Monitorovat" jobQueue: "Fronta úloh" cpuAndMemory: "CPU a paměť" diff --git a/locales/da-DK.yml b/locales/da-DK.yml index c6d339a2e..878273c65 100644 --- a/locales/da-DK.yml +++ b/locales/da-DK.yml @@ -117,7 +117,6 @@ operations: Operationer software: Software metadata: Metadata version: Version -withNFiles: '{n} fil(er)' monitor: Vagt jobQueue: Jobkø statistics: Statistik diff --git a/locales/de-DE.yml b/locales/de-DE.yml index 2a039af4c..45edbe045 100644 --- a/locales/de-DE.yml +++ b/locales/de-DE.yml @@ -200,7 +200,6 @@ operations: "Tätigkeiten" software: "Software" version: "Version" metadata: "Metadaten" -withNFiles: "{n} Datei(en)" monitor: "Überwachung" jobQueue: "Auftragswarteschlange" cpuAndMemory: "CPU und Speicher" diff --git a/locales/el-GR.yml b/locales/el-GR.yml index 57270f7aa..d444882b4 100644 --- a/locales/el-GR.yml +++ b/locales/el-GR.yml @@ -435,7 +435,6 @@ nothing: Δεν υπάρχει τίποτα να δείτε εδώ newNoteRecived: Υπάρχουν νέες δημοσιεύσεις passwordMatched: Ταιριάζει unmarkAsSensitive: Αναίρεση επισήμανσης ως Ευαίσθητο Περιεχόμενο (NSFW) -withNFiles: '{n} αρχείο(-α)' blockedUsers: Μπλοκαρισμένα μέλη noteDeleteConfirm: Θέλετε σίγουρα να διαγράψετε αυτή τη δημοσίευση; preview: Προεπισκόπηση diff --git a/locales/en-US.yml b/locales/en-US.yml index 5b6abcc35..127b2d0fe 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -211,7 +211,6 @@ operations: "Operations" software: "Software" version: "Version" metadata: "Metadata" -withNFiles: "{n} file(s)" monitor: "Monitor" jobQueue: "Job Queue" cpuAndMemory: "CPU and Memory" diff --git a/locales/es-ES.yml b/locales/es-ES.yml index 49f51bff6..2dc40f359 100644 --- a/locales/es-ES.yml +++ b/locales/es-ES.yml @@ -195,7 +195,6 @@ operations: "Operaciones" software: "Software" version: "Versión" metadata: "Metadatos" -withNFiles: "{n} archivos" monitor: "Monitor" jobQueue: "Cola de trabajos" cpuAndMemory: "CPU y Memoria" diff --git a/locales/fi.yml b/locales/fi.yml index ec7438096..aa9699cca 100644 --- a/locales/fi.yml +++ b/locales/fi.yml @@ -182,7 +182,6 @@ followsYou: Seuraa sinua pageLoadErrorDescription: Tämä yleensä johtuu verkkovirheistä tai selaimen välimuistista. Kokeile tyhjentämällä välimuisti ja yritä sitten hetken kuluttua uudelleen. enterListName: Anna listalle nimi -withNFiles: '{n} tiedosto(t)' instanceInfo: Instanssin tiedot clearQueue: Tyhjennä jono suspendConfirm: Oletko varma, että haluat keskeyttää tämän tilin? diff --git a/locales/fr-FR.yml b/locales/fr-FR.yml index e7416f577..dad095688 100644 --- a/locales/fr-FR.yml +++ b/locales/fr-FR.yml @@ -201,7 +201,6 @@ operations: "Opérations" software: "Logiciel" version: "Version" metadata: "Métadonnées" -withNFiles: "{n} fichier(s)" monitor: "Contrôle" jobQueue: "File d’attente" cpuAndMemory: "Processeur et mémoire" diff --git a/locales/id-ID.yml b/locales/id-ID.yml index 4caca4439..f9859c2c7 100644 --- a/locales/id-ID.yml +++ b/locales/id-ID.yml @@ -197,7 +197,6 @@ operations: "Tindakan" software: "Perangkat lunak" version: "Versi" metadata: "Metadata" -withNFiles: "{n} berkas" monitor: "Pantau" jobQueue: "Antrian kerja" cpuAndMemory: "CPU dan Memori" diff --git a/locales/it-IT.yml b/locales/it-IT.yml index 6dc4b68b5..ed3632ec6 100644 --- a/locales/it-IT.yml +++ b/locales/it-IT.yml @@ -175,7 +175,6 @@ operations: "Operazioni" software: "Software" version: "Versione" metadata: "Metadato" -withNFiles: "{n} file in allegato" monitor: "Monitorare" jobQueue: "Coda di lavoro" cpuAndMemory: "CPU e Memoria" diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 94454f3f9..1bbc38c49 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -188,7 +188,6 @@ operations: "操作" software: "ソフトウェア" version: "バージョン" metadata: "メタデータ" -withNFiles: "{n}つのファイル" monitor: "モニター" jobQueue: "ジョブキュー" cpuAndMemory: "CPUとメモリ" diff --git a/locales/ja-KS.yml b/locales/ja-KS.yml index d5c48276f..8a9b91486 100644 --- a/locales/ja-KS.yml +++ b/locales/ja-KS.yml @@ -177,7 +177,6 @@ operations: "操作" software: "ソフトウェア" version: "バージョン" metadata: "メタデータ" -withNFiles: "{n}個のファイル" monitor: "モニター" jobQueue: "ジョブキュー" cpuAndMemory: "CPUとメモリ" diff --git a/locales/ko-KR.yml b/locales/ko-KR.yml index 15e776faf..7143cf2f9 100644 --- a/locales/ko-KR.yml +++ b/locales/ko-KR.yml @@ -177,7 +177,6 @@ operations: "작업" software: "소프트웨어" version: "버전" metadata: "메타데이터" -withNFiles: "{n}개의 파일" monitor: "모니터" jobQueue: "작업 대기열" cpuAndMemory: "CPU와 메모리" diff --git a/locales/nl-NL.yml b/locales/nl-NL.yml index 49b737e91..115c003e3 100644 --- a/locales/nl-NL.yml +++ b/locales/nl-NL.yml @@ -179,7 +179,6 @@ operations: "Verwerkingen" software: "Software" version: "Versie" metadata: "Metadata" -withNFiles: "{n} bestand(en)" monitor: "Monitor" jobQueue: "Job Queue" cpuAndMemory: "CPU en geheugen" diff --git a/locales/pl-PL.yml b/locales/pl-PL.yml index 659e204af..a1b0f0c15 100644 --- a/locales/pl-PL.yml +++ b/locales/pl-PL.yml @@ -187,7 +187,6 @@ operations: "Działania" software: "Oprogramowanie" version: "Wersja" metadata: "Metadane" -withNFiles: "{n} plik(i/ów)" monitor: "Monitor" jobQueue: "Kolejka zadań" cpuAndMemory: "CPU i pamięć" diff --git a/locales/pt-PT.yml b/locales/pt-PT.yml index 2803df928..3e15beebb 100644 --- a/locales/pt-PT.yml +++ b/locales/pt-PT.yml @@ -177,7 +177,6 @@ operations: "operar" software: "Programas" version: "versão" metadata: "Metadados" -withNFiles: "{n} Um arquivo" monitor: "monitor" jobQueue: "Fila de trabalhos" cpuAndMemory: "CPU e memória" diff --git a/locales/ro-RO.yml b/locales/ro-RO.yml index 92a35ffa8..ba51950e3 100644 --- a/locales/ro-RO.yml +++ b/locales/ro-RO.yml @@ -177,7 +177,6 @@ operations: "Operațiuni" software: "Software" version: "Versiune" metadata: "Metadata" -withNFiles: "{n} fișier(e)" monitor: "Monitor" jobQueue: "coada de job-uri" cpuAndMemory: "CPU și memorie" diff --git a/locales/ru-RU.yml b/locales/ru-RU.yml index ad47d7d37..01b21b0fc 100644 --- a/locales/ru-RU.yml +++ b/locales/ru-RU.yml @@ -192,7 +192,6 @@ operations: "Операции" software: "Программы" version: "Версия" metadata: "Метаданные" -withNFiles: "Файлы, {n} шт" monitor: "Монитор" jobQueue: "Очередь заданий" cpuAndMemory: "Процессор и память" diff --git a/locales/sk-SK.yml b/locales/sk-SK.yml index a36caf1fd..462f34ed2 100644 --- a/locales/sk-SK.yml +++ b/locales/sk-SK.yml @@ -177,7 +177,6 @@ operations: "Operácie" software: "Softvér" version: "Verzia" metadata: "Metadáta" -withNFiles: "{n} súbor(ov)" monitor: "Monitor" jobQueue: "Fronta úloh" cpuAndMemory: "CPU a pamäť" diff --git a/locales/sv-SE.yml b/locales/sv-SE.yml index 993af2a23..6523ce068 100644 --- a/locales/sv-SE.yml +++ b/locales/sv-SE.yml @@ -176,7 +176,6 @@ operations: "Operationer" software: "Mjukvara" version: "Version" metadata: "Metadata" -withNFiles: "{n} fil(er)" monitor: "Övervakning" jobQueue: "Jobbkö" cpuAndMemory: "CPU och minne" diff --git a/locales/th-TH.yml b/locales/th-TH.yml index b6d81d8f5..9666737ee 100644 --- a/locales/th-TH.yml +++ b/locales/th-TH.yml @@ -177,7 +177,6 @@ operations: "ดำเนินการ" software: "ซอฟต์แวร์" version: "เวอร์ชั่น" metadata: "ข้อมูลเมตา" -withNFiles: "{n} ไฟล์(s)" monitor: "มอนิเตอร์" jobQueue: "คิวงาน" cpuAndMemory: "ซีพียู และ หน่วยความจำ" diff --git a/locales/uk-UA.yml b/locales/uk-UA.yml index 0368a0897..549dce666 100644 --- a/locales/uk-UA.yml +++ b/locales/uk-UA.yml @@ -177,7 +177,6 @@ operations: "Операції" software: "Програмне забезпечення" version: "Версія" metadata: "Метадані" -withNFiles: "файли: {n}" monitor: "Монітор" jobQueue: "Черга завдань" cpuAndMemory: "ЦП та пам'ять" diff --git a/locales/vi-VN.yml b/locales/vi-VN.yml index 7662af409..4b254fe94 100644 --- a/locales/vi-VN.yml +++ b/locales/vi-VN.yml @@ -177,7 +177,6 @@ operations: "Vận hành" software: "Phần mềm" version: "Phiên bản" metadata: "Metadata" -withNFiles: "{n} tập tin" monitor: "Giám sát" jobQueue: "Công việc chờ xử lý" cpuAndMemory: "CPU và Dung lượng" diff --git a/locales/zh-CN.yml b/locales/zh-CN.yml index 8ca19e596..5359cb6ef 100644 --- a/locales/zh-CN.yml +++ b/locales/zh-CN.yml @@ -181,7 +181,6 @@ operations: "操作" software: "软件" version: "版本" metadata: "元数据" -withNFiles: "{n}个文件" monitor: "服务器状态" jobQueue: "作业队列" cpuAndMemory: "CPU和内存" diff --git a/locales/zh-TW.yml b/locales/zh-TW.yml index fd5117f48..61b5afbe6 100644 --- a/locales/zh-TW.yml +++ b/locales/zh-TW.yml @@ -180,7 +180,6 @@ operations: "操作" software: "軟體" version: "版本" metadata: "元資料" -withNFiles: "{n}個檔案" monitor: "監視器" jobQueue: "佇列" cpuAndMemory: "CPU及記憶體用量" diff --git a/packages/backend/src/misc/get-note-summary.ts b/packages/backend/src/misc/get-note-summary.ts index 446e3fc14..285dcffd3 100644 --- a/packages/backend/src/misc/get-note-summary.ts +++ b/packages/backend/src/misc/get-note-summary.ts @@ -20,12 +20,13 @@ export const getNoteSummary = (note: Packed<"Note">): string => { // ファイルが添付されているとき if ((note.files || []).length !== 0) { - summary += ` (📎${note.files!.length})`; + const len = note.files?.length; + summary += ` 📎 (${len !== 1 ? len : ''})`; } // 投票が添付されているとき if (note.poll) { - summary += " (📊)"; + summary += " 📊"; } /* diff --git a/packages/client/src/scripts/get-note-summary.ts b/packages/client/src/scripts/get-note-summary.ts index 43bd1d3b9..4333bd6f0 100644 --- a/packages/client/src/scripts/get-note-summary.ts +++ b/packages/client/src/scripts/get-note-summary.ts @@ -23,12 +23,13 @@ export const getNoteSummary = (note: misskey.entities.Note): string => { // ファイルが添付されているとき if ((note.files || []).length !== 0) { - summary += ` (${i18n.t("withNFiles", { n: note.files.length })})`; + const len = note.files?.length; + summary += ` 📎 (${len !== 1 ? len : ''})`; } // 投票が添付されているとき if (note.poll) { - summary += ` (${i18n.ts.poll})`; + summary += " 📊"; } /*