From 039ffb711266be240ab973587ebf698c81155401 Mon Sep 17 00:00:00 2001 From: Pablo Date: Wed, 14 Feb 2024 10:21:33 +0100 Subject: [PATCH] [ANDROAPP-5894] Adapt enrollment label to be configurable from server (#3493) Signed-off-by: Pablo --- .../eventDetails/EventInitialTest.kt | 2 +- .../flow/searchFlow/SearchFlowTest.kt | 3 ++ .../dhis2/usescases/searchte/SearchTETest.kt | 4 +++ .../teidashboard/robot/TeiDashboardRobot.kt | 14 ++++++-- .../enrollment/EnrollmentActivity.kt | 10 +++++- .../injection/EventDetailsModule.kt | 2 +- .../providers/EventDetailResourcesProvider.kt | 7 +++- .../searchTrackEntity/SearchTEActivity.java | 1 + .../searchTrackEntity/SearchTEModule.java | 18 ++++++++-- .../ui/mapper/TEICardMapper.kt | 20 ++++++++--- .../TeiDashboardMobileActivity.kt | 29 ++++++++++++++-- .../teiDashboard/ui/mapper/InfoBarMapper.kt | 12 +++++-- .../ui/mapper/TeiDashboardCardMapper.kt | 10 +++++- .../java/org/dhis2/utils/D2EditionMapper.kt | 33 ------------------- .../customviews/BreakTheGlassBottomDialog.kt | 21 ++++++++++++ .../layout/break_the_glass_bottom_dialog.xml | 2 -- app/src/main/res/menu/dashboard_menu.xml | 4 +-- .../main/res/menu/dashboard_menu_group.xml | 4 +-- app/src/main/res/menu/dashboard_tei_menu.xml | 2 +- app/src/main/res/values-ar/strings.xml | 7 ---- app/src/main/res/values-b+uz+Cyrl/strings.xml | 1 - app/src/main/res/values-b+uz+Latn/strings.xml | 6 ---- app/src/main/res/values-cs/strings.xml | 10 ------ app/src/main/res/values-es/strings.xml | 10 ------ app/src/main/res/values-fr/strings.xml | 9 ----- app/src/main/res/values-id/strings.xml | 8 ----- app/src/main/res/values-km/strings.xml | 2 -- app/src/main/res/values-lo/strings.xml | 7 ---- app/src/main/res/values-nb/strings.xml | 6 ---- app/src/main/res/values-nl/strings.xml | 10 ------ app/src/main/res/values-pt/strings.xml | 6 ---- app/src/main/res/values-sv/strings.xml | 2 -- app/src/main/res/values-uk/strings.xml | 10 ------ app/src/main/res/values-uz/strings.xml | 8 ----- app/src/main/res/values-vi/strings.xml | 10 ------ app/src/main/res/values-zh-rCN/strings.xml | 6 ---- app/src/main/res/values-zh/strings.xml | 10 ------ app/src/main/res/values/strings.xml | 14 +------- .../dhis2/data/filter/FilterRepositoryTest.kt | 4 +-- .../EventDetailsIntegrationTest.kt | 2 +- .../ui/mapper/TEICardMapperTest.kt | 6 ++-- .../ui/mapper/InfoBarMapperTest.kt | 15 +++++++-- .../dhis2/commons/filters/FilterResources.kt | 18 ++++++++-- .../commons/filters/data/FilterRepository.kt | 4 +-- .../dhis2/commons/resources/D2ErrorUtils.kt | 9 +++-- .../commons/resources/ResourceManager.kt | 30 +++++++++++++++++ commons/src/main/res/values-lo/strings.xml | 1 - commons/src/main/res/values/strings.xml | 28 +++++++++++++--- .../org/dhis2/maps/layer/MapLayerDialog.kt | 2 +- .../src/main/res/values-ar/strings.xml | 1 - .../src/main/res/values-b+uz+Latn/strings.xml | 1 - .../src/main/res/values-cs/strings.xml | 1 - .../src/main/res/values-es/strings.xml | 1 - .../src/main/res/values-fr/strings.xml | 1 - .../src/main/res/values-nb/strings.xml | 1 - .../src/main/res/values-nl/strings.xml | 1 - .../src/main/res/values-pt/strings.xml | 1 - .../src/main/res/values-uk/strings.xml | 1 - .../src/main/res/values-uz/strings.xml | 1 - .../src/main/res/values-vi/strings.xml | 1 - .../src/main/res/values-zh-rCN/strings.xml | 1 - .../src/main/res/values-zh/strings.xml | 1 - .../src/main/res/values/strings.xml | 1 - .../dhis2/form/data/EnrollmentRepository.kt | 6 ++-- .../provider/EnrollmentFormLabelsProvider.kt | 22 ++++++++++--- form/src/main/res/values-ar/strings.xml | 4 --- .../src/main/res/values-b+uz+Latn/strings.xml | 4 --- form/src/main/res/values-cs/strings.xml | 4 --- form/src/main/res/values-es/strings.xml | 4 --- form/src/main/res/values-fr/strings.xml | 4 --- form/src/main/res/values-id/strings.xml | 4 --- form/src/main/res/values-lo/strings.xml | 3 -- form/src/main/res/values-nb/strings.xml | 4 --- form/src/main/res/values-nl/strings.xml | 4 --- form/src/main/res/values-pt/strings.xml | 4 --- form/src/main/res/values-uk/strings.xml | 4 --- form/src/main/res/values-uz/strings.xml | 4 --- form/src/main/res/values-vi/strings.xml | 4 --- form/src/main/res/values-zh-rCN/strings.xml | 4 --- form/src/main/res/values-zh/strings.xml | 4 --- form/src/main/res/values/strings.xml | 4 --- .../data/FormRepositoryIntegrationTest.kt | 2 ++ gradle/libs.versions.toml | 2 +- 83 files changed, 263 insertions(+), 305 deletions(-) delete mode 100644 app/src/main/java/org/dhis2/utils/D2EditionMapper.kt diff --git a/app/src/androidTest/java/org/dhis2/usescases/eventsWithoutRegistration/eventDetails/EventInitialTest.kt b/app/src/androidTest/java/org/dhis2/usescases/eventsWithoutRegistration/eventDetails/EventInitialTest.kt index de6ebdd685..daa58140d4 100644 --- a/app/src/androidTest/java/org/dhis2/usescases/eventsWithoutRegistration/eventDetails/EventInitialTest.kt +++ b/app/src/androidTest/java/org/dhis2/usescases/eventsWithoutRegistration/eventDetails/EventInitialTest.kt @@ -154,7 +154,7 @@ class EventInitialTest { enrollmentStatus = enrollmentStatus, ) - private fun provideEventResourcesProvider() = EventDetailResourcesProvider(resourceManager) + private fun provideEventResourcesProvider() = EventDetailResourcesProvider(PROGRAM_UID, resourceManager) private fun createOrUpdateEventDetails() = CreateOrUpdateEventDetails( repository = eventDetailsRepository, diff --git a/app/src/androidTest/java/org/dhis2/usescases/flow/searchFlow/SearchFlowTest.kt b/app/src/androidTest/java/org/dhis2/usescases/flow/searchFlow/SearchFlowTest.kt index 41d93c24c2..45730cfcb7 100644 --- a/app/src/androidTest/java/org/dhis2/usescases/flow/searchFlow/SearchFlowTest.kt +++ b/app/src/androidTest/java/org/dhis2/usescases/flow/searchFlow/SearchFlowTest.kt @@ -1,6 +1,8 @@ package org.dhis2.usescases.flow.searchFlow import android.content.Intent +import androidx.compose.ui.text.capitalize +import androidx.compose.ui.text.intl.Locale import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.rule.ActivityTestRule import org.dhis2.R @@ -27,6 +29,7 @@ class SearchFlowTest : BaseTest() { setDatePicker() val registerTEIDetails = createRegisterTEI() val enrollmentStatus = context.getString(R.string.filters_title_enrollment_status) + .format(context.resources.getQuantityString(R.plurals.enrollment, 1).capitalize(Locale.current)) val filterCounter = "1" val filterTotalCount = "2" prepareWomanProgrammeIntentAndLaunchActivity(rule) diff --git a/app/src/androidTest/java/org/dhis2/usescases/searchte/SearchTETest.kt b/app/src/androidTest/java/org/dhis2/usescases/searchte/SearchTETest.kt index b7cf9e5d5f..b21921ed97 100644 --- a/app/src/androidTest/java/org/dhis2/usescases/searchte/SearchTETest.kt +++ b/app/src/androidTest/java/org/dhis2/usescases/searchte/SearchTETest.kt @@ -3,6 +3,8 @@ package org.dhis2.usescases.searchte import androidx.compose.ui.test.junit4.createComposeRule import androidx.compose.ui.test.onNodeWithTag import androidx.compose.ui.test.performClick +import androidx.compose.ui.text.capitalize +import androidx.compose.ui.text.intl.Locale import androidx.test.espresso.IdlingRegistry import androidx.test.espresso.IdlingResourceTimeoutException import androidx.test.ext.junit.runners.AndroidJUnit4 @@ -145,6 +147,7 @@ class SearchTETest : BaseTest() { @Test fun shouldSuccessfullyFilterByEnrollmentStatusActive() { val enrollmentStatusFilter = context.getString(R.string.filters_title_enrollment_status) + .format(context.resources.getQuantityString(R.plurals.enrollment, 1).capitalize(Locale.current)) val totalFilterCount = "2" val filterCount = "1" @@ -310,6 +313,7 @@ class SearchTETest : BaseTest() { val lastName = "Jones" val namePosition = 0 val enrollmentStatus = context.getString(R.string.filters_title_enrollment_status) + .format(context.resources.getQuantityString(R.plurals.enrollment, 1).capitalize(Locale.current)) val totalCount = "2" val totalFilterCount = "1" diff --git a/app/src/androidTest/java/org/dhis2/usescases/teidashboard/robot/TeiDashboardRobot.kt b/app/src/androidTest/java/org/dhis2/usescases/teidashboard/robot/TeiDashboardRobot.kt index 4b9540e94e..71ad0b6a95 100644 --- a/app/src/androidTest/java/org/dhis2/usescases/teidashboard/robot/TeiDashboardRobot.kt +++ b/app/src/androidTest/java/org/dhis2/usescases/teidashboard/robot/TeiDashboardRobot.kt @@ -319,7 +319,12 @@ class TeiDashboardRobot : BaseRobot() { } fun clickOnMenuProgramEnrollments() { - onView(withText(R.string.program_selector)).perform(click()) + with(InstrumentationRegistry.getInstrumentation().targetContext){ + val programSelectorLabel = getString(R.string.program_selector_V2) + val enrollmentLabel = resources.getQuantityString(R.plurals.enrollment,2) + val itemLabel = programSelectorLabel.format(enrollmentLabel) + onView(withText(itemLabel)).perform(click()) + } } fun clickOnCreateNewEvent() { @@ -376,7 +381,12 @@ class TeiDashboardRobot : BaseRobot() { } fun clickOnMenuDeleteEnrollment() { - onView(withText(R.string.dashboard_menu_delete_enrollment)).perform(click()) + with(InstrumentationRegistry.getInstrumentation().targetContext){ + val deleteEnrollmentLabel = getString(R.string.dashboard_menu_delete_enrollment_V2) + val enrollmentLabel = resources.getQuantityString(R.plurals.enrollment,1) + val itemLabel = deleteEnrollmentLabel.format(enrollmentLabel) + onView(withText(itemLabel)).perform(click()) + } } fun clickOnGroupByStage() { diff --git a/app/src/main/java/org/dhis2/usescases/enrollment/EnrollmentActivity.kt b/app/src/main/java/org/dhis2/usescases/enrollment/EnrollmentActivity.kt index 2f6914d8af..c66b219182 100644 --- a/app/src/main/java/org/dhis2/usescases/enrollment/EnrollmentActivity.kt +++ b/app/src/main/java/org/dhis2/usescases/enrollment/EnrollmentActivity.kt @@ -22,6 +22,7 @@ import org.dhis2.commons.data.TeiAttributesInfo import org.dhis2.commons.dialogs.imagedetail.ImageDetailActivity import org.dhis2.commons.featureconfig.data.FeatureConfigRepository import org.dhis2.commons.featureconfig.model.Feature +import org.dhis2.commons.resources.ResourceManager import org.dhis2.databinding.EnrollmentActivityBinding import org.dhis2.form.data.GeometryController import org.dhis2.form.data.GeometryParserImpl @@ -51,6 +52,9 @@ class EnrollmentActivity : ActivityGlobalAbstract(), EnrollmentView { private var forRelationship: Boolean = false private lateinit var formView: FormView + @Inject + lateinit var resourceManager: ResourceManager + @Inject lateinit var presenter: EnrollmentPresenterImpl @@ -343,7 +347,11 @@ class EnrollmentActivity : ActivityGlobalAbstract(), EnrollmentView { binding.title.visibility = View.VISIBLE binding.teiDataHeader.root.visibility = View.GONE binding.title.text = - String.format(getString(R.string.enroll_in), presenter.getProgram()?.displayName()) + resourceManager.formatWithEnrollmentLabel( + programUid = presenter.getProgram()?.uid()!!, + R.string.new_enrollment, + 1, + ) } } diff --git a/app/src/main/java/org/dhis2/usescases/eventsWithoutRegistration/eventDetails/injection/EventDetailsModule.kt b/app/src/main/java/org/dhis2/usescases/eventsWithoutRegistration/eventDetails/injection/EventDetailsModule.kt index c1f6ff7c02..f96f130277 100644 --- a/app/src/main/java/org/dhis2/usescases/eventsWithoutRegistration/eventDetails/injection/EventDetailsModule.kt +++ b/app/src/main/java/org/dhis2/usescases/eventsWithoutRegistration/eventDetails/injection/EventDetailsModule.kt @@ -61,7 +61,7 @@ class EventDetailsModule( fun provideEventDetailResourceProvider( resourceManager: ResourceManager, ): EventDetailResourcesProvider { - return EventDetailResourcesProvider(resourceManager) + return EventDetailResourcesProvider(programUid, resourceManager) } @Provides diff --git a/app/src/main/java/org/dhis2/usescases/eventsWithoutRegistration/eventDetails/providers/EventDetailResourcesProvider.kt b/app/src/main/java/org/dhis2/usescases/eventsWithoutRegistration/eventDetails/providers/EventDetailResourcesProvider.kt index f1230cd7f2..6a226ebe06 100644 --- a/app/src/main/java/org/dhis2/usescases/eventsWithoutRegistration/eventDetails/providers/EventDetailResourcesProvider.kt +++ b/app/src/main/java/org/dhis2/usescases/eventsWithoutRegistration/eventDetails/providers/EventDetailResourcesProvider.kt @@ -5,6 +5,7 @@ import org.dhis2.commons.resources.ResourceManager import org.hisp.dhis.android.core.event.EventNonEditableReason class EventDetailResourcesProvider( + private val programUid: String, private val resourceManager: ResourceManager, ) { fun provideDueDate() = resourceManager.getString(R.string.due_date) @@ -24,7 +25,11 @@ class EventDetailResourcesProvider( EventNonEditableReason.NO_CATEGORY_COMBO_ACCESS -> resourceManager.getString(R.string.edition_no_catcombo_access) EventNonEditableReason.ENROLLMENT_IS_NOT_OPEN -> - resourceManager.getString(R.string.edition_enrollment_is_no_open) + resourceManager.formatWithEnrollmentLabel( + programUid, + R.string.edition_enrollment_is_no_open_V2, + 1, + ) EventNonEditableReason.ORGUNIT_IS_NOT_IN_CAPTURE_SCOPE -> resourceManager.getString(R.string.edition_orgunit_capture_scope) } diff --git a/app/src/main/java/org/dhis2/usescases/searchTrackEntity/SearchTEActivity.java b/app/src/main/java/org/dhis2/usescases/searchTrackEntity/SearchTEActivity.java index e504510e75..90b6d03ed3 100644 --- a/app/src/main/java/org/dhis2/usescases/searchTrackEntity/SearchTEActivity.java +++ b/app/src/main/java/org/dhis2/usescases/searchTrackEntity/SearchTEActivity.java @@ -694,6 +694,7 @@ public void couldNotDownload(String typeName) { @Override public void showBreakTheGlass(String teiUid, String enrollmentUid) { new BreakTheGlassBottomDialog() + .setProgram(presenter.getProgram().uid()) .setPositiveButton(reason -> { viewModel.onDownloadTei(teiUid, enrollmentUid, reason); return Unit.INSTANCE; diff --git a/app/src/main/java/org/dhis2/usescases/searchTrackEntity/SearchTEModule.java b/app/src/main/java/org/dhis2/usescases/searchTrackEntity/SearchTEModule.java index a6850bd3ab..55640a8dd7 100644 --- a/app/src/main/java/org/dhis2/usescases/searchTrackEntity/SearchTEModule.java +++ b/app/src/main/java/org/dhis2/usescases/searchTrackEntity/SearchTEModule.java @@ -225,11 +225,23 @@ EnrollmentUiDataHelper enrollmentUiDataHelper(Context context) { @Provides @PerActivity - SearchSortingValueSetter searchSortingValueSetter(Context context, D2 d2, EnrollmentUiDataHelper enrollmentUiDataHelper) { + SearchSortingValueSetter searchSortingValueSetter( + Context context, + D2 d2, + EnrollmentUiDataHelper enrollmentUiDataHelper, + ResourceManager resourceManager) { String unknownLabel = context.getString(R.string.unknownValue); String eventDateLabel = context.getString(R.string.most_recent_event_date); - String enrollmentStatusLabel = context.getString(R.string.filters_title_enrollment_status); - String enrollmentDateDefaultLabel = context.getString(R.string.enrollment_date); + String enrollmentStatusLabel = resourceManager.formatWithEnrollmentLabel( + initialProgram, + R.string.filters_title_enrollment_status, + 1, + false); + String enrollmentDateDefaultLabel = resourceManager.formatWithEnrollmentLabel( + initialProgram, + R.string.enrollment_date_V2, + 1, + false); String uiDateFormat = DateUtils.SIMPLE_DATE_FORMAT; return new SearchSortingValueSetter(d2, unknownLabel, diff --git a/app/src/main/java/org/dhis2/usescases/searchTrackEntity/ui/mapper/TEICardMapper.kt b/app/src/main/java/org/dhis2/usescases/searchTrackEntity/ui/mapper/TEICardMapper.kt index 613307f91b..5badc599dc 100644 --- a/app/src/main/java/org/dhis2/usescases/searchTrackEntity/ui/mapper/TEICardMapper.kt +++ b/app/src/main/java/org/dhis2/usescases/searchTrackEntity/ui/mapper/TEICardMapper.kt @@ -130,6 +130,7 @@ class TEICardMapper( enrolledPrograms = searchTEIModel.programInfo, ) checkEnrollmentStatus( + programUid = searchTEIModel.selectedEnrollment.program()!!, list = list, status = searchTEIModel.selectedEnrollment?.status(), ) @@ -175,35 +176,46 @@ class TEICardMapper( } private fun checkEnrollmentStatus( + programUid: String, list: MutableList, status: EnrollmentStatus?, ) { val item = when (status) { EnrollmentStatus.COMPLETED -> { + val label = resourceManager.formatWithEnrollmentLabel( + programUid, + R.string.enrollment_completed_V2, + 1, + ) AdditionalInfoItem( icon = { Icon( imageVector = Icons.Outlined.Check, - contentDescription = resourceManager.getString(R.string.enrollment_completed), + contentDescription = label, tint = AdditionalInfoItemColor.SUCCESS.color, ) }, - value = resourceManager.getString(R.string.enrollment_completed), + value = label, isConstantItem = true, color = AdditionalInfoItemColor.SUCCESS.color, ) } EnrollmentStatus.CANCELLED -> { + val label = resourceManager.formatWithEnrollmentLabel( + programUid, + R.string.enrollment_cancelled_V2, + 1, + ) AdditionalInfoItem( icon = { Icon( imageVector = Icons.Outlined.Close, - contentDescription = resourceManager.getString(R.string.enrollment_cancelled), + contentDescription = label, tint = AdditionalInfoItemColor.DISABLED.color, ) }, - value = resourceManager.getString(R.string.enrollment_cancelled), + value = label, isConstantItem = true, color = AdditionalInfoItemColor.DISABLED.color, ) diff --git a/app/src/main/java/org/dhis2/usescases/teiDashboard/TeiDashboardMobileActivity.kt b/app/src/main/java/org/dhis2/usescases/teiDashboard/TeiDashboardMobileActivity.kt index a5df046799..e3ba3bf62a 100644 --- a/app/src/main/java/org/dhis2/usescases/teiDashboard/TeiDashboardMobileActivity.kt +++ b/app/src/main/java/org/dhis2/usescases/teiDashboard/TeiDashboardMobileActivity.kt @@ -29,6 +29,7 @@ import org.dhis2.commons.filters.FilterManager import org.dhis2.commons.filters.Filters import org.dhis2.commons.network.NetworkUtils import org.dhis2.commons.popupmenu.AppMenuHelper +import org.dhis2.commons.resources.ResourceManager import org.dhis2.commons.sync.OnDismissListener import org.dhis2.commons.sync.SyncContext import org.dhis2.databinding.ActivityDashboardMobileBinding @@ -83,6 +84,9 @@ class TeiDashboardMobileActivity : @Inject lateinit var networkUtils: NetworkUtils + @Inject + lateinit var resourceManager: ResourceManager + lateinit var programModel: DashboardProgramModel var teiUid: String? = null var programUid: String? = null @@ -157,7 +161,8 @@ class TeiDashboardMobileActivity : super.onCreate(savedInstanceState) groupByStage = MutableLiveData(presenter.programGrouping) currentEnrollment = MutableLiveData() - dashboardViewModel = ViewModelProvider(this, viewModelFactory)[DashboardViewModel::class.java] + dashboardViewModel = + ViewModelProvider(this, viewModelFactory)[DashboardViewModel::class.java] binding = DataBindingUtil.setContentView(this, R.layout.activity_dashboard_mobile) showLoadingProgress(true) binding.presenter = presenter @@ -290,7 +295,10 @@ class TeiDashboardMobileActivity : android.R.anim.fade_in, android.R.anim.fade_out, ) - startActivity(intent(context, teiUid, programUid, enrollmentUid), activityOptions.toBundle()) + startActivity( + intent(context, teiUid, programUid, enrollmentUid), + activityOptions.toBundle(), + ) finish() } } @@ -578,6 +586,20 @@ class TeiDashboardMobileActivity : deleteEnrollmentItem.isVisible = presenter.checkIfEnrollmentCanBeDeleted(enrollmentUid) if (enrollmentUid != null) { + popupMenu.menu.findItem(R.id.deleteEnrollment).let { deleteEnrollmentItem -> + deleteEnrollmentItem.title = resourceManager.formatWithEnrollmentLabel( + programUid!!, + R.string.dashboard_menu_delete_enrollment_V2, + 1, + ) + } + popupMenu.menu.findItem(R.id.programSelector).let { programSelectorItem -> + programSelectorItem.title = resourceManager.formatWithEnrollmentLabel( + programUid!!, + R.string.program_selector_V2, + 2, + ) + } val status = presenter.getEnrollmentStatus(enrollmentUid) if (status == EnrollmentStatus.COMPLETED) { popupMenu.menu.findItem(R.id.complete).isVisible = false @@ -611,14 +633,17 @@ class TeiDashboardMobileActivity : EnrollmentStatus.COMPLETED, ) } + R.id.activate -> dashboardViewModel.updateEnrollmentStatus( programModel, EnrollmentStatus.ACTIVE, ) + R.id.deactivate -> dashboardViewModel.updateEnrollmentStatus( programModel, EnrollmentStatus.CANCELLED, ) + R.id.share -> startQRActivity() } true diff --git a/app/src/main/java/org/dhis2/usescases/teiDashboard/ui/mapper/InfoBarMapper.kt b/app/src/main/java/org/dhis2/usescases/teiDashboard/ui/mapper/InfoBarMapper.kt index 5050f21ff5..4c45d4c3ed 100644 --- a/app/src/main/java/org/dhis2/usescases/teiDashboard/ui/mapper/InfoBarMapper.kt +++ b/app/src/main/java/org/dhis2/usescases/teiDashboard/ui/mapper/InfoBarMapper.kt @@ -58,9 +58,17 @@ class InfoBarMapper( InfoBarType.FOLLOW_UP -> resourceManager.getString(R.string.marked_follow_up) InfoBarType.ENROLLMENT_STATUS -> { if (item.currentEnrollmentStatus == EnrollmentStatus.COMPLETED) { - resourceManager.getString(R.string.enrollment_completed) + resourceManager.formatWithEnrollmentLabel( + item.currentProgram.uid(), + R.string.enrollment_completed_V2, + 1, + ) } else { - resourceManager.getString(R.string.enrollment_cancelled) + resourceManager.formatWithEnrollmentLabel( + item.currentProgram.uid(), + R.string.enrollment_cancelled_V2, + 1, + ) } } } diff --git a/app/src/main/java/org/dhis2/usescases/teiDashboard/ui/mapper/TeiDashboardCardMapper.kt b/app/src/main/java/org/dhis2/usescases/teiDashboard/ui/mapper/TeiDashboardCardMapper.kt index cc7f2784f0..7090c90488 100644 --- a/app/src/main/java/org/dhis2/usescases/teiDashboard/ui/mapper/TeiDashboardCardMapper.kt +++ b/app/src/main/java/org/dhis2/usescases/teiDashboard/ui/mapper/TeiDashboardCardMapper.kt @@ -144,6 +144,7 @@ class TeiDashboardCardMapper( } }.also { list -> addEnrollmentDate( + item.currentProgram.uid(), list, item.currentProgram.enrollmentDateLabel(), item.currentEnrollment.enrollmentDate(), @@ -211,13 +212,20 @@ class TeiDashboardCardMapper( } private fun addEnrollmentDate( + programUid: String, list: MutableList, programLabel: String?, enrollmentDate: Date?, ) { list.add( AdditionalInfoItem( - key = "${programLabel ?: resourceManager.getString(R.string.enrollment_date)}:", + key = "${ + programLabel ?: resourceManager.formatWithEnrollmentLabel( + programUid, + R.string.enrollment_date_V2, + 1, + ) + }:", value = enrollmentDate.toUi() ?: "", isConstantItem = true, ), diff --git a/app/src/main/java/org/dhis2/utils/D2EditionMapper.kt b/app/src/main/java/org/dhis2/utils/D2EditionMapper.kt deleted file mode 100644 index 838190dc23..0000000000 --- a/app/src/main/java/org/dhis2/utils/D2EditionMapper.kt +++ /dev/null @@ -1,33 +0,0 @@ -package org.dhis2.utils - -import android.content.Context -import org.dhis2.R -import org.hisp.dhis.android.core.event.EventNonEditableReason -import org.hisp.dhis.android.core.event.EventNonEditableReason.BLOCKED_BY_COMPLETION -import org.hisp.dhis.android.core.event.EventNonEditableReason.ENROLLMENT_IS_NOT_OPEN -import org.hisp.dhis.android.core.event.EventNonEditableReason.EVENT_DATE_IS_NOT_IN_ORGUNIT_RANGE -import org.hisp.dhis.android.core.event.EventNonEditableReason.EXPIRED -import org.hisp.dhis.android.core.event.EventNonEditableReason.NO_CATEGORY_COMBO_ACCESS -import org.hisp.dhis.android.core.event.EventNonEditableReason.NO_DATA_WRITE_ACCESS -import org.hisp.dhis.android.core.event.EventNonEditableReason.ORGUNIT_IS_NOT_IN_CAPTURE_SCOPE - -class D2EditionMapper { - - companion object { - - @JvmStatic - fun mapEditionStatus(context: Context, reason: EventNonEditableReason): String { - return when (reason) { - BLOCKED_BY_COMPLETION -> context.getString(R.string.blocked_by_completion) - EXPIRED -> context.getString(R.string.edition_expired) - NO_DATA_WRITE_ACCESS -> context.getString(R.string.edition_no_write_access) - EVENT_DATE_IS_NOT_IN_ORGUNIT_RANGE -> - context.getString(R.string.event_date_not_in_orgunit_range) - NO_CATEGORY_COMBO_ACCESS -> context.getString(R.string.edition_no_catcombo_access) - ENROLLMENT_IS_NOT_OPEN -> context.getString(R.string.edition_enrollment_is_no_open) - ORGUNIT_IS_NOT_IN_CAPTURE_SCOPE -> - context.getString(R.string.edition_orgunit_capture_scope) - } - } - } -} diff --git a/app/src/main/java/org/dhis2/utils/customviews/BreakTheGlassBottomDialog.kt b/app/src/main/java/org/dhis2/utils/customviews/BreakTheGlassBottomDialog.kt index 2217d01c52..02d18c824b 100644 --- a/app/src/main/java/org/dhis2/utils/customviews/BreakTheGlassBottomDialog.kt +++ b/app/src/main/java/org/dhis2/utils/customviews/BreakTheGlassBottomDialog.kt @@ -13,12 +13,23 @@ import com.google.android.material.bottomsheet.BottomSheetDialogFragment import org.dhis2.R import org.dhis2.commons.resources.ColorType import org.dhis2.commons.resources.ColorUtils +import org.dhis2.commons.resources.ResourceManager import org.dhis2.databinding.BreakTheGlassBottomDialogBindingImpl +import javax.inject.Inject class BreakTheGlassBottomDialog : BottomSheetDialogFragment() { + private lateinit var programUid: String + + @Inject + lateinit var resourceManager: ResourceManager + val colorUtils: ColorUtils = ColorUtils() + fun setProgram(programUid: String) = apply { + this.programUid = programUid + } + fun setPositiveButton(onClick: ((String) -> Unit)? = null) = apply { this.positiveOnclick = onClick } @@ -37,6 +48,16 @@ class BreakTheGlassBottomDialog : BottomSheetDialogFragment() { savedInstanceState: Bundle?, ): View? { return BreakTheGlassBottomDialogBindingImpl.inflate(inflater, container, false).apply { + message.text = resourceManager.formatWithEnrollmentLabel( + programUid, + R.string.break_glass_dialog_description_V2, + 1, + ) + label.text = resourceManager.formatWithEnrollmentLabel( + programUid, + R.string.break_glass_reason_V2, + 1, + ) positive.apply { setOnClickListener { positiveOnclick?.invoke(inputEditText.text.toString()) diff --git a/app/src/main/res/layout/break_the_glass_bottom_dialog.xml b/app/src/main/res/layout/break_the_glass_bottom_dialog.xml index 4e20cfba6e..1ccc39c20a 100644 --- a/app/src/main/res/layout/break_the_glass_bottom_dialog.xml +++ b/app/src/main/res/layout/break_the_glass_bottom_dialog.xml @@ -33,7 +33,6 @@ android:layout_marginStart="24dp" android:layout_marginTop="4dp" android:layout_marginEnd="14dp" - android:text="@string/break_glass_dialog_description" android:textColor="@color/gray_990" android:textSize="14sp" app:layout_constraintTop_toBottomOf="@id/title" /> @@ -81,7 +80,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="12dp" - android:text="@string/break_glass_reason" app:layout_constraintStart_toStartOf="@id/fieldBackground" app:layout_constraintTop_toTopOf="@id/fieldBackground" /> diff --git a/app/src/main/res/menu/dashboard_menu.xml b/app/src/main/res/menu/dashboard_menu.xml index f7222fd950..58c258d91e 100644 --- a/app/src/main/res/menu/dashboard_menu.xml +++ b/app/src/main/res/menu/dashboard_menu.xml @@ -15,11 +15,11 @@ + android:title="@string/dashboard_menu_delete_enrollment_V2" /> + android:title="@string/program_selector_V2" /> + android:title="@string/dashboard_menu_delete_enrollment_V2" /> + android:title="@string/program_selector_V2" /> + android:title="@string/program_selector_V2" /> \ No newline at end of file diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index b9afbe9b74..5c3fec878c 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -164,7 +164,6 @@ انظر التفاصيل عرض المزيد - الوحدة التنظيمية المسجلة متابعة تم تمكين المتابعة تم ايقاف المتابعة @@ -253,7 +252,6 @@ أضف ملاحظة العودة نشط - تسجيل في %s بعض الحقول الإلزامية مفقودة بعض الحقول الإلزامية مفقودة. إذا كنت تريد الرجوع الآن ، فسيتم حذف جميع المعلومات المحفوظة. بعض الحقول الإلزامية مفقودة. إذا كنت تريد العودة ، يرجى ملؤها. @@ -264,7 +262,6 @@ الحذف والرجوع للخلف تحتوي بعض الحقول على أخطاء:\n%s\n يرجى التحقق منها. بعض الحقول الإلزامية مفقودة. يمكنك إنهاء إدخال البيانات والخروج، لكن لا يمكن تعيين الحدث كمكتمل. - إحداثيات التسجيل إحداثيات لـ @@ -533,7 +530,6 @@ السجل الذي تحاول الوصول إليه ليس لديه تسجيل. لا يمكنك الوصول إلى لوحة المعلومات. خطأ في التنسيق حذف %s - حذف التسجيل فقط ليس لديك الصلاحية لحذف هذا السجل هذا ليس عنوان url صالحاً ليس لديك الصلاحية لإعادة فتح هذا الحدث @@ -628,7 +624,6 @@ الإعدادات محدودة %s\n الأحداث: %s/%s، TEI: %s/%s إخفاء بيانات التسجيل إظهار بيانات التسجيل - بيانات التسجيل وحدة الرسائل القصيرة مفعلة وحدة الرسائل القصيرة غير مفعلة تحميل البيانات لوحدة الرسائل القصيرة. يرجى الإنتظار @@ -652,7 +647,6 @@ منذ %d ساعة الأمس السمات - %s - التسجيلات في البرنامج إختر الوقت ادخل حرف أدخل رقماً من 0 إلى 1 @@ -816,7 +810,6 @@ ليس لديك إذن لتحرير هذه البيانات هذه البيانات غير قابلة للتعديل لأنه تم اغلاق الوحدة التنظيمية ليس لديك إذن لتحرير هذه البيانات - هذه البيانات غير قابلة للتعديل بسبب اكتمال التسجيل أو إلغاؤه لا يمكنك تحرير البيانات من هذه الوحدة التنظيمية إعادة البحث البحث عبر الإتصال بالسيرفر عن طريق الإنترنت ارجع الرسالة التالية: diff --git a/app/src/main/res/values-b+uz+Cyrl/strings.xml b/app/src/main/res/values-b+uz+Cyrl/strings.xml index 837527f10b..b3069ac81c 100644 --- a/app/src/main/res/values-b+uz+Cyrl/strings.xml +++ b/app/src/main/res/values-b+uz+Cyrl/strings.xml @@ -164,7 +164,6 @@ Тафсилотларни кўринг КЎПРОҚ КЎРИШ ТАҲРИРЛАШ - OUга рўйхатга олиш Кузатиб бориш Кузатув ёқилган Кузатув ўчирилган diff --git a/app/src/main/res/values-b+uz+Latn/strings.xml b/app/src/main/res/values-b+uz+Latn/strings.xml index 6257a77ffe..da7d418216 100644 --- a/app/src/main/res/values-b+uz+Latn/strings.xml +++ b/app/src/main/res/values-b+uz+Latn/strings.xml @@ -146,7 +146,6 @@ Tafsilotlarni koʼring KOʼPROQ KOʼRISh - OUga roʼyxatga olish Kuzatib borish Kuzatuv yoqilgan Kuzatuv oʼchirilgan @@ -224,7 +223,6 @@ Izoh qoldirish Qaytish Faollashtirildi - Qayd qilingan %s Majburiy maydonlar qoldirib ketilgan Baʼzi majburiy maydonlar qoldirib ketilgan. Аgar hozir orqaga qaytsangiz, barcha saqlangan maʼlumotlar oʼchib ketadi. Baʼzi majburiy maydonlar qoldirib ketilgan. Аgar orqaga qaytmoqchi boʼlsangiz, Iltimos, ularni toʼldiring. @@ -234,7 +232,6 @@ Oʼchirib tashlash va orqaga qaytish Baʼzi maʼlumotlarda xatoliklar mavjud: \n%s\. Iltimos, ularni tekshiring. Baʼzi majburiy maydonlar qoldirib ketilgan. Siz maʼlumotlarni kiritishni yakunlab chiqishingiz mumkin. Аmmo bu holda hodisa/tadbirni yakunlab boʼlmaydi. - Roʼyxatdan oʼtish koordinatalari Uchun koordinatalar @@ -493,7 +490,6 @@ Sinxronizatsiya sozlanmasi: %s Siz kirib koʼrmoqchi boʼlgan yozuv qayd etilmagan. Siz boshqaruv paneliga kira olmaysiz Formatlashda xatolik - Faqat qaydlarni oʼchirib tashlash Ushbu yozuvni oʼchirib tashlash huquqiga ega emassiz Bu haqiqiy URL emas Ushbu hodisa/tadbirni qayta ochishga vakolatingiz yoʼq @@ -588,7 +584,6 @@ Sozlamalar cheklangan %s \n Hodisa/tadbirlar: %s / %s TEI: %s / %s Qayd qilish maʼlumotlarini berkitish Qayd qilish maʼlumotlarini koʼrsatish - Qayd qilish maʼlumotlari SMS modul yoqib qoʼyilgan SMS modul oʼchirib qoʼyilgan SMS modul uchun maʼlumotlar yuklanmoqda. Iltimos, kuting @@ -612,7 +607,6 @@ %d soat oldin Кеча Аtribatlar - %s - Dastur qaydlari Vaqtni tanlang Xatni kiriting 0 dan 1 gacha raqamni kiriting diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 54cd8a601d..39c6468a99 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -162,7 +162,6 @@ Prohlednout detaily UKÁZAT VÍCE - Zápis Org. J.: Následovat Sledování povoleno Sledování zakázáno @@ -249,7 +248,6 @@ Přidat poznámku Vrátit zpět Aktivováno - Zapsat do %s Chybí povinná pole Některá povinná pole chybí. Pokud se chcete vrátit zpět, budou všechny uložené informace odstraněny. Některá povinná pole chybí. Pokud se chcete vrátit, vyplňte je prosím. @@ -260,7 +258,6 @@ Smazat a vrátit se zpět Některá pole obsahují chyby:\n%s\nProsím zkontrolujte je. Některá povinná pole chybí. Zadávání a ukončení dat můžete dokončit, ale událost nelze dokončit. - Souřadnice registrace Souřadnice pro @@ -529,7 +526,6 @@ Záznam, ke kterému se pokoušíte získat přístup, nemá žádnou registraci. K hlavnímu panelu nemáte přístup. Chyba formátování Smazat %s - Smazat pouze zápis Nemáte oprávnění tento záznam mazat Toto není platné URL Nemáte oprávnění znovu otevřít tuto událost @@ -624,7 +620,6 @@ Nastavení omezeno %s\nUdálosti: %s/%s TEI: %s/%s Skrýt údaje o zápisu Zobrazit údaje o zápisu - Údaje o zápisu SMS modul povolen SMS modul deaktivován Stahování dat pro modul SMS. Prosím, čekejte @@ -648,7 +643,6 @@ před %d hodinami Včera Atributy - %s - Programové zápisy Vyberte čas Zadejte písmeno Zadejte číslo od 0 do 1 @@ -794,8 +788,6 @@ Vybrat z galerie Hotovo! Tento program je chráněn - Musíte uvést důvod ke kontrole registrace v tomto chráněném programu. Veškerá aktivita bude zaznamenána. - Důvod ke kontrole zápisu Zde popište důvod Ověření Zadaná adresa URL serveru není instance dhis @@ -820,7 +812,6 @@ K úpravě těchto údajů nemáte oprávnění Tato data nelze upravovat, protože organizační jednotka je zavřená K úpravě těchto údajů nemáte oprávnění - Tato data nelze upravovat, protože zápis je dokončen nebo zrušen Data z této organizační jednotky nemůžete upravovat Obnovit vyhledávání Online vyhledávání vrátilo následující zprávu: @@ -865,7 +856,6 @@ Účet zakázán Váš účet byl zakázán správcem. Chcete-li vyhledávat mimo tento program, otevřete vyhledávací formulář a vyplňte jedno z následujících %s polí: - Zápis Organizační jednotky Verze sestavení: %s Datum sestavení: %s Aktuální datum: %s diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index d690c50e6f..dad9348bfe 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -161,7 +161,6 @@ Ver detalles Ver mas - OU de admision: Seguimiento Seguimiento activado Seguimiento desactivado @@ -247,7 +246,6 @@ Añadir nota Deshacer Activado - Enrolar en %s Los campos obligatorios no pueden estar vacios Algunos campos obligatorios están vacíos. Si desea ir atrás ahora, toda la información guardada se borrará. Faltan campos obligatorios. Rellénelos para ir atrás. @@ -258,7 +256,6 @@ Borrar y salir. Algunos campos tienen errores:\n%s\nRevíselos, por favor. Algunos campos obligatorios están vacíos. Puede terminar la entrada de datos y salir, pero el evento no podrá ser completado. - Coordenadas de admisión Coordenadas para @@ -527,7 +524,6 @@ Este registro no tiene ninguna inscripción. No se puede acceder al dashboard. Error de formato Eliminar %s - Borrar solo la admisión No tienes permisos para borrar este registro La URL no es válida No tiene permisos para abrir este evento @@ -622,7 +618,6 @@ Configuración limitada %s\nEventos: %s/%s Entidades: %s/%s Ocultar datos de registro Mostrar datos de registro - Datos de registro Módulo de SMS activado Módulo de SMS desactivado Descargando datos para el módulo de SMS. Por favor espere. @@ -646,7 +641,6 @@ Hace %d horas Ayer Atributos - %s - Registros en programas Selecciona hora Introduzca una letra Introduzca un número de 0 a 1 @@ -792,8 +786,6 @@ Elija de la galería ¡Listo! Este programa está protegido - Debe proporcionar una razón para comprobar la inscripción en este programa protegido. Se registrará toda la actividad. - Razón para verificar la inscripción Describe aquí la razón Autentificando El enlace del servidor proporcionada no es una instancia de dhis @@ -818,7 +810,6 @@ No tiene permisos de edición para estos datos. Los datos no son editables por que la unidad organizativa está cerrada. No tiene permisos de edición para estos datos. - Los datos no son editables por que el registro está cerrado o cancelado. No puede editar datos en esta unidad organizativa. Reiniciar búsqueda La búsqueda online a devuelto este mensaje: @@ -863,7 +854,6 @@ Cuenta deshabilitada Tu cuenta ha sido deshabilitada por un administrador Para hacer una búsqueda fuera del programa, debe abrir el formulario de búsqueda y llenar uno de los siguientes campos %s : - Unid. Org. del registro Versión de compilación: %s Fecha de compilación: %s Fecha actual: %s diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index f1431b0179..ec95312983 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -159,7 +159,6 @@ Voir les détails Afficher plus - Entité Org d´admission Suivi Suivi activé Suivi désactivé @@ -245,7 +244,6 @@ Ajouter une note Annuler Activé - S´inscrire à %s Les champs obligatoires sont manquant Certains des champs obligatoires sont manquant. Si vous voulez retourner, tout l´information sera supprimer Certains champs obligatoires sont vides. Si vous voulez retourner, veuillez les renseigner. @@ -256,7 +254,6 @@ Supprimer et retourner Certains champs ont des erreurs:\n%s\nVeuillez les vérifier. Des champs obligatoires ne sont pas renseignés. Vous pouvez terminer la saisie et quitter, mais l\'évènement ne peut être complété. - Coordonnées de l\'enrôlement Coordonnées pour @@ -524,7 +521,6 @@ La donnée à laquelle vous essayer d\'acceéer n\'a pas d\'enrôlement. Vous ne pouvez pas accéder au tableau de bord. Erreur de formattage Supprimer 1%s - Supprimer seulement l\'enrôlement Vous n\'avez pas l\'autorité pour supprimer cette donnée Ceci n\'est pas un lien URL valide Vous n\'avez pas l\'autorité pour rouvrir cet évènement @@ -619,7 +615,6 @@ Paramètres limités %s \nEvénements: %s/%s TEI: %s/%s Masquer les données d\'inscription Afficher les données d\'inscription - Données d\'inscription Le module SMS est activé Le module SMS est désactivé Téléchargement des données pour le module SMS. S\'il vous plaît, attendez @@ -643,7 +638,6 @@ %d heures depuis Hier Attributs - %s - Inscriptions au programme Sélectionnez l\'heure Entrez une lettre Entrez un numéro de 0 à 1 @@ -787,8 +781,6 @@ Choisir depuis la galerie Terminé! Ce programme est protégé - Vous devez fournir une raison pour vérifier l\'inscription à ce programme protégé. Toutes les activités seront enregistrées. - Raison de vérifier l\'inscription Décrivez la raison ici En cours d\'authentification L\'URL du serveur fournie n\'est pas une instance dhis @@ -805,7 +797,6 @@ Ces données ne sont pas modifiables car elles sont marquées comme terminées Vous n\'êtes pas autorisé à modifier ces données Vous n\'êtes pas autorisé à modifier ces données - Ces données ne sont pas modifiables car l\'inscription est terminée ou annulée Réinitialiser la recherche La recherche en ligne a renvoyé le message suivant : Avertissement relatif aux règles du programme diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml index 534ef51df3..e62ee19f54 100644 --- a/app/src/main/res/values-id/strings.xml +++ b/app/src/main/res/values-id/strings.xml @@ -156,7 +156,6 @@ Lihat rincian LIHAT LAINNYA - Daftarkan OU: Tindak lanjut Tindak lanjut diterapkan Tindak lanjut ditutup @@ -240,7 +239,6 @@ Tambah catatan Kembali Diaktifkan - Mendaftar %s Bidang wajib tidak ada Beberapa bidang wajib tidak ada. Jika Anda ingin kembali sekarang, semua informasi yang disimpan akan dihapus. Beberapa bidang wajib tidak ada. Jika Anda ingin kembali, silakan isi. @@ -250,7 +248,6 @@ Hapus dan kembali Beberapa parameter terjadi kesalahan:\n 1 %s \n Mohon, diperiksa Beberapa bidang wajib tidak ada. Anda dapat menyelesaikan entri data dan keluar, tetapi even tidak dapat diselesaikan. - Koordinat pendaftaran Koordinat untuk @@ -514,7 +511,6 @@ Pengaturan sinkronisasi: %s Catatan yang Anda coba akses tidak memiliki pendaftaran. Anda tidak dapat mengakses dasbor. Memformat kesalahan - Hapus pendaftaran saja Anda tidak memiliki wewenang untuk menghapus catatan ini Ini bukan url yang valid Anda tidak memiliki wewenang untuk membuka kembali acara ini @@ -719,7 +715,6 @@ Pengaturan terbatas %s\nAcara: %s/%s TEI: %s/%s Sembunyikan data pendaftaran Tampilkan data pendaftaran - Data pendaftaran Modul SMS diaktifkan Modul SMS dinonaktifkan Mengunduh data untuk modul SMS. Mohon tunggu @@ -743,7 +738,6 @@ %d jam yang lalu Kemarin Atribut - %s - Pendaftaran program Pilih waktu Masukkan huruf Masukkan nomor dari 0 hingga 1 @@ -884,8 +878,6 @@ Pilih dari galeri Selesai! Program ini dilindungi - Anda harus memberikan alasan untuk memeriksa pendaftaran dalam program yang dilindungi ini. Semua aktivitas akan dicatat. - Alasan untuk memeriksa pendaftaran Jelaskan alasannya di sini Otentikasi URL server yang disediakan bukan instance dhis diff --git a/app/src/main/res/values-km/strings.xml b/app/src/main/res/values-km/strings.xml index def272d7ef..267336207f 100644 --- a/app/src/main/res/values-km/strings.xml +++ b/app/src/main/res/values-km/strings.xml @@ -117,7 +117,6 @@ មើលលំអិត មើលច្រើនទៀត - ចុះឈ្មោះអង្គភាព តាមដាន ការតាមដានដំណើរការ ការតាមដានមិនដំណើរការ @@ -164,7 +163,6 @@ បន្ថែមការកត់ចំណាំ ត្រលប់ក្រោយ បានដាក់អោយដំណើរការ - ចុះឈ្មោះក្នុង %s ទិន្នន័យចាំបាច់មិនមាន ឈ្មោះទិន្នន័យចាំបាច់ខ្លះមិនមាន, ប្រសិនបើអ្នកចង់ត្រឡប់ទៅវិញ រាល់ពត៏មាននិងត្រូវលុយចោល លុប ហើយត្រឡប់ទៅវិញ diff --git a/app/src/main/res/values-lo/strings.xml b/app/src/main/res/values-lo/strings.xml index cf91325607..a6fe6d81c6 100644 --- a/app/src/main/res/values-lo/strings.xml +++ b/app/src/main/res/values-lo/strings.xml @@ -152,7 +152,6 @@ ເບິ່ງຂໍ້ມູນເພີ່ມຕື່ມ ເບີ່ງຕື່ມ - ລົງທະບຽນໜ່ວຍງານ ຕິດຕາມ ເປີດການຕິດຕາມ ການຕິດຕາມບໍ່ສາມາດນໍາໃຊ້ໄດ້ @@ -235,7 +234,6 @@ ຂຽນບັນທຶກລົງ ກັບຄືນສູ່ສະພາບເດີມ ເປີດການນໍາໃຊ້ແລ້ວ - ຂື້ນທະບຽນມີ %s ຫ້ອງປ້ອນຂໍ້ມູນທີ່ຈໍາເປັນ ບໍ່ເຫັນ ຫ້ອງປ້ອນຂໍ້ມູນຈໍານວນໜື່ງບໍ່ເຫັນ. ຖ້າທ່ານຕ້ອງການກັບຄືນດຽວນີ້, ຂໍ້ມູນທັງໝົດທີ່ໄດ້ບັນທຶກແລ້ວຈະຖືກລືບ ບາງຊ່ອງຂໍ້ມູນຈຳເປັນຕ້ອງດຳເນີນການຂອງທ່ານ.\n ທ່ານຕ້ອງການກວດສອບແບບຟອມຫຼືບໍ? @@ -245,7 +243,6 @@ ລືບຂໍ້ມູນ ແລະ ກັບຄືນ ບາງຊ່ອງມີຂໍ້ຜິດພາດ, %s ກະລຸນາກວດສອບ ຊ່ອງປ້ອນຂໍ້ມູນຈໍານວນໜື່ງບໍ່ເຫັນ. ທ່ານສາມາດປ້ອນຂໍ້ມູນ ແລະ ອອກໄດ້, ແຕ່ເຫດການຈະບໍ່ສາມາດເຮັດໃຫ້ສຳເລັດໄດ້ - ປະສານງານການລົງທະບຽນ ປະສານງານຫາ @@ -509,7 +506,6 @@ ບັນທຶກທີ່ທ່ານພະຍາຍາມເຂົ້າບໍ່ມີການລົງທະບຽນ. ທ່ານບໍສາມາດເຂົ້າເຖີງໜ້າກະດານຂ່າວໄດ້ ຂໍ້ຜິດພາດໃນການຈັດຮູບແບບ ລົບ%s - ລົບການລົງທະບຽນເທົ່ານັ້ນ ທ່ານບໍສາມາດທີ່ຈະລົບບັນທຶກນີ້ໄດ້ ຊື່ url ບໍ່ຖຶກຕ້ອງ ທ່ານບໍສາມາດເປິດເຫດການນີ້ຄືນໄດ້ @@ -600,7 +596,6 @@ ຈຳກັດການຕັ້ງຄ່າ%s\nເຫດການ:%s/%sTEI:%s/%s ເຊື່ອງຂໍ້ມູນການລົງທະບຽນ ສະແດງຂໍ້ມູນການລົງທະບຽນ - ຂໍ້ມູນການລົງທະບຽນ ເປິດໃຊ້ງານໂມດູນຂໍ້ຄວາມ ໂມດູນຂໍ້ຄວາມຖືກປິດໃຊ້ງານ ກຳລັງດາວໂຫຼດຂໍ້ມູນສຳລັບໂມດູນຂໍ້ຄວາມ. ກະ​ລຸ​ນາ​ລໍ​ຖ້າ @@ -622,7 +617,6 @@ %dນາທີທີ່ຜ່ານມາ %dຊົ່ວໂມງທີ່ຜ່ານມາ ມື້ວານນີ - ການລົງທະບຽນໂປຣແກຣມ ເລືອກເວລາ ປ້ອນຕົວອັກສອນ ປ້ອນຕົວເລກຈາກ 0 ຫາ 1 @@ -717,7 +711,6 @@ ເລືອກຈາກຄັງຮູບ ສຳເລັດແລ້ວ! ໂປຣແກຣມນີ້ໄດ້ຮັບການຄຸ້ມຄອງ - ເຫດຜົນໃນການກວດສອບການລົງທະບຽນ ອະທິບາຍເຫດຜົນຢູ່ບ່ອນນີ້ ຄວາມຜິດພາດຈາກຢັ້ງຢືນເອກະລັກບຸກຄົນ ບໍ່ຮູ້ເຄື່ອງຄອມພິວເຕິ້ໜ່ວຍແມ່ diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml index e389731bb8..6c4df3e660 100644 --- a/app/src/main/res/values-nb/strings.xml +++ b/app/src/main/res/values-nb/strings.xml @@ -155,7 +155,6 @@ Se detaljer VIS MER - Registrerer OU: Oppfølging Oppfølging er aktivert Oppfølging er deaktivert @@ -240,7 +239,6 @@ Legg til notat Reverser Aktivert - Registrer i %s Obligatoriske felter mangler Noen obligatoriske felt mangler. Hvis du vil gå tilbake nå, all lagret informasjon vil bli slettet. Noen obligatoriske felt mangler. Hvis du vil gå tilbake, vennligst fyll inn dem. @@ -250,7 +248,6 @@ Slett og gå tilbake Noen felt har feil:\n%s\nVennligst, sjekk dem. Noen obligatoriske felter mangler. Du kan fullføre dataregistrering og gå ut, men hendelsen kan ikke fullføres. - Innmeldingskoordinater Koordinater for @@ -513,7 +510,6 @@ Synkroniseringsinnstillinger: %s Oppføringen du prøver å gå inn på har ingen registrering. Du kan ikke gå til dashbord. Formateringsfeil - Slett kun registrering Du har ikke autoritet til å slette denne oppføringen Dette er ikke en gyldig URL Du har ikke autoritet til å gjenåpne denne hendelsen @@ -608,7 +604,6 @@ Begrensede innstillinger : %s\nEvents: %s/%sTEI: %s/%s Skjul registreringsdata Vis registreringsdata - Registreringsdata SMS modul er aktivert. SMS modul er deaktivert. Laster ned data for SMS modul. Vennligst vent @@ -632,7 +627,6 @@ %dtimer siden I går Attributter - %s - Programregistreringer Velg klokkeslett Skriv inn brev Angi nummer fra 0 til 1 diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 6d2e531c19..d7cae1f2e9 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -160,7 +160,6 @@ Zie de details BEKIJK MEER - OU inschrijven: Volg op Vervolg ingeschakeld Opvolging uitgeschakeld @@ -248,7 +247,6 @@ Notitie toevoegen Terugdraaien Geactiveerd - Schrijf je in bij %s Verplichte velden ontbreken Sommige verplichte velden ontbreken. Als u nu terug wilt gaan, wordt alle opgeslagen informatie verwijderd. Sommige verplichte velden ontbreken. Als je terug wilt gaan, vul ze dan in. @@ -259,7 +257,6 @@ Verwijderen en teruggaan Sommige velden bevatten fouten:\n%s\nControleer ze alsjeblieft. Sommige verplichte velden ontbreken. U kunt het invoeren en afsluiten van gegevens voltooien, maar de gebeurtenis kan niet worden voltooid. - Inschrijving coördinaten Coördinaten voor de @@ -531,7 +528,6 @@ Het record dat u probeert te openen heeft geen inschrijving. U heeft geen toegang tot het dashboard. Formatteringsfout Verwijder %s - Alleen inschrijving verwijderen U bent niet bevoegd om dit record te verwijderen Dit is geen geldige URL Je hebt niet de bevoegdheid om dit evenement opnieuw te openen @@ -625,7 +621,6 @@ Instellingen beperkt %s\nevenementen: %s/%s TEI: %s/%s Inschrijvingsgegevens verbergen Toon inschrijvingsgegevens - Inschrijving gegevens SMS-module ingeschakeld SMS-module uitgeschakeld Gegevens downloaden voor SMS-module. Even geduld aub @@ -649,7 +644,6 @@ %d uur geleden Gisteren Kenmerken - %s - Programma inschrijvingen Selecteer tijd Voer brief in Voer een getal in van 0 tot 1 @@ -795,8 +789,6 @@ Kies uit gallerij Klaar! Dit programma is beveiligd - U moet een reden opgeven om te controleren op inschrijving voor dit beschermde programma. Alle activiteiten worden geregistreerd. - Reden om te controleren op inschrijving Omschrijf hier de reden Verificatie De opgegeven server-URL is geen dhis-instantie @@ -821,7 +813,6 @@ U heeft geen toestemming om deze gegevens te bewerken Deze gegevens zijn niet bewerkbaar omdat de organisatie-eenheid gesloten is U heeft geen toestemming om deze gegevens te bewerken - Deze gegevens kunnen niet worden bewerkt omdat de inschrijving is voltooid of geannuleerd U kunt gegevens van deze organisatie-eenheid niet bewerken Zoeken resetten De online zoekopdracht leverde het volgende bericht op: @@ -866,7 +857,6 @@ Account ongebruikelijk gemaakt Uw account is uitgeschakeld door een beheerder. Om buiten dit programma te zoeken, opent u het zoekformulier en vult u een van de volgende %s-velden in: - Inschrijvingsorganisatie-eenheid Bouw versie: %s Bouwjaar: %s Huidige datum: %s diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 9b9773f1ba..ba2925db42 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -156,7 +156,6 @@ Veja detalhes VEJA MAIS - Inscrição UO: Acompanhamento Acompanhamento ativado Acompanhamento desativado @@ -242,7 +241,6 @@ Adicionar uma nota Reverter Ativado - Inscreva-se %s Faltam campos obrigatórios Alguns campos obrigatórios estão ausentes. Se você quiser voltar agora, todas as informações salvas serão excluídas. Alguns campos obrigatórios estão ausentes. Se você quiser voltar, por favor preencha-os. @@ -252,7 +250,6 @@ Suprimir e voltar Alguns campos têm erros:/n%s/nPor favor, verifique-os. Alguns campos obrigatórios estão ausentes. Você pode concluir a entrada e saída de dados, mas o evento não pode ser concluído. - Coordenadas de inscrição Coordenadas para o @@ -515,7 +512,6 @@ Configuração de sincronização: %s O registro que você está tentando acessar não tem inscrição. Você não pode acessar o painel. Erro de formatação - Suprimir somente inscrição Você não tem autoridade para suprimir este registro Este url não é válido Você não tem autoridade para reabrir este evento @@ -610,7 +606,6 @@ Configurações limitadas %s \nEventos: %s/%s TEI: %s/%s Ocultar dados de inscrição Mostrar dados de inscrição - Dados de inscrição Módulo SMS ativado Módulo SMS desativado Baixando dados para o módulo SMS. Por favor espere. @@ -634,7 +629,6 @@ %d horas atrás Ontém Atributos - %s - Inscrições no programa Selecionar hora Inserir letra Digite o número de 0 a 1 diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 740daf2969..a87f65ad90 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -114,7 +114,6 @@ Se detaljer VISA MER - Inskrivningsorganisationsenhet Följ upp Uppföljning aktiverad Uppföljning avaktiverad @@ -161,7 +160,6 @@ Lägg till anteckning Återställ Aktiverad - Registreras %s Obligatoriska fält saknas Några obligatoriska fält saknas. Om du vill gå tillbaka nu raderas alla sparade uppgifter. Ta bort och gå tillbaka diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 3d5dacdfac..3fe9866ecd 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -162,7 +162,6 @@ Подивитись подробиці ДИВИТИСЬ БІЛЬШЕ - Організаційний підрозділ, який здійснює реєстрацію: Подальші дії Подальші дії увімкнено Подальші дії вимкнено @@ -249,7 +248,6 @@ Додати нотатку Повернути Активовано - Реєстрація в %s Не заповнено обов\'язкові поля Деякі обов’язкові поля не заповнено. Якщо Ви хочете повернутися зараз, уся збережена інформація буде видалена. Деякі обов’язкові поля не заповнено. Якщо Ви хочете повернутися, заповніть їх. @@ -260,7 +258,6 @@ Видалити та повернутися назад У деяких полях є помилки:%s Будь ласка, перевірте їх. Деякі обов’язкові поля не заповнено. Ви можете завершити введення даних і вийти, але випадок не може бути завершений. - Координати реєстрації Координати для @@ -529,7 +526,6 @@ Запис, до якого Ви намагаєтеся отримати доступ, не зареєстрований. Ви не можете отримати доступ до інформаційної панелі. Помилка форматування Видалити %s - Видалити лише реєстрацію Ви не маєте повноважень видаляти цей запис Це недійсна URL-адреса Ви не маєте повноважень повторно відкривати цей випадок @@ -624,7 +620,6 @@ Налаштування обмежено%sВипадки: %s/%s Об\'єкти: %s/%s Приховати дані реєстрації Показати дані реєстрації - Дані реєстрації SMS-модуль включений SMS-модуль відключений Завантаження даних для модуля SMS. Будь ласка, зачекайте @@ -648,7 +643,6 @@ %d годин тому Вчора Атрибути - %s - Програми реєстрації Оберіть час Введіть літеру Введіть число від 0 до 1 @@ -794,8 +788,6 @@ Обрати з галереї Готово! Ця програма закрита для Вас - Ви повинні вказати причину для перевірки реєстрації в цій програмі, яка є для Вас закритою. Уся активність буде зареєстрована. - Причина для перевірки реєстрації Опишіть причину тут Автентифікація Надана URL-адреса сервера не є екземпляром dhis @@ -820,7 +812,6 @@ Ви не маєте дозволу редагувати ці дані Ці дані не можна редагувати, оскільки організаційний підрозділ закрито Ви не маєте дозволу редагувати ці дані - Ці дані не можна редагувати, оскільки реєстрацію завершено або скасовано Ви не можете редагувати дані з цього організаційного підрозділу Скинути пошук Онлайн-пошук дав таке повідомлення: @@ -865,7 +856,6 @@ Обліковий запис вимкнено Ваш обліковий запис було вимкнено адміністратором. Для пошуку за межами цієї програми відкрийте форму пошуку та заповніть одне з наступних %s полів: - Організаційний підрозділ, який здійснює реєстрацію Версія збірки: %s Дата збірки: %s Поточна дата: %s diff --git a/app/src/main/res/values-uz/strings.xml b/app/src/main/res/values-uz/strings.xml index f6fae6ecd4..847d78e89f 100644 --- a/app/src/main/res/values-uz/strings.xml +++ b/app/src/main/res/values-uz/strings.xml @@ -156,7 +156,6 @@ Тафсилотларни кўринг КЎПРОҚ КЎРИШ - OUга рўйхатга олиш Кузатиб бориш Кузатув ёқилган Кузатув ўчирилган @@ -240,7 +239,6 @@ Изоҳ қолдириш Қайтиш Фаоллаштирилди - Қайд қилинган %s Мажбурий майдонлар қолдириб кетилган Баъзи мажбурий майдонлар қолдириб кетилган. Агар ҳозир орқага қайтсангиз, барча сақланган маълумотлар ўчиб кетади. Баъзи мажбурий майдонлар қолдириб кетилган. Агар орқага қайтмоқчи бўлсангиз, Илтимос, уларни тўлдиринг. @@ -250,7 +248,6 @@ Ўчириб ташлаш ва орқага қайтиш Баъзи маълумотларда хатоликлар мавжуд: \n%s\. Илтимос, уларни текширинг. Баъзи мажбурий майдонлар қолдириб кетилган. Сиз маълумотларни киритишни якунлаб чиқишингиз мумкин. Аммо бу ҳолда ҳодиса/тадбирни якунлаб бўлмайди. - Рўйхатдан ўтиш координаталари Учун координаталар @@ -515,7 +512,6 @@ Синхронизация созланмаси: %s Сиз кириб кўрмоқчи бўлган ёзув қайд этилмаган. Сиз бошқарув панелига кира олмайсиз Форматлашда хатолик - Фақат қайдларни ўчириб ташлаш Ҳуқуқингиз чегараланганлиги сабабни ушбу ёзувни ўчириб ташлолмайсиз Бу ҳақиқий URL эмас Ушбу ҳодиса/тадбирни қайта очишга ваколатингиз йўқ @@ -610,7 +606,6 @@ Созламалар чекланган %s \n Ҳодиса/тадбирлар: %s / %s TEI: %s / %s Қайд қилиш маълумотларини беркитиш Қайд қилиш маълумотларини кўрсатиш - Қайд қилиш маълумотлари СМС модуль ёқиб қўйилган СМС модуль ўчириб қўйилган СМС модуль учун маълумотлар юкланмоқда. Илтимос, кутинг @@ -634,7 +629,6 @@ %d соат олдин Кеча Атрибатлар - %s - Дастур қайдлари Вақтни танланг Хатни киритинг 0 дан 1 гача рақамни киритинг @@ -768,8 +762,6 @@ Галереядан танлаш Бажарилди! Ушбу дастур ҳимояланган - Ушбу дастурда қайд этишни текшириш учун сабаб кўрсатишингиз керак. Барча ҳаракатлар ёзиб борилади. - Қайд этишни текшириш учун сабаб Сабабини шу ерда ёзиб қолдиринг Аутентификация қилинмоқда Кўрсатиб ўтилган URL манзил DHIS шаблонида эмас diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index 83c4c331b6..706d0a5247 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -157,7 +157,6 @@ Xem Chi Tiết XEM THÊM - Đơn Vị Đăng Ký: Theo dõi Đã bật theo dõi Đã tắt theo dõi @@ -241,7 +240,6 @@ Thêm ghi chú Hoàn tác Đã hoạt động - Đăng ký vào %s Thiếu trường dữ liệu bắt buộc Một số trường bắt buộc bị thiếu. Nếu bạn muốn quay lại, tất cả các thông tin đã lưu sẽ bị xóa. Một số trường bắt buộc nhập bị thiếu. Nếu bạn muốn quay lại, vui lòng nhập giá trị cho chúng @@ -252,7 +250,6 @@ Xóa và quay lại Một vài trường dữ liệu có lỗi:\n %s\nVui lòng kiểm tra. Một số trường bắt buộc bị thiếu. Bạn có thể lưu biểu nhập và tắt, nhưng sự kiện chưa hoàn tất. - Tọa độ đăng ký Tọa độ của @@ -521,7 +518,6 @@ Hồ sơ bạn đang truy suất không có đăng ký. Bạn không thể mở bảng trình bày dữ liệu Lỗi định dạng Xóa %s - Chỉ xóa đăng ký Bạn không có quyền để xóa dữ liệu này Đường dẫn liên kết không đúng Bạn không có quyền để mở-lại sự kiện này. @@ -616,7 +612,6 @@ Cài đặt bị giới hạn %s\n Sự kiện: %s/%s Đối tượng theo dõi: %s/%s Ẩn dữ liệu đăng ký Hiển thị dữ liệu đăng ký - Dữ liệu đăng ký Mô đun SMS đã bật Mô đun SMS đã tắt Đang tải xuống dữ liệu cho mô đun SMS. Vui lòng đợi @@ -640,7 +635,6 @@ %d giờ trước Hôm Qua Thuộc tính - %s - Các chương trình đăng ký Chọn thời gian Nhập ký tự Nhập số từ 0 đến 1 @@ -786,8 +780,6 @@ Chọn từ thư viện ảnh Hoàn thành! Chương trình này đã được bảo vệ - Bạn phải cung cấp lý do để kiểm tra đăng ký trong chương trình được bảo vệ này. Tất cả các thay đổi sẽ được lưu lại. - Lý do để kiểm tra đăng ký Mô tả lý do ở đây Đang xác thực Đường dẫn liên kết đã cung cấp không phải là đường dẫn đến máy chủ DHIS2 @@ -812,7 +804,6 @@ Bạn không có quyền chỉnh sửa dữ liệu này Dữ liệu này không thể sửa bởi vì đơn vị đã bị đóng Bạn không có quyền chỉnh sửa dữ liệu này - Dữ liệu này không thể chỉnh sửa vì các đăng ký đã hoàn tất hoặc đã hủy. Bạn không thể chỉnh sửa dữ liệu từ đơn vị này Đặt lại Tìm Kiếm Tìm kiếm trực tuyến trả về tin nhắn sau: @@ -857,7 +848,6 @@ Tài khoản đã bị vô hiệu hóa Tài khoản của bạn đã bị vô hiệu hóa bởi quản lý chương trình. Để tìm kiếm bên ngoài chương trình này, mở biểu tìm kiếm và điền một trong những trường %ssau: - Đơn vị đăng ký Phiên bản cài đặt: %s Ngày cài đặt: %s Ngày hiện tại: %s diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index c5300ba88a..a59be5b3da 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -154,7 +154,6 @@ 查看详情 更多 - 注册机构 后续跟踪 使能后续跟踪 后续跟踪关闭 @@ -239,7 +238,6 @@ 添加笔记 反转 激活 - 注册 %s 强制字段缺失 有些强制字段缺失,如果你后退,所有保存的信息将被删除。 有些强制字段缺失,如果你后退,请填充他们 @@ -249,7 +247,6 @@ 删除并后退 有些字段有错误:%s。 \n 请检查。 有些强制字段缺失。你可以完成数据录入并退出,但不能完成该事件。 - 注册坐标 坐标 @@ -512,7 +509,6 @@ 同步设置:%s 你试图访问的记录还没有注册。你不能访问仪表盘。 格式化错误 - 仅仅删除注册 你没有删除记录的权限 没有有效的URL 你没有打开该事件的权限。 @@ -607,7 +603,6 @@ 设置限制:%s。\n 事件:%s/%s 实体:%s/%s 隐藏注册数据 显示注册数据 - 注册数据 短信模块被激活 短信模块被关闭 下载短信模块,请等待。 @@ -631,7 +626,6 @@ %d小时前 昨天 属性- %s - 项目注册 选择时间 输入字符 输入0-1之间的数 diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index 724625f380..87c816c694 100644 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -159,7 +159,6 @@ 查看详情 更多 - 注册机构 后续跟踪 使能后续跟踪 后续跟踪关闭 @@ -243,7 +242,6 @@ 添加笔记 反转 激活 - 注册 %s 强制字段缺失 有些强制字段缺失,如果你后退,所有保存的信息将被删除。 有些强制字段缺失,如果你后退,请填充他们 @@ -254,7 +252,6 @@ 删除并后退 有些字段有错误:%s。 \n 请检查。 有些强制字段缺失。你可以完成数据录入并退出,但不能完成该事件。 - 注册坐标 坐标 @@ -523,7 +520,6 @@ 你试图访问的记录还没有注册。你不能访问仪表盘。 格式化错误 删除 %s - 仅仅删除注册 你没有删除记录的权限 没有有效的URL 你没有打开该事件的权限。 @@ -618,7 +614,6 @@ 设置限制:%s。\n 事件:%s/%s 实体:%s/%s 隐藏注册数据 显示注册数据 - 注册数据 短信模块被激活 短信模块被关闭 下载短信模块,请等待。 @@ -642,7 +637,6 @@ %d小时前 昨天 属性- %s - 项目注册 选择时间 输入字符 输入0-1之间的数 @@ -788,8 +782,6 @@ 从图库中选择 完成! 该项目受保护 - 您必须提供一个理由来检查是否注册了该受保护项目。所有活动将被记录。 - 注册原因 在此说明原因 验证中 提供的服务器URL不是dhis实例 @@ -814,7 +806,6 @@ 您无权编辑此数据 此数据不可修改,因为单位部门已关闭 您无权编辑此数据 - 此数据不可编辑,因为注册已完成或取消 您无法编辑此机构的数据 重置搜索 网上搜索返回如下信息: @@ -859,7 +850,6 @@ 帐户已禁用 您的帐户已被管理员禁用。 要在此项目之外进行搜索,请打开搜索表单并填写以下 %s 字段之一: - 注册机构 构建版本:%s 构建日期:%s 当前日期:%s diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1fd729cee1..5523c9fb57 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -174,7 +174,6 @@ See Details VIEW MORE Edit - Enrolling OU: Follow up Follow up enabled Follow up disabled @@ -262,7 +261,6 @@ Add note Revert Activated - Enroll in %s Mandatory fields are missing Some mandatory fields are missing. If you want to go back now, all saved information will be deleted. Some mandatory fields are missing. If you want to go back, please fill them. @@ -273,7 +271,6 @@ Delete and go back Some fields have errors:\n%s\nPlease, check them. Some mandatory fields are missing. You can finish data entry and exit, but the event cannot be completed. - Enrollment coordinates Coordinates for the @@ -545,7 +542,6 @@ The record you are trying to access has no enrollment. You can\'t access the dashboard. Formatting error Delete %s - Delete enrollment only You do not have the authority to delete this record This is not a valid url You do not have the authority to re-open this event @@ -640,7 +636,6 @@ Settings limited %s\nEvents: %s/%s TEI: %s/%s Hide enrollment data Show enrollment data - Enrollment data SMS module enabled SMS module disabled Downloading data for SMS module. Please wait @@ -669,7 +664,6 @@ %d hours ago Yesterday Attributes - %s - Program enrollments Select time Enter letter Enter number from 0 to 1 @@ -715,7 +709,7 @@ Complete anyway Missing %s %s from %s %s Event status - Enrollment status + @string/enrollment_status Enrollment date There are no data. Click \"+\" to add new a new record There are no data. You don\'t have permission to add new records. @@ -817,8 +811,6 @@ Choose from gallery Done! This program is protected - You must provide a reason to check for enrollment in this protected program. All activity will be logged. - Reason to check for enrollment Describe the reason here Authenticating Provided server url is not a dhis instance @@ -845,7 +837,6 @@ You do not have permission to edit this data This data is not editable because the organization unit is closed You do not have permission to edit this data - This data is not editable because the enrollment is completed or cancelled You cannot edit data from this organisation unit Reset search The online search returned the following message: @@ -890,7 +881,6 @@ Account disabled Your account has been disabled by an administrator. To search outside this program open the search form and fill one of the following %s fields: - Enrollment Org Unit Build version: %s Build date: %s Current date: %s @@ -959,8 +949,6 @@ Notification permission granted. Not synced Retry sync - Enrollment completed - Enrollment cancelled Marked for follow-up Overdue %s Registered in: diff --git a/app/src/test/java/org/dhis2/data/filter/FilterRepositoryTest.kt b/app/src/test/java/org/dhis2/data/filter/FilterRepositoryTest.kt index 40a8021db2..ca9cdbb874 100644 --- a/app/src/test/java/org/dhis2/data/filter/FilterRepositoryTest.kt +++ b/app/src/test/java/org/dhis2/data/filter/FilterRepositoryTest.kt @@ -74,11 +74,11 @@ class FilterRepositoryTest { private fun mockFilterLabels() { whenever(filterResources.filterOrgUnitLabel()) doReturn ORG_UNIT whenever(filterResources.filterSyncLabel()) doReturn SYNC_STATUS - whenever(filterResources.filterEnrollmentStatusLabel()) doReturn + whenever(filterResources.filterEnrollmentStatusLabel(any())) doReturn ENROLLMENT_STATUS whenever(filterResources.filterDateLabel()) doReturn EVENT_DATE whenever(filterResources.filterEventStatusLabel()) doReturn EVENT_STATUS - whenever(filterResources.filterEnrollmentDateLabel()) doReturn + whenever(filterResources.filterEnrollmentDateLabel(any())) doReturn ENROLLMENT_DATE whenever(filterResources.filterAssignedToMeLabel()) doReturn ASSIGN_TO_ME whenever(filterResources.filterEventDateLabel()) doReturn EVENT_DATE diff --git a/app/src/test/java/org/dhis2/usescases/eventsWithoutRegistration/eventDetails/EventDetailsIntegrationTest.kt b/app/src/test/java/org/dhis2/usescases/eventsWithoutRegistration/eventDetails/EventDetailsIntegrationTest.kt index 4456be2091..0f88359ccc 100644 --- a/app/src/test/java/org/dhis2/usescases/eventsWithoutRegistration/eventDetails/EventDetailsIntegrationTest.kt +++ b/app/src/test/java/org/dhis2/usescases/eventsWithoutRegistration/eventDetails/EventDetailsIntegrationTest.kt @@ -179,7 +179,7 @@ class EventDetailsIntegrationTest { enrollmentStatus = enrollmentStatus, ) - private fun provideEventResourcesProvider() = EventDetailResourcesProvider(resourceManager) + private fun provideEventResourcesProvider() = EventDetailResourcesProvider(PROGRAM_UID, resourceManager) private fun createOrUpdateEventDetails() = CreateOrUpdateEventDetails( repository = eventDetailsRepository, diff --git a/app/src/test/java/org/dhis2/usescases/searchTrackEntity/ui/mapper/TEICardMapperTest.kt b/app/src/test/java/org/dhis2/usescases/searchTrackEntity/ui/mapper/TEICardMapperTest.kt index 2e4dcb6df9..c4b913728e 100644 --- a/app/src/test/java/org/dhis2/usescases/searchTrackEntity/ui/mapper/TEICardMapperTest.kt +++ b/app/src/test/java/org/dhis2/usescases/searchTrackEntity/ui/mapper/TEICardMapperTest.kt @@ -15,6 +15,7 @@ import org.hisp.dhis.android.core.trackedentity.TrackedEntityInstance import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Test +import org.mockito.kotlin.any import org.mockito.kotlin.doReturn import org.mockito.kotlin.mock import org.mockito.kotlin.whenever @@ -36,7 +37,7 @@ class TEICardMapperTest { whenever(resourceManager.getString(R.string.show_less)) doReturn "Show less" whenever(resourceManager.getString(R.string.completed)) doReturn "Completed" whenever( - resourceManager.getString(R.string.enrollment_completed), + resourceManager.formatWithEnrollmentLabel(any(), any(), any(), any()), ) doReturn "Enrollment Completed" whenever( resourceManager.getString(R.string.overdue_today), @@ -67,7 +68,7 @@ class TEICardMapperTest { ) assertEquals( result.additionalInfo[3].value, - resourceManager.getString(R.string.enrollment_completed), + "Enrollment Completed", ) assertEquals( @@ -99,6 +100,7 @@ class TEICardMapperTest { setCurrentEnrollment( Enrollment.builder() .uid("EnrollmentUid") + .program("programUid") .status(EnrollmentStatus.COMPLETED) .build(), ) diff --git a/app/src/test/java/org/dhis2/usescases/teiDashboard/ui/mapper/InfoBarMapperTest.kt b/app/src/test/java/org/dhis2/usescases/teiDashboard/ui/mapper/InfoBarMapperTest.kt index bb03673827..8d782544ae 100644 --- a/app/src/test/java/org/dhis2/usescases/teiDashboard/ui/mapper/InfoBarMapperTest.kt +++ b/app/src/test/java/org/dhis2/usescases/teiDashboard/ui/mapper/InfoBarMapperTest.kt @@ -33,8 +33,19 @@ class InfoBarMapperTest { whenever(resourceManager.getString(R.string.sync_warning)) doReturn "Sync warning" whenever(resourceManager.getString(R.string.sync_error)) doReturn "Sync Error" whenever(resourceManager.getString(R.string.marked_follow_up)) doReturn "Marked for follow up" - whenever(resourceManager.getString(R.string.enrollment_completed)) doReturn "Enrollment completed" - whenever(resourceManager.getString(R.string.enrollment_cancelled)) doReturn "Enrollment cancelled" + setPrograms().forEach { + whenever( + resourceManager.formatWithEnrollmentLabel( + it.uid(), R.string.enrollment_completed_V2, 1, + ), + ) doReturn "Enrollment completed" + whenever( + resourceManager.formatWithEnrollmentLabel( + it.uid(), R.string.enrollment_cancelled_V2, 1, + ), + ) doReturn "Enrollment cancelled" + } + whenever(resourceManager.getString(R.string.sync)) doReturn "Sync" whenever(resourceManager.getString(R.string.sync_retry)) doReturn "Retry sync" whenever(resourceManager.getString(R.string.remove)) doReturn "remove" diff --git a/commons/src/main/java/org/dhis2/commons/filters/FilterResources.kt b/commons/src/main/java/org/dhis2/commons/filters/FilterResources.kt index 5ebe974d1a..944c431aad 100644 --- a/commons/src/main/java/org/dhis2/commons/filters/FilterResources.kt +++ b/commons/src/main/java/org/dhis2/commons/filters/FilterResources.kt @@ -81,7 +81,12 @@ class FilterResources(val resourceManager: ResourceManager) { fun span(): String = resourceManager.getString(R.string.filter_period_from_to) fun filterPeriodLabel(): String = resourceManager.getString(R.string.filters_title_period) fun filterDateLabel(): String = resourceManager.getString(R.string.filters_title_date) - fun filterEnrollmentDateLabel(): String = resourceManager.getString(R.string.enrollment_date) + fun filterEnrollmentDateLabel(programUid: String): String = resourceManager.formatWithEnrollmentLabel( + programUid, + R.string.enrollment_date_V2, + 1, + ) + fun filterEventDateLabel(): String = resourceManager.getString(R.string.filters_title_event_date) @@ -90,8 +95,12 @@ class FilterResources(val resourceManager: ResourceManager) { fun filterAssignedToMeLabel(): String = resourceManager.getString(R.string.filters_title_assigned) - fun filterEnrollmentStatusLabel(): String = - resourceManager.getString(R.string.filters_title_enrollment_status) + fun filterEnrollmentStatusLabel(programUid: String): String = + resourceManager.formatWithEnrollmentLabel( + programUid, + R.string.filters_title_enrollment_status, + 1, + ) fun filterFollowUpLabel(teTypeName: String): String = resourceManager.getString(R.string.filter_follow_up_label).format(teTypeName) @@ -104,8 +113,10 @@ class FilterResources(val resourceManager: ResourceManager) { when (it) { EnrollmentStatus.ACTIVE -> resourceManager.getString(R.string.enrollment_status_active) + EnrollmentStatus.COMPLETED -> resourceManager.getString(R.string.enrollment_status_completed) + EnrollmentStatus.CANCELLED -> resourceManager.getString(R.string.enrollment_status_cancelled) } @@ -130,6 +141,7 @@ class FilterResources(val resourceManager: ResourceManager) { EventStatus.ACTIVE -> resourceManager.getString(R.string.filter_event_status_open) EventStatus.COMPLETED -> resourceManager.getString(R.string.filter_event_status_completed) + EventStatus.SCHEDULE -> resourceManager.getString(R.string.filter_event_status_schedule) EventStatus.SKIPPED -> resourceManager.getString(R.string.filter_event_status_skipped) EventStatus.VISITED -> resourceManager.getString(R.string.filter_event_status_visited) diff --git a/commons/src/main/java/org/dhis2/commons/filters/data/FilterRepository.kt b/commons/src/main/java/org/dhis2/commons/filters/data/FilterRepository.kt index 8f049bcba8..7bc78fdb82 100644 --- a/commons/src/main/java/org/dhis2/commons/filters/data/FilterRepository.kt +++ b/commons/src/main/java/org/dhis2/commons/filters/data/FilterRepository.kt @@ -539,7 +539,7 @@ class FilterRepository @Inject constructor( observableSortingInject, observableOpenFilter, program.enrollmentDateLabel() ?: resources - .filterEnrollmentDateLabel(), + .filterEnrollmentDateLabel(program.uid()), ) defaultTrackerFilters[ProgramFilter.ORG_UNIT] = OrgUnitFilter( FilterManager.getInstance().observeOrgUnitFilters(), @@ -558,7 +558,7 @@ class FilterRepository @Inject constructor( ProgramType.TRACKER, observableSortingInject, observableOpenFilter, - resources.filterEnrollmentStatusLabel(), + resources.filterEnrollmentStatusLabel(program.uid()), ) defaultTrackerFilters[ProgramFilter.EVENT_STATUS] = EventStatusFilter( ProgramType.TRACKER, diff --git a/commons/src/main/java/org/dhis2/commons/resources/D2ErrorUtils.kt b/commons/src/main/java/org/dhis2/commons/resources/D2ErrorUtils.kt index aa6332b5ba..0acd6fe21c 100644 --- a/commons/src/main/java/org/dhis2/commons/resources/D2ErrorUtils.kt +++ b/commons/src/main/java/org/dhis2/commons/resources/D2ErrorUtils.kt @@ -144,14 +144,19 @@ class D2ErrorUtils( context.getString(R.string.error_org_unit_scope) D2ErrorCode.INVALID_CHARACTERS -> context.getString(R.string.error_invalid_characters) - D2ErrorCode.PROGRAM_ACCESS_CLOSED -> - TODO("Implement for ANDROAPP-657") + D2ErrorCode.PROGRAM_ACCESS_CLOSED -> defaultError() D2ErrorCode.SERVER_CONNECTION_ERROR -> if (networkUtils.isOnline()) { context.getString(R.string.error_server_unavailable) } else { context.getString(R.string.error_no_internet_connection) } + + D2ErrorCode.DATABASE_IMPORT_FAILED -> defaultError() + D2ErrorCode.DATABASE_IMPORT_INVALID_FILE -> defaultError() } } + + private fun defaultError() = + context.getString(R.string.error_unexpected) } diff --git a/commons/src/main/java/org/dhis2/commons/resources/ResourceManager.kt b/commons/src/main/java/org/dhis2/commons/resources/ResourceManager.kt index 7b19d4ec53..b6a257e0b1 100644 --- a/commons/src/main/java/org/dhis2/commons/resources/ResourceManager.kt +++ b/commons/src/main/java/org/dhis2/commons/resources/ResourceManager.kt @@ -4,6 +4,8 @@ import android.content.Context import androidx.annotation.DrawableRes import androidx.annotation.PluralsRes import androidx.annotation.StringRes +import androidx.compose.ui.text.capitalize +import androidx.compose.ui.text.intl.Locale import androidx.core.content.ContextCompat import org.dhis2.commons.R import org.dhis2.commons.network.NetworkUtils @@ -25,6 +27,34 @@ class ResourceManager( fun getPlural(@PluralsRes pluralResource: Int, quantity: Int, vararg arguments: Any) = getWrapperContext().resources.getQuantityString(pluralResource, quantity, *arguments) + fun formatWithEnrollmentLabel( + programUid: String, + @StringRes stringResource: Int, + quantity: Int, + formatWithQuantity: Boolean = false, + ): String { + val enrollmentLabel = try { + D2Manager.getD2().programModule().programs().uid(programUid).blockingGet() + ?.enrollmentLabel() + } catch (e: Exception) { + null + } ?: getPlural(R.plurals.enrollment, quantity) + + return with(getString(stringResource)) { + val finalLabel = if (this@with.startsWith("%s")) { + enrollmentLabel.capitalize(Locale.current) + } else { + enrollmentLabel + } + + if (formatWithQuantity) { + format(quantity, finalLabel) + } else { + format(finalLabel) + } + } + } + fun getObjectStyleDrawableResource(icon: String?, @DrawableRes defaultResource: Int): Int { return icon?.let { val iconName = if (icon.startsWith("ic_")) icon else "ic_$icon" diff --git a/commons/src/main/res/values-lo/strings.xml b/commons/src/main/res/values-lo/strings.xml index 408f6ab088..ca1059c17d 100644 --- a/commons/src/main/res/values-lo/strings.xml +++ b/commons/src/main/res/values-lo/strings.xml @@ -66,7 +66,6 @@ ເປີດ ສຳເລັດແລ້ວ ຍົກເລີກແລ້ວ - ລົງທະບຽນຫົວໜ່ວຍການຈັດຕັ້ງ ມື້ນີ້ diff --git a/commons/src/main/res/values/strings.xml b/commons/src/main/res/values/strings.xml index 537fd500d8..4463adf3c6 100644 --- a/commons/src/main/res/values/strings.xml +++ b/commons/src/main/res/values/strings.xml @@ -45,9 +45,8 @@ Assigned to me Date Event date - Enrollment date Event status - Enrollment status + @string/enrollment_status Followed up %s @@ -76,8 +75,6 @@ Cancelled This record is marked for deletion. You can\'t access it. - Enrollment Org Unit - Today Yesterday @@ -240,4 +237,27 @@ %d years overdue Open with + + + + + enrollments + enrollment + + Show %s coordinates + + %s data + %s coordinates + %s date + %s status + You must provide a reason to check for %s in this protected program. All activity will be logged. + Reason to check for %s + This data is not editable because the %s is completed or cancelled + %s completed + %s cancelled + New %s + Enrolled in: + Delete %s only + Program %s + diff --git a/dhis2_android_maps/src/main/java/org/dhis2/maps/layer/MapLayerDialog.kt b/dhis2_android_maps/src/main/java/org/dhis2/maps/layer/MapLayerDialog.kt index 80cc3216ea..c783898064 100644 --- a/dhis2_android_maps/src/main/java/org/dhis2/maps/layer/MapLayerDialog.kt +++ b/dhis2_android_maps/src/main/java/org/dhis2/maps/layer/MapLayerDialog.kt @@ -124,7 +124,7 @@ class MapLayerDialog( is EnrollmentMapLayer -> layerMap["ENROLLMENT"]?.add( addCheckBox( source, - requireContext().getString(R.string.dialog_layer_enrollment_coordinates), + requireContext().getString(R.string.dialog_layer_enrollment_coordinates_v2), // TODO:5894 programUid not available MapLayerManager.ENROLLMENT_ICON_ID, ), ) diff --git a/dhis2_android_maps/src/main/res/values-ar/strings.xml b/dhis2_android_maps/src/main/res/values-ar/strings.xml index 922f438622..41886620a6 100644 --- a/dhis2_android_maps/src/main/res/values-ar/strings.xml +++ b/dhis2_android_maps/src/main/res/values-ar/strings.xml @@ -5,6 +5,5 @@ إظهار عرض القمر الصناعي إظهار الأحداث إظهار إحداثيات tei - عرض إحداثيات التسجيل إظهار طبقة مخطط الحرارة \ No newline at end of file diff --git a/dhis2_android_maps/src/main/res/values-b+uz+Latn/strings.xml b/dhis2_android_maps/src/main/res/values-b+uz+Latn/strings.xml index eb607fe484..df2739e899 100644 --- a/dhis2_android_maps/src/main/res/values-b+uz+Latn/strings.xml +++ b/dhis2_android_maps/src/main/res/values-b+uz+Latn/strings.xml @@ -6,6 +6,5 @@ Suniy yoʼldosh koʼrinishini koʼrsatish Hodisa/tadbirlarni koʼrsatish TEI koordinatalarini koʼrsatish - Qayd etilganlar koordinatalarini koʼrsatish Issiqlik xaritasi qatlamini koʼrsatish \ No newline at end of file diff --git a/dhis2_android_maps/src/main/res/values-cs/strings.xml b/dhis2_android_maps/src/main/res/values-cs/strings.xml index 5fe9efe6b4..a30850cf4f 100644 --- a/dhis2_android_maps/src/main/res/values-cs/strings.xml +++ b/dhis2_android_maps/src/main/res/values-cs/strings.xml @@ -6,6 +6,5 @@ Zobrazit satelitní pohled Zobrazit události Zobrazit TEI souřadnice - Zobrazit souřadnice zápisu Zobrazit vrstvu teplotní mapy \ No newline at end of file diff --git a/dhis2_android_maps/src/main/res/values-es/strings.xml b/dhis2_android_maps/src/main/res/values-es/strings.xml index 2fe50ae794..714a3f1190 100644 --- a/dhis2_android_maps/src/main/res/values-es/strings.xml +++ b/dhis2_android_maps/src/main/res/values-es/strings.xml @@ -12,6 +12,5 @@ Mostrar vista satélite Mostrar eventos Mostrar coordenadas de la entidad - Mostrar coordinadas del registro Mostrar mapa de calor \ No newline at end of file diff --git a/dhis2_android_maps/src/main/res/values-fr/strings.xml b/dhis2_android_maps/src/main/res/values-fr/strings.xml index 2307e8ce4b..a0c1673d79 100644 --- a/dhis2_android_maps/src/main/res/values-fr/strings.xml +++ b/dhis2_android_maps/src/main/res/values-fr/strings.xml @@ -6,6 +6,5 @@ Afficher la vue satellite Afficher les événements Afficher les coordonnées tei - Afficher les coordonnées d\'inscription Afficher la couche de carte thermique \ No newline at end of file diff --git a/dhis2_android_maps/src/main/res/values-nb/strings.xml b/dhis2_android_maps/src/main/res/values-nb/strings.xml index bd74aa749c..b499f469d2 100644 --- a/dhis2_android_maps/src/main/res/values-nb/strings.xml +++ b/dhis2_android_maps/src/main/res/values-nb/strings.xml @@ -6,6 +6,5 @@ Vis satelittvisning Vis hendelser Vis tei koordinater - Vis registreringskoordinater Vis varmekartlag \ No newline at end of file diff --git a/dhis2_android_maps/src/main/res/values-nl/strings.xml b/dhis2_android_maps/src/main/res/values-nl/strings.xml index 5265f81e29..b0746c898e 100644 --- a/dhis2_android_maps/src/main/res/values-nl/strings.xml +++ b/dhis2_android_maps/src/main/res/values-nl/strings.xml @@ -12,6 +12,5 @@ Satellietweergave tonen Toon evenementen Toon tei-coördinaten - Toon inschrijvingscoördinaten Warmtebeeld weergeven \ No newline at end of file diff --git a/dhis2_android_maps/src/main/res/values-pt/strings.xml b/dhis2_android_maps/src/main/res/values-pt/strings.xml index 8d4e1b85a2..59a77532f3 100644 --- a/dhis2_android_maps/src/main/res/values-pt/strings.xml +++ b/dhis2_android_maps/src/main/res/values-pt/strings.xml @@ -6,6 +6,5 @@ Mostrar vista de satélite Mostrar eventos Mostrar coordenadas tei - Mostrar coordenadas de inscrição Mostrar camada do mapa de calor \ No newline at end of file diff --git a/dhis2_android_maps/src/main/res/values-uk/strings.xml b/dhis2_android_maps/src/main/res/values-uk/strings.xml index f1db1ff5fd..97e4b1acbd 100644 --- a/dhis2_android_maps/src/main/res/values-uk/strings.xml +++ b/dhis2_android_maps/src/main/res/values-uk/strings.xml @@ -6,6 +6,5 @@ Показати як вид із супутника Показати випадки Показати координати об\'єкту, який відстежується - Показати координати реєстрації Показати шар теплової карти \ No newline at end of file diff --git a/dhis2_android_maps/src/main/res/values-uz/strings.xml b/dhis2_android_maps/src/main/res/values-uz/strings.xml index 966f884aab..68effdaef4 100644 --- a/dhis2_android_maps/src/main/res/values-uz/strings.xml +++ b/dhis2_android_maps/src/main/res/values-uz/strings.xml @@ -12,7 +12,6 @@ Суньий йўлдош кўринишини кўрсатиш Ҳодиса/тадбирларни кўрсатиш TEI координаталарини кўрсатиш - Қайд этилганлар координаталарини кўрсатиш Иссиқлик харитаси қатламини кўрсатиш Қурилмада Веб браузер ўрнатилмаган, веб саҳифани очишнинг иложи йўқ. \ No newline at end of file diff --git a/dhis2_android_maps/src/main/res/values-vi/strings.xml b/dhis2_android_maps/src/main/res/values-vi/strings.xml index d13414b704..1c7e5b60b9 100644 --- a/dhis2_android_maps/src/main/res/values-vi/strings.xml +++ b/dhis2_android_maps/src/main/res/values-vi/strings.xml @@ -6,6 +6,5 @@ Xem Vệ Tinh Hiển thị sự kiện Hiển thị tọa độ đối tượng theo dõi - Hiển thị tọa độ của đăng ký này Hiển thị lớp bản đồ nhiệt độ \ No newline at end of file diff --git a/dhis2_android_maps/src/main/res/values-zh-rCN/strings.xml b/dhis2_android_maps/src/main/res/values-zh-rCN/strings.xml index 4fec9eb63c..08d2e22b2f 100644 --- a/dhis2_android_maps/src/main/res/values-zh-rCN/strings.xml +++ b/dhis2_android_maps/src/main/res/values-zh-rCN/strings.xml @@ -6,6 +6,5 @@ 显示卫星视图 显示事件 显示跟踪实体坐标 - 显示注册坐标 显示热力图 \ No newline at end of file diff --git a/dhis2_android_maps/src/main/res/values-zh/strings.xml b/dhis2_android_maps/src/main/res/values-zh/strings.xml index 4fec9eb63c..08d2e22b2f 100644 --- a/dhis2_android_maps/src/main/res/values-zh/strings.xml +++ b/dhis2_android_maps/src/main/res/values-zh/strings.xml @@ -6,6 +6,5 @@ 显示卫星视图 显示事件 显示跟踪实体坐标 - 显示注册坐标 显示热力图 \ No newline at end of file diff --git a/dhis2_android_maps/src/main/res/values/strings.xml b/dhis2_android_maps/src/main/res/values/strings.xml index e8e8de0c07..f7e43c8a53 100644 --- a/dhis2_android_maps/src/main/res/values/strings.xml +++ b/dhis2_android_maps/src/main/res/values/strings.xml @@ -12,7 +12,6 @@ Show satellite view Show events Show tei coordinates - Show enrollment coordinates Show heatmap layer No web browser installed on device, can\'t open web page. \ No newline at end of file diff --git a/form/src/main/java/org/dhis2/form/data/EnrollmentRepository.kt b/form/src/main/java/org/dhis2/form/data/EnrollmentRepository.kt index 5dc3066aa0..fc1fb515a9 100644 --- a/form/src/main/java/org/dhis2/form/data/EnrollmentRepository.kt +++ b/form/src/main/java/org/dhis2/form/data/EnrollmentRepository.kt @@ -267,7 +267,7 @@ class EnrollmentRepository( enrollmentDataList.add( getEnrollmentDateField( conf.program()?.enrollmentDateLabel() - ?: enrollmentFormLabelsProvider.provideEnrollmentDateDefaultLabel(), + ?: enrollmentFormLabelsProvider.provideEnrollmentDateDefaultLabel(programUid!!), conf.program()?.selectEnrollmentDatesInFuture(), ), ) @@ -307,7 +307,7 @@ class EnrollmentRepository( private fun getEnrollmentDataSection(description: String?): FieldUiModel { return fieldFactory.createSection( ENROLLMENT_DATA_SECTION_UID, - enrollmentFormLabelsProvider.provideEnrollmentDataSectionLabel(), + enrollmentFormLabelsProvider.provideEnrollmentDataSectionLabel(programUid!!), description, false, 0, @@ -419,7 +419,7 @@ class EnrollmentRepository( private fun getEnrollmentCoordinatesField(featureType: FeatureType?): FieldUiModel { return fieldFactory.create( ENROLLMENT_COORDINATES_UID, - enrollmentFormLabelsProvider.provideEnrollmentCoordinatesLabel(), + enrollmentFormLabelsProvider.provideEnrollmentCoordinatesLabel(programUid!!), ValueType.COORDINATE, false, null, diff --git a/form/src/main/java/org/dhis2/form/ui/provider/EnrollmentFormLabelsProvider.kt b/form/src/main/java/org/dhis2/form/ui/provider/EnrollmentFormLabelsProvider.kt index 6fcbd42a7f..6e8abcc496 100644 --- a/form/src/main/java/org/dhis2/form/ui/provider/EnrollmentFormLabelsProvider.kt +++ b/form/src/main/java/org/dhis2/form/ui/provider/EnrollmentFormLabelsProvider.kt @@ -5,8 +5,12 @@ import org.dhis2.form.R class EnrollmentFormLabelsProvider(val resourceManager: ResourceManager) { - fun provideEnrollmentDataSectionLabel() = - resourceManager.getString(R.string.enrollment_data_section_label) + fun provideEnrollmentDataSectionLabel(programUid: String) = + resourceManager.formatWithEnrollmentLabel( + programUid, + R.string.enrollment_data_section_label_V2, + 1, + ) fun provideSingleSectionLabel() = resourceManager.getString(R.string.enrollment_single_section_label) @@ -15,12 +19,20 @@ class EnrollmentFormLabelsProvider(val resourceManager: ResourceManager) { fun provideTeiCoordinatesLabel() = resourceManager.getString(R.string.tei_coordinates) - fun provideEnrollmentCoordinatesLabel() = - resourceManager.getString(R.string.enrollment_coordinates) + fun provideEnrollmentCoordinatesLabel(programUid: String) = + resourceManager.formatWithEnrollmentLabel( + programUid, + R.string.enrollment_coordinates_V2, + 1, + ) fun provideReservedValueWarning() = resourceManager.getString(R.string.no_reserved_values) - fun provideEnrollmentDateDefaultLabel() = resourceManager.getString(R.string.enrollmment_date) + fun provideEnrollmentDateDefaultLabel(programUid: String) = resourceManager.formatWithEnrollmentLabel( + programUid, + R.string.enrollment_date_V2, + 1, + ) fun provideIncidentDateDefaultLabel() = resourceManager.getString(R.string.incident_date) } diff --git a/form/src/main/res/values-ar/strings.xml b/form/src/main/res/values-ar/strings.xml index ec8a58118f..e4c00feea0 100644 --- a/form/src/main/res/values-ar/strings.xml +++ b/form/src/main/res/values-ar/strings.xml @@ -82,12 +82,8 @@ حرف غير صالح 1 لا يمكن حفظ DataValues باستخدام هذه المدخلات. استخدم المدخل الآخر. غير مسموح بأرقام الصفر في البداية - بيانات التسجيل السمات - %s - الوحدة التنظيمية المسجلة إحداثيات لـ - إحداثيات التسجيل لا يوجد المزيد من القيم المحجوزة. اتصل بمسؤول النظام - تاريخ التسجيل تاريخ الحدوث \ No newline at end of file diff --git a/form/src/main/res/values-b+uz+Latn/strings.xml b/form/src/main/res/values-b+uz+Latn/strings.xml index 713e62325d..4d6a317813 100644 --- a/form/src/main/res/values-b+uz+Latn/strings.xml +++ b/form/src/main/res/values-b+uz+Latn/strings.xml @@ -50,12 +50,8 @@ Nusxa olindi Ushbu maydon uchun maʼlumot yoʼq Buni tekshiring! - Qayd qilish maʼlumotlari Аtribatlar - %s - OUga roʼyxatga olish Uchun koordinatalar - Roʼyxatdan oʼtish koordinatalari Saqlangan boshqa qiymatlar yoʼq. Tizim administratoriga murojaat qiling. - Qayd qilingan sana Hodisa sanasi \ No newline at end of file diff --git a/form/src/main/res/values-cs/strings.xml b/form/src/main/res/values-cs/strings.xml index 9f2d9d0f62..e30ba95a58 100644 --- a/form/src/main/res/values-cs/strings.xml +++ b/form/src/main/res/values-cs/strings.xml @@ -90,12 +90,8 @@ Neplatný znak 1 DataValues nelze uložit pomocí těchto argumentů. Použijte ten druhý. Čísla s úvodní nulou nejsou povolena - Údaje o zápisu Atributy - %s - Zápis Org. J.: Souřadnice pro - Souřadnice registrace Neexistují žádné další rezervované hodnoty. Obraťte se na správce systému - Datum zápisu Datum incidentu \ No newline at end of file diff --git a/form/src/main/res/values-es/strings.xml b/form/src/main/res/values-es/strings.xml index 6cf2b91b3c..b055e59f4f 100644 --- a/form/src/main/res/values-es/strings.xml +++ b/form/src/main/res/values-es/strings.xml @@ -90,12 +90,8 @@ Carácter 1 no es válido Los DataValues no pueden guardarse con estos argumentos. Use el otro método. No se permiten números con ceros a la izquierda - Datos de registro Atributos - %s - OU de admision: Coordenadas para - Coordenadas de admisión No quedan valores reservados. Contacte con el administrador del sistema. - Fecha de inscripción Fecha del incidente \ No newline at end of file diff --git a/form/src/main/res/values-fr/strings.xml b/form/src/main/res/values-fr/strings.xml index 511ba74be4..cef225c80c 100644 --- a/form/src/main/res/values-fr/strings.xml +++ b/form/src/main/res/values-fr/strings.xml @@ -70,12 +70,8 @@ Choisir depuis la galerie Attention. Vérifiez ceci! Ne pas montrer de nouveau - Données d\'inscription Attributs - %s - Unté d\'organisation d\'enrôlement Coordonnées pour - Coordonnées de l\'enrôlement Il n\'y a plus de valeurs réservées. Veuillez contacter votre administrateur système. - Date d\'enrôlement Date de l´incident \ No newline at end of file diff --git a/form/src/main/res/values-id/strings.xml b/form/src/main/res/values-id/strings.xml index a78b4de8ea..329cac7a3b 100644 --- a/form/src/main/res/values-id/strings.xml +++ b/form/src/main/res/values-id/strings.xml @@ -52,12 +52,8 @@ Pilih dari galeri Periksa ini! Jangan perlihatkan lagi - Data pendaftaran Atribut - %s - Daftarkan OU: Koordinat untuk - Koordinat pendaftaran Tidak ada nilai lainnya. Hubungi admin sistem Anda. - Tanggal pendaftaran Tanggal insiden \ No newline at end of file diff --git a/form/src/main/res/values-lo/strings.xml b/form/src/main/res/values-lo/strings.xml index d401ba5b51..40d2a27df6 100644 --- a/form/src/main/res/values-lo/strings.xml +++ b/form/src/main/res/values-lo/strings.xml @@ -51,9 +51,6 @@ ເລືອກຈາກຄັງຮູບ ກວດເບີ່ງອັນນີ້ ບໍ່ຕ້ອງສະແດງອີກ - ຂໍ້ມູນການລົງທະບຽນ - ລົງທະບຽນໜ່ວຍງານ ປະສານງານຫາ - ວັນທີ່ລົງທະບຽນ ວັນທີເດືອນປີທີ່ເຫດການເກີດຂື້ນ \ No newline at end of file diff --git a/form/src/main/res/values-nb/strings.xml b/form/src/main/res/values-nb/strings.xml index f1c26d5043..573f04005c 100644 --- a/form/src/main/res/values-nb/strings.xml +++ b/form/src/main/res/values-nb/strings.xml @@ -50,12 +50,8 @@ Kopiert Ingen info for dette feltet Sjekk dette! - Registreringsdata Attributter - %s - Registrerer OU: Koordinater for - Innmeldingskoordinater Det er ingen flere reserverte verdier. Kontakt din systemadministrator - Registreringsdato Forekomstdato \ No newline at end of file diff --git a/form/src/main/res/values-nl/strings.xml b/form/src/main/res/values-nl/strings.xml index 2551863b15..f8ba1502a3 100644 --- a/form/src/main/res/values-nl/strings.xml +++ b/form/src/main/res/values-nl/strings.xml @@ -90,13 +90,9 @@ Ongeldig teken 1 DataValues kunnen niet worden opgeslagen met deze argumenten. Gebruik de andere. Voorloopnullen zijn niet toegestaan - Inschrijving gegevens Kenmerken - %s - OU inschrijven: Coördinaten voor de - Inschrijving coördinaten Er zijn geen gereserveerde waarden meer. Neem contact op met uw systeembeheerder - Inschrijvingsdatum Incident datum De locatietoestemming is nodig voor het vastleggen van coördinaten. Schakel ze alstublieft in de applicatie-instellingen in Openen met diff --git a/form/src/main/res/values-pt/strings.xml b/form/src/main/res/values-pt/strings.xml index 4d832aa450..5833e6ded1 100644 --- a/form/src/main/res/values-pt/strings.xml +++ b/form/src/main/res/values-pt/strings.xml @@ -50,12 +50,8 @@ Copiado Nenhuma informação para este campo Verifique isso! - Dados de inscrição Atributos - %s - Inscrição UO: Coordenadas para o - Coordenadas de inscrição Não há mais valores reservados. Entre em contato com o administrador do sistema - Data de inscrição Data do incidente \ No newline at end of file diff --git a/form/src/main/res/values-uk/strings.xml b/form/src/main/res/values-uk/strings.xml index 4f93caa4a4..b225b73ba2 100644 --- a/form/src/main/res/values-uk/strings.xml +++ b/form/src/main/res/values-uk/strings.xml @@ -90,12 +90,8 @@ Недійсний символ 1 Значення даних не можна зберегти за допомогою цих аргументів. Використовуйте інші. Нульові цифри на початку не допускаються - Дані реєстрації Атрибути - %s - Організаційний підрозділ, який здійснює реєстрацію: Координати для - Координати реєстрації Більше немає зарезервованих значень. Зверніться до свого системного адміністратора - Дата реєстрації Дата інциденту \ No newline at end of file diff --git a/form/src/main/res/values-uz/strings.xml b/form/src/main/res/values-uz/strings.xml index 23824336f8..7b4570df5c 100644 --- a/form/src/main/res/values-uz/strings.xml +++ b/form/src/main/res/values-uz/strings.xml @@ -53,12 +53,8 @@ Суратга олиш Галереядан танлаш Буни текширинг! - Қайд қилиш маълумотлари Атрибатлар - %s - OUга рўйхатга олиш Учун координаталар - Рўйхатдан ўтиш координаталари Сақланган бошқа қийматлар йўқ. Тизим администраторига мурожаат қилинг. - Қайд этилган сана Ҳодиса санаси \ No newline at end of file diff --git a/form/src/main/res/values-vi/strings.xml b/form/src/main/res/values-vi/strings.xml index a15eefa8c1..46dbd21a81 100644 --- a/form/src/main/res/values-vi/strings.xml +++ b/form/src/main/res/values-vi/strings.xml @@ -74,12 +74,8 @@ Chọn từ thư viện ảnh Kiểm tra cái này! Không hiển thị lại - Dữ liệu đăng ký Thuộc tính - %s - Đơn vị đăng ký Tọa độ của - Tọa độ đăng ký Không có giá trị dành riêng nào nữa. Liên hệ với quản lý của bạn - Ngày đăng ký Ngày khởi phát \ No newline at end of file diff --git a/form/src/main/res/values-zh-rCN/strings.xml b/form/src/main/res/values-zh-rCN/strings.xml index 3c12ee3f99..5489af4312 100644 --- a/form/src/main/res/values-zh-rCN/strings.xml +++ b/form/src/main/res/values-zh-rCN/strings.xml @@ -48,12 +48,8 @@ 副本 该字段没有相关信息 检查 - 注册数据 属性- %s - 注册机构 坐标 - 注册坐标 没有更多保留值,请联系管理员 - 报名日期 事件日期 \ No newline at end of file diff --git a/form/src/main/res/values-zh/strings.xml b/form/src/main/res/values-zh/strings.xml index 67b33d6384..3bdc714233 100644 --- a/form/src/main/res/values-zh/strings.xml +++ b/form/src/main/res/values-zh/strings.xml @@ -90,13 +90,9 @@ 无效字符 1 无法使用这些参数保存 DataValues。使用另一个。 不允许前导零数字 - 注册数据 属性- %s - 注册机构 坐标 - 注册坐标 没有更多保留值,请联系管理员 - 报名日期 事件日期 扫描 二维码 diff --git a/form/src/main/res/values/strings.xml b/form/src/main/res/values/strings.xml index f02c6f7d84..c5db5c81bb 100644 --- a/form/src/main/res/values/strings.xml +++ b/form/src/main/res/values/strings.xml @@ -92,13 +92,9 @@ Invalid character 1 DataValues can\'t be saved using these arguments. Use the other one. Leading zero numbers are not allowed - Enrollment data Attributes - %s - Enrolling OU: Coordinates for the - Enrollment coordinates There are no more reserved values. Contact your system administrator - Enrollment date Incident date The location permission is needed for capturing coordinates. Please, enable them in the application settings Open with diff --git a/form/src/test/java/org/dhis2/form/data/FormRepositoryIntegrationTest.kt b/form/src/test/java/org/dhis2/form/data/FormRepositoryIntegrationTest.kt index 588888961a..ebc64ee083 100644 --- a/form/src/test/java/org/dhis2/form/data/FormRepositoryIntegrationTest.kt +++ b/form/src/test/java/org/dhis2/form/data/FormRepositoryIntegrationTest.kt @@ -40,9 +40,11 @@ class FormRepositoryIntegrationTest { private val conf: EnrollmentConfiguration = mock() private val enrollmentFormLabelsProvider: EnrollmentFormLabelsProvider = mock { on { provideEnrollmentOrgUnitLabel() } doReturn "OrgUnit label" + on { provideEnrollmentDataSectionLabel(any()) } doReturn "Enrollment data" } private val program: Program = mock { + on { uid() } doReturn "programUid" on { description() } doReturn "program description" on { enrollmentDateLabel() } doReturn "enrollment date label" on { selectEnrollmentDatesInFuture() } doReturn false diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 06b1bb0691..baa59ad61f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,7 +11,7 @@ hilt = '2.47' hiltCompiler = '1.0.0' jacoco = '0.8.10' designSystem = "0.2-20240208.105715-18" -dhis2sdk = "1.10.0-20240129.132841-8" +dhis2sdk = "1.10.0-20240207.110936-11" ruleEngine = "2.1.9" appcompat = "1.6.1" annotation = "1.6.0"