Skip to content

Commit 37859b3

Browse files
committed
fixed unit conv and added simplified chinese translation to system settings
1 parent 4b5d379 commit 37859b3

File tree

9 files changed

+30
-38
lines changed

9 files changed

+30
-38
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
*.iml
22
.gradle
33
/local.properties
4+
/.idea
5+
/.idea/discord.xml
46
/.idea/caches
57
/.idea/libraries
68
/.idea/modules.xml

app/build.gradle.kts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,16 @@ android {
1717
excludeFields = arrayOf("generated")
1818
}
1919

20+
androidResources {
21+
generateLocaleConfig = true
22+
}
23+
2024
defaultConfig {
2125
applicationId = "yetzio.yetcalc"
2226
minSdk = 28
2327
targetSdk = 35
24-
versionCode = 19
25-
versionName = "2.0.3"
28+
versionCode = 20
29+
versionName = "2.0.4"
2630

2731
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2832
}

app/src/main/java/yetzio/yetcalc/component/UnitConv.kt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,8 +1189,8 @@ class UnitConv{
11891189
return rankine * 5/9
11901190
}
11911191

1192-
fun DelisleToKel(delisle: Double): Double{
1193-
return (delisle + 100)/1.5000 + abs_zero
1192+
fun DelisleToKel(delisle: Double): Double {
1193+
return 373.15 - (delisle / 1.5)
11941194
}
11951195

11961196
fun NewtonToKel(newton: Double): Double{
@@ -1275,24 +1275,24 @@ class UnitConv{
12751275
return (kelvin - abs_zero) * 9/5 + 32
12761276
}
12771277

1278-
fun KelToRankine(kelvin: Double): Double{
1279-
return kelvin / 5/9
1278+
fun KelToRankine(kelvin: Double): Double {
1279+
return kelvin * 9/5
12801280
}
12811281

1282-
fun KelToDelisle(kelvin: Double): Double{
1283-
return (kelvin - 100)*1.5000 - abs_zero
1282+
fun KelToDelisle(kelvin: Double): Double {
1283+
return (373.15 - kelvin) * 1.5
12841284
}
12851285

1286-
fun KelToNewton(kelvin: Double): Double{
1287-
return (kelvin*0.33000) - abs_zero
1286+
fun KelToNewton(kelvin: Double): Double {
1287+
return (kelvin - abs_zero) * 0.33
12881288
}
12891289

1290-
fun KelToReaumur(kelvin: Double): Double{
1291-
return (kelvin*0.80000) - abs_zero
1290+
fun KelToReaumur(kelvin: Double): Double {
1291+
return (kelvin - abs_zero) * 0.8
12921292
}
12931293

1294-
fun KelToRomer(kelvin: Double): Double{
1295-
return (kelvin + 7.5)*0.52500 - abs_zero
1294+
fun KelToRomer(kelvin: Double): Double {
1295+
return (kelvin - abs_zero) * 21/40 + 7.5
12961296
}
12971297

12981298
fun KelToYoctoKel(kelvin: Double): Double{

app/src/main/java/yetzio/yetcalc/component/operators/ProgrammerOps.kt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,6 @@ class InfixOrOperator : AbstractOperator() {
3737
}
3838
}
3939

40-
//@PrefixOperator(precedence = OPERATOR_PRECEDENCE_UNARY)
41-
//class PrefixNotOperator: AbstractOperator() {
42-
// @Throws(EvaluationException::class)
43-
// override fun evaluate(
44-
// expression: Expression, operatorToken: Token?, vararg operands: EvaluationValue
45-
// ): EvaluationValue {
46-
// val value = expression.evaluateSubtree(operands[0].expressionNode)
47-
//
48-
// val result = value.stringValue.toLong(10).inv()
49-
//
50-
// return expression.convertValue(result)
51-
// }
52-
//}
53-
5440
@PrefixOperator
5541
class PrefixNotOperator : AbstractOperator() {
5642
override fun evaluate(

app/src/main/java/yetzio/yetcalc/config/CalcBaseActivity.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import yetzio.yetcalc.views.ProgramCalcActivity
3030
import yetzio.yetcalc.views.UnitConvActivity
3131
import kotlin.properties.Delegates
3232

33-
3433
open class CalcBaseActivity : AppCompatActivity() {
3534
lateinit var theme: String
3635
lateinit var currentMatYouStyle: String
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
unqualifiedResLocale=en-US

app/src/main/res/values-zh-rCN/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<string name="VERSION_NAMEANDNUM">重回正轨 (2.0.3)</string>
3+
<string name="VERSION_NAMEANDNUM">重回正轨 (2.0.4)</string>
44
<string name="eastereggtoast">你现在拥有了能带领人类撕碎高维度数学难题的完美躯体!(Gigachad.mp4)</string>
55
<string name="app_descrp">Yet another calculator by Yet Zio</string>
66
<string name="ghbtext">在Github查看</string>

app/src/main/res/values/strings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<resources>
22
<string name="author_name" translatable="false">Yet Zio</string>
33
<string name="app_name" translatable="false">yetCalc</string>
4-
<string name="VERSION_NUM" translatable="false">2.0.3</string>
5-
<string name="VERSION_NAMEANDNUM">Back in Action (2.0.3)</string>
4+
<string name="VERSION_NUM" translatable="false">2.0.4</string>
5+
<string name="VERSION_NAMEANDNUM">Back in Action (2.0.4)</string>
66
<string name="eastereggtoast">Congratulations, Now you are a Gigachad!</string>
77
<string name="app_descrp">Yet another calculator by Yet Zio</string>
88
<string name="ghbtext">View on GitHub</string>
@@ -212,7 +212,7 @@
212212
<string name="helpmenu">Help</string>
213213

214214
<string name="currency_convertertitle">\nCurrency</string>
215-
<string name="converter">Unit Converter</string>
215+
<string name="converter">Converter</string>
216216
<string name="from">From</string>
217217
<string name="to">To</string>
218218
<string name="amount">Amount</string>

gradle/libs.versions.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[versions]
2-
aboutlibrariesCore = "11.3.0-rc01"
3-
agp = "8.7.2"
2+
aboutlibrariesCore = "11.3.0-rc02"
3+
agp = "8.7.3"
44
desugar_jdk_libs = "2.1.3"
55
dynamicToastsVersion = "4.3.0"
66
evalex = "3.4.0"
77
gson = "2.11.0"
8-
kotlin = "1.9.0"
8+
kotlin = "2.1.0"
99
coreKtx = "1.15.0"
1010
junit = "4.13.2"
1111
junitVersion = "1.2.1"
@@ -18,7 +18,7 @@ activity = "1.9.3"
1818
constraintlayout = "2.2.0"
1919
mathparserOrgMxparser = "4.4.3"
2020
preferenceKtx = "1.2.1"
21-
navigationUiKtx = "2.8.4"
21+
navigationUiKtx = "2.8.5"
2222

2323
[libraries]
2424
aboutlibraries = { module = "com.mikepenz:aboutlibraries", version.ref = "aboutlibrariesCore" }
@@ -46,5 +46,5 @@ androidx-navigation-ui-ktx = { group = "androidx.navigation", name = "navigation
4646
[plugins]
4747
androidApplication = { id = "com.android.application", version.ref = "agp" }
4848
jetbrainsKotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
49-
aboutLibraries = { id = "com.mikepenz.aboutlibraries.plugin", version = "11.3.0-rc01" }
49+
aboutLibraries = { id = "com.mikepenz.aboutlibraries.plugin", version = "11.3.0-rc02" }
5050

0 commit comments

Comments
 (0)