Skip to content

Commit 40a3285

Browse files
committed
fix(i18n): Use correct placeholder syntax for rust-i18n
1 parent 0e68801 commit 40a3285

2 files changed

Lines changed: 34 additions & 34 deletions

File tree

locales/en.yaml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ dialog:
6363
delete: "Delete"
6464
file: "file"
6565
folder: "folder"
66-
location: "Location: {path}"
67-
delete_confirm: "Are you sure you want to delete this {item_type}?"
66+
location: "Location: %{path}"
67+
delete_confirm: "Are you sure you want to delete this %{item_type}?"
6868
# Go to Line dialog
6969
go_to_line:
7070
title: "Go to Line"
7171
enter_line: "Enter line number:"
7272
go: "Go"
73-
range: "Range: 1-{max}"
73+
range: "Range: 1-%{max}"
7474

7575
# Settings panel
7676
settings:
@@ -176,9 +176,9 @@ settings:
176176
recent_files: "Recent Files"
177177
clear_recent: "Clear Recent Files"
178178
clear_recent_tooltip: "Remove all files from the recent files list"
179-
seconds: "{count} seconds"
180-
remember_files: "Remember last {count} files"
181-
files_count: "{count} files"
179+
seconds: "%{count} seconds"
180+
remember_files: "Remember last %{count} files"
181+
files_count: "%{count} files"
182182
appearance:
183183
title: "Appearance"
184184
language: "Language"
@@ -297,7 +297,7 @@ about:
297297
license: "License"
298298
license_type: "MIT License"
299299
copyright: "© 2026 Ferrite Contributors"
300-
version: "Version {version}"
300+
version: "Version %{version}"
301301

302302
# Keyboard shortcuts
303303
shortcuts:
@@ -438,7 +438,7 @@ tree_viewer:
438438
copy_path: "📋 Copy Path"
439439
show_raw: "Show Raw"
440440
parse_error: "⚠ Parse Error:"
441-
large_file_warning: "File is large ({size} MB). Showing raw content."
441+
large_file_warning: "File is large (%{size} MB). Showing raw content."
442442

443443
# Git integration
444444
git:
@@ -465,7 +465,7 @@ recovery:
465465
restore_question: "Would you like to restore the auto-saved content?"
466466
restore: "Restore"
467467
discard: "Discard"
468-
time_label: "Last modified: {time}"
468+
time_label: "Last modified: %{time}"
469469
session:
470470
title: "Session Recovery"
471471
crash_detected: "Ferrite detected that your previous session was not closed properly."
@@ -496,7 +496,7 @@ widgets:
496496
align_center: "Center aligned"
497497
align_right: "Right aligned"
498498
delete_column_label: "Delete column:"
499-
delete_column: "Delete column {index}"
499+
delete_column: "Delete column %{index}"
500500
align_label: "Align:"
501501
align_none: "No alignment"
502502
link:
@@ -516,7 +516,7 @@ csv:
516516
has_headers_yes: "✓ First row is header"
517517
has_headers_no: "✗ No header row"
518518
show_raw: "Show Raw"
519-
large_file_warning: "File is large ({size} MB). Showing raw content."
519+
large_file_warning: "File is large (%{size} MB). Showing raw content."
520520

521521
# Pipeline panel
522522
pipeline:
@@ -545,7 +545,7 @@ tab:
545545
mermaid:
546546
badge: "mermaid"
547547
empty: "(empty diagram)"
548-
rendering_error: "Rendering error: {error}"
548+
rendering_error: "Rendering error: %{error}"
549549

550550
# Table of Contents
551551

@@ -572,10 +572,10 @@ zen:
572572

573573
# Time relative strings
574574
time:
575-
seconds_ago: "{count} seconds ago"
576-
minutes_ago: "{count} minutes ago"
577-
hours_ago: "{count} hours ago"
578-
days_ago: "{count} days ago"
575+
seconds_ago: "%{count} seconds ago"
576+
minutes_ago: "%{count} minutes ago"
577+
hours_ago: "%{count} hours ago"
578+
days_ago: "%{count} days ago"
579579

580580
# Tooltips
581581
tooltip:
@@ -598,4 +598,4 @@ ribbon:
598598
copy_html_tooltip: "Copy rendered HTML to clipboard"
599599
export_pdf: "📄 Export as PDF"
600600
coming_soon: "Coming soon"
601-
heading_level: "Heading {level}"
601+
heading_level: "Heading %{level}"

locales/zh_Hans.yaml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ dialog:
6363
delete: "删除"
6464
file: "文件"
6565
folder: "文件夹"
66-
location: "位置:{path}"
67-
delete_confirm: "确定要删除此{item_type}吗?"
66+
location: "位置:%{path}"
67+
delete_confirm: "确定要删除此%{item_type}吗?"
6868
# Go to Line dialog
6969
go_to_line:
7070
title: "跳转到行"
7171
enter_line: "请输入行号:"
7272
go: "跳转"
73-
range: "范围:1-{max}"
73+
range: "范围:1-%{max}"
7474

7575
# Settings panel
7676
settings:
@@ -176,9 +176,9 @@ settings:
176176
recent_files: "最近文件"
177177
clear_recent: "清除最近文件"
178178
clear_recent_tooltip: "从最近文件列表中删除所有文件"
179-
seconds: "{count} 秒"
180-
remember_files: "记住最近 {count} 个文件"
181-
files_count: "{count} 个文件"
179+
seconds: "%{count} 秒"
180+
remember_files: "记住最近 %{count} 个文件"
181+
files_count: "%{count} 个文件"
182182
appearance:
183183
title: "界面"
184184
language: "语言"
@@ -297,7 +297,7 @@ about:
297297
license: "许可"
298298
license_type: "MIT 许可协议"
299299
copyright: "© 2026 Ferrite Contributors"
300-
version: "版本 {version}"
300+
version: "版本 %{version}"
301301

302302
# Keyboard shortcuts
303303
shortcuts:
@@ -438,7 +438,7 @@ tree_viewer:
438438
copy_path: "复制路径"
439439
show_raw: "显示原始"
440440
parse_error: "⚠ 解析错误:"
441-
large_file_warning: "文件较大({size} MB)。显示原始内容。"
441+
large_file_warning: "文件较大(%{size} MB)。显示原始内容。"
442442

443443
# Git integration
444444
git:
@@ -465,7 +465,7 @@ recovery:
465465
restore_question: "您想恢复自动保存的内容吗?"
466466
restore: "恢复"
467467
discard: "丢弃"
468-
time_label: "最后修改:{time}"
468+
time_label: "最后修改:%{time}"
469469
session:
470470
title: "恢复会话"
471471
crash_detected: "Ferrite 检测到您之前的会话未正确关闭。"
@@ -496,7 +496,7 @@ widgets:
496496
align_center: "居中对齐"
497497
align_right: "右对齐"
498498
delete_column_label: "删除列:"
499-
delete_column: "删除第 {index} 列"
499+
delete_column: "删除第 %{index} 列"
500500
align_label: "对齐:"
501501
align_none: "无对齐"
502502
link:
@@ -516,7 +516,7 @@ csv:
516516
has_headers_yes: "✓ 首行为标题"
517517
has_headers_no: "✗ 无标题行"
518518
show_raw: "显示原始"
519-
large_file_warning: "文件较大({size} MB)。显示原始内容。"
519+
large_file_warning: "文件较大(%{size} MB)。显示原始内容。"
520520

521521
# Pipeline panel
522522
pipeline:
@@ -545,7 +545,7 @@ tab:
545545
mermaid:
546546
badge: "mermaid"
547547
empty: "(空图表)"
548-
rendering_error: "渲染错误:{error}"
548+
rendering_error: "渲染错误:%{error}"
549549

550550
# Table of Contents
551551

@@ -572,10 +572,10 @@ zen:
572572

573573
# Time relative strings
574574
time:
575-
seconds_ago: "{count} 秒前"
576-
minutes_ago: "{count} 分钟前"
577-
hours_ago: "{count} 小时前"
578-
days_ago: "{count} 天前"
575+
seconds_ago: "%{count} 秒前"
576+
minutes_ago: "%{count} 分钟前"
577+
hours_ago: "%{count} 小时前"
578+
days_ago: "%{count} 天前"
579579

580580
# Tooltips
581581
tooltip:
@@ -598,4 +598,4 @@ ribbon:
598598
copy_html_tooltip: "复制渲染的 HTML 到剪贴板"
599599
export_pdf: "📄 导出为 PDF"
600600
coming_soon: "即将推出"
601-
heading_level: "标题 {level}"
601+
heading_level: "标题 %{level}"

0 commit comments

Comments
 (0)