Skip to content

Commit 8d4412e

Browse files
author
Aegis Stack
committed
Korean Support
1 parent a2b08bb commit 8d4412e

14 files changed

Lines changed: 4453 additions & 11 deletions

File tree

aegis/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def main(
6565
lang: str | None = typer.Option(
6666
None,
6767
"--lang",
68-
help="Output language (en, zh). Default: auto-detect from AEGIS_LANG or system locale",
68+
help="Output language (en, ko, zh). Default: auto-detect from AEGIS_LANG or system locale",
6969
envvar="AEGIS_LANG",
7070
),
7171
) -> None:

aegis/core/copier_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"""
88

99
from pathlib import Path
10-
from typing import Any
10+
from typing import Any, Literal
1111

1212
import typer
1313
import yaml
@@ -457,7 +457,7 @@ def load_copier_answers(project_path: Path) -> dict[str, Any]:
457457
def update_with_copier(
458458
project_path: Path,
459459
additional_data: dict[str, Any] | None = None,
460-
conflict_mode: str = "rej",
460+
conflict_mode: Literal["inline", "rej"] = "rej",
461461
) -> None:
462462
"""
463463
Update an existing Copier-generated project with new data.

aegis/core/copier_updater.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ def update_with_copier_native(
121121
# We must edit the file directly, then Copier detects the change and regenerates
122122
answers = load_copier_answers(project_path)
123123
answers.update(update_data)
124+
# Point _src_path to the template root (copier 9.14+ reads src from answers)
125+
answers["_src_path"] = f"git+file://{template_root}"
124126

125127
# Save updated answers
126128
import yaml
@@ -163,9 +165,9 @@ def update_with_copier_native(
163165
# 5. Use git diff to merge changes
164166
# 6. Handle conflicts with .rej files or inline markers
165167
# NOTE: _tasks removed from copier.yml - we run them ourselves below
168+
# copier 9.14+ reads _src_path from .copier-answers.yml (set above)
166169
run_update(
167170
dst_path=str(project_path),
168-
src_path=str(template_root), # Point to repo root, not subdirectory
169171
defaults=True, # Use existing answers as defaults
170172
overwrite=True, # Allow overwriting files
171173
conflict="rej", # Create .rej files for conflicts

aegis/i18n/locales/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Available locales for Aegis Stack CLI."""
22

3-
AVAILABLE_LOCALES: set[str] = {"en", "zh"}
3+
AVAILABLE_LOCALES: set[str] = {"en", "ko", "zh"}

aegis/i18n/locales/ko.py

Lines changed: 731 additions & 0 deletions
Large diffs are not rendered by default.

aegis/i18n/registry.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ def _load_locale(locale: str) -> None:
6565
from .locales.zh import MESSAGES
6666

6767
_messages["zh"] = MESSAGES
68+
elif locale == "ko":
69+
from .locales.ko import MESSAGES
70+
71+
_messages["ko"] = MESSAGES
6872

6973
# Always ensure English is available as fallback
7074
if "en" not in _messages:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Available locales for the project CLI."""
22

3-
AVAILABLE_LOCALES: set[str] = {"en", "zh"}
3+
AVAILABLE_LOCALES: set[str] = {"en", "ko", "zh"}

aegis/templates/copier-aegis-project/{{ project_slug }}/app/i18n/locales/en.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"main.unsupported_lang": "Unsupported language '{lang}'. Available: {available}",
1414
# Help text
1515
"main.help": "Project management CLI",
16-
"main.opt_lang": "Output language (en, zh). Default: auto-detect",
16+
"main.opt_lang": "Output language (en, ko, zh). Default: auto-detect",
1717
# ── Health ────────────────────────────────────────────────────────
1818
"health.count_healthy": "{count} healthy",
1919
"health.count_warning": "{count} warning",

aegis/templates/copier-aegis-project/{{ project_slug }}/app/i18n/locales/ko.py

Lines changed: 935 additions & 0 deletions
Large diffs are not rendered by default.

aegis/templates/copier-aegis-project/{{ project_slug }}/app/i18n/locales/zh.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"main.unsupported_lang": "不支持的语言 '{lang}'。可用语言:{available}",
1414
# 帮助文本
1515
"main.help": "项目命令行工具",
16-
"main.opt_lang": "输出语言(en、zh),默认自动检测系统语言",
16+
"main.opt_lang": "输出语言(en、ko、zh),默认自动检测系统语言",
1717
# ── 健康检查 ──────────────────────────────────────────────────────
1818
"health.count_healthy": "{count} 个正常",
1919
"health.count_warning": "{count} 个警告",

0 commit comments

Comments
 (0)