Jinja2 syntax highlighting + description field + preview toggle
All checks were successful
Validate / Hassfest (push) Successful in 32s

- Error line highlighting in JinjaEditor (red background on error line)
- Backend returns error_line from TemplateSyntaxError
- Localized syntax error messages with line number
- Renamed {{ }} button to "Variables" (localized)
- Localized all template variable descriptions (EN/RU)
- Added t() fallback parameter for graceful degradation
- Page transition animation (fade) to prevent content stacking
- Added syntaxError/line i18n keys

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-19 20:44:57 +03:00
parent 31873a8ffd
commit 59108a834c
7 changed files with 154 additions and 20 deletions

View File

@@ -266,8 +266,48 @@
"telegramSettings": "Telegram",
"videoWarning": "Video warning",
"preview": "Preview",
"variables": "Variables",
"assetFields": "Asset fields (in {% for asset in added_assets %})",
"confirmDelete": "Delete this template config?"
},
"templateVars": {
"message_assets_added": { "description": "Notification when new assets are added to an album" },
"message_assets_removed": { "description": "Notification when assets are removed from an album" },
"message_album_renamed": { "description": "Notification when an album is renamed" },
"message_album_deleted": { "description": "Notification when an album is deleted" },
"periodic_summary_message": { "description": "Periodic album summary with stats" },
"scheduled_assets_message": { "description": "Scheduled asset picks from albums" },
"memory_mode_message": { "description": "\"On This Day\" memories from past years" },
"album_name": "Album name",
"album_url": "Public share URL (if available)",
"added_count": "Number of assets added",
"removed_count": "Number of assets removed",
"change_type": "Type of change",
"people": "Detected people names (use {{ people | join(', ') }})",
"added_assets": "List of added asset objects (use {% for asset in added_assets %})",
"removed_assets": "List of removed asset IDs",
"shared": "Whether album is shared (true/false)",
"video_warning": "Video size warning text",
"old_name": "Previous album name",
"new_name": "New album name",
"albums": "List of album objects (use {% for album in albums %})",
"assets": "List of asset objects (use {% for asset in assets %})",
"date": "Current date/time",
"asset_filename": "Original filename",
"asset_type": "IMAGE or VIDEO",
"asset_created_at": "Creation date/time (ISO 8601)",
"asset_owner": "Owner display name",
"asset_description": "User or EXIF description",
"asset_url": "Public viewer URL",
"asset_download_url": "Direct download URL",
"asset_photo_url": "Preview image URL (images only)",
"asset_playback_url": "Video playback URL (videos only)",
"asset_is_favorite": "Whether asset is favorited",
"asset_rating": "Star rating (1-5 or null)",
"asset_city": "City name",
"asset_state": "State/region name",
"asset_country": "Country name"
},
"hints": {
"periodicSummary": "Sends a scheduled summary of all tracked albums at specified times. Great for daily/weekly digests.",
"scheduledAssets": "Sends random or selected photos from tracked albums on a schedule. Like a daily photo pick.",
@@ -318,6 +358,8 @@
"newPassword": "New password",
"passwordChanged": "Password changed successfully",
"expand": "Expand",
"collapse": "Collapse"
"collapse": "Collapse",
"syntaxError": "Syntax error",
"line": "line"
}
}