wolph / alfred-converter

Alfred unit converter is a smart calculator for Alfred with support for unit conversions to make it a bit comparable to the Google Calculator and Wolfram Alpha.
93 stars 15 forks source link

US fluid ounces as source #11

Closed matthaedo closed 5 years ago

matthaedo commented 6 years ago

When converting from in^3 or other units of volume, I see US fluid ounces as an destination unit option. However, I am unable to input US fluid ounces as a source unit.

wolph commented 6 years ago

It depends on which one you want, the English or the US version. The list of units can be found here: https://github.com/WoLpH/alfred-converter/blob/master/poscUnits22.xml

Which gives the following options:

Aliases can be added fairly easy by adding them to the constants.py file at the ANNOTATION_REPLACEMENTS https://github.com/WoLpH/alfred-converter/blob/master/converter/constants.py

matthaedo commented 6 years ago

I am unable to get "fl ozUS" to work. Perhaps I'm missing something obvious.

floz
wolph commented 6 years ago

You're right, somehow the space appears to be messing with the parsing. The flozUS works (just tested over here).

I'll create a new bug for that, something similar happens for all units with spaces (i.e. square feet)

matthaedo commented 6 years ago

I should have thought to try flozUS. Thank you.

wolph commented 6 years ago

Maybe, but "fluid ounce" and fl oz" and all variations should work as well. This is indeed a bug :)

wolph commented 5 years ago

I've fixed it on dev, should be released soon