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.

Locales: 'Drop {0}' is the drop set beside its ✕, not 'remove'; the Coach's exercise removal says Remove {0}

Duarte Santos8ff86db46049
diff --git a/frontend/src/lib/coach.js b/frontend/src/lib/coach.js
index 8c5e5265f..cfcf01d62 100644
--- a/frontend/src/lib/coach.js
+++ b/frontend/src/lib/coach.js
@@ -607,7 +607,7 @@ export function changeTitle(c, S) {
const ex = c.target?.exId ? exTitle(c.target.exId) : null
switch (c.type) {
case 'add-exercise': return t('Add {0}', exTitle(c.after?.id))
- case 'remove-exercise': return t('Drop {0}', ex)
+ case 'remove-exercise': return t('Remove {0}', ex)
case 'swap-exercise': return t('Swap {0} for {1}', ex, exTitle(c.after?.id))
case 'sets': return t('{0}: sets', ex)
case 'reps': return t('{0}: reps', ex)
diff --git a/frontend/src/lib/drop-label.test.js b/frontend/src/lib/drop-label.test.js
new file mode 100644
index 000000000..26377ff56
--- /dev/null
+++ b/frontend/src/lib/drop-label.test.js
@@ -0,0 +1,28 @@
+import { describe, expect, it } from 'vitest'
+import { changeTitle } from './coach.js'
+
+// "Drop {0}" labels a drop set's sub-row ("Drop 1", lighter weight right after the set), sitting
+// next to the ✕ that removes it. It once also titled the Coach's "remove this exercise" change,
+// and most packs had translated it as that ("1 streichen"), which read as a second delete button.
+const packs = import.meta.glob('../locales/*.js', { eager: true, import: 'default' })
+// The verbs the remove-meaning translations used, per pack. None may come back in the drop label.
+const removeWords = {
+ de: /streich|entfern/i, es: /quitar/i, fr: /retirer/i, it: /togli/i, pt: /retirar|tirar|remover/i,
+ pl: /usuń/i, tr: /çıkar/i, ru: /убрать/i, uk: /прибрати/i, hi: /हटा/, ko: /제외|제거|빼기/, zh: /移除/, 'zh-TW': /移除/,
+}
+
+describe('the drop-set sub-row label', () => {
+ it('is a drop set in every pack, never a word for remove', () => {
+ for (const [path, pack] of Object.entries(packs)) {
+ const lang = path.match(/([\w-]+)\.js$/)[1]
+ const v = pack['Drop {0}']
+ if (v == null) continue // pt-BR inherits pt
+ expect(v, lang).not.toBe(pack['Remove {0}'])
+ if (removeWords[lang]) expect(v, lang).not.toMatch(removeWords[lang])
+ }
+ })
+
+ it('is not what the Coach titles an exercise it takes out', () => {
+ expect(changeTitle({ type: 'remove-exercise', target: { exId: 'bench' } }, {})).toMatch(/^Remove /)
+ })
+})
diff --git a/frontend/src/lib/pt-br-locale.test.js b/frontend/src/lib/pt-br-locale.test.js
index 8e22a59f7..db947728e 100644
--- a/frontend/src/lib/pt-br-locale.test.js
+++ b/frontend/src/lib/pt-br-locale.test.js
@@ -41,7 +41,7 @@ describe('Brazilian Portuguese locale', () => {
// 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('13a18463457756651e1a9b7cd9b4d4db7123f77825aac92b6fcd99b2695861d2')
+ expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('7f4975bb13d90d3d98c30398944120a4b678407c4d0f93fe6f0c19408245243c')
})
test('does not leak European Portuguese UI terms', () => {
diff --git a/frontend/src/locales/de.js b/frontend/src/locales/de.js
index 1583f1395..f402ea1e6 100644
--- a/frontend/src/locales/de.js
+++ b/frontend/src/locales/de.js
@@ -955,7 +955,7 @@ export default {
'Before the Coach’s plan': 'Vor dem Plan des Coachs',
'Before the Coach’s changes': 'Vor den Änderungen des Coachs',
'Add {0}': '{0} hinzufügen',
- 'Drop {0}': '{0} streichen',
+ 'Drop {0}': 'Drop {0}',
'Swap {0} for {1}': '{0} durch {1} ersetzen',
'{0}: sets': '{0}: Sätze',
'{0}: reps': '{0}: Wiederholungen',
diff --git a/frontend/src/locales/es.js b/frontend/src/locales/es.js
index df548adf6..4e8a0b44f 100644
--- a/frontend/src/locales/es.js
+++ b/frontend/src/locales/es.js
@@ -937,7 +937,7 @@ export default {
'Before the Coach’s plan': 'Antes del plan del Entrenador',
'Before the Coach’s changes': 'Antes de los cambios del Entrenador',
'Add {0}': 'Añadir {0}',
- 'Drop {0}': 'Quitar {0}',
+ 'Drop {0}': 'Bajada {0}',
'Swap {0} for {1}': 'Cambiar {0} por {1}',
'{0}: sets': '{0}: series',
'{0}: reps': '{0}: repeticiones',
diff --git a/frontend/src/locales/fr.js b/frontend/src/locales/fr.js
index d21c485ba..55edbdc4f 100644
--- a/frontend/src/locales/fr.js
+++ b/frontend/src/locales/fr.js
@@ -937,7 +937,7 @@ export default {
'Before the Coach’s plan': 'Avant le plan du Coach',
'Before the Coach’s changes': 'Avant les changements du Coach',
'Add {0}': 'Ajouter {0}',
- 'Drop {0}': 'Retirer {0}',
+ 'Drop {0}': 'Drop {0}',
'Swap {0} for {1}': 'Remplacer {0} par {1}',
'{0}: sets': '{0} : séries',
'{0}: reps': '{0} : répétitions',
diff --git a/frontend/src/locales/hi.js b/frontend/src/locales/hi.js
index f0c851284..4a76ac24c 100644
--- a/frontend/src/locales/hi.js
+++ b/frontend/src/locales/hi.js
@@ -937,7 +937,7 @@ export default {
'Before the Coach’s plan': 'कोच के प्लान से पहले',
'Before the Coach’s changes': 'कोच के बदलावों से पहले',
'Add {0}': '{0} जोड़ें',
- 'Drop {0}': '{0} हटाएँ',
+ 'Drop {0}': 'ड्रॉप {0}',
'Swap {0} for {1}': '{0} की जगह {1}',
'{0}: sets': '{0}: सेट',
'{0}: reps': '{0}: रेप्स',
diff --git a/frontend/src/locales/it.js b/frontend/src/locales/it.js
index 7bd9451c0..0705c1506 100644
--- a/frontend/src/locales/it.js
+++ b/frontend/src/locales/it.js
@@ -937,7 +937,7 @@ export default {
'Before the Coach’s plan': 'Prima del piano del Coach',
'Before the Coach’s changes': 'Prima delle modifiche del Coach',
'Add {0}': 'Aggiungi {0}',
- 'Drop {0}': 'Togli {0}',
+ 'Drop {0}': 'Drop {0}',
'Swap {0} for {1}': 'Sostituisci {0} con {1}',
'{0}: sets': '{0}: serie',
'{0}: reps': '{0}: ripetizioni',
diff --git a/frontend/src/locales/ko.js b/frontend/src/locales/ko.js
index 61c00dc49..82be73bba 100644
--- a/frontend/src/locales/ko.js
+++ b/frontend/src/locales/ko.js
@@ -937,7 +937,7 @@ export default {
'Before the Coach’s plan': '코치 계획 전',
'Before the Coach’s changes': '코치 변경 전',
'Add {0}': '{0} 추가',
- 'Drop {0}': '{0} 제외',
+ 'Drop {0}': '드롭 {0}',
'Swap {0} for {1}': '{0}을(를) {1}(으)로 교체',
'{0}: sets': '{0}: 세트',
'{0}: reps': '{0}: 횟수',
diff --git a/frontend/src/locales/pl.js b/frontend/src/locales/pl.js
index 309a00eca..3cc4dc685 100644
--- a/frontend/src/locales/pl.js
+++ b/frontend/src/locales/pl.js
@@ -937,7 +937,7 @@ export default {
'Before the Coach’s plan': 'Przed planem Trenera',
'Before the Coach’s changes': 'Przed zmianami Trenera',
'Add {0}': 'Dodaj {0}',
- 'Drop {0}': 'Usuń {0}',
+ 'Drop {0}': 'Drop {0}',
'Swap {0} for {1}': 'Zamień {0} na {1}',
'{0}: sets': '{0}: serie',
'{0}: reps': '{0}: powtórzenia',
diff --git a/frontend/src/locales/pt.js b/frontend/src/locales/pt.js
index 540e13284..de30e2cea 100644
--- a/frontend/src/locales/pt.js
+++ b/frontend/src/locales/pt.js
@@ -937,7 +937,7 @@ export default {
'Before the Coach’s plan': 'Antes do plano do Treinador',
'Before the Coach’s changes': 'Antes das alterações do Treinador',
'Add {0}': 'Adicionar {0}',
- 'Drop {0}': 'Retirar {0}',
+ 'Drop {0}': 'Queda {0}',
'Swap {0} for {1}': 'Trocar {0} por {1}',
'{0}: sets': '{0}: séries',
'{0}: reps': '{0}: repetições',
diff --git a/frontend/src/locales/ru.js b/frontend/src/locales/ru.js
index 5e75cd2e9..4dd4d659d 100644
--- a/frontend/src/locales/ru.js
+++ b/frontend/src/locales/ru.js
@@ -918,7 +918,7 @@ export default {
'Before the Coach’s plan': 'До плана Тренера',
'Before the Coach’s changes': 'До изменений Тренера',
'Add {0}': 'Добавить {0}',
- 'Drop {0}': 'Убрать {0}',
+ 'Drop {0}': 'Дроп {0}',
'Swap {0} for {1}': 'Заменить {0} на {1}',
'{0}: sets': '{0}: подходы',
'{0}: reps': '{0}: повторения',
diff --git a/frontend/src/locales/tr.js b/frontend/src/locales/tr.js
index bf89723e7..2dd3d40fc 100644
--- a/frontend/src/locales/tr.js
+++ b/frontend/src/locales/tr.js
@@ -937,7 +937,7 @@ export default {
'Before the Coach’s plan': 'Koç’un planından önce',
'Before the Coach’s changes': 'Koç’un değişikliklerinden önce',
'Add {0}': '{0} ekle',
- 'Drop {0}': '{0} çıkar',
+ 'Drop {0}': 'Düşüş {0}',
'Swap {0} for {1}': '{0} yerine {1}',
'{0}: sets': '{0}: set',
'{0}: reps': '{0}: tekrar',
diff --git a/frontend/src/locales/uk.js b/frontend/src/locales/uk.js
index b7e6fb73f..726e7c168 100644
--- a/frontend/src/locales/uk.js
+++ b/frontend/src/locales/uk.js
@@ -747,7 +747,7 @@ export default {
'Before the Coach’s plan': 'До плану Тренера',
'Before the Coach’s changes': 'До змін Тренера',
'Add {0}': 'Додати {0}',
- 'Drop {0}': 'Прибрати {0}',
+ 'Drop {0}': 'Дроп {0}',
'Swap {0} for {1}': 'Замінити {0} на {1}',
'{0}: sets': '{0}: підходи',
'{0}: reps': '{0}: повторення',
diff --git a/frontend/src/locales/zh-TW.js b/frontend/src/locales/zh-TW.js
index d4aa26c1c..910ebbc1d 100644
--- a/frontend/src/locales/zh-TW.js
+++ b/frontend/src/locales/zh-TW.js
@@ -929,7 +929,7 @@ export default {
'Before the Coach’s plan': '套用教練計畫前',
'Before the Coach’s changes': '套用教練修改前',
'Add {0}': '新增 {0}',
- 'Drop {0}': '移除 {0}',
+ 'Drop {0}': '遞減 {0}',
'Swap {0} for {1}': '將 {0} 替換為 {1}',
'{0}: sets': '{0}:組數',
'{0}: reps': '{0}:次數',
diff --git a/frontend/src/locales/zh.js b/frontend/src/locales/zh.js
index be38c8821..d164dbc66 100644
--- a/frontend/src/locales/zh.js
+++ b/frontend/src/locales/zh.js
@@ -937,7 +937,7 @@ export default {
'Before the Coach’s plan': '教练计划之前',
'Before the Coach’s changes': '教练更改之前',
'Add {0}': '添加 {0}',
- 'Drop {0}': '移除 {0}',
+ 'Drop {0}': '递减 {0}',
'Swap {0} for {1}': '将 {0} 换成 {1}',
'{0}: sets': '{0}:组数',
'{0}: reps': '{0}:次数',