Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Commit

Permalink
Merge pull request #380 from immuni-app/feature/vaccine-booster-validity
Browse files Browse the repository at this point in the history
Added the vaccine booster validity
  • Loading branch information
astagi authored Jan 31, 2022
2 parents 945cf47 + 1103aff commit 57defff
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,39 +191,39 @@ private fun eudccMap(): Map<String, Map<String, String>> {
"vaccine_first_dose" to "Certificazione valida fino alla prossima dose",
"vaccine_fully_completed" to "Certificazione valida 365 giorni (12 mesi) dalla data dell'ultima somministrazione",
"healing_certificate" to "Certificazione valida in Unione Europea fino alla data di fine validità e valida solo in Italia fino a 6 mesi dalla data di inizio validità",
"exemption_certificate" to "Certificato esenzione (illimitata)"
"vaccine_booster" to "Certificazione valida 180 giorni (6 mesi) dalla data dell'ultima somministrazione, salvo modifiche normative"
),
"de" to mapOf(
"molecular_test" to "Bescheinigung gültig für 72 Stunden ab dem Zeitpunkt der Abholung",
"rapid_test" to "Bescheinigung gültig für 48 Stunden ab dem Zeitpunkt der Abholung",
"vaccine_first_dose" to "Zertifizierung gültig bis zur nächsten Dosis",
"vaccine_fully_completed" to "Zertifizierung gültig für 365 Tage (12 Monate) ab dem Datum der letzten Verabreichung",
"healing_certificate" to "Zertifizierung gültig in der Europäischen Union bis zum Gültigkeitsende und nur in Italien bis zu 6 Monate ab Gültigkeitsbeginn gültig",
"exemption_certificate" to "Befreiungsbescheinigung (unbefristet)"
"vaccine_booster" to "Zertifizierung gültig für 180 Tage (6 Monate) ab dem Datum der letzten Verabreichung, vorbehaltlich behördlicher Änderungen"
),
"en" to mapOf(
"molecular_test" to "Certification valid for 72 hours from the time of collection",
"rapid_test" to "Certification valid for 48 hours from the time of collection",
"vaccine_first_dose" to "Certification valid until next dose",
"vaccine_fully_completed" to "Certification valid for 365 days (12 months) from the date of the last administration",
"healing_certificate" to "Certification valid in the European Union until the end of validity date and valid only in Italy up to 6 months from the start of validity date",
"exemption_certificate" to "Certificate of exemption (unlimited)"
"vaccine_booster" to "Certification valid for 180 days (6 months) from the date of the last administration, subject to regulatory changes"
),
"es" to mapOf(
"molecular_test" to "Certificación válida por 72 horas desde el momento de la recogida.",
"rapid_test" to "Certificación válida por 48 horas desde el momento de la recogida.",
"vaccine_first_dose" to "Certificación válida hasta la próxima dosis",
"vaccine_fully_completed" to "Certificación válida por 365 días (12 meses) a partir de la fecha de la última administración.",
"healing_certificate" to "Certificación válida en la Unión Europea hasta el final de la fecha de validez y válida solo en Italia hasta 6 meses desde el inicio de la fecha de validez",
"exemption_certificate" to "Certificado de exención (ilimitado)"
"vaccine_booster" to "Certificación válida por 180 días (6 meses) a partir de la fecha de la última administración, sujeta a cambios regulatorios"
),
"fr" to mapOf(
"molecular_test" to "Attestation valable 72h à compter de la collecte",
"rapid_test" to "Attestation valable 48h à compter de la collecte",
"vaccine_first_dose" to "Certification valable jusqu'à la prochaine dose",
"vaccine_fully_completed" to "Certification valable 365 jours (12 mois) à compter de la date de la dernière administration",
"healing_certificate" to "Certification valable dans l'Union européenne jusqu'à la date de fin de validité et valable uniquement en Italie jusqu'à 6 mois à compter de la date de début de validité",
"exemption_certificate" to "Certificat d'exonération (illimité)"
"vaccine_booster" to "Certification valable 180 jours (6 mois) à compter de la date de la dernière administration, sous réserve de modifications réglementaires"
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,19 @@ class MoreDetailGreenCertificate : PopupDialogFragment(), KoinComponent {
val vaccineFirstDose = settingsManager.settings.value.eudcc_expiration[Locale.getDefault().language]!!["vaccine_first_dose"]
val rapidTest = settingsManager.settings.value.eudcc_expiration[Locale.getDefault().language]!!["rapid_test"]
val molecularTest = settingsManager.settings.value.eudcc_expiration[Locale.getDefault().language]!!["molecular_test"]
val healing_certificate = settingsManager.settings.value.eudcc_expiration[Locale.getDefault().language]!!["healing_certificate"]
val exemptionCertificate = settingsManager.settings.value.eudcc_expiration[Locale.getDefault().language]!!["exemption_certificate"]
val healingCertificate = settingsManager.settings.value.eudcc_expiration[Locale.getDefault().language]!!["healing_certificate"]
val vaccineBooster = settingsManager.settings.value.eudcc_expiration[Locale.getDefault().language]!!["vaccine_booster"]
setUI(
vaccineFullyCompleted,
vaccineFirstDose,
molecularTest,
rapidTest,
healing_certificate,
exemptionCertificate
healingCertificate,
vaccineBooster
)
}

private fun setUI(validUntilCompleteVaccine: String?, validUntilnotCompleteVaccine: String?, validUntilMolecularTest: String?, validUntilQuickTest: String?, healing_certificate: String?, exemptionCertificate: String?) {
private fun setUI(validUntilCompleteVaccine: String?, validUntilnotCompleteVaccine: String?, validUntilMolecularTest: String?, validUntilQuickTest: String?, healingCertificate: String?, vaccineBooster: String?) {
var isExemption = false
when (true) {
greenCertificateDetail.data?.vaccinations != null -> {
Expand Down Expand Up @@ -110,13 +110,12 @@ class MoreDetailGreenCertificate : PopupDialogFragment(), KoinComponent {
)
?.let { getString(it) })
validityVaccine.text =
if (greenCertificateDetail.data?.vaccinations?.get(0)!!.doseNumber >= greenCertificateDetail.data?.vaccinations?.get(
0
)!!.totalSeriesOfDoses
) {
if (greenCertificateDetail.data?.vaccinations?.get(0)!!.doseNumber < greenCertificateDetail.data?.vaccinations?.get(0)!!.totalSeriesOfDoses) {
validUntilnotCompleteVaccine ?: getString(R.string.green_certificate_validity_vaccine_partial)
} else if (greenCertificateDetail.data?.vaccinations?.get(0)!!.doseNumber == greenCertificateDetail.data?.vaccinations?.get(0)!!.totalSeriesOfDoses && greenCertificateDetail.data?.vaccinations?.get(0)!!.totalSeriesOfDoses < 3) {
validUntilCompleteVaccine ?: getString(R.string.green_certificate_validity_vaccine_complete)
} else {
validUntilnotCompleteVaccine ?: getString(R.string.green_certificate_validity_vaccine_partial)
vaccineBooster ?: getString(R.string.green_certificate_validity_vaccine_booster)
}
dosesNumber.text = String.format(
requireContext().getString(R.string.green_certificate_more_details_doses_number_text),
Expand Down Expand Up @@ -209,7 +208,7 @@ class MoreDetailGreenCertificate : PopupDialogFragment(), KoinComponent {
certificateIssuerLabelEng.visibility = View.GONE
certificateIssuerLabel.visibility = View.GONE
entityIssuedCertificate.visibility = View.GONE
validityHealing.text = healing_certificate ?: getString(R.string.green_certificate_validity_healing)
validityHealing.text = healingCertificate ?: getString(R.string.green_certificate_validity_healing)
certificateIssuerLabelExemption.visibility = View.GONE
}
greenCertificateDetail.data?.exemptions != null -> {
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -510,4 +510,5 @@ Betriebssystem: iOS 13.5.1; Modell: iPhone XS; Expositionsmeldungen: Aktiv; [wei
<string name="green_certificate_exemption_title">Digitale Bescheinigung der COVID-19-Impfbefreiung</string>
<string name="green_certificate_certificate_issuer_exemption">Subjekt, das die digitale Freistellungsbescheinigung ausgestellt hat</string>
<string name="green_certificate_exemption_footer">Diese Zertifizierung ist nur in <b>Italien</b> gültig und kann verwendet werden, um die grüne COVID-19-Zertifizierung für die Durchführung von Aktivitäten und die Nutzung von Dienstleistungen gemäß der geltenden nationalen Gesetzgebung zu ersetzen</string>
<string name="green_certificate_validity_vaccine_booster">Zertifizierung gültig für 180 Tage (6 Monate) ab dem Datum der letzten Verabreichung, vorbehaltlich behördlicher Änderungen</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -513,4 +513,5 @@ Sistema operativo: iOS 13.5.1; modelo: iPhone XS; notificaciones de exposición:
<string name="green_certificate_subHeading_exemption">VÁLIDO SOLO EN ITALIA</string>
<string name="green_certificate_exemption_title">Certificación digital de exención de vacunación COVID-19</string>
<string name="green_certificate_certificate_issuer_exemption">Sujeto que emitió el certificado de exención digital</string>
<string name="green_certificate_validity_vaccine_booster">Certificación válida por 180 días (6 meses) a partir de la fecha de la última administración, sujeta a cambios regulatorios</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -512,5 +512,6 @@ Système d\'exploitation : iOS 13.5.1; Modèle iPhone XS ; Notifications de risq
<string name="green_certificate_subHeading_exemption">VALABLE UNIQUEMENT EN ITALIE</string>
<string name="green_certificate_exemption_title">Certification numérique de l\'exemption de vaccination COVID-19</string>
<string name="green_certificate_certificate_issuer_exemption">Sujet qui a délivré le certificat d\'exemption numérique</string>
<string name="green_certificate_validity_vaccine_booster">Certification valable 180 jours (6 mois) à compter de la date de la dernière administration, sous réserve de modifications réglementaires</string>

</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -512,5 +512,6 @@ Sistema operativo: iOS 13.5.1; Modello iPhone XS; Notifiche di esposizione: Atti
<string name="green_certificate_exemption_footer">Questa certificazione è valida solo in <b>Italia</b> e può essere utilizzata in sostituzione della Certificazione verde COVID-19 per lo svolgimento di attività e la fruizione di servizi secondo quanto previsto dalla normativa nazionale vigente</string>
<string name="green_certificate_exemption_title">Certificazione digitale di esenzione dalla vaccinazione anti-COVID-19</string>
<string name="green_certificate_certificate_issuer_exemption">Soggetto che ha rilasciato la certificazione digitale di esenzione</string>
<string name="green_certificate_validity_vaccine_booster">Certificazione valida 180 giorni (6 mesi) dalla data dell\'ultima somministrazione, salvo modifiche normative</string>

</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -592,4 +592,5 @@ Operating system: iOS 13.5.1; Model: iPhone XS; Exposure notifications: Active;
<string name="green_certificate_exemption_footer">This certification is valid only in <b>Italy</b> and can be used to replace the COVID-19 green certification for carrying out activities and the use of services in accordance with the current national legislation</string>
<string name="green_certificate_exemption_title">Digital certification of COVID-19 vaccination exemption</string>
<string name="green_certificate_certificate_issuer_exemption">Soggetto che ha rilasciato la certificazione digitale di esenzione</string>
<string name="green_certificate_validity_vaccine_booster">Certification valid for 180 days (6 months) from the date of the last administration, subject to regulatory changes</string>
</resources>
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
// App version digits
versionMajor = 2
versionMinor = 5
versionPatch = 8
versionPatch = 9

// Version name follows the <major>.<minor>.<patch> convention
computeVersionName = { ->
Expand Down

0 comments on commit 57defff

Please sign in to comment.