-
-
Notifications
You must be signed in to change notification settings - Fork 86
Feature/navigatum localization #1529
Feature/navigatum localization #1529
Conversation
private fun showNavigationDetailsProperties(navigationDetails: NavigationDetails) { | ||
navigationDetails.properties.forEach { property -> | ||
val propertyRow = NavigationPropertyRowBinding.inflate(layoutInflater, binding.propsList, true) | ||
propertyRow.propertyName.text = getTranslationForPropertyTitle(property.title) | ||
propertyRow.propertyName.text = property.title | ||
propertyRow.propertyValue.text = property.value | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps someone with more android-fu can help me here. Is it possible to do this more elegantly with bindings, now that we don't do the translation anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont know of a better way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this contribution ❤️
app/src/main/java/de/tum/in/tumcampusapp/component/other/locations/LocationManager.kt
Outdated
Show resolved
Hide resolved
private fun showNavigationDetailsProperties(navigationDetails: NavigationDetails) { | ||
navigationDetails.properties.forEach { property -> | ||
val propertyRow = NavigationPropertyRowBinding.inflate(layoutInflater, binding.propsList, true) | ||
propertyRow.propertyName.text = getTranslationForPropertyTitle(property.title) | ||
propertyRow.propertyName.text = property.title | ||
propertyRow.propertyValue.text = property.value | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont know of a better way
app/src/main/java/de/tum/in/tumcampusapp/component/other/locations/LocationManager.kt
Outdated
Show resolved
Hide resolved
* Add language parameter to navigatum queries * Remove 'getTranslationForPropertyTitle'
* Add language parameter to navigatum queries * Remove 'getTranslationForPropertyTitle'
Issue
This fixes the following issue(s):
Screenshot
Note how the names of the properties are properly translated
Why this is useful for all students
Makes the apps localization more consistent :)