From dbe12c0d340972ba202bb6a0c723abca02ec7f60 Mon Sep 17 00:00:00 2001 From: L01D <45131480+IL01DI@users.noreply.github.com> Date: Mon, 1 Jul 2024 06:03:45 +0200 Subject: [PATCH] i18n: Improving Spanish & adding Catalan and British English (#1240) * Create en-GB * Rename en-GB to en-GB.ts * Update es-ES.ts * Update es-ES.ts * Create ca-ES.ts * Update es-ES.ts * Update index.ts * Update index.ts * Update index.ts * Update es-ES.ts --- quartz/i18n/index.ts | 3 ++ quartz/i18n/locales/ca-ES.ts | 84 ++++++++++++++++++++++++++++++++++++ quartz/i18n/locales/en-GB.ts | 84 ++++++++++++++++++++++++++++++++++++ quartz/i18n/locales/es-ES.ts | 14 +++--- 4 files changed, 178 insertions(+), 7 deletions(-) create mode 100644 quartz/i18n/locales/ca-ES.ts create mode 100644 quartz/i18n/locales/en-GB.ts diff --git a/quartz/i18n/index.ts b/quartz/i18n/index.ts index eab1f1a78..5ab52b83e 100644 --- a/quartz/i18n/index.ts +++ b/quartz/i18n/index.ts @@ -6,6 +6,7 @@ import ja from "./locales/ja-JP" import de from "./locales/de-DE" import nl from "./locales/nl-NL" import ro from "./locales/ro-RO" +import ca from "./locales/ca-ES" import es from "./locales/es-ES" import ar from "./locales/ar-SA" import uk from "./locales/uk-UA" @@ -20,6 +21,7 @@ import pl from "./locales/pl-PL" export const TRANSLATIONS = { "en-US": en, + "en-GB": en, "fr-FR": fr, "it-IT": it, "ja-JP": ja, @@ -28,6 +30,7 @@ export const TRANSLATIONS = { "nl-BE": nl, "ro-RO": ro, "ro-MD": ro, + "ca-ES": ca, "es-ES": es, "ar-SA": ar, "ar-AE": ar, diff --git a/quartz/i18n/locales/ca-ES.ts b/quartz/i18n/locales/ca-ES.ts new file mode 100644 index 000000000..aadbd4157 --- /dev/null +++ b/quartz/i18n/locales/ca-ES.ts @@ -0,0 +1,84 @@ +import { Translation } from "./definition" + +export default { + propertyDefaults: { + title: "Sense títol", + description: "Sense descripció", + }, + components: { + callout: { + note: "Nota", + abstract: "Resum", + info: "Informació", + todo: "Per fer", + tip: "Consell", + success: "Èxit", + question: "Pregunta", + warning: "Advertència", + failure: "Fall", + danger: "Perill", + bug: "Error", + example: "Exemple", + quote: "Cita", + }, + backlinks: { + title: "Retroenllaç", + noBacklinksFound: "No s'han trobat retroenllaços", + }, + themeToggle: { + lightMode: "Mode clar", + darkMode: "Mode fosc", + }, + explorer: { + title: "Explorador", + }, + footer: { + createdWith: "Creat amb", + }, + graph: { + title: "Vista Gràfica", + }, + recentNotes: { + title: "Notes Recents", + seeRemainingMore: ({ remaining }) => `Vegi ${remaining} més →`, + }, + transcludes: { + transcludeOf: ({ targetSlug }) => `Transcluit de ${targetSlug}`, + linkToOriginal: "Enllaç a l'original", + }, + search: { + title: "Cercar", + searchBarPlaceholder: "Cerca alguna cosa", + }, + tableOfContents: { + title: "Taula de Continguts", + }, + contentMeta: { + readingTime: ({ minutes }) => `Es llegeix en ${minutes} min`, + }, + }, + pages: { + rss: { + recentNotes: "Notes recents", + lastFewNotes: ({ count }) => `Últimes ${count} notes`, + }, + error: { + title: "No s'ha trobat.", + notFound: "Aquesta pàgina és privada o no existeix.", + home: "Torna a la pàgina principal", + }, + folderContent: { + folder: "Carpeta", + itemsUnderFolder: ({ count }) => + count === 1 ? "1 article en aquesta carpeta." : `${count} articles en esta carpeta.`, + }, + tagContent: { + tag: "Etiqueta", + tagIndex: "índex d'Etiquetes", + itemsUnderTag: ({ count }) => + count === 1 ? "1 article amb aquesta etiqueta." : `${count} article amb aquesta etiqueta.`, + showingFirst: ({ count }) => `Mostrant les primeres ${count} etiquetes.`, + totalTags: ({ count }) => `S'han trobat ${count} etiquetes en total.`, + }, + }, +} as const satisfies Translation diff --git a/quartz/i18n/locales/en-GB.ts b/quartz/i18n/locales/en-GB.ts new file mode 100644 index 000000000..5388b032c --- /dev/null +++ b/quartz/i18n/locales/en-GB.ts @@ -0,0 +1,84 @@ +import { Translation } from "./definition" + +export default { + propertyDefaults: { + title: "Untitled", + description: "No description provided", + }, + components: { + callout: { + note: "Note", + abstract: "Abstract", + info: "Info", + todo: "To-Do", + tip: "Tip", + success: "Success", + question: "Question", + warning: "Warning", + failure: "Failure", + danger: "Danger", + bug: "Bug", + example: "Example", + quote: "Quote", + }, + backlinks: { + title: "Backlinks", + noBacklinksFound: "No backlinks found", + }, + themeToggle: { + lightMode: "Light mode", + darkMode: "Dark mode", + }, + explorer: { + title: "Explorer", + }, + footer: { + createdWith: "Created with", + }, + graph: { + title: "Graph View", + }, + recentNotes: { + title: "Recent Notes", + seeRemainingMore: ({ remaining }) => `See ${remaining} more →`, + }, + transcludes: { + transcludeOf: ({ targetSlug }) => `Transclude of ${targetSlug}`, + linkToOriginal: "Link to original", + }, + search: { + title: "Search", + searchBarPlaceholder: "Search for something", + }, + tableOfContents: { + title: "Table of Contents", + }, + contentMeta: { + readingTime: ({ minutes }) => `${minutes} min read`, + }, + }, + pages: { + rss: { + recentNotes: "Recent notes", + lastFewNotes: ({ count }) => `Last ${count} notes`, + }, + error: { + title: "Not Found", + notFound: "Either this page is private or doesn't exist.", + home: "Return to Homepage", + }, + folderContent: { + folder: "Folder", + itemsUnderFolder: ({ count }) => + count === 1 ? "1 item under this folder." : `${count} items under this folder.`, + }, + tagContent: { + tag: "Tag", + tagIndex: "Tag Index", + itemsUnderTag: ({ count }) => + count === 1 ? "1 item with this tag." : `${count} items with this tag.`, + showingFirst: ({ count }) => `Showing first ${count} tags.`, + totalTags: ({ count }) => `Found ${count} total tags.`, + }, + }, +} as const satisfies Translation diff --git a/quartz/i18n/locales/es-ES.ts b/quartz/i18n/locales/es-ES.ts index 8b0adcc37..c4a57aa12 100644 --- a/quartz/i18n/locales/es-ES.ts +++ b/quartz/i18n/locales/es-ES.ts @@ -22,8 +22,8 @@ export default { quote: "Cita", }, backlinks: { - title: "Enlaces de Retroceso", - noBacklinksFound: "No se han encontrado enlaces traseros", + title: "Retroenlaces", + noBacklinksFound: "No se han encontrado retroenlaces", }, themeToggle: { lightMode: "Modo claro", @@ -54,18 +54,18 @@ export default { title: "Tabla de Contenidos", }, contentMeta: { - readingTime: ({ minutes }) => `${minutes} min read`, + readingTime: ({ minutes }) => `Se lee en ${minutes} min`, }, }, pages: { rss: { recentNotes: "Notas recientes", - lastFewNotes: ({ count }) => `Últimás ${count} notas`, + lastFewNotes: ({ count }) => `Últimas ${count} notas`, }, error: { - title: "No se encontró.", + title: "No se ha encontrado.", notFound: "Esta página es privada o no existe.", - home: "Regresar a la página principal", + home: "Regresa a la página principal", }, folderContent: { folder: "Carpeta", @@ -78,7 +78,7 @@ export default { itemsUnderTag: ({ count }) => count === 1 ? "1 artículo con esta etiqueta." : `${count} artículos con esta etiqueta.`, showingFirst: ({ count }) => `Mostrando las primeras ${count} etiquetas.`, - totalTags: ({ count }) => `Se encontraron ${count} etiquetas en total.`, + totalTags: ({ count }) => `Se han encontrado ${count} etiquetas en total.`, }, }, } as const satisfies Translation