Skip to content

Commit

Permalink
more translate to chinese
Browse files Browse the repository at this point in the history
  • Loading branch information
fregie committed May 19, 2023
1 parent b1249e1 commit 53d638f
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 21 deletions.
8 changes: 6 additions & 2 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"chooseAlbum": "Choose album",
"storageSetting": "Storage setting",
"remoteStorageType": "Remote storage type",
"samvbaServerAddress": "Samvba server address",
"samvbaServerAddress": "Samba server address",
"username": "Username",
"password": "Password",
"share": "Share",
Expand All @@ -50,5 +50,9 @@
"setLocalFirst": "Please set local folder first",
"downloadFailed": "Download failed",
"storageNotSetted": "Remote storage is not setted,please set it first",
"successfullyUpload": "Successfully upload"
"successfullyUpload": "Successfully upload",
"testSuccess": "Test success,you can save now",
"connectFailed": "Storage connection failed",
"selectRoot": "Select root path",
"currentPath": "Current path"
}
8 changes: 6 additions & 2 deletions lib/l10n/app_zh.arb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"samvbaServerAddress": "Samba服务器地址",
"username": "用户名",
"password": "密码",
"share": "分享名称",
"share": "分享",
"rootPath": "储存根目录(照片会储存在该目录下)",
"optional": "可选",
"testStorage": "测试连接",
Expand All @@ -50,5 +50,9 @@
"setLocalFirst": "请先设置本地相册",
"downloadFailed": "下载失败",
"storageNotSetted": "网络储存未配置,请先配置网络储存",
"successfullyUpload": "成功上传"
"successfullyUpload": "成功上传",
"testSuccess": "连接成功,请点击保存",
"connectFailed": "连接失败",
"selectRoot": "选择根目录",
"currentPath": "当前目录"
}
14 changes: 7 additions & 7 deletions lib/storageform/nfsform.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class NFSFormState extends State<NFSForm> {
showDialog<String>(
context: context,
builder: (BuildContext context) => AlertDialog(
title: const Text('Storage connection failed'),
title: Text(AppLocalizations.of(context).connectFailed),
content: Text(msg),
actions: <Widget>[
TextButton(
Expand All @@ -135,8 +135,8 @@ class NFSFormState extends State<NFSForm> {
onPressed: () {
testStorage().then((value) {
if (testSuccess) {
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
content: Text('Test success,you can save now')));
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text(AppLocalizations.of(context).testSuccess)));
} else {
showErrorDialog(errormsg!);
}
Expand Down Expand Up @@ -243,15 +243,15 @@ class NFSFormState extends State<NFSForm> {
Container(
padding: const EdgeInsets.fromLTRB(20, 30, 20, 10),
child: Text(
"Select root path",
AppLocalizations.of(context).selectRoot,
style: Theme.of(context).textTheme.titleLarge,
),
),
Container(
padding: const EdgeInsets.fromLTRB(20, 0, 20, 0),
alignment: Alignment.centerLeft,
child: Text(
"Current path: $currentPath",
"${AppLocalizations.of(context).currentPath}: $currentPath",
style: Theme.of(context).textTheme.bodyMedium,
),
),
Expand Down Expand Up @@ -318,7 +318,7 @@ class NFSFormState extends State<NFSForm> {
width: 120,
height: 55,
child: OutlinedButton(
child: const Text("Cancel"),
child: Text(AppLocalizations.of(context).cancel),
onPressed: () {
Navigator.of(context).pop();
},
Expand All @@ -329,7 +329,7 @@ class NFSFormState extends State<NFSForm> {
width: 120,
height: 55,
child: FilledButton(
child: const Text("Save"),
child: Text(AppLocalizations.of(context).save),
onPressed: () {
rootPathController!.text = currentPath;
Navigator.of(context).pop();
Expand Down
6 changes: 3 additions & 3 deletions lib/storageform/smbform.dart
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@ class _SMBFormState extends State<SMBForm> {
onPressed: () {
testStorage().then((value) {
if (testSuccess) {
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
content: Text('Test success,you can save now')));
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text(AppLocalizations.of(context).testSuccess)));
} else {
showErrorDialog(errormsg!);
}
Expand Down Expand Up @@ -449,7 +449,7 @@ class _SMBFormState extends State<SMBForm> {
showDialog<String>(
context: context,
builder: (BuildContext context) => AlertDialog(
title: const Text('Storage connection failed'),
title: Text(AppLocalizations.of(context).connectFailed),
content: Text(msg),
actions: <Widget>[
TextButton(
Expand Down
14 changes: 7 additions & 7 deletions lib/storageform/webdavform.dart
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ class WebDavFormState extends State<WebDavForm> {
onPressed: () {
testStorage().then((value) {
if (testSuccess) {
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
content: Text('Test success,you can save now')));
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text(AppLocalizations.of(context).testSuccess)));
} else {
showErrorDialog(errormsg!);
}
Expand Down Expand Up @@ -257,15 +257,15 @@ class WebDavFormState extends State<WebDavForm> {
Container(
padding: const EdgeInsets.fromLTRB(20, 30, 20, 10),
child: Text(
"Select root path",
AppLocalizations.of(context).selectRoot,
style: Theme.of(context).textTheme.titleLarge,
),
),
Container(
padding: const EdgeInsets.fromLTRB(20, 0, 20, 0),
alignment: Alignment.centerLeft,
child: Text(
"Current path: $currentPath",
"${AppLocalizations.of(context).currentPath}: $currentPath",
style: Theme.of(context).textTheme.bodyMedium,
),
),
Expand Down Expand Up @@ -330,7 +330,7 @@ class WebDavFormState extends State<WebDavForm> {
width: 120,
height: 55,
child: OutlinedButton(
child: const Text("Cancel"),
child: Text(AppLocalizations.of(context).cancel),
onPressed: () {
Navigator.of(context).pop();
},
Expand All @@ -341,7 +341,7 @@ class WebDavFormState extends State<WebDavForm> {
width: 120,
height: 55,
child: FilledButton(
child: const Text("Save"),
child: Text(AppLocalizations.of(context).save),
onPressed: () {
rootPathController!.text = currentPath;
Navigator.of(context).pop();
Expand All @@ -362,7 +362,7 @@ class WebDavFormState extends State<WebDavForm> {
showDialog<String>(
context: context,
builder: (BuildContext context) => AlertDialog(
title: const Text('Storage connection failed'),
title: Text(AppLocalizations.of(context).connectFailed),
content: Text(msg),
actions: <Widget>[
TextButton(
Expand Down

0 comments on commit 53d638f

Please sign in to comment.