Conversation
…gth an hour in addition to length per hour
|
Units names were moved into strings.xml. Everything seems good in English but would definitely appreciate feedback about how it's handled in other languages |
|
Added currency conversion support |
There was a problem hiding this comment.
@tylxr59 I am not sure if moving it into strings is the best option. Maybe it should be moved into it's own xml (or json file) where it can be translated by weblate as a separate component? It kind of clutters up the strings file right now...
There was a problem hiding this comment.
Yeah it would make sense to make it a separate Weblate component. I'm wondering though, isn't there some public database of unit names in various languages? E.g. I found unit definitions in unicode-cldr: https://github.com/unicode-org/cldr/blob/466e22b3ee3926e7e7492f575d865990e9c2d0c5/common/main/en.xml#L8619 . Maybe it would make sense to extend the unicode-cldr-plugin to extract such data too, so we don't have to make our translators translate all hundreds of units?
There was a problem hiding this comment.
Btw for the units, Android already provides a lot of translations, maybe those are enough for us: https://developer.android.com/reference/android/icu/util/MeasureUnit
There was a problem hiding this comment.
Refactored to using MeasureUnit in the new commit
app/src/main/kotlin/org/stypox/dicio/skills/unit_conversion/UnitConversionSkill.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/org/stypox/dicio/skills/unit_conversion/UnitConversionSkill.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/org/stypox/dicio/skills/unit_conversion/UnitConversionSkill.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/org/stypox/dicio/skills/unit_conversion/UnitConversionSkill.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/org/stypox/dicio/skills/unit_conversion/Unit.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/org/stypox/dicio/skills/unit_conversion/UnitConversionSkill.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/org/stypox/dicio/skills/unit_conversion/UnitConversionSkill.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/org/stypox/dicio/skills/unit_conversion/UnitConversionSkill.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/org/stypox/dicio/skills/unit_conversion/Unit.kt
Outdated
Show resolved
Hide resolved
…itConversionSkill.kt Co-authored-by: Inhishonor <[email protected]>
…it.kt Co-authored-by: Inhishonor <[email protected]>
…itConversionSkill.kt Co-authored-by: Inhishonor <[email protected]>
…itConversionSkill.kt Co-authored-by: Inhishonor <[email protected]>
|
Added cryptocurrency pricing in a new skill. Was going back and forth about whether it should be included in unit_conversion but decided against it. My understanding is that most cryptocurrency users/enthusiasts track price in USD regardless of their local currency. |
Adds support for converting between units. Calculations are as accurate as I could make them and double-checked with other sources.
I did a fair amount of testing with this and it works well. It looks like the translation skill causes some issues on occasion.
Resolves #13 partially