Skip to content

Commit 75f3892

Browse files
committed
fix(i18n): use static count defaults
1 parent 1e54d9f commit 75f3892

6 files changed

Lines changed: 508 additions & 532 deletions

File tree

src/components/Cards/CardsBatchBar.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export const CardsBatchBar: React.FC<CardsBatchBarProps> = ({
7979
snackbar.success(
8080
t("components.Toolbar.Batch.deleteSuccess", {
8181
count: selectedCount,
82-
defaultValue: `已删除 ${selectedCount} 个游戏`,
82+
defaultValue: "已删除 {{count}} 个游戏",
8383
}),
8484
);
8585
} catch (error) {
@@ -99,7 +99,7 @@ export const CardsBatchBar: React.FC<CardsBatchBarProps> = ({
9999
snackbar.success(
100100
t("components.Toolbar.Batch.removeFromCategorySuccess", {
101101
count: selectedCount,
102-
defaultValue: `已从当前分类移除 ${selectedCount} 个游戏`,
102+
defaultValue: "已从当前分类移除 {{count}} 个游戏",
103103
}),
104104
);
105105
} catch (error) {
@@ -151,7 +151,7 @@ export const CardsBatchBar: React.FC<CardsBatchBarProps> = ({
151151
<Typography variant="body2" color="text.secondary">
152152
{t("components.Toolbar.Batch.selectedCount", {
153153
count: selectedCount,
154-
defaultValue: `已选 ${selectedCount}`,
154+
defaultValue: "已选 {{count}}",
155155
})}
156156
</Typography>
157157
</>
@@ -215,7 +215,7 @@ export const CardsBatchBar: React.FC<CardsBatchBarProps> = ({
215215
title={t("components.Toolbar.Batch.deleteTitle", "批量删除游戏")}
216216
message={t("components.Toolbar.Batch.deleteMessage", {
217217
count: selectedCount,
218-
defaultValue: `确定要删除选中的 ${selectedCount} 个游戏吗?此操作无法撤销。`,
218+
defaultValue: "确定要删除选中的 {{count}} 个游戏吗?此操作无法撤销。",
219219
})}
220220
/>
221221

src/components/Collection/CollectionPickerDialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export function CollectionPickerDialog({
119119
snackbar.success(
120120
t("components.CollectionPicker.addSuccess", {
121121
count: gameIds.length,
122-
defaultValue: `已添加 ${gameIds.length} 个游戏到收藏夹`,
122+
defaultValue: "已添加 {{count}} 个游戏到收藏夹",
123123
}),
124124
);
125125
} else if (manageGameId) {
@@ -226,7 +226,7 @@ export function CollectionPickerDialog({
226226
primary={category.name}
227227
secondary={t("components.CollectionPicker.gameCount", {
228228
count: category.game_count,
229-
defaultValue: `${category.game_count} 个游戏`,
229+
defaultValue: "{{count}} 个游戏",
230230
})}
231231
/>
232232
</ListItemButton>

0 commit comments

Comments
 (0)