Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #5729 from corona-warn-app/feature/14354_update_te…
Browse files Browse the repository at this point in the history
…xt_and_screens

Update text and screens (EXPOSUREAPP-14354)
  • Loading branch information
schauersbergern authored Nov 23, 2022
2 parents 02a2e14 + 6904271 commit 6bf1687
Show file tree
Hide file tree
Showing 17 changed files with 643 additions and 109 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class SelfReportSubmissionConfigMapper @Inject constructor() : SelfReportSubmiss
Timber.d("Faulty timeBetweenSubmissionsInDays -> set to default")
SelfReportSubmissionCommonContainer.DEFAULT_DAYS
} else {
Duration.ofHours(common.timeBetweenSubmissionsInDays.toLong())
Duration.ofDays(common.timeBetweenSubmissionsInDays.toLong())
},

plausibleDeniabilityParameters = if (common.hasPlausibleDeniabilityParameters()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ class SrsSubmissionConsentFragment : Fragment(R.layout.fragment_srs_submission_c
viewModel.submissionConsentAcceptButtonClicked()
}

with(binding) {
viewModel.timeBetweenSubmissionsInDays.observe2(this@SrsSubmissionConsentFragment) {
srsSectionWarnInterval.text = getString(R.string.srs_section_warn_interval_text, it.toDays())
}
}

viewModel.showKeysRetrievalProgress.observe2(this) {
Timber.i("SubmissionTestResult:showKeyRetrievalProgress:$it")
keyRetrievalProgress.setState(it)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.google.android.gms.nearby.exposurenotification.TemporaryExposureKey
import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject
import de.rki.coronawarnapp.appconfig.AppConfigProvider
import de.rki.coronawarnapp.exception.ExceptionCategory
import de.rki.coronawarnapp.exception.reporting.report
import de.rki.coronawarnapp.presencetracing.checkins.CheckInRepository
Expand All @@ -16,11 +17,13 @@ import de.rki.coronawarnapp.util.ui.SingleLiveEvent
import de.rki.coronawarnapp.util.viewmodel.CWAViewModel
import de.rki.coronawarnapp.util.viewmodel.CWAViewModelFactory
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.map
import timber.log.Timber

class SrsSubmissionConsentFragmentViewModel @AssistedInject constructor(
@Assisted private val openTypeSelection: Boolean,
private val checkInRepository: CheckInRepository,
appConfigProvider: AppConfigProvider,
dispatcherProvider: DispatcherProvider,
tekHistoryUpdaterFactory: TEKHistoryUpdater.Factory,
) : CWAViewModel(dispatcherProvider) {
Expand All @@ -29,6 +32,9 @@ class SrsSubmissionConsentFragmentViewModel @AssistedInject constructor(
val showTracingConsentDialog = SingleLiveEvent<(Boolean) -> Unit>()
val showPermissionRequest = SingleLiveEvent<(Activity) -> Unit>()
val event = SingleLiveEvent<SrsSubmissionConsentNavigationEvents>()
val timeBetweenSubmissionsInDays = appConfigProvider.currentConfig.map {
it.selfReportSubmission.common.timeBetweenSubmissionsInDays
}.asLiveData2()

private val tekHistoryUpdater = tekHistoryUpdaterFactory.create(
object : TEKHistoryUpdater.Callback {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,67 +109,10 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="@string/srs_section_warn_interval_text"
app:layout_constraintEnd_toEndOf="@id/guideline_end"
app:layout_constraintStart_toEndOf="@id/srs_section_warn_interval_image"
app:layout_constraintTop_toTopOf="@id/srs_section_warn_interval_image" />

<ImageView
android:id="@+id/srs_section_not_official_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_normal"
android:importantForAccessibility="no"
app:layout_constraintStart_toStartOf="@id/guideline_start"
app:layout_constraintTop_toBottomOf="@id/srs_section_warn_interval"
app:srcCompat="@drawable/ic_srs_not_official" />

<TextView
android:id="@+id/srs_section_not_official"
style="@style/subtitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="@string/srs_section_not_official_text"
app:layout_constraintEnd_toEndOf="@id/guideline_end"
app:layout_constraintStart_toEndOf="@id/srs_section_not_official_image"
app:layout_constraintTop_toTopOf="@id/srs_section_not_official_image" />

<TextView
android:id="@+id/srs_help_others_headline"
style="@style/headline6"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_normal"
android:focusable="true"
android:text="@string/srs_help_others_headline_text"
app:layout_constraintEnd_toEndOf="@id/guideline_end"
app:layout_constraintStart_toStartOf="@id/guideline_start"
app:layout_constraintTop_toBottomOf="@id/srs_section_not_official" />

<TextView
android:id="@+id/srs_help_others_positive_test"
style="@style/subtitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_normal"
android:focusable="true"
android:text="@string/srs_help_others_positive_test_text"
app:layout_constraintEnd_toEndOf="@id/guideline_end"
app:layout_constraintStart_toStartOf="@id/guideline_start"
app:layout_constraintTop_toBottomOf="@id/srs_help_others_headline" />

<TextView
android:id="@+id/srs_help_others_warn_other_users"
style="@style/subtitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_small"
android:focusable="true"
android:text="@string/srs_help_others_warn_other_users_text"
app:layout_constraintEnd_toEndOf="@id/guideline_end"
app:layout_constraintStart_toStartOf="@id/guideline_start"
app:layout_constraintTop_toBottomOf="@id/srs_help_others_positive_test" />
app:layout_constraintTop_toTopOf="@id/srs_section_warn_interval_image"
tools:text="@string/srs_section_warn_interval_text"/>


<include
Expand All @@ -180,7 +123,7 @@
android:layout_marginTop="@dimen/spacing_normal"
app:layout_constraintEnd_toStartOf="@id/guideline_card_end"
app:layout_constraintStart_toStartOf="@id/guideline_card_start"
app:layout_constraintTop_toBottomOf="@id/srs_help_others_warn_other_users" />
app:layout_constraintTop_toBottomOf="@id/srs_section_warn_interval" />

<TextView
android:id="@+id/srs_next_step_submission"
Expand All @@ -205,7 +148,7 @@
app:layout_constraintEnd_toEndOf="@id/guideline_end"
app:layout_constraintStart_toStartOf="@id/guideline_start"
app:layout_constraintTop_toBottomOf="@id/srs_next_step_submission"
app:titleText="@string/srs_submission_consent_survey_button" />
app:titleText="@string/srs_submission_consent_legal_link_text" />

<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_start"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@

<TextView
android:id="@+id/second_bulletpoint_title"
style="@style/boldSubtitle"
style="@style/subtitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/bullet_point_spacing_after"
Expand Down
117 changes: 117 additions & 0 deletions Corona-Warn-App/src/main/res/values-bg/srs_submission_strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<!-- Home screen register test card -->
<!-- XHED: Register test card title -->
<string name="register_test_card_title"></string>
<!-- XTXT: Register test card subtitle -->
<string name="register_test_card_subtitle"></string>
<!-- XTXT: Register test card description -->
<string name="register_test_card_description"></string>
<!-- XTXT: Register test card button -->
<string name="register_test_card_button"></string>

<!-- Dispatcher screen -->
<!-- XHED: Test registration title -->
<string name="dispatcher_test_registration_title"></string>

<!-- SRS self test card -->
<!-- XHED: Self test title -->
<string name="srs_self_test_title"></string>
<!-- XTXT: Self test body -->
<string name="srs_self_test_body"></string>


<!-- SRS Positive test no answer card -->
<!-- XHED: Positive test no answer title -->
<string name="srs_positive_test_no_answer_title"></string>
<!-- XTXT: Positive test no answer body -->
<string name="srs_positive_test_no_answer_body"></string>

<!-- Submission Consent Screen -->
<!-- XHED: Submission consent header -->
<string name="srs_submission_consent_header"></string>
<!-- XHED: Submission consent headline -->
<string name="srs_submission_consent_headline_text"></string>
<!-- XHED: Submission consent disclaimer sub headline -->
<string name="srs_submission_consent_disclaimer_subheadline_text"></string>
<!-- XTXT: Submission consent section warn consent -->
<string name="srs_section_warn_consent_text"></string>
<!-- XTXT: Submission consent section warn interval -->
<string name="srs_section_warn_interval_text"></string>
<!-- XTXT: Submission consent first bulletpoint -->
<string name="srs_submission_consent_first_bulletpoint_text"></string>
<!-- XTXT: Submission consent second bulletpoint -->
<string name="srs_submission_consent_second_bulletpoint_text"></string>
<!-- XTXT: Submission consent third bulletpoint -->
<string name="srs_submission_consent_third_bulletpoint_text"></string>
<!-- XTXT: Submission consent fourth bulletpoint -->
<string name="srs_submission_consent_fourth_bulletpoint_text"></string>
<!-- XTXT: Submission consent fifth bulletpoint -->
<string name="srs_submission_consent_fifth_bulletpoint_text"></string>
<!-- XTXT: Submission consent next step submission -->
<string name="srs_next_step_submission_text"></string>
<!-- XTXT: Contact journal submission entry title -->
<string name="srs_contact_diary_submission_item_title"></string>
<!-- XTXT: Submission consent legal link text -->
<string name="srs_submission_consent_legal_link_text"></string>

<!-- Type Selection Screen -->
<!-- XHED: Type selection header -->
<string name="srs_type_selection_header"></string>
<!-- XTXT: Type selection introduction -->
<string name="srs_type_selection_introduction_text"></string>
<!-- XTXT: Type selection button rat registered no result text -->
<string name="srs_rat_registered_no_result_text"></string>
<!-- XTXT: Type selection button rat not registered text -->
<string name="srs_rat_not_registered_text"></string>
<!-- XTXT: Type selection button pcr registered no result text -->
<string name="srs_pcr_registered_no_result_text"></string>
<!-- XTXT: Type selection button pcr not registered text -->
<string name="srs_pcr_not_registered_text"></string>
<!-- XTXT: Type selection button rapid pcr text -->
<string name="srs_rapid_pcr_text"></string>
<!-- XTXT: Type selection button other text -->
<string name="srs_other_text"></string>
<!-- XTXT: Type selection next button text -->
<string name="type_selection_next_button_text"></string>

<!-- Srs Submission Cancel Dialog -->
<!-- XHED: Cancel submission dialog title -->
<string name="srs_cancel_dialog_title"></string>
<!-- XTXT: Cancel submission dialog message -->
<string name="srs_cancel_dialog_message"></string>
<!-- XBUT: Continue warning button -->
<string name="srs_cancel_dialog_continue"></string>
<!-- XBUT: Don't warn button -->
<string name="srs_cancel_dialog_cancel"></string>

<!-- Srs Submission Warning Dialog -->
<!-- XHED: Submission warning dialog title -->
<string name="srs_submission_warning_dialog_title"></string>
<!-- XTXT: Submission warning dialog message -->
<string name="srs_submission_warning_dialog_message"></string>
<!-- XBUT: Submission warning positive button -->
<string name="srs_submission_warning_dialog_positive_button"></string>
<!-- XBUT: Submission warning negative button -->
<string name="srs_submission_warning_dialog_negative_button"></string>
<!-- Srs Errors-->
<!-- XTXT: SRS error title -->
<string name="srs_error_title"></string>
<!-- XTXT: SRS CALL_HOTLINE error message -->
<string name="srs_error_call_hotline"></string>
<!-- XTXT: SRS CHANGE_DEVICE_TIME error message -->
<string name="srs_error_device_time"></string>
<!-- XTXT: SRS DEVICE_NOT_TRUSTED error message -->
<string name="srs_error_device_not_trusted"></string>
<!-- XTXT: SRS NO_NETWORK error message -->
<string name="srs_error_no_network"></string>
<!-- XTXT: SRS SUBMISSION_TOO_EARLY error message -->
<string name="srs_error_submission_too_early"></string>
<!-- XTXT: SRS TIME_SINCE_ONBOARDING_UNVERIFIED error message -->
<string name="srs_error_time_since_onboarding_unverified"></string>
<!-- XTXT: SRS TRY_AGAIN_LATER error message -->
<string name="srs_error_try_again_later"></string>
<!-- XTXT: SRS UPDATE_PLAY_SERVICES error message -->
<string name="srs_error_update_play_services"></string>
</resources>
6 changes: 3 additions & 3 deletions Corona-Warn-App/src/main/res/values-de/legal_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@
<!-- XTXT: Submission consent privacy card subtitle -->
<string name="srs_privacy_card_subtitle_text" translatable="false">Durch Antippen von „Einverstanden“ willigen Sie in folgende Schritte ein:</string>
<!-- XTXT: Submission consent privacy card first bulletpoint -->
<string name="srs_privacy_card_first_bulletpoint_text" translatable="false">Die App teilt Ihr positives Testergebnis, um Nutzer, denen Sie begegnet sind, zu warnen. Dies betrifft auch Nutzer der Corona-Warn-App, die zeitgleich am selben Event oder Ort wie Sie eingecheckt waren.</string>
<string name="srs_privacy_card_first_bulletpoint_text" translatable="false"><b>Die App teilt Ihr positives Testergebnis, um andere Nutzer der Corona-Warn-App zu warnen, denen Sie begegnet sind oder die zeitgleich am selben Event oder Ort wie Sie eingecheckt waren.</b></string>
<!-- XTXT: Submission consent privacy card second bulletpoint -->
<string name="srs_privacy_card_second_bulletpoint_text" translatable="false">Ihre Angaben zur Art des Tests werden anonym statistisch ausgewertet.</string>
<string name="srs_privacy_card_second_bulletpoint_text" translatable="false">Bevor das Testergebnis geteilt werden kann, wird die <b>Echtheit Ihrer App einmalig geprüft</b>. Dazu wird durch Ihr Smartphone eine eindeutige Kennung erzeugt und an Google in die USA oder andere Drittländer übermittelt, damit Google die Echtheit Ihrer App gegenüber dem RKI bestätigen kann. Die Kennung enthält Informationen über die Version Ihres Smartphones und der App. Google kann damit möglicherweise auf Ihre Identität schließen und nachvollziehen, dass die Echtheitsprüfung Ihres Smartphones stattgefunden hat. Weitere Angaben aus der App erhält Google hierbei nicht.</string>
<!-- XTXT: Submission consent privacy card third bulletpoint -->
<string name="srs_privacy_card_third_bulletpoint_text" translatable="false">Wenn Sie zusätzlich Angaben zum Beginn Ihrer Symptome machen, werden auch diese geteilt.</string>
<string name="srs_privacy_card_third_bulletpoint_text" translatable="false"><b>Wenn Sie zusätzlich Angaben zum Beginn Ihrer Symptome machen, werden auch diese geteilt.</b></string>
</resources>
Loading

0 comments on commit 6bf1687

Please sign in to comment.