diff --git a/lib/category/widget/category_widget.dart b/lib/category/widget/category_widget.dart index 4ec37c5..7828c1b 100644 --- a/lib/category/widget/category_widget.dart +++ b/lib/category/widget/category_widget.dart @@ -150,7 +150,7 @@ void _addCategory(BuildContext context, FileCategories categoriesNotifier) { actions: [ TextButton( onPressed: () => Navigator.of(context).pop(), - child: Text(l10n.textCancel), + child: Text(l10n.actionCancel), ), ValueListenableBuilder( valueListenable: hasCategoryNameNotifier, @@ -162,7 +162,7 @@ void _addCategory(BuildContext context, FileCategories categoriesNotifier) { Navigator.of(context).pop(); } : null, - child: Text(l10n.textAdd), + child: Text(l10n.actionAdd), ), ), ], diff --git a/lib/file/widget/selected_file_widget.dart b/lib/file/widget/selected_file_widget.dart index f5ec728..64b1f85 100644 --- a/lib/file/widget/selected_file_widget.dart +++ b/lib/file/widget/selected_file_widget.dart @@ -39,7 +39,7 @@ class SelectedFileWidget extends ConsumerWidget { actions: [ TextButton( onPressed: () => Navigator.of(context).pop(), - child: Text(l10n.textCancel), + child: Text(l10n.actionCancel), ), ValueListenableBuilder( valueListenable: hasNameNotifier, @@ -65,7 +65,7 @@ class SelectedFileWidget extends ConsumerWidget { Navigator.of(context).pop(); } : null, - child: Text(l10n.textAdd), + child: Text(l10n.actionAdd), ), ), ], diff --git a/lib/google/google_helper.dart b/lib/google/google_helper.dart index 0b07405..a74f9ef 100644 --- a/lib/google/google_helper.dart +++ b/lib/google/google_helper.dart @@ -96,7 +96,7 @@ Future _showPermissionsRationale([Set missingScopes = const {}]) { actions: [ TextButton( onPressed: () => Navigator.of(context).pop(), - child: Text(AppLocalizations.of(context).textOk), + child: Text(AppLocalizations.of(context).actionOk), ), ], ); diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 98fe639..8cad334 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -6,12 +6,16 @@ "titleAddNewFile": "Add New File", "titlePermissionsRationale": "**Your Permissions Enable Key Features**", - "textReset": "Reset", - "textSave": "Save", - "textCancel": "Cancel", - "textAdd": "Add", - "textOk": "Ok", - "textClose": "Close", + "actionReset": "Reset", + "actionSave": "Save", + "actionCancel": "Cancel", + "actionAdd": "Add", + "actionOk": "Ok", + "actionClose": "Close", + "actionStart": "Start", + "actionPause": "Pause", + "actionResume": "Resume", + "textPermissionsRationale": "Our app requires access to your Google Drive and Google Sheets to function properly:\n\n 1. **Google Drive:** To show you a list of your existing Google Sheets and let you create a new one if needed.\n\n 2. **Google Sheets:** To store your stopwatch measurements directly in your chosen Google Sheet.\n\nWe only access the files you select or create through the app. Your data remains private and secure.", "hintCreateCategory": "create a category", diff --git a/lib/measurement/widget/stop_watch_widget.dart b/lib/measurement/widget/stop_watch_widget.dart index 886f7e0..a5d3094 100644 --- a/lib/measurement/widget/stop_watch_widget.dart +++ b/lib/measurement/widget/stop_watch_widget.dart @@ -168,6 +168,7 @@ class StopWatchState extends ConsumerState { @override Widget build(BuildContext context) { final theme = Theme.of(context); + final l10n = AppLocalizations.of(context); return Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, @@ -195,16 +196,29 @@ class StopWatchState extends ConsumerState { Row( mainAxisAlignment: MainAxisAlignment.center, children: [ + _running + ? ElevatedButton.icon( + onPressed: _toggle, + icon: Icon(Icons.stop), + label: Text(l10n.actionPause), + ) + : ElevatedButton.icon( + onPressed: _toggle, + icon: Icon(Icons.play_arrow), + label: Text(_hasMeasurement() ? l10n.actionResume : l10n.actionStart), + ), + SizedBox(width: 8), ElevatedButton.icon( onPressed: _hasMeasurement() ? _reset : null, icon: Icon(Icons.refresh), - label: Text(AppLocalizations.of(context).textReset), + label: Text(l10n.actionReset), ), - SizedBox(width: 20), + SizedBox(width: 18), ElevatedButton.icon( - onPressed: _hasMeasurement() ? _saveMeasurement : null, - icon: Icon(Icons.save), - label: Text(AppLocalizations.of(context).textSave)), + onPressed: _hasMeasurement() ? _saveMeasurement : null, + icon: Icon(Icons.save), + label: Text(l10n.actionSave), + ), ], ) ],