feat(i18n): complete Brazilian Portuguese instructions

This commit is contained in:
mzspicoli committed 2026-08-24 18:02:11 +02:00
1 parent cf7b3496a5
commit 3d3e44c973
11 files changed
+9110 -45

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ export const LANGS = {
tr: 'Türkçe', ru: 'Русский', zh: '中文',
ko: '한국어', hi: 'हिन्दी'
}
export const INSTR_LANGS = ['en', 'es', 'fr', 'it', 'tr', 'ru', 'zh', 'hi', 'pl', 'ko']
export const INSTR_LANGS = ['en', 'es', 'fr', 'it', 'tr', 'ru', 'zh', 'hi', 'pl', 'ko', 'pt-BR']
export const DATE_LOCALES = {
en: 'en-GB', de: 'de-DE', es: 'es-ES', fr: 'fr-FR', it: 'it-IT', pt: 'pt-PT', 'pt-BR': 'pt-BR',
pl: 'pl-PL', tr: 'tr-TR', ru: 'ru-RU', zh: 'zh-CN', ko: 'ko-KR', hi: 'hi-IN'
+3 -3
View File
@@ -8,8 +8,8 @@ describe('Brazilian Portuguese exercise instructions', () => {
const exercises = new Map(EXDB.map(exercise => [exercise.id, exercise]))
const source = JSON.parse(readFileSync(new URL('../../../scripts/instruction-sources/pt-BR.json', import.meta.url), 'utf8'))
test('starts with a reviewable translated batch', () => {
expect(Object.keys(ptBR).length).toBeGreaterThan(0)
test('matches the curated source and covers the complete exercise corpus', () => {
expect(Object.keys(ptBR)).toHaveLength(EXDB.length)
expect(ptBR).toEqual(source)
})
@@ -32,7 +32,7 @@ describe('Brazilian Portuguese exercise instructions', () => {
expect(step.trim(), `${id} step ${index + 1}`).not.toBe('')
expect(step, `${id} step ${index + 1}`).not.toBe(exercise.st[index])
expect(step, `${id} step ${index + 1}`).not.toMatch(/(?:^|[^\p{L}])(?:the|your|with|from|towards?|repeat|desired|starting|slowly|hold|while|then|back|straight|ground|feet|hands|body|legs|arms|knees|shoulders)(?=$|[^\p{L}])/iu)
expect(step, `${id} step ${index + 1}`).not.toMatch(/(?:^|[^\p{L}])(?:ginásio|anca|abdómen|gémeos|ecrã|core|banda|piso)(?=$|[^\p{L}])/iu)
expect(step, `${id} step ${index + 1}`).not.toMatch(/(?:^|[^\p{L}])(?:ginásio|anca|abdómen|gémeos|ecrã|core|banda|piso|omoplata|peso de mão|barra de elevações|pegada por cima|pegada invertida|bola suíça)(?=$|[^\p{L}])/iu)
})
}
})