mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Merge pull request #669 from FutureYL3/master
Fixing some hard-coded texts
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
- Dieter Plaetinck - <https://github.com/Dieterbe>
|
||||
- Dennis van Peer - <https://github.com/Denpeer>
|
||||
- sizzlesloth - <https://github.com/sizzlesloth>
|
||||
- Xianglin Zeng - <https://github.com/FutureYL3>
|
||||
|
||||
## Translators
|
||||
|
||||
|
||||
@@ -888,5 +888,29 @@
|
||||
"@log": {
|
||||
"description": "Log a specific meal (imperative form)"
|
||||
},
|
||||
"done": "Done"
|
||||
"done": "Done",
|
||||
"overallChangeWeight": "Overall change",
|
||||
"@overallChangeWeight": {
|
||||
"description": "Overall change in weight, added for localization"
|
||||
},
|
||||
"goalTypeMeals": "From meals",
|
||||
"@goalTypeMeals": {
|
||||
"description": "added for localization of Class GoalType's filed meals"
|
||||
},
|
||||
"goalTypeBasic": "Basic",
|
||||
"@goalTypeBasic": {
|
||||
"description": "added for localization of Class GoalType's filed basic"
|
||||
},
|
||||
"goalTypeAdvanced": "Advanced",
|
||||
"@goalTypeAdvanced": {
|
||||
"description": "added for localization of Class GoalType's filed advanced"
|
||||
},
|
||||
"indicatorRaw": "raw",
|
||||
"@indicatorRaw": {
|
||||
"description": "added for localization of Class Indicator's field text"
|
||||
},
|
||||
"indicatorAvg": "avg",
|
||||
"@indicatorAvg": {
|
||||
"description": "added for localization of Class Indicator's field text"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,9 +250,9 @@
|
||||
},
|
||||
"delete": "删除",
|
||||
"@delete": {},
|
||||
"loadingText": "加载...",
|
||||
"loadingText": "加载中...",
|
||||
"@loadingText": {
|
||||
"description": "Text to show when entries are being loaded in the background: Loading..."
|
||||
"description": "Text to show when entries are being loaded in the background: Loading..., changed from \"加载\" to \"加载中\""
|
||||
},
|
||||
"edit": "编辑",
|
||||
"@edit": {},
|
||||
@@ -324,9 +324,9 @@
|
||||
"@date": {
|
||||
"description": "The date of a workout log or body weight entry"
|
||||
},
|
||||
"weight": "重量",
|
||||
"weight": "体重",
|
||||
"@weight": {
|
||||
"description": "The weight of a workout log or body weight entry"
|
||||
"description": "The weight of a workout log or body weight entry, changed from \"重量\" to \"体重\""
|
||||
},
|
||||
"anErrorOccurred": "出错了!",
|
||||
"@anErrorOccurred": {},
|
||||
@@ -348,9 +348,9 @@
|
||||
"@addMeal": {},
|
||||
"save": "保存",
|
||||
"@save": {},
|
||||
"name": "名",
|
||||
"name": "名称",
|
||||
"@name": {
|
||||
"description": "Name for a workout or nutritional plan"
|
||||
"description": "Name for a workout or nutritional plan, changed from \"名\" to \"名称\""
|
||||
},
|
||||
"description": "描述",
|
||||
"@description": {},
|
||||
@@ -670,5 +670,39 @@
|
||||
}
|
||||
},
|
||||
"noMeasurementEntries": "您没有测量条目",
|
||||
"@noMeasurementEntries": {}
|
||||
}
|
||||
"@noMeasurementEntries": {},
|
||||
"overallChangeWeight": "总体变化",
|
||||
"@overallChangeWeight": {
|
||||
"description": "Overall change in weight"
|
||||
},
|
||||
"goalTypeMeals": "从饮食出发",
|
||||
"goalTypeBasic": "基础",
|
||||
"goalTypeAdvanced": "进阶",
|
||||
"chartAllTimeTitle": "{name} 历史记录曲线",
|
||||
"@chartAllTimeTitle": {
|
||||
"description": "All-time chart of 'name' (e.g. 'weight', 'body fat' etc.)",
|
||||
"type": "text",
|
||||
"placeholders": {
|
||||
"name": {}
|
||||
}
|
||||
},
|
||||
"chartDuringPlanTitle": "{chartName} 在计划 \"{planName}\" 期间的改变曲线",
|
||||
"@chartDuringPlanTitle": {
|
||||
"description": "chart of 'chartName' (e.g. 'weight', 'body fat' etc.) logged during plan",
|
||||
"type": "text",
|
||||
"placeholders": {
|
||||
"chartName": {},
|
||||
"planName": {}
|
||||
}
|
||||
},
|
||||
"indicatorRaw": "原始值",
|
||||
"indicatorAvg": "平均值",
|
||||
"textPromptTitle": "准备就绪?",
|
||||
"@textPromptTitle": {
|
||||
"description": "Title for the text prompt"
|
||||
},
|
||||
"textPromptSubheading": "点击右下角按钮开始",
|
||||
"@textPromptSubheading": {
|
||||
"description": "Subheading for the text prompt"
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,9 @@ class MeasurementOverallChangeWidget extends StatelessWidget {
|
||||
? '-'
|
||||
: '';
|
||||
|
||||
return Text('overall change $prefix ${delta.abs().toStringAsFixed(1)} $_unit');
|
||||
// ignore: prefer_interpolation_to_compose_strings
|
||||
return Text(AppLocalizations.of(context).overallChangeWeight +
|
||||
'$prefix ${delta.abs().toStringAsFixed(1)} $_unit');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,8 +77,8 @@ List<Widget> getOverviewWidgetsSeries(
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Indicator(color: Theme.of(context).colorScheme.primary, text: 'raw', isSquare: true),
|
||||
Indicator(color: Theme.of(context).colorScheme.tertiary, text: 'avg', isSquare: true),
|
||||
Indicator(color: Theme.of(context).colorScheme.primary, text: AppLocalizations.of(context).indicatorRaw, isSquare: true),
|
||||
Indicator(color: Theme.of(context).colorScheme.tertiary, text: AppLocalizations.of(context).indicatorAvg, isSquare: true),
|
||||
],
|
||||
),
|
||||
];
|
||||
|
||||
@@ -484,6 +484,17 @@ enum GoalType {
|
||||
|
||||
const GoalType(this.label);
|
||||
final String label;
|
||||
|
||||
String getI18nLabel(BuildContext context) {
|
||||
switch (this) {
|
||||
case GoalType.meals:
|
||||
return AppLocalizations.of(context).goalTypeMeals;
|
||||
case GoalType.basic:
|
||||
return AppLocalizations.of(context).goalTypeBasic;
|
||||
case GoalType.advanced:
|
||||
return AppLocalizations.of(context).goalTypeAdvanced;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class PlanForm extends StatefulWidget {
|
||||
@@ -572,7 +583,7 @@ class _PlanFormState extends State<PlanForm> {
|
||||
.map(
|
||||
(e) => DropdownMenuItem<GoalType>(
|
||||
value: e,
|
||||
child: Text(e.label),
|
||||
child: Text(e.getI18nLabel(context)),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
|
||||
Reference in New Issue
Block a user