fix(picker): 仅本地化安卓总相册名称

This commit is contained in:
2026-07-06 16:37:06 +08:00
parent cf2826c1cf
commit 6e1b5c2de0
+2 -18
View File
@@ -8,25 +8,9 @@ abstract final class AssetPickerLocalization {
) { ) {
final Locale locale = Localizations.maybeLocaleOf(context) ?? final Locale locale = Localizations.maybeLocaleOf(context) ??
WidgetsBinding.instance.platformDispatcher.locale; WidgetsBinding.instance.platformDispatcher.locale;
if (locale.languageCode.toLowerCase() != 'zh') { if (locale.languageCode.toLowerCase() == 'zh' && path.isAll) {
return path.name;
}
if (path.isAll) {
return '最近项目'; return '最近项目';
} }
return path.name;
const Map<String, String> systemPathNames = <String, String>{
'recent': '最近项目',
'recents': '最近项目',
'camera': '相机',
'camera roll': '相机',
'screenshot': '截屏',
'screenshots': '截屏',
'download': '下载',
'downloads': '下载',
'pictures': '图片',
'movies': '视频',
};
return systemPathNames[path.name.trim().toLowerCase()] ?? path.name;
} }
} }