Skip to content

v2.3.0-beta4

Pre-release
Pre-release

Choose a tag to compare

@tempus2016 tempus2016 released this 31 Mar 12:30
· 157 commits to main since this release

TaskMate v2.3.0-beta.4 — Release Notes

Full Internationalisation (i18n)

TaskMate is now fully translatable — backend config flow, options flow, services, select options, and all 14 Lovelace cards.

Frontend (Lovelace cards):

  • taskmate-localize.js module — detects hass.language, fetches matching locale, falls back to en-GB
  • Language fallback chain: nbnb.json, en-GBen-GB.json, pt-BRpt.jsonen-GB.json
  • Failed locale fetches cached to prevent 404 spam
  • 372 translation keys across all 14 cards
  • {placeholder} substitution for dynamic values

Backend (HA integration):

  • Config flow setup wizard fully translated
  • Options flow menus translated — main menu uses HA's native translation system, sub-menus use runtime translation lookup
  • All select option labels (time categories, days, schedule modes, recurrence, actions, streak modes) translated via translation_key + selector section in strings.json
  • Service descriptions in Developer Tools fully translated

Included languages:

Language Frontend (www/locales/) Backend (translations/)
English en-GB.json (372 keys) en.json
Norwegian Bokmål nb.json nb.json
Norwegian Nynorsk nn.json nn.json
Portuguese pt.json pt.json, pt-BR.json

Adding a new language:

  1. Copy www/locales/en-GB.jsonwww/locales/<lang>.json
  2. Copy translations/en.jsontranslations/<lang>.json
  3. Translate the values (keep keys as-is)
  4. Restart HA — cards and config UI load the new language automatically

Changes since beta.02

i18n — Config flow select options (new)

  • All SelectOptionDict labels replaced with translation_key + plain string values
  • 10 translation keys added to selector section: child_action, chore_action, reward_action, time_category, schedule_mode, due_days_option, recurrence, recurrence_day_option, first_occurrence_mode, streak_reset_mode
  • Days of week, time categories, recurrence labels, action buttons (Save/Delete), streak modes — all now translate in the HA settings UI

i18n — Config flow menus (new)

  • Main settings menu (init) now passes a list to async_show_menu so HA translates labels natively
  • Sub-menus (manage children/chores/rewards) use _get_translation() runtime helper to look up "Add New Child", "Back to Main Menu" etc. from translation files
  • Dynamic menu entries (child/chore/reward names) simplified — removed "Edit: " prefix that couldn't be translated

i18n — JS card title fallbacks (new)

  • Parent Dashboard, Reorder, and Points cards now use _t() fallback for default titles in render (previously hardcoded in setConfig)
  • Leaderboard "TIE" label moved from CSS content: pseudo-element to translatable DOM <span> with _t('leaderboard.tie')

i18n — Localize module fixes (new)

  • Fallback language changed from en to en-GB (matching actual source locale file)
  • Language fallback chain: en-GB → tries en-GB.json, pt-BR → tries pt-BR.jsonpt.json
  • Failed fetches cached as null — stops 404 retry spam on every render cycle

Approvals card fix (new)

  • Card now works with both sensor.pending_approvals (reads chore_completions) and sensor.taskmate_overview (reads todays_completions, filters to unapproved)
  • Previously showed "All caught up!" when pointed at the overview sensor

Bug Fixes (from beta.01)

Chore Completion & Approval

  • Reject now fully reverses awards (points, total_points_earned, total_chores_completed, streak)
  • Points awarded includes weekend bonus — stored in completion.points_awarded for correct reversal
  • Perfect week check counts pending completions (not just approved)
  • Streak uses completion date, not approval date
  • Approve/reject log warnings on missing IDs

Rewards

  • Deleting a reward cleans up pending claims (remove_reward_claims_for_reward)
  • Committed points TOCTOU fixed — single fetch per reward in pending-claims loop
  • ClaimRewardButton subtracts committed points for accurate availability

Data Integrity

  • Mutable list aliasing fixed in all from_dict methods
  • Points name/icon no longer overwritten on restart

Buttons & Sensors

  • Buttons update dynamically for new children/chores/rewards
  • Renamed ChoremandorOverallStatsSensorTaskMateOverallStatsSensor
  • Sensor attributes cached per coordinator refresh

Services

  • 6 missing service definitions added (preview_sound, set_chore_order, add/update/remove/apply_penalty)

Code Quality

  • Penalty imports consolidated at module level
  • Deprecated event_loop test fixture removed
  • Voluptuous no longer mocked in tests

Files Changed (28 modified, 12+ new)

Area Files
i18n module www/taskmate-localize.js (new)
Frontend locales www/locales/en-GB.json, nb.json, nn.json, pt.json (new)
Backend translations translations/nb.json, nn.json, pt.json, pt-BR.json (new)
Frontend cards 14 JS files — _t() calls, title fallbacks, TIE label fix
Approvals card taskmate-approvals-card.js — dual-entity support
Config flow config_flow.pytranslation_key selectors, list menus, _get_translation() helper
Frontend loader frontend.py — register localize module
Translation source strings.jsonselector section + 6 new services
Backend fixes __init__.py, coordinator.py, models.py, storage.py, button.py, sensor.py
Tests conftest.py, pytest.ini
Version manifest.json2.3.0-beta.03