feat(i18n): full i18n for all pages + sidebar lang switcher + zh-TW locale

- All pages now use t() for internationalization
- Sidebar footer: searchable upward dropdown language switcher
- Generated zh-TW.json (Traditional Chinese) via gen-locales.cjs
- CSS for lang switcher with mobile/collapsed sidebar support
- Removed language toggle from settings page
This commit is contained in:
晴天
2026-03-24 18:51:36 +08:00
parent 0c062e93e0
commit f8af3bea4a
27 changed files with 8565 additions and 2149 deletions

View File

@@ -797,11 +797,11 @@ fn clean_cli_output(text: &str) -> String {
let start_idx = lines.iter().position(|l| !l.trim().is_empty()).unwrap_or(0);
let relevant_lines = &lines[start_idx..];
// 6. Find the first line that starts JSON (fast path)
for line in relevant_lines {
// 6. Find the first line that starts JSON and return from there to end
for (i, line) in relevant_lines.iter().enumerate() {
let trimmed = line.trim();
if trimmed.starts_with('{') || trimmed.starts_with('[') {
return trimmed.to_string();
return relevant_lines[i..].join("\n");
}
}