runique 2.1.14

A Django-inspired web framework for Rust with ORM, templates, and comprehensive security middleware
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
{
  "forms": {
    "upload_dir_error": "创建上传目录时出错",
    "file_create_error": "创建文件时出错",
    "multipart_stream_error": "多部分流错误",
    "file_write_error": "写入文件时出错",
    "required": "此项为必填项",
    "too_short": "长度过短(最少 {} 个字符)",
    "too_long": "长度过长(最多 {} 个字符)",
    "email_invalid": "邮箱地址格式不正确",
    "url_invalid": "请输入有效的网址",
    "phone_invalid": "无效的电话号码(允许数字、+、空格、连字符,7-15位数字)",
    "hash_error": "哈希计算错误:{}",
    "password_empty": "密码不能为空",
    "filter_invalid_value": "static/media 过滤器接收到无效值({}),应为文件路径",
    "number_invalid": "数字格式无效",
    "number_required": "此项必填",
    "integer_required": "必须为整数",
    "decimal_required": "必须为小数格式",
    "min_value": "最小值应为 {}",
    "max_value": "最大值不能超过 {}",
    "precision_max": "小数点后最多 {} 位",
    "precision_min": "小数点后至少 {} 位",
    "color_invalid": "颜色格式无效(格式:#RRGGBB 或 #RGB)",
    "color_no_hash": "颜色值必须以 # 开头",
    "color_bad_hex": "包含非十六进制字符",
    "slug_invalid": "Slug 格式无效",
    "slug_no_dash": "Slug 不能以连字符开头或结尾",
    "uuid_invalid": "UUID 格式无效(应为:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)",
    "json_invalid": "JSON 格式无效:{}",
    "ipv4_only": "仅支持 IPv4 地址",
    "ipv6_only": "仅支持 IPv6 地址",
    "ip_invalid": "IP 地址无效",
    "date_invalid": "日期格式无效",
    "date_too_old": "日期过早(最早:{})",
    "date_too_far": "日期过晚(最晚:{})",
    "time_invalid": "时间格式无效",
    "file_required": "请至少选择一个文件",
    "file_extension_blocked": "文件 '{}' 类型不允许。允许的扩展名:{}",
    "finalize_error": "字段 '{}' 处理出错:{}",
    "template_missing": "缺少模板:{}",
    "render_js_error": "JavaScript 渲染出错:{}",
    "tera_not_configured": "Tera 模板引擎未配置",
    "config_not_found": "配置未在扩展中找到",
    "hint_slug": "格式示例:字母-数字-连字符",
    "hint_uuid": "格式示例:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "hint_json": "需要有效的 JSON 格式",
    "hint_ip_v4": "IPv4 格式示例:192.168.1.1",
    "hint_ip_v6": "IPv6 格式示例:2001:0db8:85a3::8a2e:0370:7334",
    "hint_ip": "IPv4 或 IPv6 格式均可",
    "validation_overflow": "检测到栈溢出:验证过程中出现无限递归",
    "choice_invalid": "选项无效",
    "choice_invalid_value": "无效选项:{}",
    "select_required": "请选择一个选项",
    "checkbox_required": "请至少选择一个选项",
    "multipart_error": "多部分表单上传出错",
    "body_error": "读取请求体时出错",
    "aegis_query_error": "解析查询字符串失败: {}",
    "aegis_urlencoded_error": "解析URL编码正文失败: {}",
    "aegis_json_error": "解析JSON正文失败: {}",
    "auth_required": "需要进行身份验证",
    "role_insufficient": "权限不足",
    "time_too_old": "时间过早(最早:{})",
    "time_too_far": "时间过晚(最晚:{})",
    "datetime_too_old": "日期时间过早(最早:{})",
    "datetime_too_far": "日期时间过晚(最晚:{})",
    "duration_invalid": "持续时间格式无效(应为秒数)",
    "duration_too_short": "持续时间过短(最短:{} 秒)",
    "duration_too_long": "持续时间过长(最长:{} 秒)",
    "file_max_count": "最多允许上传 {} 个文件",
    "file_too_large": "文件 '{}' 过大({}MB > 最大限制 {}MB)",
    "file_invalid_image": "文件 '{}' 不是有效的图片",
    "image_too_wide": "图片 '{}' 宽度过大({}px > {}px)",
    "image_too_tall": "图片 '{}' 高度过大({}px > {}px)",
    "boolean_required": "必须勾选此项",
    "slug_unicode_invalid": "只能使用字母、数字、连字符和下划线",
    "unique_field_taken": "此 {} 已被占用",
    "unique_value_taken": "字段 '{}' 的值已被占用",
    "unique_constraint_violated": "违反了唯一性约束",
    "db_error": "数据库错误:{}",
    "text_field_too_large": "文本字段过大(最大1MB)",
    "upload_too_large": "文件上传过大(最大{}MB)"
  },
  "csrf": {
    "missing": "缺少 CSRF 令牌",
    "invalid": "CSRF 令牌无效",
    "invalid_or_missing": "CSRF 令牌无效或缺失",
    "forbidden": "CSRF 验证失败",
    "session_write_error": "会话写入失败"
  },
  "error": {
    "source": "来源:{}",
    "AppError": "应用错误",
    "build": "构建出错:{}",
    "internal": "内部错误",
    "forbidden": "访问被拒绝",
    "not_found": "未找到资源",
    "validation": "验证失败:{}",
    "database": "数据库出错:{}",
    "io": "输入/输出错误:{}",
    "template": "模板出错:{}",
    "custom": "自定义错误:{}",
    "title": {
      "not_found": "页面不存在",
      "forbidden": "访问被拒绝",
      "validation": "验证失败",
      "database": "数据库错误",
      "template": "模板渲染错误",
      "internal": "服务器内部错误"
    },
    "path_not_found": "请求路径 '{}' 不存在",
    "internal_occurred": "发生内部错误",
    "context_occurred": "发生应用错误"
  },
  "title": {
    "template": "'{}' 的模板错误"
  },
  "build": {
    "validation_failed": "构建验证失败:{}",
    "check_failed": "构建检查失败,共 {} 个错误",
    "template_failed": "模板加载失败:{}",
    "db_missing": "启用 'orm' 功能时需要数据库连接",
    "component_not_ready": "组件 '{}' 尚未就绪"
  },
  "middleware": {
    "host_invalid": "无效的主机名:'{}'(允许的主机:{})",
    "host_debug": "无效的主机名:'{}'。请将其添加到 RUNIQUE_ALLOWED_HOSTS 环境变量中。",
    "bad_request": "请求格式错误"
  },
  "html": {
    "404_title": "404",
    "404_text": "页面不存在",
    "500_title": "500",
    "500_text": "服务器内部错误",
    "500_notice": "我们的团队已收到通知,正在处理此问题。",
    "429_title": "429",
    "429_text": "请求过多,请稍后再试。",
    "back_home": "返回首页",
    "critical_error_title": "严重错误",
    "critical_error_text": "错误处理系统本身发生了错误。",
    "critical_error_contact": "这种情况不应发生,请联系系统管理员。"
  },
  "debug": {
    "stack_trace_title": "详细错误堆栈",
    "stack_trace_tip": "最上方的错误(层级 0)通常是根本原因,后续错误显示错误在代码中的传播路径。"
  },
  "flash": {
    "welcome": "欢迎 {},您的账号已创建成功!",
    "fix_errors": "请修正以下错误",
    "success_demo": "这是一条成功提示。",
    "info_demo": "这是一条信息提示。",
    "warning_demo": "这是一条警告提示。",
    "error_demo": "这是一条错误提示。"
  },
  "log": {
    "db_connecting": "正在连接 {} 数据库……",
    "db_connected": "数据库连接成功({})",
    "db_failed": "数据库连接失败",
    "db_engine": "数据库引擎:{}",
    "template_render_error": "模板渲染出错",
    "error_handler": "发生严重错误",
    "error_handled": "错误已处理",
    "files_count": "正在向表单添加 JavaScript 文件",
    "js_file_skip": "跳过 JavaScript 文件",
    "already_initialized": "日志记录器已初始化"
  },
  "cli": {
    "creating_project": "正在创建项目 '{}'……",
    "admin_detected": "检测到 Admin 模块 → 正在启动守护进程",
    "add_admin_hint": "请在构建器中添加 .with_admin(...) 以启用管理后台。",
    "daemon_error": "[守护进程] 错误:{}",
    "cargo_run_failed": "应用服务器启动失败(cargo run)",
    "file_not_found": "未找到文件:{}\\n请确保您在 Runique 项目的根目录下运行此命令。",
    "admin_not_found": "未找到 Admin 文件:{}\\n请使用 admin!{{}} 宏创建 src/admin.rs 文件。",
    "name_empty": "项目名称不能为空",
    "name_invalid": "项目名称只能包含字母、数字、下划线或连字符",
    "name_dash": "项目名称不能以连字符开头",
    "folder_exists": "文件夹 '{}' 已存在",
    "cargo_run_expect": "启动 cargo run 失败",
    "project_created": "项目 '{}' 创建成功!",
    "getting_started": "开始使用:",
    "cd_hint": "cd {}",
    "cargo_run_hint": "cargo run"
  },
  "daemon": {
    "modification_detected": "检测到文件变更 → 正在重新生成……",
    "unable_read": "无法读取:{}",
    "parse_error": "解析错误:{}",
    "no_resource": "admin!{{}} 中未定义任何资源 — 无需生成",
    "with_admin_disabled": "with_admin 已禁用 → 守护进程已停止",
    "operational": "守护进程运行中 → src/admin/generated.rs",
    "generation_error": "生成代码时出错:{}",
    "watcher_error": "文件监视器出错:{}",
    "unable_create": "无法创建文件监视器:{}",
    "unable_watch": "无法监视 {}:{}"
  },
  "macro": {
    "named_fields_only": "仅支持具名字段的结构体",
    "structs_only": "仅适用于结构体",
    "forms_field_required": "结构体 '{}' 必须包含 'Forms' 字段",
    "field_no_name": "字段缺少名称",
    "model_form_named_only": "DeriveModelForm:仅支持具名字段的结构体",
    "model_form_structs_only": "DeriveModelForm:仅适用于结构体"
  },
  "parser": {
    "string_expected": "应为字符串字面量,实际得到:{}",
    "string_eof": "应为字符串字面量,但已到达文件末尾",
    "array_expected": "权限列表应为 [...] 格式,实际得到:{}",
    "array_eof": "权限列表应为 [...] 格式,但已到达文件末尾",
    "role_required": "permissions: [...] 中至少需要指定一个角色",
    "punct_expected": "应为 '{}',实际得到:{}",
    "punct_eof": "应为 '{}',但已到达文件末尾",
    "title_required": "admin!: 'title' 是必填项",
    "permissions_required": "admin!: 'permissions' 是必填项",
    "list_display_exclude_exclusive": "admin!: 'list_display' 和 'list_exclude' 互斥"
  },
  "TemplateMessage": {
    "debug_info_title": "调试信息",
    "debug_field_title": "标题",
    "debug_field_count": "字段数量",
    "debug_error_count": "错误数量",
    "debug_main_message": "主要信息",
    "debug_root_cause": "根本原因",
    "debug_details": "附加详情",
    "debug_request_info": "请求信息",
    "debug_http_method": "HTTP 方法",
    "debug_path": "路径",
    "debug_query_params": "查询参数",
    "debug_http_headers": "HTTP 请求头",
    "debug_template_info": "模板信息",
    "debug_template_name": "模板名称",
    "debug_error_line": "错误行号",
    "debug_template_source": "模板源代码",
    "debug_available_templates": "可用模板",
    "debug_stack_trace_title": "详细错误追踪",
    "debug_stack_trace_tip": "最顶层的错误(层级 0)通常是根本原因。后续错误显示错误在代码中的传播路径。",
    "debug_environment": "环境",
    "debug_debug_mode": "调试模式",
    "debug_enabled": "已启用",
    "debug_disabled": "已禁用",
    "debug_rust_version": "Rust 版本",
    "debug_app_version": "应用版本",
    "debug_status_code": "状态码",
    "debug_header_name": "名称",
    "debug_header_value": "值"
  },
  "admin": {
    "group": "组",
    "groups": "组",
    "resource": "资源",
    "resources": "资源",
    "can_create": "创建",
    "can_read": "读取",
    "can_update": "修改",
    "can_delete": "删除",
    "can_update_own": "修改",
    "can_delete_own": "删除",
    "name": "名称",
    "username": "用户名",
    "email": "电子邮箱",
    "staff": "工作人员",
    "superuser": "超级用户",
    "active": "激活",
    "user": {
      "username_too_short": "用户名太短(最少3个字符)",
      "invalid_email": "邮箱地址格式不正确"
    },

    "login": {
      "title": "登录",
      "subtitle": "请登录以访问管理面板",
      "label_username": "用户名",
      "label_password": "密码",
      "btn_submit": "登录",
      "error_session": "打开会话时出错。",
      "error_credentials": "凭据不正确或权限不足。",
      "error_locked": "尝试次数过多。账户已被临时锁定。请在{}秒后重试。"
    },
    "logout": {
      "success": "已成功登出。"
    },
    "access": {
      "no_auth_handler": "未配置身份验证处理程序。请在AdminConfig上调用.auth(MyAuth)。",
      "insufficient_rights": "访问管理权限不足"
    },
    "dashboard": {
      "title": "仪表板",
      "subtitle": "应用程序概览",
      "card_resources": "资源",
      "th_resource": "资源",
      "th_key": "键",
      "th_permissions": "权限",
      "th_actions": "操作",
      "btn_list": "列表",
      "btn_create": "创建",
      "empty_title": "未注册资源",
      "empty_desc": "在src/admin.rs中使用admin!{{}}宏声明您的资源,然后运行runique start"
    },
    "list": {
      "breadcrumb_admin": "管理",
      "entries_count_one": "条目",
      "entries_count_many": "条目",
      "btn_create": "创建",
      "th_id": "id",
      "th_actions": "操作",
      "bool_true": "是",
      "bool_false": "否",
      "btn_detail": "详情",
      "btn_edit": "编辑",
      "btn_delete": "删除",
      "confirm_delete": "确定要删除吗?",
      "empty_title": "无条目",
      "empty_desc": "请先创建一个项目。",
      "btn_create_first": "创建第一个",
      "search_placeholder": "搜索..."
    },
    "create": {
      "title": "创建",
      "breadcrumb": "创建",
      "card_info": "信息",
      "no_fields": "当前没有可用字段。",
      "btn_cancel": "取消",
      "btn_submit": "创建",
      "success": "条目创建成功!"
    },
    "edit": {
      "title": "编辑",
      "breadcrumb": "编辑",
      "card_info": "信息",
      "no_fields": "当前没有可用字段。",
      "btn_cancel": "取消",
      "btn_submit": "保存",
      "success": "条目更新成功!"
    },
    "detail": {
      "title": "详情",
      "breadcrumb": "详情",
      "entry_label": "条目",
      "btn_list": "← 列表",
      "btn_edit": "编辑",
      "btn_delete": "删除",
      "confirm_delete": "删除此条目?"
    },
    "reset_password": {
      "btn": "重置密码",
      "success_email": "Reset link sent to {}.",
      "success_link": "Reset link (mailer not configured): {}",
      "error_no_email": "No email field found for this user.",
      "error_send": "Error sending email: {}",
      "email_subject": "重置您的密码",
      "email_title": "密码重置",
      "email_greeting": "您好,",
      "email_body": "请点击下方链接重置您的密码(有效期1小时):",
      "email_btn": "重置我的密码",
      "email_ignore": "如果您没有请求此重置,请忽略此消息。"
    },
    "user_created": {
      "email_subject": "欢迎 — 请设置您的密码",
      "email_sent": "欢迎邮件已发送至 {}。",
      "email_greeting": "欢迎,",
      "email_body": "已为您创建账户。请点击下方链接设置您的密码:",
      "email_btn": "设置我的密码",
      "email_validity": "此链接有效期为1小时。如果您未期待此消息,请忽略。"
    },
    "delete": {
      "title": "删除",
      "breadcrumb": "删除",
      "heading": "确认删除",
      "btn_cancel": "← 取消",
      "btn_confirm": "是,永久删除",
      "warning": {
        "title": "警告!",
        "desc": "您即将删除条目",
        "of": "来自资源",
        "irreversible": "此操作不可撤销。"
      },
      "success": "条目删除成功!",
      "not_found": "资源未找到。"
    },
    "bulk": {
      "no_selection": "未选择任何项目。",
      "no_field_selected": "未修改任何字段。",
      "delete_success": "个项目已删除。",
      "update_success": "个项目已更新。"
    },
    "base": {
      "title": "管理",
      "breadcrumb": "管理",
      "toggle": "收起菜单",
      "logout_title": "登出"
    },
    "superuser_wizard": {
      "title": "=== 创建超级用户 ===",
      "algo_prompt": "[1/5] 哈希算法",
      "algo_argon2": "Argon2(推荐)",
      "algo_bcrypt": "Bcrypt",
      "algo_scrypt": "Scrypt",
      "algo_custom": "自定义提供者",
      "provider_path": "提供者路径",
      "invalid_path": "无效路径。",
      "username_prompt": "[2/5] 用户名",
      "username_empty": "用户名不能为空。",
      "username_taken": "该用户名已被使用。",
      "email_prompt": "[3/5] 邮箱",
      "email_invalid": "无效的邮箱地址。",
      "email_taken": "该邮箱已被使用。",
      "password_prompt": "[4/5] 密码",
      "password_too_short": "密码至少需要10个字符。",
      "confirm_prompt": "[5/5] 确认密码",
      "password_mismatch": "密码不匹配,请重试。",
      "review_algo": "  算法   : {}",
      "review_username": "  用户名 : {}",
      "review_email": "  邮箱   : {}",
      "review_password": "  密码   : ••••••••",
      "review_action": "操作",
      "confirm_create": "确认并创建",
      "change_algo": "更改算法",
      "modify_password": "修改密码",
      "success": "✓ 超级用户创建成功!",
      "id_line": "  ID     : {}",
      "username_line": "  用户名 : {}",
      "email_line": "  邮箱   : {}"
    },
    "builtin": {
      "invalid_id": "无效的标识符。",
      "droit_resource_required": "请至少选择一个资源。",
      "droit_exists": "权限 \"{}\" 已存在。",
      "groupe_exists": "名为 \"{}\" 的组已存在。",
      "user_username_exists": "用户名「{}」已被占用。",
      "user_email_exists": "邮箱「{}」已被注册。"
    }
  },
  "makemigrations": {
    "scanning": "正在扫描'{}'中的实体...",
    "found_schema": "-> 找到架构: {}",
    "found_extend": "-> 找到框架表扩展: {}",
    "no_schema": "在'{}'中未找到schema()函数。",
    "schema_count": "找到{}个架构。",
    "updated_lib": "已更新{}",
    "no_changes": "未检测到更改。您的架构是最新的。",
    "destructive_detected": "检测到破坏性更改:",
    "destructive_require_force": "使用 --force 应用这些破坏性更改。",
    "generated": "已生成: {}",
    "snapshot_updated": "已更新快照: {}",
    "seaorm_alter": "已生成SeaORM ALTER迁移: {}",
    "batch_up": "已生成批量上升: {}",
    "batch_down": "已生成批量下降: {}",
    "apply_hint": "运行'sea-orm-cli migrate up'来应用。",
    "extend_unknown_table": "extend!{{}} : \"{}\"不是已知的框架表。允许的表: {}。要扩展应用表,请直接修改其model!{{}}。",
    "extend_invalid_syntax": "extend!{{}} : 语法无效。预期格式: table: \"表名\", fields: {{ ... }}",
    "admin_positioned": "AdminTableMigration已定位在'{}'迁移之后",
    "files_ready": "{}个文件已准备好迁移。"
  },
  "migrate": {
    "applying": "正在从'{}'应用迁移...",
    "run_hint": "运行: sea-orm-cli migrate up",
    "complete_up": "迁移完成。",
    "complete": "回滚完成。",
    "available_for": "'{}'的可用回滚文件:",
    "rolling_back_batch": "正在回滚批次: {}",
    "done": "完成: {}",
    "rolling_back": "正在回滚: {}",
    "no_applied_dir": "未找到applied/目录。",
    "by_time_header": "by_time (完整批次):",
    "none_available": "没有可用的回滚文件。",
    "usage": "用法:",
    "usage_files": "runique migration down --files <table/timestamp> [<table/timestamp> ...]",
    "usage_batch": "runique migration down --batch <timestamp>",
    "no_down": "未找到down语句。",
    "executing": "正在执行: {}"
  },
  "reset": {
    "forgot_title": "忘记密码",
    "reset_title": "新密码",
    "success_title": "密码已重置",
    "email_label": "电子邮件地址",
    "new_password_label": "新密码",
    "confirm_label": "确认密码",
    "email_mismatch": "电子邮件地址与链接不匹配。",
    "invalid_link": "无效链接。",
    "invalid_or_expired": "重置链接无效或已过期。",
    "password_min_length": "密码必须至少包含{}个字符。",
    "password_mismatch": "两次输入的密码不一致。",
    "check_inbox": "如果此地址与帐户关联,您将收到一封重置邮件。",
    "email_subject": "密码重置请求",
    "email_body": "<p>您好 {},</p><p>请点击以下链接重置您的密码(有效期1小时):</p><p><a href=\"{}\">{}</a></p>"
  },
  "permission": {
    "col.id": "ID",
    "col.can_create": "创建",
    "col.can_delete": "删除",
    "col.can_delete_own": "删除(自己的)",
    "col.can_read": "读取",
    "col.can_update": "修改",
    "col.can_update_own": "修改(自己的)",
    "col.groupes": "组",
    "col.resource_key": "资源",
    "col.actions": "操作"
  }
}