Commit Graph

943 Commits

Author SHA1 Message Date
github-actions[bot]
dc05af0a2d chore: bump version to 1.1.2 2025-10-29 03:29:20 +00:00
github-actions[bot]
7863363e42 github release don't need secrets 2025-10-29 14:26:48 +11:00
github-actions[bot]
81f474704b rework on get prev version script 2025-10-29 14:22:25 +11:00
github-actions[bot]
c5d3ee9a6c chore: revert version from 1.1.2 to 1.1.1 2025-10-29 14:22:04 +11:00
Fengqing Liu
522312e2cc add missing release note generation 2025-10-28 15:25:47 +11:00
Fengqing Liu
e51f95bd8f fix checkout branch 2025-10-28 14:54:27 +11:00
github-actions[bot]
ad1e08a453 chore: bump version to 1.1.2 2025-10-27 12:23:45 +00:00
github-actions[bot]
d2bc97c250 full translation for all by Claude 2025-10-27 23:16:19 +11:00
github-actions[bot]
d61eabbfdf remove unused structure 2025-10-27 22:57:10 +11:00
github-actions[bot]
dda8b2e1e1 remove claude one time script 2025-10-27 21:16:22 +11:00
github-actions[bot]
84e82c0072 fix general settings translation 2025-10-27 21:16:05 +11:00
github-actions[bot]
2a25b82c26 fix repo link 2025-10-27 21:04:35 +11:00
github-actions[bot]
ead72d4dda fix: update script calls to use env variable for CURRENT_BRANCH_NAME 2025-10-27 16:55:19 +11:00
github-actions[bot]
3292a66898 chore: allow manual trigger for GitHub Release workflow 2025-10-27 16:36:54 +11:00
github-actions[bot]
5b41b297df name change 2025-10-27 16:20:52 +11:00
github-actions[bot]
2c1d130522 chore: bump version to 1.1.1 v1.1.1 2025-10-27 05:13:34 +00:00
github-actions[bot]
74208e33b3 chore: revert version from 1.1.1 to 1.1.0 2025-10-27 16:12:48 +11:00
github-actions[bot]
d7b1e913d3 script fix 2025-10-27 16:12:27 +11:00
github-actions[bot]
5f71d49883 extracted the previous version extraction logic 2025-10-27 16:02:40 +11:00
github-actions[bot]
8477a545bf change way to get last version, create a script to revert release 2025-10-27 15:45:59 +11:00
github-actions[bot]
74c8980edc branch name use and extraction fixes, limit validation to main branch 2025-10-27 14:23:08 +11:00
github-actions[bot]
63830beda2 chore: bump version to 1.1.1 2025-10-27 03:09:40 +00:00
github-actions[bot]
0dbad84465 no need 2025-10-27 14:09:05 +11:00
github-actions[bot]
bb9f77f140 fix: remove Pillow and jinja2 dependencies, add yarl and pydantic explicitly 2025-10-27 13:57:20 +11:00
github-actions[bot]
05eb16a07b feat: enhance version validation with semver range support and test suite
- Add dual-mode version extraction supporting branch and file validation
- Implement comprehensive semver range validation (caret, tilde, wildcards)
- Extract release creation logic to dedicated script for reusability
- Add test suite with comprehensive coverage for validation scripts
- Update workflow to validate new version is greater than current
- Bump version to 1.1.0 in pyproject.toml to match version.py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 13:18:11 +11:00
github-actions[bot]
08dab4ca6b refactor: consolidate version extraction logic and update workflow validation
Extracted version extraction logic from workflows into a centralized script for better reusability and consistency. Updated validation output naming for clarity.

Changes:
- Add extract_version.sh for centralized version extraction
- Remove update_version.sh (functionality integrated into workflows)
- Update validate_semver.sh output: release_type → is_prerelease
- Refactor docker-release.yml to use extract_version.sh
- Refactor github-release.yml to use centralized scripts
- Add version duplication check in version-release.yml

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 10:56:33 +11:00
github-actions[bot]
f972a9507e refactor: streamline release workflows and extract validation to scripts
- Simplify github-release workflow by removing auto-generation and linting steps
- Extract SemVer validation from inline workflow to dedicated script
- Add production environment protection to version-release workflow
- Create reusable validation and update scripts in .github/scripts/
- Update release notes for v1.1.1

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 21:34:50 +11:00
github-actions[bot]
b42611967d refactor: separate Docker and GitHub release workflows for better modularity
Split the monolithic publish workflow into docker-release and github-release workflows to improve separation of concerns and allow independent execution. GitHub releases now trigger as a dependent workflow after successful Docker builds.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 21:08:03 +11:00
github-actions[bot]
f1468d7ff0 fix: update Ruff linter command to automatically fix issues 2025-10-26 19:39:36 +11:00
github-actions[bot]
b11ae09f7f feat: enhance release note generation script and update workflows for improved usability 2025-10-26 19:37:39 +11:00
github-actions[bot]
3aede38fa1 feat: update versioning and remove unused constants 2025-10-26 18:49:02 +11:00
github-actions[bot]
0f6532eb12 fix workflow error 2025-10-26 12:09:19 +11:00
github-actions[bot]
5f132d8c73 fix: ensure local package installation in validation workflow 2025-10-25 22:48:35 +11:00
github-actions[bot]
4c46a50453 feat: enhance release note generation and update workflow scripts 2025-10-25 22:29:21 +11:00
github-actions[bot]
3b50078b83 docs: auto-generate release notes for v1.1.0 2025-10-25 21:01:17 +11:00
Fengqing Liu
50cdeca935 version fix 2025-10-25 17:03:02 +11:00
Fengqing Liu
dd0e22462d Merge pull request #3 from Knight-sys/main
fix: escape special characters in game names using event listeners
2025-10-25 15:07:59 +11:00
Fengqing Liu
c046deb967 static check & format 2025-10-25 14:59:24 +11:00
Fengqing Liu
cd75e0818c Update documentation for new translation pattern and removed exception
Updated CLAUDE.md to reflect the new translation access pattern and
removal of the ReloadRequest exception.

Changes:
- Updated translation usage examples to show new dict access pattern:
  - Old: _("gui", "status", "idle")
  - New: _.t["gui"]["status"]["idle"]
- Removed ReloadRequest from exceptions list in Key Files section
- Examples now accurately reflect the current codebase implementation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 14:01:05 +11:00
Fengqing Liu
65d7821d3e Clean up client code and remove unused ReloadRequest exception
Removed unnecessary wrapper methods in the Twitch client and the unused
ReloadRequest exception to simplify the codebase.

Client cleanup (src/core/client.py):
- Removed unnecessary wrapper methods that just delegated to services:
  - _watch_sleep() - direct call to service
  - _watch_loop() - task created directly from service method
  - _maintenance_task() - unused wrapper removed
  - process_drops() - websocket callback uses service method directly
  - process_notifications() - websocket callback uses service method directly
  - process_stream_state() - websocket callback uses service method directly
  - process_stream_update() - websocket callback uses service method directly
  - get_priority() - direct call to service
  - _viewers_key() - direct call to static method
- Changed websocket topic callbacks to use service methods directly
- Removed ReloadRequest handling from run() method
- Net reduction: ~50 lines of unnecessary delegation code

Exception removal (src/exceptions.py):
- Removed unused ReloadRequest exception class
- This exception was never actually raised in the codebase

Task wrapper update (src/utils/async_helpers.py):
- Removed ReloadRequest from exception handling
- Updated docstrings to reflect this change

Benefits:
- Simpler code: Less indirection through unnecessary wrappers
- More direct: Websocket callbacks use service methods directly
- Cleaner: Removed unused exception class
- Easier to follow: Less jumping between wrapper and actual implementation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 14:00:49 +11:00
Fengqing Liu
4b342d82ac Refactor Translator class and modernize translation access pattern
Simplified the Translator class to be more direct and Pythonic, and
updated all translation access from callable pattern to dict access.

Translator changes (src/i18n/translator.py):
- Removed complex fallback/merging logic with English translations
- Simplified from callable pattern _("key", "subkey") to dict access _.t["key"]["subkey"]
- Removed _load_english_translation() and module-level English translation
- Changed from list of language names to dict of Translation objects
- Removed unnecessary imports (abc, json_utils, MinerException, TYPE_CHECKING)
- Made language storage and access more direct (self.t property)
- Simplified set_language() to direct dict lookup

Translation access pattern changes (all other files):
- Changed from _("key", "subkey") to _.t["key"]["subkey"] throughout codebase
- This is more Pythonic and aligns with TypedDict structure
- Applied in: __main__.py, http_client.py, auth_state.py, models/drop.py,
  services (inventory, message_handlers, watch), web managers (login, settings),
  websocket.py

Benefits:
- More Pythonic: Direct dict access instead of callable
- Simpler: Removed ~70 lines of complex fallback logic
- Type-safe: Direct access to TypedDict structure
- More explicit: _.t["key"]["subkey"] shows the structure clearly
- Easier to maintain: No complex merging or fallback logic

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 14:00:29 +11:00
Fengqing Liu
221939e26a Refactor /api/translations to return full Translation object
Simplified the /api/translations endpoint to return the complete
Translation TypedDict object instead of manually constructing a
custom nested structure. This makes the code more maintainable,
type-safe, and consistent with the translation schema.

Backend changes (src/web/app.py):
- Removed 116 lines of manual translation object construction
- Now returns _.t directly (full Translation object)
- Reduced endpoint from ~120 lines to 3 lines

Frontend changes (web/static/app.js):
- Updated to work with full Translation object structure
- All GUI translations now accessed via t.gui.* paths
- Login status uses t.login.status.* (from Translation.login)
- Websocket status uses t.gui.websocket.*
- Updated all render functions and Socket.IO handlers

Benefits:
- Simpler and more maintainable backend code
- Type-safe: returns exact Translation TypedDict structure
- Frontend can access all translation sections (gui, login, error, status)
- Follows the defined TypedDict schema exactly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 13:46:55 +11:00
Knight-sys
89fd147ac3 fix: escape special characters in game names using event listeners 2025-10-24 10:58:15 -05:00
Fengqing Liu
cf69deb6d7 format 2025-10-24 21:57:11 +11:00
Fengqing Liu
46291e83d8 Update CLAUDE.md with comprehensive translation system documentation
This commit documents the current state of the translation system architecture
and consolidates the recent i18n refactoring work.

Documentation updates:
- Add detailed Translation System section describing architecture
- Document all 19 supported languages with native names
- Include TypedDict schema structure and usage examples
- Update project structure to show lang/ directory
- Expand Key Files section with i18n/ package details
- Document language persistence and dynamic switching

Translation system changes:
- Migrate English translations from hardcoded to lang/English.json
- Add English.json as single source of truth for fallback translations
- Update all language files with comprehensive GUI translations
- Refactor translator.py to load English from JSON file
- Add language_name and english_name fields to all translations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 21:48:30 +11:00
Fengqing Liu
3dbd4e6c1f Add native translations for Games to Watch settings
Replaced English placeholders with proper translations in all 18 non-English language files:
- Chinese (简体中文, 繁體中文)
- Japanese (日本語)
- Russian (Русский)
- Ukrainian (Українська)
- German (Deutsch)
- Spanish (Español)
- French (Français)
- Portuguese (Português)
- Italian (Italiano)
- Polish (Polski)
- Romanian (Română)
- Dutch (Nederlandse)
- Danish (Dansk)
- Indonesian
- Czech (Čeština)
- Turkish (Türkçe)
- Arabic (العربية)

All settings UI strings now properly translated:
- games_to_watch, games_help, search_games
- select_all, deselect_all
- selected_games, available_games
- no_games_selected, no_games_match, all_games_selected
- actions, connection_quality, minimum_refresh

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 12:25:35 +11:00
Fengqing Liu
522299c920 Clean up translation files and add comprehensive web GUI translations
- Remove unused translation keys from all language files:
  - Removed chrome login flow keys (no longer used)
  - Removed GUI channel headings (table structure changed)
  - Removed GUI inventory filter section (filtering not in web GUI)
  - Removed GUI settings proxy field (moved to general section)
  - Cleaned up other deprecated keys

- Add new translation keys for web GUI:
  - OAuth login prompts (oauth_prompt, oauth_activate, oauth_confirm)
  - Progress indicators (no_drop, return_to_auto, manual_mode_info)
  - Channel empty states (no_channels, no_channels_for_games, channel_count)
  - Inventory empty state (no_campaigns, claimed_drops)
  - Settings UI (games selector, search, drag-and-drop hints)
  - Help section content (about, features, important_notes)
  - Header elements (title, language selector, mode indicators)

- Update app.py /api/translations endpoint to use translation keys instead of hardcoded English strings
- Update translator.py TypedDict definitions to match new structure
- Fix i18n __init__.py exports to remove ChromeMessages, GUIChannelHeadings, GUIInvFilter and add GUIHeader

All 19 language files updated consistently. Non-English languages use English text as placeholders for new keys.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 11:15:02 +11:00
Fengqing Liu
2a0d78305c Fix language setting not being persisted
Problem: Language selection in the web GUI was not being saved to disk,
so the setting was lost on application restart.

Root cause: SettingsManager.update_settings() called alter() to mark
settings as changed, but never called save() to persist them. Settings
were only saved later during inventory fetch, which might not happen
before restart.

Solution: Add immediate save() call after altering settings to ensure
all setting changes (language, dark_mode, games_to_watch, etc.) are
persisted to settings.json immediately.

The language is already loaded on startup (src/__main__.py:105), so
now the saved language preference will be correctly restored.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:57:46 +11:00
Fengqing Liu
c487f0e035 Fix help tab content duplication on language change
Problem: Help tab content was growing/duplicating every time the
language was changed because the code was trying to dynamically insert
"How It Works" sections that couldn't be found after translation.

Solution: Remove the dynamic content insertion logic for help sections.
Now only updates existing header text instead of creating new elements.

This prevents duplicate sections from appearing when switching languages.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:50:31 +11:00
Fengqing Liu
550ceb0111 Add comprehensive translation support for all GUI text
Backend enhancements:
- Expand /api/translations endpoint with all available translation strings
- Include login form fields, OAuth prompts, progress labels, channel statuses
- Add inventory status texts, settings empty messages, help content
- Include connection status and viewer/channel count translations

Frontend improvements:
- Update all input placeholders (username, password, 2FA, search)
- Translate all button texts (Login, OAuth confirm, reload, manual mode)
- Apply translations to empty state messages across all sections
- Translate campaign statuses (Active, Upcoming, Expired, Claimed)
- Update channel and viewer count labels
- Apply translations to settings empty messages
- Update help tab with translated how-it-works and getting-started text
- Translate connection status indicators

Now supports translating:
- Login form (all fields and buttons)
- OAuth device code flow prompts
- Progress section labels and manual mode controls
- Channel list empty states and status labels
- Inventory campaign statuses and empty states
- Settings section empty messages and labels
- Help content sections
- Header connection indicators

All dynamically rendered content now respects language selection.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:46:29 +11:00