chore/code-quality-cleanup #24
No reviewers
Labels
No labels
bug
code
docs
duplicate
enhancement
help wanted
invalid
question
styles
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
uwayss/muhsin!24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/code-quality-cleanup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Code quality cleanup and some bug fixes
DAYS was a module constant, so its labels were translated once at import time. i18n.locale is only set from stored settings when initialize() runs, which happens later, so the abbreviations froze in the device locale and ignored every language change afterwards. Build them during render instead. The "how many times per {{interval}}?" prompt interpolated type.replace('ly', ''), which is the English "month" or "year" in all six languages - Arabic was gluing its definite article onto it, giving "في الmonth". Replace the placeholder with a full sentence per interval, since the noun does not decline the same way across these languages.The two fields disagreed about what made a goal valid: the unit field required a value and a non-empty unit, but the value field stored a goal as soon as it had a number. Entering a target and skipping the unit saved {value: 5, unit: ''}, which renders as "5 / 5 " everywhere progress is shown. Commit both fields through one helper so they cannot drift apart again.