Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add volume cup unit #38

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,20 @@ object VolumeConverter : Converter {
factor = 0.000473176473,
key = "PintUS"
)

data object LegalCupUS : Unit(
nameResId = R.string.unit_volume_legal_cup_us,
symbolResId = R.string.unit_volume_legal_cup_us_symbol,
factor = 0.00024,
key = "LegalCupUS"
)

data object CustomaryCupUS : Unit(
nameResId = R.string.unit_volume_customary_cup_us,
symbolResId = R.string.unit_volume_customary_cup_us_symbol,
factor = 0.0002365882365,
key = "CustomaryCupUS"
)

data object GillUS : Unit(
nameResId = R.string.unit_volume_gill_us,
Expand Down Expand Up @@ -186,6 +200,8 @@ object VolumeConverter : Converter {
Unit.GallonUS,
Unit.QuartUS,
Unit.PintUS,
Unit.LegalCupUS,
Unit.CustomaryCupUS,
Unit.GillUS,
Unit.FluidOunceUS,
Unit.BarrelImperial,
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/donottranslate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
<string name="unit_volume_gallon_us_symbol">gal (US)</string>
<string name="unit_volume_quart_us_symbol">qt (US)</string>
<string name="unit_volume_pint_us_symbol">pt (US fl)</string>
<string name="unit_volume_legal_cup_us_symbol">cup (US)</string>
<string name="unit_volume_customary_cup_us_symbol">cup (US)</string>
<string name="unit_volume_gill_us_symbol">gi (US)</string>
<string name="unit_volume_fluid_ounce_us_symbol">US fl oz</string>
<string name="unit_volume_barrel_imperial_symbol">bl (imp)</string>
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
<string name="unit_volume_gallon_us">Gallon (US)</string>
<string name="unit_volume_quart_us">Quart (US)</string>
<string name="unit_volume_pint_us">Pint (US)</string>
<string name="unit_volume_legal_cup_us">Legal Cup (US)</string>
<string name="unit_volume_customary_cup_us">Customary Cup (US)</string>
<string name="unit_volume_gill_us">Gill (US)</string>
<string name="unit_volume_fluid_ounce_us">Fluid Ounce (US)</string>
<string name="unit_volume_barrel_imperial">Barrel (Imperial)</string>
Expand Down