Skip to content

Commit

Permalink
feat: customary us cup, more common symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
Omikorin authored Dec 31, 2024
1 parent e042561 commit b412c1f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,18 @@ object VolumeConverter : Converter {
key = "PintUS"
)

data object CupUS : Unit(
nameResId = R.string.unit_volume_cup_us,
symbolResId = R.string.unit_volume_cup_us_symbol,
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 = "CupUS"
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(
Expand Down Expand Up @@ -193,7 +200,8 @@ object VolumeConverter : Converter {
Unit.GallonUS,
Unit.QuartUS,
Unit.PintUS,
Unit.CupUS,
Unit.LegalCupUS,
Unit.CustomaryCupUS,
Unit.GillUS,
Unit.FluidOunceUS,
Unit.BarrelImperial,
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/values/donottranslate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +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_cup_us_symbol">c (US)</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
3 changes: 2 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +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_cup_us">Cup (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

0 comments on commit b412c1f

Please sign in to comment.