Skip to content

Commit

Permalink
Merge pull request #299 from wiredashio/fix-missing-localized-strings
Browse files Browse the repository at this point in the history
  • Loading branch information
passsy authored Sep 4, 2023
2 parents 32ffd44 + 2206d87 commit b5237aa
Show file tree
Hide file tree
Showing 17 changed files with 64 additions and 7 deletions.
1 change: 1 addition & 0 deletions lib/assets/l10n/wiredash_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"feedbackStep3ScreenshotOverviewAddScreenshotButton": "Add screenshot",

"feedbackStep3ScreenshotBarNavigateTitle": "Take a screenshot",
"feedbackStep3ScreenshotBottomBarTitle": "Include a screenshot for more context",
"feedbackStep3ScreenshotBarDrawTitle": "Draw on screen to add highlights",
"feedbackStep3ScreenshotBarDrawUndoButton": "Undo",
"feedbackStep3ScreenshotBarCaptureButton": "Capture",
Expand Down
6 changes: 6 additions & 0 deletions lib/assets/l10n/wiredash_localizations.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,12 @@ abstract class WiredashLocalizations {
/// **'Take a screenshot'**
String get feedbackStep3ScreenshotBarNavigateTitle;

/// No description provided for @feedbackStep3ScreenshotBottomBarTitle.
///
/// In en, this message translates to:
/// **'Include a screenshot for more context'**
String get feedbackStep3ScreenshotBottomBarTitle;

/// No description provided for @feedbackStep3ScreenshotBarDrawTitle.
///
/// In en, this message translates to:
Expand Down
4 changes: 4 additions & 0 deletions lib/assets/l10n/wiredash_localizations_ar.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ class WiredashLocalizationsAr extends WiredashLocalizations {
@override
String get feedbackStep3ScreenshotBarNavigateTitle => 'أخذ لقطة للشاشة';

@override
String get feedbackStep3ScreenshotBottomBarTitle =>
'Include a screenshot for more context';

@override
String get feedbackStep3ScreenshotBarDrawTitle =>
'أرسم على الشاشة لإضافة تأشيرة';
Expand Down
4 changes: 4 additions & 0 deletions lib/assets/l10n/wiredash_localizations_cs.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ class WiredashLocalizationsCs extends WiredashLocalizations {
String get feedbackStep3ScreenshotBarNavigateTitle =>
'Pořiďte snímek obrazovky';

@override
String get feedbackStep3ScreenshotBottomBarTitle =>
'Include a screenshot for more context';

@override
String get feedbackStep3ScreenshotBarDrawTitle =>
'Kreslení na obrazovce pro přidání zvýraznění';
Expand Down
4 changes: 4 additions & 0 deletions lib/assets/l10n/wiredash_localizations_da.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ class WiredashLocalizationsDa extends WiredashLocalizations {
@override
String get feedbackStep3ScreenshotBarNavigateTitle => 'Tag et skærmbillede';

@override
String get feedbackStep3ScreenshotBottomBarTitle =>
'Include a screenshot for more context';

@override
String get feedbackStep3ScreenshotBarDrawTitle =>
'Tegn på skærmen for at tilføje højdepunkter';
Expand Down
4 changes: 4 additions & 0 deletions lib/assets/l10n/wiredash_localizations_de.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ class WiredashLocalizationsDe extends WiredashLocalizations {
@override
String get feedbackStep3ScreenshotBarNavigateTitle => 'Screenshot erstellen';

@override
String get feedbackStep3ScreenshotBottomBarTitle =>
'Include a screenshot for more context';

@override
String get feedbackStep3ScreenshotBarDrawTitle =>
'Füge Markierungen mit dem Zeichnen-Tool hinzu';
Expand Down
4 changes: 4 additions & 0 deletions lib/assets/l10n/wiredash_localizations_en.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ class WiredashLocalizationsEn extends WiredashLocalizations {
@override
String get feedbackStep3ScreenshotBarNavigateTitle => 'Take a screenshot';

@override
String get feedbackStep3ScreenshotBottomBarTitle =>
'Include a screenshot for more context';

@override
String get feedbackStep3ScreenshotBarDrawTitle =>
'Draw on screen to add highlights';
Expand Down
4 changes: 4 additions & 0 deletions lib/assets/l10n/wiredash_localizations_es.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ class WiredashLocalizationsEs extends WiredashLocalizations {
String get feedbackStep3ScreenshotBarNavigateTitle =>
'Haz una captura de pantalla';

@override
String get feedbackStep3ScreenshotBottomBarTitle =>
'Include a screenshot for more context';

@override
String get feedbackStep3ScreenshotBarDrawTitle =>
'Marca los detalles importantes';
Expand Down
4 changes: 4 additions & 0 deletions lib/assets/l10n/wiredash_localizations_fr.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ class WiredashLocalizationsFr extends WiredashLocalizations {
String get feedbackStep3ScreenshotBarNavigateTitle =>
'Prendre une capture d\'écran';

@override
String get feedbackStep3ScreenshotBottomBarTitle =>
'Include a screenshot for more context';

@override
String get feedbackStep3ScreenshotBarDrawTitle =>
'Dessiner sur l\'écran pour en mettre en avant une partie';
Expand Down
4 changes: 4 additions & 0 deletions lib/assets/l10n/wiredash_localizations_hu.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ class WiredashLocalizationsHu extends WiredashLocalizations {
@override
String get feedbackStep3ScreenshotBarNavigateTitle => 'Készíts képernyőképet';

@override
String get feedbackStep3ScreenshotBottomBarTitle =>
'Include a screenshot for more context';

@override
String get feedbackStep3ScreenshotBarDrawTitle =>
'Rajzolj a képernyőre hogy emeld ki a lényeget';
Expand Down
4 changes: 4 additions & 0 deletions lib/assets/l10n/wiredash_localizations_pl.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ class WiredashLocalizationsPl extends WiredashLocalizations {
@override
String get feedbackStep3ScreenshotBarNavigateTitle => 'Wykonaj zrzut ekranu';

@override
String get feedbackStep3ScreenshotBottomBarTitle =>
'Include a screenshot for more context';

@override
String get feedbackStep3ScreenshotBarDrawTitle =>
'Zaznacz rysując po ekranie';
Expand Down
4 changes: 4 additions & 0 deletions lib/assets/l10n/wiredash_localizations_pt.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ class WiredashLocalizationsPt extends WiredashLocalizations {
String get feedbackStep3ScreenshotBarNavigateTitle =>
'Faça uma captura de tela';

@override
String get feedbackStep3ScreenshotBottomBarTitle =>
'Include a screenshot for more context';

@override
String get feedbackStep3ScreenshotBarDrawTitle =>
'Indique os detalhes relevantes';
Expand Down
4 changes: 4 additions & 0 deletions lib/assets/l10n/wiredash_localizations_tr.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ class WiredashLocalizationsTr extends WiredashLocalizations {
@override
String get feedbackStep3ScreenshotBarNavigateTitle => 'Ekran görüntüsü al';

@override
String get feedbackStep3ScreenshotBottomBarTitle =>
'Include a screenshot for more context';

@override
String get feedbackStep3ScreenshotBarDrawTitle =>
'Bir şeyler göstermek için ekranın üzerine çiz';
Expand Down
15 changes: 10 additions & 5 deletions lib/src/core/widgets/backdrop/step_page_scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:wiredash/src/core/widgets/measure_size.dart';

/// The default layout of a step in [LarryPageView]
class StepPageScaffold extends StatefulWidget {
const StepPageScaffold({
StepPageScaffold({
this.currentStep,
this.totalSteps,
this.title,
Expand All @@ -23,7 +23,12 @@ class StepPageScaffold extends StatefulWidget {
this.onClose,
this.alignment,
this.minHeight,
});
}) : assert(() {
if (discardLabel != null && discardConfirmLabel == null) {
throw 'discardConfirmLabel must be set if discardLabel is set';
}
return true;
}());

final int? currentStep;
final int? totalSteps;
Expand Down Expand Up @@ -201,7 +206,8 @@ class StepPageScaffoldState extends State<StepPageScaffold> {
);
},
)
else if (widget.discardLabel != null) ...[
else if (widget.discardLabel != null &&
widget.discardConfirmLabel != null) ...[
TronLabeledButton(
onTap: () {
setState(() {
Expand Down Expand Up @@ -233,8 +239,7 @@ class StepPageScaffoldState extends State<StepPageScaffold> {
)
: DefaultTextStyle(
style: context.text.caption.onBackground,
child: widget.discardConfirmLabel ??
const Text('Really?'),
child: widget.discardConfirmLabel!,
),
),
],
Expand Down
2 changes: 1 addition & 1 deletion lib/src/feedback/feedback_backdrop.dart
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ Widget? _buildBackgroundLayer(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Text(
'Include a screenshot for more context',
context.l10n.feedbackStep3ScreenshotBottomBarTitle,
style: context.text.appbarTitle.onBackground,
textAlign: TextAlign.center,
),
Expand Down
1 change: 1 addition & 0 deletions lib/src/promoterscore/step_1_rating.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class _PsStep1RatingState extends State<PsStep1Rating> {
return StepPageScaffold(
title: Text(question),
discardLabel: Text(context.l10n.feedbackCloseButton),
discardConfirmLabel: Text(context.l10n.feedbackDiscardConfirmButton),
indicator: const StepIndicator(
completed: false,
currentStep: 1,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dev_dependencies:
flutter_test:
sdk: flutter
lint: '>=1.10.0 <3.0.0'
spot: '>=0.3.1 <1.0.0'
spot: '>=0.3.1 <0.5.0'
test: ^1.21.0
transparent_image: ^2.0.0

Expand Down

0 comments on commit b5237aa

Please sign in to comment.