feat: 中文化 django-admin 分组与表名 (T-602 层1-3)

- 5 个 app 加 AppConfig.verbose_name(中文分组名)
- 11 个模型加 Meta.verbose_name/verbose_name_plural(中文表名)
- 3 条 AlterModelOptions 迁移(仅 options,无 DB schema 变更)
- LANGUAGE_CODE=zh-hans / USE_I18N=True 已在,Django 自带 admin 与 auth 已中文
- 仅显示层,不改字段名/逻辑/表结构

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
QiuSW
2026-07-04 15:18:16 +08:00
co-authored by Claude Opus 4.8
parent 521b1434b6
commit 4aceb3ae25
11 changed files with 110 additions and 0 deletions
+1
View File
@@ -4,3 +4,4 @@ from django.apps import AppConfig
class BillingConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'apps.billing'
verbose_name = '计费与充值'
@@ -0,0 +1,33 @@
# Generated by Django 5.2.15 on 2026-07-04 07:08
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('billing', '0004_rechargeorder_and_more'),
]
operations = [
migrations.AlterModelOptions(
name='callrecord',
options={'ordering': ('-created_at', '-id'), 'verbose_name': '调用记录', 'verbose_name_plural': '调用记录'},
),
migrations.AlterModelOptions(
name='exchangerate',
options={'ordering': ('-effective_from', '-id'), 'verbose_name': '汇率', 'verbose_name_plural': '汇率'},
),
migrations.AlterModelOptions(
name='pointsledger',
options={'ordering': ('-created_at', '-id'), 'verbose_name': '点数流水', 'verbose_name_plural': '点数流水'},
),
migrations.AlterModelOptions(
name='pricingrule',
options={'ordering': ('operation_type', 'alias', 'resolution'), 'verbose_name': '计费规则', 'verbose_name_plural': '计费规则'},
),
migrations.AlterModelOptions(
name='rechargeorder',
options={'ordering': ('-created_at', '-id'), 'verbose_name': '充值订单', 'verbose_name_plural': '充值订单'},
),
]
+10
View File
@@ -52,6 +52,8 @@ class CallRecord(models.Model):
class Meta:
db_table = "call_record"
verbose_name = "调用记录"
verbose_name_plural = "调用记录"
ordering = ("-created_at", "-id")
constraints = [
models.CheckConstraint(
@@ -86,6 +88,8 @@ class PricingRule(models.Model):
class Meta:
db_table = "pricing_rule"
verbose_name = "计费规则"
verbose_name_plural = "计费规则"
ordering = ("operation_type", "alias", "resolution")
constraints = [
models.UniqueConstraint(
@@ -129,6 +133,8 @@ class ExchangeRate(models.Model):
class Meta:
db_table = "exchange_rate"
verbose_name = "汇率"
verbose_name_plural = "汇率"
ordering = ("-effective_from", "-id")
constraints = [
models.CheckConstraint(
@@ -190,6 +196,8 @@ class RechargeOrder(models.Model):
class Meta:
db_table = "recharge_order"
verbose_name = "充值订单"
verbose_name_plural = "充值订单"
ordering = ("-created_at", "-id")
constraints = [
models.CheckConstraint(
@@ -256,6 +264,8 @@ class PointsLedger(models.Model):
class Meta:
db_table = "points_ledger"
verbose_name = "点数流水"
verbose_name_plural = "点数流水"
ordering = ("-created_at", "-id")
constraints = [
models.CheckConstraint(