Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Feature/navigatum localization #1529

Merged
merged 4 commits into from
Nov 14, 2022

Conversation

ctsk
Copy link
Contributor

@ctsk ctsk commented Nov 14, 2022

Issue

This fixes the following issue(s):

Screenshot

image
image

Note how the names of the properties are properly translated

Why this is useful for all students

Makes the apps localization more consistent :)

Comment on lines 110 to 116
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
}
}
Copy link
Contributor Author

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?

Copy link
Member

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

@ctsk ctsk marked this pull request as ready for review November 14, 2022 15:06
Copy link
Member

@CommanderStorm CommanderStorm left a 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 ❤️

Comment on lines 110 to 116
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
}
}
Copy link
Member

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

@CommanderStorm CommanderStorm enabled auto-merge (squash) November 14, 2022 18:03
@CommanderStorm CommanderStorm merged commit f8ca3c5 into TUM-Dev:master Nov 14, 2022
CommanderStorm pushed a commit that referenced this pull request Nov 14, 2022
* Add language parameter to navigatum queries
* Remove 'getTranslationForPropertyTitle'
CommanderStorm pushed a commit that referenced this pull request Nov 14, 2022
* Add language parameter to navigatum queries
* Remove 'getTranslationForPropertyTitle'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Navigation API Translation
2 participants