L01D
2024-07-01 dbe12c0d340972ba202bb6a0c723abca02ec7f60
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
2 files added
2 files modified
185 ■■■■■ changed files
quartz/i18n/index.ts 3 ●●●●● patch | view | raw | blame | history
quartz/i18n/locales/ca-ES.ts 84 ●●●●● patch | view | raw | blame | history
quartz/i18n/locales/en-GB.ts 84 ●●●●● patch | view | raw | blame | history
quartz/i18n/locales/es-ES.ts 14 ●●●● patch | view | raw | blame | history
quartz/i18n/index.ts
@@ -6,6 +6,7 @@
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 @@
export const TRANSLATIONS = {
  "en-US": en,
  "en-GB": en,
  "fr-FR": fr,
  "it-IT": it,
  "ja-JP": ja,
@@ -28,6 +30,7 @@
  "nl-BE": nl,
  "ro-RO": ro,
  "ro-MD": ro,
  "ca-ES": ca,
  "es-ES": es,
  "ar-SA": ar,
  "ar-AE": ar,
quartz/i18n/locales/ca-ES.ts
New file
@@ -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
quartz/i18n/locales/en-GB.ts
New file
@@ -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
quartz/i18n/locales/es-ES.ts
@@ -22,8 +22,8 @@
      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 @@
      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 @@
      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