Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
dd9f773
Added Changelog file from Proper Brgdbald
ProperBrgdbald Aug 7, 2023
9c5cd36
Updated to add water and mercury column units
ProperBrgdbald Aug 7, 2023
3333815
Updated to add water and mercury column units
ProperBrgdbald Aug 7, 2023
9fec42e
Updated to add water and mercury column units
ProperBrgdbald Aug 7, 2023
68e3b58
Updated to add water and mercury column units
ProperBrgdbald Aug 7, 2023
ec906f8
Updated to add water and mercury column units
ProperBrgdbald Aug 7, 2023
2f4c45d
Updated to add water and mercury column units
ProperBrgdbald Aug 7, 2023
ae08fd3
Updated to add water and mercury column units
ProperBrgdbald Aug 7, 2023
94ad357
Updated to add water and mercury column units
ProperBrgdbald Aug 7, 2023
b968e55
Updated to add water and mercury column units
ProperBrgdbald Aug 7, 2023
81b02df
Updated to add water and mercury column units
ProperBrgdbald Aug 7, 2023
87d67ed
Updated to add water and mercury column units
ProperBrgdbald Aug 7, 2023
1f906c4
Updated to add water and mercury column units
ProperBrgdbald Aug 7, 2023
a4617c6
Updated to add water and mercury column units
ProperBrgdbald Aug 7, 2023
3dabbdc
Updated to add water and mercury column units
ProperBrgdbald Aug 7, 2023
e9a9538
Updated to add water and mercury column units
ProperBrgdbald Aug 7, 2023
8237736
Updated to add water and mercury column units
ProperBrgdbald Aug 7, 2023
81c0199
Updated to add water and mercury column units
ProperBrgdbald Aug 7, 2023
ed2173d
Updated to add water and mercury column units
ProperBrgdbald Aug 7, 2023
0d1cd63
Updated to add water and mercury column units
ProperBrgdbald Aug 7, 2023
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
58 changes: 58 additions & 0 deletions Changes.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
Changelog file by Proper Brgdbald for unit updates

* 2023-08-07

Inches H2O based from wikipedia (https://en.wikipedia.org/wiki/Inch_of_water)
mm H2O based on Inches H2O divided by 25.4
or https://en.wikipedia.org/wiki/Centimetre_of_water
Therefore conventional value
inHg based from mmHg but multiplied by 25.4 per wikipedia https://en.wikipedia.org/wiki/Inch

String translations are not perfect, please let me know.


Main conversion files changed where units are defined and converted.
- /app/src/main/java/com/physphil/android/unitconverterultimate/
- [X] /util/Conversions.java
- [-] /models/Conversion.java
- [ ] apparently no units spec'd
- [X] partly completing for reference I checked this
- [X] /models/Unit.java
- /v6000/src/main/java/com/physphil/android/unitconverterultimate/
- [-] ConversionFragment.kt
- [ ] apparently no units spec'd
- [X] partly completing for reference I checked this
- [ ] /conversion/ConversionRepository.kt
- Did not see need to change


I did not change the files underneath /app/src/test or /v6000/src/test.


List of files changed that contained "metre" and therefore other units:
- [X] ‎app/src
- [X] /main/java/com/physphil/android/unitconverterultimate/models/Unit.java
- [X] ‎/main/java/com/physphil/android/unitconverterultimate/util/Conversions.java
- [X] v6000/src
- [X] /main/java/com/physphil/android/unitconverterultimate/models/Unit.kt
- [X] /main/java/com/physphil/android/unitconverterultimate/data/DataSource.kt
- [X] /main/res/values/strings.xml
- [X] app/src/main/res
- [X] ‎/values/strings.xml
- [X] ‎/values-it/strings.xml
- [X] ‎/values-es/strings.xml
- [X] ‎/values-ru/strings.xml need translation
- Attempted with other units as sample
- [X] ‎/values-hr/strings.xml
- [X] ‎/values-hu/strings.xml need translation
- Attempted with other units as sample
- [X] ‎/values-fr/strings.xml
- [X] ‎/values-pt-rBR/strings.xml
- [X] ‎/values-nl/strings.xml
- [X] /values-tr/strings.xml
- [X] ‎/values-fa/strings.xml
- need help with translation and file formatting (Right Justified)
- Attempted with other units as sample
- [X] /values-de/strings.xml
- [X] /values-ja/strings.xml
- [X] ‎/values-nb/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ public class Unit {
public static final int TECHNICAL_ATMOSPHERE = 709;
public static final int MMHG = 707;
public static final int TORR = 708;
public static final int MMH2O = 709;
public static final int INHG = 710;
public static final int INH2O = 711;

public static final int KM_HR = 800;
public static final int MPH = 801;
Expand Down Expand Up @@ -198,7 +201,7 @@ public class Unit {
KILOMETRE, MILE, METRE, CENTIMETRE, MILLIMETRE, MICROMETRE, NANOMETRE, YARD, FEET, INCH, NAUTICAL_MILE, FURLONG, LIGHT_YEAR,
KILOGRAM, POUND, GRAM, MILLIGRAM, OUNCE, GRAIN, STONE, METRIC_TON, SHORT_TON, LONG_TON,
WATT, KILOWATT, MEGAWATT, HP, HP_UK, FT_LBF_S, CALORIE_S, BTU_S, KVA,
MEGAPASCAL, KILOPASCAL, PASCAL, BAR, PSI, PSF, ATMOSPHERE, TECHNICAL_ATMOSPHERE, MMHG, TORR,
MEGAPASCAL, KILOPASCAL, PASCAL, BAR, PSI, PSF, ATMOSPHERE, TECHNICAL_ATMOSPHERE, MMHG, TORR, MMH2O, INHG, INH2O,
KM_HR, MPH, M_S, FPS, KNOT,
CELSIUS, FAHRENHEIT, KELVIN, RANKINE, DELISLE, NEWTON, REAUMUR, ROMER, GAS_MARK,
YEAR, MONTH, WEEK, DAY, HOUR, MINUTE, SECOND, MILLISECOND, NANOSECOND,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ private void getPressureConversions() {
units.add(new Unit(TECHNICAL_ATMOSPHERE, R.string.technical_atmosphere, 98066.5, 0.0000101971621297792824257));
units.add(new Unit(MMHG, R.string.mmhg, 133.322387415, 0.007500615758456563339513));
units.add(new Unit(TORR, R.string.torr, 133.3223684210526315789, 0.00750061682704169751));
units.add(new Unit(MMH2O, R.string.mmh2o, 9.806650, 0.1019716));
units.add(new Unit(INHG, R.string.inhg, 3386.388640341, 0.00029529983));
units.add(new Unit(INH2O, R.string.inh2o, 249.0889, 0.0040146309));
addConversion(Conversion.PRESSURE, new Conversion(Conversion.PRESSURE, R.string.pressure, units));
}

Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@
<string name="technical_atmosphere">Technische Atm.</string>
<string name="mmhg">mm Hg</string>
<string name="torr">Torr</string>
<string name="mmh2o">mm H2O</string>
<string name="inhg">in Hg</string>
<string name="inh2o">in H2O</string>

<!-- Speed -->
<string name="km_h">Kilometer/Stunde</string>
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@
<string name="technical_atmosphere">Atm Técnica</string>
<string name="mmhg">mm Hg</string>
<string name="torr">Torr</string>
<string name="mmh2o">mm H2O</string>
<string name="inhg">in Hg</string>
<string name="inh2o">in H2O</string>

<!-- Speed -->
<string name="km_h">Kilometro/hora</string>
Expand Down
7 changes: 5 additions & 2 deletions app/src/main/res/values-fa/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@
<string name="technical_atmosphere">Technical Atm</string>
<string name="mmhg">میلی متر جیوه</string>
<string name="torr">Torr</string>

<string name="mmh2o">میلی متر H2O</string>
<string name="inhg">اینچ Hg</string>
<string name="inh2o">اینچ H2O</string>

<!-- سرعت -->
<string name="km_h">کیلومتر/ساعت</string>
<string name="mph">مایل/ساعت</string>
Expand Down Expand Up @@ -267,4 +270,4 @@
<string name="usd">دلار آمریکا</string>
<string name="zar">رند آفریقای جنوبی</string>

</resources>
</resources>
3 changes: 3 additions & 0 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@
<string name="technical_atmosphere">Atm. technique</string>
<string name="mmhg">mmHg</string>
<string name="torr">Torr</string>
<string name="mmh2o">mmH2O</string>
<string name="inhg">inHg</string>
<string name="inh2o">inH2O</string>

<!-- Speed -->
<string name="km_h">Kilomètre/heure</string>
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-hr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@
<string name="technical_atmosphere">Technical Atm</string>
<string name="mmhg">mm Hg</string>
<string name="torr">Torr</string>
<string name="mmh2o">mm H2O</string>
<string name="inhg">in Hg</string>
<string name="inh2o">in H2O</string>

<!-- Speed -->
<string name="km_h">Kilometar/sat</string>
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-hu/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@
<string name="technical_atmosphere">Technikai atmoszféra</string>
<string name="mmhg">mmHg</string>
<string name="torr">Torr</string>
<string name="mmh2o">mmH2O</string>
<string name="inhg">Hüvelyk Hg</string>
<string name="inh2o">Hüvelyk H2O</string>

<!-- Speed -->
<string name="km_h">Kilométer/óra</string>
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@
<string name="technical_atmosphere">Atmosfera Tecnica</string>
<string name="mmhg">mm Hg</string>
<string name="torr">Torr</string>
<string name="mmh2o">mm H2O</string>
<string name="inhg">in Hg</string>
<string name="inh2o">in H2O</string>

<!-- Speed -->
<string name="km_h">Km/h</string>
Expand Down Expand Up @@ -267,4 +270,4 @@
<string name="usd">Dollaro Americano</string>
<string name="zar">Rand Sudafricano</string>

</resources>
</resources>
5 changes: 4 additions & 1 deletion app/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@
<string name="technical_atmosphere">工学気圧</string>
<string name="mmhg">mm Hg</string>
<string name="torr">トル</string>
<string name="mmh2o">mm H2O</string>
<string name="inhg">in Hg</string>
<string name="inh2o">in H2O</string>

<!-- Speed -->
<string name="km_h">キロメートル/時</string>
Expand Down Expand Up @@ -267,4 +270,4 @@
<string name="usd">米ドル</string>
<string name="zar">南アフリカ・ランド</string>

</resources>
</resources>
3 changes: 3 additions & 0 deletions app/src/main/res/values-nb/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@
<string name="technical_atmosphere">Teknisk Atm</string>
<string name="mmhg">mm Hg</string>
<string name="torr">Torr</string>
<string name="mmh2o">mm H2O</string>
<string name="inhg">in Hg</string>
<string name="inh2o">in H2O</string>

<!-- Speed -->
<string name="km_h">Kilometer/time</string>
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/res/values-nl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@
<string name="technical_atmosphere">Technical Atm</string>
<string name="mmhg">mm Hg</string>
<string name="torr">Torr</string>
<string name="mmh2o">mm H2O</string>
<string name="inhg">in Hg</string>
<string name="inh2o">in H2O</string>

<!-- Speed -->
<string name="km_h">Kilometer/uur</string>
Expand Down Expand Up @@ -284,4 +287,4 @@
<string name="usd">Amerikaanse Dollar</string>
<string name="zar">Zuid-Afrikaanse Rand</string>

</resources>
</resources>
5 changes: 4 additions & 1 deletion app/src/main/res/values-pt-rBR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@
<string name="technical_atmosphere">Atmosfera técnica</string>
<string name="mmhg">mm Hg</string>
<string name="torr">Torr</string>
<string name="mmh2o">mm H2O</string>
<string name="inhg">in Hg</string>
<string name="inh2o">in H2O</string>

<!-- Velocidade -->
<string name="km_h">Quilômetro/hora</string>
Expand Down Expand Up @@ -269,4 +272,4 @@
<string name="prefs_summary_language">Escolha o idioma a ser usado em todo o aplicativo</string>
<string name="prefs_title_language">Idioma</string>

</resources>
</resources>
5 changes: 4 additions & 1 deletion app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@
<string name="technical_atmosphere">Технич. атмосфера</string>
<string name="mmhg">мм рт. ст.</string>
<string name="torr">Торр</string>
<string name="mmh2o">мм H2O</string>
<string name="inhg">Дюйм рт. ст.</string>
<string name="inh2o">Дюйм H2O</string>

<!-- Speed -->
<string name="km_h">Километр/час</string>
Expand Down Expand Up @@ -267,4 +270,4 @@
<string name="usd">Доллар США</string>
<string name="zar">Южноафриканский рэнд</string>

</resources>
</resources>
5 changes: 4 additions & 1 deletion app/src/main/res/values-tr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@
<string name="technical_atmosphere">Teknik Atmosfer</string>
<string name="mmhg">mm Hg</string>
<string name="torr">Torr</string>
<string name="mmh2o">mm H2O</string>
<string name="inhg">in Hg</string>
<string name="inh2o">in H2O</string>

<!-- Speed -->
<string name="km_h">Kilometre/saat</string>
Expand Down Expand Up @@ -267,4 +270,4 @@
<string name="usd">Amerikan Doları</string>
<string name="zar">Güney Afrika Randı</string>

</resources>
</resources>
5 changes: 4 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
<string name="technical_atmosphere">Technical Atm</string>
<string name="mmhg">mm Hg</string>
<string name="torr">Torr</string>
<string name="mmh2o">mm H2O</string>
<string name="inhg">in Hg</string>
<string name="inh2o">in H2O</string>

<!-- Speed -->
<string name="km_h">Kilometre/hour</string>
Expand Down Expand Up @@ -291,4 +294,4 @@
<string name="isk">Icelandic Krona</string>
<string name="language_norwegian">Norwegian</string>

</resources>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,10 @@ object PressureDataSource : DataSource<Pressure>() {
Pressure.Atmosphere to multipliers("101325", "0.0000098692326671601283"),
Pressure.TechnicalAtmosphere to multipliers("98066.5", "0.0000101971621297792824257"),
Pressure.MmHg to multipliers("133.322387415", "0.007500615758456563339513"),
Pressure.Torr to multipliers("133.3223684210526315789", "0.00750061682704169751")
Pressure.Torr to multipliers("133.3223684210526315789", "0.00750061682704169751"),
Pressure.MmH2O to multipliers("9.806650", "0.1019716"),
Pressure.InHg to multipliers("3386.388640341", "0.00029529983"),
Pressure.InH2O to multipliers("249.0889", "0.0040146309")
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,13 @@ sealed class Pressure(override val displayStringResId: Int) : Unit() {
object TechnicalAtmosphere : Pressure(R.string.technical_atmosphere)
object MmHg : Pressure(R.string.mmhg)
object Torr : Pressure(R.string.torr)
object MmH2O : Pressure(R.string.mmh2o)
object InHg : Pressure(R.string.inhg)
object InH2O : Pressure(R.string.inh2o)

companion object {
val all: List<Pressure> = listOf(
Megapascal, Kilopascal, Pascal, Bar, Psi, Psf, Atmosphere, TechnicalAtmosphere, MmHg, Torr
Megapascal, Kilopascal, Pascal, Bar, Psi, Psf, Atmosphere, TechnicalAtmosphere, MmHg, Torr, MmH2O, InHg, InH2O
)
}
}
Expand Down
3 changes: 3 additions & 0 deletions v6000/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@
<string name="technical_atmosphere">Technical Atm</string>
<string name="mmhg">mm Hg</string>
<string name="torr">Torr</string>
<string name="mmh2o">mm H2O</string>
<string name="inhg">in Hg</string>
<string name="inh2o">in H2O</string>

<!-- Speed -->
<string name="km_h">Kilometre/hour</string>
Expand Down