|
|
9a60bfec58
|
feat: migrate user settings and agent management to gettext
Migrates all remaining user settings and agent management flash messages to gettext:
User Settings:
- session_manager.ex: mobile device removal, alert preferences, browser session revocation, revoke all sessions
- totp_manager.ex: device creation, verification, deletion, recovery code generation
- api_token_manager.ex: token creation, deletion, validation errors
- user_auth.ex: policy consent acceptance message
Agent Management:
- agent_live/edit.ex: agent update success
- agent_live/index.ex: agent/cloud poller creation, token regeneration, agent deletion, global default settings
All flash messages now use domain-specific helpers (t_auth, t_equipment) for proper internationalization.
Tests passing: 4165 tests, 0 failures
|
2026-02-02 13:20:54 -06:00 |
|
|
|
0d85e85884
|
feat: migrate all remaining authentication and session flash messages to gettext
Completes the flash message migration by converting all remaining user-facing strings:
**UserAuth.ex changes:**
- All Plug functions: require_sudo_mode, require_authenticated_user, require_superuser
- load_current_organization error messages (3 messages)
- All LiveView on_mount callbacks (8 auth-related messages)
- Policy consent success message
**SessionManager.ex changes:**
- Mobile device session management (2 messages)
- Alert preferences updates (3 messages including conditional)
All messages now use t_auth() for consistent translation in the auth domain.
All tests passing (100 tests).
|
2026-02-02 13:02:44 -06:00 |
|
|
|
89a076fb67
|
feat: migrate equipment features to gettext and fix sudo mode tests
Migrates all equipment-related flash messages to gettext for internationalization:
- DeviceLive.Index: device discovery, reordering, error messages
- DeviceLive.Show: backup messages, permission errors
- DeviceLive.Form: device CRUD operations
- AlertLive.Index: alert acknowledgment messages
- SiteLive.Show: site discovery messages
- SiteLive.Form: site CRUD and SNMP/agent propagation
Fixes sudo mode test suite issues:
- Updates Accounts.sudo_mode?/2 test to check last_sudo_at instead of authenticated_at
- Adds register_and_log_in_user_with_sudo/1 helper to ConnCase
- Fixes UserAuth sudo mode tests to use session-based authentication
- Updates MyData tests to use sudo mode (now required per router config)
- Removes obsolete UserSettingsLive "without sudo mode" test
- Fixes grant_sudo_mode/1 DateTime truncation to seconds
All equipment module tests passing. Ready for Phase 3 (Admin Features).
|
2026-02-02 12:41:58 -06:00 |
|
|
|
cfb60cd186
|
feat: implement gettext infrastructure (Phase 1)
- Create domain-specific .pot template files (auth, equipment, admin, emails)
- Create corresponding English .po files for all domains
- Add GettextHelpers module with domain-specific helper functions:
* t() for default domain (common UI)
* t_auth() for authentication flows
* t_equipment() for equipment/device management
* t_admin() for admin features
* t_email() for email templates
- Import GettextHelpers in html_helpers() for automatic availability in LiveViews/components
- Add mix populate_english task to auto-fill English translations (msgstr = msgid)
- Task properly handles plural forms and multi-line strings
Phase 1 complete - infrastructure ready for module-by-module migration.
|
2026-02-02 09:40:32 -06:00 |
|