Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

Merge #205: feat: switch activity heatmap between time and volume (Space-Hermes)

Duarte Santos826f10e6fe28
diff --cc frontend/src/lib/pt-br-locale.test.js
index 4ae44b901,ec2967c8c..9bffc496a
--- a/frontend/src/lib/pt-br-locale.test.js
+++ b/frontend/src/lib/pt-br-locale.test.js
@@@ -27,21 -27,11 +27,21 @@@ describe('Brazilian Portuguese locale'
.sort(byCodeUnit)
const fingerprint = createHash('sha256').update(JSON.stringify(inherited)).digest('hex')
- expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(645)
- expect(inherited).toHaveLength(662)
- // If this fails, review the changed keys and wording before accepting a new hash. From
+ // Every override names a real source string, so the two sets partition pt-PT's keys between
+ // them and the fingerprint below covers everything not overridden. A typo'd override key
+ // would otherwise sit in the file translating nothing.
+ const stray = Object.keys(PT_BR_OVERRIDES).filter(key => !(key in pt))
+ expect(stray, 'override keys that are not pt-PT keys').toEqual([])
+ expect(Object.keys(PT_BR_OVERRIDES).length + inherited.length).toBe(Object.keys(pt).length)
+ // …and each one really reaches the pack, whatever the spread order does.
+ for (const [key, value] of Object.entries(PT_BR_OVERRIDES)) expect(ptBR[key], key).toBe(value)
+
+ // The counts themselves are read off the pack rather than pinned here: a new UI string lands
+ // in pt.js and pt-BR.js together and moves both, and a number in a test that every new string
+ // has to be taught is a number nobody reads. What the numbers stood for is asserted above.
+ // If the hash fails, review the changed keys and wording before accepting a new one. From
// frontend/: node scripts/pt-br-inheritance-fingerprint.mjs --list
- expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('f81cca4b7e73e229526217b8a3825069ee65fb6a5586c143b324038f99499f75')
- expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('ad8b9c1187e93a12f532bef848ad98de80da0e5477a897e0493deedd938aaf7e')
++ expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('bdf1fb1dc4d882d1cfd51328ba1b79bfc1b8e598567ff8662cb2c10d3e3701a6')
})
test('does not leak European Portuguese UI terms', () => {