diff --git a/app/src/main/java/net/pokeranalytics/android/model/LiveData.kt b/app/src/main/java/net/pokeranalytics/android/model/LiveData.kt index 0e3f16e8..d2835613 100644 --- a/app/src/main/java/net/pokeranalytics/android/model/LiveData.kt +++ b/app/src/main/java/net/pokeranalytics/android/model/LiveData.kt @@ -71,14 +71,31 @@ enum class LiveData : Localizable { LOCATION -> R.string.location TOURNAMENT_NAME -> R.string.tournament_name TOURNAMENT_FEATURE -> R.string.tournament_feature - TRANSACTION -> R.string.operations + TRANSACTION -> R.string.operation TRANSACTION_TYPE -> R.string.operation_types FILTER -> R.string.filter + CUSTOM_FIELD -> R.string.custom_field + REPORT_SETUP -> R.string.custom + } + } + + val pluralResId: Int + get() { + return when (this) { + BANKROLL -> R.string.bankrolls + GAME -> R.string.games + LOCATION -> R.string.locations + TOURNAMENT_NAME -> R.string.tournament_names + TOURNAMENT_FEATURE -> R.string.tournament_features + TRANSACTION -> R.string.operations + TRANSACTION_TYPE -> R.string.operation_types + FILTER -> R.string.filters CUSTOM_FIELD -> R.string.custom_fields REPORT_SETUP -> R.string.custom } } + /** * Return the new entity titleResId */ @@ -93,4 +110,11 @@ enum class LiveData : Localizable { return context.getString(R.string.update_entity, this.localizedTitle(context).toLowerCase()) } + /** + * Return the update entity titleResId + */ + fun pluralLocalizedTitle(context: Context): String { + return context.getString(this.pluralResId, context) + } + } diff --git a/app/src/main/java/net/pokeranalytics/android/ui/fragment/DataListFragment.kt b/app/src/main/java/net/pokeranalytics/android/ui/fragment/DataListFragment.kt index 7241c472..9cd04502 100644 --- a/app/src/main/java/net/pokeranalytics/android/ui/fragment/DataListFragment.kt +++ b/app/src/main/java/net/pokeranalytics/android/ui/fragment/DataListFragment.kt @@ -127,7 +127,7 @@ class DataListFragment : DeletableItemFragment(), LiveRowRepresentableDataSource this.dataType = LiveData.values()[dataType] this.identifiableClass = this.dataType.relatedEntity - setToolbarTitle(this.dataType.localizedTitle(requireContext())) + setToolbarTitle(this.dataType.pluralLocalizedTitle(requireContext())) val realm = getRealm() this.items = realm.sorted(this.identifiableClass) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c4013628..801759ba 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -35,6 +35,7 @@ Update %s Comparison chart The filter cannot be deleted because it is currently selected. + Custom field Address Naming suggestions @@ -42,7 +43,9 @@ The end date should be after the start date Save Tournament name + Tournament names Tournament feature + Tournament features Pending Poker Analytics is a poker tracking app. We’re currently on our way to reproduce the iOS app and you’re currently using a lighter version. The app will work with a US$29.99 yearly subscription for an unlimited usage, but will be free until reaching the appropriate feature coverage. I understand @@ -161,7 +164,7 @@ Current year Curve Custom - Custom Fields + Custom fields Import & Export Data management Table @@ -712,6 +715,7 @@ You need to name the transaction type Transaction type Transactions + Transaction Add a transaction An identical transaction already exists A transaction type with the same name already exists