Timeline: the tooltip hint is translated (Part of #4370) (#4398)

* claim: #4370

* Timeline: the tooltip hint is translated (Part of #4370)
This commit is contained in:
raykholo
2026-10-24 22:12:28 +00:00
committed by GitHub
parent dbdeeec2e9
commit 88f079bd8c
7 changed files with 23 additions and 1 deletions
+1
View File
@@ -1362,6 +1362,7 @@
"thread.designation": "Bezeichnung",
"thread.iso_metric": "ISO metrisch",
"thread.select_size": "Größe wählen",
"timeline.feature_hint": "Doppelklicken zum Bearbeiten · Ziehen zum Neuordnen · Rechtsklicken für weitere Optionen",
"timeline.group": "Neuen Merkmalsordner anlegen",
"timeline.move_many": "Zeitleistenelemente verschieben",
"timeline.move_to_group": "Merkmale in Ordner verschieben",
+1
View File
@@ -2107,6 +2107,7 @@
"timeline.delete_after_marker_one": "Delete 1 Feature After History Marker",
"timeline.delete_after_marker_other": "Delete {count} Features After History Marker",
"timeline.delete_many": "Delete {count} Selected Features",
"timeline.feature_hint": "Double-click to edit · drag to reorder · right-click for more",
"timeline.group": "New Feature Folder",
"timeline.move_many": "Move Timeline Items",
"timeline.move_to_group": "Move Features to Folder",
+1
View File
@@ -2107,6 +2107,7 @@
"timeline.delete_after_marker_one": "履歴マーカー以降の 1 個のフィーチャーを削除",
"timeline.delete_after_marker_other": "履歴マーカー以降の {count} 個のフィーチャーを削除",
"timeline.delete_many": "選択した {count} 個のフィーチャーを削除",
"timeline.feature_hint": "ダブルクリックで編集 · ドラッグで並べ替え · 右クリックでその他の操作",
"timeline.group": "フィーチャーフォルダを新規作成",
"timeline.move_many": "タイムライン項目を移動",
"timeline.move_to_group": "フィーチャーをフォルダへ移動",
+1
View File
@@ -1529,6 +1529,7 @@
"thread.designation": "호칭",
"thread.iso_metric": "ISO 미터",
"thread.select_size": "크기 선택",
"timeline.feature_hint": "두 번 클릭하여 편집 · 드래그하여 순서 변경 · 마우스 오른쪽 버튼을 클릭하여 더 보기",
"timeline.group": "새 특성 폴더",
"timeline.move_many": "타임라인 항목 이동",
"timeline.move_to_group": "특성을 폴더로 이동",
+1
View File
@@ -2107,6 +2107,7 @@
"timeline.delete_after_marker_one": "删除历史标记之后的 1 个特征",
"timeline.delete_after_marker_other": "删除历史标记之后的 {count} 个特征",
"timeline.delete_many": "删除所选的 {count} 个特征",
"timeline.feature_hint": "双击编辑 · 拖动以重新排序 · 右键查看更多操作",
"timeline.group": "新建特征文件夹",
"timeline.move_many": "移动时间线项目",
"timeline.move_to_group": "将特征移至文件夹",
+16
View File
@@ -283,6 +283,22 @@ mod tests {
assert_eq!(alias.label("original unknown caption"), "original unknown caption");
}
#[test]
fn timeline_feature_hint_comes_from_the_catalog() {
let id = "timeline.feature_hint";
let english = "Double-click to edit · drag to reorder · right-click for more";
assert_eq!(ENGLISH.messages().get(id).map(String::as_str), Some(english));
for language in ["en", "ja", "zh", "de", "ko", "es"] {
let _scope = scope(language);
let hint = tr(id);
assert_eq!(hint, Locale::for_language(language).text(id));
assert_ne!(hint, id);
if ["ja", "zh", "de", "ko"].contains(&language) {
assert_ne!(hint, english, "{language}: the hint must be translated");
}
}
}
/// English first, then by id, so adding a locale edits only its own line.
#[test]
fn locales_are_listed_english_first_then_by_id() {
+2 -1
View File
@@ -470,7 +470,8 @@ fn timeline_contents(app: &mut SolveApp, ui: &mut egui::Ui, floating: bool) {
if let Some(r) = res {
tip += &format!("\n{:.1} ms", r.ms);
}
tip += "\nDouble-click to edit · drag to reorder · right-click for more";
tip.push('\n');
tip.push_str(crate::i18n::tr("timeline.feature_hint"));
if resp.drag_started() {
drag = Some(Drag::Feature(*id));
}