From f3d65ffb10b8379865669914ba75e0d842493f26 Mon Sep 17 00:00:00 2001 From: Duarte Santos Date: Sun, 30 Aug 2026 13:33:04 +0200 Subject: [PATCH] curated2: Thai and Hungarian get the move-control labels; !27's test file declares its DOM environment --- frontend/src/locales/hu.js | 2 ++ frontend/src/locales/th.js | 4 +++- frontend/src/views/RoutineEdit.move.test.jsx | 5 +++-- frontend/src/views/Stats.recovery.test.jsx | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/frontend/src/locales/hu.js b/frontend/src/locales/hu.js index 0323216..6448ce7 100644 --- a/frontend/src/locales/hu.js +++ b/frontend/src/locales/hu.js @@ -681,4 +681,6 @@ export default { 'Show all equipment': 'Minden eszköz megjelenítése', 'Showing what you have in "{0}"': 'Az jelenik meg, ami megvan a(z) „{0}” profilban', 'Showing all equipment': 'Minden eszköz megjelenítve', + 'Move up': 'Feljebb', + 'Move down': 'Lejjebb', } diff --git a/frontend/src/locales/th.js b/frontend/src/locales/th.js index 1d23a79..70f0f42 100644 --- a/frontend/src/locales/th.js +++ b/frontend/src/locales/th.js @@ -688,5 +688,7 @@ export default { 'Add session note': 'เพิ่มบันทึกประจำรอบ', 'Edit session note': 'แก้ไขบันทึกประจำรอบ', 'How the session went as a whole.': 'ภาพรวมของการออกกำลังกายรอบนี้เป็นอย่างไร', - 'Rest-pause always trains as one warm-up set at this rep count, then one rest-pause work set — "Sets" is not used.': 'เรสต์-พอสจะฝึกเป็นเซ็ตวอร์มอัพหนึ่งเซ็ตที่จำนวนครั้งนี้ ตามด้วยเซ็ตหลักแบบเรสต์-พอสหนึ่งเซ็ตเสมอ — ไม่ใช้ค่า "เซ็ต"' + 'Rest-pause always trains as one warm-up set at this rep count, then one rest-pause work set — "Sets" is not used.': 'เรสต์-พอสจะฝึกเป็นเซ็ตวอร์มอัพหนึ่งเซ็ตที่จำนวนครั้งนี้ ตามด้วยเซ็ตหลักแบบเรสต์-พอสหนึ่งเซ็ตเสมอ — ไม่ใช้ค่า "เซ็ต"', + 'Move up': 'เลื่อนขึ้น', + 'Move down': 'เลื่อนลง', } diff --git a/frontend/src/views/RoutineEdit.move.test.jsx b/frontend/src/views/RoutineEdit.move.test.jsx index d83c73e..301d7d8 100644 --- a/frontend/src/views/RoutineEdit.move.test.jsx +++ b/frontend/src/views/RoutineEdit.move.test.jsx @@ -2,6 +2,7 @@ import { readFileSync } from 'node:fs' import { resolve } from 'node:path' import React, { act } from 'react' +import { LANGS } from '../lib/i18n-core.js' import { createRoot } from 'react-dom/client' import { MemoryRouter, Route, Routes } from 'react-router-dom' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' @@ -215,8 +216,8 @@ describe('routine move controls', () => { describe('routine move-control locale coverage', () => { const packs = import.meta.glob('../locales/*.js', { eager: true, import: 'default' }) - it('defines both accessible names in all twelve locale packs', () => { - expect(Object.keys(packs)).toHaveLength(12) + it('defines both accessible names in every non-English locale pack', () => { + expect(Object.keys(packs)).toHaveLength(Object.keys(LANGS).length - 1) Object.entries(packs).forEach(([path, pack]) => { expect(pack, `${path} is missing Move up`).toHaveProperty('Move up') expect(pack, `${path} is missing Move down`).toHaveProperty('Move down') diff --git a/frontend/src/views/Stats.recovery.test.jsx b/frontend/src/views/Stats.recovery.test.jsx index ed7cd6b..402981f 100644 --- a/frontend/src/views/Stats.recovery.test.jsx +++ b/frontend/src/views/Stats.recovery.test.jsx @@ -1,3 +1,4 @@ +// @vitest-environment happy-dom import React, { act } from 'react' import { createRoot } from 'react-dom/client' import { Window } from 'happy-dom'