fix(i18n): address final pt-BR UI review
This commit is contained in:
1 parent
4081ddac06
commit
03f8abb46b
2 files changed
+29
-5
No files matched your search
@@ -27,16 +27,16 @@ describe('Brazilian Portuguese locale', () => {
|
||||
.sort(byCodeUnit)
|
||||
const fingerprint = createHash('sha256').update(JSON.stringify(inherited)).digest('hex')
|
||||
|
||||
expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(223)
|
||||
expect(inherited).toHaveLength(431)
|
||||
expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(242)
|
||||
expect(inherited).toHaveLength(412)
|
||||
// If this fails, review the changed keys and wording before accepting a new hash. From
|
||||
// frontend/: node scripts/pt-br-inheritance-fingerprint.mjs --list
|
||||
expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('414a54d8e6e0941556ba90e4ec14c5a88dbd98666618d20f4c902b705fd0c47c')
|
||||
expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('ae2c8df077f5c4e80be84e07176291eebfac6d60c9503b0f13dd31809a3bfa12')
|
||||
})
|
||||
|
||||
test('does not leak European Portuguese UI terms', () => {
|
||||
const text = Object.values(ptBR).join('\n')
|
||||
const europeanPortuguese = /(?:^|[^\p{L}])(?:ficheiro\p{L}*|telemóvel\p{L}*|ecrã\p{L}*|regist(?:o|am|ado|ada|ados|adas)|eliminad\p{L}*|definições|cronómetro|detetad\p{L}*|gémeos|abdómen|anca|coifa dos rotadores|escadora|completaste|acabaste|aguentas|definires|completares|aguenta|aguentaste|ficaste|viajares|vê|vês)(?=$|[^\p{L}])/iu
|
||||
const europeanPortuguese = /(?:^|[^\p{L}])(?:ficheiro\p{L}*|telemóvel\p{L}*|ecrã\p{L}*|regist(?:o|am|ado|ada|ados|adas)|eliminad\p{L}*|definições|cronómetro|detetad\p{L}*|gémeos|abdómen|anca|coifa dos rotadores|escadora|completaste|acabaste|aguentas|definires|completares|aguenta|aguentaste|ficaste|viajares)(?=$|[^\p{L}])/iu
|
||||
expect(text).not.toMatch(europeanPortuguese)
|
||||
expect(text).not.toMatch(/[«»]/u)
|
||||
expect(ptBR.Save).toBe('Salvar')
|
||||
@@ -45,5 +45,10 @@ describe('Brazilian Portuguese locale', () => {
|
||||
expect(ptBR.Superset).toBe('Superset')
|
||||
expect(ptBR['Guest mode — data lives only in this browser.']).toContain('visitante')
|
||||
expect(ptBR['Sign in with passkey']).toContain('chave de acesso')
|
||||
expect(ptBR.band).toBe('elástico')
|
||||
expect(ptBR['resistance band']).toBe('faixa elástica')
|
||||
expect(ptBR.soleus).toBe('sóleo')
|
||||
expect(ptBR.Unpair).toBe('Desvincular')
|
||||
expect(ptBR['Starter plan loaded — Mon Push · Wed Pull · Fri Legs']).toContain('Seg Push · Qua Pull')
|
||||
})
|
||||
})
|
||||
@@ -63,7 +63,7 @@ export const PT_BR_OVERRIDES = {
|
||||
'Delete routine?': 'Excluir rotina?',
|
||||
'Delete routine': 'Excluir rotina',
|
||||
'Search…': 'Buscar…',
|
||||
'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'Plano inicial carregado — Seg Empurrar · Qua Puxar · Sex Pernas',
|
||||
'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'Plano inicial carregado — Seg Push · Qua Pull · Sex Pernas',
|
||||
'{0} planned for {1}': '{0} planejado para {1}',
|
||||
'Planned': 'Planejado',
|
||||
'Enter a name': 'Informe um nome',
|
||||
@@ -179,6 +179,25 @@ export const PT_BR_OVERRIDES = {
|
||||
'Reps climb to {0}, then a set is added and the reps start over. At {1} sets it asks you to add weight instead.': 'As repetições aumentam até {0}; depois, uma série é adicionada e as repetições recomeçam. Ao chegar a {1} séries, o app sugere adicionar peso.',
|
||||
|
||||
// Regional wording inherited from pt-PT would otherwise leak into pt-BR.
|
||||
'Next': 'Próximo',
|
||||
'{0} to gain': '{0} para ganhar',
|
||||
'{0} to lose': '{0} para perder',
|
||||
'{0} set still unchecked. Finish the workout now?': 'Falta {0} série sem marcar. Finalizar o treino agora?',
|
||||
'{0} sets still unchecked. Finish the workout now?': 'Faltam {0} séries sem marcar. Finalizar o treino agora?',
|
||||
'band': 'elástico',
|
||||
'resistance band': 'faixa elástica',
|
||||
'core': 'abdômen',
|
||||
'lower back': 'lombar',
|
||||
'shins': 'canelas',
|
||||
'soleus': 'sóleo',
|
||||
'Lower back': 'Lombar',
|
||||
'Shins': 'Canelas',
|
||||
'Import from another app': 'Importar de outro aplicativo',
|
||||
'Stalled {0} sessions — deload to {1} {2}.': '{0} sessões sem progresso — reduza a carga para {1} {2}.',
|
||||
'Bodyweight — every rep last time, so go for {0} this time.': 'Peso corporal — você concluiu todas as repetições na última vez; tente {0} desta vez.',
|
||||
'Bodyweight — same target again until every set is clean.': 'Peso corporal — mantenha a mesma meta até concluir todas as séries.',
|
||||
'Top of the range': 'Topo da faixa',
|
||||
'Unpair': 'Desvincular',
|
||||
'Skip': 'Pular',
|
||||
'Rest / skip this day': 'Descansar / pular este dia',
|
||||
'Workout deleted': 'Treino excluído',
|
||||
|
||||
Reference in new issue
Block a user