@jjlmoya/utils-travel 1.2.0 → 1.3.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jjlmoya/utils-travel",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -1,7 +1,7 @@
1
1
  import type { CategoryLocaleContent } from '../../types';
2
2
 
3
3
  export const content: CategoryLocaleContent = {
4
- slug: 'ryoko',
4
+ slug: 'travel',
5
5
  title: '旅行者と冒険者のためのツールと計算機',
6
6
  description: '無料のオンラインツールで次の旅行を計画しましょう。航空会社の荷物計算機、国際チップガイド、スーツケースのチェックリスト、デイリーチャレンジジェネレーターなどを掲載しています。',
7
7
  seo: [
@@ -1,7 +1,7 @@
1
1
  import type { CategoryLocaleContent } from '../../types';
2
2
 
3
3
  export const content: CategoryLocaleContent = {
4
- slug: 'yeohaeng',
4
+ slug: 'travel',
5
5
  title: '여행자 및 모험가를 위한 도구 및 계산기',
6
6
  description: '무료 온라인 도구로 다음 여행을 계획하세요. 항공사 수하물 계산기, 국제 팁 가이드, 수트케이스 체크리스트 및 일일 챌린지 생성기를 제공합니다.',
7
7
  seo: [
@@ -1,7 +1,7 @@
1
1
  import type { CategoryLocaleContent } from '../../types';
2
2
 
3
3
  export const content: CategoryLocaleContent = {
4
- slug: 'lv-xing',
4
+ slug: 'travel',
5
5
  title: '旅行者和冒险者的工具与计算器',
6
6
  description: '使用免费在线工具规划您的下一次旅行。航空行李计算器、国际小费指南、行李清单以及每日挑战生成器。',
7
7
  seo: [
@@ -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
+ });