Skip to content

Conversation

@tylxr59
Copy link

@tylxr59 tylxr59 commented Dec 12, 2025

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

@tylxr59
Copy link
Author

tylxr59 commented Dec 13, 2025

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

@tylxr59
Copy link
Author

tylxr59 commented Dec 17, 2025

Added currency conversion support

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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...

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactored to using MeasureUnit in the new commit

tylxr59 and others added 4 commits December 17, 2025 14:59
…itConversionSkill.kt

Co-authored-by: Inhishonor <inhishonor@protonmail.com>
…it.kt

Co-authored-by: Inhishonor <inhishonor@protonmail.com>
…itConversionSkill.kt

Co-authored-by: Inhishonor <inhishonor@protonmail.com>
…itConversionSkill.kt

Co-authored-by: Inhishonor <inhishonor@protonmail.com>
@tylxr59 tylxr59 requested a review from Inhishonor December 17, 2025 20:03
@tylxr59
Copy link
Author

tylxr59 commented Dec 19, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New Skills

3 participants