pt-BR: override the equipment-profile strings instead of inheriting them
The new equipment strings landed in pt.js only, so pt-BR inherited European wording — «guillemets», 'A mostrar', 'Ginásio', 'tens' — and the locale's own guard test caught it. Adds Brazilian overrides (você, 'Academia', 'Excluir perfil?', curly double quotes) and re-baselines the inheritance fingerprint: the one newly inherited entry is !14's note placeholder, which reads the same in both variants ('anilha' is current usage in Brazil too).
This commit is contained in:
1 parent
7f0afae228
commit
f37448aece
2 files changed
+24
-4
No files matched your search
@@ -27,11 +27,11 @@ describe('Brazilian Portuguese locale', () => {
|
||||
.sort(byCodeUnit)
|
||||
const fingerprint = createHash('sha256').update(JSON.stringify(inherited)).digest('hex')
|
||||
|
||||
expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(242)
|
||||
expect(inherited).toHaveLength(412)
|
||||
expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(260)
|
||||
expect(inherited).toHaveLength(413)
|
||||
// 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('ae2c8df077f5c4e80be84e07176291eebfac6d60c9503b0f13dd31809a3bfa12')
|
||||
expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('241f027658796cc753f7f81f9e7511c02cc93c4d4480e98c532fe7b47f331beb')
|
||||
})
|
||||
|
||||
test('does not leak European Portuguese UI terms', () => {
|
||||
|
||||
@@ -247,7 +247,27 @@ export const PT_BR_OVERRIDES = {
|
||||
'We': 'Q',
|
||||
'Th': 'Q',
|
||||
'Fr': 'S',
|
||||
'Sa': 'S'
|
||||
'Sa': 'S',
|
||||
|
||||
// --- equipment profiles ---
|
||||
'Showing all equipment': 'Mostrando todos os equipamentos',
|
||||
'Showing what you have in "{0}"': 'Mostrando o que você tem em “{0}”',
|
||||
'Show all equipment': 'Mostrar todos os equipamentos',
|
||||
'Filter by "{0}"': 'Filtrar por “{0}”',
|
||||
'Edit profile': 'Editar perfil',
|
||||
'New equipment profile': 'Novo perfil de equipamentos',
|
||||
'Name it after where you train — e.g. "Home" or "Gym" — then check what you have there.': 'Dê a ele o nome do lugar onde você treina — por exemplo, “Casa” ou “Academia” — e marque o que você tem lá.',
|
||||
'Profile name': 'Nome do perfil',
|
||||
'Body-weight exercises are always available, in every profile.': 'Exercícios com o peso do corpo estão sempre disponíveis, em todos os perfis.',
|
||||
'{0} of {1} exercises need equipment outside "{2}"': '{0} de {1} exercícios precisam de equipamentos fora de “{2}”',
|
||||
'Needs {0} — not in your active profile': 'Precisa de {0} — não está no seu perfil ativo',
|
||||
'Filter by equipment': 'Filtrar por equipamento',
|
||||
'Active profile': 'Perfil ativo',
|
||||
'{0} equipment types': '{0} tipos de equipamento',
|
||||
'Add equipment profile': 'Adicionar perfil de equipamentos',
|
||||
'Delete profile?': 'Excluir perfil?',
|
||||
'"{0}" and its equipment list will be removed.': '“{0}” e sua lista de equipamentos serão removidos.',
|
||||
'Filters the exercise library and picker, and flags routine exercises that need something you don’t have in the active profile.': 'Filtra a biblioteca de exercícios e o seletor, e sinaliza os exercícios das rotinas que precisam de algo que você não tem no perfil ativo.'
|
||||
}
|
||||
|
||||
export default { ...pt, ...PT_BR_OVERRIDES }
|
||||
Reference in new issue
Block a user