Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
API error and info messages in the interface language, with a stable code on each error (#477)
Murtaza Nasir0c759a51ee0d
diff --git a/docs/user-guide/api-reference.md b/docs/user-guide/api-reference.mdindex e7c57192..e3d1c2c0 100644--- a/docs/user-guide/api-reference.md+++ b/docs/user-guide/api-reference.md@@ -2023,7 +2023,7 @@ All endpoints return consistent error responses:}```-`code` is a machine-readable value, present on newer errors (for example `insufficient_scope`, `invalid_parameter`, `not_found`).+`error` is written in the interface language of the account that owns the token (Account > Interface Language), and in English when none is set. `code` is a machine-readable value that is the same in every language, for example `insufficient_scope`, `invalid_parameter` or `not_found`. A client is built on `code` and the HTTP status, not on the text of `error`. Errors that pass on the text of an unexpected exception carry no `code`.**Common HTTP Status Codes:**diff --git a/src/api/admin.py b/src/api/admin.pyindex 0c150a4e..bc5bb5d6 100644--- a/src/api/admin.py+++ b/src/api/admin.py@@ -15,7 +15,7 @@ from werkzeug.utils import secure_filenamefrom src.database import dbfrom src.models import *from src.utils import *-from src.utils.localization import translate+from src.utils.localization import translate, api_errorfrom src.services.retention import is_recording_exempt_from_deletion, get_retention_days_for_recording, process_auto_deletionfrom src.services.embeddings import EMBEDDINGS_AVAILABLE, process_recording_chunksfrom src.services.token_tracking import token_tracker@@ -116,7 +116,7 @@ def admin_get_users():).first() is not Noneif not current_user.is_admin and not is_team_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403if current_user.is_admin:users = User.query.all()@@ -196,35 +196,35 @@ def admin_get_users():def admin_add_user():# Check if user is adminif not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403data = request.jsonif not data:- return jsonify({'error': 'No data provided'}), 400+ return jsonify(api_error('no_data_provided')), 400# Validate required fieldsrequired_fields = ['username', 'email', 'password']for field in required_fields:if field not in data:- return jsonify({'error': f'Missing required field: {field}'}), 400+ return jsonify(api_error('missing_required_field', field=field)), 400# The username column holds 20 characters; PostgreSQL refuses a longer# value, which gave a 500 instead of this messageif not 2 <= len(str(data['username']).strip()) <= 20:- return jsonify({'error': 'The username must be 2 to 20 characters.'}), 400+ return jsonify(api_error('invalid_username_length')), 400# Check if username or email already existsif User.query.filter_by(username=data['username']).first():- return jsonify({'error': 'Username already exists'}), 400+ return jsonify(api_error('username_exists')), 400email = User.normalize_email(data['email'])if User.find_by_email(email):- return jsonify({'error': 'Email already exists'}), 400+ return jsonify(api_error('email_exists')), 400try:storage_quota = _quota_mb(data['storage_quota_mb']) if 'storage_quota_mb' in data else default_quota_mb()except (TypeError, ValueError):- return jsonify({'error': 'The storage quota must be a positive number of MB.'}), 400+ return jsonify(api_error('invalid_storage_quota')), 400# Create new userhashed_password = bcrypt.generate_password_hash(data['password']).decode('utf-8')@@ -266,23 +266,23 @@ def admin_add_user():def admin_update_user(user_id):# Check if user is adminif not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403user = db.session.get(User, user_id)if not user:- return jsonify({'error': 'User not found'}), 404+ return jsonify(api_error('user_not_found')), 404data = request.jsonif not data:- return jsonify({'error': 'No data provided'}), 400+ return jsonify(api_error('no_data_provided')), 400# Update user fieldsif 'username' in data and data['username'] != user.username:if not 2 <= len(str(data['username']).strip()) <= 20:- return jsonify({'error': 'The username must be 2 to 20 characters.'}), 400+ return jsonify(api_error('invalid_username_length')), 400# Check if username already existsif User.query.filter_by(username=data['username']).first():- return jsonify({'error': 'Username already exists'}), 400+ return jsonify(api_error('username_exists')), 400user.username = data['username']if 'email' in data:@@ -291,7 +291,7 @@ def admin_update_user(user_id):# Case-insensitive existence check against other accounts.existing = User.find_by_email(new_email)if existing and existing.id != user.id:- return jsonify({'error': 'Email already exists'}), 400+ return jsonify(api_error('email_exists')), 400user.email = new_emailif 'password' in data and data['password']:@@ -306,7 +306,7 @@ def admin_update_user(user_id):if user.is_admin and not new_is_admin:other_admins = User.query.filter(User.is_admin.is_(True), User.id != user.id).count()if other_admins == 0:- return jsonify({'error': 'Cannot remove admin rights from the last remaining admin.'}), 400+ return jsonify(api_error('last_admin_demotion')), 400user.is_admin = new_is_adminif 'can_share_publicly' in data:@@ -332,7 +332,7 @@ def admin_update_user(user_id):try:user.storage_quota_mb = _quota_mb(data['storage_quota_mb'])except (TypeError, ValueError):- return jsonify({'error': 'The storage quota must be a positive number of MB.'}), 400+ return jsonify(api_error('invalid_storage_quota')), 400db.session.commit()if user.id == current_user.id and data.get('password'):@@ -378,15 +378,15 @@ def admin_update_user(user_id):def admin_delete_user(user_id):# Check if user is adminif not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403# Prevent deleting selfif user_id == current_user.id:- return jsonify({'error': 'Cannot delete your own account'}), 400+ return jsonify(api_error('cannot_delete_self')), 400user = db.session.get(User, user_id)if not user:- return jsonify({'error': 'User not found'}), 404+ return jsonify(api_error('user_not_found')), 404# Delete user's recordings and audio filestotal_chunks = 0@@ -425,22 +425,22 @@ def admin_delete_user(user_id):def admin_toggle_admin(user_id):# Check if user is adminif not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403# Prevent changing own admin statusif user_id == current_user.id:- return jsonify({'error': 'Cannot change your own admin status'}), 400+ return jsonify(api_error('cannot_change_own_admin')), 400user = db.session.get(User, user_id)if not user:- return jsonify({'error': 'User not found'}), 404+ return jsonify(api_error('user_not_found')), 404# Guard against demoting the last remaining admin (defence in depth; the# self-status check above already prevents the acting admin demoting itself).if user.is_admin:other_admins = User.query.filter(User.is_admin.is_(True), User.id != user.id).count()if other_admins == 0:- return jsonify({'error': 'Cannot remove admin rights from the last remaining admin.'}), 400+ return jsonify(api_error('last_admin_demotion')), 400# Toggle admin statususer.is_admin = not user.is_admin@@ -465,7 +465,7 @@ def _quota_mb(value):def admin_get_stats():# Check if user is adminif not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403# Get total userstotal_users = User.query.count()@@ -571,7 +571,7 @@ def admin_get_stats():def admin_get_stats_overview():"""Everything the System Statistics tab shows, for the last 7, 30 or 90 days."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403from src.services.admin_stats import build_overviewreturn jsonify(build_overview(request.args.get('days', 30, type=int)))@@ -583,7 +583,7 @@ def admin_get_stats_overview():def admin_get_token_stats():"""Get overall token usage statistics."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403try:from src.models import TokenUsage@@ -661,7 +661,7 @@ def admin_get_token_stats():def admin_get_daily_token_stats():"""Get daily token usage for charts (last 30 days)."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403try:days = request.args.get('days', 30, type=int)@@ -684,7 +684,7 @@ def admin_get_daily_token_stats():def admin_get_monthly_token_stats():"""Get monthly token usage for charts (last 12 months)."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403try:months = request.args.get('months', 12, type=int)@@ -706,7 +706,7 @@ def admin_get_monthly_token_stats():def admin_get_user_token_stats():"""Get per-user token usage for current month."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403try:user_stats = token_tracker.get_user_stats()@@ -728,7 +728,7 @@ def admin_get_user_token_stats():def admin_get_transcription_stats():"""Get overall transcription usage statistics."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403try:# Get today's usage@@ -767,7 +767,7 @@ def admin_get_transcription_stats():def admin_get_daily_transcription_stats():"""Get daily transcription usage for charts (last 30 days)."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403try:days = request.args.get('days', 30, type=int)@@ -790,7 +790,7 @@ def admin_get_daily_transcription_stats():def admin_get_monthly_transcription_stats():"""Get monthly transcription usage for charts (last 12 months)."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403try:months = request.args.get('months', 12, type=int)@@ -812,7 +812,7 @@ def admin_get_monthly_transcription_stats():def admin_get_user_transcription_stats():"""Get per-user transcription usage for current month."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403try:user_stats = transcription_tracker.get_user_stats()@@ -834,7 +834,7 @@ def admin_get_user_transcription_stats():def admin_get_llm_temperatures():"""Effective sampling temperatures, with their source (#411)."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403from src.services.llm_settings import temperatures_statusreturn jsonify({'temperatures': temperatures_status()})@@ -848,14 +848,14 @@ def admin_set_llm_temperatures():value, so the built-in default applies again."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403from src.services.llm_settings import TEMPERATURES, parse_temperature, setting_key, temperatures_statusvalues = (request.get_json(silent=True) or {}).get('values')if not isinstance(values, dict) or not values:- return jsonify({'error': 'values must be an object of temperatures'}), 400+ return jsonify(api_error('invalid_temperature_values')), 400unknown = [k for k in values if k not in TEMPERATURES]if unknown:- return jsonify({'error': f"Unknown temperature: {', '.join(unknown)}"}), 400+ return jsonify(api_error('unknown_temperature', names=', '.join(unknown))), 400parsed = {}for kind, raw in values.items():if raw is None or (isinstance(raw, str) and not raw.strip()):@@ -863,7 +863,7 @@ def admin_set_llm_temperatures():continuevalue = parse_temperature(raw)if value is None or isinstance(raw, bool):- return jsonify({'error': f'{kind} temperature must be a number between 0 and 2', 'field': kind}), 400+ return jsonify({**api_error('invalid_temperature', kind=kind), 'field': kind}), 400parsed[kind] = valuefor kind, value in parsed.items():key = setting_key(kind)@@ -882,7 +882,7 @@ def admin_set_llm_temperatures():def admin_get_settings():# Check if user is adminif not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403settings = SystemSetting.query.all()return jsonify([setting.to_dict() for setting in settings])@@ -894,11 +894,11 @@ def admin_get_settings():def admin_update_setting():# Check if user is adminif not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403data = request.jsonif not data:- return jsonify({'error': 'No data provided'}), 400+ return jsonify(api_error('no_data_provided')), 400key = data.get('key')value = data.get('value')@@ -906,32 +906,32 @@ def admin_update_setting():setting_type = data.get('setting_type', 'string')if not key:- return jsonify({'error': 'Setting key is required'}), 400+ return jsonify(api_error('setting_key_required')), 400# Validate setting typevalid_types = ['string', 'integer', 'boolean', 'float']if setting_type not in valid_types:- return jsonify({'error': f'Invalid setting type. Must be one of: {", ".join(valid_types)}'}), 400+ return jsonify(api_error('invalid_setting_type', types=', '.join(valid_types))), 400# Validate value based on typeif setting_type == 'integer':try:int(value) if value is not None and value != '' else Noneexcept (ValueError, TypeError):- return jsonify({'error': 'Value must be a valid integer'}), 400+ return jsonify(api_error('invalid_integer_value')), 400elif setting_type == 'float':try:float(value) if value is not None and value != '' else Noneexcept (ValueError, TypeError):- return jsonify({'error': 'Value must be a valid number'}), 400+ return jsonify(api_error('invalid_number_value')), 400elif setting_type == 'boolean':if value not in ['true', 'false', '1', '0', 'yes', 'no', True, False, 1, 0]:- return jsonify({'error': 'Value must be a valid boolean (true/false, 1/0, yes/no)'}), 400+ return jsonify(api_error('invalid_boolean_value')), 400if key == 'default_timezone':from src.utils.timezones import is_valid_timezoneif not is_valid_timezone(value):- return jsonify({'error': 'Value must be a valid IANA timezone, for example Europe/Berlin'}), 400+ return jsonify(api_error('invalid_timezone_value')), 400try:setting = SystemSetting.set_setting(key, value, description, setting_type)@@ -968,7 +968,7 @@ def admin_update_setting():def run_auto_deletion():"""Admin endpoint to manually trigger auto-deletion process."""if not current_user.is_admin:- return jsonify({'error': 'Admin access required'}), 403+ return jsonify(api_error('admin_required')), 403try:stats = process_auto_deletion()@@ -984,7 +984,7 @@ def run_auto_deletion():def get_auto_deletion_stats():"""Get statistics about recordings eligible for auto-deletion."""if not current_user.is_admin:- return jsonify({'error': 'Admin access required'}), 403+ return jsonify(api_error('admin_required')), 403try:stats = {@@ -1049,11 +1049,11 @@ def get_auto_deletion_stats():def preview_auto_deletion():"""Preview what would be deleted without actually deleting (dry-run)."""if not current_user.is_admin:- return jsonify({'error': 'Admin access required'}), 403+ return jsonify(api_error('admin_required')), 403try:if not ENABLE_AUTO_DELETION:- return jsonify({'error': 'Auto-deletion is not enabled'}), 400+ return jsonify(api_error('auto_deletion_disabled')), 400# Check ALL completed recordings (per-recording retention)all_recordings = Recording.query.filter(@@ -1122,7 +1122,7 @@ def preview_auto_deletion():def migrate_existing_recordings_api():"""API endpoint to migrate existing recordings for inquire mode (admin only)."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized. Admin access required.'}), 403+ return jsonify(api_error('unauthorized_admin_required')), 403try:# Count recordings that need processing@@ -1138,7 +1138,7 @@ def migrate_existing_recordings_api():if len(recordings_needing_processing) == 0:return jsonify({'success': True,- 'message': 'All recordings are already processed for inquire mode',+ 'message': translate('server.apiMessage.inquireAllProcessed'),'processed': 0,'total': len(completed_recordings)})@@ -1164,7 +1164,8 @@ def migrate_existing_recordings_api():return jsonify({'success': True,- 'message': f'Processed {processed} recordings. {remaining} remaining.',+ 'message': translate('server.apiMessage.inquireProcessedRemaining',+ processed=processed, remaining=remaining),'processed': processed,'errors': errors,'remaining': remaining,@@ -1184,7 +1185,7 @@ def migrate_existing_recordings_api():def admin_get_auto_process_status():"""Get the status of the automated file processing system."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403try:_, _, get_file_monitor_status = get_file_monitor_functions()@@ -1215,12 +1216,12 @@ def admin_get_auto_process_status():def admin_start_auto_process():"""Start the automated file processing system."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403try:start_file_monitor, _, _ = get_file_monitor_functions()start_file_monitor()- return jsonify({'success': True, 'message': 'Auto-processing started'})+ return jsonify({'success': True, 'message': translate('server.apiMessage.autoProcessingStarted')})except Exception as e:current_app.logger.error(f"Error starting auto-process: {e}")return jsonify({'error': str(e)}), 500@@ -1232,12 +1233,12 @@ def admin_start_auto_process():def admin_stop_auto_process():"""Stop the automated file processing system."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403try:_, stop_file_monitor, _ = get_file_monitor_functions()stop_file_monitor()- return jsonify({'success': True, 'message': 'Auto-processing stopped'})+ return jsonify({'success': True, 'message': translate('server.apiMessage.autoProcessingStopped')})except Exception as e:current_app.logger.error(f"Error stopping auto-process: {e}")return jsonify({'error': str(e)}), 500@@ -1249,18 +1250,18 @@ def admin_stop_auto_process():def admin_update_auto_process_config():"""Update auto-processing configuration (requires restart)."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403try:data = request.jsonif not data:- return jsonify({'error': 'No configuration data provided'}), 400+ return jsonify(api_error('no_configuration_data')), 400# This endpoint would typically update environment variables or config files# For now, we'll just return the current config and note that restart is requiredreturn jsonify({'success': True,- 'message': 'Configuration updated. Restart required to apply changes.',+ 'message': translate('server.apiMessage.configUpdatedRestartRequired'),'note': 'Environment variables need to be updated manually and application restarted.'})@@ -1275,12 +1276,12 @@ def admin_update_auto_process_config():def admin_trigger_auto_process():"""Trigger an immediate auto-process scan cycle."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403try:from src.file_monitor import file_monitorif not file_monitor or not file_monitor.running:- return jsonify({'error': 'Auto-processing is not running'}), 400+ return jsonify(api_error('auto_processing_not_running')), 400import threadingdef run_scan():@@ -1298,7 +1299,7 @@ def admin_trigger_auto_process():thread = threading.Thread(target=run_scan, daemon=True)thread.start()- return jsonify({'success': True, 'message': 'Scan triggered'})+ return jsonify({'success': True, 'message': translate('server.apiMessage.scanTriggered')})except Exception as e:current_app.logger.error(f"Error triggering auto-process scan: {e}")@@ -1317,14 +1318,14 @@ def admin_discover_transcription_models():implement list_models() or the upstream is unreachable."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403try:from src.services.transcription import get_registryregistry = get_registry()connector = registry.get_active_connector()if not connector:- return jsonify({'error': 'No active transcription connector'}), 503+ return jsonify(api_error('no_transcription_connector')), 503connector_name = registry.get_active_connector_name()try:@@ -1334,7 +1335,7 @@ def admin_discover_transcription_models():'connector': connector_name,'supported': False,'models': [],- 'message': f'{connector_name} does not expose a model discovery endpoint.',+ 'message': translate('server.apiMessage.modelDiscoveryUnsupported', connector=connector_name),})return jsonify({@@ -1358,7 +1359,7 @@ def admin_get_visible_models():so the admin UI can pre-populate its form."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403try:from src.models import SystemSetting@@ -1398,7 +1399,7 @@ def admin_save_visible_models():"default_model": "..." | null }"""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403try:from src.models import SystemSetting@@ -1407,7 +1408,7 @@ def admin_save_visible_models():data = request.json or {}options = data.get('options', [])if not isinstance(options, list):- return jsonify({'error': 'options must be a list'}), 400+ return jsonify(api_error('invalid_options_list')), 400# Normalise each option into {value, label}.normalised = []@@ -1470,7 +1471,7 @@ def admin_process_recordings_for_inquire():max_recordings (int, optional): cap the number processed in one call"""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403try:data = request.json or {}@@ -1518,10 +1519,8 @@ def admin_process_recordings_for_inquire():if total_to_process == 0:return jsonify({'success': True,- 'message': (- 'No recordings to re-embed.' if force- else 'All recordings are already processed for inquire mode.'- ),+ 'message': translate('server.apiMessage.noRecordingsToReembed' if force+ else 'server.apiMessage.inquireAllProcessed'),'processed': 0,'total': 0,'force': force,@@ -1617,10 +1616,15 @@ def admin_process_recordings_for_inquire():except Exception as e:current_app.logger.warning(f"Failed to refresh embedding_identifier after re-embed: {e}")- verb = 'Re-embedded' if force else 'Processed'+ if force:+ message = translate('server.apiMessage.embeddingsReembeddedCount',+ processed=processed, total=total_to_process)+ else:+ message = translate('server.apiMessage.embeddingsProcessedCount',+ processed=processed, total=total_to_process)return jsonify({'success': True,- 'message': f'{verb} {processed} out of {total_to_process} recordings.',+ 'message': message,'processed': processed,'total': total_to_process,'failed': failed,@@ -1639,7 +1643,7 @@ def admin_process_recordings_for_inquire():def admin_inquire_status():"""Get the status of recordings for inquire mode."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403try:from src.services.embeddings import (@@ -1738,7 +1742,7 @@ def admin_voice_embedding_status():is never done on a page load."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403from src.services.voice_embedding_check import get_statusreturn jsonify(get_status(current_app))@@ -1749,7 +1753,7 @@ def admin_voice_embedding_status():def admin_voice_embedding_check():"""Re-run the check now, regardless of whether the backend looks changed."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403from src.services.voice_embedding_check import check_voice_embeddingsresult = check_voice_embeddings(current_app, force=True)@@ -1768,7 +1772,7 @@ def admin_voice_embedding_rebaseline():by restoring the old backend."""if not current_user.is_admin:- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403from src.services.voice_embedding_check import rebaselineresult = rebaseline(current_app)diff --git a/src/api/api_v1.py b/src/api/api_v1.pyindex 268d3291..dded898e 100644--- a/src/api/api_v1.py+++ b/src/api/api_v1.py@@ -46,6 +46,7 @@ from src.api.recordings import (from src.services.storage import get_storage_servicefrom src.utils.mime import served_media_mime, sandbox_media_responsefrom src.utils.token_auth import load_user_from_token_value+from src.utils.localization import api_error, translate# Create blueprint with /api/v1 prefixapi_v1_bp = Blueprint('api_v1', __name__, url_prefix='/api/v1')@@ -750,7 +751,7 @@ def get_stats():# Admin-only for global statsif scope == 'all' and not current_user.is_admin:- return jsonify({'error': 'Admin access required for global stats'}), 403+ return jsonify(api_error('global_stats_admin_only')), 403# Build query filters based on scopeif scope == 'user':@@ -927,7 +928,7 @@ def get_current_token():from src.utils.token_auth import current_api_tokentoken = current_api_token()if token is None:- return jsonify({'error': 'No API token in this request', 'code': 'not_found'}), 404+ return jsonify({'error': translate('server.apiError.no_api_token'), 'code': 'not_found'}), 404def _z(dt):return dt.isoformat(timespec='microseconds') + 'Z' if dt else None@@ -1144,11 +1145,11 @@ def list_recordings():from src.services.recording_scope import SCOPES, join_personal_state, personal_flag, scope_conditionscope = request.args.get('scope', 'own')if scope not in SCOPES:- return jsonify({'error': 'scope must be own, shared or all', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.invalid_scope'), 'code': 'invalid_parameter'}), 400owner_id = request.args.get('owner_id', type=int)date_field = request.args.get('date_field', 'created_at')if date_field not in ('created_at', 'meeting_date'):- return jsonify({'error': "date_field must be created_at or meeting_date",+ return jsonify({'error': translate('server.apiError.invalid_date_field'),'code': 'invalid_parameter'}), 400# Base query - user's recordings.@@ -1210,7 +1211,7 @@ def list_recordings():external_ref = request.args.get('external_ref')if external_system or external_ref:if not (external_system and external_ref):- return jsonify({'error': 'external_system and external_ref go together',+ return jsonify({'error': translate('server.apiError.external_ref_pair_required'),'code': 'invalid_parameter'}), 400from src.models import RecordingExternalRefref_query = db.session.query(RecordingExternalRef.recording_id).filter(@@ -1226,7 +1227,7 @@ def list_recordings():try:since = to_utc_naive(datetime.fromisoformat(updated_since.replace('Z', '+00:00')))except ValueError:- return jsonify({'error': 'updated_since must be an ISO 8601 date-time',+ return jsonify({'error': translate('server.apiError.invalid_updated_since'),'code': 'invalid_parameter'}), 400query = query.filter(changed_column > since)@@ -1366,29 +1367,30 @@ def search_recordings_v1():args = request.argsq = (args.get('q') or '').strip()if not 2 <= len(q) <= 500:- return jsonify({'error': 'q must be 2 to 500 characters', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.invalid_query_length'), 'code': 'invalid_parameter'}), 400mode = args.get('mode', 'keyword')if mode not in ('keyword', 'semantic', 'auto'):- return jsonify({'error': 'mode must be keyword, semantic or auto', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.invalid_search_mode'), 'code': 'invalid_parameter'}), 400scope = args.get('scope', 'own')if scope not in ('own', 'shared', 'all'):- return jsonify({'error': 'scope must be own, shared or all', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.invalid_scope'), 'code': 'invalid_parameter'}), 400fields = tuple(f.strip() for f in args.get('fields', ','.join(search_v1.FIELDS)).split(',') if f.strip())unknown = [f for f in fields if f not in search_v1.FIELDS]if unknown or not fields:- return jsonify({'error': f'Unknown field(s): {", ".join(unknown) or "none given"}',- 'code': 'invalid_parameter'}), 400+ message = (translate('server.apiError.unknown_fields', fields=', '.join(unknown)) if unknown+ else translate('server.apiError.no_fields_given'))+ return jsonify({'error': message, 'code': 'invalid_parameter'}), 400date_field = args.get('date_field', 'meeting_date')if date_field not in ('meeting_date', 'created_at'):- return jsonify({'error': 'date_field must be meeting_date or created_at', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.invalid_date_field'), 'code': 'invalid_parameter'}), 400limit = args.get('limit', 20, type=int)page = args.get('page', 1, type=int)if limit is None or not 1 <= limit <= 50 or page is None or page < 1:- return jsonify({'error': 'limit must be 1 to 50 and page at least 1', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.invalid_search_paging'), 'code': 'invalid_parameter'}), 400try:recording_ids = [int(x) for x in args.get('recording_ids', '').split(',') if x.strip()] or Noneexcept ValueError:- return jsonify({'error': 'recording_ids must be a comma list of ids', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.invalid_recording_ids_csv'), 'code': 'invalid_parameter'}), 400folder = args.get('folder_id', '').strip()folder_id = Noneif folder:@@ -1397,7 +1399,7 @@ def search_recordings_v1():elif folder.isdigit():folder_id = int(folder)else:- return jsonify({'error': 'folder_id must be an id or none', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.invalid_folder_id'), 'code': 'invalid_parameter'}), 400filters = dict(recording_ids=recording_ids, tag_id=args.get('tag_id', type=int), folder_id=folder_id,date_from=args.get('date_from') or None, date_to=args.get('date_to') or None,date_field=date_field, scope=scope)@@ -1405,7 +1407,7 @@ def search_recordings_v1():use_semantic = mode == 'semantic' or (mode == 'auto' and search_v1.semantic_available())if mode == 'semantic' and not search_v1.semantic_available():- return jsonify({'error': 'Semantic search is not available on this instance',+ return jsonify({'error': translate('server.apiError.semantic_search_unavailable'),'code': 'semantic_unavailable'}), 409try:if use_semantic:@@ -1425,9 +1427,9 @@ def search_recordings_v1():def _ref_recording(recording_id, require_edit):recording = db.session.get(Recording, recording_id)if not recording:- return None, (jsonify({'error': 'Recording not found', 'code': 'not_found'}), 404)+ return None, (jsonify({'error': translate('server.apiError.recording_not_found'), 'code': 'not_found'}), 404)if not has_recording_access(recording, current_user, require_edit=require_edit):- return None, (jsonify({'error': 'Permission denied'}), 403)+ return None, (jsonify(api_error('permission_denied')), 403)return recording, None@@ -1492,7 +1494,7 @@ def delete_external_ref(recording_id, ref_id):return errrow = db.session.get(RecordingExternalRef, ref_id)if row is None or row.recording_id != recording.id or row.user_id != current_user.id:- return jsonify({'error': 'Reference not found', 'code': 'not_found'}), 404+ return jsonify({'error': translate('server.apiError.reference_not_found'), 'code': 'not_found'}), 404db.session.delete(row)db.session.commit()return '', 204@@ -1507,25 +1509,26 @@ def create_public_share(recording_id):from flask import url_forfrom src.services.public_shares import get_or_create, share_dictif os.environ.get('ENABLE_PUBLIC_SHARING', 'true').lower() != 'true':- return jsonify({'error': 'Public sharing is turned off on this server', 'code': 'feature_disabled'}), 403+ return jsonify({'error': translate('server.apiError.public_sharing_off'), 'code': 'feature_disabled'}), 403if not getattr(current_user, 'can_share_publicly', True):- return jsonify({'error': 'You may not create public links', 'code': 'not_permitted'}), 403+ return jsonify({'error': translate('server.apiError.public_link_not_permitted'), 'code': 'not_permitted'}), 403if not request.is_secure:- return jsonify({'error': 'Public links need an HTTPS connection', 'code': 'https_required'}), 403+ return jsonify({'error': translate('server.apiError.public_link_https_required'), 'code': 'https_required'}), 403recording = db.session.get(Recording, recording_id)if not recording or recording.user_id != current_user.id:- return jsonify({'error': 'Recording not found', 'code': 'not_found'}), 404+ return jsonify({'error': translate('server.apiError.recording_not_found'), 'code': 'not_found'}), 404data = request.get_json(silent=True) or {}flags = {}for key, default in (('share_summary', True), ('share_notes', False), ('force_new', False),('update_existing', False)):value = data.get(key, default)if not isinstance(value, bool):- return jsonify({'error': f'{key} must be true or false', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.invalid_boolean_flag', key=key),+ 'code': 'invalid_parameter'}), 400flags[key] = valuedays = data.get('expires_in_days')if days is not None and (not isinstance(days, int) or isinstance(days, bool) or not 1 <= days <= 3650):- return jsonify({'error': 'expires_in_days must be 1 to 3650', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.invalid_expires_in_days_range'), 'code': 'invalid_parameter'}), 400share, created, differ = get_or_create(recording, current_user, flags['share_summary'], flags['share_notes'],force_new=flags['force_new'], update_existing=flags['update_existing'],expires_in_days=days)@@ -1547,7 +1550,7 @@ def list_public_shares(recording_id):from src.services.public_shares import share_dictrecording = db.session.get(Recording, recording_id)if not recording or recording.user_id != current_user.id:- return jsonify({'error': 'Recording not found', 'code': 'not_found'}), 404+ return jsonify({'error': translate('server.apiError.recording_not_found'), 'code': 'not_found'}), 404shares = (Share.query.filter_by(recording_id=recording.id, user_id=current_user.id).order_by(Share.created_at.desc()).all())return jsonify({'shares': [dict(share_dict(s), share_url=url_for('shares.view_shared_recording',@@ -1563,7 +1566,7 @@ def revoke_public_share(share_id):from src.services.public_shares import revokeshare = db.session.get(Share, share_id)if share is None or share.user_id != current_user.id:- return jsonify({'error': 'Share not found', 'code': 'not_found'}), 404+ return jsonify({'error': translate('server.apiError.share_not_found'), 'code': 'not_found'}), 404revoke(share)return '', 204@@ -1585,17 +1588,17 @@ def list_recording_changes():cursor = request.args.get('cursor') or Nonelimit = request.args.get('limit', 100, type=int)if limit is None or not 1 <= limit <= 500:- return jsonify({'error': 'limit must be between 1 and 500', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.invalid_limit'), 'code': 'invalid_parameter'}), 400scope = request.args.get('scope', 'own')if scope not in ('own', 'shared', 'all'):- return jsonify({'error': 'scope must be own, shared or all', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.invalid_scope'), 'code': 'invalid_parameter'}), 400if cursor:try:changed_at, _, _, full_since = decode_cursor(cursor)except CursorError:- return jsonify({'error': 'The cursor could not be read', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.invalid_cursor'), 'code': 'invalid_parameter'}), 400if cursor_expired(current_user.id, changed_at, full_since):- return jsonify({'error': 'The cursor is too old; start again without a cursor',+ return jsonify({'error': translate('server.apiError.cursor_expired'),'code': 'cursor_expired'}), 410items, next_cursor, has_more = read_changes(current_user.id, cursor=cursor, limit=limit, scope=scope)from src.services.external_refs import refs_map@@ -1629,10 +1632,10 @@ def get_recording(recording_id):"""recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user):- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403from src.services.recording_changes import effective_updated_at, iso_zinclude = request.args.get('include', 'transcription,summary,notes')@@ -1703,13 +1706,13 @@ def get_transcript(recording_id):"""recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user):- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403if not recording.transcription:- return jsonify({'error': 'No transcription available'}), 404+ return jsonify(api_error('no_transcription')), 404format_type = request.args.get('format', 'json').lower()@@ -1727,7 +1730,7 @@ def get_transcript(recording_id):except ValueError:start = end = max_segments = Noneif max_segments is not None and max_segments < 1:- return jsonify({'error': 'max_segments must be at least 1', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.invalid_max_segments'), 'code': 'invalid_parameter'}), 400body = {'format': 'json', 'kind': 'segments', 'duration': recording.get_audio_duration()}if start is not None or end is not None or max_segments is not None:segments, next_start = window(segments, start, end, max_segments)@@ -1785,9 +1788,9 @@ def get_transcript(recording_id):'content': '\n'.join(lines)})except (json.JSONDecodeError, TypeError):- return jsonify({'error': 'Cannot generate subtitle format from transcript'}), 400+ return jsonify(api_error('subtitle_generation_failed')), 400- return jsonify({'error': f'Unknown format: {format_type}'}), 400+ return jsonify(api_error('unknown_format', format=format_type)), 400@api_v1_bp.route('/recordings/<int:recording_id>/summary', methods=['GET'])@@ -1798,10 +1801,10 @@ def get_summary(recording_id):"""Get summary markdown."""recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user):- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403return jsonify({'summary': recording.summary,@@ -1817,10 +1820,10 @@ def get_notes(recording_id):"""Get notes markdown."""recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user):- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403# The owner's notes for the owner; a recipient's own personal notes otherwise.notes = recording.get_user_notes(current_user)@@ -1855,14 +1858,14 @@ def update_recording(recording_id):"""recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403data = request.get_json()if not data:- return jsonify({'error': 'No data provided'}), 400+ return jsonify(api_error('no_data_provided')), 400# `keep_audio_only` is set at upload time and dictates whether the# processing pipeline retained the video stream. Allowing PATCH to@@ -1871,7 +1874,7 @@ def update_recording(recording_id):# rather than silently dropping so misuse surfaces in client logs.if 'keep_audio_only' in data:return jsonify({- 'error': 'keep_audio_only is set at upload time and cannot be changed afterwards.'+ **api_error('keep_audio_only_immutable')}), 400# Update fields if provided@@ -1895,7 +1898,7 @@ def update_recording(recording_id):else:recording.meeting_date = Noneexcept ValueError:- return jsonify({'error': 'Invalid meeting_date format'}), 400+ return jsonify(api_error('invalid_meeting_date')), 400if 'is_inbox' in data:recording.is_inbox = bool(data['is_inbox'])if 'is_highlighted' in data:@@ -1903,7 +1906,7 @@ def update_recording(recording_id):if 'is_archived' in data:archived = parse_archived_flag(data['is_archived'])if archived is None:- return jsonify({'error': 'is_archived must be a boolean'}), 400+ return jsonify(api_error('invalid_is_archived')), 400# Per user, like the web app: a shared editor archives it for# themselves only (#394).set_user_archived(recording, current_user, archived, commit=False)@@ -1915,17 +1918,17 @@ def update_recording(recording_id):from src.models.organization import Folder, GroupMembershiptarget = db.session.get(Folder, new_folder_id)if not target:- return jsonify({'error': f'Folder {new_folder_id} not found'}), 404+ return jsonify(api_error('folder_id_not_found', folderId=new_folder_id)), 404# Personal folders: must own. Group folders: must be a member.if target.group_id is None:if target.user_id != current_user.id:- return jsonify({'error': 'No access to target folder'}), 403+ return jsonify(api_error('target_folder_access_denied')), 403else:membership = GroupMembership.query.filter_by(user_id=current_user.id, group_id=target.group_id).first()if not membership:- return jsonify({'error': 'No access to target folder'}), 403+ return jsonify(api_error('target_folder_access_denied')), 403recording.folder_id = new_folder_iddb.session.commit()@@ -1958,16 +1961,16 @@ def replace_notes(recording_id):"""Replace notes entirely."""recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404# Notes are per user, as in the web app: a recipient with view access# writes their personal notes, never the owner's.if not has_recording_access(recording, current_user):- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403data = request.get_json()if not data or 'notes' not in data:- return jsonify({'error': 'notes field required'}), 400+ return jsonify(api_error('notes_field_required')), 400from src.services.recording_state import set_user_notesset_user_notes(recording, current_user, data['notes'])@@ -1983,14 +1986,14 @@ def replace_summary(recording_id):"""Replace summary entirely."""recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403data = request.get_json()if not data or 'summary' not in data:- return jsonify({'error': 'summary field required'}), 400+ return jsonify(api_error('summary_field_required')), 400recording.summary = data['summary']db.session.commit()@@ -2009,16 +2012,16 @@ def delete_recording(recording_id):"""Delete a recording."""recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404# Check ownership (only owner can delete)if recording.user_id != current_user.id:- return jsonify({'error': 'Permission denied - only owner can delete'}), 403+ return jsonify(api_error('delete_owner_only')), 403# Check if deletion is allowedUSERS_CAN_DELETE = os.environ.get('USERS_CAN_DELETE', 'true').lower() == 'true'if not USERS_CAN_DELETE and not current_user.is_admin:- return jsonify({'error': 'Deletion not allowed'}), 403+ return jsonify(api_error('deletion_not_allowed')), 403# Same deletion as the web app: storage-aware media removal, snippets and# jobs first (NOT NULL recording_id), webhook, export and speaker cleanup.@@ -2028,10 +2031,10 @@ def delete_recording(recording_id):except Exception as e:db.session.rollback()current_app.logger.error(f"API v1 delete failed for recording {recording_id}: {e}", exc_info=True)- return jsonify({'error': 'Could not delete the recording'}), 500+ return jsonify(api_error('recording_delete_failed')), 500cleanup_orphaned_speakers_quietly()- return jsonify({'success': True, 'message': 'Recording deleted'})+ return jsonify({'success': True, 'message': translate('server.apiMessage.recordingDeleted')})@api_v1_bp.route('/recordings/<int:recording_id>/delete-audio', methods=['POST'])@@ -2041,16 +2044,16 @@ def delete_recording_audio(recording_id):"""Delete a recording's media file and keep its transcript, summary and notes."""recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if recording.user_id != current_user.id:- return jsonify({'error': 'Permission denied - only owner can delete'}), 403+ return jsonify(api_error('delete_owner_only')), 403USERS_CAN_DELETE = os.environ.get('USERS_CAN_DELETE', 'true').lower() == 'true'if not USERS_CAN_DELETE and not current_user.is_admin:- return jsonify({'error': 'Deletion not allowed'}), 403+ return jsonify(api_error('deletion_not_allowed')), 403if recording.audio_deleted_at:- return jsonify({'error': 'The audio has already been removed'}), 409+ return jsonify(api_error('audio_already_removed')), 409if recording.status not in ('COMPLETED', 'FAILED'):- return jsonify({'error': 'Wait until processing has finished before removing the audio'}), 409+ return jsonify(api_error('audio_remove_while_processing')), 409from src.services.retention import remove_recording_audioremove_recording_audio(recording)@@ -2068,10 +2071,10 @@ def get_recording_status(recording_id):"""Get processing status of a recording."""recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user):- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403# Get queue position if pending/processingqueue_position = None@@ -2197,7 +2200,7 @@ def create_tag():data = request.get_json()if not data or not data.get('name'):- return jsonify({'error': 'Tag name is required'}), 400+ return jsonify(api_error('tag_name_required')), 400group_id = data.get('group_id')@@ -2208,17 +2211,17 @@ def create_tag():user_id=current_user.id).first()if not membership or membership.role != 'admin':- return jsonify({'error': 'Only group admins can create group tags'}), 403+ return jsonify(api_error('group_tag_create_admin_only')), 403# Check for duplicateexisting = Tag.query.filter_by(name=data['name'], group_id=group_id).first()if existing:- return jsonify({'error': 'Tag with this name already exists for this group'}), 400+ return jsonify(api_error('group_tag_name_exists_for_group')), 400else:# Check for duplicate personal tagexisting = Tag.query.filter_by(name=data['name'], user_id=current_user.id, group_id=None).first()if existing:- return jsonify({'error': 'Tag with this name already exists'}), 400+ return jsonify(api_error('tag_name_exists')), 400tag = Tag(name=data['name'],@@ -2260,7 +2263,7 @@ def update_tag(tag_id):tag = db.session.get(Tag, tag_id)if not tag:- return jsonify({'error': 'Tag not found'}), 404+ return jsonify(api_error('tag_not_found')), 404# Check permissionif tag.group_id:@@ -2269,14 +2272,14 @@ def update_tag(tag_id):user_id=current_user.id).first()if not membership or membership.role != 'admin':- return jsonify({'error': 'Only group admins can edit group tags'}), 403+ return jsonify(api_error('group_tag_edit_admin_only')), 403else:if tag.user_id != current_user.id:- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403data = request.get_json()if not data:- return jsonify({'error': 'No data provided'}), 400+ return jsonify(api_error('no_data_provided')), 400if 'name' in data:tag.name = data['name']@@ -2319,7 +2322,7 @@ def delete_tag(tag_id):tag = db.session.get(Tag, tag_id)if not tag:- return jsonify({'error': 'Tag not found'}), 404+ return jsonify(api_error('tag_not_found')), 404# Check permissionif tag.group_id:@@ -2328,10 +2331,10 @@ def delete_tag(tag_id):user_id=current_user.id).first()if not membership or membership.role != 'admin':- return jsonify({'error': 'Only group admins can delete group tags'}), 403+ return jsonify(api_error('group_tag_delete_admin_only')), 403else:if tag.user_id != current_user.id:- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403# Remove all recording associationsRecordingTag.query.filter_by(tag_id=tag_id).delete()@@ -2339,7 +2342,7 @@ def delete_tag(tag_id):db.session.delete(tag)db.session.commit()- return jsonify({'success': True, 'message': 'Tag deleted'})+ return jsonify({'success': True, 'message': translate('server.apiMessage.tagDeleted')})@@ -2379,10 +2382,10 @@ def add_tags_to_recording(recording_id):the recording also needs the share scope on a scoped token."""recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403data = request.get_json() or {}tag_ids = data.get('tag_ids', [])@@ -2392,7 +2395,7 @@ def add_tags_to_recording(recording_id):if tag_id:tag_ids = [tag_id]else:- return jsonify({'error': 'tag_ids or tag_id required'}), 400+ return jsonify(api_error('tag_ids_required')), 400errors = []to_add = []@@ -2439,13 +2442,13 @@ def replace_recording_tags(recording_id):"""recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found', 'code': 'not_found'}), 404+ return jsonify({'error': translate('server.apiError.recording_not_found'), 'code': 'not_found'}), 404if not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403data = request.get_json(silent=True) or {}tag_ids = data.get('tag_ids')if not isinstance(tag_ids, list) or not all(isinstance(t, int) and not isinstance(t, bool) for t in tag_ids):- return jsonify({'error': 'tag_ids must be a list of tag ids', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.invalid_tag_ids_list'), 'code': 'invalid_parameter'}), 400wanted, bad = [], []for tag_id in dict.fromkeys(tag_ids):tag = db.session.get(Tag, tag_id)@@ -2454,7 +2457,7 @@ def replace_recording_tags(recording_id):else:wanted.append(tag)if bad:- return jsonify({'error': 'Unknown or forbidden tag ids', 'code': 'invalid_parameter',+ return jsonify({'error': translate('server.apiError.forbidden_tag_ids'), 'code': 'invalid_parameter','tag_ids': bad}), 400visible = {t.id for t in recording.get_visible_tags(current_user)}@@ -2501,10 +2504,10 @@ def remove_tag_from_recording(recording_id, tag_id):"""Remove a tag from a recording."""recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403recording_tag = RecordingTag.query.filter_by(recording_id=recording_id,@@ -2512,12 +2515,12 @@ def remove_tag_from_recording(recording_id, tag_id):).first()if not recording_tag:- return jsonify({'error': 'Tag not on this recording'}), 404+ return jsonify(api_error('tag_not_on_recording')), 404db.session.delete(recording_tag)db.session.commit()- return jsonify({'success': True, 'message': 'Tag removed'})+ return jsonify({'success': True, 'message': translate('server.apiMessage.tagRemoved')})# =============================================================================@@ -2564,18 +2567,18 @@ def get_folder(folder_id):folder = db.session.get(Folder, folder_id)if not folder:- return jsonify({'error': 'Folder not found'}), 404+ return jsonify(api_error('folder_not_found')), 404# Personal folders: must own it. Group folders: must be a member.if folder.group_id is None:if folder.user_id != current_user.id:- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403else:membership = GroupMembership.query.filter_by(user_id=current_user.id, group_id=folder.group_id).first()if not membership:- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403folder_dict = folder.to_dict()if folder.group_id is None:@@ -2753,7 +2756,8 @@ def _speaker_item(s):def _speaker_contact_fields(data, speaker):- """Apply email and aliases from a request body; returns an error message or None."""+ """Apply email and aliases from a request body; returns the server.apiError+ key of the problem, or None."""if 'email' in data:email = data['email']if email is None or (isinstance(email, str) and not email.strip()):@@ -2761,25 +2765,25 @@ def _speaker_contact_fields(data, speaker):elif isinstance(email, str) and len(email.strip()) <= 320 and _EMAIL.match(email.strip()):speaker.email = email.strip().lower()else:- return 'email must be an email address'+ return 'invalid_speaker_email'if 'aliases' in data:aliases = data['aliases']if aliases is None:aliases = []if not isinstance(aliases, list) or not all(isinstance(a, str) for a in aliases):- return 'aliases must be a list of strings'+ return 'invalid_speaker_aliases'clean, seen = [], set()for alias in aliases:alias = alias.strip()if not alias:continueif len(alias) > 100:- return 'each alias must be at most 100 characters'+ return 'speaker_alias_too_long'if alias.lower() not in seen:seen.add(alias.lower())clean.append(alias)if len(clean) > 20:- return 'at most 20 aliases'+ return 'too_many_speaker_aliases'speaker.aliases = json.dumps(clean) if clean else Nonereturn None@@ -2791,14 +2795,14 @@ def create_speaker():"""Create a new speaker (name, optional email and aliases)."""data = request.get_json()if not data or not data.get('name'):- return jsonify({'error': 'Speaker name is required'}), 400+ return jsonify(api_error('speaker_name_required')), 400name = data['name'].strip()# Check if already existsexisting = Speaker.query.filter_by(user_id=current_user.id, name=name).first()if existing:- return jsonify({'error': 'Speaker with this name already exists'}), 400+ return jsonify(api_error('speaker_name_taken')), 400speaker = Speaker(name=name,@@ -2808,7 +2812,7 @@ def create_speaker():)problem = _speaker_contact_fields(data, speaker)if problem:- return jsonify({'error': problem, 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate(f'server.apiError.{problem}'), 'code': 'invalid_parameter'}), 400db.session.add(speaker)db.session.commit()@@ -2825,38 +2829,39 @@ def update_speaker(speaker_id):recording the speaker appears in, as in Speaker Management."""speaker = db.session.get(Speaker, speaker_id)if not speaker:- return jsonify({'error': 'Speaker not found'}), 404+ return jsonify(api_error('speaker_not_found')), 404if speaker.user_id != current_user.id:- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403data = request.get_json()if not data:- return jsonify({'error': 'No data provided'}), 400+ return jsonify(api_error('no_data_provided')), 400problem = _speaker_contact_fields(data, speaker)if problem:db.session.rollback()- return jsonify({'error': problem, 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate(f'server.apiError.{problem}'), 'code': 'invalid_parameter'}), 400renamed = {}if 'name' in data:new_name = (data.get('name') or '').strip()if not new_name:db.session.rollback()- return jsonify({'error': 'Speaker name cannot be empty', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.speaker_name_empty'), 'code': 'invalid_parameter'}), 400if new_name != speaker.name:clash = Speaker.query.filter_by(user_id=current_user.id, name=new_name).first()if clash and clash.id != speaker.id:db.session.rollback()- return jsonify({'error': f'A speaker named "{new_name}" already exists', 'code': 'conflict'}), 409+ return jsonify({'error': translate('server.apiError.speaker_name_exists', name=new_name),+ 'code': 'conflict'}), 409from src.services.speaker_merge import rename_speaker_in_recordingsold_name = speaker.namespeaker.name = new_name_, renamed = rename_speaker_in_recordings(current_user.id, old_name, new_name,speaker_id=speaker.id, new_speaker_id=speaker.id)elif not any(k in data for k in ('email', 'aliases')):- return jsonify({'error': 'Nothing to change: give name, email or aliases', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.speaker_nothing_to_change'), 'code': 'invalid_parameter'}), 400db.session.commit()if renamed:@@ -2873,15 +2878,15 @@ def delete_speaker(speaker_id):"""Delete a speaker."""speaker = db.session.get(Speaker, speaker_id)if not speaker:- return jsonify({'error': 'Speaker not found'}), 404+ return jsonify(api_error('speaker_not_found')), 404if speaker.user_id != current_user.id:- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403db.session.delete(speaker)db.session.commit()- return jsonify({'success': True, 'message': 'Speaker deleted'})+ return jsonify({'success': True, 'message': translate('server.apiMessage.speakerDeleted')})@api_v1_bp.route('/recordings/<int:recording_id>/speakers', methods=['GET'])@@ -2894,10 +2899,10 @@ def get_recording_speakers(recording_id):recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user):- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403# One entry per person in the transcript: the diarization label (when# known), the name it was given and the linked saved speaker. Email only@@ -2988,20 +2993,20 @@ def assign_speakers(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403data = request.get_json()if not data or 'speaker_map' not in data:- return jsonify({'error': 'speaker_map is required'}), 400+ return jsonify(api_error('speaker_map_required')), 400raw_speaker_map = data['speaker_map']regenerate_summary = data.get('regenerate_summary', False)if not isinstance(raw_speaker_map, dict):- return jsonify({'error': 'speaker_map must be an object'}), 400+ return jsonify(api_error('invalid_speaker_map')), 400# Normalize values to {name, isMe} format (same as web UI expects)speaker_map = {}@@ -3014,7 +3019,7 @@ def assign_speakers(recording_id):'isMe': value.get('isMe', False)}else:- return jsonify({'error': f'Invalid value type for speaker "{label}"'}), 400+ return jsonify(api_error('invalid_speaker_value_type', label=label)), 400# Same rename and follow-up steps as the web update_speakers (#412).from src.services.speaker_assignment import apply_speaker_names@@ -3025,7 +3030,7 @@ def assign_speakers(recording_id):return jsonify({'success': True,- 'message': 'Speakers updated successfully.',+ 'message': translate('server.apiMessage.speakersUpdated'),'recording': {'id': recording.id,'title': recording.title,@@ -3040,7 +3045,7 @@ def assign_speakers(recording_id):except Exception as e:db.session.rollback()current_app.logger.error(f"Error assigning speakers for recording {recording_id}: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred'}), 500+ return jsonify(api_error('unexpected_error')), 500@api_v1_bp.route('/recordings/<int:recording_id>/speakers/identify', methods=['POST'])@@ -3055,38 +3060,41 @@ def identify_speakers(recording_id):name sanitization, and fallback logic."""from src.services.speaker_identification import identify_speakers_from_transcript+ from src.services.llm import LLMNotConfiguredErrortry:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user):- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403if not recording.transcription:- return jsonify({'error': 'No transcription available for speaker identification'}), 400+ return jsonify(api_error('no_transcription_for_identification')), 400try:transcription_data = json.loads(recording.transcription)except (json.JSONDecodeError, TypeError):- return jsonify({'error': 'Transcription format not supported for auto-identification'}), 400+ return jsonify(api_error('transcription_format_unsupported_for_identification')), 400if not isinstance(transcription_data, list):- return jsonify({'error': 'Transcription format not supported for auto-identification'}), 400+ return jsonify(api_error('transcription_format_unsupported_for_identification')), 400speaker_map = identify_speakers_from_transcript(transcription_data, current_user.id)if not speaker_map:- return jsonify({'error': 'No speakers found in transcription'}), 400+ return jsonify(api_error('no_speakers_in_transcription')), 400return jsonify({'success': True, 'speaker_map': speaker_map})+ except LLMNotConfiguredError:+ return jsonify(api_error('text_model_not_configured')), 503except ValueError as ve:return jsonify({'error': str(ve)}), 503except Exception as e:current_app.logger.error(f"Error during auto speaker identification for recording {recording_id}: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred'}), 500+ return jsonify(api_error('unexpected_error')), 500# =============================================================================@@ -3102,10 +3110,10 @@ def start_transcription(recording_id):recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403# Same checks, clearing and settings as the web reprocess (#412).from src.services.reprocessing import queue_transcription_reprocess, ReprocessError@@ -3122,13 +3130,13 @@ def start_transcription(recording_id):try:job_id = queue_transcription_reprocess(recording, current_user, overrides)except ReprocessError as e:- return jsonify({'error': e.message}), e.status+ return jsonify(api_error(e.code)), e.statusreturn jsonify({'success': True,'job_id': job_id,'status': 'QUEUED',- 'message': 'Transcription queued'+ 'message': translate('server.apiMessage.transcriptionQueued')})@@ -3141,10 +3149,10 @@ def start_summarization(recording_id):recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403# Same checks, clearing and parameters as the web reprocess, including# prompt_mode and prompt_variables (#412).@@ -3156,13 +3164,13 @@ def start_summarization(recording_id):prompt_mode=data.get('prompt_mode'),prompt_variables=data.get('prompt_variables'))except ReprocessError as e:- return jsonify({'error': e.message}), e.status+ return jsonify(api_error(e.code)), e.statusreturn jsonify({'success': True,'job_id': job_id,'status': 'QUEUED',- 'message': 'Summarization queued'+ 'message': translate('server.apiMessage.summarizationQueued')})@@ -3181,25 +3189,25 @@ def chat_with_recording(recording_id):recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user):- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403if not recording.transcription:- return jsonify({'error': 'No transcription available'}), 400+ return jsonify(api_error('no_transcription')), 400data = request.get_json()if not data or not data.get('message'):- return jsonify({'error': 'message is required'}), 400+ return jsonify(api_error('message_required')), 400with_sources = data.get('with_sources', False)if not isinstance(with_sources, bool):- return jsonify({'error': 'with_sources must be true or false', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.invalid_with_sources'), 'code': 'invalid_parameter'}), 400# Check if chat client is availableif chat_client is None:- return jsonify({'error': 'Chat service not available'}), 503+ return jsonify(api_error('chat_unavailable')), 503messages, segments = build_chat_messages(recording, current_user, data['message'],data.get('conversation_history', []), with_sources=with_sources)@@ -3209,7 +3217,7 @@ def chat_with_recording(recording_id):reply = completion.choices[0].message.contentexcept Exception as e:current_app.logger.error(f"Chat error: {e}")- return jsonify({'error': 'Chat failed'}), 500+ return jsonify(api_error('chat_failed')), 500sources = []if with_sources and segments:@@ -3232,22 +3240,22 @@ def inquire_v1():from src.services.inquire_agent import agent_enabledfrom src.services.recording_scope import scope_conditionif os.environ.get('ENABLE_INQUIRE_MODE', 'false').lower() != 'true':- return jsonify({'error': 'Inquire is turned off on this server', 'code': 'feature_disabled'}), 403+ return jsonify({'error': translate('server.apiError.inquire_off'), 'code': 'feature_disabled'}), 403body = request.get_json(silent=True) or {}question = (body.get('question') or '').strip()if not question:- return jsonify({'error': 'question is required', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.question_required'), 'code': 'invalid_parameter'}), 400mode = body.get('mode', 'auto')if mode not in ('rag', 'agent', 'auto'):- return jsonify({'error': 'mode must be rag, agent or auto', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.invalid_inquire_mode'), 'code': 'invalid_parameter'}), 400if mode == 'agent' and not agent_enabled():- return jsonify({'error': 'The Inquire agent is turned off on this server', 'code': 'feature_disabled'}), 403+ return jsonify({'error': translate('server.apiError.inquire_agent_off'), 'code': 'feature_disabled'}), 403scope = body.get('scope', 'own')if scope not in ('own', 'shared', 'all'):- return jsonify({'error': 'scope must be own, shared or all', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.invalid_scope'), 'code': 'invalid_parameter'}), 400filters = body.get('filters') or {}if not isinstance(filters, dict):- return jsonify({'error': 'filters must be an object', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.invalid_filters'), 'code': 'invalid_parameter'}), 400allowed = [rid for (rid,) in db.session.query(Recording.id).filter(scope_condition(current_user.id, scope))]if filters.get('recording_ids'):@@ -3326,10 +3334,10 @@ def get_recording_events(recording_id):"""Get calendar events extracted from a recording."""recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user):- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403events = Event.query.filter_by(recording_id=recording_id).all()@@ -3345,14 +3353,14 @@ def download_events_ics(recording_id):recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user):- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403events = Event.query.filter_by(recording_id=recording_id).all()if not events:- return jsonify({'error': 'No events found'}), 404+ return jsonify(api_error('no_events')), 404# Same builder as the web download (#412).from src.services.calendar import generate_combined_ics@@ -3377,16 +3385,16 @@ def download_audio(recording_id):"""Download or stream audio file."""recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user):- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403if recording.audio_deleted_at:- return jsonify({'error': 'Audio has been deleted'}), 404+ return jsonify(api_error('audio_deleted')), 404if not recording.audio_path:- return jsonify({'error': 'No audio file'}), 404+ return jsonify(api_error('no_audio_file')), 404download = request.args.get('download', 'false').lower() == 'true'@@ -3411,7 +3419,7 @@ def download_audio(recording_id):return redirect(delivery.url, code=302)if not delivery.local_path or not os.path.exists(delivery.local_path):- return jsonify({'error': 'Audio file not found'}), 404+ return jsonify(api_error('audio_file_not_found')), 404return sandbox_media_response(send_file(delivery.local_path,@@ -3432,13 +3440,13 @@ def batch_update_recordings():"""Batch update multiple recordings."""data = request.get_json()if not data:- return jsonify({'error': 'No data provided'}), 400+ return jsonify(api_error('no_data_provided')), 400recording_ids = data.get('recording_ids', [])updates = data.get('updates', {})if not recording_ids:- return jsonify({'error': 'recording_ids required'}), 400+ return jsonify(api_error('recording_ids_required')), 400# If folder_id is being set on the batch, validate target folder access# once up front. The same destination folder applies to every recording@@ -3450,33 +3458,33 @@ def batch_update_recordings():from src.models.organization import Folder, GroupMembershiptarget = db.session.get(Folder, new_folder_id)if not target:- return jsonify({'error': f'Folder {new_folder_id} not found'}), 404+ return jsonify(api_error('folder_id_not_found', folderId=new_folder_id)), 404if target.group_id is None:if target.user_id != current_user.id:- return jsonify({'error': 'No access to target folder'}), 403+ return jsonify(api_error('target_folder_access_denied')), 403else:membership = GroupMembership.query.filter_by(user_id=current_user.id, group_id=target.group_id).first()if not membership:- return jsonify({'error': 'No access to target folder'}), 403+ return jsonify(api_error('target_folder_access_denied')), 403target_folder_id = new_folder_idbatch_archived = Noneif 'is_archived' in updates:batch_archived = parse_archived_flag(updates['is_archived'])if batch_archived is None:- return jsonify({'error': 'is_archived must be a boolean'}), 400+ return jsonify(api_error('invalid_is_archived')), 400results = []for recording_id in recording_ids:recording = db.session.get(Recording, recording_id)if not recording:- results.append({'id': recording_id, 'success': False, 'error': 'Not found'})+ results.append({'id': recording_id, 'success': False, **api_error('not_found')})continueif not has_recording_access(recording, current_user, require_edit=True):- results.append({'id': recording_id, 'success': False, 'error': 'Permission denied'})+ results.append({'id': recording_id, 'success': False, **api_error('permission_denied')})continuetry:@@ -3573,25 +3581,25 @@ def batch_delete_recordings():"""Batch delete multiple recordings."""data = request.get_json()if not data:- return jsonify({'error': 'No data provided'}), 400+ return jsonify(api_error('no_data_provided')), 400recording_ids = data.get('recording_ids', [])if not recording_ids:- return jsonify({'error': 'recording_ids required'}), 400+ return jsonify(api_error('recording_ids_required')), 400USERS_CAN_DELETE = os.environ.get('USERS_CAN_DELETE', 'true').lower() == 'true'if not USERS_CAN_DELETE and not current_user.is_admin:- return jsonify({'error': 'Deletion not allowed'}), 403+ return jsonify(api_error('deletion_not_allowed')), 403results = []for recording_id in recording_ids:recording = db.session.get(Recording, recording_id)if not recording:- results.append({'id': recording_id, 'success': False, 'error': 'Not found'})+ results.append({'id': recording_id, 'success': False, **api_error('not_found')})continueif recording.user_id != current_user.id and not current_user.is_admin:- results.append({'id': recording_id, 'success': False, 'error': 'Permission denied'})+ results.append({'id': recording_id, 'success': False, **api_error('permission_denied')})continuetry:@@ -3601,7 +3609,7 @@ def batch_delete_recordings():except Exception as e:db.session.rollback()current_app.logger.error(f"Error deleting recording {recording_id}: {e}")- results.append({'id': recording_id, 'success': False, 'error': 'Delete failed'})+ results.append({'id': recording_id, 'success': False, **api_error('delete_failed')})if any(r['success'] for r in results):from src.services.recording_deletion import cleanup_orphaned_speakers_quietly@@ -3625,21 +3633,21 @@ def batch_transcribe_recordings():data = request.get_json()if not data:- return jsonify({'error': 'No data provided'}), 400+ return jsonify(api_error('no_data_provided')), 400recording_ids = data.get('recording_ids', [])if not recording_ids:- return jsonify({'error': 'recording_ids required'}), 400+ return jsonify(api_error('recording_ids_required')), 400results = []for recording_id in recording_ids:recording = db.session.get(Recording, recording_id)if not recording:- results.append({'id': recording_id, 'success': False, 'error': 'Not found'})+ results.append({'id': recording_id, 'success': False, **api_error('not_found')})continueif not has_recording_access(recording, current_user, require_edit=True):- results.append({'id': recording_id, 'success': False, 'error': 'Permission denied'})+ results.append({'id': recording_id, 'success': False, **api_error('permission_denied')})continue# Same checks, clearing and settings as a single reprocess (#412).@@ -3673,10 +3681,10 @@ def update_auto_summarization():data = request.get_json()if data is None:- return jsonify({'error': 'Invalid JSON'}), 400+ return jsonify(api_error('invalid_json')), 400if 'enabled' not in data:- return jsonify({'error': 'enabled field is required'}), 400+ return jsonify(api_error('enabled_field_required')), 400current_user.auto_summarization = bool(data['enabled'])db.session.commit()@@ -3751,11 +3759,11 @@ def upload_from_asr_voice_recorder():secret = request.form.get('secret', '')owner = load_user_from_token_value(secret)if owner is None:- return jsonify({'error': 'Authentication failed'}), 401+ return jsonify(api_error('authentication_failed')), 401# A scoped token must carry 'upload' (mailr spec G1); full tokens pass._token = request.environ.get('_speakr_secret_token')if _token is not None and _token.scope_set is not None and 'upload' not in _token.scope_set:- return jsonify({'error': 'Authentication failed'}), 401+ return jsonify(api_error('authentication_failed')), 401uploaded_file = request.files.get('file')if uploaded_file is None:@@ -3763,7 +3771,7 @@ def upload_from_asr_voice_recorder():has_upload_metadata = any(request.form.get(field) for field in upload_fields)if not has_upload_metadata:return jsonify({'status': 'ok', 'connection_test': True}), 200- return jsonify({'error': 'No file provided'}), 400+ return jsonify(api_error('no_file_provided')), 400form = {}note = request.form.get('note')@@ -3786,7 +3794,7 @@ def upload_from_asr_voice_recorder():reuse_duplicate=True,)except RequestEntityTooLarge:- return jsonify({'error': 'File too large'}), 413+ return jsonify(api_error('file_too_large')), 413@api_v1_bp.route('/recordings/upload', methods=['POST'])@@ -3826,7 +3834,7 @@ def upload_recording():participants = form.get('participants')if participants is not None and len(participants) > 500:- return jsonify({'error': 'participants must be at most 500 characters', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.participants_too_long'), 'code': 'invalid_parameter'}), 400clean_refs = []if form.get('external_refs'):try:@@ -3838,7 +3846,7 @@ def upload_recording():'code': code}), statuskey = (form.get('idempotency_key') or '').strip() or Noneif key is not None and len(key) > 100:- return jsonify({'error': 'idempotency_key must be 1 to 100 characters', 'code': 'invalid_parameter'}), 400+ return jsonify({'error': translate('server.apiError.invalid_idempotency_key'), 'code': 'invalid_parameter'}), 400cutoff = datetime.utcnow() - timedelta(hours=24)def _replay():@@ -3883,7 +3891,7 @@ def upload_recording():if not _usable(folder):ignored_folder = int(raw) if str(raw).isdigit() else rawif (form.get('strict') or '').lower() == 'true' and (ignored_tags or ignored_folder is not None):- return jsonify({'error': 'A tag or folder in the upload is not one you can use',+ return jsonify({'error': translate('server.apiError.upload_tag_or_folder_forbidden'),'code': 'invalid_parameter','ignored': {'tag_ids': ignored_tags, 'folder_id': ignored_folder}}), 400diff --git a/src/api/auth.py b/src/api/auth.pyindex abfa26ae..14264bee 100644--- a/src/api/auth.py+++ b/src/api/auth.py@@ -20,7 +20,7 @@ import markdownfrom src.database import dbfrom src.models import User, SystemSetting, GroupMembershipfrom src.utils import password_check, is_safe_url-from src.utils.localization import format_file_size, format_number, translate+from src.utils.localization import format_file_size, format_number, translate, api_errorfrom src.auth.sso import (init_sso_client,is_sso_enabled,@@ -809,10 +809,10 @@ def account():# Path separators would let a template escape the per-user export# directory; reject them outright.if '/' in template_value or '\\' in template_value:- error_msg = 'The filename template cannot contain path separators (/ or \\).'+ error_msg = translate('server.flash.exportTemplateSeparators')if request.headers.get('X-Requested-With') == 'XMLHttpRequest' or request.accept_mimetypes.best == 'application/json':return jsonify({'success': False, 'error': error_msg}), 400- flash(translate('server.flash.exportTemplateSeparators'), 'danger')+ flash(error_msg, 'danger')return redirect(url_for('auth.account'))# Empty string = use the default template (recording_{{id}})current_user.export_filename_template = template_value if template_value else None@@ -821,7 +821,7 @@ def account():# Return JSON response for AJAX requestsif request.headers.get('X-Requested-With') == 'XMLHttpRequest' or request.accept_mimetypes.best == 'application/json':- return jsonify({'success': True, 'message': 'Account details updated successfully!'})+ return jsonify({'success': True, 'message': translate('server.apiMessage.accountUpdated')})# Regular form submission with redirectflash(translate('server.flash.accountUpdated'), 'success')@@ -962,7 +962,7 @@ def update_auto_speaker_labelling():data = request.get_json()if data is None:- return jsonify({'success': False, 'error': 'Invalid JSON'}), 400+ return jsonify({'success': False, **api_error('invalid_json')}), 400# Update enabled stateif 'enabled' in data:@@ -974,7 +974,7 @@ def update_auto_speaker_labelling():if threshold in ('low', 'medium', 'high'):current_user.auto_speaker_labelling_threshold = thresholdelse:- return jsonify({'success': False, 'error': 'Invalid threshold value'}), 400+ return jsonify({'success': False, **api_error('invalid_threshold')}), 400db.session.commit()@@ -992,7 +992,7 @@ def update_auto_summarization():data = request.get_json()if data is None:- return jsonify({'success': False, 'error': 'Invalid JSON'}), 400+ return jsonify({'success': False, **api_error('invalid_json')}), 400if 'enabled' in data:current_user.auto_summarization = bool(data['enabled'])diff --git a/src/api/events.py b/src/api/events.pyindex 68f39102..01de006c 100644--- a/src/api/events.py+++ b/src/api/events.py@@ -15,6 +15,7 @@ from src.database import dbfrom src.models import *from src.utils import *from src.services.calendar import generate_ics_content+from src.utils.localization import api_error# Create blueprintevents_bp = Blueprint('events', __name__)@@ -50,10 +51,10 @@ def get_recording_events(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user):- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403events = Event.query.filter_by(recording_id=recording_id).all()return jsonify({'events': [event.to_dict() for event in events]})@@ -70,11 +71,11 @@ def download_event_ics(event_id):try:event = db.session.get(Event, event_id)if not event:- return jsonify({'error': 'Event not found'}), 404+ return jsonify(api_error('event_not_found')), 404# Check permissions through recording accessif not has_recording_access(event.recording, current_user):- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403# Generate ICS contentics_content = generate_ics_content(event)@@ -98,15 +99,15 @@ def download_all_events_ics(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user):- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403# Get all events for this recordingevents = Event.query.filter_by(recording_id=recording_id).all()if not events:- return jsonify({'error': 'No events found for this recording'}), 404+ return jsonify(api_error('no_events_for_recording')), 404# Same builder as the API v1 download (#412).from src.services.calendar import generate_combined_ics@@ -132,11 +133,11 @@ def delete_event(event_id):try:event = db.session.get(Event, event_id)if not event:- return jsonify({'error': 'Event not found'}), 404+ return jsonify(api_error('event_not_found')), 404# Check permissions through recording accessif not has_recording_access(event.recording, current_user):- return jsonify({'error': 'Unauthorized'}), 403+ return jsonify(api_error('unauthorized')), 403db.session.delete(event)db.session.commit()diff --git a/src/api/export_templates.py b/src/api/export_templates.pyindex d75a2efe..d538b30f 100644--- a/src/api/export_templates.py+++ b/src/api/export_templates.py@@ -12,6 +12,7 @@ from flask_login import login_required, current_userfrom src.database import dbfrom src.models import ExportTemplate+from src.utils.localization import api_error, translate# Create blueprintexport_templates_bp = Blueprint('export_templates', __name__)@@ -36,7 +37,7 @@ def create_export_template():"""Create a new export template."""data = request.jsonif not data or not data.get('name') or not data.get('template'):- return jsonify({'error': 'Name and template are required'}), 400+ return jsonify(api_error('name_and_template_required')), 400# If this is set as default, unset other defaultsif data.get('is_default'):@@ -69,11 +70,11 @@ def update_export_template(template_id):).first()if not template:- return jsonify({'error': 'Template not found'}), 404+ return jsonify(api_error('template_not_found')), 404data = request.jsonif not data:- return jsonify({'error': 'No data provided'}), 400+ return jsonify(api_error('no_data_provided')), 400# If this is set as default, unset other defaultsif data.get('is_default'):@@ -103,7 +104,7 @@ def delete_export_template(template_id):).first()if not template:- return jsonify({'error': 'Template not found'}), 404+ return jsonify(api_error('template_not_found')), 404db.session.delete(template)db.session.commit()@@ -118,7 +119,7 @@ def create_default_export_templates():existing_templates = ExportTemplate.query.filter_by(user_id=current_user.id).count()if existing_templates > 0:- return jsonify({'message': 'User already has templates'}), 200+ return jsonify({'message': translate('server.apiMessage.userAlreadyHasTemplates')}), 200# Default template with localized labelsdefault_template = ExportTemplate(@@ -176,11 +177,11 @@ def apply_filename_template():from src.file_exporter import apply_filename_template_for_userif not auto_export_enabled:- return jsonify({'error': 'Auto-export is not enabled on this server'}), 400+ return jsonify(api_error('auto_export_disabled')), 400try:result = apply_filename_template_for_user(current_user.id)return jsonify(result)except Exception as e:current_app.logger.error(f"Error applying export filename template: {e}")- return jsonify({'error': 'Failed to rename existing exports'}), 500+ return jsonify(api_error('export_rename_failed')), 500diff --git a/src/api/folders.py b/src/api/folders.pyindex 74ea8e2a..deb334e4 100644--- a/src/api/folders.py+++ b/src/api/folders.py@@ -14,6 +14,7 @@ from sqlalchemy.exc import IntegrityErrorfrom src.database import dbfrom src.models import *+from src.utils.localization import api_error# Create blueprintfolders_bp = Blueprint('folders', __name__)@@ -94,12 +95,12 @@ def create_folder():# Check if folders feature is enabledfolders_enabled = SystemSetting.get_setting('enable_folders', False)if not folders_enabled:- return jsonify({'error': 'Folders feature is not enabled'}), 403+ return jsonify(api_error('folders_disabled')), 403data = request.get_json()if not data or not data.get('name'):- return jsonify({'error': 'Folder name is required'}), 400+ return jsonify(api_error('folder_name_required')), 400group_id = data.get('group_id')@@ -111,17 +112,17 @@ def create_folder():).first()if not membership or membership.role != 'admin':- return jsonify({'error': 'Only group admins can create group folders'}), 403+ return jsonify(api_error('group_folder_create_admin_only')), 403# Check if group folder with same name already exists for this groupexisting_folder = Folder.query.filter_by(name=data['name'], group_id=group_id).first()if existing_folder:- return jsonify({'error': 'A folder with this name already exists for this group'}), 400+ return jsonify(api_error('folder_name_exists_for_group')), 400else:# Check if personal folder with same name already exists for this userexisting_folder = Folder.query.filter_by(name=data['name'], user_id=current_user.id, group_id=None).first()if existing_folder:- return jsonify({'error': 'Folder with this name already exists'}), 400+ return jsonify(api_error('folder_name_exists')), 400# Handle retention_days: -1 means protected from deletionretention_days = data.get('retention_days')@@ -136,14 +137,14 @@ def create_folder():if naming_template_id:template = NamingTemplate.query.filter_by(id=naming_template_id, user_id=current_user.id).first()if not template:- return jsonify({'error': 'Naming template not found'}), 404+ return jsonify(api_error('naming_template_not_found')), 404# Validate export_template_id if providedexport_template_id = data.get('export_template_id')if export_template_id:template = ExportTemplate.query.filter_by(id=export_template_id, user_id=current_user.id).first()if not template:- return jsonify({'error': 'Export template not found'}), 404+ return jsonify(api_error('export_template_not_found')), 404folder = Folder(name=data['name'],@@ -173,7 +174,7 @@ def create_folder():except IntegrityError as e:db.session.rollback()current_app.logger.error(f"Folder creation failed due to integrity constraint: {str(e)}")- return jsonify({'error': 'A folder with this name already exists'}), 400+ return jsonify(api_error('folder_name_exists')), 400return jsonify(folder.to_dict()), 201@@ -185,11 +186,11 @@ def update_folder(folder_id):# Check if folders feature is enabledfolders_enabled = SystemSetting.get_setting('enable_folders', False)if not folders_enabled:- return jsonify({'error': 'Folders feature is not enabled'}), 403+ return jsonify(api_error('folders_disabled')), 403folder = db.session.get(Folder, folder_id)if not folder:- return jsonify({'error': 'Folder not found'}), 404+ return jsonify(api_error('folder_not_found')), 404# Check permissionsif folder.group_id:@@ -200,11 +201,11 @@ def update_folder(folder_id):).first()if not membership or membership.role != 'admin':- return jsonify({'error': 'Only group admins can edit group folders'}), 403+ return jsonify(api_error('group_folder_edit_admin_only')), 403else:# Personal folder - must be the ownerif folder.user_id != current_user.id:- return jsonify({'error': 'You do not have permission to edit this folder'}), 403+ return jsonify(api_error('folder_edit_denied')), 403data = request.get_json()@@ -216,7 +217,7 @@ def update_folder(folder_id):existing_folder = Folder.query.filter_by(name=data['name'], user_id=current_user.id).filter(Folder.id != folder_id).first()if existing_folder:- return jsonify({'error': 'Another folder with this name already exists'}), 400+ return jsonify(api_error('folder_rename_conflict')), 400folder.name = data['name']# Handle group_id changes (converting between personal and group folders)@@ -231,7 +232,7 @@ def update_folder(folder_id):).first()if not membership or membership.role != 'admin':- return jsonify({'error': 'Only group admins can assign folders to groups'}), 403+ return jsonify(api_error('folder_group_assign_admin_only')), 403folder.group_id = new_group_id@@ -280,14 +281,14 @@ def update_folder(folder_id):if naming_template_id:template = NamingTemplate.query.filter_by(id=naming_template_id, user_id=current_user.id).first()if not template:- return jsonify({'error': 'Naming template not found'}), 404+ return jsonify(api_error('naming_template_not_found')), 404folder.naming_template_id = naming_template_id if naming_template_id else Noneif 'export_template_id' in data:export_template_id = data['export_template_id']if export_template_id:template = ExportTemplate.query.filter_by(id=export_template_id, user_id=current_user.id).first()if not template:- return jsonify({'error': 'Export template not found'}), 404+ return jsonify(api_error('export_template_not_found')), 404folder.export_template_id = export_template_id if export_template_id else Nonefolder.updated_at = datetime.utcnow()@@ -297,7 +298,7 @@ def update_folder(folder_id):except IntegrityError as e:db.session.rollback()current_app.logger.error(f"Folder update failed due to integrity constraint: {str(e)}")- return jsonify({'error': 'A folder with this name already exists'}), 400+ return jsonify(api_error('folder_name_exists')), 400return jsonify(folder.to_dict())@@ -309,11 +310,11 @@ def delete_folder(folder_id):# Check if folders feature is enabledfolders_enabled = SystemSetting.get_setting('enable_folders', False)if not folders_enabled:- return jsonify({'error': 'Folders feature is not enabled'}), 403+ return jsonify(api_error('folders_disabled')), 403folder = db.session.get(Folder, folder_id)if not folder:- return jsonify({'error': 'Folder not found'}), 404+ return jsonify(api_error('folder_not_found')), 404# Check permissionsif folder.group_id:@@ -324,11 +325,11 @@ def delete_folder(folder_id):).first()if not membership or membership.role != 'admin':- return jsonify({'error': 'Only group admins can delete group folders'}), 403+ return jsonify(api_error('group_folder_delete_admin_only')), 403else:# Personal folder - must belong to the userif folder.user_id != current_user.id:- return jsonify({'error': 'You do not have permission to delete this folder'}), 403+ return jsonify(api_error('folder_delete_denied')), 403# Recordings in this folder will have folder_id set to NULL via ondelete='SET NULL'db.session.delete(folder)@@ -343,15 +344,15 @@ def create_group_folder(group_id):# Check if folders feature is enabledfolders_enabled = SystemSetting.get_setting('enable_folders', False)if not folders_enabled:- return jsonify({'error': 'Folders feature is not enabled'}), 403+ return jsonify(api_error('folders_disabled')), 403if not ENABLE_INTERNAL_SHARING:- return jsonify({'error': 'Group folders require internal sharing to be enabled. Please set ENABLE_INTERNAL_SHARING=true in your configuration.'}), 403+ return jsonify(api_error('group_folders_require_internal_sharing')), 403# Verify team existsteam = db.session.get(Group, group_id)if not team:- return jsonify({'error': 'Group not found'}), 404+ return jsonify(api_error('group_not_found')), 404# Verify user is a team adminmembership = GroupMembership.query.filter_by(@@ -360,13 +361,13 @@ def create_group_folder(group_id):).first()if not membership or membership.role != 'admin':- return jsonify({'error': 'Only group admins can create group folders'}), 403+ return jsonify(api_error('group_folder_create_admin_only')), 403data = request.get_json()name = data.get('name', '').strip()if not name:- return jsonify({'error': 'Folder name is required'}), 400+ return jsonify(api_error('folder_name_required')), 400# Check if a group folder with this name already exists for this teamexisting_folder = Folder.query.filter_by(@@ -375,21 +376,21 @@ def create_group_folder(group_id):).first()if existing_folder:- return jsonify({'error': 'A group folder with this name already exists'}), 400+ return jsonify(api_error('group_folder_name_exists')), 400# Validate naming_template_id if providednaming_template_id = data.get('naming_template_id')if naming_template_id:template = NamingTemplate.query.filter_by(id=naming_template_id, user_id=current_user.id).first()if not template:- return jsonify({'error': 'Naming template not found'}), 404+ return jsonify(api_error('naming_template_not_found')), 404# Validate export_template_id if providedexport_template_id = data.get('export_template_id')if export_template_id:template = ExportTemplate.query.filter_by(id=export_template_id, user_id=current_user.id).first()if not template:- return jsonify({'error': 'Export template not found'}), 404+ return jsonify(api_error('export_template_not_found')), 404# Create the group folder with all supported parametersfolder = Folder(@@ -420,7 +421,7 @@ def create_group_folder(group_id):except IntegrityError as e:db.session.rollback()current_app.logger.error(f"Folder creation failed due to integrity constraint: {str(e)}")- return jsonify({'error': 'A folder with this name already exists'}), 400+ return jsonify(api_error('folder_name_exists')), 400return jsonify(folder.to_dict()), 201@@ -432,12 +433,12 @@ def get_group_folders(group_id):# Check if folders feature is enabledfolders_enabled = SystemSetting.get_setting('enable_folders', False)if not folders_enabled:- return jsonify({'error': 'Folders feature is not enabled'}), 403+ return jsonify(api_error('folders_disabled')), 403# Verify team existsteam = db.session.get(Group, group_id)if not team:- return jsonify({'error': 'Group not found'}), 404+ return jsonify(api_error('group_not_found')), 404# Verify user is a team membermembership = GroupMembership.query.filter_by(@@ -446,7 +447,7 @@ def get_group_folders(group_id):).first()if not membership:- return jsonify({'error': 'You must be a team member to view group folders'}), 403+ return jsonify(api_error('group_folders_members_only')), 403# Get all group foldersfrom src.services.recording_list import folder_dicts, folder_load_options@@ -462,20 +463,20 @@ def assign_recording_folder(recording_id):# Check if folders feature is enabledfolders_enabled = SystemSetting.get_setting('enable_folders', False)if not folders_enabled:- return jsonify({'error': 'Folders feature is not enabled'}), 403+ return jsonify(api_error('folders_disabled')), 403recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404# Check access to recording (require edit permission)if has_recording_access:if not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'You do not have permission to modify this recording'}), 403+ return jsonify(api_error('recording_modify_denied')), 403else:# Fallback: only owner can assign folderif recording.user_id != current_user.id:- return jsonify({'error': 'You do not have permission to modify this recording'}), 403+ return jsonify(api_error('recording_modify_denied')), 403data = request.get_json()folder_id = data.get('folder_id')@@ -484,7 +485,7 @@ def assign_recording_folder(recording_id):# Verify folder exists and user has accessfolder = db.session.get(Folder, folder_id)if not folder:- return jsonify({'error': 'Folder not found'}), 404+ return jsonify(api_error('folder_not_found')), 404# Check if user can use this folderif folder.group_id:@@ -494,11 +495,11 @@ def assign_recording_folder(recording_id):user_id=current_user.id).first()if not membership:- return jsonify({'error': 'You do not have access to this folder'}), 403+ return jsonify(api_error('folder_access_denied')), 403else:# Personal folder - must be ownerif folder.user_id != current_user.id:- return jsonify({'error': 'You do not have access to this folder'}), 403+ return jsonify(api_error('folder_access_denied')), 403# Handle auto-sharing for group foldersold_folder_id = recording.folder_id@@ -526,20 +527,20 @@ def remove_recording_folder(recording_id):# Check if folders feature is enabledfolders_enabled = SystemSetting.get_setting('enable_folders', False)if not folders_enabled:- return jsonify({'error': 'Folders feature is not enabled'}), 403+ return jsonify(api_error('folders_disabled')), 403recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404# Check access to recording (require edit permission)if has_recording_access:if not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'You do not have permission to modify this recording'}), 403+ return jsonify(api_error('recording_modify_denied')), 403else:# Fallback: only owner can remove folderif recording.user_id != current_user.id:- return jsonify({'error': 'You do not have permission to modify this recording'}), 403+ return jsonify(api_error('recording_modify_denied')), 403recording.folder_id = Nonedb.session.commit()@@ -555,21 +556,21 @@ def bulk_assign_folder():# Check if folders feature is enabledfolders_enabled = SystemSetting.get_setting('enable_folders', False)if not folders_enabled:- return jsonify({'error': 'Folders feature is not enabled'}), 403+ return jsonify(api_error('folders_disabled')), 403data = request.get_json()recording_ids = data.get('recording_ids', [])folder_id = data.get('folder_id') # Can be None to remove from folderif not recording_ids:- return jsonify({'error': 'No recordings specified'}), 400+ return jsonify(api_error('no_recordings_specified')), 400# Verify folder if specifiedfolder = Noneif folder_id:folder = db.session.get(Folder, folder_id)if not folder:- return jsonify({'error': 'Folder not found'}), 404+ return jsonify(api_error('folder_not_found')), 404# Check if user can use this folderif folder.group_id:@@ -578,10 +579,10 @@ def bulk_assign_folder():user_id=current_user.id).first()if not membership:- return jsonify({'error': 'You do not have access to this folder'}), 403+ return jsonify(api_error('folder_access_denied')), 403else:if folder.user_id != current_user.id:- return jsonify({'error': 'You do not have access to this folder'}), 403+ return jsonify(api_error('folder_access_denied')), 403updated_count = 0for rec_id in recording_ids:diff --git a/src/api/groups.py b/src/api/groups.pyindex 2eed5670..f5f873b1 100644--- a/src/api/groups.py+++ b/src/api/groups.py@@ -15,6 +15,7 @@ from werkzeug.utils import secure_filenamefrom src.database import dbfrom src.models import *from src.utils import *+from src.utils.localization import api_error, translate# Create blueprintgroups_bp = Blueprint('groups', __name__)@@ -50,7 +51,7 @@ def sync_team_tag_shares(group_id):# Verify group existsgroup = db.session.get(Group, group_id)if not group:- return jsonify({'error': 'Group not found'}), 404+ return jsonify(api_error('group_not_found')), 404# Verify user is a group adminmembership = GroupMembership.query.filter_by(@@ -60,10 +61,10 @@ def sync_team_tag_shares(group_id):).first()if not membership:- return jsonify({'error': 'Only group admins can sync shares'}), 403+ return jsonify(api_error('share_sync_admin_only')), 403if not ENABLE_INTERNAL_SHARING:- return jsonify({'error': 'Internal sharing is not enabled'}), 403+ return jsonify(api_error('internal_sharing_disabled')), 403# Get all group tags with auto-sharing enabledgroup_tags = Tag.query.filter(@@ -138,7 +139,8 @@ def sync_team_tag_shares(group_id):'success': True,'shares_created': shares_created,'recordings_processed': recordings_processed,- 'message': f'Created {shares_created} new shares across {recordings_processed} recordings'+ 'message': translate('server.apiMessage.sharesSynced', sharesCreated=shares_created,+ recordingsProcessed=recordings_processed)})@@ -154,7 +156,7 @@ def get_teams():).first() is not Noneif not current_user.is_admin and not is_group_admin:- return jsonify({'error': 'Admin access required'}), 403+ return jsonify(api_error('admin_required')), 403# If full admin, return all groups; if group admin, return only their groupsif current_user.is_admin:@@ -176,22 +178,22 @@ def get_teams():def create_team():"""Create a new group (admin only)."""if not current_user.is_admin:- return jsonify({'error': 'Admin access required'}), 403+ return jsonify(api_error('admin_required')), 403if not ENABLE_INTERNAL_SHARING:- return jsonify({'error': 'Groups require internal sharing to be enabled. Please set ENABLE_INTERNAL_SHARING=true in your configuration.'}), 403+ return jsonify(api_error('groups_require_internal_sharing')), 403data = request.get_json()name = data.get('name', '').strip()description = data.get('description', '').strip()if not name:- return jsonify({'error': 'Group name is required'}), 400+ return jsonify(api_error('group_name_required')), 400# Check if group name already existsexisting = Group.query.filter_by(name=name).first()if existing:- return jsonify({'error': 'A group with this name already exists'}), 400+ return jsonify(api_error('group_name_exists')), 400group = Group(name=name, description=description)db.session.add(group)@@ -208,7 +210,7 @@ def get_team(group_id):"""Get group details (admin or group admin)."""group = db.session.get(Group, group_id)if not group:- return jsonify({'error': 'Group not found'}), 404+ return jsonify(api_error('group_not_found')), 404# Check if user is admin OR admin of this specific groupis_group_admin = GroupMembership.query.filter_by(@@ -218,7 +220,7 @@ def get_team(group_id):).first() is not Noneif not current_user.is_admin and not is_group_admin:- return jsonify({'error': 'Admin access required'}), 403+ return jsonify(api_error('admin_required')), 403group_dict = group.to_dict()group_dict['members'] = [m.to_dict() for m in group.memberships]@@ -232,7 +234,7 @@ def update_team(group_id):"""Update group (admin or group admin)."""group = db.session.get(Group, group_id)if not group:- return jsonify({'error': 'Group not found'}), 404+ return jsonify(api_error('group_not_found')), 404# Check if user is admin OR admin of this specific groupis_group_admin = GroupMembership.query.filter_by(@@ -242,7 +244,7 @@ def update_team(group_id):).first() is not Noneif not current_user.is_admin and not is_group_admin:- return jsonify({'error': 'Admin access required'}), 403+ return jsonify(api_error('admin_required')), 403data = request.get_json()name = data.get('name', '').strip()@@ -252,7 +254,7 @@ def update_team(group_id):# Check if new name conflicts with another groupexisting = Group.query.filter(Group.name == name, Group.id != group_id).first()if existing:- return jsonify({'error': 'A group with this name already exists'}), 400+ return jsonify(api_error('group_name_exists')), 400group.name = namegroup.description = description@@ -268,11 +270,11 @@ def update_team(group_id):def delete_team(group_id):"""Delete group (admin only)."""if not current_user.is_admin:- return jsonify({'error': 'Admin access required'}), 403+ return jsonify(api_error('admin_required')), 403group = db.session.get(Group, group_id)if not group:- return jsonify({'error': 'Group not found'}), 404+ return jsonify(api_error('group_not_found')), 404group_name = group.namedb.session.delete(group)@@ -288,11 +290,11 @@ def delete_team(group_id):def add_team_member(group_id):"""Add a member to a group (admin or group admin)."""if not ENABLE_INTERNAL_SHARING:- return jsonify({'error': 'Groups require internal sharing to be enabled. Please set ENABLE_INTERNAL_SHARING=true in your configuration.'}), 403+ return jsonify(api_error('groups_require_internal_sharing')), 403group = db.session.get(Group, group_id)if not group:- return jsonify({'error': 'Group not found'}), 404+ return jsonify(api_error('group_not_found')), 404# Check if user is admin OR admin of this specific groupis_group_admin = GroupMembership.query.filter_by(@@ -302,26 +304,26 @@ def add_team_member(group_id):).first() is not Noneif not current_user.is_admin and not is_group_admin:- return jsonify({'error': 'Admin access required'}), 403+ return jsonify(api_error('admin_required')), 403data = request.get_json()user_id = data.get('user_id')role = data.get('role', 'member')if not user_id:- return jsonify({'error': 'User ID is required'}), 400+ return jsonify(api_error('user_id_required')), 400if role not in ['admin', 'member']:- return jsonify({'error': 'Role must be "admin" or "member"'}), 400+ return jsonify(api_error('invalid_group_role')), 400user = db.session.get(User, user_id)if not user:- return jsonify({'error': 'User not found'}), 404+ return jsonify(api_error('user_not_found')), 404# Check if already a memberexisting = GroupMembership.query.filter_by(group_id=group_id, user_id=user_id).first()if existing:- return jsonify({'error': 'User is already a member of this group'}), 400+ return jsonify(api_error('already_group_member')), 400membership = GroupMembership(group_id=group_id, user_id=user_id, role=role)db.session.add(membership)@@ -338,7 +340,7 @@ def update_team_member(group_id, user_id):"""Update group member role (admin or group admin)."""membership = GroupMembership.query.filter_by(group_id=group_id, user_id=user_id).first()if not membership:- return jsonify({'error': 'Membership not found'}), 404+ return jsonify(api_error('membership_not_found')), 404# Check if user is admin OR admin of this specific groupis_group_admin = GroupMembership.query.filter_by(@@ -348,13 +350,13 @@ def update_team_member(group_id, user_id):).first() is not Noneif not current_user.is_admin and not is_group_admin:- return jsonify({'error': 'Admin access required'}), 403+ return jsonify(api_error('admin_required')), 403data = request.get_json()role = data.get('role')if role not in ['admin', 'member']:- return jsonify({'error': 'Role must be "admin" or "member"'}), 400+ return jsonify(api_error('invalid_group_role')), 400membership.role = roledb.session.commit()@@ -370,7 +372,7 @@ def remove_team_member(group_id, user_id):"""Remove a member from a group (admin or group admin)."""membership = GroupMembership.query.filter_by(group_id=group_id, user_id=user_id).first()if not membership:- return jsonify({'error': 'Membership not found'}), 404+ return jsonify(api_error('membership_not_found')), 404# Check if user is admin OR admin of this specific groupis_group_admin = GroupMembership.query.filter_by(@@ -380,7 +382,7 @@ def remove_team_member(group_id, user_id):).first() is not Noneif not current_user.is_admin and not is_group_admin:- return jsonify({'error': 'Admin access required'}), 403+ return jsonify(api_error('admin_required')), 403username = membership.user.usernamegroup_name = membership.group.namediff --git a/src/api/initial_prompt_templates.py b/src/api/initial_prompt_templates.pyindex 561698fc..fd4bb212 100644--- a/src/api/initial_prompt_templates.py+++ b/src/api/initial_prompt_templates.py@@ -13,6 +13,7 @@ from flask_login import login_required, current_userfrom src.database import dbfrom src.models import InitialPromptTemplate+from src.utils.localization import api_error, translate# Create blueprintinitial_prompt_templates_bp = Blueprint('initial_prompt_templates', __name__)@@ -35,7 +36,7 @@ def create_initial_prompt_template():hotwords = (data.get('hotwords') or '') if data else ''# A template needs a name and at least one of prompt / hotwords.if not data or not data.get('name') or not (prompt.strip() or hotwords.strip()):- return jsonify({'error': 'Name and a prompt or hotwords are required'}), 400+ return jsonify(api_error('name_and_prompt_required')), 400# If this is set as default, unset other defaultsif data.get('is_default'):@@ -69,11 +70,11 @@ def update_initial_prompt_template(template_id):).first()if not template:- return jsonify({'error': 'Template not found'}), 404+ return jsonify(api_error('template_not_found')), 404data = request.jsonif not data:- return jsonify({'error': 'No data provided'}), 400+ return jsonify(api_error('no_data_provided')), 400# If this is set as default, unset other defaultsif data.get('is_default'):@@ -105,7 +106,7 @@ def delete_initial_prompt_template(template_id):).first()if not template:- return jsonify({'error': 'Template not found'}), 404+ return jsonify(api_error('template_not_found')), 404db.session.delete(template)db.session.commit()@@ -119,7 +120,7 @@ def create_default_initial_prompt_templates():"""Seed a few starter initial-prompt templates if the user has none."""existing = InitialPromptTemplate.query.filter_by(user_id=current_user.id).count()if existing > 0:- return jsonify({'message': 'User already has templates'}), 200+ return jsonify({'message': translate('server.apiMessage.userAlreadyHasTemplates')}), 200starters = [('Business meeting',diff --git a/src/api/inquire.py b/src/api/inquire.pyindex 1df36ff2..f48fd27e 100644--- a/src/api/inquire.py+++ b/src/api/inquire.py@@ -17,7 +17,7 @@ from werkzeug.utils import secure_filenamefrom src.database import dbfrom src.models import *from src.utils import *-from src.utils.localization import translate+from src.utils.localization import translate, api_errorfrom src.services.embeddings import get_accessible_recording_ids, semantic_search_chunks, EMBEDDINGS_AVAILABLEfrom src.services.llm import call_llm_completion, call_chat_completion, process_streaming_with_thinking, client, chat_client, TokenBudgetExceeded@@ -79,7 +79,7 @@ def inquire():def get_inquire_sessions():"""Get all inquire sessions for the current user."""if not ENABLE_INQUIRE_MODE:- return jsonify({'error': 'Inquire mode is not enabled'}), 403+ return jsonify(api_error('inquire_disabled')), 403try:sessions = InquireSession.query.filter_by(user_id=current_user.id).order_by(InquireSession.last_used.desc()).all()return jsonify([session.to_dict() for session in sessions])@@ -94,11 +94,11 @@ def get_inquire_sessions():def create_inquire_session():"""Create a new inquire session with filters."""if not ENABLE_INQUIRE_MODE:- return jsonify({'error': 'Inquire mode is not enabled'}), 403+ return jsonify(api_error('inquire_disabled')), 403try:data = request.jsonif not data:- return jsonify({'error': 'No data provided'}), 400+ return jsonify(api_error('no_data_provided')), 400session = InquireSession(user_id=current_user.id,@@ -126,15 +126,15 @@ def create_inquire_session():def inquire_search():"""Perform semantic search within filtered transcriptions."""if not ENABLE_INQUIRE_MODE:- return jsonify({'error': 'Inquire mode is not enabled'}), 403+ return jsonify(api_error('inquire_disabled')), 403try:data = request.jsonif not data:- return jsonify({'error': 'No data provided'}), 400+ return jsonify(api_error('no_data_provided')), 400query = data.get('query')if not query:- return jsonify({'error': 'No query provided'}), 400+ return jsonify(api_error('no_query_provided')), 400# Build filters from requestfilters = {}@@ -841,21 +841,21 @@ Order your response with notes from the most recent meetings first. Always use pdef inquire_chat():"""Chat with filtered transcriptions using RAG."""if not ENABLE_INQUIRE_MODE:- return jsonify({'error': 'Inquire mode is not enabled'}), 403+ return jsonify(api_error('inquire_disabled')), 403try:data = request.jsonif not data:- return jsonify({'error': 'No data provided'}), 400+ return jsonify(api_error('no_data_provided')), 400user_message = data.get('message')message_history = data.get('message_history', [])if not user_message:- return jsonify({'error': 'No message provided'}), 400+ return jsonify(api_error('no_message_provided')), 400# Check if OpenRouter client is availableif client is None:- return jsonify({'error': 'Chat service is not available (OpenRouter client not configured)'}), 503+ return jsonify(api_error('chat_openrouter_not_configured')), 503return Response(inquire_stream(current_user, data), mimetype='text/event-stream')@@ -870,7 +870,7 @@ def inquire_chat():def get_available_filters():"""Get available filter options for the user (includes shared recordings)."""if not ENABLE_INQUIRE_MODE:- return jsonify({'error': 'Inquire mode is not enabled'}), 403+ return jsonify(api_error('inquire_disabled')), 403try:# Get user's personal tagsuser_tags = Tag.query.filter_by(user_id=current_user.id, group_id=None).all()diff --git a/src/api/naming_templates.py b/src/api/naming_templates.pyindex 88e2f3c4..f73ef49f 100644--- a/src/api/naming_templates.py+++ b/src/api/naming_templates.py@@ -13,6 +13,7 @@ from flask_login import login_required, current_userfrom src.database import dbfrom src.models import NamingTemplate+from src.utils.localization import api_error, translate# Create blueprintnaming_templates_bp = Blueprint('naming_templates', __name__)@@ -34,20 +35,20 @@ def create_naming_template():"""Create a new naming template."""data = request.jsonif not data or not data.get('name') or not data.get('template'):- return jsonify({'error': 'Name and template are required'}), 400+ return jsonify(api_error('name_and_template_required')), 400# Validate regex patterns if providedregex_patterns = data.get('regex_patterns', {})if regex_patterns:if not isinstance(regex_patterns, dict):- return jsonify({'error': 'regex_patterns must be a dictionary'}), 400+ return jsonify(api_error('invalid_regex_patterns')), 400# Validate each regex patternimport refor var_name, pattern in regex_patterns.items():try:re.compile(pattern)except re.error as e:- return jsonify({'error': f'Invalid regex pattern for "{var_name}": {str(e)}'}), 400+ return jsonify(api_error('invalid_regex_pattern', variable=var_name, detail=str(e))), 400# If this is set as default, unset other defaultsif data.get('is_default'):@@ -81,7 +82,7 @@ def get_naming_template(template_id):).first()if not template:- return jsonify({'error': 'Template not found'}), 404+ return jsonify(api_error('template_not_found')), 404return jsonify(template.to_dict())@@ -96,24 +97,24 @@ def update_naming_template(template_id):).first()if not template:- return jsonify({'error': 'Template not found'}), 404+ return jsonify(api_error('template_not_found')), 404data = request.jsonif not data:- return jsonify({'error': 'No data provided'}), 400+ return jsonify(api_error('no_data_provided')), 400# Validate regex patterns if providedif 'regex_patterns' in data:regex_patterns = data['regex_patterns']if regex_patterns:if not isinstance(regex_patterns, dict):- return jsonify({'error': 'regex_patterns must be a dictionary'}), 400+ return jsonify(api_error('invalid_regex_patterns')), 400import refor var_name, pattern in regex_patterns.items():try:re.compile(pattern)except re.error as e:- return jsonify({'error': f'Invalid regex pattern for "{var_name}": {str(e)}'}), 400+ return jsonify(api_error('invalid_regex_pattern', variable=var_name, detail=str(e))), 400# If this is set as default, unset other defaultsif data.get('is_default'):@@ -148,15 +149,13 @@ def delete_naming_template(template_id):).first()if not template:- return jsonify({'error': 'Template not found'}), 404+ return jsonify(api_error('template_not_found')), 404# Check if any tags are using this templatefrom src.models import Tagtags_using = Tag.query.filter_by(naming_template_id=template_id).count()if tags_using > 0:- return jsonify({- 'error': f'Cannot delete template: {tags_using} tag(s) are using this template'- }), 400+ return jsonify(api_error('template_in_use', count=tags_using)), 400db.session.delete(template)db.session.commit()@@ -171,7 +170,7 @@ def create_default_naming_templates():existing_templates = NamingTemplate.query.filter_by(user_id=current_user.id).count()if existing_templates > 0:- return jsonify({'message': 'User already has naming templates'}), 200+ return jsonify({'message': translate('server.apiMessage.userAlreadyHasNamingTemplates')}), 200templates = []@@ -260,7 +259,7 @@ def test_naming_template(template_id):).first()if not template:- return jsonify({'error': 'Template not found'}), 404+ return jsonify(api_error('template_not_found')), 404data = request.json or {}sample_filename = data.get('filename', 'sample-recording-2026-01-15.mp3')@@ -326,7 +325,7 @@ def set_default_naming_template():).first()if not template:- return jsonify({'error': 'Template not found'}), 404+ return jsonify(api_error('template_not_found')), 404current_user.default_naming_template_id = template_id if template_id else Nonedb.session.commit()diff --git a/src/api/notifications.py b/src/api/notifications.pyindex 2d115536..6278206b 100644--- a/src/api/notifications.py+++ b/src/api/notifications.py@@ -9,6 +9,7 @@ from flask import Blueprint, jsonify, requestfrom flask_login import login_required, current_userfrom src.services import notifications as notification_service+from src.utils.localization import api_errornotifications_bp = Blueprint('notifications', __name__)@@ -42,7 +43,7 @@ def mark_notifications_read():data = request.get_json(silent=True) or {}ids = data.get('ids')if ids is not None and not isinstance(ids, list):- return jsonify({'error': 'ids must be a list'}), 400+ return jsonify(api_error('invalid_ids_list')), 400marked = notification_service.mark_read(current_user, ids)return jsonify({@@ -60,7 +61,7 @@ def dismiss_notification(notification_id):is not something to confirm to a user who does not own it."""if not notification_service.dismiss(current_user, notification_id):- return jsonify({'error': 'Notification not found'}), 404+ return jsonify(api_error('notification_not_found')), 404return jsonify({'dismissed': notification_id,'unread_count': notification_service.unread_count(current_user),diff --git a/src/api/push_notifications.py b/src/api/push_notifications.pyindex d7521b69..ad567f20 100644--- a/src/api/push_notifications.py+++ b/src/api/push_notifications.py@@ -7,6 +7,7 @@ from flask_login import login_required, current_userfrom src.database import dbfrom src.models.push_subscription import PushSubscriptionimport json+from src.utils.localization import api_error, translatepush_bp = Blueprint('push', __name__)@@ -54,7 +55,7 @@ def subscribe():if not config['enabled']:return jsonify({'success': False,- 'error': 'Push notifications not available'+ **api_error('push_unavailable')}), 503try:@@ -63,7 +64,7 @@ def subscribe():if not subscription_data or 'endpoint' not in subscription_data:return jsonify({'success': False,- 'error': 'Invalid subscription data'+ **api_error('invalid_subscription_data')}), 400# Check if subscription already exists@@ -75,7 +76,7 @@ def subscribe():if existing:return jsonify({'success': True,- 'message': 'Already subscribed',+ 'message': translate('server.apiMessage.alreadySubscribed'),'subscription_id': existing.id})@@ -92,7 +93,7 @@ def subscribe():return jsonify({'success': True,- 'message': 'Subscription saved',+ 'message': translate('server.apiMessage.subscriptionSaved'),'subscription_id': subscription.id})@@ -101,7 +102,7 @@ def subscribe():current_app.logger.error(f"[Push] Subscription error: {e}", exc_info=True)return jsonify({'success': False,- 'error': 'An unexpected error occurred'+ **api_error('unexpected_error')}), 500@@ -111,7 +112,7 @@ def unsubscribe():"""Remove push subscription for current user"""config = _get_vapid_config()if not config['enabled']:- return jsonify({'success': True, 'message': 'Push notifications not enabled'})+ return jsonify({'success': True, 'message': translate('server.apiMessage.pushNotificationsNotEnabled')})try:subscription_data = request.json@@ -119,7 +120,7 @@ def unsubscribe():if not subscription_data or 'endpoint' not in subscription_data:return jsonify({'success': False,- 'error': 'Invalid subscription data'+ **api_error('invalid_subscription_data')}), 400subscription = PushSubscription.query.filter_by(@@ -132,12 +133,12 @@ def unsubscribe():db.session.commit()return jsonify({'success': True,- 'message': 'Subscription removed'+ 'message': translate('server.apiMessage.subscriptionRemoved')})return jsonify({'success': False,- 'error': 'Subscription not found'+ **api_error('subscription_not_found')}), 404except Exception as e:@@ -145,7 +146,7 @@ def unsubscribe():current_app.logger.error(f"[Push] Unsubscribe error: {e}", exc_info=True)return jsonify({'success': False,- 'error': 'An unexpected error occurred'+ **api_error('unexpected_error')}), 500diff --git a/src/api/recording_sessions.py b/src/api/recording_sessions.pyindex ed59ffca..488186bb 100644--- a/src/api/recording_sessions.py+++ b/src/api/recording_sessions.py@@ -65,6 +65,7 @@ from src.database import dbfrom src.models import RecordingSession, Recording, User, RECORDING_SESSION_STATUSESfrom src.services.job_queue import job_queuefrom src.services.recording_stitch import byte_join, session_chunk_paths+from src.utils.localization import api_errorrecording_sessions_bp = Blueprint('recording_sessions', __name__)@@ -150,11 +151,11 @@ def _commit_batch_size():def _ensure_owned(session):"""Return None if ok, otherwise a Flask response tuple."""if not session:- return jsonify({'error': 'Session not found'}), 404+ return jsonify(api_error('session_not_found')), 404if session.user_id != current_user.id:# 404 instead of 403 so the existence of other users' sessions is# not leaked to the caller.- return jsonify({'error': 'Session not found'}), 404+ return jsonify(api_error('session_not_found')), 404return None@@ -321,7 +322,7 @@ def _replay_finalize_response(session):existing = (db.session.get(Recording, session.finalized_recording_id)if session.finalized_recording_id else None)if existing is None or existing.user_id != current_user.id:- return jsonify({'error': 'Session was already finalized and its recording no longer exists'}), 409+ return jsonify(api_error('session_recording_gone')), 409if existing.status == 'STITCHING':try:@@ -367,26 +368,26 @@ def create_session():if upload_filename:if len(upload_filename) > 255:- return jsonify({'error': 'filename must be 255 characters or fewer'}), 400+ return jsonify(api_error('filename_too_long')), 400try:total_bytes = int(data.get('total_bytes'))except (TypeError, ValueError):- return jsonify({'error': 'total_bytes is required for a sliced upload'}), 400+ return jsonify(api_error('total_bytes_required')), 400if total_bytes <= 0:- return jsonify({'error': 'total_bytes must be a positive integer'}), 400+ return jsonify(api_error('invalid_total_bytes')), 400mime_type = declared_mime or 'application/octet-stream'else:mime_type = declared_mime or 'audio/webm'if mime_type not in _allowed_mime_types():return jsonify({- 'error': f'Unsupported mime_type {mime_type!r}',+ **api_error('unsupported_mime_type', mimeType=mime_type),'allowed': sorted(_allowed_mime_types()),}), 400# Per-user quota check before we let them open another session.if _user_bytes_in_progress(current_user.id) >= _max_bytes_per_user():return jsonify({- 'error': 'Per-user in-progress recording storage quota exhausted',+ **api_error('session_quota_exhausted'),'quota_bytes': _max_bytes_per_user(),}), 507 # Insufficient Storage@@ -417,7 +418,7 @@ def create_session():db.session.delete(session)db.session.commit()current_app.logger.error(f"Could not create session dir: {e}")- return jsonify({'error': 'Server could not allocate session storage'}), 500+ return jsonify(api_error('session_storage_allocation_failed')), 500expires_at = session.created_at + timedelta(hours=_ttl_hours())return jsonify({@@ -463,7 +464,7 @@ def upload_chunk(session_id, chunk_index):if session.status != 'recording':return jsonify({- 'error': f'Session is in status {session.status!r}; chunks are no longer accepted',+ **api_error('session_not_accepting_chunks', status=session.status),}), 409expected_index = session.chunk_count + 1@@ -481,7 +482,7 @@ def upload_chunk(session_id, chunk_index):except Exception:passreturn jsonify({- 'error': 'Out-of-order chunk',+ **api_error('chunk_out_of_order'),'expected_chunk_index': expected_index,'got': chunk_index,}), 409@@ -495,11 +496,11 @@ def upload_chunk(session_id, chunk_index):chunk_bytes = request.get_data(cache=False)if not chunk_bytes:- return jsonify({'error': 'Empty chunk body'}), 400+ return jsonify(api_error('chunk_empty')), 400if len(chunk_bytes) > _max_chunk_bytes():return jsonify({- 'error': 'Chunk exceeds max_chunk_bytes',+ **api_error('chunk_too_large'),'max_chunk_bytes': _max_chunk_bytes(),'got': len(chunk_bytes),}), 413@@ -516,7 +517,7 @@ def upload_chunk(session_id, chunk_index):projected = _user_bytes_in_progress(current_user.id) - session.bytes_received + session.bytes_received + len(chunk_bytes)if projected > _max_bytes_per_user():return jsonify({- 'error': 'Per-user in-progress recording storage quota would be exceeded',+ **api_error('session_quota_would_exceed'),'quota_bytes': _max_bytes_per_user(),}), 507@@ -528,7 +529,7 @@ def upload_chunk(session_id, chunk_index):f.write(chunk_bytes)except OSError as e:current_app.logger.error(f"Could not write chunk {chunk_index} for session {session_id}: {e}")- return jsonify({'error': 'Server could not write chunk'}), 500+ return jsonify(api_error('chunk_write_failed')), 500session.chunk_count = chunk_indexsession.bytes_received = (session.bytes_received or 0) + len(chunk_bytes)@@ -573,12 +574,12 @@ def finalize_session(session_id):if session.is_sliced_upload:return jsonify({- 'error': 'Session is a sliced file upload; finalize it with /finalize-upload',+ **api_error('session_is_sliced_upload'),}), 409if session.status not in ('recording', 'finalizing'):return jsonify({- 'error': f'Session is in status {session.status!r}; cannot finalize',+ **api_error('session_cannot_finalize', status=session.status),}), 409# Idempotent replay: the session is already finalizing, so a recording@@ -588,11 +589,11 @@ def finalize_session(session_id):return _replay_finalize_response(session)if session.chunk_count <= 0:- return jsonify({'error': 'No chunks uploaded yet'}), 409+ return jsonify(api_error('no_chunks_uploaded')), 409metadata = request.get_json(silent=True) or {}if not isinstance(metadata, dict):- return jsonify({'error': 'finalize body must be a JSON object'}), 400+ return jsonify(api_error('invalid_finalize_body')), 400# Create a placeholder Recording row. The stitch worker will fill in# audio_path and file_size after concat completes.@@ -614,16 +615,16 @@ def finalize_session(session_id):from src.models.organization import Folder, GroupMembershiptarget = db.session.get(Folder, folder_id)if not target:- return jsonify({'error': f'Folder {folder_id} not found'}), 404+ return jsonify(api_error('folder_id_not_found', folderId=folder_id)), 404if target.group_id is None:if target.user_id != current_user.id:- return jsonify({'error': 'No access to target folder'}), 403+ return jsonify(api_error('target_folder_access_denied')), 403else:membership = GroupMembership.query.filter_by(user_id=current_user.id, group_id=target.group_id).first()if not membership:- return jsonify({'error': 'No access to target folder'}), 403+ return jsonify(api_error('target_folder_access_denied')), 403resolved_folder_id = target.id# Create the placeholder Recording, flip the session to finalizing, and@@ -724,7 +725,7 @@ def finalize_sliced_upload(session_id):if not session.is_sliced_upload:return jsonify({- 'error': 'Session is a recorder session; finalize it with /finalize',+ **api_error('session_is_recorder'),}), 409if session.status == 'finalized':@@ -732,7 +733,7 @@ def finalize_sliced_upload(session_id):if session.status not in ('recording', 'finalizing'):return jsonify({- 'error': f'Session is in status {session.status!r}; cannot finalize',+ **api_error('session_cannot_finalize', status=session.status),}), 409now = datetime.utcnow()@@ -749,7 +750,7 @@ def finalize_sliced_upload(session_id):).update({'status': 'finalizing', 'last_seen_at': now}, synchronize_session=False)if not claimed:db.session.rollback()- return jsonify({'error': 'Session is already being finalized'}), 409+ return jsonify(api_error('session_already_finalizing')), 409db.session.commit()dir_path = _session_dir(session.id)@@ -761,7 +762,7 @@ def finalize_sliced_upload(session_id):f'expected {session.upload_total_bytes}'))return jsonify({- 'error': 'Uploaded slices do not add up to the declared file size',+ **api_error('slice_size_mismatch'),'received_bytes': slice_bytes,'expected_bytes': session.upload_total_bytes,}), 409@@ -773,7 +774,7 @@ def finalize_sliced_upload(session_id):except OSError as e:current_app.logger.error(f"Could not join slices for session {session_id}: {e}")_fail_sliced_upload(session, f'Could not reassemble slices: {e}')- return jsonify({'error': 'Server could not reassemble the uploaded slices'}), 500+ return jsonify(api_error('slice_reassembly_failed')), 500from src.api.recordings import ingest_uploaded_recordingresult = ingest_uploaded_recording(@@ -823,7 +824,7 @@ def _replay_sliced_upload_response(session):'total': count, 'idempotent_replay': True}), 202if existing is None or existing.user_id != current_user.id:return jsonify({- 'error': 'Session was already finalized and its recording no longer exists',+ **api_error('session_recording_gone'),}), 409response_data = existing.to_dict(viewer_user=current_user)response_data['idempotent_replay'] = True@@ -861,10 +862,10 @@ def abort_session(session_id):return errif session.status == 'finalized':- return jsonify({'error': 'Session already finalized'}), 409+ return jsonify(api_error('session_already_finalized')), 409if session.status == 'finalizing' and session.is_sliced_upload:- return jsonify({'error': 'Session is being finalized'}), 409+ return jsonify(api_error('session_finalizing')), 409session.status = 'aborted'session.last_seen_at = datetime.utcnow()diff --git a/src/api/recordings.py b/src/api/recordings.pyindex a9327d48..3fc19853 100644--- a/src/api/recordings.py+++ b/src/api/recordings.py@@ -42,7 +42,7 @@ from src.services.transcription_defaults import (from src.tasks.processing import format_transcription_for_llm, _resolve_timestamp_template_formatfrom src.utils.dates import to_utc_naivefrom src.utils.ffmpeg_utils import (- AUDIO_DECODE_FAILED_MESSAGE, FFmpegError, FFmpegNotFoundError, FFmpegTimeoutError,+ FFmpegError, FFmpegNotFoundError, FFmpegTimeoutError,)from src.utils.titles import resolve_upload_title, upload_title_sourcefrom src.services.speaker import (@@ -65,6 +65,7 @@ from src.utils.ffprobe import (from src.utils.audio_conversion import convert_if_neededfrom src.services.storage import get_storage_servicefrom src.utils.file_hash import compute_file_sha256+from src.utils.localization import api_error, format_number, translate# Create blueprintrecordings_bp = Blueprint('recordings', __name__)@@ -216,13 +217,13 @@ def download_transcript_with_template(recording_id):recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user):- return jsonify({'error': 'You do not have permission to access this recording'}), 403+ return jsonify(api_error('recording_access_denied')), 403if not recording.transcription:- return jsonify({'error': 'No transcription available for this recording'}), 400+ return jsonify(api_error('no_transcription_for_recording')), 400# Get template ID from query paramstemplate_id = request.args.get('template_id', type=int)@@ -360,7 +361,7 @@ def download_transcript_with_template(recording_id):except Exception as e:current_app.logger.error(f"Error downloading transcript: {e}")- return jsonify({'error': 'Failed to generate transcript download'}), 500+ return jsonify(api_error('transcript_download_failed')), 500@@ -377,13 +378,13 @@ def download_summary_word(recording_id):recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user):- return jsonify({'error': 'You do not have permission to access this recording'}), 403+ return jsonify(api_error('recording_access_denied')), 403if not recording.summary:- return jsonify({'error': 'No summary available for this recording'}), 400+ return jsonify(api_error('no_summary')), 400# Create Word documentdoc = Document()@@ -474,7 +475,7 @@ def download_summary_word(recording_id):except Exception as e:current_app.logger.error(f"Error generating summary Word document: {e}")- return jsonify({'error': 'Failed to generate Word document'}), 500+ return jsonify(api_error('word_document_failed')), 500@@ -490,19 +491,19 @@ def download_chat_word(recording_id):recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user):- return jsonify({'error': 'You do not have permission to access this recording'}), 403+ return jsonify(api_error('recording_access_denied')), 403# Get chat messages from requestdata = request.jsonif not data or 'messages' not in data:- return jsonify({'error': 'No messages provided'}), 400+ return jsonify(api_error('no_messages_provided')), 400messages = data['messages']if not messages:- return jsonify({'error': 'No messages to download'}), 400+ return jsonify(api_error('no_messages_to_download')), 400# Create Word documentdoc = Document()@@ -615,7 +616,7 @@ def download_chat_word(recording_id):except Exception as e:current_app.logger.error(f"Error generating chat Word document: {e}")- return jsonify({'error': 'Failed to generate Word document'}), 500+ return jsonify(api_error('word_document_failed')), 500@@ -631,13 +632,13 @@ def download_notes_word(recording_id):recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user):- return jsonify({'error': 'You do not have permission to access this recording'}), 403+ return jsonify(api_error('recording_access_denied')), 403if not recording.notes:- return jsonify({'error': 'No notes available for this recording'}), 400+ return jsonify(api_error('no_notes')), 400# Create Word documentdoc = Document()@@ -727,7 +728,7 @@ def download_notes_word(recording_id):except Exception as e:current_app.logger.error(f"Error generating notes Word document: {e}")- return jsonify({'error': 'Failed to generate Word document'}), 500+ return jsonify(api_error('word_document_failed')), 500@@ -745,7 +746,7 @@ def export_existing_recordings():from src.file_exporter import ENABLE_AUTO_EXPORT, export_recordingif not ENABLE_AUTO_EXPORT:- return jsonify({'error': 'Auto-export is not enabled on this server'}), 400+ return jsonify(api_error('auto_export_disabled')), 400try:# Candidate recordings: owned by the user and holding exportable content.@@ -781,7 +782,7 @@ def export_existing_recordings():except Exception as e:current_app.logger.error(f"Error during bulk export: {e}")- return jsonify({'error': 'Failed to export recordings'}), 500+ return jsonify(api_error('recordings_export_failed')), 500@recordings_bp.route('/api/recordings/merge', methods=['POST'])@@ -810,12 +811,12 @@ def merge_recordings_endpoint():raw_ids = data.get('recording_ids')if not isinstance(raw_ids, list) or len(raw_ids) < 2:- return jsonify({'error': 'Select at least two recordings to merge'}), 400+ return jsonify(api_error('merge_needs_two')), 400try:recording_ids = [int(rid) for rid in raw_ids]except (ValueError, TypeError):- return jsonify({'error': 'Invalid recording ids'}), 400+ return jsonify(api_error('invalid_recording_ids')), 400title = data.get('title')delete_originals = bool(data.get('delete_originals', False))@@ -865,7 +866,7 @@ def merge_recordings_endpoint():return jsonify({'error': str(e)}), 400except Exception as e:current_app.logger.error(f"Error merging recordings: {e}")- return jsonify({'error': 'Failed to merge recordings'}), 500+ return jsonify(api_error('merge_failed')), 500return jsonify({'success': True,@@ -888,26 +889,26 @@ def generate_summary_endpoint(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'You do not have permission to generate summary for this recording'}), 403+ return jsonify(api_error('summary_generate_denied')), 403# Check if transcription existsif not recording.transcription or len(recording.transcription.strip()) < 10:- return jsonify({'error': 'No valid transcription available for summary generation'}), 400+ return jsonify(api_error('no_transcription_for_summary')), 400# Check if transcription is an error message (not actual content)if is_transcription_error(recording.transcription):- return jsonify({'error': 'Cannot generate summary: transcription failed. Please reprocess the transcription first.'}), 400+ return jsonify(api_error('summary_blocked_transcription_failed')), 400# Check if already processingif recording.status in ['PROCESSING', 'SUMMARIZING']:- return jsonify({'error': 'Recording is already being processed'}), 400+ return jsonify(api_error('recording_already_processing')), 400# Check if OpenRouter client is availableif client is None:- return jsonify({'error': 'Summary service is not available (OpenRouter client not configured)'}), 503+ return jsonify(api_error('summary_openrouter_not_configured')), 503# Optional custom prompt + mode (issue / discussion #253)data = request.get_json(silent=True) or {}@@ -938,7 +939,7 @@ def generate_summary_endpoint(recording_id):return jsonify({'success': True,- 'message': 'Summary generation queued'+ 'message': translate('server.apiMessage.summaryGenerationQueued')})except Exception as e:@@ -955,17 +956,17 @@ def update_speakers(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'You do not have permission to edit this recording'}), 403+ return jsonify(api_error('recording_edit_denied')), 403data = request.jsonspeaker_map = data.get('speaker_map')regenerate_summary = data.get('regenerate_summary', False)if speaker_map is None:- return jsonify({'error': 'No speaker map provided'}), 400+ return jsonify(api_error('no_speaker_map')), 400# Same rename and follow-up steps as API v1 /speakers/assign (#412).from src.services.speaker_assignment import apply_speaker_names@@ -977,7 +978,7 @@ def update_speakers(recording_id):enrich_recording_dict_with_user_status(recording_dict, recording, current_user)return jsonify({'success': True,- 'message': 'Speakers updated successfully.',+ 'message': translate('server.apiMessage.speakersUpdated'),'recording': recording_dict,'summary_queued': summary_queued})@@ -996,10 +997,10 @@ def update_transcript(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'You do not have permission to edit this recording'}), 403+ return jsonify(api_error('recording_edit_denied')), 403data = request.jsontranscript_data = data.get('transcript_data')@@ -1007,7 +1008,7 @@ def update_transcript(recording_id):regenerate_summary = data.get('regenerate_summary', False)if not transcript_data or not isinstance(transcript_data, list):- return jsonify({'error': 'Invalid transcript data provided'}), 400+ return jsonify(api_error('invalid_transcript_data')), 400# Apply the names exactly as update_speakers does, including the voice# profiles and snippets: this route saves the names whenever the user@@ -1055,7 +1056,7 @@ def update_transcript(recording_id):enrich_recording_dict_with_user_status(recording_dict, recording, current_user)return jsonify({'success': True,- 'message': 'Transcript updated successfully.',+ 'message': translate('server.apiMessage.transcriptUpdated'),'recording': recording_dict,'summary_queued': summary_queued})@@ -1075,38 +1076,41 @@ def auto_identify_speakers(recording_id):Strips existing names and re-identifies all speakers from scratch."""from src.services.speaker_identification import identify_speakers_from_transcript+ from src.services.llm import LLMNotConfiguredErrortry:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user):- return jsonify({'error': 'You do not have permission to modify this recording'}), 403+ return jsonify(api_error('recording_modify_denied')), 403if not recording.transcription:- return jsonify({'error': 'No transcription available for speaker identification'}), 400+ return jsonify(api_error('no_transcription_for_identification')), 400try:transcription_data = json.loads(recording.transcription)except (json.JSONDecodeError, TypeError):- return jsonify({'error': 'Transcription format not supported for auto-identification'}), 400+ return jsonify(api_error('transcription_format_unsupported_for_identification')), 400if not isinstance(transcription_data, list):- return jsonify({'error': 'Transcription format not supported for auto-identification'}), 400+ return jsonify(api_error('transcription_format_unsupported_for_identification')), 400speaker_map = identify_speakers_from_transcript(transcription_data, current_user.id)if not speaker_map:- return jsonify({'error': 'No speakers found in transcription'}), 400+ return jsonify(api_error('no_speakers_in_transcription')), 400return jsonify({'success': True, 'speaker_map': speaker_map})+ except LLMNotConfiguredError:+ return jsonify(api_error('text_model_not_configured')), 503except ValueError as ve:return jsonify({'error': str(ve)}), 503except Exception as e:current_app.logger.error(f"Error during auto speaker identification for recording {recording_id}: {e}", exc_info=True)- return jsonify({'error': f'An unexpected error occurred: {str(e)}'}), 500+ return jsonify(api_error('unexpected_error_detail', detail=str(e))), 500# --- Chat with Transcription ---@@ -1118,10 +1122,10 @@ def reprocess_transcription(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'You do not have permission to reprocess this recording'}), 403+ return jsonify(api_error('recording_reprocess_denied')), 403# Checks, clearing and settings are shared with every reprocess path (#412).from src.services.reprocessing import queue_transcription_reprocess, ReprocessError@@ -1138,7 +1142,7 @@ def reprocess_transcription(recording_id):try:queue_transcription_reprocess(recording, current_user, overrides)except ReprocessError as e:- return jsonify({'error': e.message}), e.status+ return jsonify(api_error(e.code)), e.statuscurrent_app.logger.info(f"Queued transcription reprocessing for recording {recording_id}")# Get queue position for response@@ -1150,7 +1154,7 @@ def reprocess_transcription(recording_id):enrich_recording_dict_with_user_status(recording_dict, recording, current_user)return jsonify({'success': True,- 'message': 'Transcription reprocessing queued',+ 'message': translate('server.apiMessage.transcriptionReprocessingQueued'),'recording': recording_dict,'queue_position': queue_position,'queue_status': queue_status@@ -1171,10 +1175,10 @@ def reprocess_summary(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'You do not have permission to reprocess this recording'}), 403+ return jsonify(api_error('recording_reprocess_denied')), 403# Checks, clearing and job parameters are shared with every reprocess# path, including API v1 and the bulk action (#412).@@ -1186,7 +1190,7 @@ def reprocess_summary(recording_id):prompt_mode=data.get('prompt_mode'),prompt_variables=data.get('prompt_variables'))except ReprocessError as e:- return jsonify({'error': e.message}), e.status+ return jsonify(api_error(e.code)), e.statuscurrent_app.logger.info(f"Queued summary reprocessing for recording {recording_id}")# Refresh recording to get updated status@@ -1197,7 +1201,7 @@ def reprocess_summary(recording_id):enrich_recording_dict_with_user_status(recording_dict, recording, current_user)return jsonify({'success': True,- 'message': 'Summary reprocessing started',+ 'message': translate('server.apiMessage.summaryReprocessingStarted'),'recording': recording_dict})@@ -1215,10 +1219,10 @@ def regenerate_title(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'You do not have permission to edit this recording'}), 403+ return jsonify(api_error('recording_edit_denied')), 403# Same title step as processing (naming template, AI title, fallbacks), so# regenerating gives the title the pipeline would give (#412). The checks@@ -1226,17 +1230,17 @@ def regenerate_title(recording_id):from src.services.titling import compute_title, needs_ai_titleif needs_ai_title(recording):if not recording.transcription or len(recording.transcription.strip()) < 10:- return jsonify({'error': 'No valid transcription available for title generation'}), 400+ return jsonify(api_error('no_transcription_for_title')), 400if is_transcription_error(recording.transcription):- return jsonify({'error': 'Cannot generate title: transcription failed. Please reprocess the transcription first.'}), 400+ return jsonify(api_error('title_blocked_transcription_failed')), 400if client is None:- return jsonify({'error': 'Title generation service is not available (OpenRouter client not configured)'}), 503+ return jsonify(api_error('title_openrouter_not_configured')), 503new_title = compute_title(recording, raise_budget_errors=True)if not new_title:- return jsonify({'error': 'Failed to generate a title'}), 500+ return jsonify(api_error('title_generation_failed')), 500recording.title = new_titlerecording.title_source = 'auto'@@ -1268,10 +1272,10 @@ def reset_status(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'You do not have permission to modify this recording'}), 403+ return jsonify(api_error('recording_modify_denied')), 403# Allow resetting if it's stuck or failed. QUEUED is included for a# recording whose job never ran: reprocess refuses it as "already@@ -1291,9 +1295,9 @@ def reset_status(recording_id):# Return recording with per-user statusrecording_dict = recording.to_dict(viewer_user=current_user)enrich_recording_dict_with_user_status(recording_dict, recording, current_user)- return jsonify({'success': True, 'message': 'Recording status has been reset.', 'recording': recording_dict})+ return jsonify({'success': True, 'message': translate('server.apiMessage.recordingStatusReset'), 'recording': recording_dict})else:- return jsonify({'error': f'Recording is not in a state that can be reset. Current status: {recording.status}'}), 400+ return jsonify(api_error('recording_not_resettable', status=recording.status)), 400except Exception as e:db.session.rollback()@@ -1873,18 +1877,18 @@ def save_metadata():try:data = request.jsonif not data:- return jsonify({'error': 'No data provided'}), 400+ return jsonify(api_error('no_data_provided')), 400recording_id = data.get('id')if not recording_id:- return jsonify({'error': 'No recording ID provided'}), 400+ return jsonify(api_error('no_recording_id')), 400recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404# Check if user has at least view accessif not has_recording_access(recording, current_user, require_edit=False):- return jsonify({'error': 'You do not have permission to access this recording'}), 403+ return jsonify(api_error('recording_access_denied')), 403# Handle notes separately - no edit permission required (user-specific)if 'notes' in data:@@ -1921,7 +1925,7 @@ def save_metadata():# If edit fields are present, check for edit permissionif requires_edit and not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'You do not have permission to edit this recording'}), 403+ return jsonify(api_error('recording_edit_denied')), 403# Update fields requiring edit permissionif requires_edit:@@ -1981,7 +1985,7 @@ def save_metadata():except Exception as e:db.session.rollback()current_app.logger.error(f"Error saving metadata for recording {data.get('id')}: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred while saving.'}), 500+ return jsonify(api_error('unexpected_error_saving')), 500@recordings_bp.route('/recording/<int:recording_id>/update_transcription', methods=['POST'])@@ -1991,16 +1995,16 @@ def update_transcription(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'You do not have permission to edit this recording'}), 403+ return jsonify(api_error('recording_edit_denied')), 403data = request.jsonnew_transcription = data.get('transcription')if new_transcription is None:- return jsonify({'error': 'No transcription data provided'}), 400+ return jsonify(api_error('no_transcription_data')), 400# The incoming data could be a JSON string (from ASR edit) or plain textrecording.transcription = new_transcription@@ -2017,12 +2021,12 @@ def update_transcription(recording_id):# Return recording with per-user statusrecording_dict = recording.to_dict(viewer_user=current_user)enrich_recording_dict_with_user_status(recording_dict, recording, current_user)- return jsonify({'success': True, 'message': 'Transcription updated successfully.', 'recording': recording_dict})+ return jsonify({'success': True, 'message': translate('server.apiMessage.transcriptionUpdated'), 'recording': recording_dict})except Exception as e:db.session.rollback()current_app.logger.error(f"Error updating transcription for recording {recording_id}: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred while updating the transcription.'}), 500+ return jsonify(api_error('unexpected_error_updating_transcription')), 500# Toggle inbox status endpoint@@ -2033,11 +2037,11 @@ def toggle_inbox(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404# Only require view access (not edit) - users can manage their own inbox statusif not has_recording_access(recording, current_user, require_edit=False):- return jsonify({'error': 'You do not have permission to view this recording'}), 403+ return jsonify(api_error('recording_view_denied')), 403# Get current status and toggle itcurrent_inbox, current_highlighted = get_user_recording_status(recording, current_user)@@ -2047,7 +2051,7 @@ def toggle_inbox(recording_id):except Exception as e:db.session.rollback()current_app.logger.error(f"Error toggling inbox status for recording {recording_id}: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred.'}), 500+ return jsonify(api_error('unexpected_error')), 500# Toggle highlighted status endpoint@@ -2058,11 +2062,11 @@ def toggle_highlight(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404# Only require view access (not edit) - users can manage their own highlight statusif not has_recording_access(recording, current_user, require_edit=False):- return jsonify({'error': 'You do not have permission to view this recording'}), 403+ return jsonify(api_error('recording_view_denied')), 403# Get current status and toggle itcurrent_inbox, current_highlighted = get_user_recording_status(recording, current_user)@@ -2072,7 +2076,7 @@ def toggle_highlight(recording_id):except Exception as e:db.session.rollback()current_app.logger.error(f"Error toggling highlighted status for recording {recording_id}: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred.'}), 500+ return jsonify(api_error('unexpected_error')), 500@@ -2084,17 +2088,17 @@ def toggle_archive(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404# Like inbox and star, archiving is personal and needs only view access.if not has_recording_access(recording, current_user, require_edit=False):- return jsonify({'error': 'You do not have permission to view this recording'}), 403+ return jsonify(api_error('recording_view_denied')), 403from src.services.recording_state import get_user_archived, set_user_archivednew_value = set_user_archived(recording, current_user, not get_user_archived(recording, current_user))return jsonify({'success': True, 'is_archived': new_value})except Exception as e:db.session.rollback()current_app.logger.error(f"Error toggling archive for recording {recording_id}: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred.'}), 500+ return jsonify(api_error('unexpected_error')), 500@recordings_bp.route('/recording/<int:recording_id>/delete_audio', methods=['POST'])@@ -2108,15 +2112,15 @@ def delete_recording_audio(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if recording.user_id and recording.user_id != current_user.id:- return jsonify({'error': 'You do not have permission to delete this recording'}), 403+ return jsonify(api_error('recording_delete_denied')), 403if not USERS_CAN_DELETE and not current_user.is_admin:- return jsonify({'error': 'Only administrators can delete recordings'}), 403+ return jsonify(api_error('recording_delete_admin_only')), 403if recording.audio_deleted_at:- return jsonify({'error': 'The audio has already been removed.'}), 409+ return jsonify(api_error('audio_already_removed')), 409if recording.status not in ('COMPLETED', 'FAILED'):- return jsonify({'error': 'Wait until processing has finished before removing the audio.'}), 409+ return jsonify(api_error('audio_remove_while_processing')), 409from src.services.retention import remove_recording_audioremove_recording_audio(recording)@@ -2128,7 +2132,7 @@ def delete_recording_audio(recording_id):except Exception as e:db.session.rollback()current_app.logger.error(f"Error removing audio for recording {recording_id}: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred.'}), 500+ return jsonify(api_error('unexpected_error')), 500# Shares per signed-in user (#435): a forced share from another page cannot@@ -2234,9 +2238,6 @@ def upload_file():)-EMPTY_FILE_MESSAGE = 'The uploaded file is empty.'--def _discard_staging(path):"""Remove an upload's staging copy when the upload fails.@@ -2276,13 +2277,13 @@ def ingest_uploaded_recording(filepath = Nonetry:if uploaded_file is None:- return jsonify({'error': 'No file provided'}), 400+ return jsonify(api_error('no_file_provided')), 400file = uploaded_fileif not original_filename:original_filename = file.filenameif not original_filename:- return jsonify({'error': 'No file selected'}), 400+ return jsonify(api_error('no_file_selected')), 400# Joining several files into one recording (upload dialog). A retry# of a part whose group was already joined gets that recording.@@ -2408,7 +2409,7 @@ def ingest_uploaded_recording(if os.path.getsize(filepath) == 0:current_app.logger.info(f"Upload refused for user {owner.id}: the file is empty")_discard_staging(filepath)- return jsonify({'error': EMPTY_FILE_MESSAGE, 'code': 'empty_file'}), 400+ return jsonify(api_error('empty_file')), 400# Compute file hash on the ORIGINAL upload before any conversion/compression.# Lossy re-encoding (e.g. FLAC→MP3) produces different bytes each run,@@ -2610,19 +2611,19 @@ def ingest_uploaded_recording(except FFmpegNotFoundError as e:current_app.logger.error(f"FFmpeg not found: {e}")_discard_staging(filepath)- return jsonify({'error': 'Audio conversion tool (FFmpeg) not found on server.'}), 500+ return jsonify(api_error('audio_converter_missing')), 500except FFmpegTimeoutError as e:# A timeout is the server's limit, not proof the file is bad.current_app.logger.error(f"FFmpeg conversion timed out for {filepath}: {e}")_discard_staging(filepath)- return jsonify({'error': 'Audio conversion timed out.',+ return jsonify({'error': translate('server.apiError.audio_conversion_timeout'),'code': 'audio_conversion_timeout'}), 500except FFmpegError as e:# The probe is allowed to fail, so a payload that is not audio# at all is first refused here, as the client's error.current_app.logger.error(f"FFmpeg conversion failed for {filepath}: {e}")_discard_staging(filepath)- return jsonify({'error': AUDIO_DECODE_FAILED_MESSAGE, 'code': 'audio_decode_failed'}), 400+ return jsonify(api_error('audio_decode_failed')), 400# Get final file size (of original or converted file)final_file_size = os.path.getsize(filepath)@@ -2651,12 +2652,9 @@ def ingest_uploaded_recording(f"Rejecting upload.")return jsonify({- 'error': (- f'The extracted audio is {final_file_size / 1024 / 1024:.0f} MB, '- f'larger than the {regular_limit_mb} MB stored-file limit. '- f'Enable chunking in admin settings (ENABLE_CHUNKING=true) or '- f'use a shorter / lower-bitrate source video.'- ),+ **api_error('extracted_audio_too_large',+ size=format_number(final_file_size / 1024 / 1024),+ limit=format_number(regular_limit_mb)),'max_size_mb': float(regular_limit_mb),'extracted_audio_mb': round(final_file_size / 1024 / 1024, 1),'audio_only_mode': True,@@ -2990,7 +2988,7 @@ def ingest_uploaded_recording(f"Upload failed: File too large (>{limit_mb}MB, audio_only={audio_only_mode})")return jsonify({- 'error': f'File too large. Maximum size is {limit_mb:.0f} MB.',+ **api_error('file_too_large_max', maxSize=format_number(limit_mb)),'max_size_mb': limit_mb,'effective_limit_mb': limit_mb,'audio_only_mode': audio_only_mode,@@ -3005,12 +3003,12 @@ def ingest_uploaded_recording(current_app.logger.info("Upload lost a race on a unique key; answering with the earlier recording")return replaycurrent_app.logger.error(f"Error during file upload: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred during upload.'}), 500+ return jsonify(api_error('unexpected_error_upload')), 500except Exception as e:db.session.rollback()_discard_staging(filepath)current_app.logger.error(f"Error during file upload: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred during upload.'}), 500+ return jsonify(api_error('unexpected_error_upload')), 500def _ingest_join_part(owner, join, filepath, storage, now, *, original_filename, file_size,@@ -3071,7 +3069,7 @@ def upload_incognito():"""# Check if incognito mode is enabledif not ENABLE_INCOGNITO_MODE:- return jsonify({'error': 'Incognito mode is not enabled on this server'}), 403+ return jsonify(api_error('incognito_disabled')), 403import tempfilefrom datetime import datetime@@ -3081,11 +3079,11 @@ def upload_incognito():try:if 'file' not in request.files:- return jsonify({'error': 'No file provided'}), 400+ return jsonify(api_error('no_file_provided')), 400file = request.files['file']if file.filename == '':- return jsonify({'error': 'No file selected'}), 400+ return jsonify(api_error('no_file_selected')), 400original_filename = file.filenamesafe_filename = secure_filename(original_filename)@@ -3096,7 +3094,7 @@ def upload_incognito():file.seek(0)if file_size == 0:- return jsonify({'incognito': True, 'error': EMPTY_FILE_MESSAGE, 'code': 'empty_file'}), 400+ return jsonify({'incognito': True, **api_error('empty_file')}), 400# Mirror the regular /upload route's option-B size policy:# video files (by extension) use the larger video cap because@@ -3112,7 +3110,7 @@ def upload_incognito():effective_limit_mb = audio_only_limit_mb if _is_video else regular_limit_mbif file_size > effective_limit_mb * 1024 * 1024:return jsonify({- 'error': f'File too large. Maximum size is {effective_limit_mb} MB.',+ **api_error('file_too_large_max', maxSize=format_number(effective_limit_mb)),'max_size_mb': float(effective_limit_mb),}), 413@@ -3174,15 +3172,19 @@ def upload_incognito():if result.get('error'):current_app.logger.error(f"[Incognito] Transcription failed: {result['error']}")+ # result['error'] is English; a known kind of failure carries+ # error_code and is answered in the interface language (#477).if result.get('error_code') == 'audio_decode_failed':return jsonify({'incognito': True,- 'error': result['error'],- 'code': 'audio_decode_failed',+ **api_error('audio_decode_failed'),}), 400+ error_text = result['error']+ if result.get('error_code') in ('audio_converter_missing', 'audio_conversion_timeout'):+ error_text = translate(f"server.apiError.{result['error_code']}")return jsonify({'incognito': True,- 'error': result['error'],+ 'error': error_text,'error_type': result.get('error_type'),}), 500@@ -3220,7 +3222,7 @@ def upload_incognito():current_app.logger.warning(f"[Incognito] Upload failed: File too large (>{max_size_mb}MB)")return jsonify({'incognito': True,- 'error': f'File too large. Maximum size is {max_size_mb:.0f} MB.',+ **api_error('file_too_large_max', maxSize=format_number(max_size_mb)),'max_size_mb': max_size_mb}), 413@@ -3228,7 +3230,7 @@ def upload_incognito():current_app.logger.error(f"[Incognito] Error during processing: {e}", exc_info=True)return jsonify({'incognito': True,- 'error': 'An unexpected error occurred during processing.'+ **api_error('unexpected_error_processing')}), 500finally:@@ -3251,14 +3253,14 @@ def chat_incognito():"""# Check if incognito mode is enabledif not ENABLE_INCOGNITO_MODE:- return jsonify({'error': 'Incognito mode is not enabled on this server'}), 403+ return jsonify(api_error('incognito_disabled')), 403from src.tasks.processing import format_transcription_for_llmtry:data = request.jsonif not data:- return jsonify({'error': 'No data provided'}), 400+ return jsonify(api_error('no_data_provided')), 400transcription = data.get('transcription')user_message = data.get('message')@@ -3267,13 +3269,13 @@ def chat_incognito():notes = data.get('notes', '')if not transcription:- return jsonify({'error': 'No transcription provided'}), 400+ return jsonify(api_error('no_transcription_provided')), 400if not user_message:- return jsonify({'error': 'No message provided'}), 400+ return jsonify(api_error('no_message_provided')), 400# Check if chat client is availableif chat_client is None:- return jsonify({'error': 'Chat service is not available (chat client not configured)'}), 503+ return jsonify(api_error('chat_client_not_configured')), 503# Same prompt as API v1 chat (src/services/recording_chat.py); the notes# are the ones this user can see.@@ -3306,7 +3308,7 @@ def chat_incognito():# Provide more helpful error message for connection issueserror_msg = str(e).lower()if 'connection' in error_msg or 'connect' in error_msg or 'refused' in error_msg:- yield f"data: {json.dumps({'error': 'Could not connect to LLM server. Please check that your LLM service is running.'})}\n\n"+ yield f"data: {json.dumps(api_error('llm_connection_failed'))}\n\n"else:yield f"data: {json.dumps({'error': str(e)})}\n\n"@@ -3317,8 +3319,8 @@ def chat_incognito():# Provide more helpful error message for connection issueserror_msg = str(e).lower()if 'connection' in error_msg or 'connect' in error_msg or 'refused' in error_msg:- return jsonify({'error': 'Could not connect to LLM server. Please check that your LLM service is running.'}), 503- return jsonify({'error': 'An error occurred during chat'}), 500+ return jsonify(api_error('llm_connection_failed')), 503+ return jsonify(api_error('chat_error')), 500@recordings_bp.route('/api/recordings/incognito/summary', methods=['POST'])@@ -3331,7 +3333,7 @@ def generate_incognito_summary_endpoint():"""# Check if incognito mode is enabledif not ENABLE_INCOGNITO_MODE:- return jsonify({'error': 'Incognito mode is not enabled on this server'}), 403+ return jsonify(api_error('incognito_disabled')), 403from src.tasks.processing import generate_incognito_summaryfrom src.utils import md_to_html@@ -3339,15 +3341,15 @@ def generate_incognito_summary_endpoint():try:data = request.jsonif not data:- return jsonify({'error': 'No data provided'}), 400+ return jsonify(api_error('no_data_provided')), 400transcription = data.get('transcription')if not transcription:- return jsonify({'error': 'No transcription provided'}), 400+ return jsonify(api_error('no_transcription_provided')), 400# Check if LLM client is availableif client is None:- return jsonify({'error': 'Summary service is not available (LLM client not configured)'}), 503+ return jsonify(api_error('summary_llm_not_configured')), 503current_app.logger.info(f"[Incognito Summary] User {current_user.id} requesting summary generation")@@ -3361,15 +3363,15 @@ def generate_incognito_summary_endpoint():'summary_html': summary_html})else:- return jsonify({'error': 'Failed to generate summary. Please check that your LLM service is running.'}), 503+ return jsonify(api_error('summary_generation_failed')), 503except Exception as e:current_app.logger.error(f"[Incognito Summary] Error: {e}", exc_info=True)# Provide more helpful error message for connection issueserror_msg = str(e).lower()if 'connection' in error_msg or 'connect' in error_msg or 'refused' in error_msg:- return jsonify({'error': 'Could not connect to LLM server. Please check that your LLM service is running.'}), 503- return jsonify({'error': f'Failed to generate summary: {str(e)}'}), 500+ return jsonify(api_error('llm_connection_failed')), 503+ return jsonify(api_error('summary_generation_failed_detail', detail=str(e))), 500# Status Endpoint@@ -3381,15 +3383,15 @@ def delete_recording(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404# Check if the recording belongs to the current userif recording.user_id and recording.user_id != current_user.id:- return jsonify({'error': 'You do not have permission to delete this recording'}), 403+ return jsonify(api_error('recording_delete_denied')), 403# Check deletion permissions (admin-only if USERS_CAN_DELETE is false)if not USERS_CAN_DELETE and not current_user.is_admin:- return jsonify({'error': 'Only administrators can delete recordings'}), 403+ return jsonify(api_error('recording_delete_admin_only')), 403# Log embeddings cleanup for Inquire Mode if enabledif ENABLE_INQUIRE_MODE:@@ -3405,7 +3407,7 @@ def delete_recording(recording_id):except Exception as e:db.session.rollback()current_app.logger.error(f"Error deleting recording {recording_id}: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred while deleting.'}), 500+ return jsonify(api_error('unexpected_error_deleting')), 500# --- Inbox and Archive Endpoints ---@@ -3472,7 +3474,7 @@ def get_recording_detail(recording_id):recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404# Check ownership or shared accesshas_access = recording.user_id == current_user.id@@ -3486,7 +3488,7 @@ def get_recording_detail(recording_id):has_access = share is not Noneif not has_access:- return jsonify({'error': 'Access denied'}), 403+ return jsonify(api_error('access_denied')), 403# Return full detail with HTML conversionrec_dict = recording.to_dict(include_html=True, viewer_user=current_user)@@ -3559,10 +3561,10 @@ def get_recording_status_only(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user):- return jsonify({'error': 'You do not have permission to view this recording'}), 403+ return jsonify(api_error('recording_view_denied')), 403# Return the status plus audio_ready so pollers can enable playback the# moment a merge/stitch finishes writing the audio file (#323).@@ -3572,7 +3574,7 @@ def get_recording_status_only(recording_id):})except Exception as e:current_app.logger.error(f"Error fetching status for recording {recording_id}: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred.'}), 500+ return jsonify(api_error('unexpected_error')), 500@recordings_bp.route('/api/recordings/batch-status', methods=['POST'])@@ -3588,15 +3590,15 @@ def get_batch_recording_status():try:data = request.get_json()if not data or 'recording_ids' not in data:- return jsonify({'error': 'recording_ids is required'}), 400+ return jsonify(api_error('recording_ids_required')), 400recording_ids = data['recording_ids']if not isinstance(recording_ids, list):- return jsonify({'error': 'recording_ids must be a list'}), 400+ return jsonify(api_error('invalid_recording_ids_list')), 400# Limit batch size to prevent abuseif len(recording_ids) > 50:- return jsonify({'error': 'Maximum 50 recordings per batch'}), 400+ return jsonify(api_error('batch_limit_50')), 400# Query all recordings at oncerecordings = Recording.query.filter(Recording.id.in_(recording_ids)).all()@@ -3610,7 +3612,7 @@ def get_batch_recording_status():return jsonify({'statuses': statuses})except Exception as e:current_app.logger.error(f"Error fetching batch status: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred.'}), 500+ return jsonify(api_error('unexpected_error')), 500@recordings_bp.route('/api/recordings/job-queue-status', methods=['GET'])@@ -3684,7 +3686,7 @@ def get_job_queue_status():return jsonify({'jobs': job_details})except Exception as e:current_app.logger.error(f"Error fetching job queue status: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred.'}), 500+ return jsonify(api_error('unexpected_error')), 500@recordings_bp.route('/api/recordings/jobs/<int:job_id>/retry', methods=['POST'])@@ -3696,13 +3698,13 @@ def retry_failed_job(job_id):job = db.session.get(ProcessingJob, job_id)if not job:- return jsonify({'error': 'Job not found'}), 404+ return jsonify(api_error('job_not_found')), 404if job.user_id != current_user.id:- return jsonify({'error': 'Access denied'}), 403+ return jsonify(api_error('access_denied')), 403if job.status != 'failed':- return jsonify({'error': 'Only failed jobs can be retried'}), 400+ return jsonify(api_error('job_retry_failed_only')), 400# Reset job for retryjob.status = 'queued'@@ -3713,11 +3715,11 @@ def retry_failed_job(job_id):db.session.commit()current_app.logger.info(f"Job {job_id} queued for retry by user {current_user.id}")- return jsonify({'success': True, 'message': 'Job queued for retry'})+ return jsonify({'success': True, 'message': translate('server.apiMessage.jobQueuedForRetry')})except Exception as e:current_app.logger.error(f"Error retrying job {job_id}: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred.'}), 500+ return jsonify(api_error('unexpected_error')), 500@recordings_bp.route('/api/recordings/jobs/<int:job_id>', methods=['DELETE'])@@ -3730,10 +3732,10 @@ def delete_job(job_id):job = db.session.get(ProcessingJob, job_id)if not job:- return jsonify({'error': 'Job not found'}), 404+ return jsonify(api_error('job_not_found')), 404if job.user_id != current_user.id:- return jsonify({'error': 'Access denied'}), 403+ return jsonify(api_error('access_denied')), 403# If it's a failed new upload, also delete the recordingif job.status == 'failed' and job.is_new_upload:@@ -3754,11 +3756,11 @@ def delete_job(job_id):db.session.commit()current_app.logger.info(f"Job {job_id} deleted by user {current_user.id}")- return jsonify({'success': True, 'message': 'Job deleted'})+ return jsonify({'success': True, 'message': translate('server.apiMessage.jobDeleted')})except Exception as e:current_app.logger.error(f"Error deleting job {job_id}: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred.'}), 500+ return jsonify(api_error('unexpected_error')), 500@recordings_bp.route('/api/recordings/jobs/clear-completed', methods=['POST'])@@ -3779,7 +3781,7 @@ def clear_completed_jobs():except Exception as e:current_app.logger.error(f"Error clearing completed jobs: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred.'}), 500+ return jsonify(api_error('unexpected_error')), 500@recordings_bp.route('/status/<int:recording_id>', methods=['GET'])@@ -3789,10 +3791,10 @@ def get_status(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user):- return jsonify({'error': 'You do not have permission to view this recording'}), 403+ return jsonify(api_error('recording_view_denied')), 403# Ensure events are loaded (refresh the recording to get latest relationships)db.session.refresh(recording)@@ -3804,7 +3806,7 @@ def get_status(recording_id):return jsonify(recording_dict)except Exception as e:current_app.logger.error(f"Error fetching status for recording {recording_id}: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred.'}), 500+ return jsonify(api_error('unexpected_error')), 500@recordings_bp.route('/audio/<int:recording_id>')@@ -3818,7 +3820,7 @@ def get_audio(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording or not recording.audio_path:- return jsonify({'error': 'Recording or audio file not found'}), 404+ return jsonify(api_error('recording_or_audio_not_found')), 404# Check if the recording belongs to the current user or has been shared with themhas_access = recording.user_id == current_user.id@@ -3832,7 +3834,7 @@ def get_audio(recording_id):has_access = share is not Noneif not has_access:- return jsonify({'error': 'You do not have permission to access this audio file'}), 403+ return jsonify(api_error('audio_access_denied')), 403storage = get_storage_service()# Check if download is requested@@ -3860,7 +3862,7 @@ def get_audio(recording_id):if not delivery.local_path or not os.path.exists(delivery.local_path):current_app.logger.error(f"Audio file missing from server: {recording.audio_path}")- return jsonify({'error': 'Audio file missing from server'}), 404+ return jsonify(api_error('audio_file_missing')), 404if download:return sandbox_media_response(send_file(@@ -3874,7 +3876,7 @@ def get_audio(recording_id):return sandbox_media_response(send_file(delivery.local_path, mimetype=serve_mime, conditional=True))except Exception as e:current_app.logger.error(f"Error serving audio for recording {recording_id}: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred.'}), 500+ return jsonify(api_error('unexpected_error')), 500# --- Chat with Transcription ---@@ -3886,36 +3888,36 @@ def chat_with_transcription():try:data = request.jsonif not data:- return jsonify({'error': 'No data provided'}), 400+ return jsonify(api_error('no_data_provided')), 400recording_id = data.get('recording_id')user_message = data.get('message')message_history = data.get('message_history', [])if not recording_id:- return jsonify({'error': 'No recording ID provided'}), 400+ return jsonify(api_error('no_recording_id')), 400if not user_message:- return jsonify({'error': 'No message provided'}), 400+ return jsonify(api_error('no_message_provided')), 400# Get the recordingrecording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user):- return jsonify({'error': 'You do not have permission to chat with this recording'}), 403+ return jsonify(api_error('recording_chat_denied')), 403# Check if transcription existsif not recording.transcription or len(recording.transcription.strip()) < 10:- return jsonify({'error': 'No transcription available for this recording'}), 400+ return jsonify(api_error('no_transcription_for_recording')), 400# Check if transcription is an error message (not actual content)if is_transcription_error(recording.transcription):- return jsonify({'error': 'Cannot chat: transcription failed. Please reprocess the transcription first.'}), 400+ return jsonify(api_error('chat_blocked_transcription_failed')), 400# Check if chat client is availableif chat_client is None:- return jsonify({'error': 'Chat service is not available (chat client not configured)'}), 503+ return jsonify(api_error('chat_client_not_configured')), 503# Prepare the system prompt with the transcriptionuser_chat_output_language = current_user.output_language if current_user.is_authenticated else None@@ -4013,7 +4015,7 @@ Additional context and notes about the meeting:# Provide more helpful error message for connection issueserror_msg = str(e).lower()if 'connection' in error_msg or 'connect' in error_msg or 'refused' in error_msg:- yield f"data: {json.dumps({'error': 'Could not connect to LLM server. Please check that your LLM service is running.'})}\n\n"+ yield f"data: {json.dumps(api_error('llm_connection_failed'))}\n\n"else:yield f"data: {json.dumps({'error': str(e)})}\n\n"finally:@@ -4025,7 +4027,7 @@ Additional context and notes about the meeting:current_app.logger.error(f"Error in chat endpoint: {str(e)}")error_msg = str(e).lower()if 'connection' in error_msg or 'connect' in error_msg or 'refused' in error_msg:- return jsonify({'error': 'Could not connect to LLM server. Please check that your LLM service is running.'}), 503+ return jsonify(api_error('llm_connection_failed')), 503return jsonify({'error': str(e)}), 500@@ -4038,22 +4040,22 @@ def add_tag_to_recording(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404# Check if user has view access to this recording# (Edit permission will be checked for group tags specifically)if not has_recording_access(recording, current_user, require_edit=False):- return jsonify({'error': 'You do not have permission to access this recording'}), 403+ return jsonify(api_error('recording_access_denied')), 403data = request.get_json()tag_id = data.get('tag_id')if not tag_id:- return jsonify({'error': 'Tag ID is required'}), 400+ return jsonify(api_error('tag_id_required')), 400tag = db.session.get(Tag, tag_id)if not tag:- return jsonify({'error': 'Tag not found'}), 404+ return jsonify(api_error('tag_not_found')), 404# Check if user has access to this tag and permission to apply itif tag.group_id:@@ -4063,19 +4065,19 @@ def add_tag_to_recording(recording_id):user_id=current_user.id).first()if not membership:- return jsonify({'error': 'You do not have access to this tag'}), 403+ return jsonify(api_error('tag_access_denied')), 403# Only file owner or group admin can apply group tagsif recording.user_id != current_user.id and membership.role != 'admin':- return jsonify({'error': 'Only recording owner or group admin can apply group tags'}), 403+ return jsonify(api_error('group_tag_apply_restricted')), 403# Group tags require edit permissionif not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'You do not have permission to apply group tags to this recording'}), 403+ return jsonify(api_error('group_tag_apply_denied')), 403else:# Personal tag - only the tag owner can use it (view access is sufficient)if tag.user_id != current_user.id:- return jsonify({'error': 'You can only apply your own personal tags'}), 403+ return jsonify(api_error('personal_tag_apply_own_only')), 403# Check if tag is already on the recordingexisting = RecordingTag.query.filter_by(@@ -4084,7 +4086,7 @@ def add_tag_to_recording(recording_id):).first()if existing:- return jsonify({'error': 'Tag is already on this recording'}), 400+ return jsonify(api_error('tag_already_on_recording')), 400# Get the next order positionmax_order = db.session.query(db.func.max(RecordingTag.order)).filter_by(@@ -4120,7 +4122,7 @@ def add_tag_to_recording(recording_id):except Exception as e:db.session.rollback()current_app.logger.error(f"Error adding tag to recording {recording_id}: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred.'}), 500+ return jsonify(api_error('unexpected_error')), 500@recordings_bp.route('/api/recordings/<int:recording_id>/tags/<int:tag_id>', methods=['DELETE'])@@ -4130,12 +4132,12 @@ def remove_tag_from_recording(recording_id, tag_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404# Check if user has view access to this recording# (Edit permission will be checked for group tags specifically)if not has_recording_access(recording, current_user, require_edit=False):- return jsonify({'error': 'You do not have permission to access this recording'}), 403+ return jsonify(api_error('recording_access_denied')), 403# Find the recording-tag associationrecording_tag = RecordingTag.query.filter_by(@@ -4144,7 +4146,7 @@ def remove_tag_from_recording(recording_id, tag_id):).first()if not recording_tag:- return jsonify({'error': 'Tag is not on this recording'}), 404+ return jsonify(api_error('tag_not_on_recording')), 404# Get the tag to check permissions and for cleanuptag = db.session.get(Tag, tag_id)@@ -4158,17 +4160,17 @@ def remove_tag_from_recording(recording_id, tag_id):).first()if recording.user_id != current_user.id:if not membership or membership.role != 'admin':- return jsonify({'error': 'Only recording owner or group admin can remove group tags'}), 403+ return jsonify(api_error('group_tag_remove_restricted')), 403# Group tags require edit permissionif not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'You do not have permission to remove group tags from this recording'}), 403+ return jsonify(api_error('group_tag_remove_denied')), 403else:# Personal tag - can be removed by tag owner (view access) or recording owner (edit access)if tag.user_id != current_user.id:# Not the tag owner, must be recording owner with edit permissionif not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'You can only remove your own personal tags'}), 403+ return jsonify(api_error('personal_tag_remove_own_only')), 403# Remove the associationdb.session.delete(recording_tag)@@ -4217,7 +4219,7 @@ def remove_tag_from_recording(recording_id, tag_id):except Exception as e:db.session.rollback()current_app.logger.error(f"Error removing tag from recording {recording_id}: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred.'}), 500+ return jsonify(api_error('unexpected_error')), 500@recordings_bp.route('/api/recordings/<int:recording_id>/tags/reorder', methods=['PUT'])@@ -4227,19 +4229,19 @@ def reorder_recording_tags(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404# Check if user has edit access to this recordingif not has_recording_access(recording, current_user, require_edit=True):- return jsonify({'error': 'You do not have permission to modify this recording'}), 403+ return jsonify(api_error('recording_modify_denied')), 403data = request.get_json()if not data or 'tag_ids' not in data:- return jsonify({'error': 'Missing tag_ids in request body'}), 400+ return jsonify(api_error('missing_tag_ids')), 400tag_ids = data.get('tag_ids', [])if not isinstance(tag_ids, list):- return jsonify({'error': 'tag_ids must be a list'}), 400+ return jsonify(api_error('invalid_tag_ids')), 400# Update order for each tagfor order, tag_id in enumerate(tag_ids, 1):@@ -4263,7 +4265,7 @@ def reorder_recording_tags(recording_id):except Exception as e:db.session.rollback()current_app.logger.error(f"Error reordering tags on recording {recording_id}: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred.'}), 500+ return jsonify(api_error('unexpected_error')), 500# --- Bulk Operations ---@@ -4275,19 +4277,19 @@ def bulk_delete_recordings():try:data = request.get_json()if not data or 'recording_ids' not in data:- return jsonify({'error': 'Missing recording_ids'}), 400+ return jsonify(api_error('missing_recording_ids')), 400recording_ids = data.get('recording_ids', [])if not isinstance(recording_ids, list) or len(recording_ids) == 0:- return jsonify({'error': 'recording_ids must be a non-empty list'}), 400+ return jsonify(api_error('recording_ids_empty')), 400# Limit bulk operations to prevent abuseif len(recording_ids) > 100:- return jsonify({'error': 'Cannot delete more than 100 recordings at once'}), 400+ return jsonify(api_error('bulk_delete_limit')), 400# Check deletion permissionsif not USERS_CAN_DELETE and not current_user.is_admin:- return jsonify({'error': 'Only administrators can delete recordings'}), 403+ return jsonify(api_error('recording_delete_admin_only')), 403deleted_ids = []errors = []@@ -4325,7 +4327,7 @@ def bulk_delete_recordings():except Exception as e:db.session.rollback()current_app.logger.error(f"Error in bulk delete: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred'}), 500+ return jsonify(api_error('unexpected_error')), 500@recordings_bp.route('/api/recordings/bulk-tags', methods=['POST'])@@ -4335,25 +4337,25 @@ def bulk_update_tags():try:data = request.get_json()if not data:- return jsonify({'error': 'Missing request body'}), 400+ return jsonify(api_error('missing_request_body')), 400recording_ids = data.get('recording_ids', [])tag_id = data.get('tag_id')action = data.get('action', 'add') # 'add' or 'remove'if not recording_ids or not tag_id:- return jsonify({'error': 'Missing recording_ids or tag_id'}), 400+ return jsonify(api_error('missing_recording_ids_or_tag_id')), 400if action not in ['add', 'remove']:- return jsonify({'error': 'Action must be "add" or "remove"'}), 400+ return jsonify(api_error('invalid_bulk_tag_action')), 400if len(recording_ids) > 100:- return jsonify({'error': 'Cannot update more than 100 recordings at once'}), 400+ return jsonify(api_error('bulk_update_limit')), 400# Verify tag exists and user has accesstag = db.session.get(Tag, tag_id)if not tag:- return jsonify({'error': 'Tag not found'}), 404+ return jsonify(api_error('tag_not_found')), 404# Access check matching the single-tag endpoints: a group tag requires# membership in that group (previously group tags skipped this check@@ -4363,9 +4365,9 @@ def bulk_update_tags():membership = GroupMembership.query.filter_by(group_id=tag.group_id, user_id=current_user.id).first()if not membership:- return jsonify({'error': 'You do not have access to this tag'}), 403+ return jsonify(api_error('tag_access_denied')), 403elif tag.user_id != current_user.id:- return jsonify({'error': 'No permission to use this tag'}), 403+ return jsonify(api_error('tag_use_denied')), 403affected_ids = []@@ -4424,7 +4426,7 @@ def bulk_update_tags():except Exception as e:db.session.rollback()current_app.logger.error(f"Error in bulk tag update: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred'}), 500+ return jsonify(api_error('unexpected_error')), 500@recordings_bp.route('/api/recordings/bulk-reprocess', methods=['POST'])@@ -4434,19 +4436,19 @@ def bulk_reprocess():try:data = request.get_json()if not data:- return jsonify({'error': 'Missing request body'}), 400+ return jsonify(api_error('missing_request_body')), 400recording_ids = data.get('recording_ids', [])reprocess_type = data.get('type', 'summary') # 'transcription' or 'summary'if not recording_ids:- return jsonify({'error': 'Missing recording_ids'}), 400+ return jsonify(api_error('missing_recording_ids')), 400if reprocess_type not in ['transcription', 'summary']:- return jsonify({'error': 'Type must be "transcription" or "summary"'}), 400+ return jsonify(api_error('invalid_reprocess_type')), 400if len(recording_ids) > 50:- return jsonify({'error': 'Cannot reprocess more than 50 recordings at once'}), 400+ return jsonify(api_error('bulk_reprocess_limit')), 400queued_ids = []@@ -4491,7 +4493,7 @@ def bulk_reprocess():except Exception as e:db.session.rollback()current_app.logger.error(f"Error in bulk reprocess: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred'}), 500+ return jsonify(api_error('unexpected_error')), 500@recordings_bp.route('/api/recordings/bulk-toggle', methods=['POST'])@@ -4501,20 +4503,20 @@ def bulk_toggle():try:data = request.get_json()if not data:- return jsonify({'error': 'Missing request body'}), 400+ return jsonify(api_error('missing_request_body')), 400recording_ids = data.get('recording_ids', [])field = data.get('field') # 'inbox', 'highlight' or 'archive'value = data.get('value') # True or Falseif not recording_ids or field is None or value is None:- return jsonify({'error': 'Missing recording_ids, field, or value'}), 400+ return jsonify(api_error('missing_bulk_status_fields')), 400if field not in ['inbox', 'highlight', 'archive']:- return jsonify({'error': 'Field must be "inbox", "highlight" or "archive"'}), 400+ return jsonify(api_error('invalid_bulk_status_field')), 400if len(recording_ids) > 100:- return jsonify({'error': 'Cannot update more than 100 recordings at once'}), 400+ return jsonify(api_error('bulk_update_limit')), 400affected_ids = []@@ -4558,7 +4560,7 @@ def bulk_toggle():except Exception as e:db.session.rollback()current_app.logger.error(f"Error in bulk toggle: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred'}), 500+ return jsonify(api_error('unexpected_error')), 500# --- Auto-deletion and Chunks Processing ---@@ -4570,11 +4572,11 @@ def toggle_deletion_exempt(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404# Check ownershipif recording.user_id != current_user.id and not current_user.is_admin:- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403# Toggle the flagrecording.deletion_exempt = not recording.deletion_exempt@@ -4597,16 +4599,16 @@ def process_recording_chunks_endpoint(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if recording.user_id != current_user.id:- return jsonify({'error': 'Permission denied'}), 403+ return jsonify(api_error('permission_denied')), 403success = process_recording_chunks(recording_id)if success:- return jsonify({'message': 'Chunks processed successfully'})+ return jsonify({'message': translate('server.apiMessage.chunksProcessed')})else:- return jsonify({'error': 'Failed to process chunks'}), 500+ return jsonify(api_error('chunk_processing_failed')), 500except Exception as e:current_app.logger.error(f"Error in process chunks endpoint: {e}")diff --git a/src/api/shares.py b/src/api/shares.pyindex 739117d3..cb27da62 100644--- a/src/api/shares.py+++ b/src/api/shares.py@@ -21,6 +21,7 @@ from src.services.storage import get_storage_servicefrom src.services.public_shares import active_share_or_404from src.utils.mime import served_media_mime, sandbox_media_responsefrom src.utils.search import LIKE_ESCAPE, contains_pattern+from src.utils.localization import api_error, translate# Configuration from environmentENABLE_PUBLIC_SHARING = os.environ.get('ENABLE_PUBLIC_SHARING', 'true').lower() == 'true'@@ -160,7 +161,7 @@ def get_shared_audio(public_id):share = active_share_or_404(public_id)recording = share.recordingif not recording or not recording.audio_path:- return jsonify({'error': 'Recording or audio file not found'}), 404+ return jsonify(api_error('recording_or_audio_not_found')), 404serve_mime = served_media_mime(recording.mime_type, recording.audio_path)delivery = get_storage_service().get_audio_delivery(recording.audio_path,@@ -173,7 +174,7 @@ def get_shared_audio(public_id):return redirect(delivery.url, code=302)if not delivery.local_path or not os.path.exists(delivery.local_path):current_app.logger.error(f"Audio file missing from server: {recording.audio_path}")- return jsonify({'error': 'Audio file missing from server'}), 404+ return jsonify(api_error('audio_file_missing')), 404return sandbox_media_response(send_file(delivery.local_path, mimetype=serve_mime, conditional=True))except HTTPException:# Let first_or_404() (and any other HTTP error) keep its real status —@@ -181,7 +182,7 @@ def get_shared_audio(public_id):raiseexcept Exception as e:current_app.logger.error(f"Error serving shared audio for public_id {public_id}: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred.'}), 500+ return jsonify(api_error('unexpected_error')), 500@shares_bp.route('/api/recording/<int:recording_id>/share', methods=['GET'])@@ -190,7 +191,7 @@ def get_existing_share(recording_id):"""Check if a share already exists for this recording."""recording = db.session.get(Recording, recording_id)if not recording or recording.user_id != current_user.id:- return jsonify({'error': 'Recording not found or you do not have permission to view it.'}), 404+ return jsonify(api_error('recording_not_found_or_no_view')), 404existing_share = Share.query.filter_by(recording_id=recording.id,@@ -218,18 +219,18 @@ def create_share(recording_id):"""Create a public share link for a recording."""# Check if public sharing is globally enabledif not ENABLE_PUBLIC_SHARING:- return jsonify({'error': 'Public sharing is not enabled on this server'}), 403+ return jsonify(api_error('public_sharing_disabled')), 403# Check if user has permission to create public sharesif not current_user.can_share_publicly:- return jsonify({'error': 'You do not have permission to create public share links. Contact your administrator.'}), 403+ return jsonify(api_error('public_share_not_permitted')), 403if not request.is_secure:- return jsonify({'error': 'Sharing is only available over a secure (HTTPS) connection.'}), 403+ return jsonify(api_error('sharing_https_required')), 403recording = db.session.get(Recording, recording_id)if not recording or recording.user_id != current_user.id:- return jsonify({'error': 'Recording not found or you do not have permission to share it.'}), 404+ return jsonify(api_error('recording_not_found_or_no_share')), 404data = request.jsonshare_summary = data.get('share_summary', True)@@ -247,7 +248,7 @@ def create_share(recording_id):'share_url': share_url,'share': share.to_dict(),'existing': True,- 'message': 'Using existing share link for this recording'+ 'message': translate('server.apiMessage.existingShareLinkUsed')}), 200share_url = url_for('shares.view_shared_recording', public_id=share.public_id, _external=True)@@ -394,7 +395,7 @@ def delete_share(share_id):def search_users():"""Search for users by username (for internal sharing)."""if not ENABLE_INTERNAL_SHARING:- return jsonify({'error': 'Internal sharing is not enabled'}), 403+ return jsonify(api_error('internal_sharing_disabled')), 403query = request.args.get('q', '').strip()@@ -430,7 +431,7 @@ def search_users():def share_recording_internal(recording_id):"""Share a recording with another user internally."""if not ENABLE_INTERNAL_SHARING:- return jsonify({'error': 'Internal sharing is not enabled'}), 403+ return jsonify(api_error('internal_sharing_disabled')), 403try:data = request.json@@ -439,28 +440,28 @@ def share_recording_internal(recording_id):can_reshare = data.get('can_reshare', False)if not shared_with_user_id:- return jsonify({'error': 'User ID is required'}), 400+ return jsonify(api_error('user_id_required')), 400# Check recording exists and user has permission to share itrecording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user, require_reshare=True):- return jsonify({'error': 'You do not have permission to share this recording'}), 403+ return jsonify(api_error('recording_share_denied')), 403# Check target user existstarget_user = db.session.get(User, shared_with_user_id)if not target_user:- return jsonify({'error': 'Target user not found'}), 404+ return jsonify(api_error('target_user_not_found')), 404# Prevent sharing back to owner (circular share)if shared_with_user_id == recording.user_id:- return jsonify({'error': 'Cannot share a recording with its owner'}), 400+ return jsonify(api_error('share_with_owner')), 400# Prevent sharing with selfif shared_with_user_id == current_user.id:- return jsonify({'error': 'Cannot share a recording with yourself'}), 400+ return jsonify(api_error('share_with_self')), 400# Check if already sharedexisting_share = InternalShare.query.filter_by(@@ -469,16 +470,16 @@ def share_recording_internal(recording_id):).first()if existing_share:- return jsonify({'error': 'Recording already shared with this user'}), 409+ return jsonify(api_error('already_shared')), 409# PERMISSION VALIDATION: Validate that current user can grant the requested permissionsrequested_permissions = {'can_edit': can_edit, 'can_reshare': can_reshare}- is_valid, error_message = InternalShare.validate_reshare_permissions(+ is_valid, error_code = InternalShare.validate_reshare_permissions(recording, current_user, requested_permissions)if not is_valid:- return jsonify({'error': error_message}), 403+ return jsonify(api_error(error_code)), 403# Get current user's permissions for audit logactor_permissions = InternalShare.get_user_max_permissions(recording, current_user)@@ -538,7 +539,7 @@ def share_recording_internal(recording_id):except Exception as e:db.session.rollback()current_app.logger.error(f"Error sharing recording internally: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred'}), 500+ return jsonify(api_error('unexpected_error')), 500@shares_bp.route('/api/recordings/<int:recording_id>/shares-internal', methods=['GET'])@@ -546,15 +547,15 @@ def share_recording_internal(recording_id):def get_internal_shares(recording_id):"""Get list of users a recording is shared with, including owner."""if not ENABLE_INTERNAL_SHARING:- return jsonify({'error': 'Internal sharing is not enabled'}), 403+ return jsonify(api_error('internal_sharing_disabled')), 403# Check recording exists and user has permission to view sharesrecording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user, require_reshare=True):- return jsonify({'error': 'You do not have permission to view shares for this recording'}), 403+ return jsonify(api_error('shares_view_denied')), 403# Get all internal sharesshares = InternalShare.query.filter_by(recording_id=recording_id).all()@@ -588,15 +589,15 @@ def get_internal_shares(recording_id):def revoke_internal_share(share_id):"""Revoke an internal share with cascade revocation."""if not ENABLE_INTERNAL_SHARING:- return jsonify({'error': 'Internal sharing is not enabled'}), 403+ return jsonify(api_error('internal_sharing_disabled')), 403share = db.session.get(InternalShare, share_id)if not share:- return jsonify({'error': 'Share not found'}), 404+ return jsonify(api_error('share_not_found')), 404# Only owner can revokeif share.owner_id != current_user.id:- return jsonify({'error': 'You do not have permission to revoke this share'}), 403+ return jsonify(api_error('share_revoke_denied')), 403recording_id = share.recording_idrevoked_user_id = share.shared_with_user_id@@ -661,7 +662,7 @@ def revoke_internal_share(share_id):except Exception as e:db.session.rollback()current_app.logger.error(f"Error revoking internal share: {e}", exc_info=True)- return jsonify({'error': 'An unexpected error occurred'}), 500+ return jsonify(api_error('unexpected_error')), 500@shares_bp.route('/api/recordings/shared-with-me', methods=['GET'])@@ -669,7 +670,7 @@ def revoke_internal_share(share_id):def get_shared_with_me():"""Get recordings that have been shared with the current user."""if not ENABLE_INTERNAL_SHARING:- return jsonify({'error': 'Internal sharing is not enabled'}), 403+ return jsonify(api_error('internal_sharing_disabled')), 403try:# Get shares where current user is the recipient, with theirdiff --git a/src/api/speakers.py b/src/api/speakers.pyindex 0c3abd69..c75450cc 100644--- a/src/api/speakers.py+++ b/src/api/speakers.py@@ -21,6 +21,7 @@ from src.utils.search import LIKE_ESCAPE, contains_patternfrom src.services.speaker_embedding_matcher import find_matching_speakersfrom src.services.speaker_snippets import get_speaker_snippets, get_speaker_recordings_with_snippetsfrom src.services.speaker_merge import merge_speakers, preview_merge, can_merge_speakers+from src.utils.localization import api_error, translate# Create blueprintspeakers_bp = Blueprint('speakers', __name__)@@ -112,7 +113,7 @@ def create_speaker():name = data.get('name', '').strip()if not name:- return jsonify({'error': 'Speaker name is required'}), 400+ return jsonify(api_error('speaker_name_required')), 400# Check if speaker already exists for this userexisting_speaker = Speaker.query.filter_by(user_id=current_user.id, name=name).first()@@ -150,18 +151,18 @@ def update_speaker(speaker_id):try:speaker = Speaker.query.filter_by(id=speaker_id, user_id=current_user.id).first()if not speaker:- return jsonify({'error': 'Speaker not found'}), 404+ return jsonify(api_error('speaker_not_found')), 404data = request.jsonnew_name = data.get('name', '').strip()if not new_name:- return jsonify({'error': 'Speaker name cannot be empty'}), 400+ return jsonify(api_error('speaker_name_empty')), 400# Check if another speaker with this name already exists for this userexisting_speaker = Speaker.query.filter_by(user_id=current_user.id, name=new_name).first()if existing_speaker and existing_speaker.id != speaker_id:- return jsonify({'error': f'A speaker named "{new_name}" already exists'}), 400+ return jsonify(api_error('speaker_name_exists', name=new_name)), 400# Store old name for updating transcript chunks and recordingsold_name = speaker.name@@ -203,7 +204,7 @@ def delete_speaker(speaker_id):try:speaker = Speaker.query.filter_by(id=speaker_id, user_id=current_user.id).first()if not speaker:- return jsonify({'error': 'Speaker not found'}), 404+ return jsonify(api_error('speaker_not_found')), 404db.session.delete(speaker)db.session.commit()@@ -261,14 +262,14 @@ def get_speaker_suggestions(recording_id):try:recording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user, require_edit=False):- return jsonify({'error': 'You do not have permission to access this recording'}), 403+ return jsonify(api_error('recording_access_denied')), 403# Get speaker embeddings from recordingif not recording.speaker_embeddings:- return jsonify({'suggestions': {}, 'message': 'No speaker embeddings available'}), 200+ return jsonify({'suggestions': {}, 'message': translate('server.apiMessage.noSpeakerEmbeddings')}), 200# Matching compares each voice with every voice variant of each# person, within the recording's embedding space. The threshold is@@ -301,7 +302,7 @@ def get_snippets(speaker_id):# Verify speaker belongs to userspeaker = Speaker.query.filter_by(id=speaker_id, user_id=current_user.id).first()if not speaker:- return jsonify({'error': 'Speaker not found'}), 404+ return jsonify(api_error('speaker_not_found')), 404limit = int(request.args.get('limit', 5))snippets = get_speaker_snippets(speaker_id, limit)@@ -330,7 +331,7 @@ def get_speaker_recordings(speaker_id):# Verify speaker belongs to userspeaker = Speaker.query.filter_by(id=speaker_id, user_id=current_user.id).first()if not speaker:- return jsonify({'error': 'Speaker not found'}), 404+ return jsonify(api_error('speaker_not_found')), 404recordings = get_speaker_recordings_with_snippets(speaker_id)@@ -354,7 +355,7 @@ def list_voice_samples(speaker_id):from src.services.voice_profiles import voice_summary, effective_space, current_space_idspeaker = Speaker.query.filter_by(id=speaker_id, user_id=current_user.id).first()if not speaker:- return jsonify({'error': 'Speaker not found'}), 404+ return jsonify(api_error('speaker_not_found')), 404rows = SpeakerVoiceSample.query.filter_by(speaker_id=speaker.id).all()titles = {}rec_ids = [r.recording_id for r in rows if r.recording_id]@@ -390,10 +391,10 @@ def delete_voice_sample(speaker_id, sample_id):from src.services import voice_profiles as vpspeaker = Speaker.query.filter_by(id=speaker_id, user_id=current_user.id).first()if not speaker:- return jsonify({'error': 'Speaker not found'}), 404+ return jsonify(api_error('speaker_not_found')), 404sample = SpeakerVoiceSample.query.filter_by(id=sample_id, speaker_id=speaker.id).first()if not sample:- return jsonify({'error': 'Sample not found'}), 404+ return jsonify(api_error('sample_not_found')), 404try:db.session.delete(sample)db.session.flush()@@ -405,7 +406,7 @@ def delete_voice_sample(speaker_id, sample_id):except Exception as e:db.session.rollback()current_app.logger.error(f"Error removing voice sample {sample_id}: {e}")- return jsonify({'error': 'Could not remove the sample'}), 500+ return jsonify(api_error('sample_remove_failed')), 500@speakers_bp.route('/speakers/<int:speaker_id>/clear_embeddings', methods=['POST'])@@ -421,7 +422,7 @@ def clear_speaker_embeddings(speaker_id):# Verify speaker belongs to userspeaker = Speaker.query.filter_by(id=speaker_id, user_id=current_user.id).first()if not speaker:- return jsonify({'error': 'Speaker not found'}), 404+ return jsonify(api_error('speaker_not_found')), 404# Clear all embeddings. NOTE: the matchable vector lives in the# `average_embedding` column (and the history in `embeddings_history`)@@ -442,7 +443,7 @@ def clear_speaker_embeddings(speaker_id):return jsonify({'success': True,- 'message': f'Voice profile cleared for {speaker.name}',+ 'message': translate('server.apiMessage.voiceProfileCleared', name=speaker.name),'speaker': {'id': speaker.id,'name': speaker.name,@@ -481,18 +482,18 @@ def get_snippet_audio(recording_id):# Get the recordingrecording = db.session.get(Recording, recording_id)if not recording:- return jsonify({'error': 'Recording not found'}), 404+ return jsonify(api_error('recording_not_found')), 404if not has_recording_access(recording, current_user, require_edit=False):- return jsonify({'error': 'You do not have permission to access this recording'}), 403+ return jsonify(api_error('recording_access_denied')), 403if recording.audio_deleted_at:- return jsonify({'error': 'Audio file has been deleted'}), 410+ return jsonify(api_error('audio_deleted')), 410from src.services.storage import get_storage_servicestorage = get_storage_service()if not recording.audio_path or not storage.exists(recording.audio_path):- return jsonify({'error': 'Audio file not found'}), 404+ return jsonify(api_error('audio_file_not_found')), 404try:with storage.materialize(recording.audio_path) as materialized:@@ -554,17 +555,17 @@ def get_snippet_audio(recording_id):os.unlink(output_path)except:pass- return jsonify({'error': 'FFmpeg not found on server'}), 500+ return jsonify(api_error('ffmpeg_missing')), 500except FFmpegError as e:current_app.logger.error(f"FFmpeg error extracting snippet: {e}")try:os.unlink(output_path)except:pass- return jsonify({'error': 'Failed to extract audio snippet'}), 500+ return jsonify(api_error('snippet_extraction_failed')), 500except ValueError:- return jsonify({'error': 'Invalid start time or duration'}), 400+ return jsonify(api_error('invalid_snippet_range')), 400except Exception as e:current_app.logger.error(f"Error serving audio snippet: {e}")return jsonify({'error': str(e)}), 500@@ -592,15 +593,15 @@ def merge_speaker_profiles():preview = data.get('preview', False)if not target_id:- return jsonify({'error': 'target_id is required'}), 400+ return jsonify(api_error('target_id_required')), 400if not source_ids or not isinstance(source_ids, list):- return jsonify({'error': 'source_ids must be a non-empty list'}), 400+ return jsonify(api_error('invalid_source_ids')), 400# Validate speakers can be merged- can_merge, error_msg = can_merge_speakers([target_id] + source_ids, current_user.id)+ can_merge, error_code = can_merge_speakers([target_id] + source_ids, current_user.id)if not can_merge:- return jsonify({'error': error_msg}), 400+ return jsonify(api_error(error_code)), 400if preview:# Just return preview statistics@@ -614,7 +615,8 @@ def merge_speaker_profiles():merged_speaker = merge_speakers(target_id, source_ids, current_user.id)return jsonify({'success': True,- 'message': f'Successfully merged {len(source_ids)} speaker(s) into {merged_speaker.name}',+ 'message': translate('server.apiMessage.speakersMerged',+ count=len(source_ids), name=merged_speaker.name),'speaker': merged_speaker.to_dict(),'recordings_updated': getattr(merged_speaker, 'recordings_updated', 0)})diff --git a/src/api/system.py b/src/api/system.pyindex a7b76231..dd95afd3 100644--- a/src/api/system.py+++ b/src/api/system.py@@ -15,7 +15,7 @@ from src.database import dbfrom src.models import *from src.utils import *from src.config.version import get_version-from src.utils.localization import format_file_size+from src.utils.localization import format_file_size, api_error, translatefrom src.services.llm import TEXT_MODEL_BASE_URL, TEXT_MODEL_NAMEfrom src.config.app_config import ASR_BASE_URL, USE_NEW_TRANSCRIPTION_ARCHITECTURE, TRANSCRIPTION_MODEL_OPTIONSfrom src.services.token_tracking import token_tracker@@ -79,24 +79,24 @@ def save_user_preferences():if 'speaker_count_mode' in data:mode = data['speaker_count_mode']if mode not in ('range', 'single'):- return jsonify({'error': 'Invalid speaker_count_mode'}), 400+ return jsonify(api_error('invalid_speaker_count_mode')), 400current_user.speaker_count_mode = mode# Theme, saved when the user changes it so other devices follow (D#419).if 'dark_mode' in data:if not isinstance(data['dark_mode'], bool):- return jsonify({'error': 'Invalid dark_mode'}), 400+ return jsonify(api_error('invalid_dark_mode')), 400current_user.theme_dark_mode = data['dark_mode']if 'color_scheme' in data:if data['color_scheme'] not in THEME_COLOR_SCHEMES:- return jsonify({'error': 'Invalid color_scheme'}), 400+ return jsonify(api_error('invalid_color_scheme')), 400current_user.theme_color_scheme = data['color_scheme']db.session.commit()return jsonify({'success': True,- 'message': 'Preferences saved successfully',+ 'message': translate('server.apiMessage.preferencesSaved'),'ui_language': current_user.ui_language})@@ -209,7 +209,7 @@ def get_system_info():})except Exception as e:current_app.logger.error(f"Error getting system info: {e}")- return jsonify({'error': 'Unable to retrieve system information'}), 500+ return jsonify(api_error('system_info_unavailable')), 500# --- Tag API Endpoints ---diff --git a/src/api/tags.py b/src/api/tags.pyindex 90cb2e74..f6db1a17 100644--- a/src/api/tags.py+++ b/src/api/tags.py@@ -20,6 +20,7 @@ from sqlalchemy.exc import IntegrityErrorfrom src.database import dbfrom src.models import *from src.utils import *+from src.utils.localization import api_error# Create blueprinttags_bp = Blueprint('tags', __name__)@@ -44,14 +45,15 @@ _DEFAULT_TAG_COLOR = '#3B82F6'def _validate_tag_color(color):"""Validate an incoming tag color.- Returns (ok, value). When ok is False, value is an error string. A missing- (None) color is allowed and normalized to the default by the caller.+ Returns (ok, value). When ok is False, value is None and the caller answers+ with the invalid_tag_color error. A missing (None) color is allowed and+ normalized to the default by the caller."""if color is None:return True, Noneif isinstance(color, str) and _HEX_COLOR_RE.match(color.strip()):return True, color.strip()- return False, 'Color must be a hex value like #3B82F6'+ return False, Nonedef _sanitize_folder_name(name):@@ -182,11 +184,11 @@ def create_tag():data = request.get_json()if not data or not data.get('name'):- return jsonify({'error': 'Tag name is required'}), 400+ return jsonify(api_error('tag_name_required')), 400color_ok, color_val = _validate_tag_color(data.get('color'))if not color_ok:- return jsonify({'error': color_val}), 400+ return jsonify(api_error('invalid_tag_color')), 400group_id = data.get('group_id')@@ -198,17 +200,17 @@ def create_tag():).first()if not membership or membership.role != 'admin':- return jsonify({'error': 'Only group admins can create group tags'}), 403+ return jsonify(api_error('group_tag_create_admin_only')), 403# Check if group tag with same name already exists for this groupexisting_tag = Tag.query.filter_by(name=data['name'], group_id=group_id).first()if existing_tag:- return jsonify({'error': 'A tag with this name already exists for this group'}), 400+ return jsonify(api_error('group_tag_name_exists_for_group')), 400else:# Check if personal tag with same name already exists for this userexisting_tag = Tag.query.filter_by(name=data['name'], user_id=current_user.id, group_id=None).first()if existing_tag:- return jsonify({'error': 'Tag with this name already exists'}), 400+ return jsonify(api_error('tag_name_exists')), 400# Handle retention_days: -1 means protected from deletionretention_days = data.get('retention_days')@@ -224,7 +226,7 @@ def create_tag():from src.models import NamingTemplatetemplate = NamingTemplate.query.filter_by(id=naming_template_id, user_id=current_user.id).first()if not template:- return jsonify({'error': 'Naming template not found'}), 404+ return jsonify(api_error('naming_template_not_found')), 404# Validate export_template_id if providedexport_template_id = data.get('export_template_id')@@ -232,16 +234,16 @@ def create_tag():from src.models import ExportTemplatetemplate = ExportTemplate.query.filter_by(id=export_template_id, user_id=current_user.id).first()if not template:- return jsonify({'error': 'Export template not found'}), 404+ return jsonify(api_error('export_template_not_found')), 404# Handle auto-processis_auto_process = data.get('is_auto_process', False)auto_process_folder_name = Noneif is_auto_process:if not ENABLE_AUTO_PROCESSING:- return jsonify({'error': 'Auto-processing is not enabled'}), 400+ return jsonify(api_error('auto_processing_disabled')), 400if group_id:- return jsonify({'error': 'Watch folders are not available for group tags'}), 400+ return jsonify(api_error('watch_folder_group_tag_unsupported')), 400auto_process_folder_name = _sanitize_folder_name(data['name'])tag = Tag(@@ -274,7 +276,7 @@ def create_tag():except IntegrityError as e:db.session.rollback()current_app.logger.error(f"Tag creation failed due to integrity constraint: {str(e)}")- return jsonify({'error': 'A tag with this name already exists'}), 400+ return jsonify(api_error('tag_name_exists')), 400response = tag.to_dict()@@ -298,7 +300,7 @@ def update_tag(tag_id):"""Update a tag."""tag = db.session.get(Tag, tag_id)if not tag:- return jsonify({'error': 'Tag not found'}), 404+ return jsonify(api_error('tag_not_found')), 404# Check permissionsif tag.group_id:@@ -309,11 +311,11 @@ def update_tag(tag_id):).first()if not membership or membership.role != 'admin':- return jsonify({'error': 'Only group admins can edit group tags'}), 403+ return jsonify(api_error('group_tag_edit_admin_only')), 403else:# Personal tag - must be the ownerif tag.user_id != current_user.id:- return jsonify({'error': 'You do not have permission to edit this tag'}), 403+ return jsonify(api_error('tag_edit_denied')), 403data = request.get_json()@@ -325,7 +327,7 @@ def update_tag(tag_id):existing_tag = Tag.query.filter_by(name=data['name'], user_id=current_user.id).filter(Tag.id != tag_id).first()if existing_tag:- return jsonify({'error': 'Another tag with this name already exists'}), 400+ return jsonify(api_error('tag_rename_conflict')), 400tag.name = data['name']# Handle group_id changes (converting between personal and group tags)@@ -340,14 +342,14 @@ def update_tag(tag_id):).first()if not membership or membership.role != 'admin':- return jsonify({'error': 'Only group admins can assign tags to groups'}), 403+ return jsonify(api_error('tag_group_assign_admin_only')), 403tag.group_id = new_group_idif 'color' in data:color_ok, color_val = _validate_tag_color(data['color'])if not color_ok:- return jsonify({'error': color_val}), 400+ return jsonify(api_error('invalid_tag_color')), 400tag.color = color_val or _DEFAULT_TAG_COLORif 'custom_prompt' in data:tag.custom_prompt = data['custom_prompt']@@ -393,7 +395,7 @@ def update_tag(tag_id):from src.models import NamingTemplatetemplate = NamingTemplate.query.filter_by(id=naming_template_id, user_id=current_user.id).first()if not template:- return jsonify({'error': 'Naming template not found'}), 404+ return jsonify(api_error('naming_template_not_found')), 404tag.naming_template_id = naming_template_id if naming_template_id else Noneif 'export_template_id' in data:export_template_id = data['export_template_id']@@ -401,7 +403,7 @@ def update_tag(tag_id):from src.models import ExportTemplatetemplate = ExportTemplate.query.filter_by(id=export_template_id, user_id=current_user.id).first()if not template:- return jsonify({'error': 'Export template not found'}), 404+ return jsonify(api_error('export_template_not_found')), 404tag.export_template_id = export_template_id if export_template_id else None# Handle auto-process toggle@@ -410,9 +412,9 @@ def update_tag(tag_id):if new_value and not tag.is_auto_process:# Enabling auto-processif not ENABLE_AUTO_PROCESSING:- return jsonify({'error': 'Auto-processing is not enabled'}), 400+ return jsonify(api_error('auto_processing_disabled')), 400if tag.group_id:- return jsonify({'error': 'Watch folders are not available for group tags'}), 400+ return jsonify(api_error('watch_folder_group_tag_unsupported')), 400if not tag.auto_process_folder_name:tag.auto_process_folder_name = _sanitize_folder_name(tag.name)tag.is_auto_process = True@@ -427,7 +429,7 @@ def update_tag(tag_id):except IntegrityError as e:db.session.rollback()current_app.logger.error(f"Tag update failed due to integrity constraint: {str(e)}")- return jsonify({'error': 'A tag with this name already exists'}), 400+ return jsonify(api_error('tag_name_exists')), 400response = tag.to_dict()@@ -452,7 +454,7 @@ def delete_tag(tag_id):"""Delete a tag."""tag = db.session.get(Tag, tag_id)if not tag:- return jsonify({'error': 'Tag not found'}), 404+ return jsonify(api_error('tag_not_found')), 404# Check permissionsif tag.group_id:@@ -463,11 +465,11 @@ def delete_tag(tag_id):).first()if not membership or membership.role != 'admin':- return jsonify({'error': 'Only group admins can delete group tags'}), 403+ return jsonify(api_error('group_tag_delete_admin_only')), 403else:# Personal tag - must belong to the userif tag.user_id != current_user.id:- return jsonify({'error': 'You do not have permission to delete this tag'}), 403+ return jsonify(api_error('tag_delete_denied')), 403# Clean up auto-process folder if enabledif tag.is_auto_process:@@ -486,12 +488,12 @@ def delete_tag(tag_id):def create_group_tag(group_id):"""Create a group-scoped tag (group admins only)."""if not ENABLE_INTERNAL_SHARING:- return jsonify({'error': 'Group tags require internal sharing to be enabled. Please set ENABLE_INTERNAL_SHARING=true in your configuration.'}), 403+ return jsonify(api_error('group_tags_require_internal_sharing')), 403# Verify team existsteam = db.session.get(Group, group_id)if not team:- return jsonify({'error': 'Group not found'}), 404+ return jsonify(api_error('group_not_found')), 404# Verify user is a team adminmembership = GroupMembership.query.filter_by(@@ -500,17 +502,17 @@ def create_group_tag(group_id):).first()if not membership or membership.role != 'admin':- return jsonify({'error': 'Only group admins can create group tags'}), 403+ return jsonify(api_error('group_tag_create_admin_only')), 403data = request.get_json()name = data.get('name', '').strip()if not name:- return jsonify({'error': 'Tag name is required'}), 400+ return jsonify(api_error('tag_name_required')), 400color_ok, color_val = _validate_tag_color(data.get('color'))if not color_ok:- return jsonify({'error': color_val}), 400+ return jsonify(api_error('invalid_tag_color')), 400# Check if a group tag with this name already exists for this teamexisting_tag = Tag.query.filter_by(@@ -519,7 +521,7 @@ def create_group_tag(group_id):).first()if existing_tag:- return jsonify({'error': 'A group tag with this name already exists'}), 400+ return jsonify(api_error('group_tag_name_exists')), 400# Validate naming_template_id if providednaming_template_id = data.get('naming_template_id')@@ -527,7 +529,7 @@ def create_group_tag(group_id):from src.models import NamingTemplatetemplate = NamingTemplate.query.filter_by(id=naming_template_id, user_id=current_user.id).first()if not template:- return jsonify({'error': 'Naming template not found'}), 404+ return jsonify(api_error('naming_template_not_found')), 404# Validate export_template_id if providedexport_template_id = data.get('export_template_id')@@ -535,7 +537,7 @@ def create_group_tag(group_id):from src.models import ExportTemplatetemplate = ExportTemplate.query.filter_by(id=export_template_id, user_id=current_user.id).first()if not template:- return jsonify({'error': 'Export template not found'}), 404+ return jsonify(api_error('export_template_not_found')), 404# Create the group tag with all supported parameterstag = Tag(@@ -566,7 +568,7 @@ def create_group_tag(group_id):except IntegrityError as e:db.session.rollback()current_app.logger.error(f"Tag creation failed due to integrity constraint: {str(e)}")- return jsonify({'error': 'A tag with this name already exists'}), 400+ return jsonify(api_error('tag_name_exists')), 400return jsonify(tag.to_dict()), 201@@ -579,7 +581,7 @@ def get_group_tags(group_id):# Verify team existsteam = db.session.get(Group, group_id)if not team:- return jsonify({'error': 'Group not found'}), 404+ return jsonify(api_error('group_not_found')), 404# Verify user is a team membermembership = GroupMembership.query.filter_by(@@ -588,7 +590,7 @@ def get_group_tags(group_id):).first()if not membership:- return jsonify({'error': 'You must be a team member to view group tags'}), 403+ return jsonify(api_error('group_tags_members_only')), 403# Get all group tagsfrom src.services.recording_list import tag_dicts, tag_load_optionsdiff --git a/src/api/templates.py b/src/api/templates.pyindex 2f4724ce..db70c3d5 100644--- a/src/api/templates.py+++ b/src/api/templates.py@@ -15,6 +15,7 @@ from werkzeug.utils import secure_filenamefrom src.database import dbfrom src.models import *from src.utils import *+from src.utils.localization import api_error, translate# Create blueprinttemplates_bp = Blueprint('templates', __name__)@@ -58,7 +59,7 @@ def create_transcript_template():"""Create a new transcript template."""data = request.jsonif not data or not data.get('name') or not data.get('template'):- return jsonify({'error': 'Name and template are required'}), 400+ return jsonify(api_error('name_and_template_required')), 400# If this is set as default, unset other defaultsif data.get('is_default'):@@ -92,11 +93,11 @@ def update_transcript_template(template_id):).first()if not template:- return jsonify({'error': 'Template not found'}), 404+ return jsonify(api_error('template_not_found')), 404data = request.jsonif not data:- return jsonify({'error': 'No data provided'}), 400+ return jsonify(api_error('no_data_provided')), 400# If this is set as default, unset other defaultsif data.get('is_default'):@@ -127,7 +128,7 @@ def delete_transcript_template(template_id):).first()if not template:- return jsonify({'error': 'Template not found'}), 404+ return jsonify(api_error('template_not_found')), 404db.session.delete(template)db.session.commit()@@ -143,7 +144,7 @@ def create_default_templates():existing_templates = TranscriptTemplate.query.filter_by(user_id=current_user.id).count()if existing_templates > 0:- return jsonify({'message': 'User already has templates'}), 200+ return jsonify({'message': translate('server.apiMessage.userAlreadyHasTemplates')}), 200templates = []diff --git a/src/api/tokens.py b/src/api/tokens.pyindex 1500714c..d3bb302a 100644--- a/src/api/tokens.py+++ b/src/api/tokens.py@@ -14,6 +14,7 @@ from flask_login import login_required, current_userfrom src.database import dbfrom src.models import APITokenfrom src.utils.token_auth import hash_token+from src.utils.localization import api_error, translate# Create blueprinttokens_bp = Blueprint('tokens', __name__, url_prefix='/api/tokens')@@ -109,7 +110,7 @@ def create_token():# Validate expirationif not isinstance(expires_in_days, int) or expires_in_days < 0:- return jsonify({'error': 'expires_in_days must be a non-negative integer'}), 400+ return jsonify(api_error('invalid_expires_in_days')), 400# Scopes (mailr spec G1). Absent = a full token, as before scopes existed.scopes_value = None@@ -126,8 +127,7 @@ def create_token():.count())if active >= API_MAX_TOKENS_PER_USER:return jsonify({- 'error': (f'An account can hold at most {API_MAX_TOKENS_PER_USER} active API tokens. '- f'Revoke a token you no longer use to create a new one.'),+ 'error': translate('server.apiError.token_limit_reached', max=API_MAX_TOKENS_PER_USER),'code': 'token_limit_reached','max_tokens': API_MAX_TOKENS_PER_USER,'active_tokens': active,@@ -182,13 +182,13 @@ def revoke_token(token_id):).first()if not api_token:- return jsonify({'error': 'Token not found'}), 404+ return jsonify(api_error('token_not_found')), 404# Delete the tokendb.session.delete(api_token)db.session.commit()- return jsonify({'message': 'Token revoked successfully'}), 200+ return jsonify({'message': translate('server.apiMessage.tokenRevoked')}), 200@tokens_bp.route('/<int:token_id>', methods=['PATCH'])@@ -214,12 +214,12 @@ def update_token(token_id):).first()if not api_token:- return jsonify({'error': 'Token not found'}), 404+ return jsonify(api_error('token_not_found')), 404data = request.get_json() or {}new_name = data.get('name')if 'scopes' not in data and not new_name:- return jsonify({'error': 'name is required'}), 400+ return jsonify(api_error('name_required')), 400# Scopes can only be narrowed (mailr spec G1): a wider set needs a new# token, so a stolen session cannot silently widen an integration token.@@ -232,7 +232,7 @@ def update_token(token_id):new = None if new_value is None else frozenset(__import__('json').loads(new_value))widening = (new is None and current is not None) or (current is not None and not new <= current)if widening:- return jsonify({'error': 'Scopes can only be narrowed; create a new token for more access',+ return jsonify({'error': translate('server.apiError.scope_narrow_only'),'code': 'invalid_parameter'}), 400api_token.scopes = new_valuediff --git a/src/api/webhooks.py b/src/api/webhooks.pyindex 40521172..3408583b 100644--- a/src/api/webhooks.py+++ b/src/api/webhooks.py@@ -17,6 +17,7 @@ from src.utils.token_auth import require_scopefrom src.database import dbfrom src.models import Webhook, WebhookDelivery, WEBHOOK_EVENT_TYPES, generate_webhook_secret+from src.utils.localization import api_errorfrom src.services.webhook_dispatch import (is_url_safe_for_webhook,emit_webhook_event,@@ -37,7 +38,7 @@ def _load_owned(webhook_id: int):"""Return the webhook if the current user owns it, else (None, 404 tuple)."""wh = db.session.get(Webhook, webhook_id)if wh is None or wh.user_id != current_user.id:- return None, (jsonify({'error': 'Webhook not found'}), 404)+ return None, (jsonify(api_error('webhook_not_found')), 404)return wh, None@@ -79,16 +80,16 @@ def create_webhook():enabled = bool(data.get('enabled', True))if not name:- return jsonify({'error': 'name is required'}), 400+ return jsonify(api_error('name_required')), 400if not url:- return jsonify({'error': 'url is required'}), 400+ return jsonify(api_error('url_required')), 400if not isinstance(events, list) or not events:- return jsonify({'error': 'events must be a non-empty list'}), 400+ return jsonify(api_error('invalid_events_list')), 400unknown = [e for e in events if e not in WEBHOOK_EVENT_TYPES]if unknown:return jsonify({- 'error': f'unknown event types: {unknown}',+ **api_error('unknown_event_types', events=', '.join(str(e) for e in unknown)),'allowed': list(WEBHOOK_EVENT_TYPES),}), 400@@ -99,7 +100,7 @@ def create_webhook():existing = Webhook.query.filter_by(user_id=current_user.id).count()if existing >= _max_per_user():return jsonify({- 'error': f'Per-user webhook cap reached ({existing}/{_max_per_user()})',+ **api_error('webhook_cap_reached', count=existing, max=_max_per_user()),'max_per_user': _max_per_user(),}), 409@@ -147,7 +148,7 @@ def update_webhook(webhook_id):if 'name' in data:name = (data.get('name') or '').strip()if not name:- return jsonify({'error': 'name cannot be empty'}), 400+ return jsonify(api_error('name_empty')), 400wh.name = name[:100]if 'url' in data or 'allow_http' in data:new_url = (data.get('url') or wh.url).strip()@@ -160,7 +161,7 @@ def update_webhook(webhook_id):if 'events' in data:events = data.get('events') or []if not isinstance(events, list) or not events:- return jsonify({'error': 'events must be a non-empty list'}), 400+ return jsonify(api_error('invalid_events_list')), 400try:wh.event_list = eventsexcept ValueError as e:@@ -235,7 +236,7 @@ def test_fire(webhook_id):if err:return errif not wh.enabled:- return jsonify({'error': 'Webhook is disabled; enable it first'}), 409+ return jsonify(api_error('webhook_disabled')), 409import uuidfrom src.services.webhook_dispatch import _build_envelope, serialize_envelope@@ -292,7 +293,7 @@ def get_delivery(webhook_id, delivery_id):return errd = db.session.get(WebhookDelivery, delivery_id)if not d or d.webhook_id != wh.id:- return jsonify({'error': 'Delivery not found'}), 404+ return jsonify(api_error('delivery_not_found')), 404payload = d.to_dict()payload['payload'] = d.payload # full body, for debuggingreturn jsonify(payload)@@ -308,7 +309,7 @@ def replay_delivery(webhook_id, delivery_id):return errsrc = db.session.get(WebhookDelivery, delivery_id)if not src or src.webhook_id != wh.id:- return jsonify({'error': 'Delivery not found'}), 404+ return jsonify(api_error('delivery_not_found')), 404import uuidimport json as _jsondiff --git a/src/app.py b/src/app.pyindex ce759b61..f7aff960 100644--- a/src/app.py+++ b/src/app.py@@ -42,6 +42,7 @@ import loggingimport secretsimport timefrom src.audio_chunking import AudioChunkingService, ChunkProcessingError, ChunkingNotSupportedError+from src.utils.localization import api_error, format_number, translate# Optional imports for embedding functionalitytry:@@ -753,7 +754,7 @@ def enforce_token_scopes():if api_token is None or api_token.scope_set is None:returnif via_query:- resp = jsonify({'error': 'Scoped tokens are accepted only in a header (Authorization: Bearer ...)',+ resp = jsonify({'error': translate('server.apiError.scoped_token_header_only'),'code': 'invalid_token'})resp.status_code = 401return resp@@ -777,16 +778,14 @@ def _csrf_rejection_message(reason):(issue #388). Those get a message that names the proxy setting."""if 'referrer header is missing' in reason:- return False, ('The request was rejected because the browser sent no Referer header, '- 'which HTTPS requests require. A reverse proxy, browser extension or '- 'Referrer-Policy header that removes it causes this.')+ return False, translate('server.apiError.csrf_referrer_missing')if 'referrer does not match' in reason:- referrer_host = urlparse(request.referrer or '').netloc or 'unknown'- return False, (f'The request was rejected because this page was loaded from '- f'{referrer_host}, but the server received the request for {request.host}. '- f'The reverse proxy must forward the original Host header (or '- f'X-Forwarded-Host), and TRUSTED_PROXY_HOPS must match the number of proxies.')- return True, 'Your session has expired. Please reload the page and try again.'+ referrer_host = urlparse(request.referrer or '').netloc+ if not referrer_host:+ return False, translate('server.apiError.csrf_referrer_mismatch_unknown', host=request.host)+ return False, translate('server.apiError.csrf_referrer_mismatch',+ referrerHost=referrer_host, host=request.host)+ return True, translate('server.apiError.csrf_session_expired')@app.errorhandler(CSRFError)@@ -823,7 +822,7 @@ def handle_request_entity_too_large(_error):"""Keep oversized requests JSON-shaped even when parsing fails early."""limit_mb = float(app.config['MAX_CONTENT_LENGTH']) / (1024 * 1024)return jsonify({- 'error': f'File too large. Maximum size is {limit_mb:.0f} MB.',+ **api_error('file_too_large_max', maxSize=format_number(limit_mb)),'max_size_mb': limit_mb,'effective_limit_mb': limit_mb,'audio_only_mode': False,@@ -974,7 +973,7 @@ def handle_unauthorized():or request.args.get('token'))if request.path.startswith('/api/') or presented_token:- response = jsonify({'error': 'Authentication required: missing, invalid, expired, or revoked API token or session'})+ response = jsonify(api_error('authentication_required'))response.status_code = 401response.headers['WWW-Authenticate'] = 'Bearer'return responsediff --git a/src/config/startup.py b/src/config/startup.pyindex bb2ba8c7..6759430c 100644--- a/src/config/startup.py+++ b/src/config/startup.py@@ -7,6 +7,7 @@ import timeimport threadingfrom datetime import datetime, timedeltafrom flask import current_app+from src.utils.localization import api_errorENABLE_AUTO_DELETION = os.environ.get('ENABLE_AUTO_DELETION', 'false').lower() == 'true'GLOBAL_RETENTION_DAYS = int(os.environ.get('GLOBAL_RETENTION_DAYS', '0'))@@ -99,7 +100,7 @@ def get_file_monitor_functions(app):def stop_file_monitor():passdef get_file_monitor_status():- return {'running': False, 'error': 'File monitor module not available'}+ return {'running': False, **api_error('file_monitor_unavailable')}return start_file_monitor, stop_file_monitor, get_file_monitor_statusdiff --git a/src/models/api_token.py b/src/models/api_token.pyindex 5c78ddb8..b3681364 100644--- a/src/models/api_token.py+++ b/src/models/api_token.py@@ -20,18 +20,20 @@ def parse_scopes(value):"""Validate a requested scope list. Returns (stored_value, error).stored_value is None for full access, else a JSON list. error is a message- for a 400 answer, or None.+ for a 400 answer in the interface language (#477), or None."""+ from src.utils.localization import translateif not isinstance(value, list) or not value or not all(isinstance(v, str) for v in value):- return None, 'scopes must be a non-empty list of scope names'+ return None, translate('server.apiError.invalid_scopes_list')requested = {v.strip() for v in value}if FULL_SCOPE in requested:if len(requested) > 1:- return None, "'full' cannot be combined with other scopes"+ return None, translate('server.apiError.full_scope_not_combinable')return None, Noneunknown = sorted(requested - set(TOKEN_SCOPES))if unknown:- return None, f"Unknown scope(s): {', '.join(unknown)}. Allowed: {', '.join(TOKEN_SCOPES)} or full"+ return None, translate('server.apiError.unknown_scopes', scopes=', '.join(unknown),+ allowed=', '.join(TOKEN_SCOPES))return json.dumps(sorted(requested)), Nonediff --git a/src/models/sharing.py b/src/models/sharing.pyindex 96c3d763..4d742537 100644--- a/src/models/sharing.py+++ b/src/models/sharing.py@@ -152,7 +152,8 @@ class InternalShare(db.Model):requested_permissions: Dict with 'can_edit' and 'can_reshare' flagsReturns:- Tuple of (is_valid: bool, error_message: str or None)+ Tuple of (is_valid: bool, error code: str or None); the code is a+ server.apiError key (#477)"""# Owner can grant anythingif recording.user_id == grantor_user.id:@@ -163,11 +164,11 @@ class InternalShare(db.Model):# Validate edit permissionif requested_permissions.get('can_edit', False) and not max_permissions['can_edit']:- return False, "You cannot grant edit permission because you do not have edit access"+ return False, 'reshare_edit_not_permitted'# Validate reshare permissionif requested_permissions.get('can_reshare', False) and not max_permissions['can_reshare']:- return False, "You cannot grant reshare permission because you do not have reshare access"+ return False, 'reshare_reshare_not_permitted'return True, Nonediff --git a/src/services/inquire_agent.py b/src/services/inquire_agent.pyindex eeb9d1fe..0b66526a 100644--- a/src/services/inquire_agent.py+++ b/src/services/inquire_agent.py@@ -34,6 +34,7 @@ from src.services.embeddings import (basic_text_search_chunks,)from src.services.llm import call_chat_completion, TokenBudgetExceeded, get_chat_config+from src.utils.localization import translate# ---------------------------------------------------------------------------# Configuration (read live so tests and admins can tweak without restart)@@ -880,7 +881,7 @@ def run_inquire_agent(app, user_id, user_ctx, user_message, message_history,usage_pct = min(int(est * 100 / budget), 100)yield _sse({'context_usage': usage_pct})if est > budget * 0.6 and len(history) > KEEP_VERBATIM_MESSAGES:- yield _sse({'status': 'compacting', 'message': 'Summarizing earlier conversation...'})+ yield _sse({'status': 'compacting', 'message': translate('server.apiMessage.summarizingConversation')})memory, history, folded = compact_history(user_id, memory, history)if folded:yield _sse({'context_compacted': {'memory': memory, 'keep_last': KEEP_VERBATIM_MESSAGES}})diff --git a/src/services/llm.py b/src/services/llm.pyindex 678da7bb..74ae6e4d 100644--- a/src/services/llm.py+++ b/src/services/llm.py@@ -288,6 +288,10 @@ def is_using_openai_api():+class LLMNotConfiguredError(ValueError):+ """No text model is configured; the API answers with text_model_not_configured."""++def call_llm_completion(messages, temperature=0.7, response_format=None, stream=False, max_tokens=None,user_id=None, operation_type=None):"""@@ -306,7 +310,7 @@ def call_llm_completion(messages, temperature=0.7, response_format=None, stream=OpenAI completion object or generator (if streaming)"""if not client:- raise ValueError("No text model is configured. Set TEXT_MODEL_BASE_URL, and TEXT_MODEL_API_KEY for a hosted service.")+ raise LLMNotConfiguredError("No text model is configured. Set TEXT_MODEL_BASE_URL, and TEXT_MODEL_API_KEY for a hosted service.")# Check budget before making the callif user_id and operation_type:diff --git a/src/services/reprocessing.py b/src/services/reprocessing.pyindex 64130c05..a4944a93 100644--- a/src/services/reprocessing.py+++ b/src/services/reprocessing.py@@ -15,13 +15,22 @@ IN_PROGRESS = ('QUEUED', 'PROCESSING', 'SUMMARIZING')class ReprocessError(Exception):- """A reprocess request that cannot be queued; status is the HTTP status."""+ """A reprocess request that cannot be queued; status is the HTTP status.- def __init__(self, message, status=400):- super().__init__(message)- self.message = message+ code is a server.apiError key (#477); message is its text in the+ interface language, looked up when read (during the request).+ """++ def __init__(self, code, status=400):+ super().__init__(code)+ self.code = codeself.status = status+ @property+ def message(self):+ from src.utils.localization import translate+ return translate(f'server.apiError.{self.code}')+def queue_transcription_reprocess(recording, user, overrides=None):"""Clear the transcript, summary and events and queue a new transcription.@@ -37,9 +46,9 @@ def queue_transcription_reprocess(recording, user, overrides=None):if recording.audio_deleted_at or not recording.audio_path \or not get_storage_service().exists(recording.audio_path):- raise ReprocessError('Audio file not found for reprocessing', 404)+ raise ReprocessError('reprocess_audio_not_found', 404)if recording.status in IN_PROGRESS:- raise ReprocessError('Recording is already being processed', 400)+ raise ReprocessError('recording_already_processing', 400)# Settings first: a lookup that raises after the clearing below has# committed leaves a QUEUED recording with no job and no transcript,@@ -65,7 +74,7 @@ def queue_transcription_reprocess(recording, user, overrides=None):from src.tasks.processing import _sanitize_error_messagerecording.error_message = _sanitize_error_message(f'Could not queue reprocessing: {e}')db.session.commit()- raise ReprocessError('Could not queue reprocessing; please try again', 503) from e+ raise ReprocessError('reprocess_queue_failed', 503) from edef queue_summary_reprocess(recording, user, custom_prompt=None, prompt_mode='replace',@@ -82,13 +91,13 @@ def queue_summary_reprocess(recording, user, custom_prompt=None, prompt_mode='refrom src.utils.prompt_variables import sanitize_variable_valuesif not recording.transcription or len(recording.transcription.strip()) < 10:- raise ReprocessError('No valid transcription available for summary generation', 400)+ raise ReprocessError('no_transcription_for_summary', 400)if is_transcription_error(recording.transcription):- raise ReprocessError('Cannot generate summary: transcription failed. Please reprocess the transcription first.', 400)+ raise ReprocessError('summary_blocked_transcription_failed', 400)if recording.status in ('PROCESSING', 'SUMMARIZING'):- raise ReprocessError('Recording is already being processed', 400)+ raise ReprocessError('recording_already_processing', 400)if llm.client is None:- raise ReprocessError('Summary service is not available (LLM client not configured)', 503)+ raise ReprocessError('summary_llm_not_configured', 503)custom_prompt = (custom_prompt or '').strip() or Nonemode = (prompt_mode or 'replace').strip().lower()diff --git a/src/services/retention.py b/src/services/retention.pyindex 1e00de46..9d352d04 100644--- a/src/services/retention.py+++ b/src/services/retention.py@@ -9,6 +9,7 @@ from flask import current_appfrom src.database import dbfrom src.models import Recording, RecordingTag, Tagfrom src.services.storage import get_storage_service+from src.utils.localization import api_errorENABLE_AUTO_DELETION = os.environ.get('ENABLE_AUTO_DELETION', 'false').lower() == 'true'GLOBAL_RETENTION_DAYS = int(os.environ.get('GLOBAL_RETENTION_DAYS', '0'))@@ -88,7 +89,7 @@ def process_auto_deletion():Dictionary with deletion statistics"""if not ENABLE_AUTO_DELETION:- return {'error': 'Auto-deletion is not enabled'}+ return api_error('auto_deletion_disabled')# Check if any retention policy exists (global or tag-level)has_global_retention = GLOBAL_RETENTION_DAYS > 0diff --git a/src/services/speaker_merge.py b/src/services/speaker_merge.pyindex 78958d82..fe2ac970 100644--- a/src/services/speaker_merge.py+++ b/src/services/speaker_merge.py@@ -334,13 +334,14 @@ def can_merge_speakers(speaker_ids, user_id):user_id: ID of the userReturns:- tuple: (bool, str) - (can_merge, error_message)+ tuple: (bool, str) - (can_merge, error code): the code is a+ server.apiError key (#477), '' when the merge can go ahead"""if len(speaker_ids) < 2:- return False, "Need at least 2 speakers to merge"+ return False, 'merge_needs_two_speakers'if len(speaker_ids) != len(set(speaker_ids)):- return False, "Duplicate speaker IDs provided"+ return False, 'duplicate_speaker_ids'speakers = Speaker.query.filter(Speaker.id.in_(speaker_ids),@@ -348,6 +349,6 @@ def can_merge_speakers(speaker_ids, user_id):).all()if len(speakers) != len(speaker_ids):- return False, "Some speakers don't exist or don't belong to user"+ return False, 'speakers_not_found_or_not_owned'return True, ""diff --git a/src/services/webhook_dispatch.py b/src/services/webhook_dispatch.pyindex 7c8486e8..50837c30 100644--- a/src/services/webhook_dispatch.py+++ b/src/services/webhook_dispatch.py@@ -266,30 +266,42 @@ def _http_post(url, **kwargs):return ssrf_guarded_session().post(url, **kwargs)-def is_url_safe_for_webhook(url: str, allow_http: bool = False) -> tuple:+def is_url_safe_for_webhook(url: str, allow_http: bool = False, language=None) -> tuple:"""Validate a webhook URL.Returns ``(ok: bool, reason: str)``. ``ok`` is False when the URLpoints at a private/loopback/link-local IP (unless the``WEBHOOK_INTRANET_HOST_ALLOWLIST`` regex matches the hostname), or- uses an unsupported scheme.+ uses an unsupported scheme. ``reason`` is in ``language``, else the+ interface language of the current request (#477)."""+ problem = webhook_url_problem(url, allow_http)+ if problem is None:+ return True, ''+ from src.utils.localization import translate+ code, params = problem+ return False, translate(f'server.apiError.{code}', language, **params)+++def webhook_url_problem(url: str, allow_http: bool = False):+ """The check behind is_url_safe_for_webhook: None for a safe URL, else+ (server.apiError code, placeholder values)."""if not url:- return False, 'URL is required'+ return 'url_required', {}try:parsed = urlparse(url)except Exception:- return False, 'URL could not be parsed'+ return 'webhook_url_unparseable', {}scheme = (parsed.scheme or '').lower()if scheme not in ('http', 'https'):- return False, 'Scheme must be http or https'+ return 'webhook_url_bad_scheme', {}if scheme == 'http' and not allow_http:- return False, 'http:// URLs require allow_http=true'+ return 'webhook_url_http_not_allowed', {}host = parsed.hostnameif not host:- return False, 'URL is missing a host'+ return 'webhook_url_missing_host', {}# Always resolve and inspect every address the hostname maps to,# THEN decide whether the allowlist permits a private/loopback IP.@@ -302,7 +314,7 @@ def is_url_safe_for_webhook(url: str, allow_http: bool = False) -> tuple:try:addrinfos = socket.getaddrinfo(host, None)except socket.gaierror:- return False, f'DNS resolution failed for {host!r}'+ return 'webhook_dns_failed', {'host': host}allowlist = _intranet_host_allowlist()host_lower = host.lower()@@ -315,15 +327,9 @@ def is_url_safe_for_webhook(url: str, allow_http: bool = False) -> tuple:except ValueError:continueif _is_blocked_ip(ip_str) and not allowlist_matches:- return False, (- f'URL resolves to a private/loopback address ({ip_str}); '- 'set WEBHOOK_INTRANET_HOST_ALLOWLIST to permit this host '- 'explicitly, or use a public URL. The allowlist regex '- 'should be anchored (e.g. r"^(localhost|.*\\.intra)$") '- 'so it cannot be tricked by lookalike hostnames.'- )+ return 'webhook_url_private_address', {'ip': ip_str}- return True, ''+ return None# ---- Signing & headers -----------------------------------------------------@@ -528,7 +534,9 @@ def _post_delivery(delivery: WebhookDelivery, webhook: Webhook) -> tuple:# an internal target would otherwise be an exfiltration channel). A transient# DNS failure is NOT treated as a block — no resolution means no connection# and thus no SSRF; we let requests surface it as a normal network error.- safe, reason = is_url_safe_for_webhook(webhook.url, allow_http=bool(webhook.allow_http))+ # English: the reason goes into the stored delivery log, and the check+ # below matches its text.+ safe, reason = is_url_safe_for_webhook(webhook.url, allow_http=bool(webhook.allow_http), language='en')if not safe and 'resolves to a private' in reason:return None, None, f'blocked at delivery: {reason}'[:500]diff --git a/src/tasks/processing.py b/src/tasks/processing.pyindex c9e21129..35c265c1 100644--- a/src/tasks/processing.py+++ b/src/tasks/processing.py@@ -2743,8 +2743,10 @@ def transcribe_incognito(filepath, original_filename, language=None, min_speaker# response gets a fixed message instead.if isinstance(e, FFmpegNotFoundError):result['error'] = 'Audio conversion tool (FFmpeg) not found on server.'+ result['error_code'] = 'audio_converter_missing'elif isinstance(e, FFmpegTimeoutError):result['error'] = 'Audio conversion timed out.'+ result['error_code'] = 'audio_conversion_timeout'elif isinstance(e, FFmpegError):result['error'] = AUDIO_DECODE_FAILED_MESSAGEresult['error_code'] = 'audio_decode_failed'diff --git a/src/utils/filename_dates.py b/src/utils/filename_dates.pyindex 9c630af5..0eb8d4b2 100644--- a/src/utils/filename_dates.py+++ b/src/utils/filename_dates.py@@ -178,21 +178,21 @@ def parse_filename_date(filename: str, pattern_key: str = 'auto',def validate_custom_regex(custom_regex: str) -> Optional[str]:"""- Validate a user-supplied custom regex. Returns an error message string,- or None when the regex is acceptable.+ Validate a user-supplied custom regex. Returns an error message string+ in the interface language (#477), or None when the regex is acceptable."""+ from src.utils.localization import translateif not custom_regex or not custom_regex.strip():- return 'Custom pattern is required when the custom option is selected.'+ return translate('server.apiError.custom_date_pattern_required')if len(custom_regex) > 500:- return 'Custom pattern is too long (max 500 characters).'+ return translate('server.apiError.custom_date_pattern_too_long')try:compiled = re.compile(custom_regex)except re.error as e:- return f'Invalid regular expression: {e}'+ return translate('server.apiError.invalid_regular_expression', detail=str(e))required = {'year', 'month', 'day'}missing = required - set(compiled.groupindex.keys())if missing:- return ('Custom pattern must define named groups (?P<year>...), '- '(?P<month>...) and (?P<day>...); missing: '- + ', '.join(sorted(missing)))+ return translate('server.apiError.custom_date_pattern_missing_groups',+ groups=', '.join(sorted(missing)))return Nonediff --git a/static/locales/de.json b/static/locales/de.jsonindex 0f5e9070..0dbd2960 100644--- a/static/locales/de.json+++ b/static/locales/de.json@@ -2431,6 +2431,406 @@"tokenWarning": "Warnung: {{percent}} des monatlichen Token-Budgets verbraucht.","transcriptionExceeded": "Monatliches Transkriptionsbudget überschritten ({{used}}/{{budget}} Minuten). Wenden Sie sich für mehr Zeit an den Administrator.","transcriptionWarning": "Warnung: {{percent}} des monatlichen Transkriptionsbudgets verbraucht."+ },+ "apiError": {+ "access_denied": "Zugriff verweigert",+ "admin_required": "Administratorzugriff erforderlich",+ "already_group_member": "Der Benutzer ist bereits Mitglied dieser Gruppe",+ "already_shared": "Die Aufnahme wurde bereits mit diesem Benutzer geteilt",+ "audio_access_denied": "Sie haben keine Berechtigung, auf diese Audiodatei zuzugreifen",+ "audio_already_removed": "Das Audio wurde bereits entfernt.",+ "audio_conversion_timeout": "Zeitüberschreitung bei der Audiokonvertierung.",+ "audio_converter_missing": "Das Audiokonvertierungstool (FFmpeg) wurde auf dem Server nicht gefunden.",+ "audio_decode_failed": "Die hochgeladene Datei konnte nicht als Audio gelesen werden. Sie ist möglicherweise beschädigt oder hat ein nicht unterstütztes Format.",+ "audio_deleted": "Die Audiodatei wurde gelöscht",+ "audio_file_missing": "Die Audiodatei fehlt auf dem Server",+ "audio_file_not_found": "Audiodatei nicht gefunden",+ "audio_remove_while_processing": "Warten Sie, bis die Verarbeitung abgeschlossen ist, bevor Sie das Audio entfernen.",+ "authentication_failed": "Authentifizierung fehlgeschlagen",+ "authentication_required": "Authentifizierung erforderlich: API-Token oder Sitzung fehlt, ist ungültig, abgelaufen oder widerrufen",+ "auto_deletion_disabled": "Das automatische Löschen ist nicht aktiviert",+ "auto_export_disabled": "Der automatische Export ist auf diesem Server nicht aktiviert",+ "auto_processing_disabled": "Die automatische Verarbeitung ist nicht aktiviert",+ "auto_processing_not_running": "Die automatische Verarbeitung läuft nicht",+ "batch_limit_50": "Maximal 50 Aufnahmen pro Stapel",+ "bulk_delete_limit": "Es können nicht mehr als 100 Aufnahmen auf einmal gelöscht werden",+ "bulk_reprocess_limit": "Es können nicht mehr als 50 Aufnahmen auf einmal neu verarbeitet werden",+ "bulk_update_limit": "Es können nicht mehr als 100 Aufnahmen auf einmal aktualisiert werden",+ "cannot_change_own_admin": "Sie können Ihren eigenen Administratorstatus nicht ändern",+ "cannot_delete_self": "Sie können Ihr eigenes Konto nicht löschen",+ "chat_blocked_transcription_failed": "Chat nicht möglich: Die Transkription ist fehlgeschlagen. Bitte verarbeiten Sie zuerst die Transkription neu.",+ "chat_client_not_configured": "Der Chat-Dienst ist nicht verfügbar (Chat-Client nicht konfiguriert)",+ "chat_error": "Beim Chat ist ein Fehler aufgetreten",+ "chat_failed": "Chat fehlgeschlagen",+ "chat_openrouter_not_configured": "Der Chat-Dienst ist nicht verfügbar (OpenRouter-Client nicht konfiguriert)",+ "chat_unavailable": "Chat-Dienst nicht verfügbar",+ "chunk_empty": "Leerer Chunk-Inhalt",+ "chunk_out_of_order": "Chunk in falscher Reihenfolge",+ "chunk_processing_failed": "Chunks konnten nicht verarbeitet werden",+ "chunk_too_large": "Chunk überschreitet max_chunk_bytes",+ "chunk_write_failed": "Der Server konnte den Chunk nicht schreiben",+ "csrf_referrer_mismatch": "Die Anfrage wurde abgelehnt, weil diese Seite von {{referrerHost}} geladen wurde, der Server die Anfrage aber für {{host}} erhalten hat. Der Reverse-Proxy muss den ursprünglichen Host-Header (oder X-Forwarded-Host) weiterleiten, und TRUSTED_PROXY_HOPS muss der Anzahl der Proxys entsprechen.",+ "csrf_referrer_mismatch_unknown": "Die Anfrage wurde abgelehnt, weil die Seite von einem anderen Host als {{host}} geladen wurde, für den der Server die Anfrage erhalten hat. Der Reverse-Proxy muss den ursprünglichen Host-Header (oder X-Forwarded-Host) weiterleiten, und TRUSTED_PROXY_HOPS muss der Anzahl der Proxys entsprechen.",+ "csrf_referrer_missing": "Die Anfrage wurde abgelehnt, weil der Browser keinen Referer-Header gesendet hat, den HTTPS-Anfragen benötigen. Ursache ist ein Reverse-Proxy, eine Browsererweiterung oder ein Referrer-Policy-Header, der ihn entfernt.",+ "csrf_session_expired": "Ihre Sitzung ist abgelaufen. Bitte laden Sie die Seite neu und versuchen Sie es erneut.",+ "cursor_expired": "Der Cursor ist zu alt; beginnen Sie erneut ohne Cursor",+ "custom_date_pattern_missing_groups": "Das eigene Muster muss die benannten Gruppen (?P<year>...), (?P<month>...) und (?P<day>...) definieren; es fehlen: {{groups}}",+ "custom_date_pattern_required": "Bei der Option „Eigenes Muster“ ist ein Muster erforderlich.",+ "custom_date_pattern_too_long": "Das eigene Muster ist zu lang (höchstens 500 Zeichen).",+ "delete_failed": "Löschen fehlgeschlagen",+ "delete_owner_only": "Zugriff verweigert - nur der Eigentümer kann löschen",+ "deletion_not_allowed": "Löschen nicht erlaubt",+ "delivery_not_found": "Zustellung nicht gefunden",+ "duplicate_speaker_ids": "Doppelte Sprecher-IDs angegeben",+ "email_exists": "Die E-Mail-Adresse existiert bereits",+ "empty_file": "Die hochgeladene Datei ist leer.",+ "enabled_field_required": "Das Feld enabled ist erforderlich",+ "event_not_found": "Ereignis nicht gefunden",+ "export_rename_failed": "Vorhandene Exporte konnten nicht umbenannt werden",+ "export_template_not_found": "Exportvorlage nicht gefunden",+ "external_ref_pair_required": "external_system und external_ref müssen zusammen angegeben werden",+ "extracted_audio_too_large": "Das extrahierte Audio ist {{size}} MB groß und überschreitet das Limit von {{limit}} MB für gespeicherte Dateien. Aktivieren Sie die Aufteilung in Abschnitte in den Admin-Einstellungen (ENABLE_CHUNKING=true) oder verwenden Sie ein kürzeres Quellvideo bzw. eines mit niedrigerer Bitrate.",+ "ffmpeg_missing": "FFmpeg wurde auf dem Server nicht gefunden",+ "file_monitor_unavailable": "Das Dateiüberwachungsmodul ist nicht verfügbar",+ "file_too_large": "Datei zu groß",+ "file_too_large_max": "Datei zu groß. Die maximale Größe beträgt {{maxSize}} MB.",+ "filename_too_long": "filename darf höchstens 255 Zeichen lang sein",+ "folder_access_denied": "Sie haben keinen Zugriff auf diesen Ordner",+ "folder_delete_denied": "Sie haben keine Berechtigung, diesen Ordner zu löschen",+ "folder_edit_denied": "Sie haben keine Berechtigung, diesen Ordner zu bearbeiten",+ "folder_group_assign_admin_only": "Nur Gruppenadministratoren können Ordner Gruppen zuweisen",+ "folder_id_not_found": "Ordner {{folderId}} nicht gefunden",+ "folder_name_exists": "Ein Ordner mit diesem Namen existiert bereits",+ "folder_name_exists_for_group": "Für diese Gruppe existiert bereits ein Ordner mit diesem Namen",+ "folder_name_required": "Der Ordnername ist erforderlich",+ "folder_not_found": "Ordner nicht gefunden",+ "folder_rename_conflict": "Ein anderer Ordner mit diesem Namen existiert bereits",+ "folders_disabled": "Die Ordnerfunktion ist nicht aktiviert",+ "forbidden_tag_ids": "Unbekannte oder unzulässige Tag-IDs",+ "full_scope_not_combinable": "'full' kann nicht mit anderen Bereichen kombiniert werden",+ "global_stats_admin_only": "Für globale Statistiken ist Administratorzugriff erforderlich",+ "group_folder_create_admin_only": "Nur Gruppenadministratoren können Gruppenordner erstellen",+ "group_folder_delete_admin_only": "Nur Gruppenadministratoren können Gruppenordner löschen",+ "group_folder_edit_admin_only": "Nur Gruppenadministratoren können Gruppenordner bearbeiten",+ "group_folder_name_exists": "Ein Gruppenordner mit diesem Namen existiert bereits",+ "group_folders_members_only": "Sie müssen Team-Mitglied sein, um Gruppenordner anzuzeigen",+ "group_folders_require_internal_sharing": "Gruppenordner erfordern, dass die interne Freigabe aktiviert ist. Bitte setzen Sie ENABLE_INTERNAL_SHARING=true in Ihrer Konfiguration.",+ "group_name_exists": "Eine Gruppe mit diesem Namen existiert bereits",+ "group_name_required": "Der Gruppenname ist erforderlich",+ "group_not_found": "Gruppe nicht gefunden",+ "group_tag_apply_denied": "Sie haben keine Berechtigung, dieser Aufnahme Gruppen-Tags zuzuweisen",+ "group_tag_apply_restricted": "Nur der Eigentümer der Aufnahme oder ein Gruppenadministrator kann Gruppen-Tags zuweisen",+ "group_tag_create_admin_only": "Nur Gruppenadministratoren können Gruppen-Tags erstellen",+ "group_tag_delete_admin_only": "Nur Gruppenadministratoren können Gruppen-Tags löschen",+ "group_tag_edit_admin_only": "Nur Gruppenadministratoren können Gruppen-Tags bearbeiten",+ "group_tag_name_exists": "Ein Gruppen-Tag mit diesem Namen existiert bereits",+ "group_tag_name_exists_for_group": "Für diese Gruppe existiert bereits ein Tag mit diesem Namen",+ "group_tag_remove_denied": "Sie haben keine Berechtigung, Gruppen-Tags von dieser Aufnahme zu entfernen",+ "group_tag_remove_restricted": "Nur der Eigentümer der Aufnahme oder ein Gruppenadministrator kann Gruppen-Tags entfernen",+ "group_tags_members_only": "Sie müssen Team-Mitglied sein, um Gruppen-Tags anzuzeigen",+ "group_tags_require_internal_sharing": "Gruppen-Tags erfordern, dass die interne Freigabe aktiviert ist. Bitte setzen Sie ENABLE_INTERNAL_SHARING=true in Ihrer Konfiguration.",+ "groups_require_internal_sharing": "Gruppen erfordern, dass die interne Freigabe aktiviert ist. Bitte setzen Sie ENABLE_INTERNAL_SHARING=true in Ihrer Konfiguration.",+ "incognito_disabled": "Der Inkognito-Modus ist auf diesem Server nicht aktiviert",+ "inquire_agent_off": "Der Inquire-Agent ist auf diesem Server ausgeschaltet",+ "inquire_disabled": "Der Inquire-Modus ist nicht aktiviert",+ "inquire_off": "Inquire ist auf diesem Server ausgeschaltet",+ "internal_sharing_disabled": "Die interne Freigabe ist nicht aktiviert",+ "invalid_boolean_flag": "{{key}} muss true oder false sein",+ "invalid_boolean_value": "Der Wert muss ein gültiger boolescher Wert sein (true/false, 1/0, yes/no)",+ "invalid_bulk_status_field": "Das Feld muss \"inbox\", \"highlight\" oder \"archive\" sein",+ "invalid_bulk_tag_action": "Die Aktion muss \"add\" oder \"remove\" sein",+ "invalid_color_scheme": "Ungültiges color_scheme",+ "invalid_cursor": "Der Cursor konnte nicht gelesen werden",+ "invalid_dark_mode": "Ungültiger dark_mode",+ "invalid_date_field": "date_field muss meeting_date oder created_at sein",+ "invalid_events_list": "events muss eine nicht leere Liste sein",+ "invalid_expires_in_days": "expires_in_days muss eine nicht negative ganze Zahl sein",+ "invalid_expires_in_days_range": "expires_in_days muss zwischen 1 und 3650 liegen",+ "invalid_filters": "filters muss ein Objekt sein",+ "invalid_finalize_body": "Der finalize-Body muss ein JSON-Objekt sein",+ "invalid_folder_id": "folder_id muss eine ID oder none sein",+ "invalid_group_role": "Die Rolle muss \"admin\" oder \"member\" sein",+ "invalid_idempotency_key": "idempotency_key muss 1 bis 100 Zeichen lang sein",+ "invalid_ids_list": "ids muss eine Liste sein",+ "invalid_inquire_mode": "mode muss rag, agent oder auto sein",+ "invalid_integer_value": "Der Wert muss eine gültige ganze Zahl sein",+ "invalid_is_archived": "is_archived muss ein boolescher Wert sein",+ "invalid_json": "Ungültiges JSON",+ "invalid_limit": "limit muss zwischen 1 und 500 liegen",+ "invalid_max_segments": "max_segments muss mindestens 1 sein",+ "invalid_meeting_date": "Ungültiges meeting_date-Format",+ "invalid_number_value": "Der Wert muss eine gültige Zahl sein",+ "invalid_options_list": "options muss eine Liste sein",+ "invalid_query_length": "q muss 2 bis 500 Zeichen lang sein",+ "invalid_recording_ids": "Ungültige Aufnahme-IDs",+ "invalid_recording_ids_csv": "recording_ids muss eine kommagetrennte Liste von IDs sein",+ "invalid_recording_ids_list": "recording_ids muss eine Liste sein",+ "invalid_regex_pattern": "Ungültiges Regex-Muster für \"{{variable}}\": {{detail}}",+ "invalid_regex_patterns": "regex_patterns muss ein Dictionary sein",+ "invalid_regular_expression": "Ungültiger regulärer Ausdruck: {{detail}}",+ "invalid_reprocess_type": "Der Typ muss \"transcription\" oder \"summary\" sein",+ "invalid_scope": "scope muss own, shared oder all sein",+ "invalid_scopes_list": "scopes muss eine nicht leere Liste von Bereichsnamen sein",+ "invalid_search_mode": "mode muss keyword, semantic oder auto sein",+ "invalid_search_paging": "limit muss zwischen 1 und 50 liegen und page mindestens 1 sein",+ "invalid_setting_type": "Ungültiger Einstellungstyp. Zulässig ist einer der folgenden: {{types}}",+ "invalid_snippet_range": "Ungültige Startzeit oder Dauer",+ "invalid_source_ids": "source_ids muss eine nicht leere Liste sein",+ "invalid_speaker_aliases": "aliases muss eine Liste von Zeichenketten sein",+ "invalid_speaker_count_mode": "Ungültiger speaker_count_mode",+ "invalid_speaker_email": "email muss eine E-Mail-Adresse sein",+ "invalid_speaker_map": "speaker_map muss ein Objekt sein",+ "invalid_speaker_value_type": "Ungültiger Werttyp für Sprecher \"{{label}}\"",+ "invalid_storage_quota": "Das Speicherkontingent muss eine positive Anzahl MB sein.",+ "invalid_subscription_data": "Ungültige Abonnementdaten",+ "invalid_tag_color": "Die Farbe muss ein Hex-Wert wie #3B82F6 sein",+ "invalid_tag_ids": "tag_ids muss eine Liste sein",+ "invalid_tag_ids_list": "tag_ids muss eine Liste von Tag-IDs sein",+ "invalid_temperature": "Die Temperatur für {{kind}} muss eine Zahl zwischen 0 und 2 sein",+ "invalid_temperature_values": "values muss ein Objekt mit Temperaturen sein",+ "invalid_threshold": "Ungültiger Schwellenwert",+ "invalid_timezone_value": "Der Wert muss eine gültige IANA-Zeitzone sein, zum Beispiel Europe/Berlin",+ "invalid_total_bytes": "total_bytes muss eine positive ganze Zahl sein",+ "invalid_transcript_data": "Ungültige Transkriptdaten übermittelt",+ "invalid_updated_since": "updated_since muss ein Datum mit Uhrzeit nach ISO 8601 sein",+ "invalid_username_length": "Der Benutzername muss 2 bis 20 Zeichen lang sein.",+ "invalid_with_sources": "with_sources muss true oder false sein",+ "job_not_found": "Auftrag nicht gefunden",+ "job_retry_failed_only": "Nur fehlgeschlagene Aufträge können wiederholt werden",+ "keep_audio_only_immutable": "keep_audio_only wird beim Hochladen festgelegt und kann danach nicht mehr geändert werden.",+ "last_admin_demotion": "Dem letzten verbleibenden Administrator können die Administratorrechte nicht entzogen werden.",+ "llm_connection_failed": "Verbindung zum LLM-Server nicht möglich. Bitte prüfen Sie, ob Ihr LLM-Dienst läuft.",+ "membership_not_found": "Mitgliedschaft nicht gefunden",+ "merge_failed": "Aufnahmen konnten nicht zusammengeführt werden",+ "merge_needs_two": "Wählen Sie mindestens zwei Aufnahmen zum Zusammenführen aus",+ "merge_needs_two_speakers": "Zum Zusammenführen werden mindestens 2 Sprecher benötigt",+ "message_required": "message ist erforderlich",+ "missing_bulk_status_fields": "recording_ids, field oder value fehlt",+ "missing_recording_ids": "recording_ids fehlt",+ "missing_recording_ids_or_tag_id": "recording_ids oder tag_id fehlt",+ "missing_request_body": "Anfrage-Body fehlt",+ "missing_required_field": "Pflichtfeld fehlt: {{field}}",+ "missing_tag_ids": "tag_ids fehlt im Anfrage-Body",+ "name_and_prompt_required": "Name und ein Prompt oder Hotwords sind erforderlich",+ "name_and_template_required": "Name und Vorlage sind erforderlich",+ "name_empty": "name darf nicht leer sein",+ "name_required": "name ist erforderlich",+ "naming_template_not_found": "Benennungsvorlage nicht gefunden",+ "no_api_token": "Kein API-Token in dieser Anfrage",+ "no_audio_file": "Keine Audiodatei",+ "no_chunks_uploaded": "Noch keine Chunks hochgeladen",+ "no_configuration_data": "Keine Konfigurationsdaten übermittelt",+ "no_data_provided": "Keine Daten übermittelt",+ "no_events": "Keine Ereignisse gefunden",+ "no_events_for_recording": "Keine Ereignisse für diese Aufnahme gefunden",+ "no_fields_given": "Keine Felder angegeben",+ "no_file_provided": "Keine Datei übermittelt",+ "no_file_selected": "Keine Datei ausgewählt",+ "no_message_provided": "Keine Nachricht übermittelt",+ "no_messages_provided": "Keine Nachrichten übermittelt",+ "no_messages_to_download": "Keine Nachrichten zum Herunterladen",+ "no_notes": "Für diese Aufnahme sind keine Notizen verfügbar",+ "no_query_provided": "Keine Anfrage übermittelt",+ "no_recording_id": "Keine Aufnahme-ID übermittelt",+ "no_recordings_specified": "Keine Aufnahmen angegeben",+ "no_speaker_map": "Keine Sprecherzuordnung übermittelt",+ "no_speakers_in_transcription": "Keine Sprecher in der Transkription gefunden",+ "no_summary": "Für diese Aufnahme ist keine Zusammenfassung verfügbar",+ "no_transcription": "Keine Transkription verfügbar",+ "no_transcription_connector": "Kein aktiver Transkriptions-Connector",+ "no_transcription_data": "Keine Transkriptionsdaten übermittelt",+ "no_transcription_for_identification": "Keine Transkription für die Sprecheridentifikation verfügbar",+ "no_transcription_for_recording": "Für diese Aufnahme ist keine Transkription verfügbar",+ "no_transcription_for_summary": "Keine gültige Transkription für die Erstellung der Zusammenfassung verfügbar",+ "no_transcription_for_title": "Keine gültige Transkription für die Erstellung des Titels verfügbar",+ "no_transcription_provided": "Keine Transkription übermittelt",+ "not_found": "Nicht gefunden",+ "notes_field_required": "Das Feld notes ist erforderlich",+ "notification_not_found": "Benachrichtigung nicht gefunden",+ "participants_too_long": "participants darf höchstens 500 Zeichen lang sein",+ "permission_denied": "Zugriff verweigert",+ "personal_tag_apply_own_only": "Sie können nur Ihre eigenen persönlichen Tags zuweisen",+ "personal_tag_remove_own_only": "Sie können nur Ihre eigenen persönlichen Tags entfernen",+ "public_link_https_required": "Öffentliche Links erfordern eine HTTPS-Verbindung",+ "public_link_not_permitted": "Sie dürfen keine öffentlichen Links erstellen",+ "public_share_not_permitted": "Sie haben keine Berechtigung, öffentliche Freigabelinks zu erstellen. Wenden Sie sich an Ihren Administrator.",+ "public_sharing_disabled": "Öffentliches Teilen ist auf diesem Server nicht aktiviert",+ "public_sharing_off": "Öffentliches Teilen ist auf diesem Server ausgeschaltet",+ "push_unavailable": "Push-Benachrichtigungen nicht verfügbar",+ "question_required": "question ist erforderlich",+ "recording_access_denied": "Sie haben keine Berechtigung, auf diese Aufnahme zuzugreifen",+ "recording_already_processing": "Die Aufnahme wird bereits verarbeitet",+ "recording_chat_denied": "Sie haben keine Berechtigung, mit dieser Aufnahme zu chatten",+ "recording_delete_admin_only": "Nur Administratoren können Aufnahmen löschen",+ "recording_delete_denied": "Sie haben keine Berechtigung, diese Aufnahme zu löschen",+ "recording_delete_failed": "Die Aufnahme konnte nicht gelöscht werden",+ "recording_edit_denied": "Sie haben keine Berechtigung, diese Aufnahme zu bearbeiten",+ "recording_ids_empty": "recording_ids muss eine nicht leere Liste sein",+ "recording_ids_required": "recording_ids ist erforderlich",+ "recording_modify_denied": "Sie haben keine Berechtigung, diese Aufnahme zu ändern",+ "recording_not_found": "Aufnahme nicht gefunden",+ "recording_not_found_or_no_share": "Aufnahme nicht gefunden oder Sie haben keine Berechtigung, sie zu teilen.",+ "recording_not_found_or_no_view": "Aufnahme nicht gefunden oder Sie haben keine Berechtigung, sie anzuzeigen.",+ "recording_not_resettable": "Die Aufnahme befindet sich nicht in einem Zustand, der zurückgesetzt werden kann. Aktueller Status: {{status}}",+ "recording_or_audio_not_found": "Aufnahme oder Audiodatei nicht gefunden",+ "recording_reprocess_denied": "Sie haben keine Berechtigung, diese Aufnahme neu zu verarbeiten",+ "recording_share_denied": "Sie haben keine Berechtigung, diese Aufnahme zu teilen",+ "recording_view_denied": "Sie haben keine Berechtigung, diese Aufnahme anzuzeigen",+ "recordings_export_failed": "Aufnahmen konnten nicht exportiert werden",+ "reference_not_found": "Referenz nicht gefunden",+ "reprocess_audio_not_found": "Audiodatei für die Neuverarbeitung nicht gefunden",+ "reprocess_queue_failed": "Die Neuverarbeitung konnte nicht eingereiht werden. Bitte versuchen Sie es erneut.",+ "reshare_edit_not_permitted": "Sie können keine Bearbeitungsberechtigung erteilen, weil Sie selbst keinen Bearbeitungszugriff haben",+ "reshare_reshare_not_permitted": "Sie können keine Weitergabeberechtigung erteilen, weil Sie selbst nicht weitergeben dürfen",+ "sample_not_found": "Probe nicht gefunden",+ "sample_remove_failed": "Die Probe konnte nicht entfernt werden",+ "scope_narrow_only": "Bereiche können nur eingeschränkt werden; erstellen Sie für mehr Zugriff ein neues Token",+ "scoped_token_header_only": "Tokens mit eingeschränktem Bereich werden nur in einem Header akzeptiert (Authorization: Bearer ...)",+ "semantic_search_unavailable": "Die semantische Suche ist auf dieser Instanz nicht verfügbar",+ "session_already_finalized": "Sitzung bereits abgeschlossen",+ "session_already_finalizing": "Die Sitzung wird bereits abgeschlossen",+ "session_cannot_finalize": "Die Sitzung hat den Status {{status}}; Abschluss nicht möglich",+ "session_finalizing": "Die Sitzung wird abgeschlossen",+ "session_is_recorder": "Die Sitzung ist eine Recorder-Sitzung; schließen Sie sie mit /finalize ab",+ "session_is_sliced_upload": "Die Sitzung ist ein in Teile zerlegter Datei-Upload; schließen Sie sie mit /finalize-upload ab",+ "session_not_accepting_chunks": "Die Sitzung hat den Status {{status}}; Chunks werden nicht mehr angenommen",+ "session_not_found": "Sitzung nicht gefunden",+ "session_quota_exhausted": "Das Speicherkontingent pro Benutzer für laufende Aufnahmen ist ausgeschöpft",+ "session_quota_would_exceed": "Das Speicherkontingent pro Benutzer für laufende Aufnahmen würde überschritten",+ "session_recording_gone": "Die Sitzung wurde bereits abgeschlossen und ihre Aufnahme existiert nicht mehr",+ "session_storage_allocation_failed": "Der Server konnte keinen Speicher für die Sitzung reservieren",+ "setting_key_required": "Der Einstellungsschlüssel ist erforderlich",+ "share_not_found": "Freigabe nicht gefunden",+ "share_revoke_denied": "Sie haben keine Berechtigung, diese Freigabe zu widerrufen",+ "share_sync_admin_only": "Nur Gruppenadministratoren können Freigaben synchronisieren",+ "share_with_owner": "Eine Aufnahme kann nicht mit ihrem Eigentümer geteilt werden",+ "share_with_self": "Sie können eine Aufnahme nicht mit sich selbst teilen",+ "shares_view_denied": "Sie haben keine Berechtigung, die Freigaben dieser Aufnahme anzuzeigen",+ "sharing_https_required": "Teilen ist nur über eine sichere (HTTPS-)Verbindung möglich.",+ "slice_reassembly_failed": "Der Server konnte die hochgeladenen Teile nicht wieder zusammensetzen",+ "slice_size_mismatch": "Die hochgeladenen Teile ergeben nicht die angegebene Dateigröße",+ "snippet_extraction_failed": "Audioausschnitt konnte nicht extrahiert werden",+ "speaker_alias_too_long": "Jeder Alias darf höchstens 100 Zeichen lang sein",+ "speaker_map_required": "speaker_map ist erforderlich",+ "speaker_name_empty": "Der Sprechername darf nicht leer sein",+ "speaker_name_exists": "Ein Sprecher namens \"{{name}}\" existiert bereits",+ "speaker_name_required": "Der Sprechername ist erforderlich",+ "speaker_name_taken": "Ein Sprecher mit diesem Namen existiert bereits",+ "speaker_not_found": "Sprecher nicht gefunden",+ "speaker_nothing_to_change": "Nichts zu ändern: Geben Sie Name, E-Mail oder Aliasse an",+ "speakers_not_found_or_not_owned": "Einige Sprecher existieren nicht oder gehören nicht zu Ihrem Konto",+ "subscription_not_found": "Abonnement nicht gefunden",+ "subtitle_generation_failed": "Untertitelformat kann aus dem Transkript nicht erzeugt werden",+ "summary_blocked_transcription_failed": "Zusammenfassung kann nicht erstellt werden: Die Transkription ist fehlgeschlagen. Bitte verarbeiten Sie zuerst die Transkription neu.",+ "summary_field_required": "Das Feld summary ist erforderlich",+ "summary_generate_denied": "Sie haben keine Berechtigung, eine Zusammenfassung für diese Aufnahme zu erstellen",+ "summary_generation_failed": "Die Zusammenfassung konnte nicht erstellt werden. Bitte prüfen Sie, ob Ihr LLM-Dienst läuft.",+ "summary_generation_failed_detail": "Die Zusammenfassung konnte nicht erstellt werden: {{detail}}",+ "summary_llm_not_configured": "Der Zusammenfassungsdienst ist nicht verfügbar (LLM-Client nicht konfiguriert)",+ "summary_openrouter_not_configured": "Der Zusammenfassungsdienst ist nicht verfügbar (OpenRouter-Client nicht konfiguriert)",+ "system_info_unavailable": "Systeminformationen konnten nicht abgerufen werden",+ "tag_access_denied": "Sie haben keinen Zugriff auf diesen Tag",+ "tag_already_on_recording": "Der Tag ist dieser Aufnahme bereits zugewiesen",+ "tag_delete_denied": "Sie haben keine Berechtigung, diesen Tag zu löschen",+ "tag_edit_denied": "Sie haben keine Berechtigung, diesen Tag zu bearbeiten",+ "tag_group_assign_admin_only": "Nur Gruppenadministratoren können Tags Gruppen zuweisen",+ "tag_id_required": "Die Tag-ID ist erforderlich",+ "tag_ids_required": "tag_ids oder tag_id ist erforderlich",+ "tag_name_exists": "Ein Tag mit diesem Namen existiert bereits",+ "tag_name_required": "Der Tag-Name ist erforderlich",+ "tag_not_found": "Tag nicht gefunden",+ "tag_not_on_recording": "Der Tag ist dieser Aufnahme nicht zugewiesen",+ "tag_rename_conflict": "Ein anderer Tag mit diesem Namen existiert bereits",+ "tag_use_denied": "Keine Berechtigung, diesen Tag zu verwenden",+ "target_folder_access_denied": "Kein Zugriff auf den Zielordner",+ "target_id_required": "target_id ist erforderlich",+ "target_user_not_found": "Zielbenutzer nicht gefunden",+ "template_in_use": "Vorlage kann nicht gelöscht werden: {{count}} Tag(s) verwenden diese Vorlage",+ "template_not_found": "Vorlage nicht gefunden",+ "text_model_not_configured": "Es ist kein Textmodell eingerichtet. Legen Sie TEXT_MODEL_BASE_URL fest, bei einem gehosteten Dienst zusätzlich TEXT_MODEL_API_KEY.",+ "title_blocked_transcription_failed": "Titel kann nicht erstellt werden: Die Transkription ist fehlgeschlagen. Bitte verarbeiten Sie zuerst die Transkription neu.",+ "title_generation_failed": "Der Titel konnte nicht erstellt werden",+ "title_openrouter_not_configured": "Der Dienst zur Titelerstellung ist nicht verfügbar (OpenRouter-Client nicht konfiguriert)",+ "token_limit_reached": "Ein Konto kann höchstens {{max}} aktive API-Tokens haben. Widerrufen Sie ein nicht mehr benötigtes Token, um ein neues zu erstellen.",+ "token_not_found": "Token nicht gefunden",+ "too_many_speaker_aliases": "höchstens 20 Aliase",+ "total_bytes_required": "total_bytes ist für einen in Teile zerlegten Upload erforderlich",+ "transcript_download_failed": "Der Transkript-Download konnte nicht erstellt werden",+ "transcription_format_unsupported_for_identification": "Das Transkriptionsformat wird für die automatische Identifikation nicht unterstützt",+ "unauthorized": "Nicht autorisiert",+ "unauthorized_admin_required": "Nicht autorisiert. Administratorzugriff erforderlich.",+ "unexpected_error": "Ein unerwarteter Fehler ist aufgetreten.",+ "unexpected_error_deleting": "Beim Löschen ist ein unerwarteter Fehler aufgetreten.",+ "unexpected_error_detail": "Ein unerwarteter Fehler ist aufgetreten: {{detail}}",+ "unexpected_error_processing": "Bei der Verarbeitung ist ein unerwarteter Fehler aufgetreten.",+ "unexpected_error_saving": "Beim Speichern ist ein unerwarteter Fehler aufgetreten.",+ "unexpected_error_updating_transcription": "Beim Aktualisieren der Transkription ist ein unerwarteter Fehler aufgetreten.",+ "unexpected_error_upload": "Beim Hochladen ist ein unerwarteter Fehler aufgetreten.",+ "unknown_event_types": "Unbekannte Ereignistypen: {{events}}",+ "unknown_fields": "Unbekannte(s) Feld(er): {{fields}}",+ "unknown_format": "Unbekanntes Format: {{format}}",+ "unknown_scopes": "Unbekannte Bereiche: {{scopes}}. Zulässig: {{allowed}} oder full",+ "unknown_temperature": "Unbekannte Temperatur: {{names}}",+ "unsupported_mime_type": "Nicht unterstützter mime_type {{mimeType}}",+ "upload_tag_or_folder_forbidden": "Ein Tag oder Ordner im Upload darf von Ihnen nicht verwendet werden",+ "url_required": "url ist erforderlich",+ "user_id_required": "Die Benutzer-ID ist erforderlich",+ "user_not_found": "Benutzer nicht gefunden",+ "username_exists": "Der Benutzername existiert bereits",+ "watch_folder_group_tag_unsupported": "Überwachungsordner sind für Gruppen-Tags nicht verfügbar",+ "webhook_cap_reached": "Webhook-Obergrenze pro Benutzer erreicht ({{count}}/{{max}})",+ "webhook_disabled": "Der Webhook ist deaktiviert; aktivieren Sie ihn zuerst",+ "webhook_dns_failed": "DNS-Auflösung für {{host}} fehlgeschlagen",+ "webhook_not_found": "Webhook nicht gefunden",+ "webhook_url_bad_scheme": "Das Schema muss http oder https sein",+ "webhook_url_http_not_allowed": "http://-URLs erfordern allow_http=true",+ "webhook_url_missing_host": "In der URL fehlt der Host",+ "webhook_url_private_address": "Die URL wird zu einer privaten oder Loopback-Adresse ({{ip}}) aufgelöst. Setzen Sie WEBHOOK_INTRANET_HOST_ALLOWLIST, um diesen Host ausdrücklich zuzulassen, oder verwenden Sie eine öffentliche URL. Der reguläre Ausdruck der Positivliste sollte verankert sein (z. B. r\"^(localhost|.*\\.intra)$\"), damit ähnlich aussehende Hostnamen ihn nicht täuschen können.",+ "webhook_url_unparseable": "Die URL konnte nicht gelesen werden",+ "word_document_failed": "Das Word-Dokument konnte nicht erstellt werden"+ },+ "apiMessage": {+ "accountUpdated": "Kontodaten erfolgreich aktualisiert!",+ "alreadySubscribed": "Bereits abonniert",+ "autoProcessingStarted": "Automatische Verarbeitung gestartet",+ "autoProcessingStopped": "Automatische Verarbeitung gestoppt",+ "chunksProcessed": "Chunks erfolgreich verarbeitet",+ "configUpdatedRestartRequired": "Konfiguration aktualisiert. Ein Neustart ist erforderlich, um die Änderungen zu übernehmen.",+ "embeddingsProcessedCount": "{{processed}} von {{total}} Aufnahmen verarbeitet.",+ "embeddingsReembeddedCount": "{{processed}} von {{total}} Aufnahmen neu eingebettet.",+ "existingShareLinkUsed": "Vorhandener Freigabelink für diese Aufnahme wird verwendet",+ "inquireAllProcessed": "Alle Aufnahmen sind bereits für den Inquire-Modus verarbeitet",+ "inquireProcessedRemaining": "{{processed}} Aufnahmen verarbeitet. {{remaining}} verbleibend.",+ "jobDeleted": "Auftrag gelöscht",+ "jobQueuedForRetry": "Auftrag zur Wiederholung eingereiht",+ "modelDiscoveryUnsupported": "{{connector}} bietet keinen Endpunkt zur Modellerkennung.",+ "noRecordingsToReembed": "Keine Aufnahmen zum erneuten Einbetten vorhanden.",+ "noSpeakerEmbeddings": "Keine Sprecher-Embeddings verfügbar",+ "preferencesSaved": "Einstellungen erfolgreich gespeichert",+ "pushNotificationsNotEnabled": "Push-Benachrichtigungen nicht aktiviert",+ "recordingDeleted": "Aufnahme gelöscht",+ "recordingStatusReset": "Der Status der Aufnahme wurde zurückgesetzt.",+ "scanTriggered": "Scan ausgelöst",+ "sharesSynced": "{{sharesCreated}} neue Freigaben für {{recordingsProcessed}} Aufnahmen erstellt",+ "speakerDeleted": "Sprecher gelöscht",+ "speakersMerged": "{{count}} Sprecher erfolgreich mit {{name}} zusammengeführt",+ "speakersUpdated": "Sprecher erfolgreich aktualisiert.",+ "subscriptionRemoved": "Abonnement entfernt",+ "subscriptionSaved": "Abonnement gespeichert",+ "summarizationQueued": "Zusammenfassung eingereiht",+ "summarizingConversation": "Früherer Gesprächsverlauf wird zusammengefasst...",+ "summaryGenerationQueued": "Erstellung der Zusammenfassung eingereiht",+ "summaryReprocessingStarted": "Neuverarbeitung der Zusammenfassung gestartet",+ "tagDeleted": "Tag gelöscht",+ "tagRemoved": "Tag entfernt",+ "tokenRevoked": "Token erfolgreich widerrufen",+ "transcriptUpdated": "Transkript erfolgreich aktualisiert.",+ "transcriptionQueued": "Transkription eingereiht",+ "transcriptionReprocessingQueued": "Neuverarbeitung der Transkription eingereiht",+ "transcriptionUpdated": "Transkription erfolgreich aktualisiert.",+ "userAlreadyHasNamingTemplates": "Der Benutzer hat bereits Benennungsvorlagen",+ "userAlreadyHasTemplates": "Der Benutzer hat bereits Vorlagen",+ "voiceProfileCleared": "Stimmprofil für {{name}} gelöscht"}}}diff --git a/static/locales/en.json b/static/locales/en.jsonindex e867db90..643e82aa 100644--- a/static/locales/en.json+++ b/static/locales/en.json@@ -2431,6 +2431,406 @@"tokenWarning": "Warning: {{percent}} of monthly token budget used.","transcriptionExceeded": "Monthly transcription budget exceeded ({{used}}/{{budget}} minutes). Contact admin for more time.","transcriptionWarning": "Warning: {{percent}} of monthly transcription budget used."+ },+ "apiError": {+ "access_denied": "Access denied",+ "admin_required": "Admin access required",+ "already_group_member": "User is already a member of this group",+ "already_shared": "Recording already shared with this user",+ "audio_access_denied": "You do not have permission to access this audio file",+ "audio_already_removed": "The audio has already been removed.",+ "audio_conversion_timeout": "Audio conversion timed out.",+ "audio_converter_missing": "Audio conversion tool (FFmpeg) not found on server.",+ "audio_decode_failed": "The uploaded file could not be read as audio. It may be corrupt or in an unsupported format.",+ "audio_deleted": "Audio file has been deleted",+ "audio_file_missing": "Audio file missing from server",+ "audio_file_not_found": "Audio file not found",+ "audio_remove_while_processing": "Wait until processing has finished before removing the audio.",+ "authentication_failed": "Authentication failed",+ "authentication_required": "Authentication required: missing, invalid, expired, or revoked API token or session",+ "auto_deletion_disabled": "Auto-deletion is not enabled",+ "auto_export_disabled": "Auto-export is not enabled on this server",+ "auto_processing_disabled": "Auto-processing is not enabled",+ "auto_processing_not_running": "Auto-processing is not running",+ "batch_limit_50": "Maximum 50 recordings per batch",+ "bulk_delete_limit": "Cannot delete more than 100 recordings at once",+ "bulk_reprocess_limit": "Cannot reprocess more than 50 recordings at once",+ "bulk_update_limit": "Cannot update more than 100 recordings at once",+ "cannot_change_own_admin": "Cannot change your own admin status",+ "cannot_delete_self": "Cannot delete your own account",+ "chat_blocked_transcription_failed": "Cannot chat: transcription failed. Please reprocess the transcription first.",+ "chat_client_not_configured": "Chat service is not available (chat client not configured)",+ "chat_error": "An error occurred during chat",+ "chat_failed": "Chat failed",+ "chat_openrouter_not_configured": "Chat service is not available (OpenRouter client not configured)",+ "chat_unavailable": "Chat service not available",+ "chunk_empty": "Empty chunk body",+ "chunk_out_of_order": "Out-of-order chunk",+ "chunk_processing_failed": "Failed to process chunks",+ "chunk_too_large": "Chunk exceeds max_chunk_bytes",+ "chunk_write_failed": "Server could not write chunk",+ "csrf_referrer_mismatch": "The request was rejected because this page was loaded from {{referrerHost}}, but the server received the request for {{host}}. The reverse proxy must forward the original Host header (or X-Forwarded-Host), and TRUSTED_PROXY_HOPS must match the number of proxies.",+ "csrf_referrer_mismatch_unknown": "The request was rejected because the page was loaded from another host than {{host}}, where the server received the request. The reverse proxy must forward the original Host header (or X-Forwarded-Host), and TRUSTED_PROXY_HOPS must match the number of proxies.",+ "csrf_referrer_missing": "The request was rejected because the browser sent no Referer header, which HTTPS requests require. A reverse proxy, browser extension or Referrer-Policy header that removes it causes this.",+ "csrf_session_expired": "Your session has expired. Please reload the page and try again.",+ "cursor_expired": "The cursor is too old; start again without a cursor",+ "custom_date_pattern_missing_groups": "Custom pattern must define named groups (?P<year>...), (?P<month>...) and (?P<day>...); missing: {{groups}}",+ "custom_date_pattern_required": "Custom pattern is required when the custom option is selected.",+ "custom_date_pattern_too_long": "Custom pattern is too long (max 500 characters).",+ "delete_failed": "Delete failed",+ "delete_owner_only": "Permission denied - only owner can delete",+ "deletion_not_allowed": "Deletion not allowed",+ "delivery_not_found": "Delivery not found",+ "duplicate_speaker_ids": "Duplicate speaker IDs provided",+ "email_exists": "Email already exists",+ "empty_file": "The uploaded file is empty.",+ "enabled_field_required": "enabled field is required",+ "event_not_found": "Event not found",+ "export_rename_failed": "Failed to rename existing exports",+ "export_template_not_found": "Export template not found",+ "external_ref_pair_required": "external_system and external_ref go together",+ "extracted_audio_too_large": "The extracted audio is {{size}} MB, larger than the {{limit}} MB stored-file limit. Enable chunking in admin settings (ENABLE_CHUNKING=true) or use a shorter / lower-bitrate source video.",+ "ffmpeg_missing": "FFmpeg not found on server",+ "file_monitor_unavailable": "File monitor module not available",+ "file_too_large": "File too large",+ "file_too_large_max": "File too large. Maximum size is {{maxSize}} MB.",+ "filename_too_long": "filename must be 255 characters or fewer",+ "folder_access_denied": "You do not have access to this folder",+ "folder_delete_denied": "You do not have permission to delete this folder",+ "folder_edit_denied": "You do not have permission to edit this folder",+ "folder_group_assign_admin_only": "Only group admins can assign folders to groups",+ "folder_id_not_found": "Folder {{folderId}} not found",+ "folder_name_exists": "A folder with this name already exists",+ "folder_name_exists_for_group": "A folder with this name already exists for this group",+ "folder_name_required": "Folder name is required",+ "folder_not_found": "Folder not found",+ "folder_rename_conflict": "Another folder with this name already exists",+ "folders_disabled": "Folders feature is not enabled",+ "forbidden_tag_ids": "Unknown or forbidden tag ids",+ "full_scope_not_combinable": "'full' cannot be combined with other scopes",+ "global_stats_admin_only": "Admin access required for global stats",+ "group_folder_create_admin_only": "Only group admins can create group folders",+ "group_folder_delete_admin_only": "Only group admins can delete group folders",+ "group_folder_edit_admin_only": "Only group admins can edit group folders",+ "group_folder_name_exists": "A group folder with this name already exists",+ "group_folders_members_only": "You must be a team member to view group folders",+ "group_folders_require_internal_sharing": "Group folders require internal sharing to be enabled. Please set ENABLE_INTERNAL_SHARING=true in your configuration.",+ "group_name_exists": "A group with this name already exists",+ "group_name_required": "Group name is required",+ "group_not_found": "Group not found",+ "group_tag_apply_denied": "You do not have permission to apply group tags to this recording",+ "group_tag_apply_restricted": "Only recording owner or group admin can apply group tags",+ "group_tag_create_admin_only": "Only group admins can create group tags",+ "group_tag_delete_admin_only": "Only group admins can delete group tags",+ "group_tag_edit_admin_only": "Only group admins can edit group tags",+ "group_tag_name_exists": "A group tag with this name already exists",+ "group_tag_name_exists_for_group": "A tag with this name already exists for this group",+ "group_tag_remove_denied": "You do not have permission to remove group tags from this recording",+ "group_tag_remove_restricted": "Only recording owner or group admin can remove group tags",+ "group_tags_members_only": "You must be a team member to view group tags",+ "group_tags_require_internal_sharing": "Group tags require internal sharing to be enabled. Please set ENABLE_INTERNAL_SHARING=true in your configuration.",+ "groups_require_internal_sharing": "Groups require internal sharing to be enabled. Please set ENABLE_INTERNAL_SHARING=true in your configuration.",+ "incognito_disabled": "Incognito mode is not enabled on this server",+ "inquire_agent_off": "The Inquire agent is turned off on this server",+ "inquire_disabled": "Inquire mode is not enabled",+ "inquire_off": "Inquire is turned off on this server",+ "internal_sharing_disabled": "Internal sharing is not enabled",+ "invalid_boolean_flag": "{{key}} must be true or false",+ "invalid_boolean_value": "Value must be a valid boolean (true/false, 1/0, yes/no)",+ "invalid_bulk_status_field": "Field must be \"inbox\", \"highlight\" or \"archive\"",+ "invalid_bulk_tag_action": "Action must be \"add\" or \"remove\"",+ "invalid_color_scheme": "Invalid color_scheme",+ "invalid_cursor": "The cursor could not be read",+ "invalid_dark_mode": "Invalid dark_mode",+ "invalid_date_field": "date_field must be meeting_date or created_at",+ "invalid_events_list": "events must be a non-empty list",+ "invalid_expires_in_days": "expires_in_days must be a non-negative integer",+ "invalid_expires_in_days_range": "expires_in_days must be 1 to 3650",+ "invalid_filters": "filters must be an object",+ "invalid_finalize_body": "finalize body must be a JSON object",+ "invalid_folder_id": "folder_id must be an id or none",+ "invalid_group_role": "Role must be \"admin\" or \"member\"",+ "invalid_idempotency_key": "idempotency_key must be 1 to 100 characters",+ "invalid_ids_list": "ids must be a list",+ "invalid_inquire_mode": "mode must be rag, agent or auto",+ "invalid_integer_value": "Value must be a valid integer",+ "invalid_is_archived": "is_archived must be a boolean",+ "invalid_json": "Invalid JSON",+ "invalid_limit": "limit must be between 1 and 500",+ "invalid_max_segments": "max_segments must be at least 1",+ "invalid_meeting_date": "Invalid meeting_date format",+ "invalid_number_value": "Value must be a valid number",+ "invalid_options_list": "options must be a list",+ "invalid_query_length": "q must be 2 to 500 characters",+ "invalid_recording_ids": "Invalid recording ids",+ "invalid_recording_ids_csv": "recording_ids must be a comma list of ids",+ "invalid_recording_ids_list": "recording_ids must be a list",+ "invalid_regex_pattern": "Invalid regex pattern for \"{{variable}}\": {{detail}}",+ "invalid_regex_patterns": "regex_patterns must be a dictionary",+ "invalid_regular_expression": "Invalid regular expression: {{detail}}",+ "invalid_reprocess_type": "Type must be \"transcription\" or \"summary\"",+ "invalid_scope": "scope must be own, shared or all",+ "invalid_scopes_list": "scopes must be a non-empty list of scope names",+ "invalid_search_mode": "mode must be keyword, semantic or auto",+ "invalid_search_paging": "limit must be 1 to 50 and page at least 1",+ "invalid_setting_type": "Invalid setting type. Must be one of: {{types}}",+ "invalid_snippet_range": "Invalid start time or duration",+ "invalid_source_ids": "source_ids must be a non-empty list",+ "invalid_speaker_aliases": "aliases must be a list of strings",+ "invalid_speaker_count_mode": "Invalid speaker_count_mode",+ "invalid_speaker_email": "email must be an email address",+ "invalid_speaker_map": "speaker_map must be an object",+ "invalid_speaker_value_type": "Invalid value type for speaker \"{{label}}\"",+ "invalid_storage_quota": "The storage quota must be a positive number of MB.",+ "invalid_subscription_data": "Invalid subscription data",+ "invalid_tag_color": "Color must be a hex value like #3B82F6",+ "invalid_tag_ids": "tag_ids must be a list",+ "invalid_tag_ids_list": "tag_ids must be a list of tag ids",+ "invalid_temperature": "{{kind}} temperature must be a number between 0 and 2",+ "invalid_temperature_values": "values must be an object of temperatures",+ "invalid_threshold": "Invalid threshold value",+ "invalid_timezone_value": "Value must be a valid IANA timezone, for example Europe/Berlin",+ "invalid_total_bytes": "total_bytes must be a positive integer",+ "invalid_transcript_data": "Invalid transcript data provided",+ "invalid_updated_since": "updated_since must be an ISO 8601 date-time",+ "invalid_username_length": "The username must be 2 to 20 characters.",+ "invalid_with_sources": "with_sources must be true or false",+ "job_not_found": "Job not found",+ "job_retry_failed_only": "Only failed jobs can be retried",+ "keep_audio_only_immutable": "keep_audio_only is set at upload time and cannot be changed afterwards.",+ "last_admin_demotion": "Cannot remove admin rights from the last remaining admin.",+ "llm_connection_failed": "Could not connect to LLM server. Please check that your LLM service is running.",+ "membership_not_found": "Membership not found",+ "merge_failed": "Failed to merge recordings",+ "merge_needs_two": "Select at least two recordings to merge",+ "merge_needs_two_speakers": "Need at least 2 speakers to merge",+ "message_required": "message is required",+ "missing_bulk_status_fields": "Missing recording_ids, field, or value",+ "missing_recording_ids": "Missing recording_ids",+ "missing_recording_ids_or_tag_id": "Missing recording_ids or tag_id",+ "missing_request_body": "Missing request body",+ "missing_required_field": "Missing required field: {{field}}",+ "missing_tag_ids": "Missing tag_ids in request body",+ "name_and_prompt_required": "Name and a prompt or hotwords are required",+ "name_and_template_required": "Name and template are required",+ "name_empty": "name cannot be empty",+ "name_required": "name is required",+ "naming_template_not_found": "Naming template not found",+ "no_api_token": "No API token in this request",+ "no_audio_file": "No audio file",+ "no_chunks_uploaded": "No chunks uploaded yet",+ "no_configuration_data": "No configuration data provided",+ "no_data_provided": "No data provided",+ "no_events": "No events found",+ "no_events_for_recording": "No events found for this recording",+ "no_fields_given": "No fields given",+ "no_file_provided": "No file provided",+ "no_file_selected": "No file selected",+ "no_message_provided": "No message provided",+ "no_messages_provided": "No messages provided",+ "no_messages_to_download": "No messages to download",+ "no_notes": "No notes available for this recording",+ "no_query_provided": "No query provided",+ "no_recording_id": "No recording ID provided",+ "no_recordings_specified": "No recordings specified",+ "no_speaker_map": "No speaker map provided",+ "no_speakers_in_transcription": "No speakers found in transcription",+ "no_summary": "No summary available for this recording",+ "no_transcription": "No transcription available",+ "no_transcription_connector": "No active transcription connector",+ "no_transcription_data": "No transcription data provided",+ "no_transcription_for_identification": "No transcription available for speaker identification",+ "no_transcription_for_recording": "No transcription available for this recording",+ "no_transcription_for_summary": "No valid transcription available for summary generation",+ "no_transcription_for_title": "No valid transcription available for title generation",+ "no_transcription_provided": "No transcription provided",+ "not_found": "Not found",+ "notes_field_required": "notes field required",+ "notification_not_found": "Notification not found",+ "participants_too_long": "participants must be at most 500 characters",+ "permission_denied": "Permission denied",+ "personal_tag_apply_own_only": "You can only apply your own personal tags",+ "personal_tag_remove_own_only": "You can only remove your own personal tags",+ "public_link_https_required": "Public links need an HTTPS connection",+ "public_link_not_permitted": "You may not create public links",+ "public_share_not_permitted": "You do not have permission to create public share links. Contact your administrator.",+ "public_sharing_disabled": "Public sharing is not enabled on this server",+ "public_sharing_off": "Public sharing is turned off on this server",+ "push_unavailable": "Push notifications not available",+ "question_required": "question is required",+ "recording_access_denied": "You do not have permission to access this recording",+ "recording_already_processing": "Recording is already being processed",+ "recording_chat_denied": "You do not have permission to chat with this recording",+ "recording_delete_admin_only": "Only administrators can delete recordings",+ "recording_delete_denied": "You do not have permission to delete this recording",+ "recording_delete_failed": "Could not delete the recording",+ "recording_edit_denied": "You do not have permission to edit this recording",+ "recording_ids_empty": "recording_ids must be a non-empty list",+ "recording_ids_required": "recording_ids is required",+ "recording_modify_denied": "You do not have permission to modify this recording",+ "recording_not_found": "Recording not found",+ "recording_not_found_or_no_share": "Recording not found or you do not have permission to share it.",+ "recording_not_found_or_no_view": "Recording not found or you do not have permission to view it.",+ "recording_not_resettable": "Recording is not in a state that can be reset. Current status: {{status}}",+ "recording_or_audio_not_found": "Recording or audio file not found",+ "recording_reprocess_denied": "You do not have permission to reprocess this recording",+ "recording_share_denied": "You do not have permission to share this recording",+ "recording_view_denied": "You do not have permission to view this recording",+ "recordings_export_failed": "Failed to export recordings",+ "reference_not_found": "Reference not found",+ "reprocess_audio_not_found": "Audio file not found for reprocessing",+ "reprocess_queue_failed": "Could not queue reprocessing; please try again",+ "reshare_edit_not_permitted": "You cannot grant edit permission because you do not have edit access",+ "reshare_reshare_not_permitted": "You cannot grant reshare permission because you do not have reshare access",+ "sample_not_found": "Sample not found",+ "sample_remove_failed": "Could not remove the sample",+ "scope_narrow_only": "Scopes can only be narrowed; create a new token for more access",+ "scoped_token_header_only": "Scoped tokens are accepted only in a header (Authorization: Bearer ...)",+ "semantic_search_unavailable": "Semantic search is not available on this instance",+ "session_already_finalized": "Session already finalized",+ "session_already_finalizing": "Session is already being finalized",+ "session_cannot_finalize": "Session is in status {{status}}; cannot finalize",+ "session_finalizing": "Session is being finalized",+ "session_is_recorder": "Session is a recorder session; finalize it with /finalize",+ "session_is_sliced_upload": "Session is a sliced file upload; finalize it with /finalize-upload",+ "session_not_accepting_chunks": "Session is in status {{status}}; chunks are no longer accepted",+ "session_not_found": "Session not found",+ "session_quota_exhausted": "Per-user in-progress recording storage quota exhausted",+ "session_quota_would_exceed": "Per-user in-progress recording storage quota would be exceeded",+ "session_recording_gone": "Session was already finalized and its recording no longer exists",+ "session_storage_allocation_failed": "Server could not allocate session storage",+ "setting_key_required": "Setting key is required",+ "share_not_found": "Share not found",+ "share_revoke_denied": "You do not have permission to revoke this share",+ "share_sync_admin_only": "Only group admins can sync shares",+ "share_with_owner": "Cannot share a recording with its owner",+ "share_with_self": "Cannot share a recording with yourself",+ "shares_view_denied": "You do not have permission to view shares for this recording",+ "sharing_https_required": "Sharing is only available over a secure (HTTPS) connection.",+ "slice_reassembly_failed": "Server could not reassemble the uploaded slices",+ "slice_size_mismatch": "Uploaded slices do not add up to the declared file size",+ "snippet_extraction_failed": "Failed to extract audio snippet",+ "speaker_alias_too_long": "each alias must be at most 100 characters",+ "speaker_map_required": "speaker_map is required",+ "speaker_name_empty": "Speaker name cannot be empty",+ "speaker_name_exists": "A speaker named \"{{name}}\" already exists",+ "speaker_name_required": "Speaker name is required",+ "speaker_name_taken": "Speaker with this name already exists",+ "speaker_not_found": "Speaker not found",+ "speaker_nothing_to_change": "Nothing to change: give name, email or aliases",+ "speakers_not_found_or_not_owned": "Some speakers don't exist or don't belong to user",+ "subscription_not_found": "Subscription not found",+ "subtitle_generation_failed": "Cannot generate subtitle format from transcript",+ "summary_blocked_transcription_failed": "Cannot generate summary: transcription failed. Please reprocess the transcription first.",+ "summary_field_required": "summary field required",+ "summary_generate_denied": "You do not have permission to generate summary for this recording",+ "summary_generation_failed": "Failed to generate summary. Please check that your LLM service is running.",+ "summary_generation_failed_detail": "Failed to generate summary: {{detail}}",+ "summary_llm_not_configured": "Summary service is not available (LLM client not configured)",+ "summary_openrouter_not_configured": "Summary service is not available (OpenRouter client not configured)",+ "system_info_unavailable": "Unable to retrieve system information",+ "tag_access_denied": "You do not have access to this tag",+ "tag_already_on_recording": "Tag is already on this recording",+ "tag_delete_denied": "You do not have permission to delete this tag",+ "tag_edit_denied": "You do not have permission to edit this tag",+ "tag_group_assign_admin_only": "Only group admins can assign tags to groups",+ "tag_id_required": "Tag ID is required",+ "tag_ids_required": "tag_ids or tag_id required",+ "tag_name_exists": "A tag with this name already exists",+ "tag_name_required": "Tag name is required",+ "tag_not_found": "Tag not found",+ "tag_not_on_recording": "Tag is not on this recording",+ "tag_rename_conflict": "Another tag with this name already exists",+ "tag_use_denied": "No permission to use this tag",+ "target_folder_access_denied": "No access to target folder",+ "target_id_required": "target_id is required",+ "target_user_not_found": "Target user not found",+ "template_in_use": "Cannot delete template: {{count}} tag(s) are using this template",+ "template_not_found": "Template not found",+ "text_model_not_configured": "No text model is configured. Set TEXT_MODEL_BASE_URL, and TEXT_MODEL_API_KEY for a hosted service.",+ "title_blocked_transcription_failed": "Cannot generate title: transcription failed. Please reprocess the transcription first.",+ "title_generation_failed": "Failed to generate a title",+ "title_openrouter_not_configured": "Title generation service is not available (OpenRouter client not configured)",+ "token_limit_reached": "An account can hold at most {{max}} active API tokens. Revoke a token you no longer use to create a new one.",+ "token_not_found": "Token not found",+ "too_many_speaker_aliases": "at most 20 aliases",+ "total_bytes_required": "total_bytes is required for a sliced upload",+ "transcript_download_failed": "Failed to generate transcript download",+ "transcription_format_unsupported_for_identification": "Transcription format not supported for auto-identification",+ "unauthorized": "Unauthorized",+ "unauthorized_admin_required": "Unauthorized. Admin access required.",+ "unexpected_error": "An unexpected error occurred.",+ "unexpected_error_deleting": "An unexpected error occurred while deleting.",+ "unexpected_error_detail": "An unexpected error occurred: {{detail}}",+ "unexpected_error_processing": "An unexpected error occurred during processing.",+ "unexpected_error_saving": "An unexpected error occurred while saving.",+ "unexpected_error_updating_transcription": "An unexpected error occurred while updating the transcription.",+ "unexpected_error_upload": "An unexpected error occurred during upload.",+ "unknown_event_types": "unknown event types: {{events}}",+ "unknown_fields": "Unknown field(s): {{fields}}",+ "unknown_format": "Unknown format: {{format}}",+ "unknown_scopes": "Unknown scope(s): {{scopes}}. Allowed: {{allowed}} or full",+ "unknown_temperature": "Unknown temperature: {{names}}",+ "unsupported_mime_type": "Unsupported mime_type {{mimeType}}",+ "upload_tag_or_folder_forbidden": "A tag or folder in the upload is not one you can use",+ "url_required": "url is required",+ "user_id_required": "User ID is required",+ "user_not_found": "User not found",+ "username_exists": "Username already exists",+ "watch_folder_group_tag_unsupported": "Watch folders are not available for group tags",+ "webhook_cap_reached": "Per-user webhook cap reached ({{count}}/{{max}})",+ "webhook_disabled": "Webhook is disabled; enable it first",+ "webhook_dns_failed": "DNS resolution failed for {{host}}",+ "webhook_not_found": "Webhook not found",+ "webhook_url_bad_scheme": "Scheme must be http or https",+ "webhook_url_http_not_allowed": "http:// URLs require allow_http=true",+ "webhook_url_missing_host": "URL is missing a host",+ "webhook_url_private_address": "URL resolves to a private/loopback address ({{ip}}); set WEBHOOK_INTRANET_HOST_ALLOWLIST to permit this host explicitly, or use a public URL. The allowlist regex should be anchored (e.g. r\"^(localhost|.*\\.intra)$\") so it cannot be tricked by lookalike hostnames.",+ "webhook_url_unparseable": "URL could not be parsed",+ "word_document_failed": "Failed to generate Word document"+ },+ "apiMessage": {+ "accountUpdated": "Account details updated successfully!",+ "alreadySubscribed": "Already subscribed",+ "autoProcessingStarted": "Auto-processing started",+ "autoProcessingStopped": "Auto-processing stopped",+ "chunksProcessed": "Chunks processed successfully",+ "configUpdatedRestartRequired": "Configuration updated. Restart required to apply changes.",+ "embeddingsProcessedCount": "Processed {{processed}} out of {{total}} recordings.",+ "embeddingsReembeddedCount": "Re-embedded {{processed}} out of {{total}} recordings.",+ "existingShareLinkUsed": "Using existing share link for this recording",+ "inquireAllProcessed": "All recordings are already processed for inquire mode",+ "inquireProcessedRemaining": "Processed {{processed}} recordings. {{remaining}} remaining.",+ "jobDeleted": "Job deleted",+ "jobQueuedForRetry": "Job queued for retry",+ "modelDiscoveryUnsupported": "{{connector}} does not expose a model discovery endpoint.",+ "noRecordingsToReembed": "No recordings to re-embed.",+ "noSpeakerEmbeddings": "No speaker embeddings available",+ "preferencesSaved": "Preferences saved successfully",+ "pushNotificationsNotEnabled": "Push notifications not enabled",+ "recordingDeleted": "Recording deleted",+ "recordingStatusReset": "Recording status has been reset.",+ "scanTriggered": "Scan triggered",+ "sharesSynced": "Created {{sharesCreated}} new shares across {{recordingsProcessed}} recordings",+ "speakerDeleted": "Speaker deleted",+ "speakersMerged": "Successfully merged {{count}} speaker(s) into {{name}}",+ "speakersUpdated": "Speakers updated successfully.",+ "subscriptionRemoved": "Subscription removed",+ "subscriptionSaved": "Subscription saved",+ "summarizationQueued": "Summarization queued",+ "summarizingConversation": "Summarizing earlier conversation...",+ "summaryGenerationQueued": "Summary generation queued",+ "summaryReprocessingStarted": "Summary reprocessing started",+ "tagDeleted": "Tag deleted",+ "tagRemoved": "Tag removed",+ "tokenRevoked": "Token revoked successfully",+ "transcriptUpdated": "Transcript updated successfully.",+ "transcriptionQueued": "Transcription queued",+ "transcriptionReprocessingQueued": "Transcription reprocessing queued",+ "transcriptionUpdated": "Transcription updated successfully.",+ "userAlreadyHasNamingTemplates": "User already has naming templates",+ "userAlreadyHasTemplates": "User already has templates",+ "voiceProfileCleared": "Voice profile cleared for {{name}}"}}}diff --git a/static/locales/es.json b/static/locales/es.jsonindex cc6de413..b3d88d45 100644--- a/static/locales/es.json+++ b/static/locales/es.json@@ -2431,6 +2431,406 @@"tokenWarning": "Advertencia: se ha usado el {{percent}} del presupuesto mensual de tokens.","transcriptionExceeded": "Presupuesto mensual de transcripción excedido ({{used}}/{{budget}} minutos). Contacte a su administrador para obtener más tiempo.","transcriptionWarning": "Advertencia: se ha usado el {{percent}} del presupuesto mensual de transcripción."+ },+ "apiError": {+ "access_denied": "Acceso denegado",+ "admin_required": "Se requiere acceso de administrador",+ "already_group_member": "El usuario ya es miembro de este grupo",+ "already_shared": "La grabación ya está compartida con este usuario",+ "audio_access_denied": "No tiene permiso para acceder a este archivo de audio",+ "audio_already_removed": "El audio ya se ha eliminado.",+ "audio_conversion_timeout": "Se agotó el tiempo de la conversión de audio.",+ "audio_converter_missing": "No se encontró la herramienta de conversión de audio (FFmpeg) en el servidor.",+ "audio_decode_failed": "El archivo subido no se pudo leer como audio. Puede estar dañado o tener un formato no compatible.",+ "audio_deleted": "El archivo de audio se ha eliminado",+ "audio_file_missing": "Falta el archivo de audio en el servidor",+ "audio_file_not_found": "Archivo de audio no encontrado",+ "audio_remove_while_processing": "Espere a que termine el procesamiento antes de eliminar el audio.",+ "authentication_failed": "Error de autenticación",+ "authentication_required": "Se requiere autenticación: token de API o sesión ausente, no válido, caducado o revocado",+ "auto_deletion_disabled": "La eliminación automática no está habilitada",+ "auto_export_disabled": "La exportación automática no está habilitada en este servidor",+ "auto_processing_disabled": "El procesamiento automático no está habilitado",+ "auto_processing_not_running": "El procesamiento automático no está en ejecución",+ "batch_limit_50": "Máximo 50 grabaciones por lote",+ "bulk_delete_limit": "No se pueden eliminar más de 100 grabaciones a la vez",+ "bulk_reprocess_limit": "No se pueden reprocesar más de 50 grabaciones a la vez",+ "bulk_update_limit": "No se pueden actualizar más de 100 grabaciones a la vez",+ "cannot_change_own_admin": "No puede cambiar su propio estado de administrador",+ "cannot_delete_self": "No puede eliminar su propia cuenta",+ "chat_blocked_transcription_failed": "No se puede usar el chat: la transcripción falló. Reprocese primero la transcripción.",+ "chat_client_not_configured": "El servicio de chat no está disponible (cliente de chat no configurado)",+ "chat_error": "Se produjo un error durante el chat",+ "chat_failed": "Error en el chat",+ "chat_openrouter_not_configured": "El servicio de chat no está disponible (cliente de OpenRouter no configurado)",+ "chat_unavailable": "Servicio de chat no disponible",+ "chunk_empty": "Cuerpo del fragmento vacío",+ "chunk_out_of_order": "Fragmento fuera de orden",+ "chunk_processing_failed": "No se pudieron procesar los fragmentos",+ "chunk_too_large": "El fragmento supera max_chunk_bytes",+ "chunk_write_failed": "El servidor no pudo escribir el fragmento",+ "csrf_referrer_mismatch": "La solicitud se rechazó porque esta página se cargó desde {{referrerHost}}, pero el servidor recibió la solicitud para {{host}}. El proxy inverso debe reenviar el encabezado Host original (o X-Forwarded-Host), y TRUSTED_PROXY_HOPS debe coincidir con el número de proxies.",+ "csrf_referrer_mismatch_unknown": "La solicitud se rechazó porque la página se cargó desde un host distinto de {{host}}, para el que el servidor recibió la solicitud. El proxy inverso debe reenviar el encabezado Host original (o X-Forwarded-Host), y TRUSTED_PROXY_HOPS debe coincidir con el número de proxies.",+ "csrf_referrer_missing": "La solicitud se rechazó porque el navegador no envió el encabezado Referer, que las solicitudes HTTPS requieren. La causa es un proxy inverso, una extensión del navegador o un encabezado Referrer-Policy que lo elimina.",+ "csrf_session_expired": "Su sesión ha caducado. Recargue la página e inténtelo de nuevo.",+ "cursor_expired": "El cursor es demasiado antiguo; vuelva a empezar sin cursor",+ "custom_date_pattern_missing_groups": "El patrón personalizado debe definir los grupos con nombre (?P<year>...), (?P<month>...) y (?P<day>...); faltan: {{groups}}",+ "custom_date_pattern_required": "Se requiere un patrón personalizado cuando se selecciona la opción personalizada.",+ "custom_date_pattern_too_long": "El patrón personalizado es demasiado largo (máximo 500 caracteres).",+ "delete_failed": "Error al eliminar",+ "delete_owner_only": "Permiso denegado: solo el propietario puede eliminar",+ "deletion_not_allowed": "Eliminación no permitida",+ "delivery_not_found": "Entrega no encontrada",+ "duplicate_speaker_ids": "Se indicaron ID de hablante duplicados",+ "email_exists": "El correo electrónico ya existe",+ "empty_file": "El archivo subido está vacío.",+ "enabled_field_required": "El campo enabled es obligatorio",+ "event_not_found": "Evento no encontrado",+ "export_rename_failed": "No se pudieron renombrar las exportaciones existentes",+ "export_template_not_found": "Plantilla de exportación no encontrada",+ "external_ref_pair_required": "external_system y external_ref deben indicarse juntos",+ "extracted_audio_too_large": "El audio extraído ocupa {{size}} MB, más que el límite de {{limit}} MB para archivos almacenados. Active la división en fragmentos en la configuración de administración (ENABLE_CHUNKING=true) o use un vídeo de origen más corto o con menor tasa de bits.",+ "ffmpeg_missing": "No se encontró FFmpeg en el servidor",+ "file_monitor_unavailable": "El módulo de supervisión de archivos no está disponible",+ "file_too_large": "Archivo demasiado grande",+ "file_too_large_max": "Archivo demasiado grande. El tamaño máximo es {{maxSize}} MB.",+ "filename_too_long": "filename debe tener 255 caracteres o menos",+ "folder_access_denied": "No tiene acceso a esta carpeta",+ "folder_delete_denied": "No tiene permiso para eliminar esta carpeta",+ "folder_edit_denied": "No tiene permiso para editar esta carpeta",+ "folder_group_assign_admin_only": "Solo los administradores del grupo pueden asignar carpetas a grupos",+ "folder_id_not_found": "Carpeta {{folderId}} no encontrada",+ "folder_name_exists": "Ya existe una carpeta con este nombre",+ "folder_name_exists_for_group": "Ya existe una carpeta con este nombre para este grupo",+ "folder_name_required": "El nombre de la carpeta es obligatorio",+ "folder_not_found": "Carpeta no encontrada",+ "folder_rename_conflict": "Ya existe otra carpeta con este nombre",+ "folders_disabled": "La función de carpetas no está habilitada",+ "forbidden_tag_ids": "IDs de etiqueta desconocidos o no permitidos",+ "full_scope_not_combinable": "'full' no se puede combinar con otros ámbitos",+ "global_stats_admin_only": "Se requiere acceso de administrador para las estadísticas globales",+ "group_folder_create_admin_only": "Solo los administradores del grupo pueden crear carpetas de grupo",+ "group_folder_delete_admin_only": "Solo los administradores del grupo pueden eliminar carpetas de grupo",+ "group_folder_edit_admin_only": "Solo los administradores del grupo pueden editar carpetas de grupo",+ "group_folder_name_exists": "Ya existe una carpeta de grupo con este nombre",+ "group_folders_members_only": "Debe ser miembro del equipo para ver las carpetas de grupo",+ "group_folders_require_internal_sharing": "Las carpetas de grupo requieren que el uso compartido interno esté habilitado. Establezca ENABLE_INTERNAL_SHARING=true en su configuración.",+ "group_name_exists": "Ya existe un grupo con este nombre",+ "group_name_required": "El nombre del grupo es obligatorio",+ "group_not_found": "Grupo no encontrado",+ "group_tag_apply_denied": "No tiene permiso para aplicar etiquetas de grupo a esta grabación",+ "group_tag_apply_restricted": "Solo el propietario de la grabación o un administrador del grupo puede aplicar etiquetas de grupo",+ "group_tag_create_admin_only": "Solo los administradores del grupo pueden crear etiquetas de grupo",+ "group_tag_delete_admin_only": "Solo los administradores del grupo pueden eliminar etiquetas de grupo",+ "group_tag_edit_admin_only": "Solo los administradores del grupo pueden editar etiquetas de grupo",+ "group_tag_name_exists": "Ya existe una etiqueta de grupo con este nombre",+ "group_tag_name_exists_for_group": "Ya existe una etiqueta con este nombre para este grupo",+ "group_tag_remove_denied": "No tiene permiso para quitar etiquetas de grupo de esta grabación",+ "group_tag_remove_restricted": "Solo el propietario de la grabación o un administrador del grupo puede quitar etiquetas de grupo",+ "group_tags_members_only": "Debe ser miembro del equipo para ver las etiquetas de grupo",+ "group_tags_require_internal_sharing": "Las etiquetas de grupo requieren que el uso compartido interno esté habilitado. Establezca ENABLE_INTERNAL_SHARING=true en su configuración.",+ "groups_require_internal_sharing": "Los grupos requieren que el uso compartido interno esté habilitado. Establezca ENABLE_INTERNAL_SHARING=true en su configuración.",+ "incognito_disabled": "El modo incógnito no está habilitado en este servidor",+ "inquire_agent_off": "El agente de Inquire está desactivado en este servidor",+ "inquire_disabled": "El modo Inquire no está habilitado",+ "inquire_off": "Inquire está desactivado en este servidor",+ "internal_sharing_disabled": "El uso compartido interno no está habilitado",+ "invalid_boolean_flag": "{{key}} debe ser true o false",+ "invalid_boolean_value": "El valor debe ser un booleano válido (true/false, 1/0, yes/no)",+ "invalid_bulk_status_field": "El campo debe ser \"inbox\", \"highlight\" o \"archive\"",+ "invalid_bulk_tag_action": "La acción debe ser \"add\" o \"remove\"",+ "invalid_color_scheme": "color_scheme no válido",+ "invalid_cursor": "No se pudo leer el cursor",+ "invalid_dark_mode": "dark_mode no válido",+ "invalid_date_field": "date_field debe ser meeting_date o created_at",+ "invalid_events_list": "events debe ser una lista no vacía",+ "invalid_expires_in_days": "expires_in_days debe ser un número entero no negativo",+ "invalid_expires_in_days_range": "expires_in_days debe estar entre 1 y 3650",+ "invalid_filters": "filters debe ser un objeto",+ "invalid_finalize_body": "El cuerpo de finalize debe ser un objeto JSON",+ "invalid_folder_id": "folder_id debe ser un ID o none",+ "invalid_group_role": "El rol debe ser \"admin\" o \"member\"",+ "invalid_idempotency_key": "idempotency_key debe tener entre 1 y 100 caracteres",+ "invalid_ids_list": "ids debe ser una lista",+ "invalid_inquire_mode": "mode debe ser rag, agent o auto",+ "invalid_integer_value": "El valor debe ser un número entero válido",+ "invalid_is_archived": "is_archived debe ser un booleano",+ "invalid_json": "JSON no válido",+ "invalid_limit": "limit debe estar entre 1 y 500",+ "invalid_max_segments": "max_segments debe ser al menos 1",+ "invalid_meeting_date": "Formato de meeting_date no válido",+ "invalid_number_value": "El valor debe ser un número válido",+ "invalid_options_list": "options debe ser una lista",+ "invalid_query_length": "q debe tener entre 2 y 500 caracteres",+ "invalid_recording_ids": "IDs de grabación no válidos",+ "invalid_recording_ids_csv": "recording_ids debe ser una lista de IDs separados por comas",+ "invalid_recording_ids_list": "recording_ids debe ser una lista",+ "invalid_regex_pattern": "Patrón regex no válido para \"{{variable}}\": {{detail}}",+ "invalid_regex_patterns": "regex_patterns debe ser un diccionario",+ "invalid_regular_expression": "Expresión regular no válida: {{detail}}",+ "invalid_reprocess_type": "El tipo debe ser \"transcription\" o \"summary\"",+ "invalid_scope": "scope debe ser own, shared o all",+ "invalid_scopes_list": "scopes debe ser una lista no vacía de nombres de ámbito",+ "invalid_search_mode": "mode debe ser keyword, semantic o auto",+ "invalid_search_paging": "limit debe estar entre 1 y 50 y page debe ser al menos 1",+ "invalid_setting_type": "Tipo de ajuste no válido. Debe ser uno de: {{types}}",+ "invalid_snippet_range": "Hora de inicio o duración no válida",+ "invalid_source_ids": "source_ids debe ser una lista no vacía",+ "invalid_speaker_aliases": "aliases debe ser una lista de cadenas",+ "invalid_speaker_count_mode": "speaker_count_mode no válido",+ "invalid_speaker_email": "email debe ser una dirección de correo electrónico",+ "invalid_speaker_map": "speaker_map debe ser un objeto",+ "invalid_speaker_value_type": "Tipo de valor no válido para el hablante \"{{label}}\"",+ "invalid_storage_quota": "La cuota de almacenamiento debe ser un número positivo de MB.",+ "invalid_subscription_data": "Datos de suscripción no válidos",+ "invalid_tag_color": "El color debe ser un valor hexadecimal como #3B82F6",+ "invalid_tag_ids": "tag_ids debe ser una lista",+ "invalid_tag_ids_list": "tag_ids debe ser una lista de IDs de etiqueta",+ "invalid_temperature": "La temperatura de {{kind}} debe ser un número entre 0 y 2",+ "invalid_temperature_values": "values debe ser un objeto de temperaturas",+ "invalid_threshold": "Valor de umbral no válido",+ "invalid_timezone_value": "El valor debe ser una zona horaria IANA válida, por ejemplo Europe/Berlin",+ "invalid_total_bytes": "total_bytes debe ser un número entero positivo",+ "invalid_transcript_data": "Se proporcionaron datos de transcripción no válidos",+ "invalid_updated_since": "updated_since debe ser una fecha y hora ISO 8601",+ "invalid_username_length": "El nombre de usuario debe tener entre 2 y 20 caracteres.",+ "invalid_with_sources": "with_sources debe ser true o false",+ "job_not_found": "Tarea no encontrada",+ "job_retry_failed_only": "Solo se pueden reintentar las tareas fallidas",+ "keep_audio_only_immutable": "keep_audio_only se establece al subir el archivo y no se puede cambiar después.",+ "last_admin_demotion": "No se pueden quitar los derechos de administrador al último administrador restante.",+ "llm_connection_failed": "No se pudo conectar con el servidor LLM. Compruebe que su servicio LLM esté en ejecución.",+ "membership_not_found": "Membresía no encontrada",+ "merge_failed": "No se pudieron combinar las grabaciones",+ "merge_needs_two": "Seleccione al menos dos grabaciones para combinar",+ "merge_needs_two_speakers": "Se necesitan al menos 2 hablantes para fusionar",+ "message_required": "message es obligatorio",+ "missing_bulk_status_fields": "Falta recording_ids, field o value",+ "missing_recording_ids": "Falta recording_ids",+ "missing_recording_ids_or_tag_id": "Falta recording_ids o tag_id",+ "missing_request_body": "Falta el cuerpo de la solicitud",+ "missing_required_field": "Falta un campo obligatorio: {{field}}",+ "missing_tag_ids": "Falta tag_ids en el cuerpo de la solicitud",+ "name_and_prompt_required": "Se requieren un nombre y un prompt o hotwords",+ "name_and_template_required": "Se requieren un nombre y una plantilla",+ "name_empty": "name no puede estar vacío",+ "name_required": "name es obligatorio",+ "naming_template_not_found": "Plantilla de nombrado no encontrada",+ "no_api_token": "No hay token de API en esta solicitud",+ "no_audio_file": "No hay archivo de audio",+ "no_chunks_uploaded": "Aún no se han subido fragmentos",+ "no_configuration_data": "No se proporcionaron datos de configuración",+ "no_data_provided": "No se proporcionaron datos",+ "no_events": "No se encontraron eventos",+ "no_events_for_recording": "No se encontraron eventos para esta grabación",+ "no_fields_given": "No se indicó ningún campo",+ "no_file_provided": "No se proporcionó ningún archivo",+ "no_file_selected": "No se seleccionó ningún archivo",+ "no_message_provided": "No se proporcionó ningún mensaje",+ "no_messages_provided": "No se proporcionaron mensajes",+ "no_messages_to_download": "No hay mensajes para descargar",+ "no_notes": "No hay notas disponibles para esta grabación",+ "no_query_provided": "No se proporcionó ninguna consulta",+ "no_recording_id": "No se proporcionó ningún ID de grabación",+ "no_recordings_specified": "No se especificaron grabaciones",+ "no_speaker_map": "No se proporcionó ningún mapa de hablantes",+ "no_speakers_in_transcription": "No se encontraron hablantes en la transcripción",+ "no_summary": "No hay resumen disponible para esta grabación",+ "no_transcription": "No hay transcripción disponible",+ "no_transcription_connector": "No hay ningún conector de transcripción activo",+ "no_transcription_data": "No se proporcionaron datos de transcripción",+ "no_transcription_for_identification": "No hay transcripción disponible para la identificación de hablantes",+ "no_transcription_for_recording": "No hay transcripción disponible para esta grabación",+ "no_transcription_for_summary": "No hay una transcripción válida para generar el resumen",+ "no_transcription_for_title": "No hay una transcripción válida para generar el título",+ "no_transcription_provided": "No se proporcionó ninguna transcripción",+ "not_found": "No encontrado",+ "notes_field_required": "El campo notes es obligatorio",+ "notification_not_found": "Notificación no encontrada",+ "participants_too_long": "participants debe tener como máximo 500 caracteres",+ "permission_denied": "Permiso denegado",+ "personal_tag_apply_own_only": "Solo puede aplicar sus propias etiquetas personales",+ "personal_tag_remove_own_only": "Solo puede quitar sus propias etiquetas personales",+ "public_link_https_required": "Los enlaces públicos requieren una conexión HTTPS",+ "public_link_not_permitted": "No puede crear enlaces públicos",+ "public_share_not_permitted": "No tiene permiso para crear enlaces públicos para compartir. Póngase en contacto con su administrador.",+ "public_sharing_disabled": "El uso compartido público no está habilitado en este servidor",+ "public_sharing_off": "El uso compartido público está desactivado en este servidor",+ "push_unavailable": "Notificaciones push no disponibles",+ "question_required": "question es obligatorio",+ "recording_access_denied": "No tiene permiso para acceder a esta grabación",+ "recording_already_processing": "La grabación ya se está procesando",+ "recording_chat_denied": "No tiene permiso para chatear con esta grabación",+ "recording_delete_admin_only": "Solo los administradores pueden eliminar grabaciones",+ "recording_delete_denied": "No tiene permiso para eliminar esta grabación",+ "recording_delete_failed": "No se pudo eliminar la grabación",+ "recording_edit_denied": "No tiene permiso para editar esta grabación",+ "recording_ids_empty": "recording_ids debe ser una lista no vacía",+ "recording_ids_required": "recording_ids es obligatorio",+ "recording_modify_denied": "No tiene permiso para modificar esta grabación",+ "recording_not_found": "Grabación no encontrada",+ "recording_not_found_or_no_share": "Grabación no encontrada o no tiene permiso para compartirla.",+ "recording_not_found_or_no_view": "Grabación no encontrada o no tiene permiso para verla.",+ "recording_not_resettable": "La grabación no está en un estado que permita restablecerla. Estado actual: {{status}}",+ "recording_or_audio_not_found": "Grabación o archivo de audio no encontrado",+ "recording_reprocess_denied": "No tiene permiso para reprocesar esta grabación",+ "recording_share_denied": "No tiene permiso para compartir esta grabación",+ "recording_view_denied": "No tiene permiso para ver esta grabación",+ "recordings_export_failed": "No se pudieron exportar las grabaciones",+ "reference_not_found": "Referencia no encontrada",+ "reprocess_audio_not_found": "No se encontró el archivo de audio para el reprocesamiento",+ "reprocess_queue_failed": "No se pudo poner en cola el reprocesamiento; inténtelo de nuevo",+ "reshare_edit_not_permitted": "No puede conceder permiso de edición porque usted no tiene acceso de edición",+ "reshare_reshare_not_permitted": "No puede conceder permiso para recompartir porque usted no puede recompartir",+ "sample_not_found": "Muestra no encontrada",+ "sample_remove_failed": "No se pudo eliminar la muestra",+ "scope_narrow_only": "Los alcances solo se pueden restringir; cree un nuevo token para obtener más acceso",+ "scoped_token_header_only": "Los tokens con alcance solo se aceptan en un encabezado (Authorization: Bearer ...)",+ "semantic_search_unavailable": "La búsqueda semántica no está disponible en esta instancia",+ "session_already_finalized": "La sesión ya se ha finalizado",+ "session_already_finalizing": "La sesión ya se está finalizando",+ "session_cannot_finalize": "La sesión está en estado {{status}}; no se puede finalizar",+ "session_finalizing": "La sesión se está finalizando",+ "session_is_recorder": "La sesión es una sesión de grabadora; finalícela con /finalize",+ "session_is_sliced_upload": "La sesión es una subida de archivo por partes; finalícela con /finalize-upload",+ "session_not_accepting_chunks": "La sesión está en estado {{status}}; ya no se aceptan fragmentos",+ "session_not_found": "Sesión no encontrada",+ "session_quota_exhausted": "Se agotó la cuota de almacenamiento por usuario para grabaciones en curso",+ "session_quota_would_exceed": "Se superaría la cuota de almacenamiento por usuario para grabaciones en curso",+ "session_recording_gone": "La sesión ya se finalizó y su grabación ya no existe",+ "session_storage_allocation_failed": "El servidor no pudo asignar almacenamiento para la sesión",+ "setting_key_required": "La clave del ajuste es obligatoria",+ "share_not_found": "Elemento compartido no encontrado",+ "share_revoke_denied": "No tiene permiso para revocar este elemento compartido",+ "share_sync_admin_only": "Solo los administradores del grupo pueden sincronizar los elementos compartidos",+ "share_with_owner": "No se puede compartir una grabación con su propietario",+ "share_with_self": "No puede compartir una grabación consigo mismo",+ "shares_view_denied": "No tiene permiso para ver los elementos compartidos de esta grabación",+ "sharing_https_required": "Compartir solo está disponible a través de una conexión segura (HTTPS).",+ "slice_reassembly_failed": "El servidor no pudo volver a ensamblar las partes subidas",+ "slice_size_mismatch": "Las partes subidas no suman el tamaño de archivo declarado",+ "snippet_extraction_failed": "No se pudo extraer el fragmento de audio",+ "speaker_alias_too_long": "cada alias debe tener como máximo 100 caracteres",+ "speaker_map_required": "speaker_map es obligatorio",+ "speaker_name_empty": "El nombre del hablante no puede estar vacío",+ "speaker_name_exists": "Ya existe un hablante llamado \"{{name}}\"",+ "speaker_name_required": "El nombre del hablante es obligatorio",+ "speaker_name_taken": "Ya existe un hablante con este nombre",+ "speaker_not_found": "Hablante no encontrado",+ "speaker_nothing_to_change": "Nada que cambiar: indique nombre, correo electrónico o alias",+ "speakers_not_found_or_not_owned": "Algunos hablantes no existen o no pertenecen a su cuenta",+ "subscription_not_found": "Suscripción no encontrada",+ "subtitle_generation_failed": "No se puede generar el formato de subtítulos a partir de la transcripción",+ "summary_blocked_transcription_failed": "No se puede generar el resumen: la transcripción falló. Reprocese primero la transcripción.",+ "summary_field_required": "El campo summary es obligatorio",+ "summary_generate_denied": "No tiene permiso para generar un resumen de esta grabación",+ "summary_generation_failed": "No se pudo generar el resumen. Compruebe que su servicio LLM esté en ejecución.",+ "summary_generation_failed_detail": "No se pudo generar el resumen: {{detail}}",+ "summary_llm_not_configured": "El servicio de resumen no está disponible (cliente LLM no configurado)",+ "summary_openrouter_not_configured": "El servicio de resumen no está disponible (cliente de OpenRouter no configurado)",+ "system_info_unavailable": "No se pudo obtener la información del sistema",+ "tag_access_denied": "No tiene acceso a esta etiqueta",+ "tag_already_on_recording": "La etiqueta ya está en esta grabación",+ "tag_delete_denied": "No tiene permiso para eliminar esta etiqueta",+ "tag_edit_denied": "No tiene permiso para editar esta etiqueta",+ "tag_group_assign_admin_only": "Solo los administradores del grupo pueden asignar etiquetas a grupos",+ "tag_id_required": "El ID de etiqueta es obligatorio",+ "tag_ids_required": "Se requiere tag_ids o tag_id",+ "tag_name_exists": "Ya existe una etiqueta con este nombre",+ "tag_name_required": "El nombre de la etiqueta es obligatorio",+ "tag_not_found": "Etiqueta no encontrada",+ "tag_not_on_recording": "La etiqueta no está en esta grabación",+ "tag_rename_conflict": "Ya existe otra etiqueta con este nombre",+ "tag_use_denied": "No tiene permiso para usar esta etiqueta",+ "target_folder_access_denied": "No tiene acceso a la carpeta de destino",+ "target_id_required": "target_id es obligatorio",+ "target_user_not_found": "Usuario de destino no encontrado",+ "template_in_use": "No se puede eliminar la plantilla: {{count}} etiqueta(s) usan esta plantilla",+ "template_not_found": "Plantilla no encontrada",+ "text_model_not_configured": "No hay ningún modelo de texto configurado. Defina TEXT_MODEL_BASE_URL y, para un servicio alojado, TEXT_MODEL_API_KEY.",+ "title_blocked_transcription_failed": "No se puede generar el título: la transcripción falló. Reprocese primero la transcripción.",+ "title_generation_failed": "No se pudo generar un título",+ "title_openrouter_not_configured": "El servicio de generación de títulos no está disponible (cliente de OpenRouter no configurado)",+ "token_limit_reached": "Una cuenta puede tener como máximo {{max}} tokens de API activos. Revoque un token que ya no use para crear uno nuevo.",+ "token_not_found": "Token no encontrado",+ "too_many_speaker_aliases": "como máximo 20 alias",+ "total_bytes_required": "total_bytes es obligatorio para una subida por partes",+ "transcript_download_failed": "No se pudo generar la descarga de la transcripción",+ "transcription_format_unsupported_for_identification": "El formato de transcripción no es compatible con la identificación automática",+ "unauthorized": "No autorizado",+ "unauthorized_admin_required": "No autorizado. Se requiere acceso de administrador.",+ "unexpected_error": "Se produjo un error inesperado.",+ "unexpected_error_deleting": "Se produjo un error inesperado al eliminar.",+ "unexpected_error_detail": "Se produjo un error inesperado: {{detail}}",+ "unexpected_error_processing": "Se produjo un error inesperado durante el procesamiento.",+ "unexpected_error_saving": "Se produjo un error inesperado al guardar.",+ "unexpected_error_updating_transcription": "Se produjo un error inesperado al actualizar la transcripción.",+ "unexpected_error_upload": "Se produjo un error inesperado durante la subida.",+ "unknown_event_types": "tipos de evento desconocidos: {{events}}",+ "unknown_fields": "Campo(s) desconocido(s): {{fields}}",+ "unknown_format": "Formato desconocido: {{format}}",+ "unknown_scopes": "Ámbitos desconocidos: {{scopes}}. Permitidos: {{allowed}} o full",+ "unknown_temperature": "Temperatura desconocida: {{names}}",+ "unsupported_mime_type": "mime_type no compatible: {{mimeType}}",+ "upload_tag_or_folder_forbidden": "Una etiqueta o carpeta de la subida no es una que usted pueda usar",+ "url_required": "url es obligatorio",+ "user_id_required": "El ID de usuario es obligatorio",+ "user_not_found": "Usuario no encontrado",+ "username_exists": "El nombre de usuario ya existe",+ "watch_folder_group_tag_unsupported": "Las carpetas vigiladas no están disponibles para etiquetas de grupo",+ "webhook_cap_reached": "Se alcanzó el límite de webhooks por usuario ({{count}}/{{max}})",+ "webhook_disabled": "El webhook está deshabilitado; habilítelo primero",+ "webhook_dns_failed": "Falló la resolución DNS de {{host}}",+ "webhook_not_found": "Webhook no encontrado",+ "webhook_url_bad_scheme": "El esquema debe ser http o https",+ "webhook_url_http_not_allowed": "Las URL http:// requieren allow_http=true",+ "webhook_url_missing_host": "A la URL le falta el host",+ "webhook_url_private_address": "La URL se resuelve en una dirección privada o de loopback ({{ip}}); defina WEBHOOK_INTRANET_HOST_ALLOWLIST para permitir este host de forma explícita o use una URL pública. La expresión regular de la lista de permitidos debe estar anclada (p. ej., r\"^(localhost|.*\\.intra)$\") para que no la engañen nombres de host parecidos.",+ "webhook_url_unparseable": "No se pudo analizar la URL",+ "word_document_failed": "No se pudo generar el documento de Word"+ },+ "apiMessage": {+ "accountUpdated": "¡Datos de la cuenta actualizados correctamente!",+ "alreadySubscribed": "Ya está suscrito",+ "autoProcessingStarted": "Procesamiento automático iniciado",+ "autoProcessingStopped": "Procesamiento automático detenido",+ "chunksProcessed": "Fragmentos procesados correctamente",+ "configUpdatedRestartRequired": "Configuración actualizada. Es necesario reiniciar para aplicar los cambios.",+ "embeddingsProcessedCount": "Se procesaron {{processed}} de {{total}} grabaciones.",+ "embeddingsReembeddedCount": "Se volvieron a generar los embeddings de {{processed}} de {{total}} grabaciones.",+ "existingShareLinkUsed": "Se usa el enlace compartido existente para esta grabación",+ "inquireAllProcessed": "Todas las grabaciones ya están procesadas para el modo Inquire",+ "inquireProcessedRemaining": "{{processed}} grabaciones procesadas. Quedan {{remaining}}.",+ "jobDeleted": "Tarea eliminada",+ "jobQueuedForRetry": "Tarea puesta en cola para reintentar",+ "modelDiscoveryUnsupported": "{{connector}} no ofrece un endpoint de detección de modelos.",+ "noRecordingsToReembed": "No hay grabaciones para volver a generar embeddings.",+ "noSpeakerEmbeddings": "No hay embeddings de hablantes disponibles",+ "preferencesSaved": "Preferencias guardadas correctamente",+ "pushNotificationsNotEnabled": "Notificaciones push no habilitadas",+ "recordingDeleted": "Grabación eliminada",+ "recordingStatusReset": "El estado de la grabación se ha restablecido.",+ "scanTriggered": "Escaneo iniciado",+ "sharesSynced": "Se crearon {{sharesCreated}} nuevos elementos compartidos en {{recordingsProcessed}} grabaciones",+ "speakerDeleted": "Hablante eliminado",+ "speakersMerged": "Se combinaron correctamente {{count}} hablante(s) en {{name}}",+ "speakersUpdated": "Hablantes actualizados correctamente.",+ "subscriptionRemoved": "Suscripción eliminada",+ "subscriptionSaved": "Suscripción guardada",+ "summarizationQueued": "Resumen en cola",+ "summarizingConversation": "Resumiendo la conversación anterior...",+ "summaryGenerationQueued": "Generación del resumen en cola",+ "summaryReprocessingStarted": "Reprocesamiento del resumen iniciado",+ "tagDeleted": "Etiqueta eliminada",+ "tagRemoved": "Etiqueta quitada",+ "tokenRevoked": "Token revocado correctamente",+ "transcriptUpdated": "Transcripción actualizada correctamente.",+ "transcriptionQueued": "Transcripción en cola",+ "transcriptionReprocessingQueued": "Reprocesamiento de la transcripción en cola",+ "transcriptionUpdated": "Transcripción actualizada correctamente.",+ "userAlreadyHasNamingTemplates": "El usuario ya tiene plantillas de nombrado",+ "userAlreadyHasTemplates": "El usuario ya tiene plantillas",+ "voiceProfileCleared": "Perfil de voz borrado para {{name}}"}}}diff --git a/static/locales/fr.json b/static/locales/fr.jsonindex 63763940..e4b81f1a 100644--- a/static/locales/fr.json+++ b/static/locales/fr.json@@ -2431,6 +2431,406 @@"tokenWarning": "Avertissement : {{percent}} du budget mensuel de tokens utilisé.","transcriptionExceeded": "Budget mensuel de transcription dépassé ({{used}}/{{budget}} minutes). Contactez l'administrateur pour obtenir plus de temps.","transcriptionWarning": "Avertissement : {{percent}} du budget mensuel de transcription utilisé."+ },+ "apiError": {+ "access_denied": "Accès refusé",+ "admin_required": "Accès administrateur requis",+ "already_group_member": "L'utilisateur est déjà membre de ce groupe",+ "already_shared": "Enregistrement déjà partagé avec cet utilisateur",+ "audio_access_denied": "Vous n'avez pas l'autorisation d'accéder à ce fichier audio",+ "audio_already_removed": "L'audio a déjà été supprimé.",+ "audio_conversion_timeout": "Délai de conversion audio dépassé.",+ "audio_converter_missing": "Outil de conversion audio (FFmpeg) introuvable sur le serveur.",+ "audio_decode_failed": "Le fichier envoyé n'a pas pu être lu comme audio. Il est peut-être corrompu ou dans un format non pris en charge.",+ "audio_deleted": "Le fichier audio a été supprimé",+ "audio_file_missing": "Fichier audio manquant sur le serveur",+ "audio_file_not_found": "Fichier audio introuvable",+ "audio_remove_while_processing": "Attendez la fin du traitement avant de supprimer l'audio.",+ "authentication_failed": "Échec de l'authentification",+ "authentication_required": "Authentification requise : jeton API ou session manquant, invalide, expiré ou révoqué",+ "auto_deletion_disabled": "La suppression automatique n'est pas activée",+ "auto_export_disabled": "L'export automatique n'est pas activé sur ce serveur",+ "auto_processing_disabled": "Le traitement automatique n'est pas activé",+ "auto_processing_not_running": "Le traitement automatique n'est pas en cours d'exécution",+ "batch_limit_50": "50 enregistrements maximum par lot",+ "bulk_delete_limit": "Impossible de supprimer plus de 100 enregistrements à la fois",+ "bulk_reprocess_limit": "Impossible de retraiter plus de 50 enregistrements à la fois",+ "bulk_update_limit": "Impossible de mettre à jour plus de 100 enregistrements à la fois",+ "cannot_change_own_admin": "Impossible de modifier votre propre statut d'administrateur",+ "cannot_delete_self": "Impossible de supprimer votre propre compte",+ "chat_blocked_transcription_failed": "Chat impossible : la transcription a échoué. Veuillez d'abord retraiter la transcription.",+ "chat_client_not_configured": "Le service de chat n'est pas disponible (client de chat non configuré)",+ "chat_error": "Une erreur s'est produite pendant le chat",+ "chat_failed": "Échec du chat",+ "chat_openrouter_not_configured": "Le service de chat n'est pas disponible (client OpenRouter non configuré)",+ "chat_unavailable": "Service de chat non disponible",+ "chunk_empty": "Corps de segment vide",+ "chunk_out_of_order": "Segment hors séquence",+ "chunk_processing_failed": "Échec du traitement des segments",+ "chunk_too_large": "Le segment dépasse max_chunk_bytes",+ "chunk_write_failed": "Le serveur n'a pas pu écrire le segment",+ "csrf_referrer_mismatch": "La requête a été refusée, car cette page a été chargée depuis {{referrerHost}}, alors que le serveur a reçu la requête pour {{host}}. Le proxy inverse doit transmettre l'en-tête Host d'origine (ou X-Forwarded-Host), et TRUSTED_PROXY_HOPS doit correspondre au nombre de proxys.",+ "csrf_referrer_mismatch_unknown": "La requête a été refusée, car la page a été chargée depuis un autre hôte que {{host}}, pour lequel le serveur a reçu la requête. Le proxy inverse doit transmettre l'en-tête Host d'origine (ou X-Forwarded-Host), et TRUSTED_PROXY_HOPS doit correspondre au nombre de proxys.",+ "csrf_referrer_missing": "La requête a été refusée, car le navigateur n'a pas envoyé d'en-tête Referer, requis pour les requêtes HTTPS. Un proxy inverse, une extension du navigateur ou un en-tête Referrer-Policy qui le supprime en est la cause.",+ "csrf_session_expired": "Votre session a expiré. Veuillez recharger la page et réessayer.",+ "cursor_expired": "Le curseur est trop ancien ; recommencez sans curseur",+ "custom_date_pattern_missing_groups": "Le motif personnalisé doit définir les groupes nommés (?P<year>...), (?P<month>...) et (?P<day>...) ; manquants : {{groups}}",+ "custom_date_pattern_required": "Un motif personnalisé est requis lorsque l'option personnalisée est sélectionnée.",+ "custom_date_pattern_too_long": "Le motif personnalisé est trop long (500 caractères au maximum).",+ "delete_failed": "Échec de la suppression",+ "delete_owner_only": "Autorisation refusée - seul le propriétaire peut supprimer",+ "deletion_not_allowed": "Suppression non autorisée",+ "delivery_not_found": "Livraison introuvable",+ "duplicate_speaker_ids": "Des identifiants d'intervenant en double ont été fournis",+ "email_exists": "L'adresse e-mail existe déjà",+ "empty_file": "Le fichier envoyé est vide.",+ "enabled_field_required": "Le champ enabled est requis",+ "event_not_found": "Événement introuvable",+ "export_rename_failed": "Échec du renommage des exports existants",+ "export_template_not_found": "Modèle d'exportation introuvable",+ "external_ref_pair_required": "external_system et external_ref doivent être fournis ensemble",+ "extracted_audio_too_large": "L'audio extrait fait {{size}} Mo, ce qui dépasse la limite de {{limit}} Mo pour les fichiers stockés. Activez le découpage en segments dans les paramètres d'administration (ENABLE_CHUNKING=true) ou utilisez une vidéo source plus courte ou à débit plus faible.",+ "ffmpeg_missing": "FFmpeg introuvable sur le serveur",+ "file_monitor_unavailable": "Module de surveillance des fichiers non disponible",+ "file_too_large": "Fichier trop volumineux",+ "file_too_large_max": "Fichier trop volumineux. La taille maximale est de {{maxSize}} Mo.",+ "filename_too_long": "filename doit comporter 255 caractères au maximum",+ "folder_access_denied": "Vous n'avez pas accès à ce dossier",+ "folder_delete_denied": "Vous n'avez pas l'autorisation de supprimer ce dossier",+ "folder_edit_denied": "Vous n'avez pas l'autorisation de modifier ce dossier",+ "folder_group_assign_admin_only": "Seuls les administrateurs du groupe peuvent attribuer des dossiers à des groupes",+ "folder_id_not_found": "Dossier {{folderId}} introuvable",+ "folder_name_exists": "Un dossier portant ce nom existe déjà",+ "folder_name_exists_for_group": "Un dossier portant ce nom existe déjà pour ce groupe",+ "folder_name_required": "Le nom du dossier est requis",+ "folder_not_found": "Dossier introuvable",+ "folder_rename_conflict": "Un autre dossier portant ce nom existe déjà",+ "folders_disabled": "La fonctionnalité Dossiers n'est pas activée",+ "forbidden_tag_ids": "Identifiants de tag inconnus ou interdits",+ "full_scope_not_combinable": "'full' ne peut pas être combiné avec d'autres portées",+ "global_stats_admin_only": "Accès administrateur requis pour les statistiques globales",+ "group_folder_create_admin_only": "Seuls les administrateurs du groupe peuvent créer des dossiers de groupe",+ "group_folder_delete_admin_only": "Seuls les administrateurs du groupe peuvent supprimer des dossiers de groupe",+ "group_folder_edit_admin_only": "Seuls les administrateurs du groupe peuvent modifier des dossiers de groupe",+ "group_folder_name_exists": "Un dossier de groupe portant ce nom existe déjà",+ "group_folders_members_only": "Vous devez être membre de l'équipe pour voir les dossiers de groupe",+ "group_folders_require_internal_sharing": "Les dossiers de groupe nécessitent l'activation du partage interne. Veuillez définir ENABLE_INTERNAL_SHARING=true dans votre configuration.",+ "group_name_exists": "Un groupe portant ce nom existe déjà",+ "group_name_required": "Le nom du groupe est requis",+ "group_not_found": "Groupe introuvable",+ "group_tag_apply_denied": "Vous n'avez pas l'autorisation d'appliquer des tags de groupe à cet enregistrement",+ "group_tag_apply_restricted": "Seul le propriétaire de l'enregistrement ou un administrateur du groupe peut appliquer des tags de groupe",+ "group_tag_create_admin_only": "Seuls les administrateurs du groupe peuvent créer des tags de groupe",+ "group_tag_delete_admin_only": "Seuls les administrateurs du groupe peuvent supprimer des tags de groupe",+ "group_tag_edit_admin_only": "Seuls les administrateurs du groupe peuvent modifier des tags de groupe",+ "group_tag_name_exists": "Un tag de groupe portant ce nom existe déjà",+ "group_tag_name_exists_for_group": "Un tag portant ce nom existe déjà pour ce groupe",+ "group_tag_remove_denied": "Vous n'avez pas l'autorisation de retirer des tags de groupe de cet enregistrement",+ "group_tag_remove_restricted": "Seul le propriétaire de l'enregistrement ou un administrateur du groupe peut retirer des tags de groupe",+ "group_tags_members_only": "Vous devez être membre de l'équipe pour voir les tags de groupe",+ "group_tags_require_internal_sharing": "Les tags de groupe nécessitent l'activation du partage interne. Veuillez définir ENABLE_INTERNAL_SHARING=true dans votre configuration.",+ "groups_require_internal_sharing": "Les groupes nécessitent l'activation du partage interne. Veuillez définir ENABLE_INTERNAL_SHARING=true dans votre configuration.",+ "incognito_disabled": "Le mode incognito n'est pas activé sur ce serveur",+ "inquire_agent_off": "L'agent Inquire est désactivé sur ce serveur",+ "inquire_disabled": "Le mode Inquire n'est pas activé",+ "inquire_off": "Inquire est désactivé sur ce serveur",+ "internal_sharing_disabled": "Le partage interne n'est pas activé",+ "invalid_boolean_flag": "{{key}} doit valoir true ou false",+ "invalid_boolean_value": "La valeur doit être un booléen valide (true/false, 1/0, yes/no)",+ "invalid_bulk_status_field": "Le champ doit être \"inbox\", \"highlight\" ou \"archive\"",+ "invalid_bulk_tag_action": "L'action doit être \"add\" ou \"remove\"",+ "invalid_color_scheme": "color_scheme invalide",+ "invalid_cursor": "Le curseur n'a pas pu être lu",+ "invalid_dark_mode": "dark_mode invalide",+ "invalid_date_field": "date_field doit être meeting_date ou created_at",+ "invalid_events_list": "events doit être une liste non vide",+ "invalid_expires_in_days": "expires_in_days doit être un entier non négatif",+ "invalid_expires_in_days_range": "expires_in_days doit être compris entre 1 et 3650",+ "invalid_filters": "filters doit être un objet",+ "invalid_finalize_body": "Le corps de finalize doit être un objet JSON",+ "invalid_folder_id": "folder_id doit être un identifiant ou none",+ "invalid_group_role": "Le rôle doit être \"admin\" ou \"member\"",+ "invalid_idempotency_key": "idempotency_key doit comporter de 1 à 100 caractères",+ "invalid_ids_list": "ids doit être une liste",+ "invalid_inquire_mode": "mode doit être rag, agent ou auto",+ "invalid_integer_value": "La valeur doit être un entier valide",+ "invalid_is_archived": "is_archived doit être un booléen",+ "invalid_json": "JSON invalide",+ "invalid_limit": "limit doit être compris entre 1 et 500",+ "invalid_max_segments": "max_segments doit être au moins égal à 1",+ "invalid_meeting_date": "Format de meeting_date invalide",+ "invalid_number_value": "La valeur doit être un nombre valide",+ "invalid_options_list": "options doit être une liste",+ "invalid_query_length": "q doit comporter de 2 à 500 caractères",+ "invalid_recording_ids": "Identifiants d'enregistrement invalides",+ "invalid_recording_ids_csv": "recording_ids doit être une liste d'identifiants séparés par des virgules",+ "invalid_recording_ids_list": "recording_ids doit être une liste",+ "invalid_regex_pattern": "Motif regex invalide pour \"{{variable}}\" : {{detail}}",+ "invalid_regex_patterns": "regex_patterns doit être un dictionnaire",+ "invalid_regular_expression": "Expression régulière non valide : {{detail}}",+ "invalid_reprocess_type": "Le type doit être \"transcription\" ou \"summary\"",+ "invalid_scope": "scope doit être own, shared ou all",+ "invalid_scopes_list": "scopes doit être une liste non vide de noms de portée",+ "invalid_search_mode": "mode doit être keyword, semantic ou auto",+ "invalid_search_paging": "limit doit être compris entre 1 et 50 et page doit être au moins égal à 1",+ "invalid_setting_type": "Type de paramètre invalide. Valeurs possibles : {{types}}",+ "invalid_snippet_range": "Heure de début ou durée invalide",+ "invalid_source_ids": "source_ids doit être une liste non vide",+ "invalid_speaker_aliases": "aliases doit être une liste de chaînes",+ "invalid_speaker_count_mode": "speaker_count_mode invalide",+ "invalid_speaker_email": "email doit être une adresse e-mail",+ "invalid_speaker_map": "speaker_map doit être un objet",+ "invalid_speaker_value_type": "Type de valeur invalide pour l'orateur \"{{label}}\"",+ "invalid_storage_quota": "Le quota de stockage doit être un nombre positif de Mo.",+ "invalid_subscription_data": "Données d'abonnement invalides",+ "invalid_tag_color": "La couleur doit être une valeur hexadécimale comme #3B82F6",+ "invalid_tag_ids": "tag_ids doit être une liste",+ "invalid_tag_ids_list": "tag_ids doit être une liste d'identifiants de tags",+ "invalid_temperature": "La température {{kind}} doit être un nombre compris entre 0 et 2",+ "invalid_temperature_values": "values doit être un objet de températures",+ "invalid_threshold": "Valeur de seuil invalide",+ "invalid_timezone_value": "La valeur doit être un fuseau horaire IANA valide, par exemple Europe/Berlin",+ "invalid_total_bytes": "total_bytes doit être un entier positif",+ "invalid_transcript_data": "Données de transcription fournies invalides",+ "invalid_updated_since": "updated_since doit être une date et heure ISO 8601",+ "invalid_username_length": "Le nom d'utilisateur doit comporter de 2 à 20 caractères.",+ "invalid_with_sources": "with_sources doit valoir true ou false",+ "job_not_found": "Tâche introuvable",+ "job_retry_failed_only": "Seules les tâches en échec peuvent être relancées",+ "keep_audio_only_immutable": "keep_audio_only est défini lors du téléversement et ne peut plus être modifié ensuite.",+ "last_admin_demotion": "Impossible de retirer les droits d'administrateur au dernier administrateur restant.",+ "llm_connection_failed": "Impossible de se connecter au serveur LLM. Veuillez vérifier que votre service LLM est en cours d'exécution.",+ "membership_not_found": "Adhésion introuvable",+ "merge_failed": "Échec de la fusion des enregistrements",+ "merge_needs_two": "Sélectionnez au moins deux enregistrements à fusionner",+ "merge_needs_two_speakers": "Il faut au moins 2 intervenants pour une fusion",+ "message_required": "message est requis",+ "missing_bulk_status_fields": "recording_ids, field ou value manquant",+ "missing_recording_ids": "recording_ids manquant",+ "missing_recording_ids_or_tag_id": "recording_ids ou tag_id manquant",+ "missing_request_body": "Corps de la requête manquant",+ "missing_required_field": "Champ obligatoire manquant : {{field}}",+ "missing_tag_ids": "tag_ids manquant dans le corps de la requête",+ "name_and_prompt_required": "Un nom et un prompt ou des hotwords sont requis",+ "name_and_template_required": "Le nom et le modèle sont requis",+ "name_empty": "name ne peut pas être vide",+ "name_required": "name est requis",+ "naming_template_not_found": "Modèle de nommage introuvable",+ "no_api_token": "Aucun jeton API dans cette requête",+ "no_audio_file": "Aucun fichier audio",+ "no_chunks_uploaded": "Aucun segment téléversé pour le moment",+ "no_configuration_data": "Aucune donnée de configuration fournie",+ "no_data_provided": "Aucune donnée fournie",+ "no_events": "Aucun événement trouvé",+ "no_events_for_recording": "Aucun événement trouvé pour cet enregistrement",+ "no_fields_given": "Aucun champ indiqué",+ "no_file_provided": "Aucun fichier fourni",+ "no_file_selected": "Aucun fichier sélectionné",+ "no_message_provided": "Aucun message fourni",+ "no_messages_provided": "Aucun message fourni",+ "no_messages_to_download": "Aucun message à télécharger",+ "no_notes": "Aucune note disponible pour cet enregistrement",+ "no_query_provided": "Aucune requête fournie",+ "no_recording_id": "Aucun identifiant d'enregistrement fourni",+ "no_recordings_specified": "Aucun enregistrement spécifié",+ "no_speaker_map": "Aucune correspondance d'orateurs fournie",+ "no_speakers_in_transcription": "Aucun orateur trouvé dans la transcription",+ "no_summary": "Aucun résumé disponible pour cet enregistrement",+ "no_transcription": "Aucune transcription disponible",+ "no_transcription_connector": "Aucun connecteur de transcription actif",+ "no_transcription_data": "Aucune donnée de transcription fournie",+ "no_transcription_for_identification": "Aucune transcription disponible pour l'identification des orateurs",+ "no_transcription_for_recording": "Aucune transcription disponible pour cet enregistrement",+ "no_transcription_for_summary": "Aucune transcription valide disponible pour générer le résumé",+ "no_transcription_for_title": "Aucune transcription valide disponible pour générer le titre",+ "no_transcription_provided": "Aucune transcription fournie",+ "not_found": "Introuvable",+ "notes_field_required": "Le champ notes est requis",+ "notification_not_found": "Notification introuvable",+ "participants_too_long": "participants doit comporter 500 caractères au maximum",+ "permission_denied": "Permission refusée",+ "personal_tag_apply_own_only": "Vous ne pouvez appliquer que vos propres tags personnels",+ "personal_tag_remove_own_only": "Vous ne pouvez retirer que vos propres tags personnels",+ "public_link_https_required": "Les liens publics nécessitent une connexion HTTPS",+ "public_link_not_permitted": "Vous n'êtes pas autorisé à créer des liens publics",+ "public_share_not_permitted": "Vous n'avez pas l'autorisation de créer des liens de partage publics. Contactez votre administrateur.",+ "public_sharing_disabled": "Le partage public n'est pas activé sur ce serveur",+ "public_sharing_off": "Le partage public est désactivé sur ce serveur",+ "push_unavailable": "Notifications push non disponibles",+ "question_required": "question est requis",+ "recording_access_denied": "Vous n'avez pas l'autorisation d'accéder à cet enregistrement",+ "recording_already_processing": "L'enregistrement est déjà en cours de traitement",+ "recording_chat_denied": "Vous n'avez pas l'autorisation de discuter avec cet enregistrement",+ "recording_delete_admin_only": "Seuls les administrateurs peuvent supprimer des enregistrements",+ "recording_delete_denied": "Vous n'avez pas l'autorisation de supprimer cet enregistrement",+ "recording_delete_failed": "Impossible de supprimer l'enregistrement",+ "recording_edit_denied": "Vous n'avez pas l'autorisation de modifier cet enregistrement",+ "recording_ids_empty": "recording_ids doit être une liste non vide",+ "recording_ids_required": "recording_ids est requis",+ "recording_modify_denied": "Vous n'avez pas l'autorisation de modifier cet enregistrement",+ "recording_not_found": "Enregistrement introuvable",+ "recording_not_found_or_no_share": "Enregistrement introuvable ou vous n'avez pas l'autorisation de le partager.",+ "recording_not_found_or_no_view": "Enregistrement introuvable ou vous n'avez pas l'autorisation de le consulter.",+ "recording_not_resettable": "L'enregistrement n'est pas dans un état qui permet sa réinitialisation. Statut actuel : {{status}}",+ "recording_or_audio_not_found": "Enregistrement ou fichier audio introuvable",+ "recording_reprocess_denied": "Vous n'avez pas l'autorisation de retraiter cet enregistrement",+ "recording_share_denied": "Vous n'avez pas l'autorisation de partager cet enregistrement",+ "recording_view_denied": "Vous n'avez pas l'autorisation de consulter cet enregistrement",+ "recordings_export_failed": "Échec de l'export des enregistrements",+ "reference_not_found": "Référence introuvable",+ "reprocess_audio_not_found": "Fichier audio introuvable pour le retraitement",+ "reprocess_queue_failed": "Le retraitement n'a pas pu être mis en file d'attente ; veuillez réessayer",+ "reshare_edit_not_permitted": "Vous ne pouvez pas accorder l'autorisation de modification, car vous n'avez pas vous-même accès en modification",+ "reshare_reshare_not_permitted": "Vous ne pouvez pas accorder l'autorisation de repartager, car vous n'avez pas vous-même le droit de repartager",+ "sample_not_found": "Échantillon introuvable",+ "sample_remove_failed": "Impossible de supprimer l'échantillon",+ "scope_narrow_only": "Les portées peuvent seulement être restreintes ; créez un nouveau jeton pour obtenir davantage d'accès",+ "scoped_token_header_only": "Les jetons à portée restreinte ne sont acceptés que dans un en-tête (Authorization: Bearer ...)",+ "semantic_search_unavailable": "La recherche sémantique n'est pas disponible sur cette instance",+ "session_already_finalized": "Session déjà finalisée",+ "session_already_finalizing": "La session est déjà en cours de finalisation",+ "session_cannot_finalize": "La session a le statut {{status}} ; finalisation impossible",+ "session_finalizing": "La session est en cours de finalisation",+ "session_is_recorder": "La session est une session d'enregistreur ; finalisez-la avec /finalize",+ "session_is_sliced_upload": "La session est un téléversement de fichier par tranches ; finalisez-la avec /finalize-upload",+ "session_not_accepting_chunks": "La session a le statut {{status}} ; les segments ne sont plus acceptés",+ "session_not_found": "Session introuvable",+ "session_quota_exhausted": "Quota de stockage par utilisateur des enregistrements en cours épuisé",+ "session_quota_would_exceed": "Le quota de stockage par utilisateur des enregistrements en cours serait dépassé",+ "session_recording_gone": "La session a déjà été finalisée et son enregistrement n'existe plus",+ "session_storage_allocation_failed": "Le serveur n'a pas pu allouer de stockage pour la session",+ "setting_key_required": "La clé du paramètre est requise",+ "share_not_found": "Partage introuvable",+ "share_revoke_denied": "Vous n'avez pas l'autorisation de révoquer ce partage",+ "share_sync_admin_only": "Seuls les administrateurs du groupe peuvent synchroniser les partages",+ "share_with_owner": "Impossible de partager un enregistrement avec son propriétaire",+ "share_with_self": "Impossible de partager un enregistrement avec vous-même",+ "shares_view_denied": "Vous n'avez pas l'autorisation de voir les partages de cet enregistrement",+ "sharing_https_required": "Le partage n'est disponible que via une connexion sécurisée (HTTPS).",+ "slice_reassembly_failed": "Le serveur n'a pas pu réassembler les tranches téléversées",+ "slice_size_mismatch": "Les tranches téléversées ne correspondent pas à la taille de fichier déclarée",+ "snippet_extraction_failed": "Échec de l'extraction de l'extrait audio",+ "speaker_alias_too_long": "chaque alias doit comporter au maximum 100 caractères",+ "speaker_map_required": "speaker_map est requis",+ "speaker_name_empty": "Le nom de l'orateur ne peut pas être vide",+ "speaker_name_exists": "Un orateur nommé \"{{name}}\" existe déjà",+ "speaker_name_required": "Le nom de l'orateur est requis",+ "speaker_name_taken": "Un orateur portant ce nom existe déjà",+ "speaker_not_found": "Orateur introuvable",+ "speaker_nothing_to_change": "Rien à modifier : indiquez un nom, une adresse e-mail ou des alias",+ "speakers_not_found_or_not_owned": "Certains intervenants n'existent pas ou n'appartiennent pas à votre compte",+ "subscription_not_found": "Abonnement introuvable",+ "subtitle_generation_failed": "Impossible de générer le format de sous-titres à partir de la transcription",+ "summary_blocked_transcription_failed": "Impossible de générer le résumé : la transcription a échoué. Veuillez d'abord retraiter la transcription.",+ "summary_field_required": "Le champ summary est requis",+ "summary_generate_denied": "Vous n'avez pas l'autorisation de générer un résumé pour cet enregistrement",+ "summary_generation_failed": "Échec de la génération du résumé. Veuillez vérifier que votre service LLM est en cours d'exécution.",+ "summary_generation_failed_detail": "Échec de la génération du résumé : {{detail}}",+ "summary_llm_not_configured": "Le service de résumé n'est pas disponible (client LLM non configuré)",+ "summary_openrouter_not_configured": "Le service de résumé n'est pas disponible (client OpenRouter non configuré)",+ "system_info_unavailable": "Impossible de récupérer les informations système",+ "tag_access_denied": "Vous n'avez pas accès à ce tag",+ "tag_already_on_recording": "Le tag est déjà appliqué à cet enregistrement",+ "tag_delete_denied": "Vous n'avez pas l'autorisation de supprimer ce tag",+ "tag_edit_denied": "Vous n'avez pas l'autorisation de modifier ce tag",+ "tag_group_assign_admin_only": "Seuls les administrateurs du groupe peuvent attribuer des tags à des groupes",+ "tag_id_required": "L'identifiant du tag est requis",+ "tag_ids_required": "tag_ids ou tag_id requis",+ "tag_name_exists": "Un tag portant ce nom existe déjà",+ "tag_name_required": "Le nom du tag est requis",+ "tag_not_found": "Tag introuvable",+ "tag_not_on_recording": "Le tag n'est pas appliqué à cet enregistrement",+ "tag_rename_conflict": "Un autre tag portant ce nom existe déjà",+ "tag_use_denied": "Aucune autorisation d'utiliser ce tag",+ "target_folder_access_denied": "Aucun accès au dossier cible",+ "target_id_required": "target_id est requis",+ "target_user_not_found": "Utilisateur cible introuvable",+ "template_in_use": "Impossible de supprimer le modèle : {{count}} tag(s) utilisent ce modèle",+ "template_not_found": "Modèle introuvable",+ "text_model_not_configured": "Aucun modèle de texte n'est configuré. Définissez TEXT_MODEL_BASE_URL, ainsi que TEXT_MODEL_API_KEY pour un service hébergé.",+ "title_blocked_transcription_failed": "Impossible de générer le titre : la transcription a échoué. Veuillez d'abord retraiter la transcription.",+ "title_generation_failed": "Échec de la génération du titre",+ "title_openrouter_not_configured": "Le service de génération de titres n'est pas disponible (client OpenRouter non configuré)",+ "token_limit_reached": "Un compte peut posséder au maximum {{max}} jetons d'API actifs. Révoquez un jeton que vous n'utilisez plus pour en créer un nouveau.",+ "token_not_found": "Jeton introuvable",+ "too_many_speaker_aliases": "20 alias au maximum",+ "total_bytes_required": "total_bytes est requis pour un téléversement par tranches",+ "transcript_download_failed": "Échec de la génération du téléchargement de la transcription",+ "transcription_format_unsupported_for_identification": "Format de transcription non pris en charge pour l'identification automatique",+ "unauthorized": "Non autorisé",+ "unauthorized_admin_required": "Non autorisé. Accès administrateur requis.",+ "unexpected_error": "Une erreur inattendue s'est produite.",+ "unexpected_error_deleting": "Une erreur inattendue s'est produite lors de la suppression.",+ "unexpected_error_detail": "Une erreur inattendue s'est produite : {{detail}}",+ "unexpected_error_processing": "Une erreur inattendue s'est produite pendant le traitement.",+ "unexpected_error_saving": "Une erreur inattendue s'est produite lors de l'enregistrement.",+ "unexpected_error_updating_transcription": "Une erreur inattendue s'est produite lors de la mise à jour de la transcription.",+ "unexpected_error_upload": "Une erreur inattendue s'est produite pendant le téléversement.",+ "unknown_event_types": "types d'événements inconnus : {{events}}",+ "unknown_fields": "Champ(s) inconnu(s) : {{fields}}",+ "unknown_format": "Format inconnu : {{format}}",+ "unknown_scopes": "Portées inconnues : {{scopes}}. Autorisées : {{allowed}} ou full",+ "unknown_temperature": "Température inconnue : {{names}}",+ "unsupported_mime_type": "mime_type non pris en charge : {{mimeType}}",+ "upload_tag_or_folder_forbidden": "Un tag ou un dossier du téléversement ne fait pas partie de ceux que vous pouvez utiliser",+ "url_required": "url est requis",+ "user_id_required": "L'identifiant de l'utilisateur est requis",+ "user_not_found": "Utilisateur introuvable",+ "username_exists": "Le nom d'utilisateur existe déjà",+ "watch_folder_group_tag_unsupported": "Les dossiers surveillés ne sont pas disponibles pour les tags de groupe",+ "webhook_cap_reached": "Limite de webhooks par utilisateur atteinte ({{count}}/{{max}})",+ "webhook_disabled": "Le webhook est désactivé ; activez-le d'abord",+ "webhook_dns_failed": "La résolution DNS a échoué pour {{host}}",+ "webhook_not_found": "Webhook introuvable",+ "webhook_url_bad_scheme": "Le schéma doit être http ou https",+ "webhook_url_http_not_allowed": "Les URL http:// nécessitent allow_http=true",+ "webhook_url_missing_host": "L'URL ne contient pas d'hôte",+ "webhook_url_private_address": "L'URL pointe vers une adresse privée ou de bouclage ({{ip}}) ; définissez WEBHOOK_INTRANET_HOST_ALLOWLIST pour autoriser explicitement cet hôte, ou utilisez une URL publique. L'expression régulière de la liste d'autorisation doit être ancrée (p. ex. r\"^(localhost|.*\\.intra)$\") pour ne pas être trompée par des noms d'hôte similaires.",+ "webhook_url_unparseable": "L'URL n'a pas pu être analysée",+ "word_document_failed": "Échec de la génération du document Word"+ },+ "apiMessage": {+ "accountUpdated": "Informations du compte mises à jour !",+ "alreadySubscribed": "Déjà abonné",+ "autoProcessingStarted": "Traitement automatique démarré",+ "autoProcessingStopped": "Traitement automatique arrêté",+ "chunksProcessed": "Segments traités avec succès",+ "configUpdatedRestartRequired": "Configuration mise à jour. Un redémarrage est nécessaire pour appliquer les modifications.",+ "embeddingsProcessedCount": "{{processed}} enregistrements traités sur {{total}}.",+ "embeddingsReembeddedCount": "Embeddings régénérés pour {{processed}} enregistrements sur {{total}}.",+ "existingShareLinkUsed": "Utilisation du lien de partage existant pour cet enregistrement",+ "inquireAllProcessed": "Tous les enregistrements sont déjà traités pour le mode Inquire",+ "inquireProcessedRemaining": "{{processed}} enregistrements traités. {{remaining}} restants.",+ "jobDeleted": "Tâche supprimée",+ "jobQueuedForRetry": "Tâche placée en file d'attente pour nouvelle tentative",+ "modelDiscoveryUnsupported": "{{connector}} n'expose pas de point de terminaison de découverte des modèles.",+ "noRecordingsToReembed": "Aucun enregistrement dont les embeddings sont à régénérer.",+ "noSpeakerEmbeddings": "Aucune empreinte vocale d'orateur disponible",+ "preferencesSaved": "Préférences enregistrées avec succès",+ "pushNotificationsNotEnabled": "Notifications push non activées",+ "recordingDeleted": "Enregistrement supprimé",+ "recordingStatusReset": "Le statut de l'enregistrement a été réinitialisé.",+ "scanTriggered": "Analyse déclenchée",+ "sharesSynced": "{{sharesCreated}} nouveaux partages créés sur {{recordingsProcessed}} enregistrements",+ "speakerDeleted": "Orateur supprimé",+ "speakersMerged": "{{count}} orateur(s) fusionné(s) avec succès dans {{name}}",+ "speakersUpdated": "Orateurs mis à jour avec succès.",+ "subscriptionRemoved": "Abonnement supprimé",+ "subscriptionSaved": "Abonnement enregistré",+ "summarizationQueued": "Résumé placé en file d'attente",+ "summarizingConversation": "Résumé de la conversation précédente...",+ "summaryGenerationQueued": "Génération du résumé placée en file d'attente",+ "summaryReprocessingStarted": "Retraitement du résumé démarré",+ "tagDeleted": "Tag supprimé",+ "tagRemoved": "Tag retiré",+ "tokenRevoked": "Jeton révoqué avec succès",+ "transcriptUpdated": "Transcription mise à jour avec succès.",+ "transcriptionQueued": "Transcription placée en file d'attente",+ "transcriptionReprocessingQueued": "Retraitement de la transcription placé en file d'attente",+ "transcriptionUpdated": "Transcription mise à jour avec succès.",+ "userAlreadyHasNamingTemplates": "L'utilisateur possède déjà des modèles de nommage",+ "userAlreadyHasTemplates": "L'utilisateur possède déjà des modèles",+ "voiceProfileCleared": "Profil vocal effacé pour {{name}}"}}}diff --git a/static/locales/pt-BR.json b/static/locales/pt-BR.jsonindex 2cb8a417..ba7606a7 100644--- a/static/locales/pt-BR.json+++ b/static/locales/pt-BR.json@@ -2431,6 +2431,406 @@"tokenWarning": "Aviso: {{percent}} do orçamento mensal de tokens utilizado.","transcriptionExceeded": "Orçamento mensal de transcrição excedido ({{used}}/{{budget}} minutos). Entre em contato com o administrador para obter mais tempo.","transcriptionWarning": "Aviso: {{percent}} do orçamento mensal de transcrição utilizado."+ },+ "apiError": {+ "access_denied": "Acesso negado",+ "admin_required": "Acesso de administrador necessário",+ "already_group_member": "O usuário já é membro deste grupo",+ "already_shared": "A gravação já está compartilhada com este usuário",+ "audio_access_denied": "Você não tem permissão para acessar este arquivo de áudio",+ "audio_already_removed": "O áudio já foi removido.",+ "audio_conversion_timeout": "A conversão de áudio excedeu o tempo limite.",+ "audio_converter_missing": "Ferramenta de conversão de áudio (FFmpeg) não encontrada no servidor.",+ "audio_decode_failed": "O arquivo enviado não pôde ser lido como áudio. Ele pode estar corrompido ou em um formato não suportado.",+ "audio_deleted": "O arquivo de áudio foi excluído",+ "audio_file_missing": "Arquivo de áudio ausente no servidor",+ "audio_file_not_found": "Arquivo de áudio não encontrado",+ "audio_remove_while_processing": "Aguarde o fim do processamento antes de remover o áudio.",+ "authentication_failed": "Falha na autenticação",+ "authentication_required": "Autenticação necessária: token de API ou sessão ausente, inválido, expirado ou revogado",+ "auto_deletion_disabled": "A exclusão automática não está ativada",+ "auto_export_disabled": "A exportação automática não está ativada neste servidor",+ "auto_processing_disabled": "O processamento automático não está ativado",+ "auto_processing_not_running": "O processamento automático não está em execução",+ "batch_limit_50": "Máximo de 50 gravações por lote",+ "bulk_delete_limit": "Não é possível excluir mais de 100 gravações de uma vez",+ "bulk_reprocess_limit": "Não é possível reprocessar mais de 50 gravações de uma vez",+ "bulk_update_limit": "Não é possível atualizar mais de 100 gravações de uma vez",+ "cannot_change_own_admin": "Não é possível alterar seu próprio status de administrador",+ "cannot_delete_self": "Não é possível excluir sua própria conta",+ "chat_blocked_transcription_failed": "Não é possível conversar: a transcrição falhou. Reprocesse a transcrição primeiro.",+ "chat_client_not_configured": "O serviço de chat não está disponível (cliente de chat não configurado)",+ "chat_error": "Ocorreu um erro durante o chat",+ "chat_failed": "Falha no chat",+ "chat_openrouter_not_configured": "O serviço de chat não está disponível (cliente OpenRouter não configurado)",+ "chat_unavailable": "Serviço de chat não disponível",+ "chunk_empty": "Corpo do chunk vazio",+ "chunk_out_of_order": "Chunk fora de ordem",+ "chunk_processing_failed": "Falha ao processar os chunks",+ "chunk_too_large": "O chunk excede max_chunk_bytes",+ "chunk_write_failed": "O servidor não conseguiu gravar o chunk",+ "csrf_referrer_mismatch": "A solicitação foi recusada porque esta página foi carregada de {{referrerHost}}, mas o servidor recebeu a solicitação para {{host}}. O proxy reverso deve encaminhar o cabeçalho Host original (ou X-Forwarded-Host), e TRUSTED_PROXY_HOPS deve corresponder ao número de proxies.",+ "csrf_referrer_mismatch_unknown": "A solicitação foi recusada porque a página foi carregada de um host diferente de {{host}}, para o qual o servidor recebeu a solicitação. O proxy reverso deve encaminhar o cabeçalho Host original (ou X-Forwarded-Host), e TRUSTED_PROXY_HOPS deve corresponder ao número de proxies.",+ "csrf_referrer_missing": "A solicitação foi recusada porque o navegador não enviou o cabeçalho Referer, exigido em solicitações HTTPS. A causa é um proxy reverso, uma extensão do navegador ou um cabeçalho Referrer-Policy que o remove.",+ "csrf_session_expired": "Sua sessão expirou. Recarregue a página e tente novamente.",+ "cursor_expired": "O cursor é antigo demais; recomece sem cursor",+ "custom_date_pattern_missing_groups": "O padrão personalizado deve definir os grupos nomeados (?P<year>...), (?P<month>...) e (?P<day>...); faltando: {{groups}}",+ "custom_date_pattern_required": "O padrão personalizado é obrigatório quando a opção personalizada está selecionada.",+ "custom_date_pattern_too_long": "O padrão personalizado é longo demais (máximo de 500 caracteres).",+ "delete_failed": "Falha na exclusão",+ "delete_owner_only": "Permissão negada: somente o proprietário pode excluir",+ "deletion_not_allowed": "Exclusão não permitida",+ "delivery_not_found": "Entrega não encontrada",+ "duplicate_speaker_ids": "IDs de orador duplicados foram informados",+ "email_exists": "O e-mail já existe",+ "empty_file": "O arquivo enviado está vazio.",+ "enabled_field_required": "O campo enabled é obrigatório",+ "event_not_found": "Evento não encontrado",+ "export_rename_failed": "Falha ao renomear as exportações existentes",+ "export_template_not_found": "Modelo de exportação não encontrado",+ "external_ref_pair_required": "external_system e external_ref devem ser informados juntos",+ "extracted_audio_too_large": "O áudio extraído tem {{size}} MB, acima do limite de {{limit}} MB para arquivos armazenados. Ative a divisão em partes nas configurações de administração (ENABLE_CHUNKING=true) ou use um vídeo de origem mais curto ou com taxa de bits menor.",+ "ffmpeg_missing": "FFmpeg não encontrado no servidor",+ "file_monitor_unavailable": "Módulo de monitoramento de arquivos não disponível",+ "file_too_large": "Arquivo grande demais",+ "file_too_large_max": "Arquivo grande demais. O tamanho máximo é {{maxSize}} MB.",+ "filename_too_long": "filename deve ter no máximo 255 caracteres",+ "folder_access_denied": "Você não tem acesso a esta pasta",+ "folder_delete_denied": "Você não tem permissão para excluir esta pasta",+ "folder_edit_denied": "Você não tem permissão para editar esta pasta",+ "folder_group_assign_admin_only": "Somente administradores do grupo podem atribuir pastas a grupos",+ "folder_id_not_found": "Pasta {{folderId}} não encontrada",+ "folder_name_exists": "Já existe uma pasta com este nome",+ "folder_name_exists_for_group": "Já existe uma pasta com este nome para este grupo",+ "folder_name_required": "O nome da pasta é obrigatório",+ "folder_not_found": "Pasta não encontrada",+ "folder_rename_conflict": "Já existe outra pasta com este nome",+ "folders_disabled": "O recurso de pastas não está ativado",+ "forbidden_tag_ids": "IDs de etiqueta desconhecidos ou proibidos",+ "full_scope_not_combinable": "'full' não pode ser combinado com outros escopos",+ "global_stats_admin_only": "Acesso de administrador necessário para estatísticas globais",+ "group_folder_create_admin_only": "Somente administradores do grupo podem criar pastas de grupo",+ "group_folder_delete_admin_only": "Somente administradores do grupo podem excluir pastas de grupo",+ "group_folder_edit_admin_only": "Somente administradores do grupo podem editar pastas de grupo",+ "group_folder_name_exists": "Já existe uma pasta de grupo com este nome",+ "group_folders_members_only": "Você precisa ser membro da equipe para ver as pastas de grupo",+ "group_folders_require_internal_sharing": "As pastas de grupo exigem que o compartilhamento interno esteja ativado. Defina ENABLE_INTERNAL_SHARING=true na sua configuração.",+ "group_name_exists": "Já existe um grupo com este nome",+ "group_name_required": "O nome do grupo é obrigatório",+ "group_not_found": "Grupo não encontrado",+ "group_tag_apply_denied": "Você não tem permissão para aplicar etiquetas de grupo a esta gravação",+ "group_tag_apply_restricted": "Somente o proprietário da gravação ou um administrador do grupo pode aplicar etiquetas de grupo",+ "group_tag_create_admin_only": "Somente administradores do grupo podem criar etiquetas de grupo",+ "group_tag_delete_admin_only": "Somente administradores do grupo podem excluir etiquetas de grupo",+ "group_tag_edit_admin_only": "Somente administradores do grupo podem editar etiquetas de grupo",+ "group_tag_name_exists": "Já existe uma etiqueta de grupo com este nome",+ "group_tag_name_exists_for_group": "Já existe uma etiqueta com este nome para este grupo",+ "group_tag_remove_denied": "Você não tem permissão para remover etiquetas de grupo desta gravação",+ "group_tag_remove_restricted": "Somente o proprietário da gravação ou um administrador do grupo pode remover etiquetas de grupo",+ "group_tags_members_only": "Você precisa ser membro da equipe para ver as etiquetas de grupo",+ "group_tags_require_internal_sharing": "As etiquetas de grupo exigem que o compartilhamento interno esteja ativado. Defina ENABLE_INTERNAL_SHARING=true na sua configuração.",+ "groups_require_internal_sharing": "Os grupos exigem que o compartilhamento interno esteja ativado. Defina ENABLE_INTERNAL_SHARING=true na sua configuração.",+ "incognito_disabled": "O modo anônimo não está ativado neste servidor",+ "inquire_agent_off": "O agente do Inquire está desativado neste servidor",+ "inquire_disabled": "O modo Inquire não está ativado",+ "inquire_off": "O Inquire está desativado neste servidor",+ "internal_sharing_disabled": "O compartilhamento interno não está ativado",+ "invalid_boolean_flag": "{{key}} deve ser true ou false",+ "invalid_boolean_value": "O valor deve ser um booleano válido (true/false, 1/0, yes/no)",+ "invalid_bulk_status_field": "O campo deve ser \"inbox\", \"highlight\" ou \"archive\"",+ "invalid_bulk_tag_action": "A ação deve ser \"add\" ou \"remove\"",+ "invalid_color_scheme": "color_scheme inválido",+ "invalid_cursor": "Não foi possível ler o cursor",+ "invalid_dark_mode": "dark_mode inválido",+ "invalid_date_field": "date_field deve ser meeting_date ou created_at",+ "invalid_events_list": "events deve ser uma lista não vazia",+ "invalid_expires_in_days": "expires_in_days deve ser um inteiro não negativo",+ "invalid_expires_in_days_range": "expires_in_days deve estar entre 1 e 3650",+ "invalid_filters": "filters deve ser um objeto",+ "invalid_finalize_body": "O corpo de finalize deve ser um objeto JSON",+ "invalid_folder_id": "folder_id deve ser um ID ou none",+ "invalid_group_role": "A função deve ser \"admin\" ou \"member\"",+ "invalid_idempotency_key": "idempotency_key deve ter de 1 a 100 caracteres",+ "invalid_ids_list": "ids deve ser uma lista",+ "invalid_inquire_mode": "mode deve ser rag, agent ou auto",+ "invalid_integer_value": "O valor deve ser um inteiro válido",+ "invalid_is_archived": "is_archived deve ser um booleano",+ "invalid_json": "JSON inválido",+ "invalid_limit": "limit deve estar entre 1 e 500",+ "invalid_max_segments": "max_segments deve ser no mínimo 1",+ "invalid_meeting_date": "Formato de meeting_date inválido",+ "invalid_number_value": "O valor deve ser um número válido",+ "invalid_options_list": "options deve ser uma lista",+ "invalid_query_length": "q deve ter de 2 a 500 caracteres",+ "invalid_recording_ids": "IDs de gravação inválidos",+ "invalid_recording_ids_csv": "recording_ids deve ser uma lista de IDs separados por vírgula",+ "invalid_recording_ids_list": "recording_ids deve ser uma lista",+ "invalid_regex_pattern": "Padrão regex inválido para \"{{variable}}\": {{detail}}",+ "invalid_regex_patterns": "regex_patterns deve ser um dicionário",+ "invalid_regular_expression": "Expressão regular inválida: {{detail}}",+ "invalid_reprocess_type": "O tipo deve ser \"transcription\" ou \"summary\"",+ "invalid_scope": "scope deve ser own, shared ou all",+ "invalid_scopes_list": "scopes deve ser uma lista não vazia de nomes de escopo",+ "invalid_search_mode": "mode deve ser keyword, semantic ou auto",+ "invalid_search_paging": "limit deve estar entre 1 e 50 e page deve ser no mínimo 1",+ "invalid_setting_type": "Tipo de configuração inválido. Deve ser um destes: {{types}}",+ "invalid_snippet_range": "Hora de início ou duração inválida",+ "invalid_source_ids": "source_ids deve ser uma lista não vazia",+ "invalid_speaker_aliases": "aliases deve ser uma lista de strings",+ "invalid_speaker_count_mode": "speaker_count_mode inválido",+ "invalid_speaker_email": "email deve ser um endereço de e-mail",+ "invalid_speaker_map": "speaker_map deve ser um objeto",+ "invalid_speaker_value_type": "Tipo de valor inválido para o orador \"{{label}}\"",+ "invalid_storage_quota": "A cota de armazenamento deve ser um número positivo de MB.",+ "invalid_subscription_data": "Dados de inscrição inválidos",+ "invalid_tag_color": "A cor deve ser um valor hexadecimal como #3B82F6",+ "invalid_tag_ids": "tag_ids deve ser uma lista",+ "invalid_tag_ids_list": "tag_ids deve ser uma lista de IDs de etiqueta",+ "invalid_temperature": "A temperatura de {{kind}} deve ser um número entre 0 e 2",+ "invalid_temperature_values": "values deve ser um objeto de temperaturas",+ "invalid_threshold": "Valor de limiar inválido",+ "invalid_timezone_value": "O valor deve ser um fuso horário IANA válido, por exemplo Europe/Berlin",+ "invalid_total_bytes": "total_bytes deve ser um inteiro positivo",+ "invalid_transcript_data": "Dados de transcrição inválidos",+ "invalid_updated_since": "updated_since deve ser uma data e hora ISO 8601",+ "invalid_username_length": "O nome de usuário deve ter de 2 a 20 caracteres.",+ "invalid_with_sources": "with_sources deve ser true ou false",+ "job_not_found": "Tarefa não encontrada",+ "job_retry_failed_only": "Somente tarefas com falha podem ser repetidas",+ "keep_audio_only_immutable": "keep_audio_only é definido no momento do envio e não pode ser alterado depois.",+ "last_admin_demotion": "Não é possível remover os direitos de administrador do último administrador restante.",+ "llm_connection_failed": "Não foi possível conectar ao servidor LLM. Verifique se o seu serviço LLM está em execução.",+ "membership_not_found": "Associação não encontrada",+ "merge_failed": "Falha ao mesclar as gravações",+ "merge_needs_two": "Selecione pelo menos duas gravações para mesclar",+ "merge_needs_two_speakers": "São necessários pelo menos 2 oradores para mesclar",+ "message_required": "message é obrigatório",+ "missing_bulk_status_fields": "recording_ids, field ou value ausente",+ "missing_recording_ids": "recording_ids ausente",+ "missing_recording_ids_or_tag_id": "recording_ids ou tag_id ausente",+ "missing_request_body": "Corpo da requisição ausente",+ "missing_required_field": "Campo obrigatório ausente: {{field}}",+ "missing_tag_ids": "tag_ids ausente no corpo da requisição",+ "name_and_prompt_required": "O nome e um prompt ou palavras-chave são obrigatórios",+ "name_and_template_required": "O nome e o modelo são obrigatórios",+ "name_empty": "name não pode estar vazio",+ "name_required": "name é obrigatório",+ "naming_template_not_found": "Modelo de nomenclatura não encontrado",+ "no_api_token": "Nenhum token de API nesta requisição",+ "no_audio_file": "Nenhum arquivo de áudio",+ "no_chunks_uploaded": "Nenhum chunk enviado ainda",+ "no_configuration_data": "Nenhum dado de configuração fornecido",+ "no_data_provided": "Nenhum dado fornecido",+ "no_events": "Nenhum evento encontrado",+ "no_events_for_recording": "Nenhum evento encontrado para esta gravação",+ "no_fields_given": "Nenhum campo informado",+ "no_file_provided": "Nenhum arquivo fornecido",+ "no_file_selected": "Nenhum arquivo selecionado",+ "no_message_provided": "Nenhuma mensagem fornecida",+ "no_messages_provided": "Nenhuma mensagem fornecida",+ "no_messages_to_download": "Nenhuma mensagem para baixar",+ "no_notes": "Nenhuma nota disponível para esta gravação",+ "no_query_provided": "Nenhuma consulta fornecida",+ "no_recording_id": "Nenhum ID de gravação fornecido",+ "no_recordings_specified": "Nenhuma gravação especificada",+ "no_speaker_map": "Nenhum mapa de oradores fornecido",+ "no_speakers_in_transcription": "Nenhum orador encontrado na transcrição",+ "no_summary": "Nenhum resumo disponível para esta gravação",+ "no_transcription": "Nenhuma transcrição disponível",+ "no_transcription_connector": "Nenhum conector de transcrição ativo",+ "no_transcription_data": "Nenhum dado de transcrição fornecido",+ "no_transcription_for_identification": "Nenhuma transcrição disponível para a identificação de oradores",+ "no_transcription_for_recording": "Nenhuma transcrição disponível para esta gravação",+ "no_transcription_for_summary": "Nenhuma transcrição válida disponível para gerar o resumo",+ "no_transcription_for_title": "Nenhuma transcrição válida disponível para gerar o título",+ "no_transcription_provided": "Nenhuma transcrição fornecida",+ "not_found": "Não encontrado",+ "notes_field_required": "O campo notes é obrigatório",+ "notification_not_found": "Notificação não encontrada",+ "participants_too_long": "participants deve ter no máximo 500 caracteres",+ "permission_denied": "Permissão negada",+ "personal_tag_apply_own_only": "Você só pode aplicar suas próprias etiquetas pessoais",+ "personal_tag_remove_own_only": "Você só pode remover suas próprias etiquetas pessoais",+ "public_link_https_required": "Links públicos exigem uma conexão HTTPS",+ "public_link_not_permitted": "Você não pode criar links públicos",+ "public_share_not_permitted": "Você não tem permissão para criar links públicos de compartilhamento. Entre em contato com o administrador.",+ "public_sharing_disabled": "O compartilhamento público não está ativado neste servidor",+ "public_sharing_off": "O compartilhamento público está desativado neste servidor",+ "push_unavailable": "Notificações push não disponíveis",+ "question_required": "question é obrigatório",+ "recording_access_denied": "Você não tem permissão para acessar esta gravação",+ "recording_already_processing": "A gravação já está sendo processada",+ "recording_chat_denied": "Você não tem permissão para conversar com esta gravação",+ "recording_delete_admin_only": "Somente administradores podem excluir gravações",+ "recording_delete_denied": "Você não tem permissão para excluir esta gravação",+ "recording_delete_failed": "Não foi possível excluir a gravação",+ "recording_edit_denied": "Você não tem permissão para editar esta gravação",+ "recording_ids_empty": "recording_ids deve ser uma lista não vazia",+ "recording_ids_required": "recording_ids é obrigatório",+ "recording_modify_denied": "Você não tem permissão para modificar esta gravação",+ "recording_not_found": "Gravação não encontrada",+ "recording_not_found_or_no_share": "Gravação não encontrada ou você não tem permissão para compartilhá-la.",+ "recording_not_found_or_no_view": "Gravação não encontrada ou você não tem permissão para visualizá-la.",+ "recording_not_resettable": "A gravação não está em um estado que permita redefinição. Status atual: {{status}}",+ "recording_or_audio_not_found": "Gravação ou arquivo de áudio não encontrado",+ "recording_reprocess_denied": "Você não tem permissão para reprocessar esta gravação",+ "recording_share_denied": "Você não tem permissão para compartilhar esta gravação",+ "recording_view_denied": "Você não tem permissão para visualizar esta gravação",+ "recordings_export_failed": "Falha ao exportar as gravações",+ "reference_not_found": "Referência não encontrada",+ "reprocess_audio_not_found": "Arquivo de áudio não encontrado para o reprocessamento",+ "reprocess_queue_failed": "Não foi possível enfileirar o reprocessamento; tente novamente",+ "reshare_edit_not_permitted": "Você não pode conceder permissão de edição porque não tem acesso de edição",+ "reshare_reshare_not_permitted": "Você não pode conceder permissão para compartilhar novamente porque não tem esse acesso",+ "sample_not_found": "Amostra não encontrada",+ "sample_remove_failed": "Não foi possível remover a amostra",+ "scope_narrow_only": "Os escopos só podem ser restringidos; crie um novo token para obter mais acesso",+ "scoped_token_header_only": "Tokens com escopo só são aceitos em um cabeçalho (Authorization: Bearer ...)",+ "semantic_search_unavailable": "A pesquisa semântica não está disponível nesta instância",+ "session_already_finalized": "A sessão já foi finalizada",+ "session_already_finalizing": "A sessão já está sendo finalizada",+ "session_cannot_finalize": "A sessão está no status {{status}}; não é possível finalizá-la",+ "session_finalizing": "A sessão está sendo finalizada",+ "session_is_recorder": "A sessão é uma sessão de gravador; finalize-a com /finalize",+ "session_is_sliced_upload": "A sessão é um envio de arquivo em partes; finalize-a com /finalize-upload",+ "session_not_accepting_chunks": "A sessão está no status {{status}}; chunks não são mais aceitos",+ "session_not_found": "Sessão não encontrada",+ "session_quota_exhausted": "Cota de armazenamento por usuário para gravações em andamento esgotada",+ "session_quota_would_exceed": "A cota de armazenamento por usuário para gravações em andamento seria excedida",+ "session_recording_gone": "A sessão já foi finalizada e sua gravação não existe mais",+ "session_storage_allocation_failed": "O servidor não conseguiu alocar armazenamento para a sessão",+ "setting_key_required": "A chave da configuração é obrigatória",+ "share_not_found": "Compartilhamento não encontrado",+ "share_revoke_denied": "Você não tem permissão para revogar este compartilhamento",+ "share_sync_admin_only": "Somente administradores do grupo podem sincronizar compartilhamentos",+ "share_with_owner": "Não é possível compartilhar uma gravação com o proprietário dela",+ "share_with_self": "Não é possível compartilhar uma gravação com você mesmo",+ "shares_view_denied": "Você não tem permissão para ver os compartilhamentos desta gravação",+ "sharing_https_required": "O compartilhamento só está disponível em uma conexão segura (HTTPS).",+ "slice_reassembly_failed": "O servidor não conseguiu remontar as partes enviadas",+ "slice_size_mismatch": "As partes enviadas não somam o tamanho de arquivo declarado",+ "snippet_extraction_failed": "Falha ao extrair o trecho de áudio",+ "speaker_alias_too_long": "cada alias deve ter no máximo 100 caracteres",+ "speaker_map_required": "speaker_map é obrigatório",+ "speaker_name_empty": "O nome do orador não pode estar vazio",+ "speaker_name_exists": "Já existe um orador chamado \"{{name}}\"",+ "speaker_name_required": "O nome do orador é obrigatório",+ "speaker_name_taken": "Já existe um orador com este nome",+ "speaker_not_found": "Orador não encontrado",+ "speaker_nothing_to_change": "Nada a alterar: informe nome, e-mail ou apelidos",+ "speakers_not_found_or_not_owned": "Alguns oradores não existem ou não pertencem à sua conta",+ "subscription_not_found": "Inscrição não encontrada",+ "subtitle_generation_failed": "Não é possível gerar o formato de legenda a partir da transcrição",+ "summary_blocked_transcription_failed": "Não é possível gerar o resumo: a transcrição falhou. Reprocesse a transcrição primeiro.",+ "summary_field_required": "O campo summary é obrigatório",+ "summary_generate_denied": "Você não tem permissão para gerar o resumo desta gravação",+ "summary_generation_failed": "Falha ao gerar o resumo. Verifique se o seu serviço LLM está em execução.",+ "summary_generation_failed_detail": "Falha ao gerar o resumo: {{detail}}",+ "summary_llm_not_configured": "O serviço de resumo não está disponível (cliente LLM não configurado)",+ "summary_openrouter_not_configured": "O serviço de resumo não está disponível (cliente OpenRouter não configurado)",+ "system_info_unavailable": "Não foi possível obter as informações do sistema",+ "tag_access_denied": "Você não tem acesso a esta etiqueta",+ "tag_already_on_recording": "A etiqueta já está nesta gravação",+ "tag_delete_denied": "Você não tem permissão para excluir esta etiqueta",+ "tag_edit_denied": "Você não tem permissão para editar esta etiqueta",+ "tag_group_assign_admin_only": "Somente administradores do grupo podem atribuir etiquetas a grupos",+ "tag_id_required": "O ID da etiqueta é obrigatório",+ "tag_ids_required": "tag_ids ou tag_id é obrigatório",+ "tag_name_exists": "Já existe uma etiqueta com este nome",+ "tag_name_required": "O nome da etiqueta é obrigatório",+ "tag_not_found": "Etiqueta não encontrada",+ "tag_not_on_recording": "A etiqueta não está nesta gravação",+ "tag_rename_conflict": "Já existe outra etiqueta com este nome",+ "tag_use_denied": "Sem permissão para usar esta etiqueta",+ "target_folder_access_denied": "Sem acesso à pasta de destino",+ "target_id_required": "target_id é obrigatório",+ "target_user_not_found": "Usuário de destino não encontrado",+ "template_in_use": "Não é possível excluir o modelo: {{count}} etiqueta(s) usam este modelo",+ "template_not_found": "Modelo não encontrado",+ "text_model_not_configured": "Nenhum modelo de texto está configurado. Defina TEXT_MODEL_BASE_URL e, para um serviço hospedado, TEXT_MODEL_API_KEY.",+ "title_blocked_transcription_failed": "Não é possível gerar o título: a transcrição falhou. Reprocesse a transcrição primeiro.",+ "title_generation_failed": "Falha ao gerar um título",+ "title_openrouter_not_configured": "O serviço de geração de títulos não está disponível (cliente OpenRouter não configurado)",+ "token_limit_reached": "Uma conta pode ter no máximo {{max}} tokens de API ativos. Revogue um token que você não usa mais para criar um novo.",+ "token_not_found": "Token não encontrado",+ "too_many_speaker_aliases": "no máximo 20 aliases",+ "total_bytes_required": "total_bytes é obrigatório para um envio em partes",+ "transcript_download_failed": "Falha ao gerar o download da transcrição",+ "transcription_format_unsupported_for_identification": "Formato de transcrição não suportado para identificação automática",+ "unauthorized": "Não autorizado",+ "unauthorized_admin_required": "Não autorizado. Acesso de administrador necessário.",+ "unexpected_error": "Ocorreu um erro inesperado.",+ "unexpected_error_deleting": "Ocorreu um erro inesperado durante a exclusão.",+ "unexpected_error_detail": "Ocorreu um erro inesperado: {{detail}}",+ "unexpected_error_processing": "Ocorreu um erro inesperado durante o processamento.",+ "unexpected_error_saving": "Ocorreu um erro inesperado ao salvar.",+ "unexpected_error_updating_transcription": "Ocorreu um erro inesperado ao atualizar a transcrição.",+ "unexpected_error_upload": "Ocorreu um erro inesperado durante o envio.",+ "unknown_event_types": "tipos de evento desconhecidos: {{events}}",+ "unknown_fields": "Campo(s) desconhecido(s): {{fields}}",+ "unknown_format": "Formato desconhecido: {{format}}",+ "unknown_scopes": "Escopos desconhecidos: {{scopes}}. Permitidos: {{allowed}} ou full",+ "unknown_temperature": "Temperatura desconhecida: {{names}}",+ "unsupported_mime_type": "mime_type não suportado: {{mimeType}}",+ "upload_tag_or_folder_forbidden": "Uma etiqueta ou pasta no envio não está disponível para você",+ "url_required": "url é obrigatório",+ "user_id_required": "O ID do usuário é obrigatório",+ "user_not_found": "Usuário não encontrado",+ "username_exists": "O nome de usuário já existe",+ "watch_folder_group_tag_unsupported": "Pastas monitoradas não estão disponíveis para etiquetas de grupo",+ "webhook_cap_reached": "Limite de webhooks por usuário atingido ({{count}}/{{max}})",+ "webhook_disabled": "O webhook está desativado; ative-o primeiro",+ "webhook_dns_failed": "A resolução DNS falhou para {{host}}",+ "webhook_not_found": "Webhook não encontrado",+ "webhook_url_bad_scheme": "O esquema deve ser http ou https",+ "webhook_url_http_not_allowed": "URLs http:// exigem allow_http=true",+ "webhook_url_missing_host": "A URL não tem um host",+ "webhook_url_private_address": "A URL resolve para um endereço privado ou de loopback ({{ip}}); defina WEBHOOK_INTRANET_HOST_ALLOWLIST para permitir este host explicitamente ou use uma URL pública. A expressão regular da lista de permissões deve ser ancorada (por exemplo, r\"^(localhost|.*\\.intra)$\") para não ser enganada por nomes de host parecidos.",+ "webhook_url_unparseable": "Não foi possível interpretar a URL",+ "word_document_failed": "Falha ao gerar o documento do Word"+ },+ "apiMessage": {+ "accountUpdated": "Dados da conta atualizados com sucesso!",+ "alreadySubscribed": "Já inscrito",+ "autoProcessingStarted": "Processamento automático iniciado",+ "autoProcessingStopped": "Processamento automático interrompido",+ "chunksProcessed": "Chunks processados com sucesso",+ "configUpdatedRestartRequired": "Configuração atualizada. É necessário reiniciar para aplicar as alterações.",+ "embeddingsProcessedCount": "{{processed}} de {{total}} gravações processadas.",+ "embeddingsReembeddedCount": "Embeddings gerados novamente para {{processed}} de {{total}} gravações.",+ "existingShareLinkUsed": "Usando o link de compartilhamento existente para esta gravação",+ "inquireAllProcessed": "Todas as gravações já foram processadas para o modo Inquire",+ "inquireProcessedRemaining": "{{processed}} gravações processadas. {{remaining}} restantes.",+ "jobDeleted": "Tarefa excluída",+ "jobQueuedForRetry": "Tarefa na fila para nova tentativa",+ "modelDiscoveryUnsupported": "{{connector}} não oferece um endpoint de descoberta de modelos.",+ "noRecordingsToReembed": "Não há gravações para gerar embeddings novamente.",+ "noSpeakerEmbeddings": "Nenhum embedding de orador disponível",+ "preferencesSaved": "Preferências salvas com sucesso",+ "pushNotificationsNotEnabled": "Notificações push não ativadas",+ "recordingDeleted": "Gravação excluída",+ "recordingStatusReset": "O status da gravação foi redefinido.",+ "scanTriggered": "Verificação iniciada",+ "sharesSynced": "{{sharesCreated}} novos compartilhamentos criados em {{recordingsProcessed}} gravações",+ "speakerDeleted": "Orador excluído",+ "speakersMerged": "{{count}} orador(es) mesclado(s) em {{name}} com sucesso",+ "speakersUpdated": "Oradores atualizados com sucesso.",+ "subscriptionRemoved": "Inscrição removida",+ "subscriptionSaved": "Inscrição salva",+ "summarizationQueued": "Resumo na fila",+ "summarizingConversation": "Resumindo a conversa anterior...",+ "summaryGenerationQueued": "Geração de resumo na fila",+ "summaryReprocessingStarted": "Reprocessamento do resumo iniciado",+ "tagDeleted": "Etiqueta excluída",+ "tagRemoved": "Etiqueta removida",+ "tokenRevoked": "Token revogado com sucesso",+ "transcriptUpdated": "Transcrição atualizada com sucesso.",+ "transcriptionQueued": "Transcrição na fila",+ "transcriptionReprocessingQueued": "Reprocessamento da transcrição na fila",+ "transcriptionUpdated": "Transcrição atualizada com sucesso.",+ "userAlreadyHasNamingTemplates": "O usuário já tem modelos de nomenclatura",+ "userAlreadyHasTemplates": "O usuário já tem modelos",+ "voiceProfileCleared": "Perfil de voz de {{name}} apagado"}}}diff --git a/static/locales/ru.json b/static/locales/ru.jsonindex 49ce4d7d..53295f5c 100644--- a/static/locales/ru.json+++ b/static/locales/ru.json@@ -2431,6 +2431,406 @@"tokenWarning": "Предупреждение: использовано {{percent}} месячного лимита токенов.","transcriptionExceeded": "Месячный лимит транскрипции превышен ({{used}}/{{budget}} мин). Обратитесь к администратору, чтобы получить больше времени.","transcriptionWarning": "Предупреждение: использовано {{percent}} месячного лимита транскрипции."+ },+ "apiError": {+ "access_denied": "Доступ запрещён",+ "admin_required": "Требуются права администратора",+ "already_group_member": "Пользователь уже состоит в этой группе",+ "already_shared": "Доступ к записи уже предоставлен этому пользователю",+ "audio_access_denied": "У вас нет доступа к этому аудиофайлу",+ "audio_already_removed": "Аудио уже удалено.",+ "audio_conversion_timeout": "Истекло время ожидания конвертации аудио.",+ "audio_converter_missing": "Инструмент конвертации аудио (FFmpeg) не найден на сервере.",+ "audio_decode_failed": "Загруженный файл не удалось прочитать как аудио. Возможно, он повреждён или имеет неподдерживаемый формат.",+ "audio_deleted": "Аудиофайл удалён",+ "audio_file_missing": "Аудиофайл отсутствует на сервере",+ "audio_file_not_found": "Аудиофайл не найден",+ "audio_remove_while_processing": "Дождитесь окончания обработки, прежде чем удалять аудио.",+ "authentication_failed": "Ошибка аутентификации",+ "authentication_required": "Требуется аутентификация: API-токен или сессия отсутствует, недействительна, истекла или отозвана",+ "auto_deletion_disabled": "Автоудаление не включено",+ "auto_export_disabled": "Автоэкспорт не включён на этом сервере",+ "auto_processing_disabled": "Автообработка не включена",+ "auto_processing_not_running": "Автообработка не запущена",+ "batch_limit_50": "Не более 50 записей в пакете",+ "bulk_delete_limit": "Нельзя удалить более 100 записей за раз",+ "bulk_reprocess_limit": "Нельзя повторно обработать более 50 записей за раз",+ "bulk_update_limit": "Нельзя обновить более 100 записей за раз",+ "cannot_change_own_admin": "Нельзя изменить собственный статус администратора",+ "cannot_delete_self": "Нельзя удалить собственную учётную запись",+ "chat_blocked_transcription_failed": "Чат недоступен: транскрибация не удалась. Сначала повторите обработку транскрипции.",+ "chat_client_not_configured": "Сервис чата недоступен (клиент чата не настроен)",+ "chat_error": "Во время чата произошла ошибка",+ "chat_failed": "Ошибка чата",+ "chat_openrouter_not_configured": "Сервис чата недоступен (клиент OpenRouter не настроен)",+ "chat_unavailable": "Сервис чата недоступен",+ "chunk_empty": "Пустое тело фрагмента",+ "chunk_out_of_order": "Фрагмент получен не по порядку",+ "chunk_processing_failed": "Не удалось обработать фрагменты",+ "chunk_too_large": "Фрагмент превышает max_chunk_bytes",+ "chunk_write_failed": "Сервер не смог записать фрагмент",+ "csrf_referrer_mismatch": "Запрос отклонён: страница загружена с {{referrerHost}}, а сервер получил запрос для {{host}}. Обратный прокси должен передавать исходный заголовок Host (или X-Forwarded-Host), а TRUSTED_PROXY_HOPS должен совпадать с числом прокси.",+ "csrf_referrer_mismatch_unknown": "Запрос отклонён: страница загружена не с {{host}}, для которого сервер получил запрос. Обратный прокси должен передавать исходный заголовок Host (или X-Forwarded-Host), а TRUSTED_PROXY_HOPS должен совпадать с числом прокси.",+ "csrf_referrer_missing": "Запрос отклонён: браузер не отправил заголовок Referer, обязательный для HTTPS-запросов. Причина — обратный прокси, расширение браузера или заголовок Referrer-Policy, который его удаляет.",+ "csrf_session_expired": "Сеанс истёк. Обновите страницу и попробуйте ещё раз.",+ "cursor_expired": "Курсор устарел; начните заново без курсора",+ "custom_date_pattern_missing_groups": "Свой шаблон должен определять именованные группы (?P<year>...), (?P<month>...) и (?P<day>...); отсутствуют: {{groups}}",+ "custom_date_pattern_required": "При выборе своего варианта необходимо указать шаблон.",+ "custom_date_pattern_too_long": "Свой шаблон слишком длинный (не более 500 символов).",+ "delete_failed": "Не удалось удалить",+ "delete_owner_only": "Доступ запрещён: удалять может только владелец",+ "deletion_not_allowed": "Удаление не разрешено",+ "delivery_not_found": "Доставка не найдена",+ "duplicate_speaker_ids": "Указаны повторяющиеся ID спикеров",+ "email_exists": "Такой адрес электронной почты уже существует",+ "empty_file": "Загруженный файл пуст.",+ "enabled_field_required": "Поле enabled обязательно",+ "event_not_found": "Событие не найдено",+ "export_rename_failed": "Не удалось переименовать существующие экспорты",+ "export_template_not_found": "Шаблон экспорта не найден",+ "external_ref_pair_required": "external_system и external_ref указываются вместе",+ "extracted_audio_too_large": "Извлечённое аудио занимает {{size}} МБ, что больше лимита {{limit}} МБ для хранимых файлов. Включите разбиение на фрагменты в настройках администратора (ENABLE_CHUNKING=true) или используйте более короткое видео либо видео с меньшим битрейтом.",+ "ffmpeg_missing": "FFmpeg не найден на сервере",+ "file_monitor_unavailable": "Модуль отслеживания файлов недоступен",+ "file_too_large": "Файл слишком большой",+ "file_too_large_max": "Файл слишком большой. Максимальный размер — {{maxSize}} МБ.",+ "filename_too_long": "filename должно содержать не более 255 символов",+ "folder_access_denied": "У вас нет доступа к этой папке",+ "folder_delete_denied": "У вас нет прав на удаление этой папки",+ "folder_edit_denied": "У вас нет прав на изменение этой папки",+ "folder_group_assign_admin_only": "Только администраторы группы могут назначать папки группам",+ "folder_id_not_found": "Папка {{folderId}} не найдена",+ "folder_name_exists": "Папка с таким названием уже существует",+ "folder_name_exists_for_group": "Папка с таким названием уже существует в этой группе",+ "folder_name_required": "Укажите название папки",+ "folder_not_found": "Папка не найдена",+ "folder_rename_conflict": "Другая папка с таким названием уже существует",+ "folders_disabled": "Функция папок не включена",+ "forbidden_tag_ids": "Неизвестные или запрещённые ID тегов",+ "full_scope_not_combinable": "'full' нельзя сочетать с другими областями доступа",+ "global_stats_admin_only": "Для глобальной статистики требуются права администратора",+ "group_folder_create_admin_only": "Только администраторы группы могут создавать папки группы",+ "group_folder_delete_admin_only": "Только администраторы группы могут удалять папки группы",+ "group_folder_edit_admin_only": "Только администраторы группы могут изменять папки группы",+ "group_folder_name_exists": "Папка группы с таким названием уже существует",+ "group_folders_members_only": "Чтобы просматривать папки группы, нужно быть участником команды",+ "group_folders_require_internal_sharing": "Для папок группы необходимо включить внутренний общий доступ. Установите ENABLE_INTERNAL_SHARING=true в конфигурации.",+ "group_name_exists": "Группа с таким названием уже существует",+ "group_name_required": "Укажите название группы",+ "group_not_found": "Группа не найдена",+ "group_tag_apply_denied": "У вас нет прав на добавление тегов группы к этой записи",+ "group_tag_apply_restricted": "Добавлять теги группы может только владелец записи или администратор группы",+ "group_tag_create_admin_only": "Только администраторы группы могут создавать теги группы",+ "group_tag_delete_admin_only": "Только администраторы группы могут удалять теги группы",+ "group_tag_edit_admin_only": "Только администраторы группы могут изменять теги группы",+ "group_tag_name_exists": "Тег группы с таким названием уже существует",+ "group_tag_name_exists_for_group": "Тег с таким названием уже существует в этой группе",+ "group_tag_remove_denied": "У вас нет прав на удаление тегов группы из этой записи",+ "group_tag_remove_restricted": "Удалять теги группы может только владелец записи или администратор группы",+ "group_tags_members_only": "Чтобы просматривать теги группы, нужно быть участником команды",+ "group_tags_require_internal_sharing": "Для тегов группы необходимо включить внутренний общий доступ. Установите ENABLE_INTERNAL_SHARING=true в конфигурации.",+ "groups_require_internal_sharing": "Для групп необходимо включить внутренний общий доступ. Установите ENABLE_INTERNAL_SHARING=true в конфигурации.",+ "incognito_disabled": "Режим инкогнито не включён на этом сервере",+ "inquire_agent_off": "Агент Inquire отключён на этом сервере",+ "inquire_disabled": "Режим Inquire не включён",+ "inquire_off": "Inquire отключён на этом сервере",+ "internal_sharing_disabled": "Внутренний общий доступ не включён",+ "invalid_boolean_flag": "{{key}} должно быть true или false",+ "invalid_boolean_value": "Значение должно быть допустимым логическим (true/false, 1/0, yes/no)",+ "invalid_bulk_status_field": "Поле должно быть \"inbox\", \"highlight\" или \"archive\"",+ "invalid_bulk_tag_action": "Действие должно быть \"add\" или \"remove\"",+ "invalid_color_scheme": "Недопустимое значение color_scheme",+ "invalid_cursor": "Не удалось прочитать курсор",+ "invalid_dark_mode": "Недопустимое значение dark_mode",+ "invalid_date_field": "date_field должно быть meeting_date или created_at",+ "invalid_events_list": "events должно быть непустым списком",+ "invalid_expires_in_days": "expires_in_days должно быть неотрицательным целым числом",+ "invalid_expires_in_days_range": "expires_in_days должно быть от 1 до 3650",+ "invalid_filters": "filters должно быть объектом",+ "invalid_finalize_body": "Тело запроса finalize должно быть объектом JSON",+ "invalid_folder_id": "folder_id должно быть ID или none",+ "invalid_group_role": "Роль должна быть \"admin\" или \"member\"",+ "invalid_idempotency_key": "idempotency_key должно содержать от 1 до 100 символов",+ "invalid_ids_list": "ids должно быть списком",+ "invalid_inquire_mode": "mode должно быть rag, agent или auto",+ "invalid_integer_value": "Значение должно быть допустимым целым числом",+ "invalid_is_archived": "is_archived должно быть логическим значением",+ "invalid_json": "Недопустимый JSON",+ "invalid_limit": "limit должно быть от 1 до 500",+ "invalid_max_segments": "max_segments должно быть не меньше 1",+ "invalid_meeting_date": "Недопустимый формат meeting_date",+ "invalid_number_value": "Значение должно быть допустимым числом",+ "invalid_options_list": "options должно быть списком",+ "invalid_query_length": "q должно содержать от 2 до 500 символов",+ "invalid_recording_ids": "Недопустимые ID записей",+ "invalid_recording_ids_csv": "recording_ids должно быть списком ID через запятую",+ "invalid_recording_ids_list": "recording_ids должно быть списком",+ "invalid_regex_pattern": "Недопустимый шаблон regex для \"{{variable}}\": {{detail}}",+ "invalid_regex_patterns": "regex_patterns должно быть словарём",+ "invalid_regular_expression": "Недопустимое регулярное выражение: {{detail}}",+ "invalid_reprocess_type": "Тип должен быть \"transcription\" или \"summary\"",+ "invalid_scope": "scope должно быть own, shared или all",+ "invalid_scopes_list": "scopes должен быть непустым списком названий областей доступа",+ "invalid_search_mode": "mode должно быть keyword, semantic или auto",+ "invalid_search_paging": "limit должно быть от 1 до 50, а page — не меньше 1",+ "invalid_setting_type": "Недопустимый тип настройки. Допустимые значения: {{types}}",+ "invalid_snippet_range": "Недопустимое время начала или длительность",+ "invalid_source_ids": "source_ids должно быть непустым списком",+ "invalid_speaker_aliases": "aliases должен быть списком строк",+ "invalid_speaker_count_mode": "Недопустимое значение speaker_count_mode",+ "invalid_speaker_email": "email должен быть адресом электронной почты",+ "invalid_speaker_map": "speaker_map должно быть объектом",+ "invalid_speaker_value_type": "Недопустимый тип значения для спикера \"{{label}}\"",+ "invalid_storage_quota": "Квота хранилища должна быть положительным числом МБ.",+ "invalid_subscription_data": "Недопустимые данные подписки",+ "invalid_tag_color": "Цвет должен быть шестнадцатеричным значением, например #3B82F6",+ "invalid_tag_ids": "tag_ids должно быть списком",+ "invalid_tag_ids_list": "tag_ids должно быть списком ID тегов",+ "invalid_temperature": "Температура {{kind}} должна быть числом от 0 до 2",+ "invalid_temperature_values": "values должно быть объектом с температурами",+ "invalid_threshold": "Недопустимое пороговое значение",+ "invalid_timezone_value": "Значение должно быть допустимым часовым поясом IANA, например Europe/Berlin",+ "invalid_total_bytes": "total_bytes должно быть положительным целым числом",+ "invalid_transcript_data": "Переданы недопустимые данные транскрипта",+ "invalid_updated_since": "updated_since должно быть датой и временем в формате ISO 8601",+ "invalid_username_length": "Имя пользователя должно содержать от 2 до 20 символов.",+ "invalid_with_sources": "with_sources должно быть true или false",+ "job_not_found": "Задача не найдена",+ "job_retry_failed_only": "Повторить можно только задачи с ошибкой",+ "keep_audio_only_immutable": "keep_audio_only задаётся при загрузке и не может быть изменено позже.",+ "last_admin_demotion": "Нельзя отозвать права администратора у последнего оставшегося администратора.",+ "llm_connection_failed": "Не удалось подключиться к серверу LLM. Проверьте, что ваш сервис LLM запущен.",+ "membership_not_found": "Участие в группе не найдено",+ "merge_failed": "Не удалось объединить записи",+ "merge_needs_two": "Выберите не менее двух записей для объединения",+ "merge_needs_two_speakers": "Для объединения нужно не менее 2 спикеров",+ "message_required": "message обязательно",+ "missing_bulk_status_fields": "Отсутствует recording_ids, field или value",+ "missing_recording_ids": "Отсутствует recording_ids",+ "missing_recording_ids_or_tag_id": "Отсутствует recording_ids или tag_id",+ "missing_request_body": "Отсутствует тело запроса",+ "missing_required_field": "Отсутствует обязательное поле: {{field}}",+ "missing_tag_ids": "В теле запроса отсутствует tag_ids",+ "name_and_prompt_required": "Укажите название и промпт или hotwords",+ "name_and_template_required": "Укажите название и шаблон",+ "name_empty": "name не может быть пустым",+ "name_required": "name обязательно",+ "naming_template_not_found": "Шаблон именования не найден",+ "no_api_token": "В запросе нет API-токена",+ "no_audio_file": "Нет аудиофайла",+ "no_chunks_uploaded": "Фрагменты ещё не загружены",+ "no_configuration_data": "Данные конфигурации не переданы",+ "no_data_provided": "Данные не переданы",+ "no_events": "События не найдены",+ "no_events_for_recording": "Для этой записи события не найдены",+ "no_fields_given": "Поля не указаны",+ "no_file_provided": "Файл не передан",+ "no_file_selected": "Файл не выбран",+ "no_message_provided": "Сообщение не передано",+ "no_messages_provided": "Сообщения не переданы",+ "no_messages_to_download": "Нет сообщений для скачивания",+ "no_notes": "Для этой записи нет заметок",+ "no_query_provided": "Запрос не передан",+ "no_recording_id": "ID записи не передан",+ "no_recordings_specified": "Записи не указаны",+ "no_speaker_map": "Карта спикеров не передана",+ "no_speakers_in_transcription": "В транскрипции не найдены спикеры",+ "no_summary": "Для этой записи нет резюме",+ "no_transcription": "Транскрипция недоступна",+ "no_transcription_connector": "Нет активного коннектора транскрибации",+ "no_transcription_data": "Данные транскрипции не переданы",+ "no_transcription_for_identification": "Нет транскрипции для определения спикеров",+ "no_transcription_for_recording": "Для этой записи нет транскрипции",+ "no_transcription_for_summary": "Нет корректной транскрипции для создания резюме",+ "no_transcription_for_title": "Нет корректной транскрипции для создания заголовка",+ "no_transcription_provided": "Транскрипция не передана",+ "not_found": "Не найдено",+ "notes_field_required": "Поле notes обязательно",+ "notification_not_found": "Уведомление не найдено",+ "participants_too_long": "participants должно содержать не более 500 символов",+ "permission_denied": "Доступ запрещён",+ "personal_tag_apply_own_only": "Вы можете добавлять только собственные личные теги",+ "personal_tag_remove_own_only": "Вы можете удалять только собственные личные теги",+ "public_link_https_required": "Для публичных ссылок требуется HTTPS-соединение",+ "public_link_not_permitted": "Вам не разрешено создавать публичные ссылки",+ "public_share_not_permitted": "У вас нет прав на создание публичных ссылок. Обратитесь к администратору.",+ "public_sharing_disabled": "Публичный доступ не включён на этом сервере",+ "public_sharing_off": "Публичный доступ отключён на этом сервере",+ "push_unavailable": "Push-уведомления недоступны",+ "question_required": "question обязательно",+ "recording_access_denied": "У вас нет доступа к этой записи",+ "recording_already_processing": "Запись уже обрабатывается",+ "recording_chat_denied": "У вас нет прав на чат с этой записью",+ "recording_delete_admin_only": "Удалять записи могут только администраторы",+ "recording_delete_denied": "У вас нет прав на удаление этой записи",+ "recording_delete_failed": "Не удалось удалить запись",+ "recording_edit_denied": "У вас нет прав на редактирование этой записи",+ "recording_ids_empty": "recording_ids должно быть непустым списком",+ "recording_ids_required": "recording_ids обязательно",+ "recording_modify_denied": "У вас нет прав на изменение этой записи",+ "recording_not_found": "Запись не найдена",+ "recording_not_found_or_no_share": "Запись не найдена или у вас нет прав на предоставление доступа к ней.",+ "recording_not_found_or_no_view": "Запись не найдена или у вас нет прав на её просмотр.",+ "recording_not_resettable": "Запись находится в состоянии, которое нельзя сбросить. Текущий статус: {{status}}",+ "recording_or_audio_not_found": "Запись или аудиофайл не найдены",+ "recording_reprocess_denied": "У вас нет прав на повторную обработку этой записи",+ "recording_share_denied": "У вас нет прав на предоставление доступа к этой записи",+ "recording_view_denied": "У вас нет прав на просмотр этой записи",+ "recordings_export_failed": "Не удалось экспортировать записи",+ "reference_not_found": "Ссылка не найдена",+ "reprocess_audio_not_found": "Аудиофайл для повторной обработки не найден",+ "reprocess_queue_failed": "Не удалось поставить повторную обработку в очередь; попробуйте ещё раз",+ "reshare_edit_not_permitted": "Вы не можете дать право на редактирование, так как у вас нет доступа на редактирование",+ "reshare_reshare_not_permitted": "Вы не можете дать право на повторный доступ, так как у вас самих нет права поделиться повторно",+ "sample_not_found": "Образец не найден",+ "sample_remove_failed": "Не удалось удалить образец",+ "scope_narrow_only": "Области доступа можно только сужать; для расширенного доступа создайте новый токен",+ "scoped_token_header_only": "Токены с ограниченной областью доступа принимаются только в заголовке (Authorization: Bearer ...)",+ "semantic_search_unavailable": "Семантический поиск недоступен на этом экземпляре",+ "session_already_finalized": "Сессия уже завершена",+ "session_already_finalizing": "Сессия уже завершается",+ "session_cannot_finalize": "Сессия в статусе {{status}}; завершить её нельзя",+ "session_finalizing": "Сессия завершается",+ "session_is_recorder": "Это сессия записи с рекордера; завершите её через /finalize",+ "session_is_sliced_upload": "Это сессия загрузки файла по частям; завершите её через /finalize-upload",+ "session_not_accepting_chunks": "Сессия в статусе {{status}}; фрагменты больше не принимаются",+ "session_not_found": "Сессия не найдена",+ "session_quota_exhausted": "Квота хранилища пользователя для незавершённых записей исчерпана",+ "session_quota_would_exceed": "Будет превышена квота хранилища пользователя для незавершённых записей",+ "session_recording_gone": "Сессия уже завершена, а её запись больше не существует",+ "session_storage_allocation_failed": "Сервер не смог выделить хранилище для сессии",+ "setting_key_required": "Укажите ключ настройки",+ "share_not_found": "Общий доступ не найден",+ "share_revoke_denied": "У вас нет прав на отзыв этого общего доступа",+ "share_sync_admin_only": "Только администраторы группы могут синхронизировать общий доступ",+ "share_with_owner": "Нельзя предоставить доступ к записи её владельцу",+ "share_with_self": "Нельзя предоставить доступ к записи самому себе",+ "shares_view_denied": "У вас нет прав на просмотр общего доступа к этой записи",+ "sharing_https_required": "Общий доступ доступен только при безопасном (HTTPS) соединении.",+ "slice_reassembly_failed": "Сервер не смог собрать загруженные части",+ "slice_size_mismatch": "Суммарный размер загруженных частей не совпадает с заявленным размером файла",+ "snippet_extraction_failed": "Не удалось извлечь фрагмент аудио",+ "speaker_alias_too_long": "каждый псевдоним должен содержать не более 100 символов",+ "speaker_map_required": "speaker_map обязательно",+ "speaker_name_empty": "Имя спикера не может быть пустым",+ "speaker_name_exists": "Спикер с именем \"{{name}}\" уже существует",+ "speaker_name_required": "Укажите имя спикера",+ "speaker_name_taken": "Спикер с таким именем уже существует",+ "speaker_not_found": "Спикер не найден",+ "speaker_nothing_to_change": "Нечего изменять: укажите имя, адрес электронной почты или псевдонимы",+ "speakers_not_found_or_not_owned": "Некоторые спикеры не существуют или не принадлежат вашей учётной записи",+ "subscription_not_found": "Подписка не найдена",+ "subtitle_generation_failed": "Не удалось создать субтитры из транскрипта",+ "summary_blocked_transcription_failed": "Не удалось создать резюме: транскрибация не удалась. Сначала повторите обработку транскрипции.",+ "summary_field_required": "Поле summary обязательно",+ "summary_generate_denied": "У вас нет прав на создание резюме для этой записи",+ "summary_generation_failed": "Не удалось создать резюме. Проверьте, что ваш сервис LLM запущен.",+ "summary_generation_failed_detail": "Не удалось создать резюме: {{detail}}",+ "summary_llm_not_configured": "Сервис резюме недоступен (клиент LLM не настроен)",+ "summary_openrouter_not_configured": "Сервис резюме недоступен (клиент OpenRouter не настроен)",+ "system_info_unavailable": "Не удалось получить сведения о системе",+ "tag_access_denied": "У вас нет доступа к этому тегу",+ "tag_already_on_recording": "Тег уже добавлен к этой записи",+ "tag_delete_denied": "У вас нет прав на удаление этого тега",+ "tag_edit_denied": "У вас нет прав на изменение этого тега",+ "tag_group_assign_admin_only": "Только администраторы группы могут назначать теги группам",+ "tag_id_required": "Укажите ID тега",+ "tag_ids_required": "Требуется tag_ids или tag_id",+ "tag_name_exists": "Тег с таким названием уже существует",+ "tag_name_required": "Укажите название тега",+ "tag_not_found": "Тег не найден",+ "tag_not_on_recording": "У этой записи нет такого тега",+ "tag_rename_conflict": "Другой тег с таким названием уже существует",+ "tag_use_denied": "Нет прав на использование этого тега",+ "target_folder_access_denied": "Нет доступа к целевой папке",+ "target_id_required": "target_id обязательно",+ "target_user_not_found": "Целевой пользователь не найден",+ "template_in_use": "Нельзя удалить шаблон: его используют теги ({{count}})",+ "template_not_found": "Шаблон не найден",+ "text_model_not_configured": "Текстовая модель не настроена. Задайте TEXT_MODEL_BASE_URL, а для облачного сервиса также TEXT_MODEL_API_KEY.",+ "title_blocked_transcription_failed": "Не удалось создать заголовок: транскрибация не удалась. Сначала повторите обработку транскрипции.",+ "title_generation_failed": "Не удалось создать заголовок",+ "title_openrouter_not_configured": "Сервис создания заголовков недоступен (клиент OpenRouter не настроен)",+ "token_limit_reached": "В учётной записи может быть не более {{max}} активных API-токенов. Отзовите токен, который больше не используется, чтобы создать новый.",+ "token_not_found": "Токен не найден",+ "too_many_speaker_aliases": "не более 20 псевдонимов",+ "total_bytes_required": "Для загрузки по частям требуется total_bytes",+ "transcript_download_failed": "Не удалось подготовить транскрипт к скачиванию",+ "transcription_format_unsupported_for_identification": "Формат транскрипции не поддерживается для автоматического определения",+ "unauthorized": "Не авторизован",+ "unauthorized_admin_required": "Не авторизован. Требуются права администратора.",+ "unexpected_error": "Произошла непредвиденная ошибка.",+ "unexpected_error_deleting": "При удалении произошла непредвиденная ошибка.",+ "unexpected_error_detail": "Произошла непредвиденная ошибка: {{detail}}",+ "unexpected_error_processing": "Во время обработки произошла непредвиденная ошибка.",+ "unexpected_error_saving": "При сохранении произошла непредвиденная ошибка.",+ "unexpected_error_updating_transcription": "При обновлении транскрипции произошла непредвиденная ошибка.",+ "unexpected_error_upload": "Во время загрузки произошла непредвиденная ошибка.",+ "unknown_event_types": "неизвестные типы событий: {{events}}",+ "unknown_fields": "Неизвестные поля: {{fields}}",+ "unknown_format": "Неизвестный формат: {{format}}",+ "unknown_scopes": "Неизвестные области доступа: {{scopes}}. Допустимые: {{allowed}} или full",+ "unknown_temperature": "Неизвестная температура: {{names}}",+ "unsupported_mime_type": "Неподдерживаемый mime_type {{mimeType}}",+ "upload_tag_or_folder_forbidden": "Тег или папка в загрузке вам недоступны",+ "url_required": "url обязательно",+ "user_id_required": "Укажите ID пользователя",+ "user_not_found": "Пользователь не найден",+ "username_exists": "Такое имя пользователя уже существует",+ "watch_folder_group_tag_unsupported": "Отслеживаемые папки недоступны для тегов группы",+ "webhook_cap_reached": "Достигнут лимит вебхуков на пользователя ({{count}}/{{max}})",+ "webhook_disabled": "Вебхук отключён; сначала включите его",+ "webhook_dns_failed": "Не удалось разрешить DNS-имя {{host}}",+ "webhook_not_found": "Вебхук не найден",+ "webhook_url_bad_scheme": "Схема должна быть http или https",+ "webhook_url_http_not_allowed": "Для URL http:// требуется allow_http=true",+ "webhook_url_missing_host": "В URL не указан хост",+ "webhook_url_private_address": "URL указывает на частный или loopback-адрес ({{ip}}); задайте WEBHOOK_INTRANET_HOST_ALLOWLIST, чтобы явно разрешить этот хост, или используйте публичный URL. Регулярное выражение списка разрешённых хостов должно быть привязано к началу и концу (например, r\"^(localhost|.*\\.intra)$\"), чтобы его нельзя было обойти похожими именами хостов.",+ "webhook_url_unparseable": "Не удалось разобрать URL",+ "word_document_failed": "Не удалось создать документ Word"+ },+ "apiMessage": {+ "accountUpdated": "Данные учётной записи обновлены!",+ "alreadySubscribed": "Подписка уже оформлена",+ "autoProcessingStarted": "Автообработка запущена",+ "autoProcessingStopped": "Автообработка остановлена",+ "chunksProcessed": "Фрагменты обработаны",+ "configUpdatedRestartRequired": "Конфигурация обновлена. Чтобы применить изменения, требуется перезапуск.",+ "embeddingsProcessedCount": "Обработано записей: {{processed}} из {{total}}.",+ "embeddingsReembeddedCount": "Эмбеддинги пересозданы для {{processed}} из {{total}} записей.",+ "existingShareLinkUsed": "Используется существующая ссылка общего доступа для этой записи",+ "inquireAllProcessed": "Все записи уже обработаны для режима Inquire",+ "inquireProcessedRemaining": "Обработано записей: {{processed}}. Осталось: {{remaining}}.",+ "jobDeleted": "Задача удалена",+ "jobQueuedForRetry": "Задача поставлена в очередь на повтор",+ "modelDiscoveryUnsupported": "{{connector}} не предоставляет endpoint для получения списка моделей.",+ "noRecordingsToReembed": "Нет записей для пересоздания эмбеддингов.",+ "noSpeakerEmbeddings": "Эмбеддинги спикеров недоступны",+ "preferencesSaved": "Настройки сохранены",+ "pushNotificationsNotEnabled": "Push-уведомления не включены",+ "recordingDeleted": "Запись удалена",+ "recordingStatusReset": "Статус записи сброшен.",+ "scanTriggered": "Сканирование запущено",+ "sharesSynced": "Создано новых общих доступов: {{sharesCreated}}, записей: {{recordingsProcessed}}",+ "speakerDeleted": "Спикер удалён",+ "speakersMerged": "Спикеры ({{count}}) объединены в {{name}}",+ "speakersUpdated": "Спикеры обновлены.",+ "subscriptionRemoved": "Подписка удалена",+ "subscriptionSaved": "Подписка сохранена",+ "summarizationQueued": "Создание резюме поставлено в очередь",+ "summarizingConversation": "Создание резюме предыдущей беседы...",+ "summaryGenerationQueued": "Создание резюме поставлено в очередь",+ "summaryReprocessingStarted": "Повторное создание резюме запущено",+ "tagDeleted": "Тег удалён",+ "tagRemoved": "Тег снят",+ "tokenRevoked": "Токен отозван",+ "transcriptUpdated": "Транскрипт обновлён.",+ "transcriptionQueued": "Транскрибация поставлена в очередь",+ "transcriptionReprocessingQueued": "Повторная транскрибация поставлена в очередь",+ "transcriptionUpdated": "Транскрипция обновлена.",+ "userAlreadyHasNamingTemplates": "У пользователя уже есть шаблоны именования",+ "userAlreadyHasTemplates": "У пользователя уже есть шаблоны",+ "voiceProfileCleared": "Голосовой профиль {{name}} очищен"}}}diff --git a/static/locales/zh.json b/static/locales/zh.jsonindex fbcad827..2fb0acb7 100644--- a/static/locales/zh.json+++ b/static/locales/zh.json@@ -2431,6 +2431,406 @@"tokenWarning": "警告:已使用每月令牌预算的 {{percent}}。","transcriptionExceeded": "已超出每月转录预算({{used}}/{{budget}} 分钟)。请联系管理员获取更多时长。","transcriptionWarning": "警告:已使用每月转录预算的 {{percent}}。"+ },+ "apiError": {+ "access_denied": "访问被拒绝",+ "admin_required": "需要管理员权限",+ "already_group_member": "该用户已是此群组的成员",+ "already_shared": "录音已与该用户共享",+ "audio_access_denied": "您没有访问此音频文件的权限",+ "audio_already_removed": "音频已被移除。",+ "audio_conversion_timeout": "音频转换超时。",+ "audio_converter_missing": "服务器上未找到音频转换工具(FFmpeg)。",+ "audio_decode_failed": "无法将上传的文件读取为音频。文件可能已损坏或格式不受支持。",+ "audio_deleted": "音频文件已被删除",+ "audio_file_missing": "服务器上缺少音频文件",+ "audio_file_not_found": "未找到音频文件",+ "audio_remove_while_processing": "请等待处理完成后再移除音频。",+ "authentication_failed": "身份验证失败",+ "authentication_required": "需要身份验证:API 令牌或会话缺失、无效、已过期或已撤销",+ "auto_deletion_disabled": "未启用自动删除",+ "auto_export_disabled": "此服务器未启用自动导出",+ "auto_processing_disabled": "未启用自动处理",+ "auto_processing_not_running": "自动处理未在运行",+ "batch_limit_50": "每批最多 50 条录音",+ "bulk_delete_limit": "一次不能删除超过 100 条录音",+ "bulk_reprocess_limit": "一次不能重新处理超过 50 条录音",+ "bulk_update_limit": "一次不能更新超过 100 条录音",+ "cannot_change_own_admin": "不能更改您自己的管理员状态",+ "cannot_delete_self": "不能删除您自己的账户",+ "chat_blocked_transcription_failed": "无法聊天:转录失败。请先重新处理转录。",+ "chat_client_not_configured": "聊天服务不可用(未配置聊天客户端)",+ "chat_error": "聊天过程中出错",+ "chat_failed": "聊天失败",+ "chat_openrouter_not_configured": "聊天服务不可用(未配置 OpenRouter 客户端)",+ "chat_unavailable": "聊天服务不可用",+ "chunk_empty": "分块内容为空",+ "chunk_out_of_order": "分块顺序错误",+ "chunk_processing_failed": "处理分块失败",+ "chunk_too_large": "分块超过 max_chunk_bytes",+ "chunk_write_failed": "服务器无法写入分块",+ "csrf_referrer_mismatch": "请求被拒绝:此页面从 {{referrerHost}} 加载,但服务器收到的是发往 {{host}} 的请求。反向代理必须转发原始 Host 标头(或 X-Forwarded-Host),并且 TRUSTED_PROXY_HOPS 必须与代理数量一致。",+ "csrf_referrer_mismatch_unknown": "请求被拒绝:页面并非从服务器收到请求的 {{host}} 加载。反向代理必须转发原始 Host 标头(或 X-Forwarded-Host),并且 TRUSTED_PROXY_HOPS 必须与代理数量一致。",+ "csrf_referrer_missing": "请求被拒绝:浏览器未发送 HTTPS 请求所需的 Referer 标头。原因是反向代理、浏览器扩展或 Referrer-Policy 标头将其移除。",+ "csrf_session_expired": "您的会话已过期。请刷新页面后重试。",+ "cursor_expired": "游标已过期;请不带游标重新开始",+ "custom_date_pattern_missing_groups": "自定义模式必须定义命名分组 (?P<year>...)、(?P<month>...) 和 (?P<day>...);缺少:{{groups}}",+ "custom_date_pattern_required": "选择自定义选项时必须填写自定义模式。",+ "custom_date_pattern_too_long": "自定义模式过长(最多 500 个字符)。",+ "delete_failed": "删除失败",+ "delete_owner_only": "权限被拒绝:只有所有者可以删除",+ "deletion_not_allowed": "不允许删除",+ "delivery_not_found": "未找到投递记录",+ "duplicate_speaker_ids": "提供了重复的发言人 ID",+ "email_exists": "邮箱已存在",+ "empty_file": "上传的文件为空。",+ "enabled_field_required": "enabled 字段为必填项",+ "event_not_found": "未找到事件",+ "export_rename_failed": "重命名现有导出失败",+ "export_template_not_found": "未找到导出模板",+ "external_ref_pair_required": "external_system 和 external_ref 必须同时提供",+ "extracted_audio_too_large": "提取的音频为 {{size}} MB,超过了 {{limit}} MB 的存储文件上限。请在管理设置中启用分块(ENABLE_CHUNKING=true),或使用更短、码率更低的源视频。",+ "ffmpeg_missing": "服务器上未找到 FFmpeg",+ "file_monitor_unavailable": "文件监视模块不可用",+ "file_too_large": "文件过大",+ "file_too_large_max": "文件过大。最大大小为 {{maxSize}} MB。",+ "filename_too_long": "filename 不能超过 255 个字符",+ "folder_access_denied": "您没有访问此文件夹的权限",+ "folder_delete_denied": "您没有删除此文件夹的权限",+ "folder_edit_denied": "您没有编辑此文件夹的权限",+ "folder_group_assign_admin_only": "只有群组管理员可以将文件夹指派给群组",+ "folder_id_not_found": "未找到文件夹 {{folderId}}",+ "folder_name_exists": "已存在同名文件夹",+ "folder_name_exists_for_group": "此群组已存在同名文件夹",+ "folder_name_required": "文件夹名称为必填项",+ "folder_not_found": "未找到文件夹",+ "folder_rename_conflict": "已存在另一个同名文件夹",+ "folders_disabled": "未启用文件夹功能",+ "forbidden_tag_ids": "未知或被禁止的标签 ID",+ "full_scope_not_combinable": "'full' 不能与其他权限范围组合使用",+ "global_stats_admin_only": "查看全局统计需要管理员权限",+ "group_folder_create_admin_only": "只有群组管理员可以创建群组文件夹",+ "group_folder_delete_admin_only": "只有群组管理员可以删除群组文件夹",+ "group_folder_edit_admin_only": "只有群组管理员可以编辑群组文件夹",+ "group_folder_name_exists": "已存在同名群组文件夹",+ "group_folders_members_only": "您必须是团队成员才能查看群组文件夹",+ "group_folders_require_internal_sharing": "群组文件夹需要启用内部分享。请在配置中设置 ENABLE_INTERNAL_SHARING=true。",+ "group_name_exists": "已存在同名群组",+ "group_name_required": "群组名称为必填项",+ "group_not_found": "未找到群组",+ "group_tag_apply_denied": "您没有为此录音添加群组标签的权限",+ "group_tag_apply_restricted": "只有录音所有者或群组管理员可以添加群组标签",+ "group_tag_create_admin_only": "只有群组管理员可以创建群组标签",+ "group_tag_delete_admin_only": "只有群组管理员可以删除群组标签",+ "group_tag_edit_admin_only": "只有群组管理员可以编辑群组标签",+ "group_tag_name_exists": "已存在同名群组标签",+ "group_tag_name_exists_for_group": "此群组已存在同名标签",+ "group_tag_remove_denied": "您没有从此录音移除群组标签的权限",+ "group_tag_remove_restricted": "只有录音所有者或群组管理员可以移除群组标签",+ "group_tags_members_only": "您必须是团队成员才能查看群组标签",+ "group_tags_require_internal_sharing": "群组标签需要启用内部分享。请在配置中设置 ENABLE_INTERNAL_SHARING=true。",+ "groups_require_internal_sharing": "群组功能需要启用内部分享。请在配置中设置 ENABLE_INTERNAL_SHARING=true。",+ "incognito_disabled": "此服务器未启用无痕模式",+ "inquire_agent_off": "此服务器已关闭 Inquire 代理",+ "inquire_disabled": "未启用 Inquire 模式",+ "inquire_off": "此服务器已关闭 Inquire",+ "internal_sharing_disabled": "未启用内部分享",+ "invalid_boolean_flag": "{{key}} 必须为 true 或 false",+ "invalid_boolean_value": "值必须是有效的布尔值(true/false、1/0、yes/no)",+ "invalid_bulk_status_field": "字段必须为 \"inbox\"、\"highlight\" 或 \"archive\"",+ "invalid_bulk_tag_action": "操作必须为 \"add\" 或 \"remove\"",+ "invalid_color_scheme": "无效的 color_scheme",+ "invalid_cursor": "无法读取游标",+ "invalid_dark_mode": "无效的 dark_mode",+ "invalid_date_field": "date_field 必须为 meeting_date 或 created_at",+ "invalid_events_list": "events 必须是非空列表",+ "invalid_expires_in_days": "expires_in_days 必须是非负整数",+ "invalid_expires_in_days_range": "expires_in_days 必须在 1 到 3650 之间",+ "invalid_filters": "filters 必须是对象",+ "invalid_finalize_body": "finalize 请求体必须是 JSON 对象",+ "invalid_folder_id": "folder_id 必须是 ID 或 none",+ "invalid_group_role": "角色必须为 \"admin\" 或 \"member\"",+ "invalid_idempotency_key": "idempotency_key 必须为 1 到 100 个字符",+ "invalid_ids_list": "ids 必须是列表",+ "invalid_inquire_mode": "mode 必须为 rag、agent 或 auto",+ "invalid_integer_value": "值必须是有效的整数",+ "invalid_is_archived": "is_archived 必须是布尔值",+ "invalid_json": "无效的 JSON",+ "invalid_limit": "limit 必须在 1 到 500 之间",+ "invalid_max_segments": "max_segments 必须至少为 1",+ "invalid_meeting_date": "meeting_date 格式无效",+ "invalid_number_value": "值必须是有效的数字",+ "invalid_options_list": "options 必须是列表",+ "invalid_query_length": "q 必须为 2 到 500 个字符",+ "invalid_recording_ids": "无效的录音 ID",+ "invalid_recording_ids_csv": "recording_ids 必须是以逗号分隔的 ID 列表",+ "invalid_recording_ids_list": "recording_ids 必须是列表",+ "invalid_regex_pattern": "\"{{variable}}\" 的 regex 模式无效:{{detail}}",+ "invalid_regex_patterns": "regex_patterns 必须是字典",+ "invalid_regular_expression": "无效的正则表达式:{{detail}}",+ "invalid_reprocess_type": "类型必须为 \"transcription\" 或 \"summary\"",+ "invalid_scope": "scope 必须为 own、shared 或 all",+ "invalid_scopes_list": "scopes 必须是非空的权限范围名称列表",+ "invalid_search_mode": "mode 必须为 keyword、semantic 或 auto",+ "invalid_search_paging": "limit 必须在 1 到 50 之间,page 至少为 1",+ "invalid_setting_type": "无效的设置类型。必须是以下之一:{{types}}",+ "invalid_snippet_range": "开始时间或时长无效",+ "invalid_source_ids": "source_ids 必须是非空列表",+ "invalid_speaker_aliases": "aliases 必须是字符串列表",+ "invalid_speaker_count_mode": "无效的 speaker_count_mode",+ "invalid_speaker_email": "email 必须是邮箱地址",+ "invalid_speaker_map": "speaker_map 必须是对象",+ "invalid_speaker_value_type": "发言人 \"{{label}}\" 的值类型无效",+ "invalid_storage_quota": "存储配额必须是正数(MB)。",+ "invalid_subscription_data": "无效的订阅数据",+ "invalid_tag_color": "颜色必须是十六进制值,例如 #3B82F6",+ "invalid_tag_ids": "tag_ids 必须是列表",+ "invalid_tag_ids_list": "tag_ids 必须是标签 ID 列表",+ "invalid_temperature": "{{kind}} 温度必须是 0 到 2 之间的数字",+ "invalid_temperature_values": "values 必须是温度对象",+ "invalid_threshold": "无效的阈值",+ "invalid_timezone_value": "值必须是有效的 IANA 时区,例如 Europe/Berlin",+ "invalid_total_bytes": "total_bytes 必须是正整数",+ "invalid_transcript_data": "提供的转录数据无效",+ "invalid_updated_since": "updated_since 必须是 ISO 8601 日期时间",+ "invalid_username_length": "用户名必须为 2 到 20 个字符。",+ "invalid_with_sources": "with_sources 必须为 true 或 false",+ "job_not_found": "未找到任务",+ "job_retry_failed_only": "只能重试失败的任务",+ "keep_audio_only_immutable": "keep_audio_only 在上传时设置,之后无法更改。",+ "last_admin_demotion": "不能移除最后一位管理员的管理员权限。",+ "llm_connection_failed": "无法连接到 LLM 服务器。请检查您的 LLM 服务是否正在运行。",+ "membership_not_found": "未找到成员关系",+ "merge_failed": "合并录音失败",+ "merge_needs_two": "请至少选择两条录音进行合并",+ "merge_needs_two_speakers": "至少需要 2 位发言人才能合并",+ "message_required": "message 为必填项",+ "missing_bulk_status_fields": "缺少 recording_ids、field 或 value",+ "missing_recording_ids": "缺少 recording_ids",+ "missing_recording_ids_or_tag_id": "缺少 recording_ids 或 tag_id",+ "missing_request_body": "缺少请求体",+ "missing_required_field": "缺少必填字段:{{field}}",+ "missing_tag_ids": "请求体中缺少 tag_ids",+ "name_and_prompt_required": "名称以及提示词或 Hotwords 为必填项",+ "name_and_template_required": "名称和模板为必填项",+ "name_empty": "name 不能为空",+ "name_required": "name 为必填项",+ "naming_template_not_found": "未找到命名模板",+ "no_api_token": "此请求中没有 API 令牌",+ "no_audio_file": "没有音频文件",+ "no_chunks_uploaded": "尚未上传任何分块",+ "no_configuration_data": "未提供配置数据",+ "no_data_provided": "未提供数据",+ "no_events": "未找到事件",+ "no_events_for_recording": "未找到此录音的事件",+ "no_fields_given": "未指定任何字段",+ "no_file_provided": "未提供文件",+ "no_file_selected": "未选择文件",+ "no_message_provided": "未提供消息",+ "no_messages_provided": "未提供消息",+ "no_messages_to_download": "没有可下载的消息",+ "no_notes": "此录音没有可用的笔记",+ "no_query_provided": "未提供查询内容",+ "no_recording_id": "未提供录音 ID",+ "no_recordings_specified": "未指定录音",+ "no_speaker_map": "未提供发言人映射",+ "no_speakers_in_transcription": "转录中未找到发言人",+ "no_summary": "此录音没有可用的摘要",+ "no_transcription": "没有可用的转录",+ "no_transcription_connector": "没有启用的转录连接器",+ "no_transcription_data": "未提供转录数据",+ "no_transcription_for_identification": "没有可用于识别发言人的转录",+ "no_transcription_for_recording": "此录音没有可用的转录",+ "no_transcription_for_summary": "没有可用于生成摘要的有效转录",+ "no_transcription_for_title": "没有可用于生成标题的有效转录",+ "no_transcription_provided": "未提供转录",+ "not_found": "未找到",+ "notes_field_required": "notes 字段为必填项",+ "notification_not_found": "未找到通知",+ "participants_too_long": "participants 不能超过 500 个字符",+ "permission_denied": "权限被拒绝",+ "personal_tag_apply_own_only": "您只能添加自己的个人标签",+ "personal_tag_remove_own_only": "您只能移除自己的个人标签",+ "public_link_https_required": "公开链接需要 HTTPS 连接",+ "public_link_not_permitted": "您无权创建公开链接",+ "public_share_not_permitted": "您没有创建公开分享链接的权限。请联系您的管理员。",+ "public_sharing_disabled": "此服务器未启用公开分享",+ "public_sharing_off": "此服务器已关闭公开分享",+ "push_unavailable": "推送通知不可用",+ "question_required": "question 为必填项",+ "recording_access_denied": "您没有访问此录音的权限",+ "recording_already_processing": "录音已在处理中",+ "recording_chat_denied": "您没有与此录音聊天的权限",+ "recording_delete_admin_only": "只有管理员可以删除录音",+ "recording_delete_denied": "您没有删除此录音的权限",+ "recording_delete_failed": "无法删除录音",+ "recording_edit_denied": "您没有编辑此录音的权限",+ "recording_ids_empty": "recording_ids 必须是非空列表",+ "recording_ids_required": "recording_ids 为必填项",+ "recording_modify_denied": "您没有修改此录音的权限",+ "recording_not_found": "未找到录音",+ "recording_not_found_or_no_share": "未找到录音,或您没有共享该录音的权限。",+ "recording_not_found_or_no_view": "未找到录音,或您没有查看该录音的权限。",+ "recording_not_resettable": "录音当前状态无法重置。当前状态:{{status}}",+ "recording_or_audio_not_found": "未找到录音或音频文件",+ "recording_reprocess_denied": "您没有重新处理此录音的权限",+ "recording_share_denied": "您没有共享此录音的权限",+ "recording_view_denied": "您没有查看此录音的权限",+ "recordings_export_failed": "导出录音失败",+ "reference_not_found": "未找到引用",+ "reprocess_audio_not_found": "未找到用于重新处理的音频文件",+ "reprocess_queue_failed": "无法将重新处理加入队列,请重试",+ "reshare_edit_not_permitted": "您没有编辑权限,因此无法授予编辑权限",+ "reshare_reshare_not_permitted": "您没有转发权限,因此无法授予转发权限",+ "sample_not_found": "未找到样本",+ "sample_remove_failed": "无法移除样本",+ "scope_narrow_only": "范围只能缩小;如需更多权限,请创建新令牌",+ "scoped_token_header_only": "限定范围的令牌只能通过请求头传递(Authorization: Bearer ...)",+ "semantic_search_unavailable": "此实例不支持语义搜索",+ "session_already_finalized": "会话已完成",+ "session_already_finalizing": "会话正在完成中",+ "session_cannot_finalize": "会话状态为 {{status}};无法完成",+ "session_finalizing": "会话正在完成",+ "session_is_recorder": "该会话是录音器会话;请使用 /finalize 完成",+ "session_is_sliced_upload": "该会话是分片文件上传;请使用 /finalize-upload 完成",+ "session_not_accepting_chunks": "会话状态为 {{status}};不再接受分块",+ "session_not_found": "未找到会话",+ "session_quota_exhausted": "每位用户的进行中录音存储配额已用尽",+ "session_quota_would_exceed": "将超出每位用户的进行中录音存储配额",+ "session_recording_gone": "会话已完成,其录音已不存在",+ "session_storage_allocation_failed": "服务器无法分配会话存储",+ "setting_key_required": "设置键为必填项",+ "share_not_found": "未找到共享",+ "share_revoke_denied": "您没有撤销此共享的权限",+ "share_sync_admin_only": "只有群组管理员可以同步共享",+ "share_with_owner": "不能将录音共享给其所有者",+ "share_with_self": "不能将录音共享给您自己",+ "shares_view_denied": "您没有查看此录音共享的权限",+ "sharing_https_required": "共享仅在安全(HTTPS)连接下可用。",+ "slice_reassembly_failed": "服务器无法重新组合已上传的分片",+ "slice_size_mismatch": "已上传分片的总大小与声明的文件大小不符",+ "snippet_extraction_failed": "提取音频片段失败",+ "speaker_alias_too_long": "每个别名最多 100 个字符",+ "speaker_map_required": "speaker_map 为必填项",+ "speaker_name_empty": "发言人姓名不能为空",+ "speaker_name_exists": "已存在名为 \"{{name}}\" 的发言人",+ "speaker_name_required": "发言人姓名为必填项",+ "speaker_name_taken": "已存在同名发言人",+ "speaker_not_found": "未找到发言人",+ "speaker_nothing_to_change": "没有需要更改的内容:请提供姓名、邮箱或别名",+ "speakers_not_found_or_not_owned": "部分发言人不存在或不属于您的账户",+ "subscription_not_found": "未找到订阅",+ "subtitle_generation_failed": "无法从转录生成字幕格式",+ "summary_blocked_transcription_failed": "无法生成摘要:转录失败。请先重新处理转录。",+ "summary_field_required": "summary 字段为必填项",+ "summary_generate_denied": "您没有为此录音生成摘要的权限",+ "summary_generation_failed": "生成摘要失败。请检查您的 LLM 服务是否正在运行。",+ "summary_generation_failed_detail": "生成摘要失败:{{detail}}",+ "summary_llm_not_configured": "摘要服务不可用(未配置 LLM 客户端)",+ "summary_openrouter_not_configured": "摘要服务不可用(未配置 OpenRouter 客户端)",+ "system_info_unavailable": "无法获取系统信息",+ "tag_access_denied": "您没有访问此标签的权限",+ "tag_already_on_recording": "此录音已有该标签",+ "tag_delete_denied": "您没有删除此标签的权限",+ "tag_edit_denied": "您没有编辑此标签的权限",+ "tag_group_assign_admin_only": "只有群组管理员可以将标签指派给群组",+ "tag_id_required": "标签 ID 为必填项",+ "tag_ids_required": "必须提供 tag_ids 或 tag_id",+ "tag_name_exists": "已存在同名标签",+ "tag_name_required": "标签名称为必填项",+ "tag_not_found": "未找到标签",+ "tag_not_on_recording": "此录音没有该标签",+ "tag_rename_conflict": "已存在另一个同名标签",+ "tag_use_denied": "无权使用此标签",+ "target_folder_access_denied": "无权访问目标文件夹",+ "target_id_required": "target_id 为必填项",+ "target_user_not_found": "未找到目标用户",+ "template_in_use": "无法删除模板:有 {{count}} 个标签正在使用此模板",+ "template_not_found": "未找到模板",+ "text_model_not_configured": "未配置文本模型。请设置 TEXT_MODEL_BASE_URL;使用托管服务时还需设置 TEXT_MODEL_API_KEY。",+ "title_blocked_transcription_failed": "无法生成标题:转录失败。请先重新处理转录。",+ "title_generation_failed": "生成标题失败",+ "title_openrouter_not_configured": "标题生成服务不可用(未配置 OpenRouter 客户端)",+ "token_limit_reached": "每个账户最多可拥有 {{max}} 个有效的 API 令牌。请撤销一个不再使用的令牌后再创建新令牌。",+ "token_not_found": "未找到令牌",+ "too_many_speaker_aliases": "最多 20 个别名",+ "total_bytes_required": "分片上传需要提供 total_bytes",+ "transcript_download_failed": "生成转录下载失败",+ "transcription_format_unsupported_for_identification": "该转录格式不支持自动识别",+ "unauthorized": "未授权",+ "unauthorized_admin_required": "未授权。需要管理员权限。",+ "unexpected_error": "发生意外错误。",+ "unexpected_error_deleting": "删除时发生意外错误。",+ "unexpected_error_detail": "发生意外错误:{{detail}}",+ "unexpected_error_processing": "处理过程中发生意外错误。",+ "unexpected_error_saving": "保存时发生意外错误。",+ "unexpected_error_updating_transcription": "更新转录时发生意外错误。",+ "unexpected_error_upload": "上传过程中发生意外错误。",+ "unknown_event_types": "未知的事件类型:{{events}}",+ "unknown_fields": "未知字段:{{fields}}",+ "unknown_format": "未知格式:{{format}}",+ "unknown_scopes": "未知的权限范围:{{scopes}}。允许的值:{{allowed}} 或 full",+ "unknown_temperature": "未知温度:{{names}}",+ "unsupported_mime_type": "不支持的 mime_type {{mimeType}}",+ "upload_tag_or_folder_forbidden": "上传中的某个标签或文件夹不是您可以使用的",+ "url_required": "url 为必填项",+ "user_id_required": "用户 ID 为必填项",+ "user_not_found": "未找到用户",+ "username_exists": "用户名已存在",+ "watch_folder_group_tag_unsupported": "群组标签不支持监视文件夹",+ "webhook_cap_reached": "已达到每位用户的 Webhook 上限({{count}}/{{max}})",+ "webhook_disabled": "Webhook 已停用;请先启用",+ "webhook_dns_failed": "{{host}} 的 DNS 解析失败",+ "webhook_not_found": "未找到 Webhook",+ "webhook_url_bad_scheme": "协议必须是 http 或 https",+ "webhook_url_http_not_allowed": "http:// URL 需要设置 allow_http=true",+ "webhook_url_missing_host": "URL 缺少主机名",+ "webhook_url_private_address": "该 URL 解析到私有或回环地址({{ip}});请设置 WEBHOOK_INTRANET_HOST_ALLOWLIST 以明确允许此主机,或使用公网 URL。允许列表的正则表达式应带锚点(例如 r\"^(localhost|.*\\.intra)$\"),以免被外观相似的主机名欺骗。",+ "webhook_url_unparseable": "无法解析该 URL",+ "word_document_failed": "生成 Word 文档失败"+ },+ "apiMessage": {+ "accountUpdated": "账户信息已更新!",+ "alreadySubscribed": "已订阅",+ "autoProcessingStarted": "自动处理已启动",+ "autoProcessingStopped": "自动处理已停止",+ "chunksProcessed": "分块处理成功",+ "configUpdatedRestartRequired": "配置已更新。需要重启才能应用更改。",+ "embeddingsProcessedCount": "已处理 {{total}} 个录音中的 {{processed}} 个。",+ "embeddingsReembeddedCount": "已为 {{total}} 个录音中的 {{processed}} 个重新生成嵌入。",+ "existingShareLinkUsed": "正在使用此录音现有的分享链接",+ "inquireAllProcessed": "所有录音均已为 Inquire 模式处理",+ "inquireProcessedRemaining": "已处理 {{processed}} 条录音,剩余 {{remaining}} 条。",+ "jobDeleted": "任务已删除",+ "jobQueuedForRetry": "任务已加入重试队列",+ "modelDiscoveryUnsupported": "{{connector}} 未提供模型发现端点。",+ "noRecordingsToReembed": "没有需要重新生成嵌入的录音。",+ "noSpeakerEmbeddings": "没有可用的发言人嵌入",+ "preferencesSaved": "偏好设置已保存",+ "pushNotificationsNotEnabled": "未启用推送通知",+ "recordingDeleted": "录音已删除",+ "recordingStatusReset": "录音状态已重置。",+ "scanTriggered": "已触发扫描",+ "sharesSynced": "已在 {{recordingsProcessed}} 条录音中创建 {{sharesCreated}} 个新共享",+ "speakerDeleted": "发言人已删除",+ "speakersMerged": "已成功将 {{count}} 位发言人合并到 {{name}}",+ "speakersUpdated": "发言人已更新。",+ "subscriptionRemoved": "订阅已移除",+ "subscriptionSaved": "订阅已保存",+ "summarizationQueued": "摘要已加入队列",+ "summarizingConversation": "正在总结之前的对话...",+ "summaryGenerationQueued": "摘要生成已加入队列",+ "summaryReprocessingStarted": "摘要重新处理已开始",+ "tagDeleted": "标签已删除",+ "tagRemoved": "标签已移除",+ "tokenRevoked": "令牌已撤销",+ "transcriptUpdated": "转录已更新。",+ "transcriptionQueued": "转录已加入队列",+ "transcriptionReprocessingQueued": "转录重新处理已加入队列",+ "transcriptionUpdated": "转录已更新。",+ "userAlreadyHasNamingTemplates": "该用户已有命名模板",+ "userAlreadyHasTemplates": "该用户已有模板",+ "voiceProfileCleared": "已清除 {{name}} 的声纹档案"}}}diff --git a/tests/test_asr_voice_recorder_upload.py b/tests/test_asr_voice_recorder_upload.pyindex 3ed7a7e4..68d06241 100644--- a/tests/test_asr_voice_recorder_upload.py+++ b/tests/test_asr_voice_recorder_upload.py@@ -151,7 +151,7 @@ def test_missing_invalid_expired_and_revoked_secrets_share_one_error(tmp_path):for secret in (None, "not-a-token", expired, revoked):response = _post(client, secret=secret)assert response.status_code == 401- assert response.get_json() == {"error": "Authentication failed"}+ assert response.get_json() == {"error": "Authentication failed", "code": "authentication_failed"}assert Recording.query.filter_by(user_id=user.id).count() == 0finally:_cleanup_user(user)@@ -170,7 +170,7 @@ def test_oversized_body_is_rejected_before_multipart_authentication():content_type="multipart/form-data",)assert response.status_code == 413- assert response.get_json() == {"error": "File too large"}+ assert response.get_json() == {"error": "File too large", "code": "file_too_large"}def test_session_or_header_cannot_replace_multipart_secret(tmp_path):@@ -376,7 +376,7 @@ def test_missing_file_after_valid_auth_returns_400():content_type="multipart/form-data",)assert response.status_code == 400- assert response.get_json() == {"error": "No file provided"}+ assert response.get_json() == {"error": "No file provided", "code": "no_file_provided"}finally:_cleanup_user(user)diff --git a/tests/test_cov_recordings_write.py b/tests/test_cov_recordings_write.pyindex ee3db477..7936ac13 100644--- a/tests/test_cov_recordings_write.py+++ b/tests/test_cov_recordings_write.py@@ -704,7 +704,8 @@ def test_upload_ffmpeg_missing_stays_500_and_removes_staging_copy():patch("src.api.recordings.convert_if_needed", side_effect=FFmpegNotFoundError("no ffmpeg")):resp = _do_upload(client, filename="a.flac")assert resp.status_code == 500- assert resp.get_json() == {"error": "Audio conversion tool (FFmpeg) not found on server."}+ assert resp.get_json() == {"error": "Audio conversion tool (FFmpeg) not found on server.",+ "code": "audio_converter_missing"}assert os.listdir(staging) == []_cleanup(user)@@ -720,7 +721,8 @@ def test_upload_unexpected_error_removes_staging_copy():side_effect=RuntimeError("secret internal detail")):resp = _do_upload(client)assert resp.status_code == 500- assert resp.get_json() == {"error": "An unexpected error occurred during upload."}+ assert resp.get_json() == {"error": "An unexpected error occurred during upload.",+ "code": "unexpected_error_upload"}assert os.listdir(staging) == []_cleanup(user)diff --git a/tests/test_cov_retention.py b/tests/test_cov_retention.pyindex ef6657bb..6dbbc8a7 100644--- a/tests/test_cov_retention.py+++ b/tests/test_cov_retention.py@@ -217,7 +217,7 @@ class TestProcessAutoDeletion(RetentionTestBase):def test_disabled_returns_error(self):stats, _ = self._run(enabled=False)- self.assertEqual(stats, {'error': 'Auto-deletion is not enabled'})+ self.assertEqual(stats, {'error': 'Auto-deletion is not enabled', 'code': 'auto_deletion_disabled'})def test_full_delete_removes_old_recording_and_audio(self):rec = self.make_recording(age_days=100, audio_path='user/old.mp3')diff --git a/tests/test_localization.py b/tests/test_localization.pyindex 14ff9467..7af473d2 100644--- a/tests/test_localization.py+++ b/tests/test_localization.py@@ -186,6 +186,13 @@ def test_every_recording_status_the_backend_can_set_has_a_label():# translate('server.a.b') in Python code: text the server produces in the# user's interface language (#477). The browser scan above does not see it.SERVER_PATTERN = re.compile(r"""\btranslate\(\s*['"](server\.[\w.]+)['"]""")+# api_error('code') reads server.apiError.<code>.+API_ERROR_PATTERN = re.compile(r"""\bapi_error\(\s*['"](\w+)['"]""")+# Error codes that helpers return or raise (ReprocessError('code'),+# webhook_url_problem, can_merge_speakers ...) reach api_error() or+# translate(f'server.apiError.{code}') as values; each still appears in src/+# as a quoted literal.+CODE_LITERAL = re.compile(r"""['"]([a-z][a-z0-9]*(?:_[a-z0-9]+)+)['"]""")def _server_keys_used():@@ -194,9 +201,18 @@ def _server_keys_used():text = open(path, encoding='utf-8').read()for key in SERVER_PATTERN.findall(text):found.setdefault(key, set()).add(os.path.relpath(path, REPO))+ for code in API_ERROR_PATTERN.findall(text):+ found.setdefault(f'server.apiError.{code}', set()).add(os.path.relpath(path, REPO))return found+def _error_code_literals():+ codes = set()+ for path in _walk('src', '.py'):+ codes.update(CODE_LITERAL.findall(open(path, encoding='utf-8').read()))+ return codes++def test_every_server_key_used_in_src_exists_in_english():english = _flatten(_load('en'))used = _server_keys_used()@@ -210,7 +226,9 @@ def test_every_server_key_used_in_src_exists_in_english():def test_every_server_key_in_english_is_used():"""server.* keys are only read from Python, so an unused one is dead weight."""used = _server_keys_used()- unused = sorted(k for k in _flatten(_load('en')) if k.startswith('server.') and k not in used)+ codes = _error_code_literals()+ unused = sorted(k for k in _flatten(_load('en')) if k.startswith('server.') and k not in used+ and not (k.startswith('server.apiError.') and k.rsplit('.', 1)[1] in codes))assert not unused, f'server keys in en.json that no translate() call uses: {unused}'@@ -409,3 +427,35 @@ def test_every_locale_has_every_file_size_unit():table = _load(lang).get('fileSize', {})assert set(table) == units, f'{lang}.json fileSize has {sorted(table)}'assert all('{{count}}' in v for v in table.values()), f'{lang}.json fileSize lacks {{{{count}}}}'+++# API responses (#477): an 'error' or 'message' in a response comes from the+# catalogs, through api_error('code') or translate('server.apiMessage.key'),+# so a new handler cannot return a fixed English string.+API_LITERAL = re.compile(r"""['"](?:error|message)['"]\s*:\s*[fFrR]?['"]""")+++def _api_literals():+ found = []+ paths = list(_walk('src/api', '.py')) + [os.path.join(REPO, 'src', 'app.py')]+ for path in paths:+ for number, line in enumerate(open(path, encoding='utf-8'), 1):+ if API_LITERAL.search(line) and not line.lstrip().startswith('#'):+ found.append(f'{os.path.relpath(path, REPO)}:{number}: {line.strip()}')+ return found+++def test_no_fixed_english_error_or_message_in_api_responses():+ offenders = _api_literals()+ assert not offenders, 'use api_error() or translate():\n' + '\n'.join(f' {o}' for o in offenders)++[email protected]('snippet,matches', [+ ("return jsonify({'error': 'Recording not found'}), 404", True),+ ('return jsonify({"message": f"Deleted {n} tags"})', True),+ ("return jsonify(api_error('recording_not_found')), 404", False),+ ("return jsonify({'message': translate('server.apiMessage.tagDeleted')})", False),+ ("return jsonify({'error': str(e)}), 500", False),+])+def test_api_literal_scanner(snippet, matches):+ assert bool(API_LITERAL.search(snippet)) is matchesdiff --git a/tests/test_server_i18n.py b/tests/test_server_i18n.pyindex 677ea2e4..35869060 100644--- a/tests/test_server_i18n.py+++ b/tests/test_server_i18n.py@@ -1,8 +1,9 @@-"""Server-generated text in the user's interface language (#477, part 1).+"""Server-generated text in the user's interface language (#477).translate() resolves the same static/locales/*.json catalogs the browser uses.-Flash messages and the verification and password-reset emails go through it;-Budget messages follow the budget owner's language.+Flash messages, the verification and password-reset emails, budget messages+and API error and info messages go through it. API errors also carry a code+that is the same in every language."""import os@@ -17,7 +18,7 @@ from src.app import app, dbfrom src.models import Userfrom src.services import email as email_servicefrom src.utils.localization import (- format_file_size, format_number, format_percent, match_language, request_language, translate,+ api_error, format_file_size, format_number, format_percent, match_language, request_language, translate,)@@ -283,3 +284,69 @@ def test_transcription_budget_messages_use_the_users_language(make_user):assert not can and msg.startswith('Месячный лимит транскрипции превышен (90/60 мин).')assert _budget(transcription_tracker, en, 54 * 60, 'monthly_transcription_budget', 60 * 60)[2] == ('Warning: 90% of monthly transcription budget used.')+++# ---------------------------------------------------------------------------+# API errors (#477): `error` in the interface language, `code` the same in+# every language. A response that already had a code keeps it.+# ---------------------------------------------------------------------------++def _session_client(uid):+ client = app.test_client()+ with client.session_transaction() as s:+ s['_user_id'] = str(uid)+ s['_fresh'] = True+ return client++[email protected]('lang,text', [+ ('de', 'Aufnahme nicht gefunden'), ('fr', 'Enregistrement introuvable'),+ (None, 'Recording not found'),+ # An unknown saved language falls back to Accept-Language (ru here).+ ('xx', 'Запись не найдена'),+])+def test_api_error_follows_the_users_language_with_a_stable_code(make_user, lang, text):+ uid = make_user(lang)+ prev = app.config.get('WTF_CSRF_ENABLED')+ app.config['WTF_CSRF_ENABLED'] = False+ try:+ resp = _session_client(uid).post('/recording/999999999/update_speakers', json={},+ headers={'Accept-Language': 'ru'} if lang else {})+ finally:+ app.config['WTF_CSRF_ENABLED'] = prev+ assert resp.status_code == 404+ assert resp.get_json() == {'error': text, 'code': 'recording_not_found'}+++def test_api_v1_token_error_keeps_its_existing_code(make_user):+ import secrets+ from src.models import APIToken+ from src.utils.token_auth import hash_token+ uid = make_user('de')+ plain = f'tok-{secrets.token_urlsafe(16)}'+ with app.app_context():+ db.session.add(APIToken(user_id=uid, token_hash=hash_token(plain), name='i18n'))+ db.session.commit()+ resp = app.test_client().get('/api/v1/recordings/999999999/external-refs',+ headers={'Authorization': f'Bearer {plain}'})+ assert resp.status_code == 404+ assert resp.get_json() == {'error': 'Aufnahme nicht gefunden', 'code': 'not_found'}+ with app.app_context():+ APIToken.query.filter_by(user_id=uid).delete()+ db.session.commit()+++def test_api_error_for_anonymous_request_uses_accept_language():+ with app.test_request_context('/', headers={'Accept-Language': 'es-MX,es;q=0.9'}):+ assert api_error('recording_not_found') == {+ 'error': translate('server.apiError.recording_not_found', 'es'), 'code': 'recording_not_found'}+ assert api_error('recording_not_found')['error'] != 'Recording not found'+++def test_every_api_error_code_is_a_snake_case_key():+ import json+ import re+ with open(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))),+ 'static', 'locales', 'en.json'), encoding='utf-8') as f:+ codes = json.load(f)['server']['apiError']+ assert codes and all(re.fullmatch(r'[a-z][a-z0-9_]*', c) for c in codes)