Skip to content

Commit

Permalink
fix(plugin-seo): removes duplicative json translations (#8206)
Browse files Browse the repository at this point in the history
The SEO Plugin defines duplicative translations in both TS and JSON,
even though JSON translations are no longer in use. Translations were
still being maintained in JSON, despite this fact. This PR removes all
JSON files, replacing them with TS, and improving file organization and
overall types.
  • Loading branch information
jacobsfletch authored Sep 15, 2024
1 parent ff1c1e0 commit 64f2395
Show file tree
Hide file tree
Showing 18 changed files with 264 additions and 404 deletions.
22 changes: 0 additions & 22 deletions packages/plugin-seo/src/translations/en.json

This file was deleted.

26 changes: 26 additions & 0 deletions packages/plugin-seo/src/translations/en.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import type { GenericTranslationsObject } from '@payloadcms/translations'

export const en: GenericTranslationsObject = {
$schema: './translation-schema.json',
'plugin-seo': {
almostThere: 'Almost there',
autoGenerate: 'Auto-generate',
bestPractices: 'best practices',
characterCount: '{{current}}/{{minLength}}-{{maxLength}} chars, ',
charactersLeftOver: '{{characters}} left over',
charactersToGo: '{{characters}} to go',
charactersTooMany: '{{characters}} too many',
checksPassing: '{{current}}/{{max}} checks are passing',
good: 'Good',
imageAutoGenerationTip: 'Auto-generation will retrieve the selected hero image.',
lengthTipDescription:
'This should be between {{minLength}} and {{maxLength}} characters. For help in writing quality meta descriptions, see ',
lengthTipTitle:
'This should be between {{minLength}} and {{maxLength}} characters. For help in writing quality meta titles, see ',
noImage: 'No image',
preview: 'Preview',
previewDescription: 'Exact result listings may vary based on content and search relevancy.',
tooLong: 'Too long',
tooShort: 'Too short',
},
}
22 changes: 0 additions & 22 deletions packages/plugin-seo/src/translations/es.json

This file was deleted.

27 changes: 27 additions & 0 deletions packages/plugin-seo/src/translations/es.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import type { GenericTranslationsObject } from '@payloadcms/translations'

export const es: GenericTranslationsObject = {
$schema: './translation-schema.json',
'plugin-seo': {
almostThere: 'Ya casi está',
autoGenerate: 'Autogénerar',
bestPractices: 'mejores prácticas',
characterCount: '{{current}}/{{minLength}}-{{maxLength}} letras, ',
charactersLeftOver: '{{characters}} letras sobrantes',
charactersToGo: '{{characters}} letras sobrantes',
charactersTooMany: '{{characters}} letras demasiados',
checksPassing: '{{current}}/{{max}} las comprobaciones están pasando',
good: 'Bien',
imageAutoGenerationTip: 'La autogeneración recuperará la imagen de héroe seleccionada.',
lengthTipDescription:
'Esto debe estar entre {{minLength}} y {{maxLength}} caracteres. Para obtener ayuda sobre cómo escribir meta descripciones de calidad, consulte ',
lengthTipTitle:
'Debe tener entre {{minLength}} y {{maxLength}} caracteres. Para obtener ayuda sobre cómo escribir metatítulos de calidad, consulte ',
noImage: 'Sin imagen',
preview: 'Vista previa',
previewDescription:
'Las listas de resultados pueden variar segun la relevancia de buesqueda y el contenido.',
tooLong: 'Demasiado largo',
tooShort: 'Demasiado corto',
},
}
22 changes: 0 additions & 22 deletions packages/plugin-seo/src/translations/fa.json

This file was deleted.

27 changes: 27 additions & 0 deletions packages/plugin-seo/src/translations/fa.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import type { GenericTranslationsObject } from '@payloadcms/translations'

export const fa: GenericTranslationsObject = {
$schema: './translation-schema.json',
'plugin-seo': {
almostThere: 'چیزیی باقی نمونده',
autoGenerate: 'تولید خودکار',
bestPractices: 'آموزش بیشتر',
characterCount: '{{current}}/{{minLength}}-{{maxLength}} کلمه، ',
charactersLeftOver: '{{characters}} باقی مانده',
charactersToGo: '{{characters}} باقی مانده',
charactersTooMany: '{{characters}} بیش از حد',
checksPassing: '{{current}}/{{max}} بررسی‌ها با موفقیت انجام شده است',
good: 'خوب',
imageAutoGenerationTip:
'این قابلیت، تصویر فعلی بارگذاری شده در مجموعه محتوای شما را بازیابی می‌کند',
lengthTipDescription:
'این باید بین {{minLength}} و {{maxLength}} کلمه باشد. برای کمک در نوشتن توضیحات متا با کیفیت، مراجعه کنید به ',
lengthTipTitle:
'این باید بین {{minLength}} و {{maxLength}} کلمه باشد. برای کمک در نوشتن عناوین متا با کیفیت، مراجعه کنید به ',
noImage: 'بدون تصویر',
preview: 'پیش‌نمایش',
previewDescription: 'فهرست نتایج ممکن است بر اساس محتوا و متناسب با کلمه کلیدی جستجو شده باشند',
tooLong: 'خیلی طولانی',
tooShort: 'خیلی کوتاه',
},
}
22 changes: 0 additions & 22 deletions packages/plugin-seo/src/translations/fr.json

This file was deleted.

27 changes: 27 additions & 0 deletions packages/plugin-seo/src/translations/fr.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import type { GenericTranslationsObject } from '@payloadcms/translations'

export const fr: GenericTranslationsObject = {
$schema: './translation-schema.json',
'plugin-seo': {
almostThere: 'On y est presque',
autoGenerate: 'Auto-générer',
bestPractices: 'bonnes pratiques',
characterCount: '{{current}}/{{minLength}}-{{maxLength}} caractères, ',
charactersLeftOver: '{{characters}} restants',
charactersToGo: '{{characters}} à ajouter',
charactersTooMany: '{{characters}} en trop',
checksPassing: '{{current}}/{{max}} vérifications réussies',
good: 'Bien',
imageAutoGenerationTip: "L'auto-génération récupérera l'image principale sélectionnée.",
lengthTipDescription:
"Ceci devrait contenir entre {{minLength}} et {{maxLength}} caractères. Pour obtenir de l'aide pour rédiger des descriptions meta de qualité, consultez les ",
lengthTipTitle:
"Ceci devrait contenir entre {{minLength}} et {{maxLength}} caractères. Pour obtenir de l'aide pour rédiger des titres meta de qualité, consultez les ",
noImage: "Pas d'image",
preview: 'Aperçu',
previewDescription:
'Les résultats exacts peuvent varier en fonction du contenu et de la pertinence de la recherche.',
tooLong: 'Trop long',
tooShort: 'Trop court',
},
}
Loading

0 comments on commit 64f2395

Please sign in to comment.