Skip to content

Commit 64f2395

Browse files
authored
fix(plugin-seo): removes duplicative json translations (#8206)
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.
1 parent ff1c1e0 commit 64f2395

File tree

18 files changed

+264
-404
lines changed

18 files changed

+264
-404
lines changed

packages/plugin-seo/src/translations/en.json

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import type { GenericTranslationsObject } from '@payloadcms/translations'
2+
3+
export const en: GenericTranslationsObject = {
4+
$schema: './translation-schema.json',
5+
'plugin-seo': {
6+
almostThere: 'Almost there',
7+
autoGenerate: 'Auto-generate',
8+
bestPractices: 'best practices',
9+
characterCount: '{{current}}/{{minLength}}-{{maxLength}} chars, ',
10+
charactersLeftOver: '{{characters}} left over',
11+
charactersToGo: '{{characters}} to go',
12+
charactersTooMany: '{{characters}} too many',
13+
checksPassing: '{{current}}/{{max}} checks are passing',
14+
good: 'Good',
15+
imageAutoGenerationTip: 'Auto-generation will retrieve the selected hero image.',
16+
lengthTipDescription:
17+
'This should be between {{minLength}} and {{maxLength}} characters. For help in writing quality meta descriptions, see ',
18+
lengthTipTitle:
19+
'This should be between {{minLength}} and {{maxLength}} characters. For help in writing quality meta titles, see ',
20+
noImage: 'No image',
21+
preview: 'Preview',
22+
previewDescription: 'Exact result listings may vary based on content and search relevancy.',
23+
tooLong: 'Too long',
24+
tooShort: 'Too short',
25+
},
26+
}

packages/plugin-seo/src/translations/es.json

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import type { GenericTranslationsObject } from '@payloadcms/translations'
2+
3+
export const es: GenericTranslationsObject = {
4+
$schema: './translation-schema.json',
5+
'plugin-seo': {
6+
almostThere: 'Ya casi está',
7+
autoGenerate: 'Autogénerar',
8+
bestPractices: 'mejores prácticas',
9+
characterCount: '{{current}}/{{minLength}}-{{maxLength}} letras, ',
10+
charactersLeftOver: '{{characters}} letras sobrantes',
11+
charactersToGo: '{{characters}} letras sobrantes',
12+
charactersTooMany: '{{characters}} letras demasiados',
13+
checksPassing: '{{current}}/{{max}} las comprobaciones están pasando',
14+
good: 'Bien',
15+
imageAutoGenerationTip: 'La autogeneración recuperará la imagen de héroe seleccionada.',
16+
lengthTipDescription:
17+
'Esto debe estar entre {{minLength}} y {{maxLength}} caracteres. Para obtener ayuda sobre cómo escribir meta descripciones de calidad, consulte ',
18+
lengthTipTitle:
19+
'Debe tener entre {{minLength}} y {{maxLength}} caracteres. Para obtener ayuda sobre cómo escribir metatítulos de calidad, consulte ',
20+
noImage: 'Sin imagen',
21+
preview: 'Vista previa',
22+
previewDescription:
23+
'Las listas de resultados pueden variar segun la relevancia de buesqueda y el contenido.',
24+
tooLong: 'Demasiado largo',
25+
tooShort: 'Demasiado corto',
26+
},
27+
}

packages/plugin-seo/src/translations/fa.json

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import type { GenericTranslationsObject } from '@payloadcms/translations'
2+
3+
export const fa: GenericTranslationsObject = {
4+
$schema: './translation-schema.json',
5+
'plugin-seo': {
6+
almostThere: 'چیزیی باقی نمونده',
7+
autoGenerate: 'تولید خودکار',
8+
bestPractices: 'آموزش بیشتر',
9+
characterCount: '{{current}}/{{minLength}}-{{maxLength}} کلمه، ',
10+
charactersLeftOver: '{{characters}} باقی مانده',
11+
charactersToGo: '{{characters}} باقی مانده',
12+
charactersTooMany: '{{characters}} بیش از حد',
13+
checksPassing: '{{current}}/{{max}} بررسی‌ها با موفقیت انجام شده است',
14+
good: 'خوب',
15+
imageAutoGenerationTip:
16+
'این قابلیت، تصویر فعلی بارگذاری شده در مجموعه محتوای شما را بازیابی می‌کند',
17+
lengthTipDescription:
18+
'این باید بین {{minLength}} و {{maxLength}} کلمه باشد. برای کمک در نوشتن توضیحات متا با کیفیت، مراجعه کنید به ',
19+
lengthTipTitle:
20+
'این باید بین {{minLength}} و {{maxLength}} کلمه باشد. برای کمک در نوشتن عناوین متا با کیفیت، مراجعه کنید به ',
21+
noImage: 'بدون تصویر',
22+
preview: 'پیش‌نمایش',
23+
previewDescription: 'فهرست نتایج ممکن است بر اساس محتوا و متناسب با کلمه کلیدی جستجو شده باشند',
24+
tooLong: 'خیلی طولانی',
25+
tooShort: 'خیلی کوتاه',
26+
},
27+
}

packages/plugin-seo/src/translations/fr.json

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import type { GenericTranslationsObject } from '@payloadcms/translations'
2+
3+
export const fr: GenericTranslationsObject = {
4+
$schema: './translation-schema.json',
5+
'plugin-seo': {
6+
almostThere: 'On y est presque',
7+
autoGenerate: 'Auto-générer',
8+
bestPractices: 'bonnes pratiques',
9+
characterCount: '{{current}}/{{minLength}}-{{maxLength}} caractères, ',
10+
charactersLeftOver: '{{characters}} restants',
11+
charactersToGo: '{{characters}} à ajouter',
12+
charactersTooMany: '{{characters}} en trop',
13+
checksPassing: '{{current}}/{{max}} vérifications réussies',
14+
good: 'Bien',
15+
imageAutoGenerationTip: "L'auto-génération récupérera l'image principale sélectionnée.",
16+
lengthTipDescription:
17+
"Ceci devrait contenir entre {{minLength}} et {{maxLength}} caractères. Pour obtenir de l'aide pour rédiger des descriptions meta de qualité, consultez les ",
18+
lengthTipTitle:
19+
"Ceci devrait contenir entre {{minLength}} et {{maxLength}} caractères. Pour obtenir de l'aide pour rédiger des titres meta de qualité, consultez les ",
20+
noImage: "Pas d'image",
21+
preview: 'Aperçu',
22+
previewDescription:
23+
'Les résultats exacts peuvent varier en fonction du contenu et de la pertinence de la recherche.',
24+
tooLong: 'Trop long',
25+
tooShort: 'Trop court',
26+
},
27+
}

0 commit comments

Comments
 (0)