@jjlmoya/utils-language 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/category/i18n/de.ts +4 -3
- package/src/category/i18n/es.ts +4 -3
- package/src/category/i18n/fr.ts +4 -3
- package/src/category/i18n/id.ts +4 -3
- package/src/category/i18n/it.ts +4 -3
- package/src/category/i18n/ja.ts +4 -3
- package/src/category/i18n/ko.ts +4 -3
- package/src/category/i18n/nl.ts +4 -3
- package/src/category/i18n/pl.ts +4 -3
- package/src/category/i18n/pt.ts +4 -3
- package/src/category/i18n/ru.ts +4 -3
- package/src/category/i18n/sv.ts +4 -3
- package/src/category/i18n/tr.ts +4 -3
- package/src/category/i18n/zh.ts +4 -3
- package/src/tests/category_slug_localization.test.ts +29 -0
- package/src/category/i18n/shared.ts +0 -11
package/package.json
CHANGED
package/src/category/i18n/de.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CategoryLocaleContent } from '../../types';
|
|
2
2
|
|
|
3
|
-
export const content =
|
|
3
|
+
export const content: CategoryLocaleContent = {
|
|
4
|
+
slug: 'sprachen',
|
|
4
5
|
title: 'Werkzeuge zum Sprachenlernen',
|
|
5
6
|
description: 'Private Browser Werkzeuge, die Sprachlernziele in praktische Lernplaene, Wochenroutinen und messbare Meilensteine verwandeln.',
|
|
6
7
|
seo: [
|
|
@@ -12,4 +13,4 @@ export const content = createLanguageCategory({
|
|
|
12
13
|
{ type: 'paragraph', html: 'Auswahl, Niveau, Frist und Zeitplan bleiben im Browser. Es ist kein Konto erforderlich und die Eingaben werden nicht an einen Server gesendet.' },
|
|
13
14
|
{ type: 'stats', items: [{ label: 'Werkzeug', value: '1', icon: 'mdi:tools' }, { label: 'Niveaus', value: 'A0 bis C2', icon: 'mdi:stairs-up' }, { label: 'Sprachen', value: '10', icon: 'mdi:translate' }, { label: 'Privatsphaere', value: 'Lokal', icon: 'mdi:shield-check' }] },
|
|
14
15
|
],
|
|
15
|
-
}
|
|
16
|
+
};
|
package/src/category/i18n/es.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CategoryLocaleContent } from '../../types';
|
|
2
2
|
|
|
3
|
-
export const content =
|
|
3
|
+
export const content: CategoryLocaleContent = {
|
|
4
|
+
slug: 'idiomas',
|
|
4
5
|
title: 'Herramientas para aprender idiomas',
|
|
5
6
|
description: 'Herramientas privadas en el navegador para convertir objetivos lingüísticos en planes de estudio, sesiones semanales e hitos medibles.',
|
|
6
7
|
seo: [
|
|
@@ -12,4 +13,4 @@ export const content = createLanguageCategory({
|
|
|
12
13
|
{ type: 'paragraph', html: 'Tus idiomas, nivel, fecha y horario se quedan en el navegador. No necesitas una cuenta y tus datos no se envían a un servidor.' },
|
|
13
14
|
{ type: 'stats', items: [{ label: 'Herramienta', value: '1', icon: 'mdi:tools' }, { label: 'Niveles', value: 'A0 a C2', icon: 'mdi:stairs-up' }, { label: 'Idiomas', value: '10', icon: 'mdi:translate' }, { label: 'Privacidad', value: 'Local', icon: 'mdi:shield-check' }] },
|
|
14
15
|
],
|
|
15
|
-
}
|
|
16
|
+
};
|
package/src/category/i18n/fr.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CategoryLocaleContent } from '../../types';
|
|
2
2
|
|
|
3
|
-
export const content =
|
|
3
|
+
export const content: CategoryLocaleContent = {
|
|
4
|
+
slug: 'langues',
|
|
4
5
|
title: 'Outils pour apprendre les langues',
|
|
5
6
|
description: 'Des outils privés dans le navigateur pour transformer des objectifs linguistiques en plans pratiques, séances hebdomadaires et jalons mesurables.',
|
|
6
7
|
seo: [
|
|
@@ -12,4 +13,4 @@ export const content = createLanguageCategory({
|
|
|
12
13
|
{ type: 'paragraph', html: 'Vos choix de langue, votre niveau, votre date et votre rythme restent dans le navigateur. Aucun compte n est nécessaire et vos données ne sont pas envoyées à un serveur.' },
|
|
13
14
|
{ type: 'stats', items: [{ label: 'Outil', value: '1', icon: 'mdi:tools' }, { label: 'Niveaux', value: 'A0 à C2', icon: 'mdi:stairs-up' }, { label: 'Langues', value: '10', icon: 'mdi:translate' }, { label: 'Confidentialité', value: 'Locale', icon: 'mdi:shield-check' }] },
|
|
14
15
|
],
|
|
15
|
-
}
|
|
16
|
+
};
|
package/src/category/i18n/id.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CategoryLocaleContent } from '../../types';
|
|
2
2
|
|
|
3
|
-
export const content =
|
|
3
|
+
export const content: CategoryLocaleContent = {
|
|
4
|
+
slug: 'bahasa',
|
|
4
5
|
title: 'Alat Belajar Bahasa',
|
|
5
6
|
description: 'Alat privat berbasis browser untuk mengubah tujuan belajar bahasa menjadi rencana praktis, sesi mingguan, dan pencapaian yang terukur.',
|
|
6
7
|
seo: [
|
|
@@ -12,4 +13,4 @@ export const content = createLanguageCategory({
|
|
|
12
13
|
{ type: 'paragraph', html: 'Pilihan bahasa, level, tanggal, dan jadwal tetap berada di browser. Tidak perlu akun dan masukan Anda tidak dikirim ke server.' },
|
|
13
14
|
{ type: 'stats', items: [{ label: 'Alat', value: '1', icon: 'mdi:tools' }, { label: 'Level', value: 'A0 sampai C2', icon: 'mdi:stairs-up' }, { label: 'Bahasa', value: '10', icon: 'mdi:translate' }, { label: 'Privasi', value: 'Lokal', icon: 'mdi:shield-check' }] },
|
|
14
15
|
],
|
|
15
|
-
}
|
|
16
|
+
};
|
package/src/category/i18n/it.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CategoryLocaleContent } from '../../types';
|
|
2
2
|
|
|
3
|
-
export const content =
|
|
3
|
+
export const content: CategoryLocaleContent = {
|
|
4
|
+
slug: 'lingue',
|
|
4
5
|
title: 'Strumenti per imparare le lingue',
|
|
5
6
|
description: 'Strumenti privati nel browser per trasformare gli obiettivi linguistici in piani pratici, sessioni settimanali e traguardi misurabili.',
|
|
6
7
|
seo: [
|
|
@@ -12,4 +13,4 @@ export const content = createLanguageCategory({
|
|
|
12
13
|
{ type: 'paragraph', html: 'Le tue lingue, il livello, la data e il programma restano nel browser. Non serve un account e i dati non vengono inviati a un server.' },
|
|
13
14
|
{ type: 'stats', items: [{ label: 'Strumento', value: '1', icon: 'mdi:tools' }, { label: 'Livelli', value: 'A0 a C2', icon: 'mdi:stairs-up' }, { label: 'Lingue', value: '10', icon: 'mdi:translate' }, { label: 'Privacy', value: 'Locale', icon: 'mdi:shield-check' }] },
|
|
14
15
|
],
|
|
15
|
-
}
|
|
16
|
+
};
|
package/src/category/i18n/ja.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CategoryLocaleContent } from '../../types';
|
|
2
2
|
|
|
3
|
-
export const content =
|
|
3
|
+
export const content: CategoryLocaleContent = {
|
|
4
|
+
slug: 'gengo',
|
|
4
5
|
title: '語学学習ツール',
|
|
5
6
|
description: '語学の目標を実用的な学習計画、毎週の学習時間、確認できる到達目安に変える、ブラウザーで使えるプライベートなツールです。',
|
|
6
7
|
seo: [
|
|
@@ -12,4 +13,4 @@ export const content = createLanguageCategory({
|
|
|
12
13
|
{ type: 'paragraph', html: '言語、レベル、日付、予定はブラウザー内にとどまります。アカウントは不要で、入力内容をサーバーへ送信しません。' },
|
|
13
14
|
{ type: 'stats', items: [{ label: 'ツール', value: '1', icon: 'mdi:tools' }, { label: 'レベル', value: 'A0からC2', icon: 'mdi:stairs-up' }, { label: '言語', value: '10', icon: 'mdi:translate' }, { label: 'プライバシー', value: 'ローカル', icon: 'mdi:shield-check' }] },
|
|
14
15
|
],
|
|
15
|
-
}
|
|
16
|
+
};
|
package/src/category/i18n/ko.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CategoryLocaleContent } from '../../types';
|
|
2
2
|
|
|
3
|
-
export const content =
|
|
3
|
+
export const content: CategoryLocaleContent = {
|
|
4
|
+
slug: 'eoneo',
|
|
4
5
|
title: '언어 학습 도구',
|
|
5
6
|
description: '언어 학습 목표를 실용적인 계획과 주간 학습 세션, 확인 가능한 중간 목표로 바꾸는 브라우저 기반 비공개 도구입니다.',
|
|
6
7
|
seo: [
|
|
@@ -12,4 +13,4 @@ export const content = createLanguageCategory({
|
|
|
12
13
|
{ type: 'paragraph', html: '언어 선택, 수준, 날짜와 일정은 브라우저에 남습니다. 계정이 필요하지 않으며 입력값을 서버로 보내지 않습니다.' },
|
|
13
14
|
{ type: 'stats', items: [{ label: '도구', value: '1', icon: 'mdi:tools' }, { label: '수준', value: 'A0부터 C2', icon: 'mdi:stairs-up' }, { label: '언어', value: '10', icon: 'mdi:translate' }, { label: '개인정보', value: '로컬', icon: 'mdi:shield-check' }] },
|
|
14
15
|
],
|
|
15
|
-
}
|
|
16
|
+
};
|
package/src/category/i18n/nl.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CategoryLocaleContent } from '../../types';
|
|
2
2
|
|
|
3
|
-
export const content =
|
|
3
|
+
export const content: CategoryLocaleContent = {
|
|
4
|
+
slug: 'talen',
|
|
4
5
|
title: 'Hulpmiddelen voor taal leren',
|
|
5
6
|
description: 'Private browsertools om taaldoelen om te zetten in praktische studieplannen, wekelijkse sessies en meetbare mijlpalen.',
|
|
6
7
|
seo: [
|
|
@@ -12,4 +13,4 @@ export const content = createLanguageCategory({
|
|
|
12
13
|
{ type: 'paragraph', html: 'Je taalkeuzes, niveau, datum en schema blijven in de browser. Een account is niet nodig en je invoer wordt niet naar een server gestuurd.' },
|
|
13
14
|
{ type: 'stats', items: [{ label: 'Tool', value: '1', icon: 'mdi:tools' }, { label: 'Niveaus', value: 'A0 tot C2', icon: 'mdi:stairs-up' }, { label: 'Talen', value: '10', icon: 'mdi:translate' }, { label: 'Privacy', value: 'Lokaal', icon: 'mdi:shield-check' }] },
|
|
14
15
|
],
|
|
15
|
-
}
|
|
16
|
+
};
|
package/src/category/i18n/pl.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CategoryLocaleContent } from '../../types';
|
|
2
2
|
|
|
3
|
-
export const content =
|
|
3
|
+
export const content: CategoryLocaleContent = {
|
|
4
|
+
slug: 'jezyki',
|
|
4
5
|
title: 'Narzędzia do nauki języków',
|
|
5
6
|
description: 'Prywatne narzędzia w przeglądarce, które zamieniają cele językowe w praktyczne plany, tygodniowe sesje i mierzalne kamienie milowe.',
|
|
6
7
|
seo: [
|
|
@@ -12,4 +13,4 @@ export const content = createLanguageCategory({
|
|
|
12
13
|
{ type: 'paragraph', html: 'Wybrane języki, poziom, data i harmonogram pozostają w przeglądarce. Konto nie jest potrzebne, a dane nie są wysyłane na serwer.' },
|
|
13
14
|
{ type: 'stats', items: [{ label: 'Narzędzie', value: '1', icon: 'mdi:tools' }, { label: 'Poziomy', value: 'A0 do C2', icon: 'mdi:stairs-up' }, { label: 'Języki', value: '10', icon: 'mdi:translate' }, { label: 'Prywatność', value: 'Lokalnie', icon: 'mdi:shield-check' }] },
|
|
14
15
|
],
|
|
15
|
-
}
|
|
16
|
+
};
|
package/src/category/i18n/pt.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CategoryLocaleContent } from '../../types';
|
|
2
2
|
|
|
3
|
-
export const content =
|
|
3
|
+
export const content: CategoryLocaleContent = {
|
|
4
|
+
slug: 'idiomas',
|
|
4
5
|
title: 'Ferramentas para aprender idiomas',
|
|
5
6
|
description: 'Ferramentas privadas no navegador para transformar metas linguísticas em planos práticos, sessões semanais e marcos mensuráveis.',
|
|
6
7
|
seo: [
|
|
@@ -12,4 +13,4 @@ export const content = createLanguageCategory({
|
|
|
12
13
|
{ type: 'paragraph', html: 'Seus idiomas, nível, data e cronograma ficam no navegador. Não é preciso ter conta e suas entradas não são enviadas para um servidor.' },
|
|
13
14
|
{ type: 'stats', items: [{ label: 'Ferramenta', value: '1', icon: 'mdi:tools' }, { label: 'Níveis', value: 'A0 a C2', icon: 'mdi:stairs-up' }, { label: 'Idiomas', value: '10', icon: 'mdi:translate' }, { label: 'Privacidade', value: 'Local', icon: 'mdi:shield-check' }] },
|
|
14
15
|
],
|
|
15
|
-
}
|
|
16
|
+
};
|
package/src/category/i18n/ru.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CategoryLocaleContent } from '../../types';
|
|
2
2
|
|
|
3
|
-
export const content =
|
|
3
|
+
export const content: CategoryLocaleContent = {
|
|
4
|
+
slug: 'yazyki',
|
|
4
5
|
title: 'Инструменты для изучения языков',
|
|
5
6
|
description: 'Приватные браузерные инструменты, которые превращают языковые цели в практичные планы, недельные занятия и измеримые промежуточные цели.',
|
|
6
7
|
seo: [
|
|
@@ -12,4 +13,4 @@ export const content = createLanguageCategory({
|
|
|
12
13
|
{ type: 'paragraph', html: 'Выбранные языки, уровень, дата и расписание остаются в браузере. Учётная запись не нужна, а данные не отправляются на сервер.' },
|
|
13
14
|
{ type: 'stats', items: [{ label: 'Инструмент', value: '1', icon: 'mdi:tools' }, { label: 'Уровни', value: 'A0 до C2', icon: 'mdi:stairs-up' }, { label: 'Языки', value: '10', icon: 'mdi:translate' }, { label: 'Приватность', value: 'Локально', icon: 'mdi:shield-check' }] },
|
|
14
15
|
],
|
|
15
|
-
}
|
|
16
|
+
};
|
package/src/category/i18n/sv.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CategoryLocaleContent } from '../../types';
|
|
2
2
|
|
|
3
|
-
export const content =
|
|
3
|
+
export const content: CategoryLocaleContent = {
|
|
4
|
+
slug: 'sprak',
|
|
4
5
|
title: 'Verktyg för språkinlärning',
|
|
5
6
|
description: 'Privata webbläsarverktyg som gör språkmål till praktiska studieplaner, veckopass och mätbara milstolpar.',
|
|
6
7
|
seo: [
|
|
@@ -12,4 +13,4 @@ export const content = createLanguageCategory({
|
|
|
12
13
|
{ type: 'paragraph', html: 'Dina språkval, din nivå, ditt datum och ditt schema stannar i webbläsaren. Inget konto krävs och uppgifterna skickas inte till en server.' },
|
|
13
14
|
{ type: 'stats', items: [{ label: 'Verktyg', value: '1', icon: 'mdi:tools' }, { label: 'Nivåer', value: 'A0 till C2', icon: 'mdi:stairs-up' }, { label: 'Språk', value: '10', icon: 'mdi:translate' }, { label: 'Integritet', value: 'Lokalt', icon: 'mdi:shield-check' }] },
|
|
14
15
|
],
|
|
15
|
-
}
|
|
16
|
+
};
|
package/src/category/i18n/tr.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CategoryLocaleContent } from '../../types';
|
|
2
2
|
|
|
3
|
-
export const content =
|
|
3
|
+
export const content: CategoryLocaleContent = {
|
|
4
|
+
slug: 'diller',
|
|
4
5
|
title: 'Dil öğrenme araçları',
|
|
5
6
|
description: 'Dil hedeflerini pratik planlara, haftalık çalışma oturumlarına ve ölçülebilir kilometre taşlarına dönüştüren özel tarayıcı araçları.',
|
|
6
7
|
seo: [
|
|
@@ -12,4 +13,4 @@ export const content = createLanguageCategory({
|
|
|
12
13
|
{ type: 'paragraph', html: 'Dil seçimlerin, seviyen, tarihin ve programın tarayıcıda kalır. Hesap gerekmez ve girdilerin sunucuya gönderilmez.' },
|
|
13
14
|
{ type: 'stats', items: [{ label: 'Araç', value: '1', icon: 'mdi:tools' }, { label: 'Seviyeler', value: 'A0 ile C2', icon: 'mdi:stairs-up' }, { label: 'Diller', value: '10', icon: 'mdi:translate' }, { label: 'Gizlilik', value: 'Yerel', icon: 'mdi:shield-check' }] },
|
|
14
15
|
],
|
|
15
|
-
}
|
|
16
|
+
};
|
package/src/category/i18n/zh.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CategoryLocaleContent } from '../../types';
|
|
2
2
|
|
|
3
|
-
export const content =
|
|
3
|
+
export const content: CategoryLocaleContent = {
|
|
4
|
+
slug: 'yuyan',
|
|
4
5
|
title: '语言学习工具',
|
|
5
6
|
description: '在浏览器中使用的隐私工具,将语言目标转化为实用的学习计划、每周练习和可衡量的阶段目标。',
|
|
6
7
|
seo: [
|
|
@@ -12,4 +13,4 @@ export const content = createLanguageCategory({
|
|
|
12
13
|
{ type: 'paragraph', html: '你选择的语言、等级、日期和安排都保留在浏览器中。不需要账号,输入内容也不会发送到服务器。' },
|
|
13
14
|
{ type: 'stats', items: [{ label: '工具', value: '1', icon: 'mdi:tools' }, { label: '等级', value: 'A0 到 C2', icon: 'mdi:stairs-up' }, { label: '语言', value: '10', icon: 'mdi:translate' }, { label: '隐私', value: '本地', icon: 'mdi:shield-check' }] },
|
|
14
15
|
],
|
|
15
|
-
}
|
|
16
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { languageCategory } from '../data';
|
|
3
|
+
|
|
4
|
+
const EXPECTED_SLUGS = {
|
|
5
|
+
de: 'sprachen',
|
|
6
|
+
en: 'language',
|
|
7
|
+
es: 'idiomas',
|
|
8
|
+
fr: 'langues',
|
|
9
|
+
id: 'bahasa',
|
|
10
|
+
it: 'lingue',
|
|
11
|
+
ja: 'gengo',
|
|
12
|
+
ko: 'eoneo',
|
|
13
|
+
nl: 'talen',
|
|
14
|
+
pl: 'jezyki',
|
|
15
|
+
pt: 'idiomas',
|
|
16
|
+
ru: 'yazyki',
|
|
17
|
+
sv: 'sprak',
|
|
18
|
+
tr: 'diller',
|
|
19
|
+
zh: 'yuyan',
|
|
20
|
+
} as const;
|
|
21
|
+
|
|
22
|
+
describe('Category slug localization', () => {
|
|
23
|
+
it('declares a localized slug in every category locale file', async () => {
|
|
24
|
+
for (const [locale, expectedSlug] of Object.entries(EXPECTED_SLUGS)) {
|
|
25
|
+
const content = await languageCategory.i18n[locale as keyof typeof languageCategory.i18n]!();
|
|
26
|
+
expect(content.slug, `Unexpected category slug for locale "${locale}"`).toBe(expectedSlug);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { CategoryLocaleContent } from '../../types';
|
|
2
|
-
|
|
3
|
-
interface CategoryInput {
|
|
4
|
-
title: string;
|
|
5
|
-
description: string;
|
|
6
|
-
seo: CategoryLocaleContent['seo'];
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function createLanguageCategory(input: CategoryInput): CategoryLocaleContent {
|
|
10
|
-
return { slug: 'language', ...input };
|
|
11
|
-
}
|