feat: i18n support (#40)

This commit is contained in:
monkeyWie authored and GitHub committed 2022-11-05 17:04:22 +08:00
1 parent 135fba1b54
commit 77e59f7376
10 files changed
+172 -50

No files matched your search

@@ -26,12 +26,12 @@ class _DirectorySelectorState extends State<DirectorySelector> {
readOnly: true,
controller: widget.controller,
decoration: widget.showLabel
? const InputDecoration(
labelText: "下载目录",
? InputDecoration(
labelText: 'setting.downloadDir'.tr,
)
: null,
validator: (v) {
return v!.trim().isNotEmpty ? null : "请选择下载目录";
return v!.trim().isNotEmpty ? null : 'setting.downloadDirValid'.tr;
},
)),
IconButton(
+3 -1
View File
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../util/util.dart';
import '../api/model/resource.dart';
@@ -29,7 +30,8 @@ class _FileListViewState extends State<FileListView> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Padding(padding: EdgeInsets.only(top: 10)),
Text("选择文件", style: TextStyle(color: themeData.hintColor)),
Text('create.selectDir'.tr,
style: TextStyle(color: themeData.hintColor)),
Expanded(
child: Container(
margin: const EdgeInsets.only(top: 10),