Skip to content

Commit

Permalink
Merge pull request #789 from d-loose/ubuntu-bug-message
Browse files Browse the repository at this point in the history
feat(provision): show message to run ubuntu-bug on error page
  • Loading branch information
d-loose authored and GitHub Actions committed Jul 8, 2024
2 parents f3c8a54 + d8a1b80 commit 9b015d0
Show file tree
Hide file tree
Showing 87 changed files with 983 additions and 1 deletion.
15 changes: 15 additions & 0 deletions packages/ubuntu_provision/lib/src/error/error_page.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import 'dart:io';

import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:ubuntu_provision/src/error/error_model.dart';
import 'package:ubuntu_provision/ubuntu_provision.dart';
Expand Down Expand Up @@ -36,6 +39,8 @@ class ErrorPage extends ConsumerWidget with ProvisioningPage {
final endText = match?.end != null ? bodyText.substring(match!.end) : '';
final model = ref.watch(errorModelProvider);

final snapName = Platform.environment['SNAP_NAME'];

return WizardPage(
headerPadding: EdgeInsets.zero,
contentPadding: EdgeInsets.zero,
Expand Down Expand Up @@ -72,6 +77,16 @@ class ErrorPage extends ConsumerWidget with ProvisioningPage {
],
),
),
if (snapName != null) ...[
const SizedBox(height: 20),
Html(
data: lang.errorPageUbuntuBug(snapName),
style: {
'body': Style(margin: Margins.zero),
'pre': Style(fontFamily: 'Ubuntu Mono')
},
),
]
],
),
),
Expand Down
10 changes: 9 additions & 1 deletion packages/ubuntu_provision/lib/src/l10n/ubuntu_provision_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@
"accessibilityDesktopZoomLabel": "Desktop zoom",
"errorPageTitle": "Something went wrong",
"errorPageUnexpected": "We're sorry, but we're not sure what the error is. You can try restarting your computer and start the installation process again. You can can also <a>report the issue</a>.",
"errorPageUbuntuBug": "To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug {SNAP}</pre> in a terminal, or from the command console (Alt+F2).",
"@errorPageUbuntuBug": {
"placeholders": {
"SNAP": {
"type": "String"
}
}
},
"errorPageShowLog": "Show log",
"errorPageHideLog": "Hide log",
"restart": "Restart",
Expand Down Expand Up @@ -136,4 +144,4 @@
"eulaReviewTerms": "Review the license terms",
"eulaReadAndAcceptTerms": "To continue setting up this machine, you must read and accept the license agreement terms.",
"eulaAcceptTerms": "I have read and accept these terms"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,12 @@ abstract class UbuntuProvisionLocalizations {
/// **'We\'re sorry, but we\'re not sure what the error is. You can try restarting your computer and start the installation process again. You can can also <a>report the issue</a>.'**
String get errorPageUnexpected;

/// No description provided for @errorPageUbuntuBug.
///
/// In en, this message translates to:
/// **'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug {SNAP}</pre> in a terminal, or from the command console (Alt+F2).'**
String errorPageUbuntuBug(String SNAP);

/// No description provided for @errorPageShowLog.
///
/// In en, this message translates to:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsAm extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'We\'re sorry, but we\'re not sure what the error is. You can try restarting your computer and start the installation process again. You can can also <a>report the issue</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Show log';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsAr extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'We\'re sorry, but we\'re not sure what the error is. You can try restarting your computer and start the installation process again. You can can also <a>report the issue</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Show log';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsBe extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'Нам вельмі шкада, але мы не ўпэўненыя, якая памылка дакладна адбылася. Вы можаце перазапусціць камп\'ютар і пачаць працэс усталявання яшчэ раз. Вы таксама можаце <a>паведаміць аб праблеме</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Паказаць журнал';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsBg extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'We\'re sorry, but we\'re not sure what the error is. You can try restarting your computer and start the installation process again. You can can also <a>report the issue</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Show log';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsBn extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'We\'re sorry, but we\'re not sure what the error is. You can try restarting your computer and start the installation process again. You can can also <a>report the issue</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Show log';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsBo extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'We\'re sorry, but we\'re not sure what the error is. You can try restarting your computer and start the installation process again. You can can also <a>report the issue</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Show log';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsBs extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'We\'re sorry, but we\'re not sure what the error is. You can try restarting your computer and start the installation process again. You can can also <a>report the issue</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Show log';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsCa extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'We\'re sorry, but we\'re not sure what the error is. You can try restarting your computer and start the installation process again. You can can also <a>report the issue</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Show log';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsCs extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'Je nám líto, ale nejsme si jisti, v čem je chyba. Můžete zkusit restartovat počítač a spustit proces instalace znovu. Můžete také <a>problém nahlásit</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Zobrazit záznam';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsCy extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'We\'re sorry, but we\'re not sure what the error is. You can try restarting your computer and start the installation process again. You can can also <a>report the issue</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Show log';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsDa extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'Vi beklager, men vi ved ikke helt, hvad fejlen er. Du kan genstarte computeren og starte installationsproceduren igen. Du kan også <a>indrapportere problemet</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Vis log';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsDe extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'Es tut uns leid, aber wir sind uns nicht sicher, was der Fehler ist. Sie können versuchen, Ihren Computer neu zu starten und den Installationsprozess erneut zu beginnen. Sie können auch das <a>Problem melden</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Protokoll anzeigen';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsDz extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'We\'re sorry, but we\'re not sure what the error is. You can try restarting your computer and start the installation process again. You can can also <a>report the issue</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Show log';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsEl extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'We\'re sorry, but we\'re not sure what the error is. You can try restarting your computer and start the installation process again. You can can also <a>report the issue</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Show log';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsEn extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'We\'re sorry, but we\'re not sure what the error is. You can try restarting your computer and start the installation process again. You can can also <a>report the issue</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Show log';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsEo extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'Bedaŭrinde, ni ne konas la eraron. Vi povas provi restartigi vian komputilon kaj rekomenci la instalon. Vi ankaŭ povas <a>raporti la problemon</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Montri protokolon';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsEs extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'Lo sentimos, pero no estamos seguros de cuál es el error. Puede intentar reiniciar su computadora y comenzar el proceso de instalación nuevamente. También puede <a>informar del problema</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Mostrar registro';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsEt extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'We\'re sorry, but we\'re not sure what the error is. You can try restarting your computer and start the installation process again. You can can also <a>report the issue</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Show log';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsEu extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'We\'re sorry, but we\'re not sure what the error is. You can try restarting your computer and start the installation process again. You can can also <a>report the issue</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Show log';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsFa extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'متأسفانه مطمئن نیستیم که خطا از کجاست. می‌توانید رایانه‌تان را دوباره راه انداخته و فرایند نصب را آغاز کنید. همچنین می‌توانید <a>مشکل را گزارش کنید</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'نمایش گزارش‌ها';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsFi extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'Valitettavasti emme ole varmoja, mikä aiheutti ongelman. Voit käynnistää tietokoneen uudelleen ja käynnistää asennuksen uudelleen. Voit myös <a>ilmoittaa kohtaamastasi ongelmasta</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Näytä loki';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsFr extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'Nous sommes désolés, mais nous ne sommes pas sûrs de l\'erreur. Vous pouvez essayer de redémarrer votre ordinateur et recommencer le processus d\'installation. Vous pouvez également <a> signaler le problème</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Afficher le journal';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsGa extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'We\'re sorry, but we\'re not sure what the error is. You can try restarting your computer and start the installation process again. You can can also <a>report the issue</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Show log';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsGl extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'We\'re sorry, but we\'re not sure what the error is. You can try restarting your computer and start the installation process again. You can can also <a>report the issue</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Show log';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsGu extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'We\'re sorry, but we\'re not sure what the error is. You can try restarting your computer and start the installation process again. You can can also <a>report the issue</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'Show log';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class UbuntuProvisionLocalizationsHe extends UbuntuProvisionLocalizations {
@override
String get errorPageUnexpected => 'אנחנו לא בטוחים מה השגיאה, סליחה. אפשר לנסות להפעיל את המחשב מחדש ולהפעיל את תהליך ההתקנה מחדש. אפשר גם <a>לדווח על התקלה</a>.';

@override
String errorPageUbuntuBug(String SNAP) {
return 'To send an automated bug report including relevant debug information, please run <pre>sudo ubuntu-bug $SNAP</pre> in a terminal, or from the command console (Alt+F2).';
}

@override
String get errorPageShowLog => 'הצגת היומן';

Expand Down
Loading

0 comments on commit 9b015d0

Please sign in to comment.