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.
JavaScript apple-watchbodyweightdockerfitnessfitness-trackergymhealthiosmcpnodejspasskeysprogressive-web-applicationspwareactself-hostedself-hostingvitewebauthnweightliftingworkout-tracker
fix(i18n): plate-load hint reads as weight, not reps (#689)
Hsueh0216c5c74cb32605
diff --git a/frontend/src/lib/locale-plate-load.test.js b/frontend/src/lib/locale-plate-load.test.jsnew file mode 100644index 000000000..787a06392--- /dev/null+++ b/frontend/src/lib/locale-plate-load.test.js@@ -0,0 +1,17 @@+import { describe, expect, test } from 'vitest'+import zh from '../locales/zh.js'+import zhTW from '../locales/zh-TW.js'+import ko from '../locales/ko.js'++// '{0} per side' is the plate-load hint: it says how much weight a side carries, with no unit in+// the source string. A translation that adds a rep counter turns 20 kg of plates into "20 reps"+// (issue #689). The separate '{0}/side' key does mean reps, so the two must not be merged.+describe('the plate-load hint is a weight, not a rep count', () => {+ test.each([+ ['zh', zh, /次/],+ ['zh-TW', zhTW, /[次下]/],+ ['ko', ko, /회/],+ ])('%s does not read the plate-load hint as reps', (_locale, pack, reps) => {+ expect(pack['{0} per side']).not.toMatch(reps)+ })+})diff --git a/frontend/src/locales/ko.js b/frontend/src/locales/ko.jsindex a6a3ac37f..18708efc7 100644--- a/frontend/src/locales/ko.js+++ b/frontend/src/locales/ko.js@@ -820,7 +820,7 @@ export default {'{0}/side': '한쪽 {0}회','{0} reps in every set! Add a set and go back to {1}.': '모든 세트 {0}회! 세트를 하나 추가하고 {1}회로 돌아가요.','{0} sets of {1}. Time to add weight or try a harder variation.': '{1}회 {0}세트. 이제 무게를 올리거나 더 어려운 변형에 도전할 때예요.',- '{0} per side': '한쪽당 {0}회',+ '{0} per side': '한쪽당 {0}','Per side': '한쪽당','You still log the total: {0} is {1} per side.': '기록은 그대로 합계로 합니다: {0}회는 한쪽당 {1}회입니다.',diff --git a/frontend/src/locales/zh-TW.js b/frontend/src/locales/zh-TW.jsindex bfbad824f..2ab83c107 100644--- a/frontend/src/locales/zh-TW.js+++ b/frontend/src/locales/zh-TW.js@@ -812,7 +812,7 @@ export default {'{0}/side': '{0}/單側','{0} reps in every set! Add a set and go back to {1}.': '每組都做到 {0} 下!增加一組,次數回到 {1} 下。','{0} sets of {1}. Time to add weight or try a harder variation.': '{0} 組 × {1} 下。該加重或換個更難的變化式了。',- '{0} per side': '單側 {0} 次',+ '{0} per side': '單側 {0}','Per side': '單側','You still log the total: {0} is {1} per side.': '你輸入的依舊是總次數:{0} 代表每邊各 {1} 下。',diff --git a/frontend/src/locales/zh.js b/frontend/src/locales/zh.jsindex b66abad76..7eb76e7aa 100644--- a/frontend/src/locales/zh.js+++ b/frontend/src/locales/zh.js@@ -820,7 +820,7 @@ export default {'{0}/side': '{0}/侧','{0} reps in every set! Add a set and go back to {1}.': '每组都做到 {0} 次!加一组,次数回到 {1}。','{0} sets of {1}. Time to add weight or try a harder variation.': '{0} 组 × {1} 次。该加重量或换个更难的变式了。',- '{0} per side': '每侧 {0} 次',+ '{0} per side': '每侧 {0}','Per side': '每侧','You still log the total: {0} is {1} per side.': '你记录的仍然是总数:{0} 表示每侧 {1} 次。',