From 6cfadd7f7cc20450658af82331be4711c2b85876 Mon Sep 17 00:00:00 2001 From: Xabi <888924+xabirequejo@users.noreply.github.com> Date: Tue, 31 Dec 2024 10:46:13 +0100 Subject: [PATCH 1/4] feat(i18n): update eu-ES.json (#3116) --- locales/eu-ES.json | 1 + 1 file changed, 1 insertion(+) diff --git a/locales/eu-ES.json b/locales/eu-ES.json index ef1d34bc..822e3f17 100644 --- a/locales/eu-ES.json +++ b/locales/eu-ES.json @@ -633,6 +633,7 @@ "dismiss": "Baztertu", "read": "Irakurri {0} deskribapena" }, + "pinned": "Finkatutako bidalketa", "poll": { "count": "{0} boto|boto {0}|{0} boto", "ends": "epemuga: {0}", From e986de7f6c2c9b67e8ff7e3ca7fad8d2a636a7a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Thu, 2 Jan 2025 07:16:48 +0100 Subject: [PATCH 2/4] feat(i18n): add missing Spanish timeline and status translations (#3121) --- locales/es-419.json | 1 + locales/es.json | 2 ++ 2 files changed, 3 insertions(+) diff --git a/locales/es-419.json b/locales/es-419.json index ee90c93c..3c41df95 100644 --- a/locales/es-419.json +++ b/locales/es-419.json @@ -188,6 +188,7 @@ "attachments_limit_video_error": "Tamaño máximo de video excedido: {0}" }, "status": { + "pinned": "Publicaciones ancladas", "spoiler_show_less": "Menos" }, "tab": { diff --git a/locales/es.json b/locales/es.json index 4fc60762..23f700f1 100644 --- a/locales/es.json +++ b/locales/es.json @@ -633,6 +633,7 @@ "dismiss": "Descartar", "read": "Leer la descripción de la imagen {0}" }, + "pinned": "Publicaciones fijadas", "poll": { "count": "{0} votos|{0} voto|{0} votos", "ends": "finaliza {0}", @@ -713,6 +714,7 @@ "year_past": "hace 0 años|el año pasado|hace {n} años" }, "timeline": { + "no_posts": "¡No hay publicaciones aquí!", "show_new_items": "Mostrar {v} nuevas publicaciones|Mostrar {v} nueva publicación|Mostrar {v} nuevas publicaciones", "view_older_posts": "Es posible que no se muestren las publicaciones antiguas de otras instancias." }, From e59f5dbb8ff481ecadad59dc8a445c8534da5a49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Fri, 3 Jan 2025 01:52:04 +0100 Subject: [PATCH 3/4] fix(rtl): replace ellipsis span anchor content with bdi (#3123) --- composables/content-render.ts | 36 +++++++++++++++---- .../__snapshots__/content-rich.test.ts.snap | 2 +- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/composables/content-render.ts b/composables/content-render.ts index 5e029d07..4062b0a1 100644 --- a/composables/content-render.ts +++ b/composables/content-render.ts @@ -60,16 +60,40 @@ export function nodeToVNode(node: Node): VNode | string | null { } if ('children' in node) { - if (node.name === 'a' && (node.attributes.href?.startsWith('/') || node.attributes.href?.startsWith('.'))) { - node.attributes.to = node.attributes.href + if (node.name === 'a') { + if (node.attributes.href?.startsWith('/') || node.attributes.href?.startsWith('.')) { + node.attributes.to = node.attributes.href - const { href: _href, target: _target, ...attrs } = node.attributes + const { href: _href, target: _target, ...attrs } = node.attributes + return h( + RouterLink as any, + attrs, + () => node.children.map(treeToVNode), + ) + } + + // fix #3122 return h( - RouterLink as any, - attrs, - () => node.children.map(treeToVNode), + node.name, + node.attributes, + node.children.map((n: Node) => { + // replace span.ellipsis with bdi.ellipsis inside links + if (n && n.type === ELEMENT_NODE && n.name !== 'bdi' && n.attributes?.class?.includes('ellipsis')) { + const children = n.children.splice(0, n.children.length) + const bdi = { + ...n, + name: 'bdi', + children, + } satisfies ElementNode + children.forEach((n: Node) => n.parent = bdi) + return treeToVNode(bdi) + } + + return treeToVNode(n) + }), ) } + return h( node.name, node.attributes, diff --git a/tests/nuxt/__snapshots__/content-rich.test.ts.snap b/tests/nuxt/__snapshots__/content-rich.test.ts.snap index 74f93d14..4e99489c 100644 --- a/tests/nuxt/__snapshots__/content-rich.test.ts.snap +++ b/tests/nuxt/__snapshots__/content-rich.test.ts.snap @@ -257,7 +257,7 @@ exports[`content-rich > link + mention 1`] = ` rel="nofollow noopener noreferrer" target="_blank" >github.com/ayoayco/astro-reactgithub.com/ayoayco/astro-react

From 154fdaaad95c5dd57d056c08f2986a7f1f068f4a Mon Sep 17 00:00:00 2001 From: "@beer" <47961062+iiio2@users.noreply.github.com> Date: Sat, 4 Jan 2025 12:15:25 +0600 Subject: [PATCH 4/4] chore(utils): remove unnecessary `await` (#3124) --- server/utils/shared.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/utils/shared.ts b/server/utils/shared.ts index f7998664..382d9d50 100644 --- a/server/utils/shared.ts +++ b/server/utils/shared.ts @@ -92,7 +92,7 @@ export async function deleteApp(server: string) { export async function listServers() { const keys = await storage.getKeys('servers:v3:') const servers = new Set() - for await (const key of keys) { + for (const key of keys) { const id = key.split(':')[2] if (id) servers.add(id.toLocaleLowerCase())