Skip to content

Commit

Permalink
Merge pull request #1482 from minvws/explo/4.10-part2-2
Browse files Browse the repository at this point in the history
Explo/4.10 findings
  • Loading branch information
ktiniatros authored Jan 13, 2023
2 parents ca5fe60 + e2e58b8 commit 179de4c
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 7 deletions.
23 changes: 23 additions & 0 deletions design/src/main/res/drawable/ic_warning.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="22dp"
android:height="20dp"
android:viewportWidth="22"
android:viewportHeight="20">
<path
android:pathData="M11,7L11,11.5"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#B30900"
android:strokeLineCap="round"/>
<path
android:pathData="M9.672,1.919L1.206,16.542C1.071,16.776 1,17.041 1,17.31C1,17.58 1.07,17.845 1.205,18.079C1.339,18.313 1.533,18.507 1.766,18.643C1.999,18.778 2.264,18.85 2.534,18.851H19.466C19.736,18.85 20.001,18.778 20.234,18.643C20.467,18.507 20.661,18.313 20.795,18.079C20.93,17.845 21,17.58 21,17.31C21,17.041 20.929,16.776 20.794,16.542L12.328,1.919C12.194,1.685 12,1.491 11.767,1.355C11.534,1.22 11.269,1.149 11,1.149C10.731,1.149 10.466,1.22 10.233,1.355C10,1.491 9.806,1.685 9.672,1.919V1.919Z"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#B30900"
android:strokeLineCap="round"/>
<path
android:pathData="M11,16.542C11.637,16.542 12.154,16.025 12.154,15.388C12.154,14.75 11.637,14.233 11,14.233C10.362,14.233 9.845,14.75 9.845,15.388C9.845,16.025 10.362,16.542 11,16.542Z"
android:fillColor="#B30900"/>
</vector>
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class MenuViewModelImpl(
MenuSection(
menuItems = listOf(
MenuSection.MenuItem(
icon = R.drawable.ic_menu_info,
icon = R.drawable.ic_warning,
color = R.color.error,
title = R.string.holder_menu_resetApp,
onClick = MenuSection.MenuItem.OnClick.ResetApp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ class RecoveryInfoScreenUtilImpl(
val validFromDate = event.recovery?.validFrom?.formatDayMonthYear() ?: ""
val validUntilDate = event.recovery?.validUntil?.formatDayMonthYear() ?: ""

val isPaperCertificate = europeanCredential != null

val title =
if (europeanCredential != null) resources.getString(R.string.your_vaccination_explanation_toolbar_title) else resources.getString(
R.string.your_test_result_explanation_toolbar_title
Expand Down Expand Up @@ -110,7 +112,13 @@ class RecoveryInfoScreenUtilImpl(
),
"<br/>",
createdLine(
resources.getString(R.string.recovery_explanation_description_unique_test_identifier),
resources.getString(
if (isPaperCertificate) {
R.string.holder_dcc_test_identifier
} else {
R.string.your_test_result_explanation_description_unique_identifier
}
),
event.unique
),
if (europeanCredential != null && addExplanation) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@ class TestInfoScreenUtilImpl(

val country = getCountry(event.negativeTest?.country)

val isPaperCertificate = europeanCredential != null

val title =
if (europeanCredential != null) resources.getString(R.string.your_vaccination_explanation_toolbar_title) else resources.getString(
R.string.your_test_result_explanation_toolbar_title
)
val header = if (europeanCredential != null) {
val header = if (isPaperCertificate) {
resources.getString(R.string.paper_proof_event_explanation_header)
} else {
resources.getString(R.string.your_test_result_explanation_description_header)
Expand Down Expand Up @@ -152,7 +154,13 @@ class TestInfoScreenUtilImpl(
},
"<br/>",
createdLine(
resources.getString(R.string.your_test_result_explanation_description_unique_identifier),
resources.getString(
if (isPaperCertificate) {
R.string.holder_dcc_test_identifier
} else {
R.string.your_test_result_explanation_description_unique_identifier
}
),
unique
),
if (europeanCredential != null && addExplanation) {
Expand Down
3 changes: 2 additions & 1 deletion holder/src/main/res/values-en/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<string name="general_readmore">Read more</string>
<string name="holder_authentication_popup_digid_title">Login was cancelled</string>
<string name="holder_dcc_alert_message">You can try to add a paper certificate again later.</string>
<string name="holder_dcc_test_identifier">Unique certificate identifier:</string>
<string name="holder_recovery_alert_message">Doing so will stop the creation of your certificate. You will have to retrieve your test result again later.</string>
<string name="holder_test_alert_message">Doing so will stop the creation of your certificate. You will have to retrieve your test result again later.</string>
<string name="general_cancel">Cancel</string>
Expand Down Expand Up @@ -255,7 +256,7 @@
<string name="qr_explanation_description_eu_test_name">Name:</string>
<string name="qr_explanation_description_eu_test_birth_date">Date of birth*:</string>
<string name="qr_explanation_description_eu_test_disease">Disease targeted:</string>
<string name="qr_explanation_description_eu_test_test_type">Type of test:</string>
<string name="qr_explanation_description_eu_test_test_type">Test type:</string>
<string name="qr_explanation_description_eu_test_test_name">Test name:</string>
<string name="qr_explanation_description_eu_test_test_date">Test date:</string>
<string name="qr_explanation_description_eu_test_test_result">Test result:</string>
Expand Down
3 changes: 2 additions & 1 deletion holder/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<string name="general_readmore">Lees meer</string>
<string name="holder_authentication_popup_digid_title">Inloggen afgebroken</string>
<string name="holder_dcc_alert_message">Je kunt later opnieuw proberen deze QR-code in de app te zetten.</string>
<string name="holder_dcc_test_identifier">Uniek certificaatnummer:</string>
<string name="holder_recovery_alert_message">Hierdoor stop je het maken van een bewijs en moet je later opnieuw je testuitslag ophalen.</string>
<string name="holder_test_alert_message">Hierdoor stop je het maken van een bewijs en moet je later opnieuw je testuitslag ophalen.</string>
<string name="general_cancel">Annuleer</string>
Expand Down Expand Up @@ -255,7 +256,7 @@
<string name="qr_explanation_description_eu_test_name">Naam / Name:</string>
<string name="qr_explanation_description_eu_test_birth_date">Geboortedatum / Date of birth*:</string>
<string name="qr_explanation_description_eu_test_disease">Ziekteverwekker / Disease targeted:</string>
<string name="qr_explanation_description_eu_test_test_type">Type test / Type of test:</string>
<string name="qr_explanation_description_eu_test_test_type">Type test / Test type:</string>
<string name="qr_explanation_description_eu_test_test_name">Testnaam / Test name:</string>
<string name="qr_explanation_description_eu_test_test_date">Testdatum / Test date:</string>
<string name="qr_explanation_description_eu_test_test_result">Testuitslag / Test result:</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class QrInfoScreenUtilImplTest : AutoCloseKoinTest() {
val infoScreen = infoScreenUtil.getForEuropeanTestQr(json)

assertEquals(
"In jouw internationale QR-code staan de volgende gegevens:<br/><br/>Naam / Name:<br/><b>ten Bouwer, Bob</b><br/><br/>Geboortedatum / Date of birth*:<br/><b>18-08-1991</b><br/><br/>Ziekteverwekker / Disease targeted:<br/><b>COVID-19</b><br/><br/>Type test / Type of test:<br/><b>LP6464-4</b><br/><br/>Testdatum / Test date:<br/><b>dinsdag 10 augustus 2021 05:10 CEST</b><br/><br/>Testuitslag / Test result:<br/><b>negatief (geen coronavirus vastgesteld) / negative (no coronavirus detected)</b><br/><br/>Testlocatie / Test location:<br/><b>Facility approved by the State of The Netherlands</b><br/><br/>Getest in / Tested in:<br/><b>Nederland / The Netherlands</b><br/><br/>Afgever certificaat / Certificate issuer:<br/><b>Ministerie van VWS / Ministry of Health, Welfare and Sport</b><br/><br/>Uniek certificaatnummer / Unique certificate identifier:<br/><b>URN:UCI:01:NL:PJ7JLSZ4KRGX5O2E7OD342#E</b><br/><br/>",
"In jouw internationale QR-code staan de volgende gegevens:<br/><br/>Naam / Name:<br/><b>ten Bouwer, Bob</b><br/><br/>Geboortedatum / Date of birth*:<br/><b>18-08-1991</b><br/><br/>Ziekteverwekker / Disease targeted:<br/><b>COVID-19</b><br/><br/>Type test / Test type:<br/><b>LP6464-4</b><br/><br/>Testdatum / Test date:<br/><b>dinsdag 10 augustus 2021 05:10 CEST</b><br/><br/>Testuitslag / Test result:<br/><b>negatief (geen coronavirus vastgesteld) / negative (no coronavirus detected)</b><br/><br/>Testlocatie / Test location:<br/><b>Facility approved by the State of The Netherlands</b><br/><br/>Getest in / Tested in:<br/><b>Nederland / The Netherlands</b><br/><br/>Afgever certificaat / Certificate issuer:<br/><b>Ministerie van VWS / Ministry of Health, Welfare and Sport</b><br/><br/>Uniek certificaatnummer / Unique certificate identifier:<br/><b>URN:UCI:01:NL:PJ7JLSZ4KRGX5O2E7OD342#E</b><br/><br/>",
infoScreen.description
)
assertEquals(
Expand Down

0 comments on commit 179de4c

Please sign in to comment.