@jjlmoya/utils-travel 1.2.0 → 1.4.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
CHANGED
package/src/category/i18n/ja.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CategoryLocaleContent } from '../../types';
|
|
2
2
|
|
|
3
3
|
export const content: CategoryLocaleContent = {
|
|
4
|
-
slug: '
|
|
4
|
+
slug: 'travel',
|
|
5
5
|
title: '旅行者と冒険者のためのツールと計算機',
|
|
6
6
|
description: '無料のオンラインツールで次の旅行を計画しましょう。航空会社の荷物計算機、国際チップガイド、スーツケースのチェックリスト、デイリーチャレンジジェネレーターなどを掲載しています。',
|
|
7
7
|
seo: [
|
package/src/category/i18n/ko.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CategoryLocaleContent } from '../../types';
|
|
2
2
|
|
|
3
3
|
export const content: CategoryLocaleContent = {
|
|
4
|
-
slug: '
|
|
4
|
+
slug: 'travel',
|
|
5
5
|
title: '여행자 및 모험가를 위한 도구 및 계산기',
|
|
6
6
|
description: '무료 온라인 도구로 다음 여행을 계획하세요. 항공사 수하물 계산기, 국제 팁 가이드, 수트케이스 체크리스트 및 일일 챌린지 생성기를 제공합니다.',
|
|
7
7
|
seo: [
|
package/src/category/i18n/zh.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -15,7 +15,7 @@ export type {
|
|
|
15
15
|
ToolDefinition,
|
|
16
16
|
} from './types';
|
|
17
17
|
|
|
18
|
-
export { ALL_TOOLS } from './tools';
|
|
18
|
+
export { ALL_ENTRIES, ALL_TOOLS } from './tools';
|
|
19
19
|
export { luggageCalculator, LUGGAGE_CALCULATOR_TOOL, LuggageCalculator, LuggageCalculatorSEO, LuggageCalculatorBibliography } from './tool/luggage-calculator';
|
|
20
20
|
export { tipCalculator, TIP_CALCULATOR_TOOL, TipCalculator, TipCalculatorSEO, TipCalculatorBibliography } from './tool/tip-calculator';
|
|
21
21
|
export { suitcaseChecklist, SUITCASE_CHECKLIST_TOOL, SuitcaseChecklist, SuitcaseChecklistSEO, SuitcaseChecklistBibliography } from './tool/suitcase-checklist';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { ALL_TOOLS } from '../tools';
|
|
3
|
+
import type { ToolLocaleContent } from '../types';
|
|
4
|
+
|
|
5
|
+
describe('Slug Language Code Format Validation', () => {
|
|
6
|
+
ALL_TOOLS.forEach((tool) => {
|
|
7
|
+
describe(`Tool: ${tool.entry.id}`, () => {
|
|
8
|
+
it('slug should not end with 2-letter language codes like -ja, -ru, -ko', async () => {
|
|
9
|
+
const locales = Object.keys(tool.entry.i18n);
|
|
10
|
+
|
|
11
|
+
for (const locale of locales) {
|
|
12
|
+
const loader = tool.entry.i18n[locale as keyof typeof tool.entry.i18n];
|
|
13
|
+
const content = (await loader?.()) as ToolLocaleContent;
|
|
14
|
+
|
|
15
|
+
expect(
|
|
16
|
+
content.slug,
|
|
17
|
+
`Tool "${tool.entry.id}" locale "${locale}" slug ("${content.slug}") cannot end with a 2-letter language code (e.g., -ja, -ru, -ko).`,
|
|
18
|
+
).not.toMatch(/-[a-z]{2}$/);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
});
|