Skip to content

Commit 4489bfb

Browse files
authored
Merge branch 'master' into master
2 parents 08f16a2 + 422fb49 commit 4489bfb

File tree

9 files changed

+1041
-48
lines changed

9 files changed

+1041
-48
lines changed

AUTHORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
- Dennis van Peer - <https://github.com/Denpeer>
3232
- sizzlesloth - <https://github.com/sizzlesloth>
3333
- Arya Singh - <https://github.com/ARYPROGRAMMER>
34+
- Xianglin Zeng - <https://github.com/FutureYL3>
3435

3536
## Translators
3637

lib/l10n/app_en.arb

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,5 +888,29 @@
888888
"@log": {
889889
"description": "Log a specific meal (imperative form)"
890890
},
891-
"done": "Done"
891+
"done": "Done",
892+
"overallChangeWeight": "Overall change",
893+
"@overallChangeWeight": {
894+
"description": "Overall change in weight, added for localization"
895+
},
896+
"goalTypeMeals": "From meals",
897+
"@goalTypeMeals": {
898+
"description": "added for localization of Class GoalType's filed meals"
899+
},
900+
"goalTypeBasic": "Basic",
901+
"@goalTypeBasic": {
902+
"description": "added for localization of Class GoalType's filed basic"
903+
},
904+
"goalTypeAdvanced": "Advanced",
905+
"@goalTypeAdvanced": {
906+
"description": "added for localization of Class GoalType's filed advanced"
907+
},
908+
"indicatorRaw": "raw",
909+
"@indicatorRaw": {
910+
"description": "added for localization of Class Indicator's field text"
911+
},
912+
"indicatorAvg": "avg",
913+
"@indicatorAvg": {
914+
"description": "added for localization of Class Indicator's field text"
915+
}
892916
}

lib/l10n/app_ta.arb

Lines changed: 934 additions & 0 deletions
Large diffs are not rendered by default.

lib/l10n/app_zh.arb

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,9 @@
250250
},
251251
"delete": "删除",
252252
"@delete": {},
253-
"loadingText": "加载...",
253+
"loadingText": "加载中...",
254254
"@loadingText": {
255-
"description": "Text to show when entries are being loaded in the background: Loading..."
255+
"description": "Text to show when entries are being loaded in the background: Loading..., changed from \"加载\" to \"加载中\""
256256
},
257257
"edit": "编辑",
258258
"@edit": {},
@@ -324,9 +324,9 @@
324324
"@date": {
325325
"description": "The date of a workout log or body weight entry"
326326
},
327-
"weight": "重量",
327+
"weight": "体重",
328328
"@weight": {
329-
"description": "The weight of a workout log or body weight entry"
329+
"description": "The weight of a workout log or body weight entry, changed from \"重量\" to \"体重\""
330330
},
331331
"anErrorOccurred": "出错了!",
332332
"@anErrorOccurred": {},
@@ -348,9 +348,9 @@
348348
"@addMeal": {},
349349
"save": "保存",
350350
"@save": {},
351-
"name": "",
351+
"name": "名称",
352352
"@name": {
353-
"description": "Name for a workout or nutritional plan"
353+
"description": "Name for a workout or nutritional plan, changed from \"名\" to \"名称\""
354354
},
355355
"description": "描述",
356356
"@description": {},
@@ -670,5 +670,39 @@
670670
}
671671
},
672672
"noMeasurementEntries": "您没有测量条目",
673-
"@noMeasurementEntries": {}
674-
}
673+
"@noMeasurementEntries": {},
674+
"overallChangeWeight": "总体变化",
675+
"@overallChangeWeight": {
676+
"description": "Overall change in weight"
677+
},
678+
"goalTypeMeals": "从饮食出发",
679+
"goalTypeBasic": "基础",
680+
"goalTypeAdvanced": "进阶",
681+
"chartAllTimeTitle": "{name} 历史记录曲线",
682+
"@chartAllTimeTitle": {
683+
"description": "All-time chart of 'name' (e.g. 'weight', 'body fat' etc.)",
684+
"type": "text",
685+
"placeholders": {
686+
"name": {}
687+
}
688+
},
689+
"chartDuringPlanTitle": "{chartName} 在计划 \"{planName}\" 期间的改变曲线",
690+
"@chartDuringPlanTitle": {
691+
"description": "chart of 'chartName' (e.g. 'weight', 'body fat' etc.) logged during plan",
692+
"type": "text",
693+
"placeholders": {
694+
"chartName": {},
695+
"planName": {}
696+
}
697+
},
698+
"indicatorRaw": "原始值",
699+
"indicatorAvg": "平均值",
700+
"textPromptTitle": "准备就绪?",
701+
"@textPromptTitle": {
702+
"description": "Title for the text prompt"
703+
},
704+
"textPromptSubheading": "点击右下角按钮开始",
705+
"@textPromptSubheading": {
706+
"description": "Subheading for the text prompt"
707+
}
708+
}

lib/widgets/measurements/charts.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ class MeasurementOverallChangeWidget extends StatelessWidget {
3737
? '-'
3838
: '';
3939

40-
return Text('overall change $prefix ${delta.abs().toStringAsFixed(1)} $_unit');
40+
// ignore: prefer_interpolation_to_compose_strings
41+
return Text(AppLocalizations.of(context).overallChangeWeight +
42+
'$prefix ${delta.abs().toStringAsFixed(1)} $_unit');
4143
}
4244
}
4345

lib/widgets/measurements/helpers.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ List<Widget> getOverviewWidgetsSeries(
7777
Row(
7878
mainAxisAlignment: MainAxisAlignment.center,
7979
children: [
80-
Indicator(color: Theme.of(context).colorScheme.primary, text: 'raw', isSquare: true),
81-
Indicator(color: Theme.of(context).colorScheme.tertiary, text: 'avg', isSquare: true),
80+
Indicator(color: Theme.of(context).colorScheme.primary, text: AppLocalizations.of(context).indicatorRaw, isSquare: true),
81+
Indicator(color: Theme.of(context).colorScheme.tertiary, text: AppLocalizations.of(context).indicatorAvg, isSquare: true),
8282
],
8383
),
8484
];

lib/widgets/nutrition/forms.dart

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,17 @@ enum GoalType {
484484

485485
const GoalType(this.label);
486486
final String label;
487+
488+
String getI18nLabel(BuildContext context) {
489+
switch (this) {
490+
case GoalType.meals:
491+
return AppLocalizations.of(context).goalTypeMeals;
492+
case GoalType.basic:
493+
return AppLocalizations.of(context).goalTypeBasic;
494+
case GoalType.advanced:
495+
return AppLocalizations.of(context).goalTypeAdvanced;
496+
}
497+
}
487498
}
488499

489500
class PlanForm extends StatefulWidget {
@@ -572,7 +583,7 @@ class _PlanFormState extends State<PlanForm> {
572583
.map(
573584
(e) => DropdownMenuItem<GoalType>(
574585
value: e,
575-
child: Text(e.label),
586+
child: Text(e.getI18nLabel(context)),
576587
),
577588
)
578589
.toList(),

pubspec.lock

Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,18 @@ packages:
55
dependency: transitive
66
description:
77
name: _fe_analyzer_shared
8-
sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834
8+
sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7"
99
url: "https://pub.dev"
1010
source: hosted
11-
version: "72.0.0"
12-
_macros:
13-
dependency: transitive
14-
description: dart
15-
source: sdk
16-
version: "0.3.2"
11+
version: "67.0.0"
1712
analyzer:
1813
dependency: transitive
1914
description:
2015
name: analyzer
21-
sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139
16+
sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d"
2217
url: "https://pub.dev"
2318
source: hosted
24-
version: "6.7.0"
19+
version: "6.4.1"
2520
analyzer_plugin:
2621
dependency: transitive
2722
description:
@@ -298,10 +293,10 @@ packages:
298293
dependency: transitive
299294
description:
300295
name: dart_style
301-
sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab"
296+
sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9"
302297
url: "https://pub.dev"
303298
source: hosted
304-
version: "2.3.7"
299+
version: "2.3.6"
305300
drift:
306301
dependency: "direct main"
307302
description:
@@ -402,18 +397,18 @@ packages:
402397
dependency: "direct main"
403398
description:
404399
name: flex_color_scheme
405-
sha256: "32914024a4f404d90ff449f58d279191675b28e7c08824046baf06826e99d984"
400+
sha256: "03fd5e68eff346a042026577f54be0cd4507e565cd86390b12c0aca1c5d6cb0b"
406401
url: "https://pub.dev"
407402
source: hosted
408-
version: "7.3.1"
403+
version: "8.0.0"
409404
flex_seed_scheme:
410405
dependency: "direct main"
411406
description:
412407
name: flex_seed_scheme
413-
sha256: "4cee2f1d07259f77e8b36f4ec5f35499d19e74e17c7dce5b819554914082bc01"
408+
sha256: "7639d2c86268eff84a909026eb169f008064af0fb3696a651b24b0fa24a40334"
414409
url: "https://pub.dev"
415410
source: hosted
416-
version: "1.5.0"
411+
version: "3.4.1"
417412
flutter:
418413
dependency: "direct main"
419414
description: flutter
@@ -500,10 +495,10 @@ packages:
500495
dependency: "direct dev"
501496
description:
502497
name: flutter_lints
503-
sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c"
498+
sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1"
504499
url: "https://pub.dev"
505500
source: hosted
506-
version: "4.0.0"
501+
version: "5.0.0"
507502
flutter_localizations:
508503
dependency: "direct main"
509504
description: flutter
@@ -529,10 +524,10 @@ packages:
529524
dependency: "direct main"
530525
description:
531526
name: flutter_svg
532-
sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2"
527+
sha256: "1b7723a814d84fb65869ea7115cdb3ee7c3be5a27a755c1ec60e049f6b9fcbb2"
533528
url: "https://pub.dev"
534529
source: hosted
535-
version: "2.0.10+1"
530+
version: "2.0.11"
536531
flutter_svg_icons:
537532
dependency: "direct main"
538533
description:
@@ -579,10 +574,10 @@ packages:
579574
dependency: "direct dev"
580575
description:
581576
name: freezed
582-
sha256: "44c19278dd9d89292cf46e97dc0c1e52ce03275f40a97c5a348e802a924bf40e"
577+
sha256: a434911f643466d78462625df76fd9eb13e57348ff43fe1f77bbe909522c67a1
583578
url: "https://pub.dev"
584579
source: hosted
585-
version: "2.5.7"
580+
version: "2.5.2"
586581
freezed_annotation:
587582
dependency: "direct main"
588583
description:
@@ -813,10 +808,10 @@ packages:
813808
dependency: transitive
814809
description:
815810
name: lints
816-
sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235"
811+
sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413"
817812
url: "https://pub.dev"
818813
source: hosted
819-
version: "4.0.0"
814+
version: "5.0.0"
820815
list_counter:
821816
dependency: transitive
822817
description:
@@ -833,14 +828,6 @@ packages:
833828
url: "https://pub.dev"
834829
source: hosted
835830
version: "1.3.0"
836-
macros:
837-
dependency: transitive
838-
description:
839-
name: macros
840-
sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
841-
url: "https://pub.dev"
842-
source: hosted
843-
version: "0.1.2-main.4"
844831
markdown:
845832
dependency: transitive
846833
description:

pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,16 @@ dependencies:
5757
flutter_staggered_grid_view: ^0.7.0
5858
carousel_slider: ^5.0.0
5959
multi_select_flutter: ^4.1.3
60-
flutter_svg: ^2.0.10+1
60+
flutter_svg: ^2.0.11
6161
fl_chart: ^0.69.0
6262
flutter_zxing: ^1.5.2
6363
drift: ^2.16.0
6464
path: ^1.8.3
6565
path_provider: ^2.1.4
6666
sqlite3_flutter_libs: ^0.5.20
6767
get_it: ^7.6.8
68-
flex_seed_scheme: ^1.5.0
69-
flex_color_scheme: ^7.3.1
68+
flex_seed_scheme: ^3.4.1
69+
flex_color_scheme: ^8.0.0
7070
freezed_annotation: ^2.4.4
7171
clock: ^1.1.1
7272
flutter_svg_icons: ^0.0.1
@@ -83,7 +83,7 @@ dev_dependencies:
8383
json_serializable: ^6.8.0
8484
mockito: ^5.4.4
8585
network_image_mock: ^2.1.1
86-
flutter_lints: ^4.0.0
86+
flutter_lints: ^5.0.0
8787
cider: ^0.2.7
8888
drift_dev: ^2.20.3
8989
freezed: ^2.5.2

0 commit comments

Comments
 (0)