-
Notifications
You must be signed in to change notification settings - Fork 65
chore: [ANDROSDK-2275] Adds plurals terminology to Program, ProgramStage and TrackedEntityType #2661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
chore: [ANDROSDK-2275] Adds plurals terminology to Program, ProgramStage and TrackedEntityType #2661
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,7 @@ | |
|
|
||
| package org.hisp.dhis.android.network.program | ||
|
|
||
| import android.system.Os.access | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not intentional, is it? I don't know why it was not detected by the checks...
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't know why this was added, will remove it |
||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
| import org.hisp.dhis.android.core.common.FeatureType | ||
|
|
@@ -91,6 +92,7 @@ internal data class ProgramDTO( | |
| val accessLevel: String?, | ||
| val enrollmentLabel: String?, | ||
| val displayEnrollmentLabel: String?, | ||
| val displayEnrollmentsLabel: String?, | ||
| val followUpLabel: String?, | ||
| val displayFollowUpLabel: String?, | ||
| val orgUnitLabel: String?, | ||
|
|
@@ -103,8 +105,10 @@ internal data class ProgramDTO( | |
| val displayTrackedEntityAttributeLabel: String?, | ||
| val programStageLabel: String?, | ||
| val displayProgramStageLabel: String?, | ||
| val displayProgramStagesLabel: String?, | ||
| val eventLabel: String?, | ||
| val displayEventLabel: String?, | ||
| val displayEventsLabel: String?, | ||
| val attributeValues: List<AttributeValueDTO>?, | ||
| val enrollmentCategoryCombo: CategoryComboWithFallbackDTO = CategoryComboWithFallbackDTO(null), | ||
| val categoryMappings: List<CategoryMappingDTO>?, | ||
|
|
@@ -142,13 +146,16 @@ internal data class ProgramDTO( | |
| featureType(featureType?.let { FeatureType.valueOf(it) }) | ||
| accessLevel(accessLevel?.let { AccessLevel.valueOf(accessLevel) }) | ||
| displayEnrollmentLabel(displayEnrollmentLabel ?: enrollmentLabel) | ||
| displayEnrollmentsLabel(displayEnrollmentsLabel ?: enrollmentLabel) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure we should default to the singular value here, at least not in the SDK. It is important to tell the app that the plural translation is not defined so the app can decide what to to: the app can default to the singular translation or follow another approach.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, it makes sense to me.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree, I'll change it |
||
| displayFollowUpLabel(displayFollowUpLabel ?: followUpLabel) | ||
| displayOrgUnitLabel(displayOrgUnitLabel ?: orgUnitLabel) | ||
| displayRelationshipLabel(displayRelationshipLabel ?: relationshipLabel) | ||
| displayNoteLabel(displayNoteLabel ?: noteLabel) | ||
| displayTrackedEntityAttributeLabel(displayTrackedEntityAttributeLabel ?: trackedEntityAttributeLabel) | ||
| displayProgramStageLabel(displayProgramStageLabel ?: programStageLabel) | ||
| displayProgramStagesLabel(displayProgramStagesLabel ?: programStageLabel) | ||
| displayEventLabel(displayEventLabel ?: eventLabel) | ||
| displayEventsLabel(displayEventsLabel ?: eventLabel) | ||
| attributeValues?.let { attributeValues(it.map { it.toDomain() }) } | ||
| enrollmentCategoryCombo(enrollmentCategoryCombo.toDomain()) | ||
| categoryMappings(categoryMappings?.map { it.toDomain(id) }) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.