test(presenter)+fix(i18n): 淘汰策略与共享缓存解耦;注释里的 ASCII 引号
- prune() 抽成独立函数:全局缓存被所有用例共享,谁往里面灌 240+ 条都会顺手清掉 别的用例刚缓存的键(实测:并行跑时 the_second_identical_refresh_... 假红)。淘汰 策略改在本地 Cache 上测,两条判据各自确定; - clippy -D warnings:from_ref 代替 &[x.clone()]; - model.rs 注释里的 "原因 + OS 原文" 用 ASCII 引号 → 页面字面量白名单守门报红,改 中文引号;core/events 的三处文档失真登记为 TowerFinding(scope 外); - 出处文案口径:TooLarge 的 detail 只留数字(presenter 不产人读文案)。
This commit is contained in:
1 parent
0b6b8f0a62
commit
dd9962e610
11 files changed
+127
-64
No files matched your search
@@ -143,7 +143,12 @@ impl Texts {
|
||||
self.0.render(Key::InstancesSavesDeleted, &[("dir", dir)])
|
||||
}
|
||||
/// 备份成功的回执:`已把 A 备份到 D:/…/A-…zip(1.2 MiB)。`
|
||||
pub(in crate::pages::instances) fn saves_backed_up(self, dir: &str, path: &str, size: &str) -> String {
|
||||
pub(in crate::pages::instances) fn saves_backed_up(
|
||||
self,
|
||||
dir: &str,
|
||||
path: &str,
|
||||
size: &str,
|
||||
) -> String {
|
||||
self.0.render(
|
||||
Key::InstancesSavesBackedUp,
|
||||
&[("dir", dir), ("path", path), ("size", size)],
|
||||
@@ -157,21 +162,33 @@ impl Texts {
|
||||
)
|
||||
}
|
||||
/// 重命名失败的主句:`重命名 A 失败:同名世界已存在`。
|
||||
pub(in crate::pages::instances) fn saves_rename_failed(self, file: &str, reason: &str) -> String {
|
||||
pub(in crate::pages::instances) fn saves_rename_failed(
|
||||
self,
|
||||
file: &str,
|
||||
reason: &str,
|
||||
) -> String {
|
||||
self.0.render(
|
||||
Key::InstancesSavesRenameFailed,
|
||||
&[("file", file), ("reason", reason)],
|
||||
)
|
||||
}
|
||||
/// 删除失败的主句。
|
||||
pub(in crate::pages::instances) fn saves_delete_failed(self, file: &str, reason: &str) -> String {
|
||||
pub(in crate::pages::instances) fn saves_delete_failed(
|
||||
self,
|
||||
file: &str,
|
||||
reason: &str,
|
||||
) -> String {
|
||||
self.0.render(
|
||||
Key::InstancesSavesDeleteFailed,
|
||||
&[("file", file), ("reason", reason)],
|
||||
)
|
||||
}
|
||||
/// 备份失败的主句。
|
||||
pub(in crate::pages::instances) fn saves_backup_failed(self, file: &str, reason: &str) -> String {
|
||||
pub(in crate::pages::instances) fn saves_backup_failed(
|
||||
self,
|
||||
file: &str,
|
||||
reason: &str,
|
||||
) -> String {
|
||||
self.0.render(
|
||||
Key::InstancesSavesBackupFailed,
|
||||
&[("file", file), ("reason", reason)],
|
||||
@@ -179,7 +196,10 @@ impl Texts {
|
||||
}
|
||||
// ------------------------------------------------- 截图缩略图(M251 · SAVESHOTS)
|
||||
/// 「这一格为什么没有图」的短句(`未生成预览` / 太大 / 读不出 / 解不出)。
|
||||
pub(in crate::pages::instances) fn saves_preview_reason(self, kind: ScreenshotThumbKind) -> &'static str {
|
||||
pub(in crate::pages::instances) fn saves_preview_reason(
|
||||
self,
|
||||
kind: ScreenshotThumbKind,
|
||||
) -> &'static str {
|
||||
self.text(match kind {
|
||||
ScreenshotThumbKind::TooLarge => Key::InstancesSavesPreviewTooLarge,
|
||||
ScreenshotThumbKind::Unreadable => Key::InstancesSavesPreviewUnreadable,
|
||||
|
||||
Reference in new issue
Block a user