diff --git a/locales/en.yml b/locales/en.yml index f4e5ed55..0ffc7be3 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -9922,6 +9922,18 @@ tools: tag-km: km tag-mile: mile tag-calculate: Calculate + marathon: Marathon + half-marathon: Half Marathon + resulttype: '{0}:' + two-of-time-length-and-pace-must-be-provided-nspeed-is-only-valid-when-pace-is-given-or-calculated: >- + Two of "time", "length" and "pace" must be provided.\nSpeed is only + valid when pace is given or calculated. + speed-0: Speed + speed-is-only-valid-when-only-pace-is-given-or-calculated-0: Speed is only valid when (only) pace is given or calculated + pace: Pace + speed: Speed + speed-is-only-valid-when-only-pace-is-given-or-calculated: Speed is only valid when (only) pace is given or calculated + only-two-of-time-length-and-pace-may-be-provided-at-any-time: Only two of "time", "length" and "pace" may be provided at any time saml-parser: title: SAML Parser description: >- @@ -10436,6 +10448,60 @@ tools: texts: the-provided-xmls-are-the-same: The provided XMLs are the same only-show-differences: Only show differences + running-planner: + title: Running Pace Planner + description: >- + Running pace planner tool to help you plan your running pace and training + schedule. + externalAccess: null + texts: + label-kilometers: Kilometers + label-miles: Miles + label-5k: 5K + label-10k: 10K + label-15k: 15K + label-10-mile: 10 Mile + label-20k: 20K + label-half-marathon: Half Marathon + label-25k: 25K + label-30k: 30K + label-marathon: Marathon + label-50k-ultra: 50K Ultra + label-every-1-km: Every 1 km + label-every-2-km: Every 2 km + label-every-5-km: Every 5 km + label-every-10-km: Every 10 km + label-every-1-mile: Every 1 mile + label-every-2-miles: Every 2 miles + label-every-5-miles: Every 5 miles + label-unit: 'Unit:' + label-race: Race + placeholder-minutes: Minutes + placeholder-seconds: Seconds + label-checkpoints: 'Checkpoints:' + label-estimated-finish-time: Estimated Finish Time + title-projected-checkpoints: Projected Checkpoints + distance-unit: 'Distance ({0}):' + pace-unitlabel: 'Pace ({0}):' + custom-distance: Custom Distance + target: Target + distance-unit-value: Distance ({0}) + target-0: Target + ssh-key-converter: + title: SSH Key Format Converter + description: Convert SSH keys between different formats + externalAccess: null + texts: + label-auto-detect: Auto Detect + label-openssh: OpenSSH + label-rfc4716: RFC4716 + label-pem: PEM + label-pkcs8: PKCS8 + label-source-format: Source Format + label-target-format: Target Format + label-input-key: Input Key + placeholder-paste-ssh-key-here: Paste SSH key here... + title-output-key: Output Key analogSignalConverter: texts: title-input: Input diff --git a/src/tools/running-pace-calculator/running-pace-calculator.vue b/src/tools/running-pace-calculator/running-pace-calculator.vue index 8b37fc68..583c426e 100644 --- a/src/tools/running-pace-calculator/running-pace-calculator.vue +++ b/src/tools/running-pace-calculator/running-pace-calculator.vue @@ -39,29 +39,39 @@ function calculateStuff() { try { if (options.time && options.length && options.pace) { - throw new Error('Only two of "time", "length" and "pace" may be provided at any time'); + throw new Error( + t('tools.running-pace-calculator.texts.only-two-of-time-length-and-pace-may-be-provided-at-any-time'), + ); } else if (options.time && options.pace) { if (options.speed) { - throw new Error('Speed is only valid when (only) pace is given or calculated'); + throw new Error( + t('tools.running-pace-calculator.texts.speed-is-only-valid-when-only-pace-is-given-or-calculated'), + ); } - resultType.value = 'Length'; + resultType.value = t('tools.token-generator.length'); result.value = `${runPace.calculateLength(options)}`; } else if (options.time && options.length) { - const label = options.speed ? 'Speed' : 'Pace'; + const label = options.speed + ? t('tools.running-pace-calculator.texts.speed') + : t('tools.running-pace-calculator.texts.pace'); resultType.value = label; result.value = `${runPace.calculatePace(options)}`; } else if (options.pace && options.length) { if (options.speed) { - throw new Error('Speed is only valid when (only) pace is given or calculated'); + throw new Error( + t('tools.running-pace-calculator.texts.speed-is-only-valid-when-only-pace-is-given-or-calculated-0'), + ); } - resultType.value = 'Time'; + resultType.value = t('tools.ttl-calculator.texts.label-time'); result.value = `${runPace.calculateTime(options)}`; } else if (options.pace && options.speed) { - resultType.value = 'Speed'; + resultType.value = t('tools.running-pace-calculator.texts.speed-0'); result.value = `${runPace.paceToSpeed(options)}`; } else { throw new Error( - 'Two of "time", "length" and "pace" must be provided.\nSpeed is only valid when pace is given or calculated.', + t( + 'tools.running-pace-calculator.texts.two-of-time-length-and-pace-must-be-provided-nspeed-is-only-valid-when-pace-is-given-or-calculated', + ), ); } } catch (e: any) { @@ -82,8 +92,12 @@ function calculateStuff() { 1km 5km 10km - Half Marathon - Marathon + {{ + $t('tools.running-pace-calculator.texts.half-marathon') + }} + {{ + $t('tools.running-pace-calculator.texts.marathon') + }} 50km @@ -139,7 +153,11 @@ function calculateStuff() { - + diff --git a/src/tools/running-planner/index.ts b/src/tools/running-planner/index.ts index bcf041c1..2c2d8ff1 100644 --- a/src/tools/running-planner/index.ts +++ b/src/tools/running-planner/index.ts @@ -1,9 +1,10 @@ +import { translate as t } from '@/plugins/i18n.plugin'; import { defineTool } from '../tool'; export const tool = defineTool({ - name: 'Running Pace Planner', + name: t('tools.running-planner.title'), path: '/running-planner', - description: 'Running pace planner tool to help you plan your running pace and training schedule.', + description: t('tools.running-planner.description'), keywords: ['running', 'pace', 'marathon', 'planner'], component: () => import('./running-planner.vue'), icon: defineAsyncComponent(() => import('@vicons/tabler/es/Run')), diff --git a/src/tools/running-planner/running-planner.vue b/src/tools/running-planner/running-planner.vue index 77314f3b..cdddd240 100644 --- a/src/tools/running-planner/running-planner.vue +++ b/src/tools/running-planner/running-planner.vue @@ -2,19 +2,19 @@
- + - + - + @@ -22,12 +22,12 @@ - + - + @@ -63,22 +63,27 @@ - + - + - +