diff --git a/commons/src/main/java/org/dhis2/commons/date/DateExtensions.kt b/commons/src/main/java/org/dhis2/commons/date/DateExtensions.kt index 1e063bdb9d..a5f82c9bdd 100644 --- a/commons/src/main/java/org/dhis2/commons/date/DateExtensions.kt +++ b/commons/src/main/java/org/dhis2/commons/date/DateExtensions.kt @@ -153,6 +153,7 @@ private fun getString( duration: Int, isOverdue: Boolean = true, ): String { + println("Ferdy is overdue: $isOverdue") return resourceManager.getPlural( if (isOverdue) overduePluralResource else scheduledPluralResource, duration, 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 f27112002b..80cd843e47 100644 --- a/commons/src/main/java/org/dhis2/commons/resources/ResourceManager.kt +++ b/commons/src/main/java/org/dhis2/commons/resources/ResourceManager.kt @@ -27,8 +27,18 @@ class ResourceManager( fun getPlural(@PluralsRes pluralResource: Int, quantity: Int) = getWrapperContext().resources.getQuantityString(pluralResource, quantity) - fun getPlural(@PluralsRes pluralResource: Int, quantity: Int, vararg arguments: Any) = - getWrapperContext().resources.getQuantityString(pluralResource, quantity, *arguments) + fun getPlural(@PluralsRes pluralResource: Int, quantity: Int, vararg arguments: Any) : String? { + println( + "Ferdy getPlural: ${ + getWrapperContext().resources.getQuantityString( + pluralResource, + quantity, + *arguments + ) + }" + ) + return getWrapperContext().resources.getQuantityString(pluralResource, quantity, *arguments) + } fun formatWithEnrollmentLabel( programUid: String?,