fix(picker): 仅本地化安卓总相册名称
This commit is contained in:
@@ -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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user