Skip to content

Commit

Permalink
Add L10n
Browse files Browse the repository at this point in the history
  • Loading branch information
3003h committed Nov 19, 2024
1 parent 069e147 commit 7a8798f
Show file tree
Hide file tree
Showing 15 changed files with 36 additions and 10 deletions.
4 changes: 2 additions & 2 deletions lib/common/controller/user_controller.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:cookie_jar/src/jar/persist.dart';
import 'package:eros_fe/common/controller/base_controller.dart';
import 'package:eros_fe/common/global.dart';
import 'package:eros_fe/common/service/ehsetting_service.dart';
Expand Down Expand Up @@ -80,13 +79,14 @@ class UserController extends ProfileController {

Future<void> removeIgneous() async {
user(user.value.copyWith(igneous: ''.oN));
final PersistCookieJar cookieJar = await Api.cookieJar;
final cookieJar = await Api.cookieJar;
final uri = Uri.parse(Api.getBaseUrl());
final cookies = await cookieJar.loadForRequest(uri);
cookies.removeWhere((element) {
return element.name == 'igneous';
});
logger.d('removeIgneous: $cookies');
await cookieJar.deleteAll();
await cookieJar.saveFromResponse(uri, cookies);
}
}
2 changes: 1 addition & 1 deletion lib/component/setting_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ Future<void> showUserCookie() async {
},
),
CupertinoDialogAction(
child: Text('Refresh igneous'),
child: Text(L10n.of(context).refresh_igneous),
onPressed: () {
Get.back();
userController.removeIgneous();
Expand Down
2 changes: 2 additions & 0 deletions lib/generated/intl/messages_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,8 @@ class MessageLookup extends MessageLookupByLibrary {
"redirect_thumb_link_summary": MessageLookupByLibrary.simpleMessage(
"Redirect Thumb Link To ehgt.org"),
"redownload": MessageLookupByLibrary.simpleMessage("Redownload"),
"refresh_igneous":
MessageLookupByLibrary.simpleMessage("Refresh Igneous"),
"regex": MessageLookupByLibrary.simpleMessage("Regex"),
"regex_format_error":
MessageLookupByLibrary.simpleMessage("Regex format error"),
Expand Down
2 changes: 2 additions & 0 deletions lib/generated/intl/messages_ja.dart
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ class MessageLookup extends MessageLookupByLibrary {
"redirect_thumb_link_summary": MessageLookupByLibrary.simpleMessage(
"Redirect Thumb Link To ehgt.org"),
"redownload": MessageLookupByLibrary.simpleMessage("再ダウンロード"),
"refresh_igneous":
MessageLookupByLibrary.simpleMessage("Refresh Igneous"),
"regex": MessageLookupByLibrary.simpleMessage("Regex"),
"regex_format_error":
MessageLookupByLibrary.simpleMessage("Regexフォーマットエラー"),
Expand Down
2 changes: 2 additions & 0 deletions lib/generated/intl/messages_ko_KR.dart
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ class MessageLookup extends MessageLookupByLibrary {
"redirect_thumb_link_summary": MessageLookupByLibrary.simpleMessage(
"Redirect Thumb Link To ehgt.org"),
"redownload": MessageLookupByLibrary.simpleMessage("Redownload"),
"refresh_igneous":
MessageLookupByLibrary.simpleMessage("Refresh Igneous"),
"regex": MessageLookupByLibrary.simpleMessage("Regex"),
"regex_format_error":
MessageLookupByLibrary.simpleMessage("Regex format error"),
Expand Down
2 changes: 2 additions & 0 deletions lib/generated/intl/messages_ru.dart
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,8 @@ class MessageLookup extends MessageLookupByLibrary {
"redirect_thumb_link_summary": MessageLookupByLibrary.simpleMessage(
"Перенаправление адреса миниатюры на ehgt.org"),
"redownload": MessageLookupByLibrary.simpleMessage("Скачать заново"),
"refresh_igneous":
MessageLookupByLibrary.simpleMessage("Refresh Igneous"),
"regex": MessageLookupByLibrary.simpleMessage("Regex"),
"regex_format_error":
MessageLookupByLibrary.simpleMessage("Regex format error"),
Expand Down
1 change: 1 addition & 0 deletions lib/generated/intl/messages_zh_CN.dart
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ class MessageLookup extends MessageLookupByLibrary {
"redirect_thumb_link_summary":
MessageLookupByLibrary.simpleMessage("重定向缩略图链接为ehgt.org"),
"redownload": MessageLookupByLibrary.simpleMessage("重新下载"),
"refresh_igneous": MessageLookupByLibrary.simpleMessage("刷新Igneous"),
"regex": MessageLookupByLibrary.simpleMessage("正则表达式"),
"regex_format_error": MessageLookupByLibrary.simpleMessage("正则表达式格式错误"),
"reload_image": MessageLookupByLibrary.simpleMessage("重新载入图片"),
Expand Down
2 changes: 2 additions & 0 deletions lib/generated/intl/messages_zh_TW.dart
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ class MessageLookup extends MessageLookupByLibrary {
"redirect_thumb_link_summary": MessageLookupByLibrary.simpleMessage(
"Redirect Thumb Link To ehgt.org"),
"redownload": MessageLookupByLibrary.simpleMessage("Redownload"),
"refresh_igneous":
MessageLookupByLibrary.simpleMessage("Refresh Igneous"),
"regex": MessageLookupByLibrary.simpleMessage("正则表达式"),
"regex_format_error":
MessageLookupByLibrary.simpleMessage("Regex format error"),
Expand Down
11 changes: 10 additions & 1 deletion lib/generated/l10n.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion lib/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -444,5 +444,6 @@
"experimental_feature": "Experimental feature",
"page_view_type": "Page View Type",
"slide_out_page": "Slide Out Page",
"high_resolution_images_limited": "High Resolution Images Limited"
"high_resolution_images_limited": "High Resolution Images Limited",
"refresh_igneous": "Refresh Igneous"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_ja.arb
Original file line number Diff line number Diff line change
Expand Up @@ -444,5 +444,6 @@
"experimental_feature": "Experimental feature",
"page_view_type": "Page View Type",
"slide_out_page": "Slide Out Page",
"high_resolution_images_limited": "High Resolution Images Limited"
"high_resolution_images_limited": "High Resolution Images Limited",
"refresh_igneous": "Refresh Igneous"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_ko_KR.arb
Original file line number Diff line number Diff line change
Expand Up @@ -444,5 +444,6 @@
"experimental_feature": "Experimental feature",
"page_view_type": "Page View Type",
"slide_out_page": "Slide Out Page",
"high_resolution_images_limited": "High Resolution Images Limited"
"high_resolution_images_limited": "High Resolution Images Limited",
"refresh_igneous": "Refresh Igneous"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_ru.arb
Original file line number Diff line number Diff line change
Expand Up @@ -444,5 +444,6 @@
"experimental_feature": "Experimental feature",
"page_view_type": "Page View Type",
"slide_out_page": "Slide Out Page",
"high_resolution_images_limited": "High Resolution Images Limited"
"high_resolution_images_limited": "High Resolution Images Limited",
"refresh_igneous": "Refresh Igneous"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_zh_CN.arb
Original file line number Diff line number Diff line change
Expand Up @@ -444,5 +444,6 @@
"experimental_feature": "实验性功能",
"page_view_type": "页面视图类型",
"slide_out_page": "拖动返回",
"high_resolution_images_limited": "高分辨率图片限制"
"high_resolution_images_limited": "高分辨率图片限制",
"refresh_igneous": "刷新Igneous"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_zh_TW.arb
Original file line number Diff line number Diff line change
Expand Up @@ -444,5 +444,6 @@
"experimental_feature": "Experimental feature",
"page_view_type": "Page View Type",
"slide_out_page": "Slide Out Page",
"high_resolution_images_limited": "High Resolution Images Limited"
"high_resolution_images_limited": "High Resolution Images Limited",
"refresh_igneous": "Refresh Igneous"
}

0 comments on commit 7a8798f

Please sign in to comment.