Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ import de.rki.coronawarnapp.ui.viewmodel.SubmissionViewModel
import de.rki.coronawarnapp.util.DialogHelper
import de.rki.coronawarnapp.util.TanHelper
import de.rki.coronawarnapp.util.observeEvent
import kotlinx.android.synthetic.main.include_submission_tan.submission_tan_error
import kotlinx.android.synthetic.main.include_submission_tan.submission_tan_character_error
import kotlinx.android.synthetic.main.include_submission_tan.*

/**
* Fragment for TAN entry
Expand All @@ -50,8 +49,8 @@ class SubmissionTanFragment : Fragment() {
return when (exception) {
is BadRequestException -> DialogHelper.DialogInstance(
requireActivity(),
R.string.submission_error_dialog_web_test_paired_title,
R.string.submission_error_dialog_web_test_paired_body,
R.string.submission_error_dialog_web_test_paired_title_tan,
R.string.submission_error_dialog_web_test_paired_body_tan,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are already related Strings..
If you want, you can use them:
is BadRequestException -> DialogHelper.DialogInstance(
requireActivity(),
R.string.submission_error_dialog_web_tan_invalid_title,
R.string.submission_error_dialog_web_tan_invalid_body,
R.string.submission_error_dialog_web_tan_invalid_button_positive,
null,
true,
::goBack
)

Kind Regards.
Bernd

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... but this key constant has not the value as in https://jira.itc.sap.com/browse/EXPOSUREAPP-2552.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

submission_error_dialog_web_tan_invalid_body = Die erzeugte Übermittlungs-TAN ist ungültig. Bitte kontaktieren Sie die technische Hotline über App-Informationen → Technische Hotline.
but in the screenshot in the Ticket it says otherwise.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Luka just updated the ticket (it was confusing)...

R.string.submission_error_dialog_web_test_paired_button_positive,
null,
true,
Expand Down
8 changes: 6 additions & 2 deletions Corona-Warn-App/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -740,10 +740,14 @@
<!-- XBUT: Positive button for generic web request error -->
<string name="submission_error_dialog_web_generic_error_button_positive">"Zurück"</string>

<!-- XHED: Dialog title for already paired test error -->
<!-- XHED: Dialog title for already paired test error: qr -->
<string name="submission_error_dialog_web_test_paired_title">"QR-Code ist ungültig"</string>
<!-- XMSG: Dialog body for already paired test error -->
<!-- XMSG: Dialog body for already paired test error: qr -->
<string name="submission_error_dialog_web_test_paired_body">"Der QR-Code ist ungültig oder wurde bereits auf einem Smartphone registriert. Ihr Testergebnis bekommen Sie vom Testcenter oder Labor, unabhängig von der Gültigkeit des QR-Codes. Wenn Ihr Test positiv ausfällt, bekommen Sie vom Gesundheitsamt eine Mitteilung."</string>
<!-- XHED: Dialog title for already paired test error: tan -->
<string name="submission_error_dialog_web_test_paired_title_tan">"TAN ist ungültig"</string>
<!-- XMSG: Dialog body for already paired test via tan - error: tan -->
<string name="submission_error_dialog_web_test_paired_body_tan">"Die TAN ist ungültig oder wurde bereits auf einem Smartphone registriert. Ihr Testergebnis bekommen Sie vom Testcenter oder Labor, unabhängig von der Gültigkeit der TAN. Bei einem positiven Testergebnis wird auch das zuständige Gesundheitsamt auf dem gesetzlich vorgeschriebenen Weg informiert und sich an Sie wenden."</string>
<!-- XBUT: Positive button for already paired test error -->
<string name="submission_error_dialog_web_test_paired_button_positive">"Zurück"</string>

Expand Down
4 changes: 4 additions & 0 deletions Corona-Warn-App/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,10 @@
<string name="submission_error_dialog_web_test_paired_title">"QR code is invalid"</string>
<!-- XMSG: Dialog body for already paired test error -->
<string name="submission_error_dialog_web_test_paired_body">"The QR code is invalid or has been registered on another smartphone already. You will receive your test result from the test center or laboratory regardless of the validity of the QR code. If you are diagnosed with COVID-19, you will be notified by the public health authority."</string>
<!-- XHED: Dialog title for already paired test error: tan -->
<string name="submission_error_dialog_web_test_paired_title_tan" />
<!-- XMSG: Dialog body for already paired test via tan - error: tan -->
<string name="submission_error_dialog_web_test_paired_body_tan" />
<!-- XBUT: Positive button for already paired test error -->
<string name="submission_error_dialog_web_test_paired_button_positive">"Back"</string>

Expand Down