1- import '../../generated/l10n.dart' ;
21import 'dart:io' ;
32
43import 'package:flutter/material.dart' ;
@@ -20,6 +19,7 @@ import '../../Widgets/BottomSheet/bottom_sheet_builder.dart';
2019import '../../Widgets/BottomSheet/input_bottom_sheet.dart' ;
2120import '../../Widgets/General/EasyRefresh/easy_refresh.dart' ;
2221import '../../Widgets/Item/item_builder.dart' ;
22+ import '../../generated/l10n.dart' ;
2323
2424class FavoriteFolderListScreen extends StatefulWidget {
2525 const FavoriteFolderListScreen ({super .key});
@@ -186,19 +186,19 @@ class _FavoriteFolderListScreenState extends State<FavoriteFolderListScreen>
186186 ),
187187 ),
188188 copyText: item.name ?? "" ,
189- toastText: "已复制收藏夹名称" ,
189+ toastText: S .current.haveCopiedFolderName ,
190190 ),
191191 const SizedBox (height: 10 ),
192192 ItemBuilder .buildCopyItem (context,
193193 child: Text (
194- "ID: ${ item .id }" ,
194+ S .current. folderId ( item.id. toString ()) ,
195195 style: Theme .of (context).textTheme.titleSmall,
196196 ),
197197 copyText: item.id.toString (),
198- toastText: "已复制收藏夹ID" ),
198+ toastText: S .current.haveCopiedFolderID ),
199199 const SizedBox (height: 10 ),
200200 Text (
201- "${item .postCount }篇 " ,
201+ "${item .postCount }${ S . current . chapter } " ,
202202 style: Theme .of (context).textTheme.titleSmall,
203203 ),
204204 ],
@@ -212,16 +212,16 @@ class _FavoriteFolderListScreenState extends State<FavoriteFolderListScreen>
212212 BottomSheetBuilder .showBottomSheet (
213213 context,
214214 (sheetContext) => InputBottomSheet (
215- buttonText: "确认" ,
216- title: "编辑收藏夹名称" ,
217- hint: "输入收藏夹名称" ,
215+ buttonText: S .current.confirm ,
216+ title: S .current.editFolderTitle ,
217+ hint: S .current.inputFolderTitle ,
218218 text: item.name ?? "" ,
219219 onConfirm: (text) {
220220 var tmp = item;
221221 tmp.name = text;
222222 UserApi .editFolder (folder: tmp).then ((value) {
223223 if (value['code' ] == 0 ) {
224- IToast .showTop ("编辑成功" );
224+ IToast .showTop (S .current.editSuccess );
225225 item.name = text;
226226 setState (() {});
227227 } else {
@@ -243,14 +243,15 @@ class _FavoriteFolderListScreenState extends State<FavoriteFolderListScreen>
243243 onTap: () {
244244 DialogBuilder .showConfirmDialog (
245245 context,
246- title: "删除收藏夹" ,
247- message: "确定删除收藏夹 ${item .name } ?删除后,其中的文章也将取消收藏" ,
246+ title: S .current.deleteFolder,
247+ message:
248+ S .current.deleteFolderMessage (item.name.toString ()),
248249 messageTextAlign: TextAlign .center,
249250 onTapConfirm: () async {
250251 UserApi .deleteFolder (folderId: item.id ?? 0 )
251252 .then ((value) {
252253 if (value['code' ] == 0 ) {
253- IToast .showTop ("删除成功" );
254+ IToast .showTop (S .current.deleteSuccess );
254255 _refreshController.callRefresh ();
255256 } else {
256257 IToast .showTop (value['msg' ]);
@@ -271,14 +272,14 @@ class _FavoriteFolderListScreenState extends State<FavoriteFolderListScreen>
271272 BottomSheetBuilder .showBottomSheet (
272273 context,
273274 (sheetContext) => InputBottomSheet (
274- buttonText: "确认" ,
275- title: "新建收藏夹" ,
276- hint: "输入收藏夹名称" ,
275+ buttonText: S .current.confirm ,
276+ title: S .current.newFolder ,
277+ hint: S .current.inputFolderTitle ,
277278 text: "" ,
278279 onConfirm: (text) {
279280 UserApi .createFolder (name: text).then ((value) {
280281 if (value['code' ] == 0 ) {
281- IToast .showTop ("创建成功" );
282+ IToast .showTop (S .current.createSuccess );
282283 _refreshController.callRefresh ();
283284 } else {
284285 IToast .showTop (value['msg' ]);
@@ -295,7 +296,7 @@ class _FavoriteFolderListScreenState extends State<FavoriteFolderListScreen>
295296 return ItemBuilder .buildDesktopAppBar (
296297 context: context,
297298 showBack: true ,
298- title: "我的收藏" ,
299+ title: S .current.myFavorites ,
299300 actions: [
300301 // ItemBuilder.buildIconButton(
301302 // context: context,
0 commit comments