Repo created
This commit is contained in:
parent
d6b5d53060
commit
d90a1dc8df
2145 changed files with 210227 additions and 2 deletions
1
weather-unit/.gitignore
vendored
Normal file
1
weather-unit/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/build
|
||||
192
weather-unit/README.md
Normal file
192
weather-unit/README.md
Normal file
|
|
@ -0,0 +1,192 @@
|
|||
# Breezy Weather unit conversion and formatting library
|
||||
|
||||
Android library to handle:
|
||||
|
||||
- Unit conversion, with syntax inspired by [Kotlin duration](https://kotlinlang.org/docs/time-measurement.html#time-sources).
|
||||
- Unit formatting in various languages, including on devices without ICU support or with missing CLDR data, with a simplified backport (no handling of plural and non-nominative rules)
|
||||
- Number formatting
|
||||
- Computing of some common weather data (apparent temperature, dew point, etc)
|
||||
|
||||
Remains to do:
|
||||
|
||||
- Complete unit testing
|
||||
- Plus and minus operations
|
||||
- Parse from string
|
||||
|
||||
|
||||
# Summary of supported units
|
||||
|
||||
Android translations are provided without plural rules.
|
||||
|
||||
## Temperature
|
||||
|
||||
| Unit | `NumberFormatter` | `MeasureFormat` | Android translations |
|
||||
|--------------------|-------------------|-----------------|----------------------|
|
||||
| Decidegree Celsius | ❌ | ❌ | ✅¹ |
|
||||
| Degree Celsius | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
| Degree Fahrenheit | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
| Kelvin | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
|
||||
* ¹ Only English, French and Esperanto translations are provided.
|
||||
|
||||
Supports temperature deviations conversions (such as degree days).
|
||||
|
||||
Supported widths for Android translations:
|
||||
|
||||
| Narrow | Short | Long |
|
||||
|--------|-------|------|
|
||||
| ❌ | ✅ | ✅ |
|
||||
|
||||
|
||||
## Distance
|
||||
|
||||
| Unit | `NumberFormatter` | `MeasureFormat` | Android translations |
|
||||
|---------------|-------------------|-----------------|----------------------|
|
||||
| Meter | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
| Kilometer | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
| Mile | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
| Nautical mile | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
| Foot | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
|
||||
Supported widths for Android translations:
|
||||
|
||||
| Narrow | Short | Long |
|
||||
|--------|-------|------|
|
||||
| ❌ | ✅ | ✅ |
|
||||
|
||||
|
||||
## Speed
|
||||
|
||||
| Unit | `NumberFormatter` | `MeasureFormat` | Android translations |
|
||||
|-----------------------|-------------------|-----------------|----------------------|
|
||||
| Centimeter per second | Android >= 11 | Android 8 to 10 | Android < 8 |
|
||||
| Meter per second¹ | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
| Kilometer per hour¹ | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
| Mile per hour¹ | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
| Knot | Android >= 11 | Android 8 to 10 | Android < 8 |
|
||||
| Foot per second | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
| Beaufort scale² | Android >= 16 | ❌ | Android < 16 |
|
||||
|
||||
* ¹ Simplified backport where the “per unit” is combined with the duration unit below, so that for example “Mile per hour” in short width looks like “mi/h” instead of the “mph” used in some countries
|
||||
* ² Not an unit, but a scale, so during conversions, uses the starting value in meters per second of the scale level
|
||||
|
||||
Supported widths for Android translations:
|
||||
|
||||
| Narrow | Short | Long |
|
||||
|--------|-------|------|
|
||||
| ❌ | ✅ | ✅ |
|
||||
|
||||
|
||||
## Precipitation
|
||||
|
||||
| Unit | `NumberFormatter` | `MeasureFormat` | Android translations |
|
||||
|------------------------|-------------------|-----------------|----------------------|
|
||||
| Micrometer | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
| Millimeter | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
| Centimeter | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
| Inch | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
| Liter per square meter | Android >= 11 | Android 8 to 10 | Android < 8 |
|
||||
|
||||
| Unit | `NumberFormatter` | `MeasureFormat` | Android translations |
|
||||
|---------------------------------|-------------------|-----------------|----------------------|
|
||||
| Micrometer per hour | Android >= 11 | Android 8 to 10 | Android < 8 |
|
||||
| Millimeter per hour | Android >= 11 | Android 8 to 10 | Android < 8 |
|
||||
| Centimeter per hour | Android >= 11 | Android 8 to 10 | Android < 8 |
|
||||
| Inch per hour | Android >= 11 | Android 8 to 10 | Android < 8 |
|
||||
| Liter per square meter per hour | ❌ | ❌ | ✅ |
|
||||
|
||||
Supported widths for Android translations:
|
||||
|
||||
| Narrow | Short | Long |
|
||||
|--------|-------|------|
|
||||
| ❌ | ✅ | ✅ |
|
||||
|
||||
|
||||
## Pressure
|
||||
|
||||
| Unit | `NumberFormatter` | `MeasureFormat` | Android translations |
|
||||
|-----------------------|-------------------|-----------------|----------------------|
|
||||
| Pascal | ❌ | ❌ | ✅ |
|
||||
| Hectopascal | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
| Kilopascal | ❌ | ❌ | ✅ |
|
||||
| Atmosphere | Android >= 11 | ❌ | Android < 11 |
|
||||
| Millimeter of mercury | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
| Inch of mercury | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
|
||||
Supported widths for Android translations:
|
||||
|
||||
| Narrow | Short | Long |
|
||||
|--------|-------|------|
|
||||
| ❌ | ✅ | ✅ |
|
||||
|
||||
|
||||
## Air pollutant concentration
|
||||
|
||||
| Unit | `NumberFormatter` | `MeasureFormat` | Android translations |
|
||||
|---------------------------|-------------------|-----------------|----------------------|
|
||||
| Microgram per cubic meter | Android >= 11 | Android 8 to 10 | Android < 8 |
|
||||
| Milligram per cubic meter | Android >= 11 | Android 8 to 10 | Android < 8 |
|
||||
|
||||
Supported widths for Android translations:
|
||||
|
||||
| Narrow | Short | Long |
|
||||
|--------|-------|------|
|
||||
| ❌ | ✅ | ✅ |
|
||||
|
||||
|
||||
## Pollen concentration
|
||||
|
||||
| Unit | `NumberFormatter` | `MeasureFormat` | Android translations |
|
||||
|-----------------|-------------------|-----------------|----------------------|
|
||||
| Per cubic meter | ❌ | ❌ | ✅ |
|
||||
|
||||
Supported widths for Android translations:
|
||||
|
||||
| Narrow | Short | Long |
|
||||
|--------|-------|------|
|
||||
| ❌ | ✅ | ✅ |
|
||||
|
||||
|
||||
## Duration
|
||||
|
||||
| Unit | `NumberFormatter`¹ | `MeasureFormat` | Android translations |
|
||||
|-------------|--------------------|-----------------|----------------------|
|
||||
| Nanosecond | Android >= 11 | Android 7 to 10 | Android < 7² |
|
||||
| Microsecond | Android >= 11 | Android 7 to 10 | Android < 7² |
|
||||
| Millisecond | Android >= 11 | Android 7 to 10 | Android < 7² |
|
||||
| Second | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
| Minute | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
| Hour | Android >= 11 | Android 7 to 10 | Android < 7 |
|
||||
| Day | Android >= 11 | Android 7 to 10 | Android < 7² |
|
||||
|
||||
* ¹ `NumberFormatter` supports only single duration, and will not be used when needing a formatting like `1 hour and 30 minutes`.
|
||||
* ² Only English translations are provided.
|
||||
|
||||
Supported widths for Android translations:
|
||||
|
||||
| Narrow | Short | Long |
|
||||
|--------|-------|------|
|
||||
| ❌ | ✅ | ✅ |
|
||||
|
||||
|
||||
## Ratio
|
||||
|
||||
| Unit | `NumberFormatter`¹ | `NumberFormat` | Android translations |
|
||||
|----------|--------------------|----------------|----------------------|
|
||||
| Permille | Android >= 11 | ❌ | Android < 11¹ |
|
||||
| Percent | Android >= 11 | Android < 11 | ❌ |
|
||||
| Fraction | Android >= 11 | Android < 11 | N/A |
|
||||
|
||||
* ¹ Only English translations are provided.
|
||||
|
||||
Supported widths for `NumberFormat` and Android translations:
|
||||
|
||||
| Narrow | Short | Long |
|
||||
|--------|-------|------|
|
||||
| ❌ | ✅ | ❌ |
|
||||
|
||||
|
||||
# License
|
||||
|
||||
- This library: GNU Lesser General Public License v3.0
|
||||
- The Unicode CLDR data: Copyright © 1991-Present Unicode, Inc. [Unicode License v3](https://www.unicode.org/license.txt)
|
||||
21
weather-unit/build.gradle.kts
Normal file
21
weather-unit/build.gradle.kts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
plugins {
|
||||
id("breezy.library")
|
||||
kotlin("android")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "org.breezyweather.unit"
|
||||
|
||||
defaultConfig {
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(libs.annotation.jvm)
|
||||
implementation(libs.core.ktx)
|
||||
|
||||
testImplementation(libs.bundles.test)
|
||||
testRuntimeOnly(libs.junit.platform)
|
||||
}
|
||||
0
weather-unit/consumer-rules.pro
Normal file
0
weather-unit/consumer-rules.pro
Normal file
21
weather-unit/proguard-rules.pro
vendored
Normal file
21
weather-unit/proguard-rules.pro
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
4
weather-unit/src/main/AndroidManifest.xml
Normal file
4
weather-unit/src/main/AndroidManifest.xml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
</manifest>
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit
|
||||
|
||||
import android.os.Build
|
||||
import androidx.annotation.ChecksSdkIntAtLeast
|
||||
|
||||
@ChecksSdkIntAtLeast(api = Build.VERSION_CODES.R)
|
||||
fun supportsNumberFormatter() = getVersionSdkInt() >= Build.VERSION_CODES.R
|
||||
|
||||
@ChecksSdkIntAtLeast(api = Build.VERSION_CODES.TIRAMISU)
|
||||
fun supportsNumberFormatterUsage() = getVersionSdkInt() >= Build.VERSION_CODES.TIRAMISU
|
||||
|
||||
@ChecksSdkIntAtLeast(api = Build.VERSION_CODES.N)
|
||||
fun supportsNumberFormat() = getVersionSdkInt() >= Build.VERSION_CODES.N
|
||||
|
||||
@ChecksSdkIntAtLeast(api = Build.VERSION_CODES.N)
|
||||
fun supportsMeasureFormat() = getVersionSdkInt() >= Build.VERSION_CODES.N
|
||||
|
||||
@ChecksSdkIntAtLeast(api = Build.VERSION_CODES.P)
|
||||
fun supportsMeasureFormatPerUnit() = getVersionSdkInt() >= Build.VERSION_CODES.P
|
||||
|
||||
@ChecksSdkIntAtLeast(api = Build.VERSION_CODES.N)
|
||||
fun supportsMeasureUnit() = getVersionSdkInt() >= Build.VERSION_CODES.N
|
||||
|
||||
@ChecksSdkIntAtLeast(api = Build.VERSION_CODES.R)
|
||||
fun supportsMeasureUnitAtmosphere() = getVersionSdkInt() >= Build.VERSION_CODES.R
|
||||
|
||||
@ChecksSdkIntAtLeast(api = Build.VERSION_CODES.BAKLAVA)
|
||||
fun supportsMeasureUnitBeaufort() = getVersionSdkInt() >= Build.VERSION_CODES.BAKLAVA
|
||||
|
||||
@ChecksSdkIntAtLeast(api = Build.VERSION_CODES.O)
|
||||
fun supportsMeasureUnitKnot() = getVersionSdkInt() >= Build.VERSION_CODES.O
|
||||
|
||||
@ChecksSdkIntAtLeast(api = Build.VERSION_CODES.R)
|
||||
fun supportsMeasureUnitPercent() = getVersionSdkInt() >= Build.VERSION_CODES.R
|
||||
|
||||
@ChecksSdkIntAtLeast(api = Build.VERSION_CODES.R)
|
||||
fun supportsMeasureUnitPermille() = getVersionSdkInt() >= Build.VERSION_CODES.R
|
||||
|
||||
@ChecksSdkIntAtLeast(api = Build.VERSION_CODES.P)
|
||||
fun supportsUnitDisplayName() = getVersionSdkInt() >= Build.VERSION_CODES.P
|
||||
|
||||
fun getVersionSdkInt(): Int {
|
||||
return Build.VERSION.SDK_INT
|
||||
}
|
||||
232
weather-unit/src/main/java/org/breezyweather/unit/WeatherUnit.kt
Normal file
232
weather-unit/src/main/java/org/breezyweather/unit/WeatherUnit.kt
Normal file
|
|
@ -0,0 +1,232 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit
|
||||
|
||||
import android.content.Context
|
||||
import android.icu.text.MeasureFormat
|
||||
import android.icu.util.MeasureUnit
|
||||
import android.os.Build
|
||||
import androidx.annotation.RequiresApi
|
||||
import org.breezyweather.unit.formatting.UnitDecimals
|
||||
import org.breezyweather.unit.formatting.UnitTranslation
|
||||
import org.breezyweather.unit.formatting.UnitWidth
|
||||
import org.breezyweather.unit.formatting.format
|
||||
import org.breezyweather.unit.formatting.formatWithMeasureFormat
|
||||
import org.breezyweather.unit.formatting.formatWithNumberFormatter
|
||||
import java.util.Locale
|
||||
|
||||
interface WeatherUnit {
|
||||
/**
|
||||
* An internal identifier for the unit
|
||||
*/
|
||||
val id: String
|
||||
|
||||
/**
|
||||
* Name of the unit when used standalone (without value)
|
||||
*/
|
||||
val displayName: UnitTranslation
|
||||
|
||||
/**
|
||||
* String formatters for quantity of the unit
|
||||
*/
|
||||
val nominative: UnitTranslation
|
||||
|
||||
/**
|
||||
* Optional string formatter for “per”. For example /m³
|
||||
*/
|
||||
val per: UnitTranslation?
|
||||
|
||||
/**
|
||||
* [MeasureUnit] used with ICU formatting for compatible Android devices
|
||||
*/
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
fun getMeasureUnit(): MeasureUnit?
|
||||
|
||||
/**
|
||||
* [MeasureUnit] used with ICU formatting for compatible Android devices
|
||||
*/
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
fun getPerMeasureUnit(): MeasureUnit?
|
||||
|
||||
/**
|
||||
* How many decimals should be used when displaying a number in this unit
|
||||
* Must be positive
|
||||
*/
|
||||
val decimals: UnitDecimals
|
||||
|
||||
fun getDisplayName(
|
||||
context: Context,
|
||||
locale: Locale = Locale.getDefault(),
|
||||
width: UnitWidth = UnitWidth.SHORT,
|
||||
useMeasureFormat: Boolean = true,
|
||||
): String {
|
||||
if (supportsUnitDisplayName() &&
|
||||
useMeasureFormat &&
|
||||
getMeasureUnit() != null
|
||||
) {
|
||||
if (getPerMeasureUnit() == null) {
|
||||
return MeasureFormat
|
||||
.getInstance(locale, width.measureFormatWidth)
|
||||
.getUnitDisplayName(getMeasureUnit())
|
||||
} else if (getPerMeasureUnit() != null && per != null) {
|
||||
return context.getString(
|
||||
when (width) {
|
||||
UnitWidth.SHORT -> per!!.short
|
||||
UnitWidth.LONG -> per!!.long
|
||||
UnitWidth.NARROW -> per!!.narrow
|
||||
},
|
||||
MeasureFormat
|
||||
.getInstance(locale, width.measureFormatWidth)
|
||||
.getUnitDisplayName(getMeasureUnit())
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
val formattingWithoutPer = context.getString(
|
||||
when (width) {
|
||||
UnitWidth.SHORT -> displayName.short
|
||||
UnitWidth.LONG -> displayName.long
|
||||
UnitWidth.NARROW -> displayName.narrow
|
||||
}
|
||||
)
|
||||
|
||||
return per?.let {
|
||||
context.getString(
|
||||
when (width) {
|
||||
UnitWidth.SHORT -> it.short
|
||||
UnitWidth.LONG -> it.long
|
||||
UnitWidth.NARROW -> it.narrow
|
||||
},
|
||||
formattingWithoutPer
|
||||
)
|
||||
} ?: formattingWithoutPer
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: This may produce discrepancy compared to the actual nominative unit displayed by MeasureFormat or
|
||||
* NumberFormatter
|
||||
* Use fr_CA as your language to see the difference of “po Hg” being displayed “inHg” (because inheriting from
|
||||
* French from France Android translation)
|
||||
*/
|
||||
fun getNominativeUnit(
|
||||
context: Context,
|
||||
width: UnitWidth = UnitWidth.SHORT,
|
||||
useNumberFormatter: Boolean = true,
|
||||
useMeasureFormat: Boolean = true,
|
||||
): String {
|
||||
return context.getString(
|
||||
when (width) {
|
||||
UnitWidth.SHORT -> nominative.short
|
||||
UnitWidth.LONG -> nominative.long
|
||||
UnitWidth.NARROW -> nominative.narrow
|
||||
},
|
||||
""
|
||||
).trim()
|
||||
}
|
||||
|
||||
fun getPrecision(width: UnitWidth): Int = when (width) {
|
||||
UnitWidth.SHORT -> decimals.short
|
||||
UnitWidth.NARROW -> decimals.narrow
|
||||
UnitWidth.LONG -> decimals.long
|
||||
}
|
||||
|
||||
fun format(
|
||||
context: Context,
|
||||
value: Number,
|
||||
valueWidth: UnitWidth = UnitWidth.SHORT,
|
||||
unitWidth: UnitWidth = UnitWidth.SHORT,
|
||||
locale: Locale = Locale.getDefault(),
|
||||
showSign: Boolean = false,
|
||||
useNumberFormatter: Boolean = true,
|
||||
useMeasureFormat: Boolean = true,
|
||||
): String {
|
||||
if (supportsMeasureFormat() &&
|
||||
getMeasureUnit() != null &&
|
||||
(getPerMeasureUnit() == null || supportsMeasureFormat()) &&
|
||||
(useNumberFormatter || useMeasureFormat)
|
||||
) {
|
||||
if (supportsNumberFormatter() && useNumberFormatter) {
|
||||
return getMeasureUnit()!!.formatWithNumberFormatter(
|
||||
locale = locale,
|
||||
value = value,
|
||||
perUnit = getPerMeasureUnit(),
|
||||
precision = getPrecision(valueWidth),
|
||||
numberFormatterWidth = unitWidth.numberFormatterWidth!!,
|
||||
showSign = showSign
|
||||
)
|
||||
}
|
||||
|
||||
if (!showSign && (getPerMeasureUnit() == null || supportsMeasureFormatPerUnit())) {
|
||||
return getMeasureUnit()!!.formatWithMeasureFormat(
|
||||
locale = locale,
|
||||
value = value,
|
||||
perUnit = getPerMeasureUnit(),
|
||||
precision = getPrecision(valueWidth),
|
||||
measureFormatWidth = unitWidth.measureFormatWidth!!
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
return formatWithAndroidTranslations(
|
||||
context = context,
|
||||
value = value,
|
||||
valueWidth = valueWidth,
|
||||
unitWidth = unitWidth,
|
||||
locale = locale,
|
||||
showSign = showSign,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useMeasureFormat
|
||||
)
|
||||
}
|
||||
|
||||
fun formatWithAndroidTranslations(
|
||||
context: Context,
|
||||
value: Number,
|
||||
valueWidth: UnitWidth = UnitWidth.SHORT,
|
||||
unitWidth: UnitWidth = UnitWidth.SHORT,
|
||||
locale: Locale = Locale.getDefault(),
|
||||
showSign: Boolean = false,
|
||||
useNumberFormatter: Boolean = true,
|
||||
useMeasureFormat: Boolean = true,
|
||||
): String {
|
||||
val formattingWithoutPer = context.getString(
|
||||
when (unitWidth) {
|
||||
UnitWidth.SHORT -> nominative.short
|
||||
UnitWidth.LONG -> nominative.long
|
||||
UnitWidth.NARROW -> nominative.narrow
|
||||
},
|
||||
value.format(
|
||||
decimals = getPrecision(valueWidth),
|
||||
locale = locale,
|
||||
showSign = showSign,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useNumberFormat = useMeasureFormat
|
||||
)
|
||||
)
|
||||
|
||||
return per?.let {
|
||||
context.getString(
|
||||
when (unitWidth) {
|
||||
UnitWidth.SHORT -> it.short
|
||||
UnitWidth.LONG -> it.long
|
||||
UnitWidth.NARROW -> it.narrow
|
||||
},
|
||||
formattingWithoutPer
|
||||
)
|
||||
} ?: formattingWithoutPer
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit
|
||||
|
||||
import android.content.Context
|
||||
import android.icu.number.NumberFormatter
|
||||
import android.icu.text.MeasureFormat
|
||||
import org.breezyweather.unit.formatting.UnitWidth
|
||||
import org.breezyweather.unit.formatting.format
|
||||
import java.util.Locale
|
||||
|
||||
interface WeatherValue<T : WeatherUnit> {
|
||||
|
||||
fun toDouble(unit: T): Double
|
||||
|
||||
/**
|
||||
* Format a value for the following parameters:
|
||||
* @param unit the unit the weather value must be converted to
|
||||
* @param width this will determine how many decimals will be displayed based on the unit definition
|
||||
* @param locale the locale for the formatting, or the default system locale
|
||||
* @param useNumberFormatter true if [NumberFormatter] should be used on compatible Android devices
|
||||
* @param useMeasureFormat true if [MeasureFormat] should be used on compatible Android devices
|
||||
*/
|
||||
fun formatValue(
|
||||
unit: T,
|
||||
width: UnitWidth = UnitWidth.SHORT,
|
||||
locale: Locale = Locale.getDefault(),
|
||||
useNumberFormatter: Boolean = true,
|
||||
useMeasureFormat: Boolean = true,
|
||||
): String {
|
||||
return toDouble(unit).format(
|
||||
decimals = unit.getPrecision(width),
|
||||
locale = locale,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useNumberFormat = useMeasureFormat
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Format a value and its unit for the following parameters:
|
||||
* @param context Context in case we need to use Android translation strings
|
||||
* @param unit the unit the weather value must be converted to
|
||||
* @param valueWidth this will determine how many decimals will be displayed based on the unit definition
|
||||
* @param unitWidth this will make the unit more or less short
|
||||
* @param locale the locale for the formatting, or the default system locale
|
||||
* @param useNumberFormatter true if [NumberFormatter] should be used on compatible Android devices
|
||||
* @param useMeasureFormat true if [MeasureFormat] should be used on compatible Android devices
|
||||
*/
|
||||
fun format(
|
||||
context: Context,
|
||||
unit: T,
|
||||
valueWidth: UnitWidth = UnitWidth.SHORT,
|
||||
unitWidth: UnitWidth = UnitWidth.SHORT,
|
||||
locale: Locale = Locale.getDefault(),
|
||||
showSign: Boolean = false,
|
||||
useNumberFormatter: Boolean = true,
|
||||
useMeasureFormat: Boolean = true,
|
||||
): String {
|
||||
return unit.format(
|
||||
context = context,
|
||||
value = toDouble(unit),
|
||||
valueWidth = valueWidth,
|
||||
unitWidth = unitWidth,
|
||||
locale = locale,
|
||||
showSign = showSign,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useMeasureFormat
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Format a value and its unit using Android translations for the following parameters:
|
||||
* @param context Context to get Android translation strings
|
||||
* @param unit the unit the weather value must be converted to
|
||||
* @param valueWidth this will determine how many decimals will be displayed based on the unit definition
|
||||
* @param unitWidth this will make the unit more or less short
|
||||
* @param locale the locale for the formatting, or the default system locale
|
||||
* @param useNumberFormatter true if [NumberFormatter] should be used for value formatting on compatible devices
|
||||
* @param useMeasureFormat true if [MeasureFormat] should be used for value formatting on compatible Android devices
|
||||
*/
|
||||
fun formatWithAndroidTranslations(
|
||||
context: Context,
|
||||
unit: T,
|
||||
value: Number,
|
||||
valueWidth: UnitWidth = UnitWidth.SHORT,
|
||||
unitWidth: UnitWidth = UnitWidth.SHORT,
|
||||
locale: Locale = Locale.getDefault(),
|
||||
useNumberFormatter: Boolean = true,
|
||||
useMeasureFormat: Boolean = true,
|
||||
): String {
|
||||
return unit.formatWithAndroidTranslations(
|
||||
context = context,
|
||||
value = value,
|
||||
valueWidth = valueWidth,
|
||||
unitWidth = unitWidth,
|
||||
locale = locale,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useMeasureFormat
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.computing
|
||||
|
||||
import org.breezyweather.unit.ratio.Ratio
|
||||
import org.breezyweather.unit.ratio.Ratio.Companion.fraction
|
||||
import org.breezyweather.unit.temperature.Temperature
|
||||
import org.breezyweather.unit.temperature.Temperature.Companion.celsius
|
||||
import kotlin.math.exp
|
||||
import kotlin.math.ln
|
||||
|
||||
/**
|
||||
* Compute relative humidity from temperature and dew point
|
||||
* Uses Magnus approximation with Arden Buck best variable set
|
||||
* TODO: Unit test
|
||||
*/
|
||||
fun computeRelativeHumidity(
|
||||
temperature: Temperature?,
|
||||
dewPoint: Temperature?,
|
||||
): Ratio? {
|
||||
if (temperature == null || dewPoint == null) return null
|
||||
|
||||
val b = if (temperature < 0.celsius) 17.966 else 17.368
|
||||
val c = if (temperature < 0.celsius) 227.15 else 238.88 // °C
|
||||
|
||||
return (
|
||||
exp((b * dewPoint.inCelsius).div(c + dewPoint.inCelsius)) /
|
||||
exp((b * temperature.inCelsius).div(c + temperature.inCelsius))
|
||||
).fraction
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute dew point from temperature and relative humidity
|
||||
* Uses Magnus approximation with Arden Buck best variable set
|
||||
* TODO: Unit test
|
||||
*
|
||||
* @param temperature
|
||||
* @param relativeHumidity
|
||||
*/
|
||||
fun computeDewPoint(
|
||||
temperature: Temperature?,
|
||||
relativeHumidity: Ratio?,
|
||||
): Temperature? {
|
||||
if (temperature == null || relativeHumidity == null) return null
|
||||
|
||||
val b = if (temperature < 0.celsius) 17.966 else 17.368
|
||||
val c = if (temperature < 0.celsius) 227.15 else 238.88 // °C
|
||||
|
||||
val magnus = ln(relativeHumidity.inFraction) + (b * temperature.inCelsius) / (c + temperature.inCelsius)
|
||||
return ((c * magnus) / (b - magnus)).celsius
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.computing
|
||||
|
||||
import org.breezyweather.unit.pressure.Pressure
|
||||
import org.breezyweather.unit.temperature.Temperature
|
||||
|
||||
/**
|
||||
* TODO: Use our typed values
|
||||
* Compute pollutant concentration in µg/m³ when given in ppb.
|
||||
* Can also be used for converting to mg/m³ from ppm.
|
||||
* Source: https://en.wikipedia.org/wiki/Useful_conversions_and_formulas_for_air_dispersion_modeling
|
||||
*
|
||||
* Basis for temperature and pressure assumptions:
|
||||
* https://www.ecfr.gov/current/title-40/chapter-I/subchapter-C/part-50/section-50.3
|
||||
*
|
||||
* @param molecularMass
|
||||
* @param concentrationInPpb in ppb
|
||||
* @param temperature assumed 25 °C if omitted
|
||||
* @param barometricPressure assumed 1 atm = 1013.25 hPa if omitted
|
||||
*/
|
||||
fun computePollutantInUgm3FromPpb(
|
||||
molecularMass: Double?,
|
||||
concentrationInPpb: Double?,
|
||||
temperature: Temperature? = null,
|
||||
barometricPressure: Pressure? = null,
|
||||
): Double? {
|
||||
if (concentrationInPpb == null) return null
|
||||
if (molecularMass == null) return null
|
||||
return concentrationInPpb *
|
||||
molecularMass /
|
||||
(8.31446261815324 / (barometricPressure?.inHectopascals ?: 1013.25) * 10) /
|
||||
(273.15 + (temperature?.inCelsius ?: 25.0))
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: Use our typed values
|
||||
* Compute pollutant concentration in ppb from µg/m³
|
||||
* Can also be used for converting to ppm from mg/m³
|
||||
* Source: https://en.wikipedia.org/wiki/Useful_conversions_and_formulas_for_air_dispersion_modeling
|
||||
*
|
||||
* Basis for temperature and pressure assumptions:
|
||||
* https://www.ecfr.gov/current/title-40/chapter-I/subchapter-C/part-50/section-50.3
|
||||
*
|
||||
* @param molecularMass
|
||||
* @param concentrationInUgm3 in µg/m³
|
||||
* @param temperature assumed 25 °C if omitted
|
||||
* @param barometricPressure assumed 1 atm = 1013.25 hPa if omitted
|
||||
*/
|
||||
fun computePollutantInPpbFromUgm3(
|
||||
molecularMass: Double?,
|
||||
concentrationInUgm3: Double?,
|
||||
temperature: Temperature? = null,
|
||||
barometricPressure: Pressure? = null,
|
||||
): Double? {
|
||||
if (concentrationInUgm3 == null) return null
|
||||
if (molecularMass == null) return null
|
||||
return concentrationInUgm3 /
|
||||
molecularMass *
|
||||
(8.31446261815324 / (barometricPressure?.inHectopascals ?: 1013.25) * 10) *
|
||||
(273.15 + (temperature?.inCelsius ?: 25.0))
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.computing
|
||||
|
||||
import org.breezyweather.unit.pressure.Pressure
|
||||
import org.breezyweather.unit.ratio.Ratio
|
||||
import org.breezyweather.unit.ratio.Ratio.Companion.fraction
|
||||
import org.breezyweather.unit.speed.Speed
|
||||
import org.breezyweather.unit.speed.Speed.Companion.kilometersPerHour
|
||||
import org.breezyweather.unit.temperature.Temperature
|
||||
import org.breezyweather.unit.temperature.Temperature.Companion.celsius
|
||||
import kotlin.math.cos
|
||||
import kotlin.math.exp
|
||||
import kotlin.math.ln
|
||||
import kotlin.math.log10
|
||||
import kotlin.math.pow
|
||||
|
||||
/**
|
||||
* TODO: Use our typed values
|
||||
* Compute mean sea level pressure (MSLP) from barometric pressure and altitude.
|
||||
* Optional elements can be provided for minor adjustments.
|
||||
* Source: https://integritext.net/DrKFS/correctiontosealevel.htm
|
||||
*
|
||||
* To compute barometric pressure from MSLP,
|
||||
* simply enter negative altitude.
|
||||
*
|
||||
* @param barometricPressure in hPa
|
||||
* @param altitude in meters
|
||||
* @param temperature in °C (optional)
|
||||
* @param humidity in % (optional)
|
||||
* @param latitude in ° (optional)
|
||||
*/
|
||||
fun computeMeanSeaLevelPressure(
|
||||
barometricPressure: Double?,
|
||||
altitude: Double?,
|
||||
temperature: Double? = null,
|
||||
humidity: Double? = null,
|
||||
latitude: Double? = null,
|
||||
): Double? {
|
||||
// There is nothing to calculate if barometric pressure or altitude is null.
|
||||
if (barometricPressure == null || altitude == null) {
|
||||
return null
|
||||
}
|
||||
|
||||
// Source: http://www.bom.gov.au/info/thermal_stress/#atapproximation
|
||||
val waterVaporPressure = if (humidity != null && temperature != null) {
|
||||
humidity / 100 * 6.105 * exp(17.27 * temperature / (237.7 + temperature))
|
||||
} else {
|
||||
0.0
|
||||
}
|
||||
|
||||
// adjustment for temperature
|
||||
val term1 = 1.0 + 0.0037 * (temperature ?: 0.0)
|
||||
|
||||
// adjustment for humidity
|
||||
val term2 = 1.0 / (1.0 - 0.378 * waterVaporPressure / barometricPressure)
|
||||
|
||||
// adjustment for asphericity of the Earth
|
||||
val term3 = 1.0 / (1.0 - 0.0026 * cos(2 * (latitude ?: 45.0) * Math.PI / 180))
|
||||
|
||||
// adjustment for variation of gravitational acceleration with height
|
||||
val term4 = 1.0 + (altitude / 6367324)
|
||||
|
||||
return (10.0).pow(log10(barometricPressure) + altitude / (18400.0 * term1 * term2 * term3 * term4))
|
||||
}
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.computing
|
||||
|
||||
import org.breezyweather.unit.pressure.Pressure
|
||||
import org.breezyweather.unit.ratio.Ratio
|
||||
import org.breezyweather.unit.ratio.Ratio.Companion.fraction
|
||||
import org.breezyweather.unit.speed.Speed
|
||||
import org.breezyweather.unit.speed.Speed.Companion.kilometersPerHour
|
||||
import org.breezyweather.unit.temperature.Temperature
|
||||
import org.breezyweather.unit.temperature.Temperature.Companion.celsius
|
||||
import kotlin.math.cos
|
||||
import kotlin.math.exp
|
||||
import kotlin.math.ln
|
||||
import kotlin.math.log10
|
||||
import kotlin.math.pow
|
||||
|
||||
/**
|
||||
* Compute apparent temperature from temperature, relative humidity, and wind speed
|
||||
* Uses Bureau of Meteorology Australia methodology
|
||||
* Source: http://www.bom.gov.au/info/thermal_stress/#atapproximation
|
||||
* TODO: Unit test
|
||||
*
|
||||
* @param temperature
|
||||
* @param relativeHumidity
|
||||
* @param windSpeed
|
||||
*/
|
||||
fun computeApparentTemperature(
|
||||
temperature: Temperature?,
|
||||
relativeHumidity: Ratio?,
|
||||
windSpeed: Speed?,
|
||||
): Temperature? {
|
||||
if (temperature == null || relativeHumidity == null || windSpeed == null) return null
|
||||
|
||||
val e = relativeHumidity.inFraction * 6.105 * exp(17.27 * temperature.inCelsius / (237.7 + temperature.inCelsius))
|
||||
return (temperature.inCelsius + 0.33 * e - 0.7 * windSpeed.inMetersPerSecond - 4.0).celsius
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute wind chill from temperature and wind speed
|
||||
* Uses Environment Canada methodology
|
||||
* Source: https://climate.weather.gc.ca/glossary_e.html#w
|
||||
* Only valid for (T ≤ 0 °C) or (T ≤ 10°C and WS ≥ 5 km/h)
|
||||
* TODO: Unit test
|
||||
*
|
||||
* @param temperature
|
||||
* @param windSpeed
|
||||
*/
|
||||
fun computeWindChillTemperature(
|
||||
temperature: Temperature?,
|
||||
windSpeed: Speed?,
|
||||
): Temperature? {
|
||||
if (temperature == null || windSpeed == null || temperature > 10.celsius) return null
|
||||
return if (windSpeed >= 5.kilometersPerHour) {
|
||||
(
|
||||
13.12 +
|
||||
(0.6215 * temperature.inCelsius) -
|
||||
(11.37 * windSpeed.inKilometersPerHour.pow(0.16)) +
|
||||
(0.3965 * temperature.inCelsius * windSpeed.inKilometersPerHour.pow(0.16))
|
||||
).celsius
|
||||
} else if (temperature <= 0.celsius) {
|
||||
(temperature.inCelsius + ((-1.59 + 0.1345 * temperature.inCelsius) / 5.0) * windSpeed.inKilometersPerHour)
|
||||
.celsius
|
||||
} else {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute humidex from temperature and humidity
|
||||
* Based on formula from ECCC
|
||||
*
|
||||
* @param temperature
|
||||
* @param dewPoint
|
||||
*/
|
||||
fun computeHumidex(
|
||||
temperature: Temperature?,
|
||||
dewPoint: Temperature?,
|
||||
): Temperature? {
|
||||
if (temperature == null || dewPoint == null || temperature < 15.celsius) return null
|
||||
|
||||
return (
|
||||
temperature.inCelsius +
|
||||
0.5555.times(
|
||||
6.11.times(
|
||||
exp(5417.7530.times(1.div(273.15) - 1.div(273.15 + dewPoint.inCelsius)))
|
||||
).minus(10)
|
||||
)
|
||||
).celsius
|
||||
}
|
||||
|
|
@ -0,0 +1,221 @@
|
|||
package org.breezyweather.unit.distance
|
||||
|
||||
import org.breezyweather.unit.WeatherValue
|
||||
import org.breezyweather.unit.distance.Distance.Companion.kilometers
|
||||
import org.breezyweather.unit.distance.Distance.Companion.meters
|
||||
import org.breezyweather.unit.distance.Distance.Companion.miles
|
||||
import org.breezyweather.unit.formatting.UnitDecimals.Companion.formatToExactDecimals
|
||||
import kotlin.math.roundToLong
|
||||
|
||||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Represents the distance.
|
||||
*
|
||||
* To construct a distance, use either the extension function [toDistance],
|
||||
* or the extension properties [meters], [kilometers], [miles], and so on,
|
||||
* available on [Int], [Long], and [Double] numeric types.
|
||||
*
|
||||
* To get the value of this distance expressed in a particular [distance unit][DistanceUnit]
|
||||
* use the functions [toInt], [toLong], and [toDouble]
|
||||
* or the properties [inMeters], [inKilometers], [inMiles], [inNauticalMiles], and so on.
|
||||
*/
|
||||
@JvmInline
|
||||
value class Distance internal constructor(
|
||||
private val rawValue: Long,
|
||||
) : Comparable<Distance>, WeatherValue<DistanceUnit> {
|
||||
val value: Long get() = rawValue
|
||||
private val storageUnit get() = DistanceUnit.METER
|
||||
|
||||
companion object {
|
||||
/** Returns a [Distance] equal to this [Int] number of meters. */
|
||||
inline val Int.meters: Distance get() = toDistance(DistanceUnit.METER)
|
||||
|
||||
/** Returns a [Distance] equal to this [Long] number of meters. */
|
||||
inline val Long.meters: Distance get() = toDistance(DistanceUnit.METER)
|
||||
|
||||
/** Returns a [Distance] equal to this [Double] number of meters. */
|
||||
inline val Double.meters: Distance get() = toDistance(DistanceUnit.METER)
|
||||
|
||||
/** Returns a [Distance] equal to this [Int] number of kilometers. */
|
||||
inline val Int.kilometers: Distance get() = toDistance(DistanceUnit.KILOMETER)
|
||||
|
||||
/** Returns a [Distance] equal to this [Long] number of kilometers. */
|
||||
inline val Long.kilometers: Distance get() = toDistance(DistanceUnit.KILOMETER)
|
||||
|
||||
/** Returns a [Distance] equal to this [Double] number of kilometers. */
|
||||
inline val Double.kilometers: Distance get() = toDistance(DistanceUnit.KILOMETER)
|
||||
|
||||
/** Returns a [Distance] equal to this [Int] number of miles. */
|
||||
inline val Int.miles: Distance get() = toDistance(DistanceUnit.MILE)
|
||||
|
||||
/** Returns a [Distance] equal to this [Long] number of miles. */
|
||||
inline val Long.miles: Distance get() = toDistance(DistanceUnit.MILE)
|
||||
|
||||
/** Returns a [Distance] equal to this [Double] number of miles. */
|
||||
inline val Double.miles: Distance get() = toDistance(DistanceUnit.MILE)
|
||||
|
||||
/** Returns a [Distance] equal to this [Int] number of nautical miles. */
|
||||
inline val Int.nauticalMiles: Distance get() = toDistance(DistanceUnit.NAUTICAL_MILE)
|
||||
|
||||
/** Returns a [Distance] equal to this [Long] number of nautical miles. */
|
||||
inline val Long.nauticalMiles: Distance get() = toDistance(DistanceUnit.NAUTICAL_MILE)
|
||||
|
||||
/** Returns a [Distance] equal to this [Double] number of nautical miles. */
|
||||
inline val Double.nauticalMiles: Distance get() = toDistance(DistanceUnit.NAUTICAL_MILE)
|
||||
|
||||
/** Returns a [Distance] equal to this [Int] number of feet. */
|
||||
inline val Int.feet: Distance get() = toDistance(DistanceUnit.FOOT)
|
||||
|
||||
/** Returns a [Distance] equal to this [Long] number of feet. */
|
||||
inline val Long.feet: Distance get() = toDistance(DistanceUnit.FOOT)
|
||||
|
||||
/** Returns a [Distance] equal to this [Double] number of feet. */
|
||||
inline val Double.feet: Distance get() = toDistance(DistanceUnit.FOOT)
|
||||
|
||||
/**
|
||||
* Parses a string that represents a distance and returns the parsed [Distance] value.
|
||||
*
|
||||
* The following format is accepted:
|
||||
*
|
||||
* - The format of string returned by the default [Distance.toString] and `toString` in a specific unit,
|
||||
* e.g. `50000m` or `30.5km`.
|
||||
*
|
||||
* @throws IllegalArgumentException if the string doesn't represent a distance in any of the supported formats.
|
||||
*/
|
||||
fun parse(value: String): Distance = try {
|
||||
parseDistance(value)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
throw IllegalArgumentException("Invalid distance string format: '$value'.", e)
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a string that represents a distance and returns the parsed [Distance] value,
|
||||
* or `null` if the string doesn't represent a distance in any of the supported formats.
|
||||
*
|
||||
* The following formats is accepted:
|
||||
*
|
||||
* - The format of string returned by the default [Distance.toString] and `toString` in a specific unit,
|
||||
* e.g. `50000m` or `30.5km`.
|
||||
*/
|
||||
fun parseOrNull(value: String): Distance? = try {
|
||||
parseDistance(value)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
override fun compareTo(other: Distance): Int {
|
||||
return this.rawValue.compareTo(other.rawValue)
|
||||
}
|
||||
|
||||
// conversion to units
|
||||
|
||||
/**
|
||||
* Returns the value of this distance expressed as a [Double] number of the specified [unit].
|
||||
*
|
||||
* The operation may involve rounding when the result cannot be represented exactly with a [Double] number.
|
||||
*/
|
||||
override fun toDouble(unit: DistanceUnit): Double {
|
||||
return convertDistanceUnit(value.toDouble(), storageUnit, unit)
|
||||
}
|
||||
|
||||
/** The value of this distance expressed as a [Double] number of meters. */
|
||||
val inMeters: Double
|
||||
get() = toDouble(DistanceUnit.METER)
|
||||
|
||||
/** The value of this distance expressed as a [Double] number of kilometers. */
|
||||
val inKilometers: Double
|
||||
get() = toDouble(DistanceUnit.KILOMETER)
|
||||
|
||||
/** The value of this distance expressed as a [Double] number of miles. */
|
||||
val inMiles: Double
|
||||
get() = toDouble(DistanceUnit.MILE)
|
||||
|
||||
/** The value of this distance expressed as a [Double] number of nautical miles. */
|
||||
val inNauticalMiles: Double
|
||||
get() = toDouble(DistanceUnit.NAUTICAL_MILE)
|
||||
|
||||
/** The value of this distance expressed as a [Double] number of feet. */
|
||||
val inFeet: Double
|
||||
get() = toDouble(DistanceUnit.FOOT)
|
||||
|
||||
/**
|
||||
* Returns a string representation of this distance value
|
||||
*/
|
||||
override fun toString(): String {
|
||||
return toString(storageUnit)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of this distance value expressed in the given [unit]
|
||||
* and formatted with the specified [decimals] number of digits after decimal point.
|
||||
*
|
||||
* @param decimals the number of digits after decimal point to show. The value must be non-negative.
|
||||
* No more than [unit.decimals.max] decimals will be shown, even if a larger number is requested.
|
||||
*
|
||||
* @return the value of distance in the specified [unit] followed by that unit abbreviated name:
|
||||
* `m`, `km`, `mi`, `nmi`, `ft`.
|
||||
*
|
||||
* @throws IllegalArgumentException if [decimals] is less than zero.
|
||||
*/
|
||||
fun toString(unit: DistanceUnit, decimals: Int = unit.decimals.short): String {
|
||||
require(decimals >= 0) { "decimals must be not negative, but was $decimals" }
|
||||
return formatToExactDecimals(toDouble(unit), decimals.coerceAtMost(unit.decimals.long)) + unit.id
|
||||
}
|
||||
|
||||
/**
|
||||
* Return null if the value is not a positive value, otherwise this value
|
||||
* Used by visibility and ceiling
|
||||
*/
|
||||
fun toValidOrNull(): Distance? {
|
||||
return takeIf { rawValue >= 0 }
|
||||
}
|
||||
}
|
||||
|
||||
// constructing from number of units
|
||||
// extension functions
|
||||
|
||||
/** Returns a [Distance] equal to this [Int] number of the specified [unit]. */
|
||||
fun Int.toDistance(unit: DistanceUnit): Distance {
|
||||
return toLong().toDistance(unit)
|
||||
}
|
||||
|
||||
/** Returns a [Distance] equal to this [Long] number of the specified [unit]. */
|
||||
fun Long.toDistance(unit: DistanceUnit): Distance {
|
||||
return distanceOf(convertDistanceUnit(this.toDouble(), unit, DistanceUnit.METER).toLong())
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [Distance] equal to this [Double] number of the specified [unit].
|
||||
*
|
||||
* @throws IllegalArgumentException if this `Double` value is `NaN`.
|
||||
*/
|
||||
fun Double.toDistance(unit: DistanceUnit): Distance {
|
||||
val valueInM = convertDistanceUnit(this, unit, DistanceUnit.METER)
|
||||
require(!valueInM.isNaN()) { "Distance value cannot be NaN." }
|
||||
return distanceOf(valueInM.roundToLong())
|
||||
}
|
||||
|
||||
private fun parseDistance(value: String): Distance {
|
||||
var length = value.length
|
||||
if (length == 0) throw IllegalArgumentException("The string is empty")
|
||||
|
||||
TODO()
|
||||
}
|
||||
|
||||
private fun distanceOf(normalMeters: Long) = Distance(normalMeters)
|
||||
|
|
@ -0,0 +1,224 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.distance
|
||||
|
||||
import android.content.Context
|
||||
import android.icu.util.MeasureUnit
|
||||
import android.os.Build
|
||||
import androidx.annotation.RequiresApi
|
||||
import org.breezyweather.unit.R
|
||||
import org.breezyweather.unit.WeatherUnit
|
||||
import org.breezyweather.unit.formatting.UnitDecimals
|
||||
import org.breezyweather.unit.formatting.UnitTranslation
|
||||
import org.breezyweather.unit.formatting.UnitWidth
|
||||
import java.util.Locale
|
||||
|
||||
enum class DistanceUnit(
|
||||
override val id: String,
|
||||
override val displayName: UnitTranslation,
|
||||
override val nominative: UnitTranslation,
|
||||
override val per: UnitTranslation? = null,
|
||||
val convertFromReference: (Double) -> Double,
|
||||
val convertToReference: (Double) -> Double,
|
||||
override val decimals: UnitDecimals,
|
||||
val chartStep: (Double) -> Double,
|
||||
) : WeatherUnit {
|
||||
|
||||
METER(
|
||||
id = "m",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.length_m_display_name_short,
|
||||
long = R.string.length_m_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.length_m_nominative_short,
|
||||
long = R.string.length_m_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit },
|
||||
decimals = UnitDecimals(0),
|
||||
chartStep = { maxY -> if (maxY < 40000) 5000.0 else 10000.0 }
|
||||
),
|
||||
KILOMETER(
|
||||
id = "km",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.length_km_display_name_short,
|
||||
long = R.string.length_km_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.length_km_nominative_short,
|
||||
long = R.string.length_km_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.div(1000.0) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.times(1000.0) },
|
||||
decimals = UnitDecimals(narrow = 0, short = 1, long = 2),
|
||||
chartStep = { maxY -> if (maxY < 4) 5.0 else 10.0 }
|
||||
),
|
||||
MILE(
|
||||
id = "mi",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.length_mi_display_name_short,
|
||||
long = R.string.length_mi_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.length_mi_nominative_short,
|
||||
long = R.string.length_mi_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.div(1609.344) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.times(1609.344) },
|
||||
decimals = UnitDecimals(narrow = 0, short = 1, long = 2),
|
||||
chartStep = { maxY ->
|
||||
with(maxY) {
|
||||
when {
|
||||
this <= 15.0 -> 3.0
|
||||
this in 15.0..30.0 -> 5.0
|
||||
else -> 30.0
|
||||
}
|
||||
}
|
||||
}
|
||||
),
|
||||
NAUTICAL_MILE(
|
||||
id = "nmi",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.length_nmi_display_name_short,
|
||||
long = R.string.length_nmi_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.length_nmi_nominative_short,
|
||||
long = R.string.length_nmi_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.div(1852.0) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.times(1852.0) },
|
||||
decimals = UnitDecimals(narrow = 0, short = 1, long = 2),
|
||||
chartStep = { maxY ->
|
||||
with(maxY) {
|
||||
when {
|
||||
this <= 15.0 -> 3.0
|
||||
this in 15.0..30.0 -> 5.0
|
||||
else -> 30.0
|
||||
}
|
||||
}
|
||||
}
|
||||
),
|
||||
FOOT(
|
||||
id = "ft",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.length_ft_display_name_short,
|
||||
long = R.string.length_ft_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.length_ft_nominative_short,
|
||||
long = R.string.length_ft_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.times(3.28084) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.div(3.28084) },
|
||||
decimals = UnitDecimals(0),
|
||||
chartStep = { maxY -> if (maxY < 150000) 25000.0 else 50000.0 }
|
||||
),
|
||||
;
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
override fun getMeasureUnit(): MeasureUnit? {
|
||||
return when (this) {
|
||||
METER -> MeasureUnit.METER
|
||||
KILOMETER -> MeasureUnit.KILOMETER
|
||||
MILE -> MeasureUnit.MILE
|
||||
NAUTICAL_MILE -> MeasureUnit.NAUTICAL_MILE
|
||||
FOOT -> MeasureUnit.FOOT
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
override fun getPerMeasureUnit(): MeasureUnit? = null
|
||||
|
||||
/**
|
||||
* Override to:
|
||||
* - Use English units with Traditional Chinese
|
||||
*/
|
||||
override fun format(
|
||||
context: Context,
|
||||
value: Number,
|
||||
valueWidth: UnitWidth,
|
||||
unitWidth: UnitWidth,
|
||||
locale: Locale,
|
||||
showSign: Boolean,
|
||||
useNumberFormatter: Boolean,
|
||||
useMeasureFormat: Boolean,
|
||||
): String {
|
||||
val correctedLocale = locale.let {
|
||||
/**
|
||||
* Taiwan guidelines: https://www.bsmi.gov.tw/wSite/public/Attachment/f1736149048776.pdf
|
||||
* Ongoing issue: https://unicode-org.atlassian.net/jira/software/c/projects/CLDR/issues/CLDR-10604
|
||||
*/
|
||||
if (it.language.equals("zh", ignoreCase = true) &&
|
||||
arrayOf("TW", "HK", "MO").any { c -> it.country.equals(c, ignoreCase = true) } &&
|
||||
unitWidth != UnitWidth.LONG
|
||||
) {
|
||||
Locale.Builder().setLanguage("en").setRegion("001").build()
|
||||
} else {
|
||||
it
|
||||
}
|
||||
}
|
||||
return super.format(
|
||||
context = context,
|
||||
value = value,
|
||||
valueWidth = valueWidth,
|
||||
unitWidth = unitWidth,
|
||||
locale = correctedLocale,
|
||||
showSign = showSign,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useNumberFormatter
|
||||
)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
/**
|
||||
* Copyright © 1991-Present Unicode, Inc.
|
||||
* License: Unicode License v3 https://www.unicode.org/license.txt
|
||||
* Source (simplified): https://github.com/unicode-org/cldr/blob/3f3967f3cbadc56bbb44a9aed20784e82ac64c67/common/supplemental/units.xml#L506-L512
|
||||
* Changes:
|
||||
* - Germany no longer uses METER as DWD uses KILOMETER
|
||||
*/
|
||||
fun getDefaultUnit(
|
||||
locale: Locale = Locale.getDefault(),
|
||||
) = when (locale.country) {
|
||||
"NL" -> METER
|
||||
"GB", "US" -> MILE
|
||||
else -> KILOMETER
|
||||
}
|
||||
|
||||
fun getUnit(id: String): DistanceUnit? {
|
||||
return entries.firstOrNull { it.id == id }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Converts the given time distance [value] expressed in the specified [sourceUnit] into the specified [targetUnit]. */
|
||||
internal fun convertDistanceUnit(
|
||||
value: Double,
|
||||
sourceUnit: DistanceUnit,
|
||||
targetUnit: DistanceUnit,
|
||||
): Double {
|
||||
return if (sourceUnit == DistanceUnit.METER) {
|
||||
targetUnit.convertFromReference(value)
|
||||
} else if (targetUnit == DistanceUnit.METER) {
|
||||
sourceUnit.convertToReference(value)
|
||||
} else {
|
||||
targetUnit.convertFromReference(sourceUnit.convertToReference(value))
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,322 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.duration
|
||||
|
||||
import android.content.Context
|
||||
import android.icu.number.NumberFormatter
|
||||
import android.icu.text.MeasureFormat
|
||||
import android.icu.util.Measure
|
||||
import android.icu.util.MeasureUnit
|
||||
import android.os.Build
|
||||
import androidx.annotation.RequiresApi
|
||||
import org.breezyweather.unit.R
|
||||
import org.breezyweather.unit.formatting.UnitWidth
|
||||
import org.breezyweather.unit.formatting.format
|
||||
import org.breezyweather.unit.formatting.formatWithMeasureFormat
|
||||
import org.breezyweather.unit.formatting.formatWithNumberFormatter
|
||||
import org.breezyweather.unit.supportsMeasureFormat
|
||||
import org.breezyweather.unit.supportsNumberFormatter
|
||||
import java.util.Locale
|
||||
import kotlin.time.Duration
|
||||
import kotlin.time.Duration.Companion.hours
|
||||
import kotlin.time.Duration.Companion.minutes
|
||||
import kotlin.time.Duration.Companion.seconds
|
||||
import kotlin.time.DurationUnit
|
||||
|
||||
/**
|
||||
* Duration already exists in Kotlin.time
|
||||
* Extending it with what we need
|
||||
*/
|
||||
|
||||
/**
|
||||
* Format a value for the following parameters:
|
||||
* @param unit the unit the weather value must be converted to
|
||||
* @param width this will determine how many decimals will be displayed based on the unit definition
|
||||
* @param locale the locale for the formatting, or the default system locale
|
||||
* @param useNumberFormatter true if [NumberFormatter] should be used on compatible Android devices
|
||||
* @param useMeasureFormat true if [MeasureFormat] should be used on compatible Android devices
|
||||
*/
|
||||
fun Duration.formatValue(
|
||||
unit: DurationUnit,
|
||||
width: UnitWidth = UnitWidth.SHORT,
|
||||
locale: Locale = Locale.getDefault(),
|
||||
useNumberFormatter: Boolean = true,
|
||||
useMeasureFormat: Boolean = true,
|
||||
): String {
|
||||
return toDouble(unit).format(
|
||||
decimals = unit.getPrecision(width),
|
||||
locale = locale,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useNumberFormat = useMeasureFormat
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows to format a duration for the following parameters:
|
||||
* @param context Context in case we need to use Android translation strings
|
||||
* @param unit the unit the duration value must be converted to
|
||||
* @param smallestUnit if lower than unit, will use multiple components, such as "1 hr and 30 min", instead of “1.5 hr”
|
||||
* @param valueWidth this will determine how many decimals will be displayed based on the unit definition
|
||||
* @param unitWidth this will make the unit more or less short
|
||||
* @param locale the locale for the formatting, or the default system locale
|
||||
* @param useNumberFormatter true if [NumberFormatter] should be used on compatible Android devices
|
||||
* @param useMeasureFormat true if [MeasureFormat] should be used on compatible Android devices
|
||||
*/
|
||||
fun Duration.format(
|
||||
context: Context,
|
||||
unit: DurationUnit,
|
||||
smallestUnit: DurationUnit = unit,
|
||||
valueWidth: UnitWidth = UnitWidth.SHORT,
|
||||
unitWidth: UnitWidth = UnitWidth.SHORT,
|
||||
locale: Locale = Locale.getDefault(),
|
||||
useNumberFormatter: Boolean = true,
|
||||
useMeasureFormat: Boolean = true,
|
||||
): String {
|
||||
if (supportsMeasureFormat() && (useNumberFormatter || useMeasureFormat)) {
|
||||
// LogHelper.log(msg = "Formatting with ICU ${enum.id}: ${enum.measureUnit} per ${enum.perMeasureUnit}")
|
||||
|
||||
return if (supportsNumberFormatter() &&
|
||||
useNumberFormatter &&
|
||||
unit == smallestUnit // NumberFormatter only supports one unit at a time
|
||||
) {
|
||||
val convertedValue = toDouble(unit)
|
||||
unit.toMeasureUnit().formatWithNumberFormatter(
|
||||
locale = locale,
|
||||
value = convertedValue,
|
||||
precision = unit.getPrecision(valueWidth),
|
||||
numberFormatterWidth = unitWidth.numberFormatterWidth!!
|
||||
)
|
||||
} else {
|
||||
if (unit == smallestUnit) {
|
||||
val convertedValue = toDouble(unit)
|
||||
unit.toMeasureUnit().formatWithMeasureFormat(
|
||||
locale = locale,
|
||||
value = convertedValue,
|
||||
precision = unit.getPrecision(valueWidth),
|
||||
measureFormatWidth = unitWidth.measureFormatWidth!!
|
||||
)
|
||||
} else {
|
||||
formatMultipleDurationsWithMeasureFormat(
|
||||
unit = unit,
|
||||
smallestUnit = smallestUnit,
|
||||
locale = locale,
|
||||
measureFormatWidth = unitWidth.measureFormatWidth!!
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// LogHelper.log(msg = "Not formatting with ICU ${enum.id} in ${context.currentLocale}")
|
||||
return formatWithAndroidTranslations(
|
||||
context = context,
|
||||
unit = unit,
|
||||
valueWidth = valueWidth,
|
||||
unitWidth = unitWidth,
|
||||
locale = locale,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useMeasureFormat
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Format duration into multiple components like:
|
||||
* 1 hr, 30 min and 24 sec
|
||||
*
|
||||
* It is very simplified for our usage, as it only supports hours, minutes and seconds
|
||||
* It also doesn’t support decimals
|
||||
*/
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
private fun Duration.formatMultipleDurationsWithMeasureFormat(
|
||||
unit: DurationUnit,
|
||||
smallestUnit: DurationUnit,
|
||||
locale: Locale = Locale.getDefault(),
|
||||
measureFormatWidth: MeasureFormat.FormatWidth,
|
||||
): String {
|
||||
val measureFormat = MeasureFormat.getInstance(locale, measureFormatWidth)
|
||||
|
||||
return toComponents { hours, minutes, seconds, _ ->
|
||||
val measures = mutableListOf<Measure>()
|
||||
|
||||
val hasHours = hours != 0L
|
||||
val hasMinutes = minutes != 0
|
||||
val hasSeconds = seconds != 0
|
||||
|
||||
if (hasHours) {
|
||||
measures.add(Measure(hours, MeasureUnit.HOUR))
|
||||
}
|
||||
|
||||
if (hasMinutes && smallestUnit <= DurationUnit.MINUTES) {
|
||||
measures.add(Measure(minutes, MeasureUnit.MINUTE))
|
||||
}
|
||||
|
||||
if (hasSeconds && smallestUnit <= DurationUnit.SECONDS) {
|
||||
measures.add(Measure(seconds, MeasureUnit.SECOND))
|
||||
}
|
||||
|
||||
if (measures.isEmpty()) {
|
||||
measures.add(Measure(0, unit.toMeasureUnit()))
|
||||
}
|
||||
|
||||
measureFormat.formatMeasures(*measures.toTypedArray())
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Format a value and its unit using Android translations for the following parameters:
|
||||
* @param context Context to get Android translation strings
|
||||
* @param unit the unit the weather value must be converted to
|
||||
* @param smallestUnit if lower than unit, will use multiple components, such as "1 hr, 30 min", instead of “1.5 hr”
|
||||
* @param valueWidth this will determine how many decimals will be displayed based on the unit definition
|
||||
* @param unitWidth this will make the unit more or less short
|
||||
* @param locale the locale for the formatting, or the default system locale
|
||||
* @param useNumberFormatter true if [NumberFormatter] should be used for value formatting on compatible devices
|
||||
* @param useMeasureFormat true if [MeasureFormat] should be used for value formatting on compatible Android devices
|
||||
*/
|
||||
fun Duration.formatWithAndroidTranslations(
|
||||
context: Context,
|
||||
unit: DurationUnit,
|
||||
smallestUnit: DurationUnit = unit,
|
||||
valueWidth: UnitWidth = UnitWidth.SHORT,
|
||||
unitWidth: UnitWidth = UnitWidth.SHORT,
|
||||
locale: Locale = Locale.getDefault(),
|
||||
useNumberFormatter: Boolean = true,
|
||||
useMeasureFormat: Boolean = true,
|
||||
): String {
|
||||
return if (unit == smallestUnit) {
|
||||
context.getString(
|
||||
unit.getNominative().let {
|
||||
when (unitWidth) {
|
||||
UnitWidth.SHORT -> it.short
|
||||
UnitWidth.LONG -> it.long
|
||||
UnitWidth.NARROW -> it.narrow
|
||||
}
|
||||
},
|
||||
formatValue(
|
||||
unit = unit,
|
||||
width = valueWidth,
|
||||
locale = locale,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useMeasureFormat
|
||||
)
|
||||
)
|
||||
} else {
|
||||
formatMultipleDurationsWithAndroidTranslations(
|
||||
context = context,
|
||||
locale = locale,
|
||||
width = unitWidth,
|
||||
unit = unit,
|
||||
smallestUnit = smallestUnit,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useMeasureFormat
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Format duration into multiple components like:
|
||||
* 1 hr, 30 min, 24 sec
|
||||
*
|
||||
* It is very simplified for our usage, as it only supports hours, minutes and seconds
|
||||
* It also doesn’t support decimals
|
||||
*/
|
||||
private fun Duration.formatMultipleDurationsWithAndroidTranslations(
|
||||
context: Context,
|
||||
locale: Locale = Locale.getDefault(),
|
||||
width: UnitWidth = UnitWidth.SHORT,
|
||||
unit: DurationUnit,
|
||||
smallestUnit: DurationUnit,
|
||||
useNumberFormatter: Boolean = true,
|
||||
useMeasureFormat: Boolean = true,
|
||||
): String {
|
||||
return toComponents { hours, minutes, seconds, _ ->
|
||||
val measures = mutableListOf<String>()
|
||||
|
||||
val hasHours = hours != 0L
|
||||
val hasMinutes = minutes != 0
|
||||
val hasSeconds = seconds != 0
|
||||
|
||||
if (hasHours) {
|
||||
measures.add(
|
||||
hours.hours.formatWithAndroidTranslations(
|
||||
context = context,
|
||||
unit = DurationUnit.HOURS,
|
||||
smallestUnit = DurationUnit.HOURS,
|
||||
valueWidth = UnitWidth.NARROW,
|
||||
unitWidth = width,
|
||||
locale = locale,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useMeasureFormat
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
if (hasMinutes && smallestUnit <= DurationUnit.MINUTES) {
|
||||
measures.add(
|
||||
minutes.minutes.formatWithAndroidTranslations(
|
||||
context = context,
|
||||
unit = DurationUnit.MINUTES,
|
||||
smallestUnit = DurationUnit.MINUTES,
|
||||
valueWidth = UnitWidth.NARROW,
|
||||
unitWidth = width,
|
||||
locale = locale,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useMeasureFormat
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
if (hasSeconds && smallestUnit <= DurationUnit.SECONDS) {
|
||||
measures.add(
|
||||
seconds.seconds.formatWithAndroidTranslations(
|
||||
context = context,
|
||||
unit = DurationUnit.SECONDS,
|
||||
smallestUnit = DurationUnit.SECONDS,
|
||||
valueWidth = UnitWidth.NARROW,
|
||||
unitWidth = width,
|
||||
locale = locale,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useMeasureFormat
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
if (measures.isEmpty()) {
|
||||
measures.add(
|
||||
0.seconds.formatWithAndroidTranslations(
|
||||
context = context,
|
||||
unit = unit,
|
||||
smallestUnit = unit,
|
||||
valueWidth = UnitWidth.NARROW,
|
||||
unitWidth = width,
|
||||
locale = locale,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useMeasureFormat
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
measures.joinToString(context.getString(R.string.locale_separator))
|
||||
}
|
||||
}
|
||||
|
||||
fun Duration.toValidDailyOrNull(): Duration? {
|
||||
return if (toDouble(DurationUnit.HOURS) <= 24.0) this else null
|
||||
}
|
||||
|
||||
fun Duration.toValidHalfDayOrNull(): Duration? {
|
||||
return if (toDouble(DurationUnit.HOURS) <= 12.0) this else null
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.duration
|
||||
|
||||
import android.icu.util.MeasureUnit
|
||||
import android.os.Build
|
||||
import androidx.annotation.RequiresApi
|
||||
import org.breezyweather.unit.R
|
||||
import org.breezyweather.unit.formatting.UnitTranslation
|
||||
import org.breezyweather.unit.formatting.UnitWidth
|
||||
import kotlin.time.DurationUnit
|
||||
|
||||
/**
|
||||
* Duration already exists in Kotlin.time
|
||||
* Extending it with what we need
|
||||
*/
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
fun DurationUnit.toMeasureUnit(): MeasureUnit = when (this) {
|
||||
DurationUnit.NANOSECONDS -> MeasureUnit.NANOSECOND
|
||||
DurationUnit.MICROSECONDS -> MeasureUnit.MICROSECOND
|
||||
DurationUnit.MILLISECONDS -> MeasureUnit.MILLISECOND
|
||||
DurationUnit.SECONDS -> MeasureUnit.SECOND
|
||||
DurationUnit.MINUTES -> MeasureUnit.MINUTE
|
||||
DurationUnit.HOURS -> MeasureUnit.HOUR
|
||||
DurationUnit.DAYS -> MeasureUnit.DAY
|
||||
}
|
||||
|
||||
fun DurationUnit.getPrecision(width: UnitWidth): Int = when (width) {
|
||||
UnitWidth.SHORT -> 1
|
||||
UnitWidth.NARROW -> 0
|
||||
UnitWidth.LONG -> 2
|
||||
}
|
||||
|
||||
internal fun DurationUnit.getNominative(): UnitTranslation = when (this) {
|
||||
DurationUnit.NANOSECONDS -> UnitTranslation(
|
||||
short = R.string.duration_ns_nominative_short,
|
||||
long = R.string.duration_ns_nominative_long
|
||||
)
|
||||
DurationUnit.MICROSECONDS -> UnitTranslation(
|
||||
short = R.string.duration_micros_nominative_short,
|
||||
long = R.string.duration_micros_nominative_long
|
||||
)
|
||||
DurationUnit.MILLISECONDS -> UnitTranslation(
|
||||
short = R.string.duration_ms_nominative_short,
|
||||
long = R.string.duration_ms_nominative_long
|
||||
)
|
||||
DurationUnit.SECONDS -> UnitTranslation(
|
||||
short = R.string.duration_sec_nominative_short,
|
||||
long = R.string.duration_sec_nominative_long
|
||||
)
|
||||
DurationUnit.MINUTES -> UnitTranslation(
|
||||
short = R.string.duration_min_nominative_short,
|
||||
long = R.string.duration_min_nominative_long
|
||||
)
|
||||
DurationUnit.HOURS -> UnitTranslation(
|
||||
short = R.string.duration_hr_nominative_short,
|
||||
long = R.string.duration_hr_nominative_long
|
||||
)
|
||||
DurationUnit.DAYS -> UnitTranslation(
|
||||
short = R.string.duration_day_nominative_short,
|
||||
long = R.string.duration_day_nominative_long
|
||||
)
|
||||
}
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.formatting
|
||||
|
||||
import android.icu.number.LocalizedNumberFormatter
|
||||
import android.icu.number.NumberFormatter
|
||||
import android.icu.number.Precision
|
||||
import android.icu.text.MeasureFormat
|
||||
import android.icu.text.NumberFormat
|
||||
import android.icu.util.Measure
|
||||
import android.icu.util.MeasureUnit
|
||||
import android.icu.util.TimeUnit
|
||||
import android.os.Build
|
||||
import androidx.annotation.RequiresApi
|
||||
import org.breezyweather.unit.supportsMeasureFormatPerUnit
|
||||
import org.breezyweather.unit.supportsNumberFormatterUsage
|
||||
import java.text.FieldPosition
|
||||
import java.util.Locale
|
||||
|
||||
/**
|
||||
* @param locale
|
||||
* @param value
|
||||
* @param perUnit an optional per unit
|
||||
* @param numberFormatterWidth
|
||||
*/
|
||||
@RequiresApi(Build.VERSION_CODES.R)
|
||||
fun MeasureUnit.formatWithNumberFormatter(
|
||||
locale: Locale,
|
||||
value: Number,
|
||||
perUnit: MeasureUnit? = null,
|
||||
precision: Int,
|
||||
numberFormatterWidth: NumberFormatter.UnitWidth,
|
||||
showSign: Boolean = false,
|
||||
): String {
|
||||
return (NumberFormatter.withLocale(locale) as LocalizedNumberFormatter)
|
||||
.precision(if (precision == 0) Precision.integer() else Precision.maxFraction(precision))
|
||||
.sign(if (showSign) NumberFormatter.SignDisplay.ALWAYS else NumberFormatter.SignDisplay.AUTO)
|
||||
.unit(this)
|
||||
.perUnit(perUnit)
|
||||
.unitWidth(numberFormatterWidth)
|
||||
.apply {
|
||||
if (supportsNumberFormatterUsage()) {
|
||||
usage(if (this is TimeUnit) "duration" else null)
|
||||
}
|
||||
}
|
||||
.format(value)
|
||||
.toString()
|
||||
}
|
||||
|
||||
/**
|
||||
* @param locale
|
||||
* @param value
|
||||
* @param perUnit an optional per unit. /!\ Only supported on Android SDK >= 26
|
||||
*/
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
fun MeasureUnit.formatWithMeasureFormat(
|
||||
locale: Locale,
|
||||
value: Number,
|
||||
perUnit: MeasureUnit? = null,
|
||||
precision: Int,
|
||||
measureFormatWidth: MeasureFormat.FormatWidth,
|
||||
): String {
|
||||
if (perUnit != null && !supportsMeasureFormatPerUnit()) {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
|
||||
return MeasureFormat
|
||||
.getInstance(
|
||||
locale,
|
||||
measureFormatWidth,
|
||||
NumberFormat.getInstance().apply { maximumFractionDigits = precision }
|
||||
)
|
||||
.let {
|
||||
if (perUnit != null) {
|
||||
it.formatMeasurePerUnit(
|
||||
Measure(value, this),
|
||||
perUnit,
|
||||
StringBuilder(),
|
||||
FieldPosition(0)
|
||||
).toString()
|
||||
} else {
|
||||
it.format(
|
||||
Measure(value, this)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.formatting
|
||||
|
||||
import android.icu.number.LocalizedNumberFormatter
|
||||
import android.icu.number.NumberFormatter
|
||||
import android.icu.number.Precision
|
||||
import android.icu.text.NumberFormat
|
||||
import org.breezyweather.unit.supportsNumberFormat
|
||||
import org.breezyweather.unit.supportsNumberFormatter
|
||||
import java.text.DecimalFormat
|
||||
import java.text.DecimalFormatSymbols
|
||||
import java.util.Locale
|
||||
|
||||
/**
|
||||
* Uses LocalizedNumberFormatter on Android SDK >= 30 (which is the recommended way)
|
||||
* Uses NumberFormat on Android SDK >= 24
|
||||
* Uses String.format() on Android SDK < 24
|
||||
*/
|
||||
fun Number.format(
|
||||
decimals: Int,
|
||||
locale: Locale = Locale.getDefault(),
|
||||
showSign: Boolean = false,
|
||||
useNumberFormatter: Boolean = true,
|
||||
useNumberFormat: Boolean = true,
|
||||
): String {
|
||||
return if (supportsNumberFormatter() && useNumberFormatter) {
|
||||
(NumberFormatter.withLocale(locale) as LocalizedNumberFormatter)
|
||||
.precision(Precision.maxFraction(decimals))
|
||||
.sign(if (showSign) NumberFormatter.SignDisplay.ALWAYS else NumberFormatter.SignDisplay.AUTO)
|
||||
.format(this)
|
||||
.toString()
|
||||
} else if (supportsNumberFormat() && useNumberFormat && !showSign) {
|
||||
// showSign not supported by NumberFormat, skip
|
||||
NumberFormat.getNumberInstance(locale)
|
||||
.apply { maximumFractionDigits = decimals }
|
||||
.format(this)
|
||||
.toString()
|
||||
} else {
|
||||
return DecimalFormat(if (showSign && toDouble() > 0) "+0" else "0", DecimalFormatSymbols.getInstance(locale))
|
||||
.apply { setMaximumFractionDigits(decimals) }
|
||||
.format(this)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.formatting
|
||||
|
||||
import java.math.RoundingMode
|
||||
import java.text.DecimalFormat
|
||||
import kotlin.concurrent.getOrSet
|
||||
|
||||
data class UnitDecimals(
|
||||
val short: Int,
|
||||
val narrow: Int = short,
|
||||
val long: Int = short,
|
||||
) {
|
||||
companion object {
|
||||
private val precisionFormats = Array(4) { ThreadLocal<DecimalFormat>() }
|
||||
|
||||
private fun createFormatForDecimals(decimals: Int) = DecimalFormat("0").apply {
|
||||
if (decimals > 0) minimumFractionDigits = decimals
|
||||
roundingMode = RoundingMode.HALF_UP
|
||||
}
|
||||
|
||||
internal fun formatToExactDecimals(value: Double, decimals: Int): String {
|
||||
val format = if (decimals < precisionFormats.size) {
|
||||
precisionFormats[decimals].getOrSet { createFormatForDecimals(decimals) }
|
||||
} else {
|
||||
createFormatForDecimals(decimals)
|
||||
}
|
||||
return format.format(value)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.formatting
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
|
||||
data class UnitTranslation(
|
||||
@param:StringRes val short: Int,
|
||||
@param:StringRes val narrow: Int = short,
|
||||
@param:StringRes val long: Int = short,
|
||||
)
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.formatting
|
||||
|
||||
import android.icu.number.NumberFormatter
|
||||
import android.icu.text.MeasureFormat
|
||||
import org.breezyweather.unit.supportsMeasureFormat
|
||||
import org.breezyweather.unit.supportsNumberFormatter
|
||||
|
||||
enum class UnitWidth(
|
||||
val id: String,
|
||||
val measureFormatWidth: MeasureFormat.FormatWidth?,
|
||||
val numberFormatterWidth: NumberFormatter.UnitWidth?,
|
||||
) {
|
||||
NARROW(
|
||||
"narrow",
|
||||
if (supportsMeasureFormat()) MeasureFormat.FormatWidth.NARROW else null,
|
||||
if (supportsNumberFormatter()) NumberFormatter.UnitWidth.NARROW else null
|
||||
),
|
||||
SHORT(
|
||||
"short",
|
||||
if (supportsMeasureFormat()) MeasureFormat.FormatWidth.SHORT else null,
|
||||
if (supportsNumberFormatter()) NumberFormatter.UnitWidth.SHORT else null
|
||||
),
|
||||
LONG(
|
||||
"full",
|
||||
if (supportsMeasureFormat()) MeasureFormat.FormatWidth.WIDE else null,
|
||||
if (supportsNumberFormatter()) NumberFormatter.UnitWidth.FULL_NAME else null
|
||||
),
|
||||
}
|
||||
|
|
@ -0,0 +1,169 @@
|
|||
package org.breezyweather.unit.pollen
|
||||
|
||||
import org.breezyweather.unit.WeatherValue
|
||||
import org.breezyweather.unit.formatting.UnitDecimals.Companion.formatToExactDecimals
|
||||
import org.breezyweather.unit.pollen.PollenConcentration.Companion.perCubicMeter
|
||||
import kotlin.math.roundToLong
|
||||
|
||||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Represents the pollen concentration.
|
||||
*
|
||||
* To construct a pollen concentration, use either the extension function [toPollenConcentration],
|
||||
* or the extension property [perCubicMeter], available on [Int], [Long], and [Double] numeric types.
|
||||
*
|
||||
* To get the value of this pollen concentration expressed in a particular [pollen concentration unit][PollenConcentrationUnit]
|
||||
* use the functions [toInt], [toLong], and [toDouble]
|
||||
* or the property [inPerCubicMeter].
|
||||
*/
|
||||
@JvmInline
|
||||
value class PollenConcentration internal constructor(
|
||||
private val rawValue: Long,
|
||||
) : Comparable<PollenConcentration>, WeatherValue<PollenConcentrationUnit> {
|
||||
val value: Long get() = rawValue
|
||||
private val storageUnit get() = PollenConcentrationUnit.PER_CUBIC_METER
|
||||
|
||||
companion object {
|
||||
/** Returns a [PollenConcentration] equal to this [Int] number of pollens per cubic meter. */
|
||||
inline val Int.perCubicMeter: PollenConcentration
|
||||
get() = toPollenConcentration(PollenConcentrationUnit.PER_CUBIC_METER)
|
||||
|
||||
/** Returns a [PollenConcentration] equal to this [Long] number of pollens per cubic meter. */
|
||||
inline val Long.perCubicMeter: PollenConcentration
|
||||
get() = toPollenConcentration(PollenConcentrationUnit.PER_CUBIC_METER)
|
||||
|
||||
/** Returns a [PollenConcentration] equal to this [Double] number of pollens per cubic meter. */
|
||||
inline val Double.perCubicMeter: PollenConcentration
|
||||
get() = toPollenConcentration(PollenConcentrationUnit.PER_CUBIC_METER)
|
||||
|
||||
/** Store a pollen index level as a [PollenConcentration]. */
|
||||
inline val Int.pollenIndex: PollenConcentration
|
||||
get() = toPollenConcentration(PollenConcentrationUnit.PER_CUBIC_METER)
|
||||
|
||||
/**
|
||||
* Parses a string that represents a pollen concentration and returns the parsed [PollenConcentration] value.
|
||||
*
|
||||
* The following format is accepted:
|
||||
*
|
||||
* - The format of string returned by the default [PollenConcentration.toString] and `toString` in a specific unit,
|
||||
* e.g. `24pcum`.
|
||||
*
|
||||
* @throws IllegalArgumentException if the string doesn't represent a pollen concentration in any of the supported formats.
|
||||
*/
|
||||
fun parse(value: String): PollenConcentration = try {
|
||||
parsePollenConcentration(value)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
throw IllegalArgumentException("Invalid pollen concentration string format: '$value'.", e)
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a string that represents a pollen concentration and returns the parsed [PollenConcentration] value,
|
||||
* or `null` if the string doesn't represent a pollen concentration in any of the supported formats.
|
||||
*
|
||||
* The following formats is accepted:
|
||||
*
|
||||
* - The format of string returned by the default [PollenConcentration.toString] and `toString` in a specific unit,
|
||||
* e.g. `24pcum`.
|
||||
*/
|
||||
fun parseOrNull(value: String): PollenConcentration? = try {
|
||||
parsePollenConcentration(value)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
override fun compareTo(other: PollenConcentration): Int {
|
||||
return this.rawValue.compareTo(other.rawValue)
|
||||
}
|
||||
|
||||
// conversion to units
|
||||
|
||||
/**
|
||||
* Returns the value of this pollen concentration expressed as a [Double] number of the specified [unit].
|
||||
*
|
||||
* The operation may involve rounding when the result cannot be represented exactly with a [Double] number.
|
||||
*/
|
||||
override fun toDouble(unit: PollenConcentrationUnit): Double {
|
||||
return value.toDouble()
|
||||
}
|
||||
|
||||
/** The value of this pollen concentration expressed as a [Double] number of pollens per cubic meter. */
|
||||
val inPerCubicMeter: Double
|
||||
get() = toDouble(PollenConcentrationUnit.PER_CUBIC_METER)
|
||||
|
||||
/** The value of the pollen index expressed as a [Int] pollen index. */
|
||||
val inPollenIndex: Int
|
||||
get() = value.toInt()
|
||||
|
||||
/**
|
||||
* Returns a string representation of this pollenConcentration value
|
||||
*/
|
||||
override fun toString(): String {
|
||||
return toString(storageUnit)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of this pollen concentration value expressed in the given [unit]
|
||||
* and formatted with the specified [decimals] number of digits after decimal point.
|
||||
*
|
||||
* @param decimals the number of digits after decimal point to show. The value must be non-negative.
|
||||
* No more than [unit.decimals.max] decimals will be shown, even if a larger number is requested.
|
||||
*
|
||||
* @return the value of pollen concentration in the specified [unit] followed by that unit abbreviated name:
|
||||
* `pcum`.
|
||||
*
|
||||
* @throws IllegalArgumentException if [decimals] is less than zero.
|
||||
*/
|
||||
fun toString(unit: PollenConcentrationUnit, decimals: Int = unit.decimals.short): String {
|
||||
require(decimals >= 0) { "decimals must be not negative, but was $decimals" }
|
||||
return formatToExactDecimals(toDouble(unit), decimals.coerceAtMost(unit.decimals.long)) + unit.id
|
||||
}
|
||||
}
|
||||
|
||||
// constructing from number of units
|
||||
// extension functions
|
||||
|
||||
/** Returns a [PollenConcentration] equal to this [Int] number of the specified [unit]. */
|
||||
fun Int.toPollenConcentration(unit: PollenConcentrationUnit): PollenConcentration {
|
||||
return toLong().toPollenConcentration(unit)
|
||||
}
|
||||
|
||||
/** Returns a [PollenConcentration] equal to this [Long] number of the specified [unit]. */
|
||||
fun Long.toPollenConcentration(unit: PollenConcentrationUnit): PollenConcentration {
|
||||
return pollenConcentrationOf(this)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [PollenConcentration] equal to this [Double] number of the specified [unit].
|
||||
*
|
||||
* @throws IllegalArgumentException if this `Double` value is `NaN`.
|
||||
*/
|
||||
fun Double.toPollenConcentration(unit: PollenConcentrationUnit): PollenConcentration {
|
||||
val valueInPCuM = this
|
||||
require(!valueInPCuM.isNaN()) { "Pollen concentration value cannot be NaN." }
|
||||
return pollenConcentrationOf(valueInPCuM.roundToLong())
|
||||
}
|
||||
|
||||
private fun parsePollenConcentration(value: String): PollenConcentration {
|
||||
var length = value.length
|
||||
if (length == 0) throw IllegalArgumentException("The string is empty")
|
||||
|
||||
TODO()
|
||||
}
|
||||
|
||||
private fun pollenConcentrationOf(normalPerCubicMeter: Long) = PollenConcentration(normalPerCubicMeter)
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.pollen
|
||||
|
||||
import android.content.Context
|
||||
import android.icu.util.MeasureUnit
|
||||
import android.os.Build
|
||||
import androidx.annotation.RequiresApi
|
||||
import org.breezyweather.unit.R
|
||||
import org.breezyweather.unit.WeatherUnit
|
||||
import org.breezyweather.unit.formatting.UnitDecimals
|
||||
import org.breezyweather.unit.formatting.UnitTranslation
|
||||
import org.breezyweather.unit.formatting.UnitWidth
|
||||
import java.util.Locale
|
||||
|
||||
enum class PollenConcentrationUnit(
|
||||
override val id: String,
|
||||
override val displayName: UnitTranslation,
|
||||
override val nominative: UnitTranslation,
|
||||
override val per: UnitTranslation? = null,
|
||||
override val decimals: UnitDecimals,
|
||||
) : WeatherUnit {
|
||||
|
||||
PER_CUBIC_METER(
|
||||
"pcum",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.volume_m3_per_short,
|
||||
long = R.string.volume_m3_per_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.volume_m3_per_short,
|
||||
long = R.string.volume_m3_per_long
|
||||
),
|
||||
decimals = UnitDecimals(0)
|
||||
),
|
||||
;
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
override fun getMeasureUnit(): MeasureUnit? = null
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
override fun getPerMeasureUnit(): MeasureUnit? = null
|
||||
|
||||
override fun getDisplayName(
|
||||
context: Context,
|
||||
locale: Locale,
|
||||
width: UnitWidth,
|
||||
useMeasureFormat: Boolean,
|
||||
): String {
|
||||
return context.getString(
|
||||
when (width) {
|
||||
UnitWidth.SHORT -> displayName.short
|
||||
UnitWidth.LONG -> displayName.long
|
||||
UnitWidth.NARROW -> displayName.narrow
|
||||
},
|
||||
""
|
||||
).trim()
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
fun getUnit(id: String): PollenConcentrationUnit? {
|
||||
return entries.firstOrNull { it.id == id }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,187 @@
|
|||
package org.breezyweather.unit.pollutant
|
||||
|
||||
import org.breezyweather.unit.WeatherValue
|
||||
import org.breezyweather.unit.formatting.UnitDecimals.Companion.formatToExactDecimals
|
||||
import org.breezyweather.unit.pollutant.PollutantConcentration.Companion.microgramsPerCubicMeter
|
||||
import org.breezyweather.unit.pollutant.PollutantConcentration.Companion.milligramsPerCubicMeter
|
||||
import kotlin.math.roundToLong
|
||||
|
||||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Represents the pollutant concentration.
|
||||
*
|
||||
* To construct a pollutant concentration, use either the extension function [toPollutantConcentration],
|
||||
* or the extension properties [microgramsPerCubicMeter] and [milligramsPerCubicMeter],
|
||||
* available on [Int], [Long], and [Double] numeric types.
|
||||
*
|
||||
* To get the value of this pollutant concentration expressed in a particular [pollutant concentration unit][PollutantConcentrationUnit]
|
||||
* use the functions [toInt], [toLong], and [toDouble]
|
||||
* or the properties [inMicrogramsPerCubicMeter] and [milligramsPerCubicMeter].
|
||||
*/
|
||||
@JvmInline
|
||||
value class PollutantConcentration internal constructor(
|
||||
private val rawValue: Long,
|
||||
) : Comparable<PollutantConcentration>, WeatherValue<PollutantConcentrationUnit> {
|
||||
val value: Long get() = rawValue
|
||||
private val storageUnit get() = PollutantConcentrationUnit.MICROGRAM_PER_CUBIC_METER
|
||||
|
||||
companion object {
|
||||
/** Returns a [PollutantConcentration] equal to this [Int] number of micrograms per cubic meter. */
|
||||
inline val Int.microgramsPerCubicMeter: PollutantConcentration
|
||||
get() = toPollutantConcentration(PollutantConcentrationUnit.MICROGRAM_PER_CUBIC_METER)
|
||||
|
||||
/** Returns a [PollutantConcentration] equal to this [Long] number of micrograms per cubic meter. */
|
||||
inline val Long.microgramsPerCubicMeter: PollutantConcentration
|
||||
get() = toPollutantConcentration(PollutantConcentrationUnit.MICROGRAM_PER_CUBIC_METER)
|
||||
|
||||
/** Returns a [PollutantConcentration] equal to this [Double] number of micrograms per cubic meter. */
|
||||
inline val Double.microgramsPerCubicMeter: PollutantConcentration
|
||||
get() = toPollutantConcentration(PollutantConcentrationUnit.MICROGRAM_PER_CUBIC_METER)
|
||||
|
||||
/** Returns a [PollutantConcentration] equal to this [Int] number of milligrams per cubic meter. */
|
||||
inline val Int.milligramsPerCubicMeter: PollutantConcentration
|
||||
get() = toPollutantConcentration(PollutantConcentrationUnit.MILLIGRAM_PER_CUBIC_METER)
|
||||
|
||||
/** Returns a [PollutantConcentration] equal to this [Long] number of milligrams per cubic meter. */
|
||||
inline val Long.milligramsPerCubicMeter: PollutantConcentration
|
||||
get() = toPollutantConcentration(PollutantConcentrationUnit.MILLIGRAM_PER_CUBIC_METER)
|
||||
|
||||
/** Returns a [PollutantConcentration] equal to this [Double] number of milligrams per cubic meter. */
|
||||
inline val Double.milligramsPerCubicMeter: PollutantConcentration
|
||||
get() = toPollutantConcentration(PollutantConcentrationUnit.MILLIGRAM_PER_CUBIC_METER)
|
||||
|
||||
/**
|
||||
* Parses a string that represents a pollutant concentration and returns the parsed [PollutantConcentration] value.
|
||||
*
|
||||
* The following format is accepted:
|
||||
*
|
||||
* - The format of string returned by the default [PollutantConcentration.toString] and `toString` in a specific unit,
|
||||
* e.g. `10microgpcum` or `2mgpcum`.
|
||||
*
|
||||
* @throws IllegalArgumentException if the string doesn't represent a pollutant concentration in any of the supported formats.
|
||||
*/
|
||||
fun parse(value: String): PollutantConcentration = try {
|
||||
parsePollutantConcentration(value)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
throw IllegalArgumentException("Invalid pollutant concentration string format: '$value'.", e)
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a string that represents a pollutant concentration and returns the parsed [PollutantConcentration] value,
|
||||
* or `null` if the string doesn't represent a pollutant concentration in any of the supported formats.
|
||||
*
|
||||
* The following formats is accepted:
|
||||
*
|
||||
* - The format of string returned by the default [PollutantConcentration.toString] and `toString` in a specific unit,
|
||||
* e.g. `10microgpcum` or `2mgpcum`.
|
||||
*/
|
||||
fun parseOrNull(value: String): PollutantConcentration? = try {
|
||||
parsePollutantConcentration(value)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
override fun compareTo(other: PollutantConcentration): Int {
|
||||
return this.rawValue.compareTo(other.rawValue)
|
||||
}
|
||||
|
||||
// conversion to units
|
||||
|
||||
/**
|
||||
* Returns the value of this pollutant concentration expressed as a [Double] number of the specified [unit].
|
||||
*
|
||||
* The operation may involve rounding when the result cannot be represented exactly with a [Double] number.
|
||||
*/
|
||||
override fun toDouble(unit: PollutantConcentrationUnit): Double {
|
||||
return convertPollutantConcentrationUnit(value.toDouble(), storageUnit, unit)
|
||||
}
|
||||
|
||||
/** The value of this pollutant concentration expressed as a [Double] number of micrograms per cubic meter. */
|
||||
val inMicrogramsPerCubicMeter: Double
|
||||
get() = toDouble(PollutantConcentrationUnit.MICROGRAM_PER_CUBIC_METER)
|
||||
|
||||
/** The value of this pollutant concentration expressed as a [Double] number of milligrams per cubic meter. */
|
||||
val inMilligramsPerCubicMeter: Double
|
||||
get() = toDouble(PollutantConcentrationUnit.MILLIGRAM_PER_CUBIC_METER)
|
||||
|
||||
/**
|
||||
* Returns a string representation of this pollutantConcentration value
|
||||
*/
|
||||
override fun toString(): String {
|
||||
return toString(storageUnit)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of this pollutant concentration value expressed in the given [unit]
|
||||
* and formatted with the specified [decimals] number of digits after decimal point.
|
||||
*
|
||||
* @param decimals the number of digits after decimal point to show. The value must be non-negative.
|
||||
* No more than [unit.decimals.max] decimals will be shown, even if a larger number is requested.
|
||||
*
|
||||
* @return the value of pollutant concentration in the specified [unit] followed by that unit abbreviated name:
|
||||
* `microgpcum`, `mgpcum`.
|
||||
*
|
||||
* @throws IllegalArgumentException if [decimals] is less than zero.
|
||||
*/
|
||||
fun toString(unit: PollutantConcentrationUnit, decimals: Int = unit.decimals.short): String {
|
||||
require(decimals >= 0) { "decimals must be not negative, but was $decimals" }
|
||||
return formatToExactDecimals(toDouble(unit), decimals.coerceAtMost(unit.decimals.long)) + unit.id
|
||||
}
|
||||
}
|
||||
|
||||
// constructing from number of units
|
||||
// extension functions
|
||||
|
||||
/** Returns a [PollutantConcentration] equal to this [Int] number of the specified [unit]. */
|
||||
fun Int.toPollutantConcentration(unit: PollutantConcentrationUnit): PollutantConcentration {
|
||||
return toLong().toPollutantConcentration(unit)
|
||||
}
|
||||
|
||||
/** Returns a [PollutantConcentration] equal to this [Long] number of the specified [unit]. */
|
||||
fun Long.toPollutantConcentration(unit: PollutantConcentrationUnit): PollutantConcentration {
|
||||
return pollutantConcentrationOf(
|
||||
convertPollutantConcentrationUnit(
|
||||
this.toDouble(),
|
||||
unit,
|
||||
PollutantConcentrationUnit.MICROGRAM_PER_CUBIC_METER
|
||||
).toLong()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [PollutantConcentration] equal to this [Double] number of the specified [unit].
|
||||
*
|
||||
* @throws IllegalArgumentException if this `Double` value is `NaN`.
|
||||
*/
|
||||
fun Double.toPollutantConcentration(unit: PollutantConcentrationUnit): PollutantConcentration {
|
||||
val valueInMicrogPCuM =
|
||||
convertPollutantConcentrationUnit(this, unit, PollutantConcentrationUnit.MICROGRAM_PER_CUBIC_METER)
|
||||
require(!valueInMicrogPCuM.isNaN()) { "Pollutant concentration value cannot be NaN." }
|
||||
return pollutantConcentrationOf(valueInMicrogPCuM.roundToLong())
|
||||
}
|
||||
|
||||
private fun parsePollutantConcentration(value: String): PollutantConcentration {
|
||||
var length = value.length
|
||||
if (length == 0) throw IllegalArgumentException("The string is empty")
|
||||
|
||||
TODO()
|
||||
}
|
||||
|
||||
private fun pollutantConcentrationOf(normalMicrogramsPerCubicMeter: Long) =
|
||||
PollutantConcentration(normalMicrogramsPerCubicMeter)
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.pollutant
|
||||
|
||||
import android.content.Context
|
||||
import android.icu.util.MeasureUnit
|
||||
import android.os.Build
|
||||
import androidx.annotation.RequiresApi
|
||||
import org.breezyweather.unit.R
|
||||
import org.breezyweather.unit.WeatherUnit
|
||||
import org.breezyweather.unit.formatting.UnitDecimals
|
||||
import org.breezyweather.unit.formatting.UnitTranslation
|
||||
import org.breezyweather.unit.formatting.UnitWidth
|
||||
import java.util.Locale
|
||||
|
||||
enum class PollutantConcentrationUnit(
|
||||
override val id: String,
|
||||
override val displayName: UnitTranslation,
|
||||
override val nominative: UnitTranslation,
|
||||
override val per: UnitTranslation? = UnitTranslation(
|
||||
short = R.string.volume_m3_per_short,
|
||||
long = R.string.volume_m3_per_long
|
||||
),
|
||||
val convertFromReference: (Double) -> Double,
|
||||
val convertToReference: (Double) -> Double,
|
||||
override val decimals: UnitDecimals,
|
||||
val chartStep: Double,
|
||||
) : WeatherUnit {
|
||||
|
||||
MICROGRAM_PER_CUBIC_METER(
|
||||
"microgpcum",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.weight_microg_display_name_short,
|
||||
long = R.string.weight_microg_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.weight_microg_nominative_short,
|
||||
long = R.string.weight_microg_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit },
|
||||
decimals = UnitDecimals(0),
|
||||
chartStep = 15.0 // TODO
|
||||
),
|
||||
MILLIGRAM_PER_CUBIC_METER(
|
||||
"mgpcum",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.weight_mg_display_name_short,
|
||||
long = R.string.weight_mg_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.weight_mg_nominative_short,
|
||||
long = R.string.weight_mg_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.div(1000.0) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.times(1000.0) },
|
||||
decimals = UnitDecimals(short = 0, long = 1),
|
||||
chartStep = 15.0 // TODO
|
||||
),
|
||||
;
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
override fun getMeasureUnit(): MeasureUnit? {
|
||||
return when (this) {
|
||||
MICROGRAM_PER_CUBIC_METER -> MeasureUnit.MICROGRAM
|
||||
MILLIGRAM_PER_CUBIC_METER -> MeasureUnit.MILLIGRAM
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
override fun getPerMeasureUnit(): MeasureUnit? {
|
||||
return MeasureUnit.CUBIC_METER
|
||||
}
|
||||
|
||||
/**
|
||||
* Override to:
|
||||
* - Use English units with Traditional Chinese
|
||||
*/
|
||||
override fun format(
|
||||
context: Context,
|
||||
value: Number,
|
||||
valueWidth: UnitWidth,
|
||||
unitWidth: UnitWidth,
|
||||
locale: Locale,
|
||||
showSign: Boolean,
|
||||
useNumberFormatter: Boolean,
|
||||
useMeasureFormat: Boolean,
|
||||
): String {
|
||||
// Translations missing for Esperanto in CLDR
|
||||
if (locale.language.equals("eo", ignoreCase = true)) {
|
||||
return formatWithAndroidTranslations(
|
||||
context = context,
|
||||
value = value,
|
||||
valueWidth = valueWidth,
|
||||
unitWidth = unitWidth,
|
||||
locale = locale,
|
||||
showSign = showSign,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useMeasureFormat
|
||||
)
|
||||
}
|
||||
val correctedLocale = locale.let {
|
||||
/**
|
||||
* Taiwan guidelines: https://www.bsmi.gov.tw/wSite/public/Attachment/f1736149048776.pdf
|
||||
* Ongoing issue: https://unicode-org.atlassian.net/jira/software/c/projects/CLDR/issues/CLDR-10604
|
||||
*/
|
||||
if (it.language.equals("zh", ignoreCase = true) &&
|
||||
arrayOf("TW", "HK", "MO").any { c -> it.country.equals(c, ignoreCase = true) } &&
|
||||
unitWidth != UnitWidth.LONG
|
||||
) {
|
||||
Locale.Builder().setLanguage("en").setRegion("001").build()
|
||||
} else {
|
||||
it
|
||||
}
|
||||
}
|
||||
return super.format(
|
||||
context = context,
|
||||
value = value,
|
||||
valueWidth = valueWidth,
|
||||
unitWidth = unitWidth,
|
||||
locale = correctedLocale,
|
||||
showSign = showSign,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useNumberFormatter
|
||||
)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
fun getUnit(id: String): PollutantConcentrationUnit? {
|
||||
return entries.firstOrNull { it.id == id }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Converts the given time pollutant concentration [value] expressed in the specified [sourceUnit] into the specified [targetUnit]. */
|
||||
internal fun convertPollutantConcentrationUnit(
|
||||
value: Double,
|
||||
sourceUnit: PollutantConcentrationUnit,
|
||||
targetUnit: PollutantConcentrationUnit,
|
||||
): Double {
|
||||
return if (sourceUnit == PollutantConcentrationUnit.MICROGRAM_PER_CUBIC_METER) {
|
||||
targetUnit.convertFromReference(value)
|
||||
} else if (targetUnit == PollutantConcentrationUnit.MICROGRAM_PER_CUBIC_METER) {
|
||||
sourceUnit.convertToReference(value)
|
||||
} else {
|
||||
targetUnit.convertFromReference(sourceUnit.convertToReference(value))
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,278 @@
|
|||
package org.breezyweather.unit.precipitation
|
||||
|
||||
import android.content.Context
|
||||
import org.breezyweather.unit.WeatherValue
|
||||
import org.breezyweather.unit.formatting.UnitDecimals.Companion.formatToExactDecimals
|
||||
import org.breezyweather.unit.formatting.UnitWidth
|
||||
import org.breezyweather.unit.precipitation.Precipitation.Companion.centimeters
|
||||
import org.breezyweather.unit.precipitation.Precipitation.Companion.inches
|
||||
import org.breezyweather.unit.precipitation.Precipitation.Companion.litersPerSquareMeter
|
||||
import org.breezyweather.unit.precipitation.Precipitation.Companion.millimeters
|
||||
import java.util.Locale
|
||||
import kotlin.math.roundToLong
|
||||
|
||||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Represents the precipitation.
|
||||
*
|
||||
* To construct a precipitation, use either the extension function [toPrecipitation],
|
||||
* or the extension properties [millimeters], [centimeters], [inches] and [litersPerSquareMeter],
|
||||
* available on [Int], [Long], and [Double] numeric types.
|
||||
*
|
||||
* To get the value of this precipitation expressed in a particular [precipitation unit][PrecipitationUnit]
|
||||
* use the functions [toInt], [toLong], and [toDouble]
|
||||
* or the properties [inMillimeters], [inCentimeters], [inInches] and [inLitersPerSquareMeter].
|
||||
*/
|
||||
@JvmInline
|
||||
value class Precipitation internal constructor(
|
||||
private val rawValue: Long,
|
||||
) : Comparable<Precipitation>, WeatherValue<PrecipitationUnit> {
|
||||
val value: Long get() = rawValue
|
||||
private val storageUnit get() = PrecipitationUnit.MICROMETER
|
||||
|
||||
companion object {
|
||||
/** Returns a [Precipitation] equal to this [Int] number of micrometers. */
|
||||
inline val Int.micrometers: Precipitation get() = toPrecipitation(PrecipitationUnit.MICROMETER)
|
||||
|
||||
/** Returns a [Precipitation] equal to this [Long] number of micrometers. */
|
||||
inline val Long.micrometers: Precipitation get() = toPrecipitation(PrecipitationUnit.MICROMETER)
|
||||
|
||||
/** Returns a [Precipitation] equal to this [Double] number of micrometers. */
|
||||
inline val Double.micrometers: Precipitation get() = toPrecipitation(PrecipitationUnit.MICROMETER)
|
||||
|
||||
/** Returns a [Precipitation] equal to this [Int] number of millimeters. */
|
||||
inline val Int.millimeters: Precipitation get() = toPrecipitation(PrecipitationUnit.MILLIMETER)
|
||||
|
||||
/** Returns a [Precipitation] equal to this [Long] number of millimeters. */
|
||||
inline val Long.millimeters: Precipitation get() = toPrecipitation(PrecipitationUnit.MILLIMETER)
|
||||
|
||||
/** Returns a [Precipitation] equal to this [Double] number of millimeters. */
|
||||
inline val Double.millimeters: Precipitation get() = toPrecipitation(PrecipitationUnit.MILLIMETER)
|
||||
|
||||
/** Returns a [Precipitation] equal to this [Int] number of millimeters. */
|
||||
inline val Int.centimeters: Precipitation get() = toPrecipitation(PrecipitationUnit.CENTIMETER)
|
||||
|
||||
/** Returns a [Precipitation] equal to this [Long] number of centimeters. */
|
||||
inline val Long.centimeters: Precipitation get() = toPrecipitation(PrecipitationUnit.CENTIMETER)
|
||||
|
||||
/** Returns a [Precipitation] equal to this [Double] number of centimeters. */
|
||||
inline val Double.centimeters: Precipitation get() = toPrecipitation(PrecipitationUnit.CENTIMETER)
|
||||
|
||||
/** Returns a [Precipitation] equal to this [Int] number of inches. */
|
||||
inline val Int.inches: Precipitation get() = toPrecipitation(PrecipitationUnit.INCH)
|
||||
|
||||
/** Returns a [Precipitation] equal to this [Long] number of inches. */
|
||||
inline val Long.inches: Precipitation get() = toPrecipitation(PrecipitationUnit.INCH)
|
||||
|
||||
/** Returns a [Precipitation] equal to this [Double] number of inches. */
|
||||
inline val Double.inches: Precipitation get() = toPrecipitation(PrecipitationUnit.INCH)
|
||||
|
||||
/** Returns a [Precipitation] equal to this [Int] number of liters per square meter. */
|
||||
inline val Int.litersPerSquareMeter: Precipitation
|
||||
get() = toPrecipitation(PrecipitationUnit.LITER_PER_SQUARE_METER)
|
||||
|
||||
/** Returns a [Precipitation] equal to this [Long] number of liters per square meter. */
|
||||
inline val Long.litersPerSquareMeter: Precipitation
|
||||
get() = toPrecipitation(PrecipitationUnit.LITER_PER_SQUARE_METER)
|
||||
|
||||
/** Returns a [Precipitation] equal to this [Double] number of liters per square meter. */
|
||||
inline val Double.litersPerSquareMeter: Precipitation
|
||||
get() = toPrecipitation(PrecipitationUnit.LITER_PER_SQUARE_METER)
|
||||
|
||||
/**
|
||||
* Parses a string that represents a precipitation and returns the parsed [Precipitation] value.
|
||||
*
|
||||
* The following format is accepted:
|
||||
*
|
||||
* - The format of string returned by the default [Precipitation.toString] and `toString` in a specific unit,
|
||||
* e.g. `5mm` or `1cm`.
|
||||
*
|
||||
* @throws IllegalArgumentException if the string doesn't represent a precipitation in any of the supported formats.
|
||||
*/
|
||||
fun parse(value: String): Precipitation = try {
|
||||
parsePrecipitation(value)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
throw IllegalArgumentException("Invalid precipitation string format: '$value'.", e)
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a string that represents a precipitation and returns the parsed [Precipitation] value,
|
||||
* or `null` if the string doesn't represent a precipitation in any of the supported formats.
|
||||
*
|
||||
* The following formats is accepted:
|
||||
*
|
||||
* - The format of string returned by the default [Precipitation.toString] and `toString` in a specific unit,
|
||||
* e.g. `5mm` or `1cm`.
|
||||
*/
|
||||
fun parseOrNull(value: String): Precipitation? = try {
|
||||
parsePrecipitation(value)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
override fun compareTo(other: Precipitation): Int {
|
||||
return this.rawValue.compareTo(other.rawValue)
|
||||
}
|
||||
|
||||
// conversion to units
|
||||
|
||||
/**
|
||||
* Returns the value of this precipitation expressed as a [Double] number of the specified [unit].
|
||||
*
|
||||
* The operation may involve rounding when the result cannot be represented exactly with a [Double] number.
|
||||
*/
|
||||
override fun toDouble(unit: PrecipitationUnit): Double {
|
||||
return convertPrecipitationUnit(value.toDouble(), storageUnit, unit)
|
||||
}
|
||||
|
||||
/** The value of this precipitation expressed as a [Double] number of micrometers. */
|
||||
val inMicrometers: Double
|
||||
get() = toDouble(PrecipitationUnit.MICROMETER)
|
||||
|
||||
/** The value of this precipitation expressed as a [Double] number of millimeters. */
|
||||
val inMillimeters: Double
|
||||
get() = toDouble(PrecipitationUnit.MILLIMETER)
|
||||
|
||||
/** The value of this precipitation expressed as a [Double] number of centimeters. */
|
||||
val inCentimeters: Double
|
||||
get() = toDouble(PrecipitationUnit.CENTIMETER)
|
||||
|
||||
/** The value of this precipitation expressed as a [Double] number of inches. */
|
||||
val inInches: Double
|
||||
get() = toDouble(PrecipitationUnit.INCH)
|
||||
|
||||
/** The value of this precipitation expressed as a [Double] number of liters per square meter. */
|
||||
val inLitersPerSquareMeter: Double
|
||||
get() = toDouble(PrecipitationUnit.LITER_PER_SQUARE_METER)
|
||||
|
||||
/**
|
||||
* Returns a string representation of this precipitation value
|
||||
*/
|
||||
override fun toString(): String {
|
||||
return toString(storageUnit)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of this precipitation value expressed in the given [unit]
|
||||
* and formatted with the specified [decimals] number of digits after decimal point.
|
||||
*
|
||||
* @param decimals the number of digits after decimal point to show. The value must be non-negative.
|
||||
* No more than [unit.decimals.max] decimals will be shown, even if a larger number is requested.
|
||||
*
|
||||
* @return the value of precipitation in the specified [unit] followed by that unit abbreviated name:
|
||||
* `microm`, `mm`, `cm`, `in`, `lpsqm`.
|
||||
*
|
||||
* @throws IllegalArgumentException if [decimals] is less than zero.
|
||||
*/
|
||||
fun toString(unit: PrecipitationUnit, decimals: Int = unit.decimals.short): String {
|
||||
require(decimals >= 0) { "decimals must be not negative, but was $decimals" }
|
||||
return formatToExactDecimals(toDouble(unit), decimals.coerceAtMost(unit.decimals.long)) + unit.id
|
||||
}
|
||||
|
||||
/**
|
||||
* Return null if the value is not between 0 mm and 1,000,000 μm (1,000 mm), otherwise this value
|
||||
*/
|
||||
fun toValidHourlyOrNull(): Precipitation? {
|
||||
return if (rawValue in 0..1000000) this else null
|
||||
}
|
||||
|
||||
/**
|
||||
* Return null if the value is not between 0 mm and 10,000,000 μm (10,000 mm), otherwise this value
|
||||
*/
|
||||
fun toValidHalfDayOrNull(): Precipitation? {
|
||||
return if (rawValue in 0..10000000) this else null
|
||||
}
|
||||
|
||||
/**
|
||||
* Special case of formatting:
|
||||
* mm/h instead of just mm
|
||||
*/
|
||||
fun formatIntensity(
|
||||
context: Context,
|
||||
unit: PrecipitationUnit,
|
||||
valueWidth: UnitWidth = UnitWidth.SHORT,
|
||||
unitWidth: UnitWidth = UnitWidth.SHORT,
|
||||
locale: Locale = Locale.getDefault(),
|
||||
useNumberFormatter: Boolean = true,
|
||||
useMeasureFormat: Boolean = true,
|
||||
): String {
|
||||
return unit.format(
|
||||
context = context,
|
||||
value = toDouble(unit),
|
||||
valueWidth = valueWidth,
|
||||
unitWidth = unitWidth,
|
||||
locale = locale,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useMeasureFormat
|
||||
)
|
||||
}
|
||||
|
||||
fun formatIntensityWithAndroidTranslations(
|
||||
context: Context,
|
||||
unit: PrecipitationUnit,
|
||||
valueWidth: UnitWidth = UnitWidth.SHORT,
|
||||
unitWidth: UnitWidth = UnitWidth.SHORT,
|
||||
locale: Locale = Locale.getDefault(),
|
||||
useNumberFormatter: Boolean = true,
|
||||
useMeasureFormat: Boolean = true,
|
||||
): String {
|
||||
return unit.formatWithAndroidTranslations(
|
||||
context = context,
|
||||
value = value,
|
||||
valueWidth = valueWidth,
|
||||
unitWidth = unitWidth,
|
||||
locale = locale,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useMeasureFormat
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// constructing from number of units
|
||||
// extension functions
|
||||
|
||||
/** Returns a [Precipitation] equal to this [Int] number of the specified [unit]. */
|
||||
fun Int.toPrecipitation(unit: PrecipitationUnit): Precipitation {
|
||||
return toLong().toPrecipitation(unit)
|
||||
}
|
||||
|
||||
/** Returns a [Precipitation] equal to this [Long] number of the specified [unit]. */
|
||||
fun Long.toPrecipitation(unit: PrecipitationUnit): Precipitation {
|
||||
return precipitationOf(convertPrecipitationUnit(this.toDouble(), unit, PrecipitationUnit.MICROMETER).toLong())
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [Precipitation] equal to this [Double] number of the specified [unit].
|
||||
*
|
||||
* @throws IllegalArgumentException if this `Double` value is `NaN`.
|
||||
*/
|
||||
fun Double.toPrecipitation(unit: PrecipitationUnit): Precipitation {
|
||||
val valueInMicrom = convertPrecipitationUnit(this, unit, PrecipitationUnit.MICROMETER)
|
||||
require(!valueInMicrom.isNaN()) { "Precipitation value cannot be NaN." }
|
||||
return precipitationOf(valueInMicrom.roundToLong())
|
||||
}
|
||||
|
||||
private fun parsePrecipitation(value: String): Precipitation {
|
||||
var length = value.length
|
||||
if (length == 0) throw IllegalArgumentException("The string is empty")
|
||||
|
||||
TODO()
|
||||
}
|
||||
|
||||
private fun precipitationOf(normalMeters: Long) = Precipitation(normalMeters)
|
||||
|
|
@ -0,0 +1,340 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.precipitation
|
||||
|
||||
import android.content.Context
|
||||
import android.icu.util.MeasureUnit
|
||||
import android.os.Build
|
||||
import androidx.annotation.RequiresApi
|
||||
import org.breezyweather.unit.R
|
||||
import org.breezyweather.unit.WeatherUnit
|
||||
import org.breezyweather.unit.formatting.UnitDecimals
|
||||
import org.breezyweather.unit.formatting.UnitTranslation
|
||||
import org.breezyweather.unit.formatting.UnitWidth
|
||||
import org.breezyweather.unit.formatting.formatWithMeasureFormat
|
||||
import org.breezyweather.unit.formatting.formatWithNumberFormatter
|
||||
import org.breezyweather.unit.supportsMeasureFormat
|
||||
import org.breezyweather.unit.supportsMeasureFormatPerUnit
|
||||
import org.breezyweather.unit.supportsNumberFormatter
|
||||
import java.util.Locale
|
||||
|
||||
enum class PrecipitationUnit(
|
||||
override val id: String,
|
||||
override val displayName: UnitTranslation,
|
||||
override val nominative: UnitTranslation,
|
||||
override val per: UnitTranslation? = null,
|
||||
val convertFromReference: (Double) -> Double,
|
||||
val convertToReference: (Double) -> Double,
|
||||
override val decimals: UnitDecimals,
|
||||
val chartStep: Double,
|
||||
) : WeatherUnit {
|
||||
|
||||
MICROMETER(
|
||||
id = "microm",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.length_microm_display_name_short,
|
||||
long = R.string.length_microm_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.length_microm_nominative_short,
|
||||
long = R.string.length_microm_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit },
|
||||
decimals = UnitDecimals(short = 0, long = 1), // Used only by PM2.5 formatting
|
||||
chartStep = 5000.0
|
||||
),
|
||||
MILLIMETER(
|
||||
id = "mm",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.length_mm_display_name_short,
|
||||
long = R.string.length_mm_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.length_mm_nominative_short,
|
||||
long = R.string.length_mm_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.div(1000.0) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.times(1000.0) },
|
||||
decimals = UnitDecimals(narrow = 0, short = 1, long = 2),
|
||||
chartStep = 5.0
|
||||
),
|
||||
CENTIMETER(
|
||||
id = "cm",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.length_cm_display_name_short,
|
||||
long = R.string.length_cm_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.length_cm_nominative_short,
|
||||
long = R.string.length_cm_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.div(10000.0) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.times(10000.0) },
|
||||
decimals = UnitDecimals(narrow = 1, short = 2, long = 3),
|
||||
chartStep = 0.5
|
||||
),
|
||||
INCH(
|
||||
id = "in",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.length_in_display_name_short,
|
||||
long = R.string.length_in_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.length_in_nominative_short,
|
||||
long = R.string.length_in_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.div(25400.0) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.times(25400.0) },
|
||||
decimals = UnitDecimals(narrow = 1, short = 2, long = 3),
|
||||
chartStep = 0.2
|
||||
),
|
||||
LITER_PER_SQUARE_METER( // Is actually the same as millimeters, just expressed differently
|
||||
id = "lpsqm",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.volume_l_display_name_short,
|
||||
long = R.string.volume_l_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.volume_l_nominative_short,
|
||||
long = R.string.volume_l_nominative_long
|
||||
),
|
||||
per = UnitTranslation(
|
||||
short = R.string.area_m2_per_short,
|
||||
long = R.string.area_m2_per_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.div(1000.0) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.times(1000.0) },
|
||||
decimals = UnitDecimals(narrow = 0, short = 1, long = 2),
|
||||
chartStep = 5.0
|
||||
),
|
||||
;
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
override fun getMeasureUnit(): MeasureUnit? {
|
||||
return when (this) {
|
||||
MICROMETER -> MeasureUnit.MICROMETER
|
||||
MILLIMETER -> MeasureUnit.MILLIMETER
|
||||
CENTIMETER -> MeasureUnit.CENTIMETER
|
||||
INCH -> MeasureUnit.INCH
|
||||
LITER_PER_SQUARE_METER -> MeasureUnit.LITER
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
override fun getPerMeasureUnit(): MeasureUnit? {
|
||||
return when (this) {
|
||||
LITER_PER_SQUARE_METER -> MeasureUnit.SQUARE_METER
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Override to:
|
||||
* - Use English units with Traditional Chinese
|
||||
*/
|
||||
override fun format(
|
||||
context: Context,
|
||||
value: Number,
|
||||
valueWidth: UnitWidth,
|
||||
unitWidth: UnitWidth,
|
||||
locale: Locale,
|
||||
showSign: Boolean,
|
||||
useNumberFormatter: Boolean,
|
||||
useMeasureFormat: Boolean,
|
||||
): String {
|
||||
// Translations missing for Esperanto in CLDR
|
||||
if (locale.language.equals("eo", ignoreCase = true) && this == LITER_PER_SQUARE_METER) {
|
||||
return formatWithAndroidTranslations(
|
||||
context = context,
|
||||
value = value,
|
||||
valueWidth = valueWidth,
|
||||
unitWidth = unitWidth,
|
||||
locale = locale,
|
||||
showSign = showSign,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useMeasureFormat
|
||||
)
|
||||
}
|
||||
|
||||
val correctedLocale = locale.let {
|
||||
/**
|
||||
* Taiwan guidelines: https://www.bsmi.gov.tw/wSite/public/Attachment/f1736149048776.pdf
|
||||
* Ongoing issue: https://unicode-org.atlassian.net/jira/software/c/projects/CLDR/issues/CLDR-10604
|
||||
*/
|
||||
if (it.language.equals("zh", ignoreCase = true) &&
|
||||
arrayOf("TW", "HK", "MO").any { c -> it.country.equals(c, ignoreCase = true) } &&
|
||||
unitWidth != UnitWidth.LONG
|
||||
) {
|
||||
Locale.Builder().setLanguage("en").setRegion("001").build()
|
||||
} else {
|
||||
it
|
||||
}
|
||||
}
|
||||
return super.format(
|
||||
context = context,
|
||||
value = value,
|
||||
valueWidth = valueWidth,
|
||||
unitWidth = unitWidth,
|
||||
locale = correctedLocale,
|
||||
showSign = showSign,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useNumberFormatter
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Special case of formatting:
|
||||
* mm/h instead of just mm
|
||||
*/
|
||||
fun formatIntensity(
|
||||
context: Context,
|
||||
value: Number,
|
||||
valueWidth: UnitWidth = UnitWidth.SHORT,
|
||||
unitWidth: UnitWidth = UnitWidth.SHORT,
|
||||
locale: Locale = Locale.getDefault(),
|
||||
useNumberFormatter: Boolean = true,
|
||||
useMeasureFormat: Boolean = true,
|
||||
): String {
|
||||
if (supportsMeasureFormat() &&
|
||||
getMeasureUnit() != null &&
|
||||
getPerMeasureUnit() == null && // Liter per square meter would have 2 “per”, so not supported!
|
||||
supportsMeasureFormatPerUnit() &&
|
||||
(useNumberFormatter || useMeasureFormat)
|
||||
) {
|
||||
val correctedLocale = locale.let {
|
||||
/**
|
||||
* Use English units with Traditional Chinese
|
||||
*
|
||||
* Taiwan guidelines: https://www.bsmi.gov.tw/wSite/public/Attachment/f1736149048776.pdf
|
||||
* Ongoing issue: https://unicode-org.atlassian.net/jira/software/c/projects/CLDR/issues/CLDR-10604
|
||||
*/
|
||||
if (it.language.equals("zh", ignoreCase = true) &&
|
||||
arrayOf("TW", "HK", "MO").any { c -> it.country.equals(c, ignoreCase = true) } &&
|
||||
unitWidth != UnitWidth.LONG
|
||||
) {
|
||||
Locale.Builder().setLanguage("en").setRegion("001").build()
|
||||
} else {
|
||||
it
|
||||
}
|
||||
}
|
||||
|
||||
return if (supportsNumberFormatter() && useNumberFormatter) {
|
||||
getMeasureUnit()!!.formatWithNumberFormatter(
|
||||
locale = correctedLocale,
|
||||
value = value,
|
||||
perUnit = MeasureUnit.HOUR,
|
||||
precision = getPrecision(valueWidth),
|
||||
numberFormatterWidth = unitWidth.numberFormatterWidth!!
|
||||
)
|
||||
} else {
|
||||
getMeasureUnit()!!.formatWithMeasureFormat(
|
||||
locale = correctedLocale,
|
||||
value = value,
|
||||
perUnit = MeasureUnit.HOUR,
|
||||
precision = getPrecision(valueWidth),
|
||||
measureFormatWidth = unitWidth.measureFormatWidth!!
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// LogHelper.log(msg = "Not formatting with ICU ${enum.id} in ${context.currentLocale}")
|
||||
return formatIntensityWithAndroidTranslations(
|
||||
context = context,
|
||||
value = value,
|
||||
valueWidth = valueWidth,
|
||||
unitWidth = unitWidth,
|
||||
locale = locale,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useMeasureFormat
|
||||
)
|
||||
}
|
||||
|
||||
fun formatIntensityWithAndroidTranslations(
|
||||
context: Context,
|
||||
value: Number,
|
||||
valueWidth: UnitWidth = UnitWidth.SHORT,
|
||||
unitWidth: UnitWidth = UnitWidth.SHORT,
|
||||
locale: Locale = Locale.getDefault(),
|
||||
useNumberFormatter: Boolean = true,
|
||||
useMeasureFormat: Boolean = true,
|
||||
): String {
|
||||
return context.getString(
|
||||
when (unitWidth) {
|
||||
UnitWidth.SHORT -> R.string.duration_hr_per_short
|
||||
UnitWidth.LONG -> R.string.duration_hr_per_long
|
||||
UnitWidth.NARROW -> R.string.duration_hr_per_short
|
||||
},
|
||||
formatWithAndroidTranslations(
|
||||
context = context,
|
||||
value = value,
|
||||
valueWidth = valueWidth,
|
||||
unitWidth = unitWidth,
|
||||
locale = locale,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useMeasureFormat
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
/**
|
||||
* Copyright © 1991-Present Unicode, Inc.
|
||||
* License: Unicode License v3 https://www.unicode.org/license.txt
|
||||
* Source (simplified): https://github.com/unicode-org/cldr/blob/3f3967f3cbadc56bbb44a9aed20784e82ac64c67/common/supplemental/units.xml#L474-L478
|
||||
*/
|
||||
fun getDefaultUnit(
|
||||
locale: Locale = Locale.getDefault(),
|
||||
) = when (locale.country) {
|
||||
"BR" -> CENTIMETER
|
||||
"US" -> INCH
|
||||
else -> MILLIMETER
|
||||
}
|
||||
|
||||
/**
|
||||
* Copyright © 1991-Present Unicode, Inc.
|
||||
* License: Unicode License v3 https://www.unicode.org/license.txt
|
||||
* Source (simplified): https://github.com/unicode-org/cldr/blob/3f3967f3cbadc56bbb44a9aed20784e82ac64c67/common/supplemental/units.xml#L498-L501
|
||||
*/
|
||||
fun getDefaultSnowfallUnit(
|
||||
locale: Locale,
|
||||
) = when (locale.country) {
|
||||
"US" -> INCH
|
||||
else -> CENTIMETER
|
||||
}
|
||||
|
||||
fun getUnit(id: String): PrecipitationUnit? {
|
||||
return entries.firstOrNull { it.id == id }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Converts the given time precipitation [value] expressed in the specified [sourceUnit] into the specified [targetUnit]. */
|
||||
internal fun convertPrecipitationUnit(
|
||||
value: Double,
|
||||
sourceUnit: PrecipitationUnit,
|
||||
targetUnit: PrecipitationUnit,
|
||||
): Double {
|
||||
return if (sourceUnit == PrecipitationUnit.MICROMETER) {
|
||||
targetUnit.convertFromReference(value)
|
||||
} else if (targetUnit == PrecipitationUnit.MICROMETER) {
|
||||
sourceUnit.convertToReference(value)
|
||||
} else {
|
||||
targetUnit.convertFromReference(sourceUnit.convertToReference(value))
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,246 @@
|
|||
package org.breezyweather.unit.pressure
|
||||
|
||||
import org.breezyweather.unit.WeatherValue
|
||||
import org.breezyweather.unit.formatting.UnitDecimals.Companion.formatToExactDecimals
|
||||
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
|
||||
import org.breezyweather.unit.pressure.Pressure.Companion.millibars
|
||||
import org.breezyweather.unit.pressure.Pressure.Companion.pascals
|
||||
import kotlin.math.roundToLong
|
||||
|
||||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Represents the pressure.
|
||||
*
|
||||
* To construct a pressure, use either the extension function [toPressure],
|
||||
* or the extension properties [pascals], [hectopascals], [millibars], and so on,
|
||||
* available on [Int], [Long], and [Double] numeric types.
|
||||
*
|
||||
* To get the value of this pressure expressed in a particular [pressure unit][PressureUnit]
|
||||
* use the functions [toInt], [toLong], and [toDouble]
|
||||
* or the properties [inPascals], [inHectopascals], [inMillibars], [inAtmospheres], and so on.
|
||||
*/
|
||||
@JvmInline
|
||||
value class Pressure internal constructor(
|
||||
private val rawValue: Long,
|
||||
) : Comparable<Pressure>, WeatherValue<PressureUnit> {
|
||||
val value: Long get() = rawValue
|
||||
private val storageUnit get() = PressureUnit.PASCAL
|
||||
|
||||
companion object {
|
||||
/** Returns a [Pressure] equal to this [Int] number of pascals. */
|
||||
inline val Int.pascals: Pressure get() = toPressure(PressureUnit.PASCAL)
|
||||
|
||||
/** Returns a [Pressure] equal to this [Long] number of pascals. */
|
||||
inline val Long.pascals: Pressure get() = toPressure(PressureUnit.PASCAL)
|
||||
|
||||
/** Returns a [Pressure] equal to this [Double] number of pascals. */
|
||||
inline val Double.pascals: Pressure get() = toPressure(PressureUnit.PASCAL)
|
||||
|
||||
/** Returns a [Pressure] equal to this [Int] number of kilopascals. */
|
||||
inline val Int.kilopascals: Pressure get() = toPressure(PressureUnit.KILOPASCAL)
|
||||
|
||||
/** Returns a [Pressure] equal to this [Long] number of kilopascals. */
|
||||
inline val Long.kilopascals: Pressure get() = toPressure(PressureUnit.KILOPASCAL)
|
||||
|
||||
/** Returns a [Pressure] equal to this [Double] number of kilopascals. */
|
||||
inline val Double.kilopascals: Pressure get() = toPressure(PressureUnit.KILOPASCAL)
|
||||
|
||||
/** Returns a [Pressure] equal to this [Int] number of hectopascals. */
|
||||
inline val Int.hectopascals: Pressure get() = toPressure(PressureUnit.HECTOPASCAL)
|
||||
|
||||
/** Returns a [Pressure] equal to this [Long] number of hectopascals. */
|
||||
inline val Long.hectopascals: Pressure get() = toPressure(PressureUnit.HECTOPASCAL)
|
||||
|
||||
/** Returns a [Pressure] equal to this [Double] number of hectopascals. */
|
||||
inline val Double.hectopascals: Pressure get() = toPressure(PressureUnit.HECTOPASCAL)
|
||||
|
||||
/** Returns a [Pressure] equal to this [Int] number of millibars. */
|
||||
inline val Int.millibars: Pressure get() = toPressure(PressureUnit.MILLIBAR)
|
||||
|
||||
/** Returns a [Pressure] equal to this [Long] number of millibars. */
|
||||
inline val Long.millibars: Pressure get() = toPressure(PressureUnit.MILLIBAR)
|
||||
|
||||
/** Returns a [Pressure] equal to this [Double] number of millibars. */
|
||||
inline val Double.millibars: Pressure get() = toPressure(PressureUnit.MILLIBAR)
|
||||
|
||||
/** Returns a [Pressure] equal to this [Int] number of atmospheres. */
|
||||
inline val Int.atmospheres: Pressure get() = toPressure(PressureUnit.ATMOSPHERE)
|
||||
|
||||
/** Returns a [Pressure] equal to this [Long] number of atmospheres. */
|
||||
inline val Long.atmospheres: Pressure get() = toPressure(PressureUnit.ATMOSPHERE)
|
||||
|
||||
/** Returns a [Pressure] equal to this [Double] number of atmospheres. */
|
||||
inline val Double.atmospheres: Pressure get() = toPressure(PressureUnit.ATMOSPHERE)
|
||||
|
||||
/** Returns a [Pressure] equal to this [Int] number of millimeters of mercury. */
|
||||
inline val Int.millimetersOfMercury: Pressure get() = toPressure(PressureUnit.MILLIMETER_OF_MERCURY)
|
||||
|
||||
/** Returns a [Pressure] equal to this [Long] number of millimeters of mercury. */
|
||||
inline val Long.millimetersOfMercury: Pressure get() = toPressure(PressureUnit.MILLIMETER_OF_MERCURY)
|
||||
|
||||
/** Returns a [Pressure] equal to this [Double] number of millimeters of mercury. */
|
||||
inline val Double.millimetersOfMercury: Pressure get() = toPressure(PressureUnit.MILLIMETER_OF_MERCURY)
|
||||
|
||||
/** Returns a [Pressure] equal to this [Int] number of inches of mercury. */
|
||||
inline val Int.inchesOfMercury: Pressure get() = toPressure(PressureUnit.INCH_OF_MERCURY)
|
||||
|
||||
/** Returns a [Pressure] equal to this [Long] number of inches of mercury. */
|
||||
inline val Long.inchesOfMercury: Pressure get() = toPressure(PressureUnit.INCH_OF_MERCURY)
|
||||
|
||||
/** Returns a [Pressure] equal to this [Double] number of inches of mercury. */
|
||||
inline val Double.inchesOfMercury: Pressure get() = toPressure(PressureUnit.INCH_OF_MERCURY)
|
||||
|
||||
/**
|
||||
* Parses a string that represents a pressure and returns the parsed [Pressure] value.
|
||||
*
|
||||
* The following format is accepted:
|
||||
*
|
||||
* - The format of string returned by the default [Pressure.toString] and `toString` in a specific unit,
|
||||
* e.g. `1013.25hpa` or `29.95inhg`.
|
||||
*
|
||||
* @throws IllegalArgumentException if the string doesn't represent a pressure in any of the supported formats.
|
||||
*/
|
||||
fun parse(value: String): Pressure = try {
|
||||
parsePressure(value)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
throw IllegalArgumentException("Invalid pressure string format: '$value'.", e)
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a string that represents a pressure and returns the parsed [Pressure] value,
|
||||
* or `null` if the string doesn't represent a pressure in any of the supported formats.
|
||||
*
|
||||
* The following formats is accepted:
|
||||
*
|
||||
* - The format of string returned by the default [Pressure.toString] and `toString` in a specific unit,
|
||||
* e.g. `1013.25hpa` or `29.95inhg`.
|
||||
*/
|
||||
fun parseOrNull(value: String): Pressure? = try {
|
||||
parsePressure(value)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
override fun compareTo(other: Pressure): Int {
|
||||
return this.rawValue.compareTo(other.rawValue)
|
||||
}
|
||||
|
||||
// conversion to units
|
||||
|
||||
/**
|
||||
* Returns the value of this pressure expressed as a [Double] number of the specified [unit].
|
||||
*
|
||||
* The operation may involve rounding when the result cannot be represented exactly with a [Double] number.
|
||||
*/
|
||||
override fun toDouble(unit: PressureUnit): Double {
|
||||
return convertPressureUnit(value.toDouble(), storageUnit, unit)
|
||||
}
|
||||
|
||||
/** The value of this pressure expressed as a [Double] number of pascals. */
|
||||
val inPascals: Double
|
||||
get() = toDouble(PressureUnit.PASCAL)
|
||||
|
||||
/** The value of this pressure expressed as a [Double] number of hectopascals. */
|
||||
val inHectopascals: Double
|
||||
get() = toDouble(PressureUnit.HECTOPASCAL)
|
||||
|
||||
/** The value of this pressure expressed as a [Double] number of kilopascals. */
|
||||
val inKilopascals: Double
|
||||
get() = toDouble(PressureUnit.KILOPASCAL)
|
||||
|
||||
/** The value of this pressure expressed as a [Double] number of millibars. */
|
||||
val inMillibars: Double
|
||||
get() = toDouble(PressureUnit.MILLIBAR)
|
||||
|
||||
/** The value of this pressure expressed as a [Double] number of atmospheres. */
|
||||
val inAtmospheres: Double
|
||||
get() = toDouble(PressureUnit.ATMOSPHERE)
|
||||
|
||||
/** The value of this pressure expressed as a [Double] number of millimeters of mercury. */
|
||||
val inMillimetersOfMercury: Double
|
||||
get() = toDouble(PressureUnit.MILLIMETER_OF_MERCURY)
|
||||
|
||||
/** The value of this pressure expressed as a [Double] number of inches of mercury. */
|
||||
val inInchesOfMercury: Double
|
||||
get() = toDouble(PressureUnit.INCH_OF_MERCURY)
|
||||
|
||||
/**
|
||||
* Returns a string representation of this pressure value
|
||||
*/
|
||||
override fun toString(): String {
|
||||
return toString(storageUnit)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of this pressure value expressed in the given [unit]
|
||||
* and formatted with the specified [decimals] number of digits after decimal point.
|
||||
*
|
||||
* @param decimals the number of digits after decimal point to show. The value must be non-negative.
|
||||
* No more than [unit.decimals.max] decimals will be shown, even if a larger number is requested.
|
||||
*
|
||||
* @return the value of pressure in the specified [unit] followed by that unit abbreviated name:
|
||||
* `pa`, `hpa`, `mb`, `atm`, `mmhg`, `inhg`.
|
||||
*
|
||||
* @throws IllegalArgumentException if [decimals] is less than zero.
|
||||
*/
|
||||
fun toString(unit: PressureUnit, decimals: Int = unit.decimals.short): String {
|
||||
require(decimals >= 0) { "decimals must be not negative, but was $decimals" }
|
||||
return formatToExactDecimals(toDouble(unit), decimals.coerceAtMost(unit.decimals.long)) + unit.id
|
||||
}
|
||||
|
||||
/**
|
||||
* Return null if the value is not between 800 hPa and 1200 hPa, otherwise this value
|
||||
*/
|
||||
fun toValidOrNull(): Pressure? {
|
||||
return takeIf { rawValue in 80000..120000 }
|
||||
}
|
||||
}
|
||||
|
||||
// constructing from number of units
|
||||
// extension functions
|
||||
|
||||
/** Returns a [Pressure] equal to this [Int] number of the specified [unit]. */
|
||||
fun Int.toPressure(unit: PressureUnit): Pressure {
|
||||
return toLong().toPressure(unit)
|
||||
}
|
||||
|
||||
/** Returns a [Pressure] equal to this [Long] number of the specified [unit]. */
|
||||
fun Long.toPressure(unit: PressureUnit): Pressure {
|
||||
return pressureOf(convertPressureUnit(this.toDouble(), unit, PressureUnit.PASCAL).toLong())
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [Pressure] equal to this [Double] number of the specified [unit].
|
||||
*
|
||||
* @throws IllegalArgumentException if this `Double` value is `NaN`.
|
||||
*/
|
||||
fun Double.toPressure(unit: PressureUnit): Pressure {
|
||||
val valueInPa = convertPressureUnit(this, unit, PressureUnit.PASCAL)
|
||||
require(!valueInPa.isNaN()) { "Pressure value cannot be NaN." }
|
||||
return pressureOf(valueInPa.roundToLong())
|
||||
}
|
||||
|
||||
private fun parsePressure(value: String): Pressure {
|
||||
var length = value.length
|
||||
if (length == 0) throw IllegalArgumentException("The string is empty")
|
||||
|
||||
TODO()
|
||||
}
|
||||
|
||||
private fun pressureOf(normalPascals: Long) = Pressure(normalPascals)
|
||||
|
|
@ -0,0 +1,260 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.pressure
|
||||
|
||||
import android.content.Context
|
||||
import android.icu.util.MeasureUnit
|
||||
import android.os.Build
|
||||
import androidx.annotation.RequiresApi
|
||||
import org.breezyweather.unit.R
|
||||
import org.breezyweather.unit.WeatherUnit
|
||||
import org.breezyweather.unit.formatting.UnitDecimals
|
||||
import org.breezyweather.unit.formatting.UnitTranslation
|
||||
import org.breezyweather.unit.formatting.UnitWidth
|
||||
import org.breezyweather.unit.supportsMeasureUnitAtmosphere
|
||||
import java.util.Locale
|
||||
|
||||
enum class PressureUnit(
|
||||
override val id: String,
|
||||
override val displayName: UnitTranslation,
|
||||
override val nominative: UnitTranslation,
|
||||
override val per: UnitTranslation? = null,
|
||||
val convertFromReference: (Double) -> Double,
|
||||
val convertToReference: (Double) -> Double,
|
||||
override val decimals: UnitDecimals,
|
||||
val chartStep: Double,
|
||||
) : WeatherUnit {
|
||||
|
||||
PASCAL(
|
||||
id = "pa",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.pressure_pa_display_name_short,
|
||||
long = R.string.pressure_pa_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.pressure_pa_nominative_short,
|
||||
long = R.string.pressure_pa_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit },
|
||||
decimals = UnitDecimals(0),
|
||||
chartStep = 15.0
|
||||
),
|
||||
HECTOPASCAL(
|
||||
id = "hpa",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.pressure_hpa_display_name_short,
|
||||
long = R.string.pressure_hpa_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.pressure_hpa_nominative_short,
|
||||
long = R.string.pressure_hpa_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.div(100.0) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.times(100.0) },
|
||||
decimals = UnitDecimals(narrow = 0, short = 1, long = 2),
|
||||
chartStep = 15.0
|
||||
),
|
||||
KILOPASCAL(
|
||||
id = "kpa",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.pressure_kpa_display_name_short,
|
||||
long = R.string.pressure_kpa_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.pressure_kpa_nominative_short,
|
||||
long = R.string.pressure_kpa_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.div(1000.0) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.times(1000.0) },
|
||||
decimals = UnitDecimals(narrow = 1, short = 2, long = 3),
|
||||
chartStep = 1.5
|
||||
),
|
||||
MILLIBAR(
|
||||
id = "mb",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.pressure_mbar_display_name_short,
|
||||
long = R.string.pressure_mbar_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.pressure_mbar_nominative_short,
|
||||
long = R.string.pressure_mbar_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.div(100.0) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.times(100.0) },
|
||||
decimals = UnitDecimals(narrow = 0, short = 1, long = 2),
|
||||
chartStep = 15.0
|
||||
),
|
||||
ATMOSPHERE(
|
||||
id = "atm",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.pressure_atm_display_name_short,
|
||||
long = R.string.pressure_atm_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.pressure_atm_nominative_short,
|
||||
long = R.string.pressure_atm_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.div(101325.0) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.times(101325.0) },
|
||||
decimals = UnitDecimals(narrow = 1, short = 2, long = 3),
|
||||
chartStep = 0.015
|
||||
),
|
||||
MILLIMETER_OF_MERCURY(
|
||||
id = "mmhg",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.pressure_mmhg_display_name_short,
|
||||
long = R.string.pressure_mmhg_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.pressure_mmhg_nominative_short,
|
||||
long = R.string.pressure_mmhg_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.times(760.0 / 101325.0) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.times(101325.0 / 760.0) },
|
||||
decimals = UnitDecimals(narrow = 0, short = 1, long = 2),
|
||||
chartStep = 10.0
|
||||
),
|
||||
INCH_OF_MERCURY(
|
||||
id = "inhg",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.pressure_inhg_display_name_short,
|
||||
long = R.string.pressure_inhg_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.pressure_inhg_nominative_short,
|
||||
long = R.string.pressure_inhg_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.times(760.0 / 101325.0).div(25.4) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.times(25.4).times(101325.0 / 760.0) },
|
||||
decimals = UnitDecimals(narrow = 1, short = 2, long = 3),
|
||||
chartStep = 0.5
|
||||
),
|
||||
;
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
override fun getMeasureUnit(): MeasureUnit? {
|
||||
return when (this) {
|
||||
PASCAL -> null
|
||||
HECTOPASCAL -> MeasureUnit.HECTOPASCAL
|
||||
KILOPASCAL -> null
|
||||
MILLIBAR -> MeasureUnit.MILLIBAR
|
||||
ATMOSPHERE -> if (supportsMeasureUnitAtmosphere()) MeasureUnit.ATMOSPHERE else null
|
||||
MILLIMETER_OF_MERCURY -> MeasureUnit.MILLIMETER_OF_MERCURY
|
||||
INCH_OF_MERCURY -> MeasureUnit.INCH_HG
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
override fun getPerMeasureUnit(): MeasureUnit? = null
|
||||
|
||||
/**
|
||||
* Override to:
|
||||
* - Use English units with Traditional Chinese
|
||||
*/
|
||||
override fun format(
|
||||
context: Context,
|
||||
value: Number,
|
||||
valueWidth: UnitWidth,
|
||||
unitWidth: UnitWidth,
|
||||
locale: Locale,
|
||||
showSign: Boolean,
|
||||
useNumberFormatter: Boolean,
|
||||
useMeasureFormat: Boolean,
|
||||
): String {
|
||||
// Translations missing for Esperanto in CLDR
|
||||
if (locale.language.equals("eo", ignoreCase = true)) {
|
||||
return formatWithAndroidTranslations(
|
||||
context = context,
|
||||
value = value,
|
||||
valueWidth = valueWidth,
|
||||
unitWidth = unitWidth,
|
||||
locale = locale,
|
||||
showSign = showSign,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useMeasureFormat
|
||||
)
|
||||
}
|
||||
|
||||
val correctedLocale = locale.let {
|
||||
/**
|
||||
* Taiwan guidelines: https://www.bsmi.gov.tw/wSite/public/Attachment/f1736149048776.pdf
|
||||
* Ongoing issue: https://unicode-org.atlassian.net/jira/software/c/projects/CLDR/issues/CLDR-10604
|
||||
*/
|
||||
if (it.language.equals("zh", ignoreCase = true) &&
|
||||
arrayOf("TW", "HK", "MO").any { c -> it.country.equals(c, ignoreCase = true) } &&
|
||||
unitWidth != UnitWidth.LONG
|
||||
) {
|
||||
Locale.Builder().setLanguage("en").setRegion("001").build()
|
||||
} else {
|
||||
it
|
||||
}
|
||||
}
|
||||
return super.format(
|
||||
context = context,
|
||||
value = value,
|
||||
valueWidth = valueWidth,
|
||||
unitWidth = unitWidth,
|
||||
locale = correctedLocale,
|
||||
showSign = showSign,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useNumberFormatter
|
||||
)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
const val NORMAL = 101325
|
||||
|
||||
/**
|
||||
* Copyright © 1991-Present Unicode, Inc.
|
||||
* License: Unicode License v3 https://www.unicode.org/license.txt
|
||||
* Source (simplified): https://github.com/unicode-org/cldr/blob/3f3967f3cbadc56bbb44a9aed20784e82ac64c67/common/supplemental/units.xml#L546-L551
|
||||
*
|
||||
* Breezy updates:
|
||||
* - Canada uses kPa
|
||||
*/
|
||||
fun getDefaultUnit(
|
||||
locale: Locale = Locale.getDefault(),
|
||||
) = when (locale.country) {
|
||||
"BR", "EG", "GB", "IL", "TH" -> MILLIBAR
|
||||
"MX", "RU" -> MILLIMETER_OF_MERCURY
|
||||
"US" -> INCH_OF_MERCURY
|
||||
"CA" -> KILOPASCAL
|
||||
else -> HECTOPASCAL
|
||||
}
|
||||
|
||||
fun getUnit(id: String): PressureUnit? {
|
||||
return entries.firstOrNull { it.id == id }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Converts the given time pressure [value] expressed in the specified [sourceUnit] into the specified [targetUnit]. */
|
||||
internal fun convertPressureUnit(
|
||||
value: Double,
|
||||
sourceUnit: PressureUnit,
|
||||
targetUnit: PressureUnit,
|
||||
): Double {
|
||||
return if (sourceUnit == PressureUnit.PASCAL) {
|
||||
targetUnit.convertFromReference(value)
|
||||
} else if (targetUnit == PressureUnit.PASCAL) {
|
||||
sourceUnit.convertToReference(value)
|
||||
} else {
|
||||
targetUnit.convertFromReference(sourceUnit.convertToReference(value))
|
||||
}
|
||||
}
|
||||
194
weather-unit/src/main/java/org/breezyweather/unit/ratio/Ratio.kt
Normal file
194
weather-unit/src/main/java/org/breezyweather/unit/ratio/Ratio.kt
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
package org.breezyweather.unit.ratio
|
||||
|
||||
import org.breezyweather.unit.WeatherValue
|
||||
import org.breezyweather.unit.formatting.UnitDecimals.Companion.formatToExactDecimals
|
||||
import org.breezyweather.unit.ratio.Ratio.Companion.fraction
|
||||
import org.breezyweather.unit.ratio.Ratio.Companion.percent
|
||||
import org.breezyweather.unit.ratio.Ratio.Companion.permille
|
||||
import kotlin.math.roundToLong
|
||||
|
||||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Represents the ratio.
|
||||
*
|
||||
* To construct a ratio, use either the extension function [toRatio],
|
||||
* or the extension properties [permille], [percent] and [fraction],
|
||||
* available on [Int], [Long], and [Double] numeric types.
|
||||
*
|
||||
* To get the value of this ratio expressed in a particular [ratio unit][RatioUnit]
|
||||
* use the functions [toInt], [toLong], and [toDouble]
|
||||
* or the properties [inPermille], [inPercent] and [inFraction].
|
||||
*/
|
||||
@JvmInline
|
||||
value class Ratio internal constructor(
|
||||
private val rawValue: Long,
|
||||
) : Comparable<Ratio>, WeatherValue<RatioUnit> {
|
||||
val value: Long get() = rawValue
|
||||
private val storageUnit get() = RatioUnit.PERMILLE
|
||||
|
||||
companion object {
|
||||
/** Returns a [Ratio] equal to this [Int] number of permille. */
|
||||
inline val Int.permille: Ratio get() = toRatio(RatioUnit.PERMILLE)
|
||||
|
||||
/** Returns a [Ratio] equal to this [Long] number of permille. */
|
||||
inline val Long.permille: Ratio get() = toRatio(RatioUnit.PERMILLE)
|
||||
|
||||
/** Returns a [Ratio] equal to this [Double] number of permille. */
|
||||
inline val Double.permille: Ratio get() = toRatio(RatioUnit.PERMILLE)
|
||||
|
||||
/** Returns a [Ratio] equal to this [Int] number of percent. */
|
||||
inline val Int.percent: Ratio get() = toRatio(RatioUnit.PERCENT)
|
||||
|
||||
/** Returns a [Ratio] equal to this [Long] number of percent. */
|
||||
inline val Long.percent: Ratio get() = toRatio(RatioUnit.PERCENT)
|
||||
|
||||
/** Returns a [Ratio] equal to this [Double] number of percent. */
|
||||
inline val Double.percent: Ratio get() = toRatio(RatioUnit.PERCENT)
|
||||
|
||||
/** Returns a [Ratio] equal to this [Int] number of fraction. */
|
||||
inline val Int.fraction: Ratio get() = toRatio(RatioUnit.FRACTION)
|
||||
|
||||
/** Returns a [Ratio] equal to this [Long] number of fraction. */
|
||||
inline val Long.fraction: Ratio get() = toRatio(RatioUnit.FRACTION)
|
||||
|
||||
/** Returns a [Ratio] equal to this [Double] number of percent. */
|
||||
inline val Double.fraction: Ratio get() = toRatio(RatioUnit.FRACTION)
|
||||
|
||||
/**
|
||||
* Parses a string that represents a ratio and returns the parsed [Ratio] value.
|
||||
*
|
||||
* The following format is accepted:
|
||||
*
|
||||
* - The format of string returned by the default [Ratio.toString] and `toString` in a specific unit,
|
||||
* e.g. `30percent` or `542permille`.
|
||||
*
|
||||
* @throws IllegalArgumentException if the string doesn't represent a ratio in any of the supported formats.
|
||||
*/
|
||||
fun parse(value: String): Ratio = try {
|
||||
parseRatio(value)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
throw IllegalArgumentException("Invalid ratio string format: '$value'.", e)
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a string that represents a ratio and returns the parsed [Ratio] value,
|
||||
* or `null` if the string doesn't represent a ratio in any of the supported formats.
|
||||
*
|
||||
* The following formats is accepted:
|
||||
*
|
||||
* - The format of string returned by the default [Ratio.toString] and `toString` in a specific unit,
|
||||
* e.g. `30percent` or `542permille`.
|
||||
*/
|
||||
fun parseOrNull(value: String): Ratio? = try {
|
||||
parseRatio(value)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
override fun compareTo(other: Ratio): Int {
|
||||
return this.rawValue.compareTo(other.rawValue)
|
||||
}
|
||||
|
||||
// conversion to units
|
||||
|
||||
/**
|
||||
* Returns the value of this ratio expressed as a [Double] number of the specified [unit].
|
||||
*
|
||||
* The operation may involve rounding when the result cannot be represented exactly with a [Double] number.
|
||||
*/
|
||||
override fun toDouble(unit: RatioUnit): Double {
|
||||
return convertRatioUnit(value.toDouble(), storageUnit, unit)
|
||||
}
|
||||
|
||||
/** The value of this ratio expressed as a [Double] number of permille. */
|
||||
val inPermille: Double
|
||||
get() = toDouble(RatioUnit.PERMILLE)
|
||||
|
||||
/** The value of this ratio expressed as a [Double] number of percent. */
|
||||
val inPercent: Double
|
||||
get() = toDouble(RatioUnit.PERCENT)
|
||||
|
||||
/** The value of this ratio expressed as a [Double] number of fraction. */
|
||||
val inFraction: Double
|
||||
get() = toDouble(RatioUnit.FRACTION)
|
||||
|
||||
/**
|
||||
* Returns a string representation of this ratio value
|
||||
*/
|
||||
override fun toString(): String {
|
||||
return toString(storageUnit)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of this ratio value expressed in the given [unit]
|
||||
* and formatted with the specified [decimals] number of digits after decimal point.
|
||||
*
|
||||
* @param decimals the number of digits after decimal point to show. The value must be non-negative.
|
||||
* No more than [unit.decimals.max] decimals will be shown, even if a larger number is requested.
|
||||
*
|
||||
* @return the value of ratio in the specified [unit] followed by that unit abbreviated name:
|
||||
* `fraction`, `percent`, `permille`.
|
||||
*
|
||||
* @throws IllegalArgumentException if [decimals] is less than zero.
|
||||
*/
|
||||
fun toString(unit: RatioUnit, decimals: Int = unit.decimals.short): String {
|
||||
require(decimals >= 0) { "decimals must be not negative, but was $decimals" }
|
||||
return formatToExactDecimals(toDouble(unit), decimals.coerceAtMost(unit.decimals.long)) + unit.id
|
||||
}
|
||||
|
||||
/**
|
||||
* Return null if the value is not between the provided range, otherwise this value
|
||||
*/
|
||||
fun toValidRangeOrNull(range: IntRange = 0..1000): Ratio? {
|
||||
return takeIf { rawValue in range }
|
||||
}
|
||||
}
|
||||
|
||||
// constructing from number of units
|
||||
// extension functions
|
||||
|
||||
/** Returns a [Ratio] equal to this [Int] number of the specified [unit]. */
|
||||
fun Int.toRatio(unit: RatioUnit): Ratio {
|
||||
return toLong().toRatio(unit)
|
||||
}
|
||||
|
||||
/** Returns a [Ratio] equal to this [Long] number of the specified [unit]. */
|
||||
fun Long.toRatio(unit: RatioUnit): Ratio {
|
||||
return ratioOf(convertRatioUnit(this.toDouble(), unit, RatioUnit.PERMILLE).toLong())
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [Ratio] equal to this [Double] number of the specified [unit].
|
||||
*
|
||||
* @throws IllegalArgumentException if this `Double` value is `NaN`.
|
||||
*/
|
||||
fun Double.toRatio(unit: RatioUnit): Ratio {
|
||||
val valueInPermille = convertRatioUnit(this, unit, RatioUnit.PERMILLE)
|
||||
require(!valueInPermille.isNaN()) { "Ratio value cannot be NaN." }
|
||||
return ratioOf(valueInPermille.roundToLong())
|
||||
}
|
||||
|
||||
private fun parseRatio(value: String): Ratio {
|
||||
var length = value.length
|
||||
if (length == 0) throw IllegalArgumentException("The string is empty")
|
||||
|
||||
TODO()
|
||||
}
|
||||
|
||||
private fun ratioOf(normalPermille: Long) = Ratio(normalPermille)
|
||||
|
|
@ -0,0 +1,168 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.ratio
|
||||
|
||||
import android.content.Context
|
||||
import android.icu.text.NumberFormat
|
||||
import android.icu.util.MeasureUnit
|
||||
import android.os.Build
|
||||
import androidx.annotation.RequiresApi
|
||||
import org.breezyweather.unit.R
|
||||
import org.breezyweather.unit.WeatherUnit
|
||||
import org.breezyweather.unit.formatting.UnitDecimals
|
||||
import org.breezyweather.unit.formatting.UnitTranslation
|
||||
import org.breezyweather.unit.formatting.UnitWidth
|
||||
import org.breezyweather.unit.formatting.format
|
||||
import org.breezyweather.unit.formatting.formatWithNumberFormatter
|
||||
import org.breezyweather.unit.supportsMeasureUnitPercent
|
||||
import org.breezyweather.unit.supportsMeasureUnitPermille
|
||||
import org.breezyweather.unit.supportsNumberFormat
|
||||
import org.breezyweather.unit.supportsNumberFormatter
|
||||
import java.util.Locale
|
||||
|
||||
enum class RatioUnit(
|
||||
override val id: String,
|
||||
override val displayName: UnitTranslation,
|
||||
override val nominative: UnitTranslation,
|
||||
override val per: UnitTranslation? = null,
|
||||
val convertFromReference: (Double) -> Double,
|
||||
val convertToReference: (Double) -> Double,
|
||||
override val decimals: UnitDecimals,
|
||||
val chartStep: Double,
|
||||
) : WeatherUnit {
|
||||
|
||||
PERMILLE(
|
||||
id = "permille",
|
||||
displayName = UnitTranslation(R.string.ratio_permille_display_name_short),
|
||||
nominative = UnitTranslation(R.string.ratio_permille_nominative_short),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit },
|
||||
decimals = UnitDecimals(0),
|
||||
chartStep = 200.0
|
||||
),
|
||||
PERCENT(
|
||||
id = "percent",
|
||||
displayName = UnitTranslation(R.string.ratio_percent_display_name_short),
|
||||
nominative = UnitTranslation(R.string.ratio_percent_nominative_short),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.div(10.0) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.times(10.0) },
|
||||
decimals = UnitDecimals(narrow = 0, short = 1, long = 1),
|
||||
chartStep = 20.0
|
||||
),
|
||||
FRACTION(
|
||||
id = "fraction",
|
||||
displayName = UnitTranslation(R.string.ratio_fraction_display_name_short),
|
||||
nominative = UnitTranslation(R.string.ratio_fraction_nominative_short),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.div(1000.0) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.times(1000.0) },
|
||||
decimals = UnitDecimals(narrow = 1, short = 2, long = 3),
|
||||
chartStep = 0.2
|
||||
),
|
||||
;
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
override fun getMeasureUnit(): MeasureUnit? {
|
||||
return when (this) {
|
||||
PERMILLE -> if (supportsMeasureUnitPermille()) MeasureUnit.PERMILLE else null
|
||||
PERCENT -> if (supportsMeasureUnitPercent()) MeasureUnit.PERCENT else null
|
||||
FRACTION -> null
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
override fun getPerMeasureUnit(): MeasureUnit? = null
|
||||
|
||||
/**
|
||||
* @param useMeasureFormat ignored, never supported
|
||||
*/
|
||||
override fun format(
|
||||
context: Context,
|
||||
value: Number,
|
||||
valueWidth: UnitWidth,
|
||||
unitWidth: UnitWidth,
|
||||
locale: Locale,
|
||||
showSign: Boolean,
|
||||
useNumberFormatter: Boolean,
|
||||
useMeasureFormat: Boolean,
|
||||
): String {
|
||||
if (this == FRACTION) {
|
||||
return value.format(
|
||||
decimals = getPrecision(valueWidth),
|
||||
locale = locale,
|
||||
showSign = showSign,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useNumberFormat = useMeasureFormat
|
||||
)
|
||||
}
|
||||
|
||||
if (supportsNumberFormatter() && useNumberFormatter) {
|
||||
return getMeasureUnit()!!.formatWithNumberFormatter(
|
||||
locale = locale,
|
||||
value = value,
|
||||
perUnit = null,
|
||||
precision = getPrecision(valueWidth),
|
||||
numberFormatterWidth = unitWidth.numberFormatterWidth!!,
|
||||
showSign = showSign
|
||||
)
|
||||
}
|
||||
|
||||
if (this == PERCENT && !showSign) {
|
||||
return if (supportsNumberFormat()) {
|
||||
NumberFormat.getPercentInstance(locale)
|
||||
.apply { maximumFractionDigits = getPrecision(valueWidth) }
|
||||
.format(if (value.toDouble() > 0) value.toDouble().div(100.0) else 0)
|
||||
} else {
|
||||
java.text.NumberFormat.getPercentInstance(locale)
|
||||
.apply { maximumFractionDigits = getPrecision(valueWidth) }
|
||||
.format(if (value.toDouble() > 0) value.toDouble().div(100.0) else 0)
|
||||
}
|
||||
}
|
||||
|
||||
return formatWithAndroidTranslations(
|
||||
context = context,
|
||||
value = value,
|
||||
valueWidth = valueWidth,
|
||||
unitWidth = unitWidth,
|
||||
locale = locale,
|
||||
showSign = showSign,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useMeasureFormat
|
||||
)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
fun getUnit(id: String): RatioUnit? {
|
||||
return entries.firstOrNull { it.id == id }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Converts the given time ratio [value] expressed in the specified [sourceUnit] into the specified [targetUnit]. */
|
||||
internal fun convertRatioUnit(
|
||||
value: Double,
|
||||
sourceUnit: RatioUnit,
|
||||
targetUnit: RatioUnit,
|
||||
): Double {
|
||||
return if (sourceUnit == RatioUnit.PERMILLE) {
|
||||
targetUnit.convertFromReference(value)
|
||||
} else if (targetUnit == RatioUnit.PERMILLE) {
|
||||
sourceUnit.convertToReference(value)
|
||||
} else {
|
||||
targetUnit.convertFromReference(sourceUnit.convertToReference(value))
|
||||
}
|
||||
}
|
||||
247
weather-unit/src/main/java/org/breezyweather/unit/speed/Speed.kt
Normal file
247
weather-unit/src/main/java/org/breezyweather/unit/speed/Speed.kt
Normal file
|
|
@ -0,0 +1,247 @@
|
|||
package org.breezyweather.unit.speed
|
||||
|
||||
import org.breezyweather.unit.WeatherValue
|
||||
import org.breezyweather.unit.formatting.UnitDecimals.Companion.formatToExactDecimals
|
||||
import org.breezyweather.unit.speed.Speed.Companion.kilometersPerHour
|
||||
import org.breezyweather.unit.speed.Speed.Companion.metersPerSecond
|
||||
import org.breezyweather.unit.speed.Speed.Companion.milesPerHour
|
||||
import kotlin.math.roundToInt
|
||||
import kotlin.math.roundToLong
|
||||
|
||||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Represents the speed.
|
||||
*
|
||||
* To construct a speed, use either the extension function [toSpeed],
|
||||
* or the extension properties [metersPerSecond], [kilometersPerHour], [milesPerHour], and so on,
|
||||
* available on [Int], [Long], and [Double] numeric types.
|
||||
*
|
||||
* To get the value of this speed expressed in a particular [speed unit][SpeedUnit]
|
||||
* use the functions [toInt], [toLong], and [toDouble]
|
||||
* or the properties [inMetersPerSecond], [inKilometersPerHour], [inMilesPerHour], [inKnots], and so on.
|
||||
*/
|
||||
@JvmInline
|
||||
value class Speed internal constructor(
|
||||
private val rawValue: Long,
|
||||
) : Comparable<Speed>, WeatherValue<SpeedUnit> {
|
||||
val value: Long get() = rawValue
|
||||
private val storageUnit get() = SpeedUnit.CENTIMETER_PER_SECOND
|
||||
|
||||
companion object {
|
||||
/** Returns a [Speed] equal to this [Int] number of centimeters per second. */
|
||||
inline val Int.centimetersPerSecond: Speed get() = toSpeed(SpeedUnit.CENTIMETER_PER_SECOND)
|
||||
|
||||
/** Returns a [Speed] equal to this [Long] number of centimeters per second. */
|
||||
inline val Long.centimetersPerSecond: Speed get() = toSpeed(SpeedUnit.CENTIMETER_PER_SECOND)
|
||||
|
||||
/** Returns a [Speed] equal to this [Double] number of centimeters per second. */
|
||||
inline val Double.centimetersPerSecond: Speed get() = toSpeed(SpeedUnit.CENTIMETER_PER_SECOND)
|
||||
|
||||
/** Returns a [Speed] equal to this [Int] number of meters per second. */
|
||||
inline val Int.metersPerSecond: Speed get() = toSpeed(SpeedUnit.METER_PER_SECOND)
|
||||
|
||||
/** Returns a [Speed] equal to this [Long] number of meters per second. */
|
||||
inline val Long.metersPerSecond: Speed get() = toSpeed(SpeedUnit.METER_PER_SECOND)
|
||||
|
||||
/** Returns a [Speed] equal to this [Double] number of meters per second. */
|
||||
inline val Double.metersPerSecond: Speed get() = toSpeed(SpeedUnit.METER_PER_SECOND)
|
||||
|
||||
/** Returns a [Speed] equal to this [Int] number of kilometers per hour. */
|
||||
inline val Int.kilometersPerHour: Speed get() = toSpeed(SpeedUnit.KILOMETER_PER_HOUR)
|
||||
|
||||
/** Returns a [Speed] equal to this [Long] number of kilometers per hour. */
|
||||
inline val Long.kilometersPerHour: Speed get() = toSpeed(SpeedUnit.KILOMETER_PER_HOUR)
|
||||
|
||||
/** Returns a [Speed] equal to this [Double] number of kilometers per hour. */
|
||||
inline val Double.kilometersPerHour: Speed get() = toSpeed(SpeedUnit.KILOMETER_PER_HOUR)
|
||||
|
||||
/** Returns a [Speed] equal to this [Int] number of miles per hour. */
|
||||
inline val Int.milesPerHour: Speed get() = toSpeed(SpeedUnit.MILE_PER_HOUR)
|
||||
|
||||
/** Returns a [Speed] equal to this [Long] number of miles per hour. */
|
||||
inline val Long.milesPerHour: Speed get() = toSpeed(SpeedUnit.MILE_PER_HOUR)
|
||||
|
||||
/** Returns a [Speed] equal to this [Double] number of miles per hour. */
|
||||
inline val Double.milesPerHour: Speed get() = toSpeed(SpeedUnit.MILE_PER_HOUR)
|
||||
|
||||
/** Returns a [Speed] equal to this [Int] number of knots. */
|
||||
inline val Int.knots: Speed get() = toSpeed(SpeedUnit.KNOT)
|
||||
|
||||
/** Returns a [Speed] equal to this [Long] number of knots. */
|
||||
inline val Long.knots: Speed get() = toSpeed(SpeedUnit.KNOT)
|
||||
|
||||
/** Returns a [Speed] equal to this [Double] number of knots. */
|
||||
inline val Double.knots: Speed get() = toSpeed(SpeedUnit.KNOT)
|
||||
|
||||
/** Returns a [Speed] equal to this [Int] number of feet per second. */
|
||||
inline val Int.feetPerSecond: Speed get() = toSpeed(SpeedUnit.FOOT_PER_SECOND)
|
||||
|
||||
/** Returns a [Speed] equal to this [Long] number of feet per second. */
|
||||
inline val Long.feetPerSecond: Speed get() = toSpeed(SpeedUnit.FOOT_PER_SECOND)
|
||||
|
||||
/** Returns a [Speed] equal to this [Double] number of feet per second. */
|
||||
inline val Double.feetPerSecond: Speed get() = toSpeed(SpeedUnit.FOOT_PER_SECOND)
|
||||
|
||||
/** Returns a [Speed] equal to this [Int] number on the Beaufort scale. */
|
||||
inline val Int.beaufort: Speed get() = toSpeed(SpeedUnit.BEAUFORT_SCALE)
|
||||
|
||||
/** Returns a [Speed] equal to this [Long] number on the Beaufort scale. */
|
||||
inline val Long.beaufort: Speed get() = toSpeed(SpeedUnit.BEAUFORT_SCALE)
|
||||
|
||||
/** Returns a [Speed] equal to this [Double] number on the Beaufort scale. */
|
||||
inline val Double.beaufort: Speed get() = toSpeed(SpeedUnit.BEAUFORT_SCALE)
|
||||
|
||||
/**
|
||||
* Parses a string that represents a speed and returns the parsed [Speed] value.
|
||||
*
|
||||
* The following format is accepted:
|
||||
*
|
||||
* - The format of string returned by the default [Speed.toString] and `toString` in a specific unit,
|
||||
* e.g. `4.2mps` or `30.5kph`.
|
||||
*
|
||||
* @throws IllegalArgumentException if the string doesn't represent a speed in any of the supported formats.
|
||||
*/
|
||||
fun parse(value: String): Speed = try {
|
||||
parseSpeed(value)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
throw IllegalArgumentException("Invalid speed string format: '$value'.", e)
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a string that represents a speed and returns the parsed [Speed] value,
|
||||
* or `null` if the string doesn't represent a speed in any of the supported formats.
|
||||
*
|
||||
* The following formats is accepted:
|
||||
*
|
||||
* - The format of string returned by the default [Speed.toString] and `toString` in a specific unit,
|
||||
* e.g. `4.2mps` or `30.5kph`.
|
||||
*/
|
||||
fun parseOrNull(value: String): Speed? = try {
|
||||
parseSpeed(value)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
override fun compareTo(other: Speed): Int {
|
||||
return this.rawValue.compareTo(other.rawValue)
|
||||
}
|
||||
|
||||
// conversion to units
|
||||
|
||||
/**
|
||||
* Returns the value of this speed expressed as a [Double] number of the specified [unit].
|
||||
*
|
||||
* The operation may involve rounding when the result cannot be represented exactly with a [Double] number.
|
||||
*/
|
||||
override fun toDouble(unit: SpeedUnit): Double {
|
||||
return convertSpeedUnit(value.toDouble(), storageUnit, unit)
|
||||
}
|
||||
|
||||
/** The value of this speed expressed as a [Double] number of centimeters per second. */
|
||||
val inCentimetersPerSecond: Double
|
||||
get() = toDouble(SpeedUnit.CENTIMETER_PER_SECOND)
|
||||
|
||||
/** The value of this speed expressed as a [Double] number of meters per second. */
|
||||
val inMetersPerSecond: Double
|
||||
get() = toDouble(SpeedUnit.METER_PER_SECOND)
|
||||
|
||||
/** The value of this speed expressed as a [Double] number of kilometers per hour. */
|
||||
val inKilometersPerHour: Double
|
||||
get() = toDouble(SpeedUnit.KILOMETER_PER_HOUR)
|
||||
|
||||
/** The value of this speed expressed as a [Double] number of miles per hour. */
|
||||
val inMilesPerHour: Double
|
||||
get() = toDouble(SpeedUnit.MILE_PER_HOUR)
|
||||
|
||||
/** The value of this speed expressed as a [Double] number of knots. */
|
||||
val inKnots: Double
|
||||
get() = toDouble(SpeedUnit.KNOT)
|
||||
|
||||
/** The value of this speed expressed as a [Double] number of feet per second. */
|
||||
val inFeetPerSecond: Double
|
||||
get() = toDouble(SpeedUnit.FOOT_PER_SECOND)
|
||||
|
||||
/** The value of this speed expressed as a [Int] number on the Beaufort scale. */
|
||||
val inBeaufort: Int
|
||||
get() = toDouble(SpeedUnit.BEAUFORT_SCALE).roundToInt()
|
||||
|
||||
/**
|
||||
* Returns a string representation of this speed value
|
||||
*/
|
||||
override fun toString(): String {
|
||||
return toString(storageUnit)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of this speed value expressed in the given [unit]
|
||||
* and formatted with the specified [decimals] number of digits after decimal point.
|
||||
*
|
||||
* @param decimals the number of digits after decimal point to show. The value must be non-negative.
|
||||
* No more than [unit.decimals.max] decimals will be shown, even if a larger number is requested.
|
||||
*
|
||||
* @return the value of speed in the specified [unit] followed by that unit abbreviated name:
|
||||
* `cmps`, `mps`, `kph`, `mph`, `kn`, `ftps`, `bf`.
|
||||
*
|
||||
* @throws IllegalArgumentException if [decimals] is less than zero.
|
||||
*/
|
||||
fun toString(unit: SpeedUnit, decimals: Int = unit.decimals.short): String {
|
||||
require(decimals >= 0) { "decimals must be not negative, but was $decimals" }
|
||||
return formatToExactDecimals(toDouble(unit), decimals.coerceAtMost(unit.decimals.long)) + unit.id
|
||||
}
|
||||
|
||||
/**
|
||||
* Return null if the value is not within 0 and 150 m/s, otherwise this value
|
||||
*/
|
||||
fun toValidOrNull(): Speed? {
|
||||
return takeIf { rawValue in 0..15000 }
|
||||
}
|
||||
}
|
||||
|
||||
// constructing from number of units
|
||||
// extension functions
|
||||
|
||||
/** Returns a [Speed] equal to this [Int] number of the specified [unit]. */
|
||||
fun Int.toSpeed(unit: SpeedUnit): Speed {
|
||||
return toLong().toSpeed(unit)
|
||||
}
|
||||
|
||||
/** Returns a [Speed] equal to this [Long] number of the specified [unit]. */
|
||||
fun Long.toSpeed(unit: SpeedUnit): Speed {
|
||||
return speedOf(convertSpeedUnit(this.toDouble(), unit, SpeedUnit.CENTIMETER_PER_SECOND).toLong())
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [Speed] equal to this [Double] number of the specified [unit].
|
||||
*
|
||||
* @throws IllegalArgumentException if this `Double` value is `NaN`.
|
||||
*/
|
||||
fun Double.toSpeed(unit: SpeedUnit): Speed {
|
||||
val valueInCmps = convertSpeedUnit(this, unit, SpeedUnit.CENTIMETER_PER_SECOND)
|
||||
require(!valueInCmps.isNaN()) { "Speed value cannot be NaN." }
|
||||
return speedOf(valueInCmps.roundToLong())
|
||||
}
|
||||
|
||||
private fun parseSpeed(value: String): Speed {
|
||||
var length = value.length
|
||||
if (length == 0) throw IllegalArgumentException("The string is empty")
|
||||
|
||||
TODO()
|
||||
}
|
||||
|
||||
private fun speedOf(normalCentimetersPerSecond: Long) = Speed(normalCentimetersPerSecond)
|
||||
|
|
@ -0,0 +1,363 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.speed
|
||||
|
||||
import android.content.Context
|
||||
import android.icu.util.MeasureUnit
|
||||
import android.os.Build
|
||||
import androidx.annotation.RequiresApi
|
||||
import org.breezyweather.unit.R
|
||||
import org.breezyweather.unit.WeatherUnit
|
||||
import org.breezyweather.unit.formatting.UnitDecimals
|
||||
import org.breezyweather.unit.formatting.UnitTranslation
|
||||
import org.breezyweather.unit.formatting.UnitWidth
|
||||
import org.breezyweather.unit.supportsMeasureUnitBeaufort
|
||||
import org.breezyweather.unit.supportsMeasureUnitKnot
|
||||
import java.util.Locale
|
||||
|
||||
enum class SpeedUnit(
|
||||
override val id: String,
|
||||
override val displayName: UnitTranslation,
|
||||
override val nominative: UnitTranslation,
|
||||
override val per: UnitTranslation? = null,
|
||||
val convertFromReference: (Double) -> Double,
|
||||
val convertToReference: (Double) -> Double,
|
||||
override val decimals: UnitDecimals,
|
||||
val chartStep: Double,
|
||||
) : WeatherUnit {
|
||||
|
||||
CENTIMETER_PER_SECOND(
|
||||
id = "cmps",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.length_cm_display_name_short,
|
||||
long = R.string.length_cm_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.length_cm_nominative_short,
|
||||
long = R.string.length_cm_nominative_long
|
||||
),
|
||||
per = UnitTranslation(
|
||||
short = R.string.duration_sec_per_short,
|
||||
long = R.string.duration_sec_per_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit },
|
||||
decimals = UnitDecimals(0),
|
||||
chartStep = 50.0
|
||||
),
|
||||
METER_PER_SECOND(
|
||||
id = "mps",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.length_m_display_name_short,
|
||||
long = R.string.length_m_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.length_m_nominative_short,
|
||||
long = R.string.length_m_nominative_long
|
||||
),
|
||||
per = UnitTranslation(
|
||||
short = R.string.duration_sec_per_short,
|
||||
long = R.string.duration_sec_per_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.div(100.0) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.times(100.0) },
|
||||
decimals = UnitDecimals(narrow = 0, short = 1, long = 2),
|
||||
chartStep = 0.5
|
||||
),
|
||||
KILOMETER_PER_HOUR(
|
||||
id = "kph",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.length_km_display_name_short,
|
||||
long = R.string.length_km_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.length_km_nominative_short,
|
||||
long = R.string.length_km_nominative_long
|
||||
),
|
||||
per = UnitTranslation(
|
||||
short = R.string.duration_hr_per_short,
|
||||
long = R.string.duration_hr_per_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.times(0.036) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.div(0.036) },
|
||||
decimals = UnitDecimals(narrow = 0, short = 1, long = 2),
|
||||
chartStep = 15.0
|
||||
),
|
||||
MILE_PER_HOUR(
|
||||
id = "mph",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.length_mi_display_name_short,
|
||||
long = R.string.length_mi_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.length_mi_nominative_short,
|
||||
long = R.string.length_mi_nominative_long
|
||||
),
|
||||
per = UnitTranslation(
|
||||
short = R.string.duration_hr_per_short,
|
||||
long = R.string.duration_hr_per_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.div(44.704) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.times(44.704) },
|
||||
decimals = UnitDecimals(narrow = 0, short = 1, long = 2),
|
||||
chartStep = 10.0
|
||||
),
|
||||
KNOT(
|
||||
id = "kn",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.speed_kn_display_name_short,
|
||||
long = R.string.speed_kn_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.speed_kn_nominative_short,
|
||||
long = R.string.speed_kn_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.times(0.036).div(1.852) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.times(1.852).div(0.036) },
|
||||
decimals = UnitDecimals(narrow = 0, short = 1, long = 2),
|
||||
chartStep = 10.0
|
||||
),
|
||||
FOOT_PER_SECOND(
|
||||
id = "ftps",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.length_ft_display_name_short,
|
||||
long = R.string.length_ft_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.length_ft_nominative_short,
|
||||
long = R.string.length_ft_nominative_long
|
||||
),
|
||||
per = UnitTranslation(
|
||||
short = R.string.duration_sec_per_short,
|
||||
long = R.string.duration_sec_per_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.div(30.48) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.times(30.48) },
|
||||
decimals = UnitDecimals(narrow = 0, short = 1, long = 2),
|
||||
chartStep = 15.0
|
||||
),
|
||||
|
||||
/**
|
||||
* Not an unit, but a scale, so precision will be lost in the process!
|
||||
*/
|
||||
BEAUFORT_SCALE(
|
||||
id = "bf",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.speed_bf_display_name_short,
|
||||
long = R.string.speed_bf_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
short = R.string.speed_bf_nominative_short,
|
||||
long = R.string.speed_bf_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit ->
|
||||
when (valueInDefaultUnit.toLong()) {
|
||||
in 0L..<WIND_SPEED_1 -> 0.0
|
||||
in WIND_SPEED_1..<WIND_SPEED_2 -> 1.0
|
||||
in WIND_SPEED_2..<WIND_SPEED_3 -> 2.0
|
||||
in WIND_SPEED_3..<WIND_SPEED_4 -> 3.0
|
||||
in WIND_SPEED_4..<WIND_SPEED_5 -> 4.0
|
||||
in WIND_SPEED_5..<WIND_SPEED_6 -> 5.0
|
||||
in WIND_SPEED_6..<WIND_SPEED_7 -> 6.0
|
||||
in WIND_SPEED_7..<WIND_SPEED_8 -> 7.0
|
||||
in WIND_SPEED_8..<WIND_SPEED_9 -> 8.0
|
||||
in WIND_SPEED_9..<WIND_SPEED_10 -> 9.0
|
||||
in WIND_SPEED_10..<WIND_SPEED_11 -> 10.0
|
||||
in WIND_SPEED_11..<WIND_SPEED_12 -> 11.0
|
||||
in WIND_SPEED_12..Long.MAX_VALUE -> 12.0
|
||||
else -> 0.0
|
||||
}
|
||||
},
|
||||
convertToReference = { valueInThisUnit ->
|
||||
when (valueInThisUnit) {
|
||||
in 0.0..<1.0 -> 0
|
||||
in 1.0..<2.0 -> WIND_SPEED_1
|
||||
in 2.0..<3.0 -> WIND_SPEED_2
|
||||
in 3.0..<4.0 -> WIND_SPEED_3
|
||||
in 4.0..<5.0 -> WIND_SPEED_4
|
||||
in 5.0..<6.0 -> WIND_SPEED_5
|
||||
in 6.0..<7.0 -> WIND_SPEED_6
|
||||
in 7.0..<8.0 -> WIND_SPEED_7
|
||||
in 8.0..<9.0 -> WIND_SPEED_8
|
||||
in 9.0..<10.0 -> WIND_SPEED_9
|
||||
in 10.0..<11.0 -> WIND_SPEED_10
|
||||
in 11.0..<12.0 -> WIND_SPEED_11
|
||||
in 12.0..Double.MAX_VALUE -> WIND_SPEED_12
|
||||
else -> 0
|
||||
}.toDouble()
|
||||
},
|
||||
decimals = UnitDecimals(0),
|
||||
chartStep = 2.0
|
||||
),
|
||||
;
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
override fun getMeasureUnit(): MeasureUnit? {
|
||||
return when (this) {
|
||||
CENTIMETER_PER_SECOND -> MeasureUnit.CENTIMETER
|
||||
METER_PER_SECOND -> MeasureUnit.METER_PER_SECOND
|
||||
KILOMETER_PER_HOUR -> MeasureUnit.KILOMETER_PER_HOUR
|
||||
MILE_PER_HOUR -> MeasureUnit.MILE_PER_HOUR
|
||||
KNOT -> if (supportsMeasureUnitKnot()) MeasureUnit.KNOT else null
|
||||
FOOT_PER_SECOND -> MeasureUnit.FOOT
|
||||
BEAUFORT_SCALE -> if (supportsMeasureUnitBeaufort()) MeasureUnit.BEAUFORT else null
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
override fun getPerMeasureUnit(): MeasureUnit? {
|
||||
return when (this) {
|
||||
CENTIMETER_PER_SECOND -> MeasureUnit.SECOND
|
||||
FOOT_PER_SECOND -> MeasureUnit.SECOND
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Override to:
|
||||
* - Never use ICU with Beaufort scale for Japanese and Traditional Chinese
|
||||
* - Use fr_CA ICU unit instead of fr for French
|
||||
* - Use English units with Traditional Chinese
|
||||
*/
|
||||
override fun format(
|
||||
context: Context,
|
||||
value: Number,
|
||||
valueWidth: UnitWidth,
|
||||
unitWidth: UnitWidth,
|
||||
locale: Locale,
|
||||
showSign: Boolean,
|
||||
useNumberFormatter: Boolean,
|
||||
useMeasureFormat: Boolean,
|
||||
): String {
|
||||
// Translations missing in CLDR for some languages
|
||||
// Beaufort:
|
||||
// - eo, es, eu, ga: missing
|
||||
// - ja: use 風力7 instead of “B 7”
|
||||
// - Simplified Chinese: use 7級 rather than “B 7”
|
||||
// - Traditional Chinese: use 7級 rather than the verbose “蒲福風級 7 級”
|
||||
if ((this == KNOT && locale.language.equals("eo", ignoreCase = true)) ||
|
||||
(
|
||||
this == BEAUFORT_SCALE &&
|
||||
arrayOf("eo", "es", "eu", "ga", "ja", "zh").any {
|
||||
locale.language.equals(it, ignoreCase = true)
|
||||
}
|
||||
)
|
||||
) {
|
||||
return formatWithAndroidTranslations(
|
||||
context = context,
|
||||
value = value,
|
||||
valueWidth = valueWidth,
|
||||
unitWidth = unitWidth,
|
||||
locale = locale,
|
||||
showSign = showSign,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useMeasureFormat
|
||||
)
|
||||
}
|
||||
|
||||
val correctedLocale = if (supportsMeasureUnitBeaufort() && this == BEAUFORT_SCALE) {
|
||||
if (locale.language.equals("fr", ignoreCase = true)) {
|
||||
// fr uses the incorrect unit (it should be "%s Bf" instead of "%s Bft"), replace with fr_CA
|
||||
Locale.Builder().setLanguage("fr").setRegion("CA").build()
|
||||
} else if (locale.language.equals("de", ignoreCase = true)) {
|
||||
// de uses the incorrect unit (it should be "%s Bft" instead of "B %s"), replace with de_CH
|
||||
Locale.Builder().setLanguage("de").setRegion("CH").build()
|
||||
} else {
|
||||
locale
|
||||
}
|
||||
} else {
|
||||
/**
|
||||
* Taiwan guidelines: https://www.bsmi.gov.tw/wSite/public/Attachment/f1736149048776.pdf
|
||||
* Ongoing issue: https://unicode-org.atlassian.net/jira/software/c/projects/CLDR/issues/CLDR-10604
|
||||
*/
|
||||
if (locale.language.equals("zh", ignoreCase = true) &&
|
||||
arrayOf("TW", "HK", "MO").any { c -> locale.country.equals(c, ignoreCase = true) } &&
|
||||
unitWidth != UnitWidth.LONG
|
||||
) {
|
||||
Locale.Builder().setLanguage("en").setRegion("001").build()
|
||||
} else {
|
||||
locale
|
||||
}
|
||||
}
|
||||
return super.format(
|
||||
context = context,
|
||||
value = value,
|
||||
valueWidth = valueWidth,
|
||||
unitWidth = unitWidth,
|
||||
locale = correctedLocale,
|
||||
showSign = showSign,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useNumberFormatter
|
||||
)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
// In centimeters per second
|
||||
const val WIND_SPEED_1 = 30
|
||||
const val WIND_SPEED_2 = 160
|
||||
const val WIND_SPEED_3 = 340
|
||||
const val WIND_SPEED_4 = 550
|
||||
const val WIND_SPEED_5 = 800
|
||||
const val WIND_SPEED_6 = 1080
|
||||
const val WIND_SPEED_7 = 1390
|
||||
const val WIND_SPEED_8 = 1720
|
||||
const val WIND_SPEED_9 = 2080
|
||||
const val WIND_SPEED_10 = 2450
|
||||
const val WIND_SPEED_11 = 2850
|
||||
const val WIND_SPEED_12 = 3270
|
||||
|
||||
// Extended scale, not official but may be used in the daily chart in the future, just in case
|
||||
const val WIND_SPEED_13 = 3700
|
||||
const val WIND_SPEED_14 = 4150
|
||||
const val WIND_SPEED_15 = 4620
|
||||
const val WIND_SPEED_16 = 5100
|
||||
const val WIND_SPEED_17 = 5610
|
||||
|
||||
/**
|
||||
* Copyright © 1991-Present Unicode, Inc.
|
||||
* License: Unicode License v3 https://www.unicode.org/license.txt
|
||||
* Source: https://github.com/unicode-org/cldr/blob/3f3967f3cbadc56bbb44a9aed20784e82ac64c67/common/supplemental/units.xml#L570-L574
|
||||
*/
|
||||
fun getDefaultUnit(
|
||||
locale: Locale = Locale.getDefault(),
|
||||
) = when (locale.country) {
|
||||
"CN", "DK", "FI", "JP", "KR", "NO", "NL", "PL", "RU", "SE" -> METER_PER_SECOND
|
||||
"GB", "US" -> MILE_PER_HOUR
|
||||
else -> KILOMETER_PER_HOUR
|
||||
}
|
||||
|
||||
fun getUnit(id: String): SpeedUnit? {
|
||||
return entries.firstOrNull { it.id == id }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Converts the given time speed [value] expressed in the specified [sourceUnit] into the specified [targetUnit]. */
|
||||
internal fun convertSpeedUnit(
|
||||
value: Double,
|
||||
sourceUnit: SpeedUnit,
|
||||
targetUnit: SpeedUnit,
|
||||
): Double {
|
||||
return if (sourceUnit == SpeedUnit.CENTIMETER_PER_SECOND) {
|
||||
targetUnit.convertFromReference(value)
|
||||
} else if (targetUnit == SpeedUnit.CENTIMETER_PER_SECOND) {
|
||||
sourceUnit.convertToReference(value)
|
||||
} else {
|
||||
targetUnit.convertFromReference(sourceUnit.convertToReference(value))
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,214 @@
|
|||
package org.breezyweather.unit.temperature
|
||||
|
||||
import org.breezyweather.unit.WeatherValue
|
||||
import org.breezyweather.unit.formatting.UnitDecimals.Companion.formatToExactDecimals
|
||||
import kotlin.math.roundToLong
|
||||
|
||||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Represents the temperature.
|
||||
*
|
||||
* To construct a temperature, use either the extension function [toTemperature],
|
||||
* or the extension properties [pascals], [hectopascals], [millibars], and so on,
|
||||
* available on [Int], [Long], and [Double] numeric types.
|
||||
*
|
||||
* To get the value of this temperature expressed in a particular [temperature unit][TemperatureUnit]
|
||||
* use the functions [toInt], [toLong], and [toDouble]
|
||||
* or the properties [inPascals], [inHectopascals], [inMillibars], [inAtmospheres], and so on.
|
||||
*/
|
||||
@JvmInline
|
||||
value class Temperature internal constructor(
|
||||
private val rawValue: Long,
|
||||
) : Comparable<Temperature>, WeatherValue<TemperatureUnit> {
|
||||
val value: Long get() = rawValue
|
||||
private val storageUnit get() = TemperatureUnit.DECI_CELSIUS
|
||||
|
||||
companion object {
|
||||
/** Returns a [Temperature] equal to this [Int] number of decidegrees Celsius. */
|
||||
inline val Int.deciCelsius: Temperature get() = toTemperature(TemperatureUnit.DECI_CELSIUS)
|
||||
|
||||
/** Returns a [Temperature] equal to this [Long] number of decidegrees Celsius. */
|
||||
inline val Long.deciCelsius: Temperature get() = toTemperature(TemperatureUnit.DECI_CELSIUS)
|
||||
|
||||
/** Returns a [Temperature] equal to this [Double] number of decidegrees Celsius. */
|
||||
inline val Double.deciCelsius: Temperature get() = toTemperature(TemperatureUnit.DECI_CELSIUS)
|
||||
|
||||
/** Returns a [Temperature] equal to this [Int] number of degrees Celsius. */
|
||||
inline val Int.celsius: Temperature get() = toTemperature(TemperatureUnit.CELSIUS)
|
||||
|
||||
/** Returns a [Temperature] equal to this [Long] number of degrees Celsius. */
|
||||
inline val Long.celsius: Temperature get() = toTemperature(TemperatureUnit.CELSIUS)
|
||||
|
||||
/** Returns a [Temperature] equal to this [Double] number of degrees Celsius. */
|
||||
inline val Double.celsius: Temperature get() = toTemperature(TemperatureUnit.CELSIUS)
|
||||
|
||||
/** Returns a [Temperature] equal to this [Int] number of degrees Fahrenheit. */
|
||||
inline val Int.fahrenheit: Temperature get() = toTemperature(TemperatureUnit.FAHRENHEIT)
|
||||
|
||||
/** Returns a [Temperature] equal to this [Long] number of degrees Fahrenheit. */
|
||||
inline val Long.fahrenheit: Temperature get() = toTemperature(TemperatureUnit.FAHRENHEIT)
|
||||
|
||||
/** Returns a [Temperature] equal to this [Double] number of degrees Fahrenheit. */
|
||||
inline val Double.fahrenheit: Temperature get() = toTemperature(TemperatureUnit.FAHRENHEIT)
|
||||
|
||||
/** Returns a [Temperature] equal to this [Int] number of kelvins. */
|
||||
inline val Int.kelvin: Temperature get() = toTemperature(TemperatureUnit.KELVIN)
|
||||
|
||||
/** Returns a [Temperature] equal to this [Long] number of kelvins. */
|
||||
inline val Long.kelvin: Temperature get() = toTemperature(TemperatureUnit.KELVIN)
|
||||
|
||||
/** Returns a [Temperature] equal to this [Double] number of kelvins. */
|
||||
inline val Double.kelvin: Temperature get() = toTemperature(TemperatureUnit.KELVIN)
|
||||
|
||||
/**
|
||||
* Parses a string that represents a temperature and returns the parsed [Temperature] value.
|
||||
*
|
||||
* The following format is accepted:
|
||||
*
|
||||
* - The format of string returned by the default [Temperature.toString] and `toString` in a specific unit,
|
||||
* e.g. `32c` or `273.15k`.
|
||||
*
|
||||
* @throws IllegalArgumentException if the string doesn't represent a temperature in any of the supported formats.
|
||||
*/
|
||||
fun parse(value: String): Temperature = try {
|
||||
parseTemperature(value)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
throw IllegalArgumentException("Invalid temperature string format: '$value'.", e)
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a string that represents a temperature and returns the parsed [Temperature] value,
|
||||
* or `null` if the string doesn't represent a temperature in any of the supported formats.
|
||||
*
|
||||
* The following formats is accepted:
|
||||
*
|
||||
* - The format of string returned by the default [Temperature.toString] and `toString` in a specific unit,
|
||||
* e.g. `32c` or `273.15k`.
|
||||
*/
|
||||
fun parseOrNull(value: String): Temperature? = try {
|
||||
parseTemperature(value)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
override fun compareTo(other: Temperature): Int {
|
||||
return this.rawValue.compareTo(other.rawValue)
|
||||
}
|
||||
|
||||
// conversion to units
|
||||
|
||||
/**
|
||||
* Returns the value of this temperature expressed as a [Double] number of the specified [unit].
|
||||
*
|
||||
* The operation may involve rounding when the result cannot be represented exactly with a [Double] number.
|
||||
*/
|
||||
override fun toDouble(unit: TemperatureUnit): Double {
|
||||
return convertTemperatureUnit(value.toDouble(), storageUnit, unit)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of this temperature deviation expressed as a [Double] number of the specified [unit].
|
||||
* Concretely, this means that 1 °C will be converted to 1.8 °F and not as 33.8 °F
|
||||
*
|
||||
* The operation may involve rounding when the result cannot be represented exactly with a [Double] number.
|
||||
*/
|
||||
fun toDoubleDeviation(unit: TemperatureUnit): Double {
|
||||
return convertTemperatureUnitDeviation(value.toDouble(), storageUnit, unit)
|
||||
}
|
||||
|
||||
/** The value of this temperature expressed as a [Double] number of decidegrees Celsius. */
|
||||
val inDeciCelsius: Double
|
||||
get() = toDouble(TemperatureUnit.DECI_CELSIUS)
|
||||
|
||||
/** The value of this temperature expressed as a [Double] number of degrees Celsius. */
|
||||
val inCelsius: Double
|
||||
get() = toDouble(TemperatureUnit.CELSIUS)
|
||||
|
||||
/** The value of this temperature expressed as a [Double] number of degrees Fahrenheit. */
|
||||
val inFahrenheit: Double
|
||||
get() = toDouble(TemperatureUnit.FAHRENHEIT)
|
||||
|
||||
/** The value of this temperature expressed as a [Double] number of kelvins. */
|
||||
val inKelvins: Double
|
||||
get() = toDouble(TemperatureUnit.KELVIN)
|
||||
|
||||
/**
|
||||
* Returns a string representation of this temperature value
|
||||
*/
|
||||
override fun toString(): String {
|
||||
return toString(storageUnit)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of this temperature value expressed in the given [unit]
|
||||
* and formatted with the specified [decimals] number of digits after decimal point.
|
||||
*
|
||||
* @param decimals the number of digits after decimal point to show. The value must be non-negative.
|
||||
* No more than [unit.decimals.max] decimals will be shown, even if a larger number is requested.
|
||||
*
|
||||
* @return the value of temperature in the specified [unit] followed by that unit abbreviated name:
|
||||
* `dc`, `c`, `f`, `k`.
|
||||
*
|
||||
* @throws IllegalArgumentException if [decimals] is less than zero.
|
||||
*/
|
||||
fun toString(unit: TemperatureUnit, decimals: Int = unit.decimals.short): String {
|
||||
require(decimals >= 0) { "decimals must be not negative, but was $decimals" }
|
||||
return formatToExactDecimals(toDouble(unit), decimals.coerceAtMost(unit.decimals.long)) + unit.id
|
||||
}
|
||||
|
||||
/**
|
||||
* Return null if the value is not between -100 °C and 100 °C, otherwise this value
|
||||
*/
|
||||
fun toValidOrNull(): Temperature? {
|
||||
return takeIf { rawValue in -1000..1000 }
|
||||
}
|
||||
}
|
||||
|
||||
// constructing from number of units
|
||||
// extension functions
|
||||
|
||||
/** Returns a [Temperature] equal to this [Int] number of the specified [unit]. */
|
||||
fun Int.toTemperature(unit: TemperatureUnit): Temperature {
|
||||
return toLong().toTemperature(unit)
|
||||
}
|
||||
|
||||
/** Returns a [Temperature] equal to this [Long] number of the specified [unit]. */
|
||||
fun Long.toTemperature(unit: TemperatureUnit): Temperature {
|
||||
return temperatureOf(convertTemperatureUnit(this.toDouble(), unit, TemperatureUnit.DECI_CELSIUS).toLong())
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [Temperature] equal to this [Double] number of the specified [unit].
|
||||
*
|
||||
* @throws IllegalArgumentException if this `Double` value is `NaN`.
|
||||
*/
|
||||
fun Double.toTemperature(unit: TemperatureUnit): Temperature {
|
||||
val valueInDC = convertTemperatureUnit(this, unit, TemperatureUnit.DECI_CELSIUS)
|
||||
require(!valueInDC.isNaN()) { "Temperature value cannot be NaN." }
|
||||
return temperatureOf(valueInDC.roundToLong())
|
||||
}
|
||||
|
||||
private fun parseTemperature(value: String): Temperature {
|
||||
var length = value.length
|
||||
if (length == 0) throw IllegalArgumentException("The string is empty")
|
||||
|
||||
TODO()
|
||||
}
|
||||
|
||||
private fun temperatureOf(normalDeciCelsius: Long) = Temperature(normalDeciCelsius)
|
||||
|
|
@ -0,0 +1,250 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.temperature
|
||||
|
||||
import android.content.Context
|
||||
import android.icu.util.MeasureUnit
|
||||
import android.os.Build
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.core.text.util.LocalePreferences
|
||||
import org.breezyweather.unit.R
|
||||
import org.breezyweather.unit.WeatherUnit
|
||||
import org.breezyweather.unit.formatting.UnitDecimals
|
||||
import org.breezyweather.unit.formatting.UnitTranslation
|
||||
import org.breezyweather.unit.formatting.UnitWidth
|
||||
import java.util.Locale
|
||||
|
||||
enum class TemperatureUnit(
|
||||
override val id: String,
|
||||
override val displayName: UnitTranslation,
|
||||
override val nominative: UnitTranslation,
|
||||
override val per: UnitTranslation? = null,
|
||||
val convertFromReference: (Double) -> Double,
|
||||
val convertToReference: (Double) -> Double,
|
||||
val convertDeviationFromReference: (Double) -> Double,
|
||||
val convertDeviationToReference: (Double) -> Double,
|
||||
override val decimals: UnitDecimals,
|
||||
val chartStep: Double,
|
||||
) : WeatherUnit {
|
||||
|
||||
DECI_CELSIUS(
|
||||
id = "dc",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.temperature_dc_display_name_short,
|
||||
long = R.string.temperature_dc_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
narrow = R.string.temperature_dc_nominative_narrow,
|
||||
short = R.string.temperature_dc_nominative_short,
|
||||
long = R.string.temperature_dc_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit },
|
||||
convertDeviationFromReference = { valueInDefaultUnit -> valueInDefaultUnit },
|
||||
convertDeviationToReference = { valueInThisUnit -> valueInThisUnit },
|
||||
decimals = UnitDecimals(0),
|
||||
chartStep = 50.0
|
||||
),
|
||||
CELSIUS(
|
||||
id = "c",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.temperature_c_display_name_short,
|
||||
long = R.string.temperature_c_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
narrow = R.string.temperature_c_nominative_narrow,
|
||||
short = R.string.temperature_c_nominative_short,
|
||||
long = R.string.temperature_c_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> valueInDefaultUnit.div(10.0) },
|
||||
convertToReference = { valueInThisUnit -> valueInThisUnit.times(10.0) },
|
||||
convertDeviationFromReference = { valueInDefaultUnit -> valueInDefaultUnit.div(10.0) },
|
||||
convertDeviationToReference = { valueInThisUnit -> valueInThisUnit.times(10.0) },
|
||||
decimals = UnitDecimals(narrow = 0, short = 1, long = 1),
|
||||
chartStep = 5.0
|
||||
),
|
||||
FAHRENHEIT(
|
||||
id = "f",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.temperature_f_display_name_short,
|
||||
long = R.string.temperature_f_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
narrow = R.string.temperature_f_nominative_narrow,
|
||||
short = R.string.temperature_f_nominative_short,
|
||||
long = R.string.temperature_f_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> 9.0.div(5.0).times(valueInDefaultUnit.div(10.0)) + 32 },
|
||||
convertToReference = { valueInThisUnit -> 5.0.div(9.0).times(valueInThisUnit - 32.0).times(10.0) },
|
||||
convertDeviationFromReference = { valueInDefaultUnit -> 9.0.div(5.0).times(valueInDefaultUnit.div(10.0)) },
|
||||
convertDeviationToReference = { valueInThisUnit -> 5.0.div(9.0).times(valueInThisUnit).times(10.0) },
|
||||
decimals = UnitDecimals(narrow = 0, short = 0, long = 1),
|
||||
chartStep = 10.0
|
||||
),
|
||||
KELVIN(
|
||||
id = "k",
|
||||
displayName = UnitTranslation(
|
||||
short = R.string.temperature_k_display_name_short,
|
||||
long = R.string.temperature_k_display_name_long
|
||||
),
|
||||
nominative = UnitTranslation(
|
||||
narrow = R.string.temperature_k_nominative_narrow,
|
||||
short = R.string.temperature_k_nominative_short,
|
||||
long = R.string.temperature_k_nominative_long
|
||||
),
|
||||
convertFromReference = { valueInDefaultUnit -> 273.15 + valueInDefaultUnit.div(10.0) },
|
||||
convertToReference = { valueInThisUnit -> (valueInThisUnit - 273.15).times(10.0) },
|
||||
convertDeviationFromReference = { valueInDefaultUnit -> valueInDefaultUnit.div(10.0) },
|
||||
convertDeviationToReference = { valueInThisUnit -> valueInThisUnit.times(10.0) },
|
||||
decimals = UnitDecimals(narrow = 0, short = 1, long = 2),
|
||||
chartStep = 5.0
|
||||
),
|
||||
;
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
override fun getMeasureUnit(): MeasureUnit? {
|
||||
return when (this) {
|
||||
DECI_CELSIUS -> null
|
||||
CELSIUS -> MeasureUnit.CELSIUS
|
||||
FAHRENHEIT -> MeasureUnit.FAHRENHEIT
|
||||
KELVIN -> MeasureUnit.KELVIN
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
override fun getPerMeasureUnit(): MeasureUnit? = null
|
||||
|
||||
/**
|
||||
* Override to:
|
||||
* - Never use ICU for narrow, so that it’s always displayed 13° instead of 13°C in some languages
|
||||
* - Use English units with Traditional Chinese
|
||||
*/
|
||||
override fun format(
|
||||
context: Context,
|
||||
value: Number,
|
||||
valueWidth: UnitWidth,
|
||||
unitWidth: UnitWidth,
|
||||
locale: Locale,
|
||||
showSign: Boolean,
|
||||
useNumberFormatter: Boolean,
|
||||
useMeasureFormat: Boolean,
|
||||
): String {
|
||||
// Always use %s° for narrow temperature formatting
|
||||
// Translations missing for Esperanto in CLDR
|
||||
// Incorrect translations for Polish in CLDR (“st. C” is never used on Polish websites)
|
||||
if (unitWidth == UnitWidth.NARROW ||
|
||||
locale.language.equals("eo", ignoreCase = true) ||
|
||||
(locale.language.equals("pl", ignoreCase = true) && unitWidth == UnitWidth.SHORT)
|
||||
) {
|
||||
return formatWithAndroidTranslations(
|
||||
context = context,
|
||||
value = value,
|
||||
valueWidth = valueWidth,
|
||||
unitWidth = unitWidth,
|
||||
locale = locale,
|
||||
showSign = showSign,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useMeasureFormat
|
||||
)
|
||||
}
|
||||
|
||||
val correctedLocale = locale.let {
|
||||
/**
|
||||
* Taiwan guidelines: https://www.bsmi.gov.tw/wSite/public/Attachment/f1736149048776.pdf
|
||||
* Ongoing issue: https://unicode-org.atlassian.net/jira/software/c/projects/CLDR/issues/CLDR-10604
|
||||
*/
|
||||
if (it.language.equals("zh", ignoreCase = true) &&
|
||||
arrayOf("TW", "HK", "MO").any { c -> it.country.equals(c, ignoreCase = true) } &&
|
||||
unitWidth != UnitWidth.LONG
|
||||
) {
|
||||
Locale.Builder().setLanguage("en").setRegion("001").build()
|
||||
} else {
|
||||
it
|
||||
}
|
||||
}
|
||||
return super.format(
|
||||
context = context,
|
||||
value = value,
|
||||
valueWidth = valueWidth,
|
||||
unitWidth = unitWidth,
|
||||
locale = correctedLocale,
|
||||
showSign = showSign,
|
||||
useNumberFormatter = useNumberFormatter,
|
||||
useMeasureFormat = useNumberFormatter
|
||||
)
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Resolve in the following order:
|
||||
* - System regional preference
|
||||
* - Current locale region preference
|
||||
*
|
||||
* Known issue: [LocalePreferences].[getTemperatureUnit()] is terribly slow, so avoid calling this often
|
||||
*/
|
||||
fun getDefaultUnit(
|
||||
locale: Locale = Locale.getDefault(),
|
||||
) = when (LocalePreferences.getTemperatureUnit()) {
|
||||
LocalePreferences.TemperatureUnit.CELSIUS -> CELSIUS
|
||||
LocalePreferences.TemperatureUnit.FAHRENHEIT -> FAHRENHEIT
|
||||
LocalePreferences.TemperatureUnit.KELVIN -> KELVIN
|
||||
/**
|
||||
* Copyright © 1991-Present Unicode, Inc.
|
||||
* License: Unicode License v3 https://www.unicode.org/license.txt
|
||||
* Source: https://github.com/unicode-org/cldr/blob/3f3967f3cbadc56bbb44a9aed20784e82ac64c67/common/supplemental/units.xml#L579-L582
|
||||
*/
|
||||
else -> when (locale.country) {
|
||||
"BS", "BZ", "KY", "PR", "PW", "US" -> FAHRENHEIT
|
||||
else -> CELSIUS
|
||||
}
|
||||
}
|
||||
|
||||
fun getUnit(id: String): TemperatureUnit? {
|
||||
return entries.firstOrNull { it.id == id }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Converts the given time temperature [value] expressed in the specified [sourceUnit] into the specified [targetUnit]. */
|
||||
internal fun convertTemperatureUnit(
|
||||
value: Double,
|
||||
sourceUnit: TemperatureUnit,
|
||||
targetUnit: TemperatureUnit,
|
||||
): Double {
|
||||
return if (sourceUnit == TemperatureUnit.DECI_CELSIUS) {
|
||||
targetUnit.convertFromReference(value)
|
||||
} else if (targetUnit == TemperatureUnit.DECI_CELSIUS) {
|
||||
sourceUnit.convertToReference(value)
|
||||
} else {
|
||||
targetUnit.convertFromReference(sourceUnit.convertToReference(value))
|
||||
}
|
||||
}
|
||||
|
||||
/** Converts the given time temperature deviation [value] expressed in the specified [sourceUnit] into the specified [targetUnit]. */
|
||||
internal fun convertTemperatureUnitDeviation(
|
||||
value: Double,
|
||||
sourceUnit: TemperatureUnit,
|
||||
targetUnit: TemperatureUnit,
|
||||
): Double {
|
||||
return if (sourceUnit == TemperatureUnit.DECI_CELSIUS) {
|
||||
targetUnit.convertDeviationFromReference(value)
|
||||
} else if (targetUnit == TemperatureUnit.DECI_CELSIUS) {
|
||||
sourceUnit.convertDeviationToReference(value)
|
||||
} else {
|
||||
targetUnit.convertDeviationFromReference(sourceUnit.convertDeviationToReference(value))
|
||||
}
|
||||
}
|
||||
178
weather-unit/src/main/res/values-ar/strings.xml
Normal file
178
weather-unit/src/main/res/values-ar/strings.xml
Normal file
|
|
@ -0,0 +1,178 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/ar.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Value separator -->
|
||||
<string name="locale_separator">،\u0020</string>
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_short">°م</string>
|
||||
<string name="temperature_c_display_name_long">درجة مئوية</string>
|
||||
<string name="temperature_c_nominative_short">%s°م</string>
|
||||
<string name="temperature_c_nominative_long">%s درجة مئوية</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_short">°ف</string>
|
||||
<string name="temperature_f_display_name_long">درجة فهرنهايت</string>
|
||||
<string name="temperature_f_nominative_short">%s°ف</string>
|
||||
<string name="temperature_f_nominative_long">%s درجة فهرنهايت</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_short">د كلفن</string>
|
||||
<string name="temperature_k_display_name_long">درجة كلفن</string>
|
||||
<string name="temperature_k_nominative_short">%s د كلفن</string>
|
||||
<string name="temperature_k_nominative_long">%s درجة كلفن</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_short">ميكرومتر</string>
|
||||
<string name="length_microm_nominative_short">%s ميكرومتر</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_short">مم</string>
|
||||
<string name="length_mm_display_name_long">مليمتر</string>
|
||||
<string name="length_mm_nominative_short">%s مم</string>
|
||||
<string name="length_mm_nominative_long">%s مليمتر</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_short">سم</string>
|
||||
<string name="length_cm_display_name_long">سنتيمتر</string>
|
||||
<string name="length_cm_nominative_short">%s سم</string>
|
||||
<string name="length_cm_nominative_long">%s سنتيمتر</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_short">م</string>
|
||||
<string name="length_m_display_name_long">متر</string>
|
||||
<string name="length_m_nominative_short">%s متر</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_short">كم</string>
|
||||
<string name="length_km_display_name_long">كيلومتر</string>
|
||||
<string name="length_km_nominative_short">%s كم</string>
|
||||
<string name="length_km_nominative_long">%s كيلومتر</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">inches</string>
|
||||
<string name="length_in_nominative_long">%s inches</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">قدم</string>
|
||||
<string name="length_ft_nominative_short">%s قدم</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_short">ميل</string>
|
||||
<string name="length_mi_nominative_short">%s ميل</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">ميل بحري</string>
|
||||
<string name="length_nmi_nominative_long">%s ميل بحري</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_short">%s/م²</string>
|
||||
<string name="area_m2_per_long">%s لكل متر مربع</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_short">عقدة</string>
|
||||
<string name="speed_kn_nominative_short">%s عقدة</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_short">بوفورت</string>
|
||||
<string name="speed_bf_nominative_short">بوفورت %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_short">%s/م³</string>
|
||||
<string name="volume_m3_per_long">%s متر مكعب</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_short">لتر</string>
|
||||
<string name="volume_l_nominative_short">%s لتر</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_short">مكغم</string>
|
||||
<string name="weight_microg_display_name_long">ميكروغرام</string>
|
||||
<string name="weight_microg_nominative_short">%s مكغم</string>
|
||||
<string name="weight_microg_nominative_long">%s ميكروغرام</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_short">مغم</string>
|
||||
<string name="weight_mg_display_name_long">مليغرام</string>
|
||||
<string name="weight_mg_nominative_short">%s مغم</string>
|
||||
<string name="weight_mg_nominative_long">%s مليغرام</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_short">باسكال</string>
|
||||
<string name="pressure_pa_display_name_long">باسكال</string>
|
||||
<string name="pressure_pa_nominative_short">%s باسكال</string>
|
||||
<string name="pressure_pa_nominative_long">%s باسكال</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_short">هكتوباسكال</string>
|
||||
<string name="pressure_hpa_display_name_long">هكتوباسكال</string>
|
||||
<string name="pressure_hpa_nominative_short">%s هكتوباسكال</string>
|
||||
<string name="pressure_hpa_nominative_long">%s هكتوباسكال</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_short">ك.باسكال</string>
|
||||
<string name="pressure_kpa_display_name_long">كيلوباسكال</string>
|
||||
<string name="pressure_kpa_nominative_short">%s ك.باسكال</string>
|
||||
<string name="pressure_kpa_nominative_long">%s كيلوباسكال</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_short">م. بار</string>
|
||||
<string name="pressure_mbar_display_name_long">ملي بار</string>
|
||||
<string name="pressure_mbar_nominative_short">%s م. بار</string>
|
||||
<string name="pressure_mbar_nominative_long">%s ملي بار</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_short">ض.ج</string>
|
||||
<string name="pressure_atm_display_name_long">وحدة الضغط الجوي</string>
|
||||
<string name="pressure_atm_nominative_short">%s ض.ج</string>
|
||||
<string name="pressure_atm_nominative_long">%s ضغط جوي</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">ملم زئبقي</string>
|
||||
<string name="pressure_mmhg_display_name_long">مليمتر زئبقي</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s ملم زئبقي</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s مليمتر زئبقي</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_short">ب. زئبقية</string>
|
||||
<string name="pressure_inhg_display_name_long">بوصة زئبقية</string>
|
||||
<string name="pressure_inhg_nominative_short">%s ب. زئبقية</string>
|
||||
<string name="pressure_inhg_nominative_long">%s بوصة زئبقية</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s س</string>
|
||||
<string name="duration_hr_nominative_long">%s ساعة</string>
|
||||
<string name="duration_hr_per_short">%s/س</string>
|
||||
<string name="duration_hr_per_long">%s في الساعة</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s د</string>
|
||||
<string name="duration_min_nominative_long">%s دقيقة</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s ث</string>
|
||||
<string name="duration_sec_nominative_long">%s ثانية</string>
|
||||
<string name="duration_sec_per_short">%s/ث</string>
|
||||
<string name="duration_sec_per_long">%s في الثانية</string>
|
||||
|
||||
</resources>
|
||||
187
weather-unit/src/main/res/values-be/strings.xml
Normal file
187
weather-unit/src/main/res/values-be/strings.xml
Normal file
|
|
@ -0,0 +1,187 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/be.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">градусы Цэльсія</string>
|
||||
<string name="temperature_c_nominative_long">%s градусы Цэльсія</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">градусы Фарэнгейта</string>
|
||||
<string name="temperature_f_nominative_long">%s градусы Фарэнгейта</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_short">К</string>
|
||||
<string name="temperature_k_display_name_long">кельвіны</string>
|
||||
<string name="temperature_k_nominative_narrow">%sК</string>
|
||||
<string name="temperature_k_nominative_short">%s К</string>
|
||||
<string name="temperature_k_nominative_long">%s кельвіны</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_short">мкм</string>
|
||||
<string name="length_microm_display_name_long">мікраметры</string>
|
||||
<string name="length_microm_nominative_short">%s мкм</string>
|
||||
<string name="length_microm_nominative_long">%s мікраметры</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_short">мм</string>
|
||||
<string name="length_mm_display_name_long">міліметры</string>
|
||||
<string name="length_mm_nominative_short">%s мм</string>
|
||||
<string name="length_mm_nominative_long">%s міліметры</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_short">см</string>
|
||||
<string name="length_cm_display_name_long">сантыметры</string>
|
||||
<string name="length_cm_nominative_short">%s см</string>
|
||||
<string name="length_cm_nominative_long">%s сантыметры</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_short">м</string>
|
||||
<string name="length_m_display_name_long">метры</string>
|
||||
<string name="length_m_nominative_short">%s м</string>
|
||||
<string name="length_m_nominative_long">%s метры</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_short">км</string>
|
||||
<string name="length_km_display_name_long">кіламетры</string>
|
||||
<string name="length_km_nominative_short">%s км</string>
|
||||
<string name="length_km_nominative_long">%s кіламетры</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">цал</string>
|
||||
<string name="length_in_display_name_long">цалі</string>
|
||||
<string name="length_in_nominative_short">%s цал</string>
|
||||
<string name="length_in_nominative_long">%s цалі</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">фт</string>
|
||||
<string name="length_ft_display_name_long">футы</string>
|
||||
<string name="length_ft_nominative_short">%s фт</string>
|
||||
<string name="length_ft_nominative_long">%s футы</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_short">мілі</string>
|
||||
<string name="length_mi_nominative_short">%s мілі</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">мар. мілі</string>
|
||||
<string name="length_nmi_display_name_long">марскія мілі</string>
|
||||
<string name="length_nmi_nominative_short">%s мар. мілі</string>
|
||||
<string name="length_nmi_nominative_long">%s марскія мілі</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_short">%s/м²</string>
|
||||
<string name="area_m2_per_long">%s на квадратны метр</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_short">вуз.</string>
|
||||
<string name="speed_kn_display_name_long">вузел</string>
|
||||
<string name="speed_kn_nominative_short">%s вуз.</string>
|
||||
<string name="speed_kn_nominative_long">%s вузлы</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_short">Бфт</string>
|
||||
<string name="speed_bf_display_name_long">балы Бафорта</string>
|
||||
<string name="speed_bf_nominative_short">%s Бфт</string>
|
||||
<string name="speed_bf_nominative_long">%s бала Бафорта</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_short">%s/м³</string>
|
||||
<string name="volume_m3_per_long">%s на кубічны метр</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_short">л</string>
|
||||
<string name="volume_l_display_name_long">літры</string>
|
||||
<string name="volume_l_nominative_short">%s л</string>
|
||||
<string name="volume_l_nominative_long">%s літры</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_short">мкг</string>
|
||||
<string name="weight_microg_display_name_long">мікраграмы</string>
|
||||
<string name="weight_microg_nominative_short">%s мкг</string>
|
||||
<string name="weight_microg_nominative_long">%s мікраграма</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_short">мг</string>
|
||||
<string name="weight_mg_display_name_long">міліграмы</string>
|
||||
<string name="weight_mg_nominative_short">%s мг</string>
|
||||
<string name="weight_mg_nominative_long">%s міліграма</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_short">Па</string>
|
||||
<string name="pressure_pa_display_name_long">паскалі</string>
|
||||
<string name="pressure_pa_nominative_short">%s Па</string>
|
||||
<string name="pressure_pa_nominative_long">%s паскалі</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_short">гПа</string>
|
||||
<string name="pressure_hpa_display_name_long">гектапаскалі</string>
|
||||
<string name="pressure_hpa_nominative_short">%s гПа</string>
|
||||
<string name="pressure_hpa_nominative_long">%s гектапаскалі</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_short">кПа</string>
|
||||
<string name="pressure_kpa_display_name_long">кілапаскалі</string>
|
||||
<string name="pressure_kpa_nominative_short">%s кПа</string>
|
||||
<string name="pressure_kpa_nominative_long">%s кілапаскалі</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_short">мбар</string>
|
||||
<string name="pressure_mbar_display_name_long">мілібары</string>
|
||||
<string name="pressure_mbar_nominative_short">%s мбар</string>
|
||||
<string name="pressure_mbar_nominative_long">%s мілібары</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_short">атм</string>
|
||||
<string name="pressure_atm_display_name_long">атмасферы</string>
|
||||
<string name="pressure_atm_nominative_short">%s атм</string>
|
||||
<string name="pressure_atm_nominative_long">%s атмасферы</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">мм рт. сл.</string>
|
||||
<string name="pressure_mmhg_display_name_long">міліметры ртутнага слупа</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s мм рт. сл.</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s міліметры ртутнага слупа</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_short">цалі рт. сл.</string>
|
||||
<string name="pressure_inhg_display_name_long">цалі ртутнага слупа</string>
|
||||
<string name="pressure_inhg_nominative_short">%s цалі рт. сл.</string>
|
||||
<string name="pressure_inhg_nominative_long">%s цалі ртутнага слупа</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s гадз</string>
|
||||
<string name="duration_hr_nominative_long">%s гадзіны</string>
|
||||
<string name="duration_hr_per_short">%s/гадз</string>
|
||||
<string name="duration_hr_per_long">%s у гадзіну</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s хв</string>
|
||||
<string name="duration_min_nominative_long">%s хвіліны</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s с</string>
|
||||
<string name="duration_sec_nominative_long">%s секунды</string>
|
||||
<string name="duration_sec_per_short">%s/с</string>
|
||||
<string name="duration_sec_per_long">%s у секунду</string>
|
||||
|
||||
</resources>
|
||||
143
weather-unit/src/main/res/values-bg/strings.xml
Normal file
143
weather-unit/src/main/res/values-bg/strings.xml
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/bg.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">градуси Целзий</string>
|
||||
<string name="temperature_c_nominative_long">%s градуса Целзий</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">градуси по Фаренхайт</string>
|
||||
<string name="temperature_f_nominative_long">%s градуса по Фаренхайт</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">келвини</string>
|
||||
<string name="temperature_k_nominative_long">%s келвина</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">микрометри</string>
|
||||
<string name="length_microm_nominative_long">%s микрометра</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">милиметри</string>
|
||||
<string name="length_mm_nominative_long">%s милиметра</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">сантиметри</string>
|
||||
<string name="length_cm_nominative_long">%s сантиметра</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">метри</string>
|
||||
<string name="length_m_nominative_long">%s метра</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">километри</string>
|
||||
<string name="length_km_nominative_long">%s километра</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">инчове</string>
|
||||
<string name="length_in_nominative_long">%s инча</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">футове</string>
|
||||
<string name="length_ft_nominative_long">%s фута</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">мили</string>
|
||||
<string name="length_mi_nominative_long">%s мили</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">морски мили</string>
|
||||
<string name="length_nmi_nominative_long">%s морски мили</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s на квадратен метър</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">възел</string>
|
||||
<string name="speed_kn_nominative_long">%s възел</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Бофорт</string>
|
||||
<string name="speed_bf_nominative_short">%s по Bft</string>
|
||||
<string name="speed_bf_nominative_long">%s no Бофорт</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s на кубичен метър</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">литри</string>
|
||||
<string name="volume_l_nominative_long">%s литра</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">микрограмове</string>
|
||||
<string name="weight_microg_nominative_long">%s микрограма</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">милиграмове</string>
|
||||
<string name="weight_mg_nominative_long">%s милиграма</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">паскали</string>
|
||||
<string name="pressure_pa_nominative_long">%s паскали</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">хектопаскали</string>
|
||||
<string name="pressure_hpa_nominative_long">%s хектопаскали</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">килопаскали</string>
|
||||
<string name="pressure_kpa_nominative_long">%s килопаскали</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">милибари</string>
|
||||
<string name="pressure_mbar_nominative_long">%s милибари</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">атмосфери</string>
|
||||
<string name="pressure_atm_nominative_long">%s атмосфери</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">милиметри живачен стълб</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s милиметра живачен стълб</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">инчове живачен стълб</string>
|
||||
<string name="pressure_inhg_nominative_long">%s инчове живачен стълб</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s ч</string>
|
||||
<string name="duration_hr_nominative_long">%s часа</string>
|
||||
<string name="duration_hr_per_short">%s/ч</string>
|
||||
<string name="duration_hr_per_long">%s за час</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s мин</string>
|
||||
<string name="duration_min_nominative_long">%s минути</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s сек</string>
|
||||
<string name="duration_sec_nominative_long">%s секунди</string>
|
||||
<string name="duration_sec_per_short">%s/сек</string>
|
||||
<string name="duration_sec_per_long">%s за секунда</string>
|
||||
|
||||
</resources>
|
||||
150
weather-unit/src/main/res/values-bn/strings.xml
Normal file
150
weather-unit/src/main/res/values-bn/strings.xml
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/bn.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">ডিগ্রী সেলসিয়াস</string>
|
||||
<string name="temperature_c_nominative_long">%s ডিগ্রী সেলসিয়াস</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">ডিগ্রী ফারেনহাইট</string>
|
||||
<string name="temperature_f_nominative_long">%s ডিগ্রী ফারেনহাইট</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">কেলভিন</string>
|
||||
<string name="temperature_k_nominative_long">%s কেলভিন</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">মাইক্রোমিটার</string>
|
||||
<string name="length_microm_nominative_long">%s মাইক্রোমিটার</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_short">মিমি</string>
|
||||
<string name="length_mm_display_name_long">মিলিমিটার</string>
|
||||
<string name="length_mm_nominative_short">%s মিমি</string>
|
||||
<string name="length_mm_nominative_long">%s মিলিমিটার</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_short">সেমি</string>
|
||||
<string name="length_cm_display_name_long">সেন্টিমিটার</string>
|
||||
<string name="length_cm_nominative_short">%s সেমি</string>
|
||||
<string name="length_cm_nominative_long">%s সেন্টিমিটার</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_short">মিটার</string>
|
||||
<string name="length_m_nominative_short">%s মি</string>
|
||||
<string name="length_m_nominative_long">%s মিটার</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_short">কিমি</string>
|
||||
<string name="length_km_display_name_long">কিলোমিটার</string>
|
||||
<string name="length_km_nominative_short">%s কিমি</string>
|
||||
<string name="length_km_nominative_long">%s কিলোমিটার</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">ইঞ্চি</string>
|
||||
<string name="length_in_nominative_short">%s ইঞ্চি</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">ফুট</string>
|
||||
<string name="length_ft_nominative_short">%s ফুট</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_short">মাইল</string>
|
||||
<string name="length_mi_nominative_short">%s মাইল</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">নটিক্যাল মাইল</string>
|
||||
<string name="length_nmi_nominative_long">%s নটিক্যাল মাইল</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s প্রতি বর্গ মিটার</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">নট</string>
|
||||
<string name="speed_kn_nominative_long">%s নট</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">বিউফোর্ট</string>
|
||||
<string name="speed_bf_nominative_long">বিউফোর্ট %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s প্রতি কিউবিক মিটার</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_short">লিটার</string>
|
||||
<string name="volume_l_nominative_short">%s লিটার</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">মাইক্রোগ্রাম</string>
|
||||
<string name="weight_microg_nominative_long">%s মাইক্রোগ্রাম</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">মিলিগ্রাম</string>
|
||||
<string name="weight_mg_nominative_long">%s মিলিগ্রাম</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">প্যাসকেল</string>
|
||||
<string name="pressure_pa_nominative_long">%s প্যাসকেল</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">হেক্টোপাসকল</string>
|
||||
<string name="pressure_hpa_nominative_long">%s হেক্টোপাসকল</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">কিলোপ্যাসকেল</string>
|
||||
<string name="pressure_kpa_nominative_long">%s কিলোপ্যাসকেল</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">মিলিবার</string>
|
||||
<string name="pressure_mbar_nominative_long">%s মিলিবার</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mm Hg</string>
|
||||
<string name="pressure_mmhg_display_name_long">মিলিমিটার পারদ</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s মিলিমিটার পারদ</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">ইঞ্চি পারদ</string>
|
||||
<string name="pressure_inhg_nominative_long">%s ইঞ্চি পারদ</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s ঘঃ</string>
|
||||
<string name="duration_hr_nominative_long">%s ঘন্টা</string>
|
||||
<string name="duration_hr_per_short">%s/ঘ:</string>
|
||||
<string name="duration_hr_per_long">%s প্রতি ঘন্টা</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s মিঃ</string>
|
||||
<string name="duration_min_nominative_long">%s মিনিট</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s/সেঃ</string>
|
||||
<string name="duration_sec_nominative_long">%s সেকেন্ড</string>
|
||||
<string name="duration_sec_per_short">%s সেঃ</string>
|
||||
<string name="duration_sec_per_long">%s প্রতি সেকেন্ড</string>
|
||||
|
||||
</resources>
|
||||
141
weather-unit/src/main/res/values-bs/strings.xml
Normal file
141
weather-unit/src/main/res/values-bs/strings.xml
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/bs.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">stepeni Celzijusa</string>
|
||||
<string name="temperature_c_nominative_long">%s stepeni Celzijusa</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">stepeni Farenhajta</string>
|
||||
<string name="temperature_f_nominative_long">%s stepeni Farenhajta</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvini</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvini</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">mikrometri</string>
|
||||
<string name="length_microm_nominative_long">%s mikrometra</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">milimetri</string>
|
||||
<string name="length_mm_nominative_long">%s milimetra</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centimetri</string>
|
||||
<string name="length_cm_nominative_long">%s centimetra</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metri</string>
|
||||
<string name="length_m_nominative_long">%s metra</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometri</string>
|
||||
<string name="length_km_nominative_long">%s kilometra</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">inči</string>
|
||||
<string name="length_in_nominative_long">%s inča</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">stope</string>
|
||||
<string name="length_ft_nominative_long">%s stope</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">milje</string>
|
||||
<string name="length_mi_nominative_long">%s milje</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">nautičke milje</string>
|
||||
<string name="length_nmi_nominative_long">%s nautičke milje</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s po kvadratnom metru</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_short">čv</string>
|
||||
<string name="speed_kn_display_name_long">čvorovi</string>
|
||||
<string name="speed_kn_nominative_short">%s čv</string>
|
||||
<string name="speed_kn_nominative_long">%s čvora</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beafort</string>
|
||||
<string name="speed_bf_nominative_long">Beafort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s po kubnom metru</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litri</string>
|
||||
<string name="volume_l_nominative_long">%s litara</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">mikrogrami</string>
|
||||
<string name="weight_microg_nominative_long">%s mikrograma</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">miligrami</string>
|
||||
<string name="weight_mg_nominative_long">%s miligrama</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">paskali</string>
|
||||
<string name="pressure_pa_nominative_long">%s paskali</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hektopaskali</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hektopaskali</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopaskalo</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopaskali</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">milibari</string>
|
||||
<string name="pressure_mbar_nominative_long">%s milibari</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosfere</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosfere</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">milimetri živinog stuba</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s milimetri živinog stuba</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">inči živinog stuba</string>
|
||||
<string name="pressure_inhg_nominative_long">%s inči živinog stuba</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_long">%s sati</string>
|
||||
<string name="duration_hr_per_long">%s na sat</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s min.</string>
|
||||
<string name="duration_min_nominative_long">%s minute</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s sek.</string>
|
||||
<string name="duration_sec_nominative_long">%s sekunde</string>
|
||||
<string name="duration_sec_per_long">%s po sekundi</string>
|
||||
|
||||
</resources>
|
||||
137
weather-unit/src/main/res/values-ca/strings.xml
Normal file
137
weather-unit/src/main/res/values-ca/strings.xml
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/ca.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">graus Celsius</string>
|
||||
<string name="temperature_c_nominative_long">%s graus Celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">graus Fahrenheit</string>
|
||||
<string name="temperature_f_nominative_long">%s graus Fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">Kelvin</string>
|
||||
<string name="temperature_k_nominative_long">%s Kelvin</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">micròmetres</string>
|
||||
<string name="length_microm_nominative_long">%s micròmetres</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">mil·límetres</string>
|
||||
<string name="length_mm_nominative_long">%s mil·límetres</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centímetres</string>
|
||||
<string name="length_cm_nominative_long">%s centímetres</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metres</string>
|
||||
<string name="length_m_nominative_long">%s metres</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">quilòmetres</string>
|
||||
<string name="length_km_nominative_long">%s quilòmetres</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">polzades</string>
|
||||
<string name="length_in_nominative_long">%s polzades</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">peus</string>
|
||||
<string name="length_ft_nominative_long">%s peus</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">milles</string>
|
||||
<string name="length_mi_nominative_long">%s milles</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">milles nàutiques</string>
|
||||
<string name="length_nmi_nominative_long">%s milles nàutiques</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s per metre quadrat</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">nusos</string>
|
||||
<string name="speed_kn_nominative_long">%s nusos</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_long">Beaufort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s per metre cúbic</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litres</string>
|
||||
<string name="volume_l_nominative_long">%s litres</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">micrograms</string>
|
||||
<string name="weight_microg_nominative_long">%s micrograms</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">mil·ligrams</string>
|
||||
<string name="weight_mg_nominative_long">%s mil·ligrams</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascals</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascals</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hectopascals</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hectopascals</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">quilopascals</string>
|
||||
<string name="pressure_kpa_nominative_long">%s quilopascals</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">mil·libars</string>
|
||||
<string name="pressure_mbar_nominative_long">%s mil·libars</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosferes</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosferes</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">mil·límetres de mercuri</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s mil·límetres de mercuri</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">polzades de mercuri</string>
|
||||
<string name="pressure_inhg_nominative_long">%s polzades de mercuri</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_long">%s hores</string>
|
||||
<string name="duration_hr_per_long">%s per hora</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minuts</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_long">%s segons</string>
|
||||
<string name="duration_sec_per_long">%s per segon</string>
|
||||
|
||||
</resources>
|
||||
114
weather-unit/src/main/res/values-ckb/strings.xml
Normal file
114
weather-unit/src/main/res/values-ckb/strings.xml
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/ckb.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Value separator -->
|
||||
<string name="locale_separator">،\u0020</string>
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Kelvin -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Millimeter -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Centimeter -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Meter -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Kilometer -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Inch -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Foot -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Mile -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_short">liter</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Milligram -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Millibar -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Minutes -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Seconds -->
|
||||
<!-- No change -->
|
||||
|
||||
</resources>
|
||||
141
weather-unit/src/main/res/values-cs/strings.xml
Normal file
141
weather-unit/src/main/res/values-cs/strings.xml
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/cs.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">stupně Celsia</string>
|
||||
<string name="temperature_c_nominative_long">%s stupně Celsia</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">stupně Fahrenheita</string>
|
||||
<string name="temperature_f_nominative_long">%s stupně Fahrenheita</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelviny</string>
|
||||
<string name="temperature_k_nominative_long">%s kelviny</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">mikrometry</string>
|
||||
<string name="length_microm_nominative_long">%s mikrometry</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">milimetry</string>
|
||||
<string name="length_mm_nominative_long">%s milimetry</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centimetry</string>
|
||||
<string name="length_cm_nominative_long">%s centimetry</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metry</string>
|
||||
<string name="length_m_nominative_long">%s metry</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometry</string>
|
||||
<string name="length_km_nominative_long">%s kilometry</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">palce</string>
|
||||
<string name="length_in_nominative_long">%s palce</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">stopy</string>
|
||||
<string name="length_ft_nominative_long">%s stopy</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">míle</string>
|
||||
<string name="length_mi_nominative_long">%s míle</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">námořní míle</string>
|
||||
<string name="length_nmi_nominative_long">%s námořní míle</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s na metr čtvereční</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">uzly</string>
|
||||
<string name="speed_kn_nominative_long">%s uzly</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">stupně Beaufortovy stupnice</string>
|
||||
<string name="speed_bf_nominative_long">%s. stupeň Beaufortovy stupnice</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s na metr krychlový</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litry</string>
|
||||
<string name="volume_l_nominative_long">%s litry</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">mikrogramy</string>
|
||||
<string name="weight_microg_nominative_long">%s mikrogramy</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">miligramy</string>
|
||||
<string name="weight_mg_nominative_long">%s miligramy</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascaly</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascaly</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hektopascaly</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hektopascaly</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopascaly</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopascaly</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_short">mb</string>
|
||||
<string name="pressure_mbar_display_name_long">milibary</string>
|
||||
<string name="pressure_mbar_nominative_short">%s mb</string>
|
||||
<string name="pressure_mbar_nominative_long">%s milibary</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosféry</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosféry</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mm Hg</string>
|
||||
<string name="pressure_mmhg_display_name_long">milimetry rtuťového sloupce</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s milimetry rtuťového sloupce</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">palce rtuťového sloupce</string>
|
||||
<string name="pressure_inhg_nominative_long">%s palce rtuťového sloupce</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_long">%s hodiny</string>
|
||||
<string name="duration_hr_per_long">%s za hodinu</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minuty</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_long">%s sekundy</string>
|
||||
<string name="duration_sec_per_long">%s za sekundu</string>
|
||||
|
||||
</resources>
|
||||
148
weather-unit/src/main/res/values-da/strings.xml
Normal file
148
weather-unit/src/main/res/values-da/strings.xml
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/da.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">grader celsius</string>
|
||||
<string name="temperature_c_nominative_long">%s grader celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">grader fahrenheit</string>
|
||||
<string name="temperature_f_nominative_long">%s grader fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvin</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvin</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">mikrometer</string>
|
||||
<string name="length_microm_nominative_long">%s mikrometer</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">millimeter</string>
|
||||
<string name="length_mm_nominative_long">%s millimeter</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centimeter</string>
|
||||
<string name="length_cm_nominative_long">%s centimeter</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">meter</string>
|
||||
<string name="length_m_nominative_long">%s meter</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometer</string>
|
||||
<string name="length_km_nominative_long">%s kilometer</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">tommer</string>
|
||||
<string name="length_in_nominative_short">%s tommer</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">fod</string>
|
||||
<string name="length_ft_nominative_short">%s fod</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">miles</string>
|
||||
<string name="length_mi_nominative_long">%s miles</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">sm</string>
|
||||
<string name="length_nmi_display_name_long">sømil</string>
|
||||
<string name="length_nmi_nominative_short">%s sm</string>
|
||||
<string name="length_nmi_nominative_long">%s sømil</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">knob</string>
|
||||
<string name="speed_kn_nominative_long">%s knob</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_short">bft</string>
|
||||
<string name="speed_bf_display_name_long">beaufort</string>
|
||||
<string name="speed_bf_nominative_short">bft %s</string>
|
||||
<string name="speed_bf_nominative_long">beaufort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">liter</string>
|
||||
<string name="volume_l_nominative_long">%s liter</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">mikrogram</string>
|
||||
<string name="weight_microg_nominative_long">%s mikrogram</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">milligram</string>
|
||||
<string name="weight_mg_nominative_long">%s milligram</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascal</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascal</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hektopascal</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hektopascal</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopascal</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopascal</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">millibar</string>
|
||||
<string name="pressure_mbar_nominative_long">%s millibar</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosfære</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosfære</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">millimeter kviksølv</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s millimeter kviksølv</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_short">″ Hg</string>
|
||||
<string name="pressure_inhg_display_name_long">tommer kviksølv</string>
|
||||
<string name="pressure_inhg_nominative_short">%s ″ Hg</string>
|
||||
<string name="pressure_inhg_nominative_long">%s tommer kviksølv</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s t.</string>
|
||||
<string name="duration_hr_nominative_long">%s timer</string>
|
||||
<string name="duration_hr_per_short">%s/t.</string>
|
||||
<string name="duration_hr_per_long">%s pr. time</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s min.</string>
|
||||
<string name="duration_min_nominative_long">%s minutter</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s sek.</string>
|
||||
<string name="duration_sec_nominative_long">%s sekunder</string>
|
||||
<string name="duration_sec_per_short">%s/sek.</string>
|
||||
<string name="duration_sec_per_long">%s pr. sekund</string>
|
||||
|
||||
</resources>
|
||||
145
weather-unit/src/main/res/values-de/strings.xml
Normal file
145
weather-unit/src/main/res/values-de/strings.xml
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/de.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">Grad Celsius</string>
|
||||
<string name="temperature_c_nominative_long">%s Grad Celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">Grad Fahrenheit</string>
|
||||
<string name="temperature_f_nominative_long">%s Grad Fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">Kelvin</string>
|
||||
<string name="temperature_k_nominative_long">%s Kelvin</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">Mikrometer</string>
|
||||
<string name="length_microm_nominative_long">%s Mikrometer</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">Millimeter</string>
|
||||
<string name="length_mm_nominative_long">%s Millimeter</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">Zentimeter</string>
|
||||
<string name="length_cm_nominative_long">%s Zentimeter</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">Meter</string>
|
||||
<string name="length_m_nominative_long">%s Meter</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">Kilometer</string>
|
||||
<string name="length_km_nominative_long">%s Kilometer</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">Zoll</string>
|
||||
<string name="length_in_nominative_long">%s Zoll</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">Fuß</string>
|
||||
<string name="length_ft_nominative_long">%s Fuß</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">Meilen</string>
|
||||
<string name="length_mi_nominative_long">%s Meilen</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">sm</string>
|
||||
<string name="length_nmi_display_name_long">Seemeilen</string>
|
||||
<string name="length_nmi_nominative_short">%s sm</string>
|
||||
<string name="length_nmi_nominative_long">%s Seemeilen</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s pro Quadratmeter</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">Knoten</string>
|
||||
<string name="speed_kn_nominative_long">%s Knoten</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_long">Beaufort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s pro Kubikmeter</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">Liter</string>
|
||||
<string name="volume_l_nominative_long">%s Liter</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">Mikrogramm</string>
|
||||
<string name="weight_microg_nominative_long">%s Mikrogramm</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">Milligramm</string>
|
||||
<string name="weight_mg_nominative_long">%s Milligramm</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">Pascal</string>
|
||||
<string name="pressure_pa_nominative_long">%s Pascal</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">Hektopascal</string>
|
||||
<string name="pressure_hpa_nominative_long">%s Hektopascal</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">Kilopascal</string>
|
||||
<string name="pressure_kpa_nominative_long">%s Kilopascal</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<!-- This is marked for short in CLDR but I believe this is an error -->
|
||||
<string name="pressure_mbar_display_name_long">Millibar</string>
|
||||
<string name="pressure_mbar_nominative_long">%s Millibar</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">Atmosphären</string>
|
||||
<string name="pressure_atm_nominative_long">%s Atmosphären</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mm Hg</string>
|
||||
<string name="pressure_mmhg_display_name_long">Millimeter Quecksilbersäule</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s Millimeter Quecksilbersäule</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">Zoll Quecksilbersäule</string>
|
||||
<string name="pressure_inhg_nominative_long">%s Zoll Quecksilbersäule</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s Std.</string>
|
||||
<string name="duration_hr_nominative_long">%s Stunden</string>
|
||||
<string name="duration_hr_per_long">%s pro Stunde</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s Min.</string>
|
||||
<string name="duration_min_nominative_long">%s Minuten</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s Sek.</string>
|
||||
<string name="duration_sec_nominative_long">%s Sekunden</string>
|
||||
<string name="duration_sec_per_long">%s pro Sekunde</string>
|
||||
|
||||
</resources>
|
||||
167
weather-unit/src/main/res/values-el/strings.xml
Normal file
167
weather-unit/src/main/res/values-el/strings.xml
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/el.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_short">βθμ C</string>
|
||||
<string name="temperature_c_display_name_long">βαθμοί Κελσίου</string>
|
||||
<string name="temperature_c_nominative_long">%s βαθμοί Κελσίου</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_short">βθμ F</string>
|
||||
<string name="temperature_f_display_name_long">βαθμοί Κελσίου</string>
|
||||
<string name="temperature_f_nominative_long">%s βαθμοί Κελσίου</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">βαθμοί Κέλβιν</string>
|
||||
<string name="temperature_k_nominative_long">%s βαθμοί Κέλβιν</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">μικρόμετρα</string>
|
||||
<string name="length_microm_nominative_long">%s μικρόμετρα</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_short">χλστ.</string>
|
||||
<string name="length_mm_display_name_long">χιλιοστόμετρα</string>
|
||||
<string name="length_mm_nominative_short">%s χλστ.</string>
|
||||
<string name="length_mm_nominative_long">%s χιλιοστόμετρα</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_short">εκ.</string>
|
||||
<string name="length_cm_display_name_long">εκατοστά</string>
|
||||
<string name="length_cm_nominative_short">%s εκ.</string>
|
||||
<string name="length_cm_nominative_long">%s εκατοστά</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_short">μ.</string>
|
||||
<string name="length_m_display_name_long">μέτρα</string>
|
||||
<string name="length_m_nominative_short">%s μ.</string>
|
||||
<string name="length_m_nominative_long">%s μέτρα</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_short">χλμ.</string>
|
||||
<string name="length_km_display_name_long">χιλιόμετρα</string>
|
||||
<string name="length_km_nominative_short">%s χλμ.</string>
|
||||
<string name="length_km_nominative_long">%s χιλιόμετρα</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">ίν.</string>
|
||||
<string name="length_in_display_name_long">ίντσες</string>
|
||||
<string name="length_in_nominative_short">%s ίν.</string>
|
||||
<string name="length_in_nominative_long">%s ίντσες</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">πδ</string>
|
||||
<string name="length_ft_display_name_long">πόδια</string>
|
||||
<string name="length_ft_nominative_short">%s πδ</string>
|
||||
<string name="length_ft_nominative_long">%s πόδια</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_short">μίλ.</string>
|
||||
<string name="length_mi_display_name_long">μίλια</string>
|
||||
<string name="length_mi_nominative_short">%s μίλ.</string>
|
||||
<string name="length_mi_nominative_long">%s μίλια</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">ν.μ.</string>
|
||||
<string name="length_nmi_display_name_long">ναυτικά μίλια</string>
|
||||
<string name="length_nmi_nominative_short">%s ν.μ.</string>
|
||||
<string name="length_nmi_nominative_long">%s ναυτικά μίλια</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_short">%s/τ.μ.</string>
|
||||
<string name="area_m2_per_long">%s/τετραγωνικό μέτρο</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_short">κμβ</string>
|
||||
<string name="speed_kn_display_name_long">κόμβος</string>
|
||||
<string name="speed_kn_nominative_short">%s κμβ</string>
|
||||
<string name="speed_kn_nominative_long">%s κόμβοι</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_short">μποφ.</string>
|
||||
<string name="speed_bf_display_name_long">μποφόρ</string>
|
||||
<string name="speed_bf_nominative_short">%s μποφ.</string>
|
||||
<string name="speed_bf_nominative_long">%s μποφόρ</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s ανά κυβικό μέτρο</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_short">λίτ.</string>
|
||||
<string name="volume_l_display_name_long">λίτρα</string>
|
||||
<string name="volume_l_nominative_short">%s λίτ.</string>
|
||||
<string name="volume_l_nominative_long">%s λίτρα</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">μικρογραμμάρια</string>
|
||||
<string name="weight_microg_nominative_long">%s μικρογραμμάρια</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">χιλιοστόγραμμα</string>
|
||||
<string name="weight_mg_nominative_long">%s χιλιοστόγραμμα</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">πασκάλ</string>
|
||||
<string name="pressure_pa_nominative_long">%s πασκάλ</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">εκτοπασκάλ</string>
|
||||
<string name="pressure_hpa_nominative_long">%s εκτοπασκάλ</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">κιλοπασκάλ</string>
|
||||
<string name="pressure_kpa_nominative_long">%s κιλοπασκάλ</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">μιλιμπάρ</string>
|
||||
<string name="pressure_mbar_nominative_long">%s μιλιμπάρ</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">ατμόσφαιρες</string>
|
||||
<string name="pressure_atm_nominative_long">%s ατμόσφαιρες</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">χιλιοστόμετρα στήλης υδραργύρου</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s χιλιοστόμετρα στήλης υδραργύρου</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">ίντσες στήλης υδραργύρου</string>
|
||||
<string name="pressure_inhg_nominative_long">%s ίντσες στήλης υδραργύρου</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s ώ.</string>
|
||||
<string name="duration_hr_nominative_long">%s ώρες</string>
|
||||
<string name="duration_hr_per_short">%s/ώ.</string>
|
||||
<string name="duration_hr_per_long">%s ανά ώρα</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s λεπ.</string>
|
||||
<string name="duration_min_nominative_long">%s λεπτά</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s δευτ.</string>
|
||||
<string name="duration_sec_nominative_long">%s δευτερόλεπτα</string>
|
||||
<string name="duration_sec_per_short">%s/δευτ.</string>
|
||||
<string name="duration_sec_per_long">%s ανά δευτερόλεπτο</string>
|
||||
|
||||
</resources>
|
||||
148
weather-unit/src/main/res/values-en-rAU/strings.xml
Normal file
148
weather-unit/src/main/res/values-en-rAU/strings.xml
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/en.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Decidegree Celsius -->
|
||||
<string name="temperature_dc_display_name_short">decideg C</string>
|
||||
<string name="temperature_dc_display_name_long">decidegrees Celsius</string>
|
||||
<string name="temperature_dc_nominative_long">%s decidegrees Celsius</string>
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_short">deg C</string>
|
||||
<string name="temperature_c_display_name_long">degrees Celsius</string>
|
||||
<string name="temperature_c_nominative_short">%s°C</string>
|
||||
<string name="temperature_c_nominative_long">%s degrees Celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_short">deg F</string>
|
||||
<string name="temperature_f_display_name_long">degrees Fahrenheit</string>
|
||||
<string name="temperature_f_nominative_short">%s°F</string>
|
||||
<string name="temperature_f_nominative_long">%s degrees Fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvins</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvins</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">micrometres</string>
|
||||
<string name="length_microm_nominative_long">%s micrometres</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">millimetres</string>
|
||||
<string name="length_mm_nominative_long">%s millimetres</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centimetres</string>
|
||||
<string name="length_cm_nominative_long">%s centimetres</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metres</string>
|
||||
<string name="length_m_nominative_long">%s metres</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometres</string>
|
||||
<string name="length_km_nominative_long">%s kilometres</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">inches</string>
|
||||
<string name="length_in_nominative_long">%s inches</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">feet</string>
|
||||
<string name="length_ft_nominative_long">%s feet</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">miles</string>
|
||||
<string name="length_mi_nominative_long">%s miles</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">nautical miles</string>
|
||||
<string name="length_nmi_nominative_long">%s nautical miles</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s per square metre</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">knots</string>
|
||||
<string name="speed_kn_nominative_long">%s knots</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_long">Beaufort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s per cubic metre</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litres</string>
|
||||
<string name="volume_l_nominative_long">%s litres</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">micrograms</string>
|
||||
<string name="weight_microg_nominative_long">%s micrograms</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">milligrams</string>
|
||||
<string name="weight_mg_nominative_long">%s milligrams</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascals</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascals</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hectopascals</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hectopascals</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopascals</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopascals</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">millibars</string>
|
||||
<string name="pressure_mbar_nominative_long">%s millibars</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmospheres</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmospheres</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">millimetres of mercury</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s millimetres of mercury</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">inches of mercury</string>
|
||||
<string name="pressure_inhg_nominative_long">%s inches of mercury</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s hr</string>
|
||||
<string name="duration_hr_nominative_long">%s hours</string>
|
||||
<string name="duration_hr_per_long">%s per hour</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minutes</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s sec</string>
|
||||
<string name="duration_sec_nominative_long">%s seconds</string>
|
||||
<string name="duration_sec_per_long">%s per second</string>
|
||||
|
||||
</resources>
|
||||
148
weather-unit/src/main/res/values-en-rCA/strings.xml
Normal file
148
weather-unit/src/main/res/values-en-rCA/strings.xml
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/en.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Decidegree Celsius -->
|
||||
<string name="temperature_dc_display_name_short">decideg C</string>
|
||||
<string name="temperature_dc_display_name_long">decidegrees Celsius</string>
|
||||
<string name="temperature_dc_nominative_long">%s decidegrees Celsius</string>
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_short">deg C</string>
|
||||
<string name="temperature_c_display_name_long">degrees Celsius</string>
|
||||
<string name="temperature_c_nominative_short">%s °C</string>
|
||||
<string name="temperature_c_nominative_long">%s degrees Celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_short">deg F</string>
|
||||
<string name="temperature_f_display_name_long">degrees Fahrenheit</string>
|
||||
<string name="temperature_f_nominative_short">%s °F</string>
|
||||
<string name="temperature_f_nominative_long">%s degrees Fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvin</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvin</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">micrometres</string>
|
||||
<string name="length_microm_nominative_long">%s micrometres</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">millimetres</string>
|
||||
<string name="length_mm_nominative_long">%s millimetres</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centimetres</string>
|
||||
<string name="length_cm_nominative_long">%s centimetres</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metres</string>
|
||||
<string name="length_m_nominative_long">%s metres</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometres</string>
|
||||
<string name="length_km_nominative_long">%s kilometres</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">inches</string>
|
||||
<string name="length_in_nominative_long">%s inches</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">feet</string>
|
||||
<string name="length_ft_nominative_long">%s feet</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">miles</string>
|
||||
<string name="length_mi_nominative_long">%s miles</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">nautical miles</string>
|
||||
<string name="length_nmi_nominative_long">%s nautical miles</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s per square metre</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">knots</string>
|
||||
<string name="speed_kn_nominative_long">%s knots</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_long">Beaufort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s per cubic metre</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litres</string>
|
||||
<string name="volume_l_nominative_long">%s litres</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">micrograms</string>
|
||||
<string name="weight_microg_nominative_long">%s micrograms</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">milligrams</string>
|
||||
<string name="weight_mg_nominative_long">%s milligrams</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascals</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascals</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hectopascals</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hectopascals</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopascals</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopascals</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">millibars</string>
|
||||
<string name="pressure_mbar_nominative_long">%s millibars</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmospheres</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmospheres</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">millimetres of mercury</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s millimetres of mercury</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">inches of mercury</string>
|
||||
<string name="pressure_inhg_nominative_long">%s inches of mercury</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s hr</string>
|
||||
<string name="duration_hr_nominative_long">%s hours</string>
|
||||
<string name="duration_hr_per_long">%s per hour</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minutes</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s sec</string>
|
||||
<string name="duration_sec_nominative_long">%s seconds</string>
|
||||
<string name="duration_sec_per_long">%s per second</string>
|
||||
|
||||
</resources>
|
||||
148
weather-unit/src/main/res/values-en-rGB/strings.xml
Normal file
148
weather-unit/src/main/res/values-en-rGB/strings.xml
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/en.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Decidegree Celsius -->
|
||||
<string name="temperature_dc_display_name_short">decideg. C</string>
|
||||
<string name="temperature_dc_display_name_long">decidegrees Celsius</string>
|
||||
<string name="temperature_dc_nominative_long">%s decidegrees Celsius</string>
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_short">deg. C</string>
|
||||
<string name="temperature_c_display_name_long">degrees Celsius</string>
|
||||
<string name="temperature_c_nominative_short">%s°C</string>
|
||||
<string name="temperature_c_nominative_long">%s degrees Celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_short">deg. F</string>
|
||||
<string name="temperature_f_display_name_long">degrees Fahrenheit</string>
|
||||
<string name="temperature_f_nominative_short">%s°F</string>
|
||||
<string name="temperature_f_nominative_long">%s degrees Fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvins</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvins</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">micrometres</string>
|
||||
<string name="length_microm_nominative_long">%s micrometres</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">millimetres</string>
|
||||
<string name="length_mm_nominative_long">%s millimetres</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centimetres</string>
|
||||
<string name="length_cm_nominative_long">%s centimetres</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metres</string>
|
||||
<string name="length_m_nominative_long">%s metres</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometres</string>
|
||||
<string name="length_km_nominative_long">%s kilometres</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">inches</string>
|
||||
<string name="length_in_nominative_long">%s inches</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">feet</string>
|
||||
<string name="length_ft_nominative_long">%s feet</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">miles</string>
|
||||
<string name="length_mi_nominative_long">%s miles</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">nautical miles</string>
|
||||
<string name="length_nmi_nominative_long">%s nautical miles</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s per square metre</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">knots</string>
|
||||
<string name="speed_kn_nominative_long">%s knots</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_long">Beaufort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s per cubic metre</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litres</string>
|
||||
<string name="volume_l_nominative_long">%s litres</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">micrograms</string>
|
||||
<string name="weight_microg_nominative_long">%s micrograms</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">milligrams</string>
|
||||
<string name="weight_mg_nominative_long">%s milligrams</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascals</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascals</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hectopascals</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hectopascals</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopascals</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopascals</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">millibars</string>
|
||||
<string name="pressure_mbar_nominative_long">%s millibars</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmospheres</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmospheres</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">millimetres of mercury</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s millimetres of mercury</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">inches of mercury</string>
|
||||
<string name="pressure_inhg_nominative_long">%s inches of mercury</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s hr</string>
|
||||
<string name="duration_hr_nominative_long">%s hours</string>
|
||||
<string name="duration_hr_per_long">%s per hour</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minutes</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s sec</string>
|
||||
<string name="duration_sec_nominative_long">%s seconds</string>
|
||||
<string name="duration_sec_per_long">%s per second</string>
|
||||
|
||||
</resources>
|
||||
148
weather-unit/src/main/res/values-en-rUS/strings.xml
Normal file
148
weather-unit/src/main/res/values-en-rUS/strings.xml
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/en.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Decidegree Celsius -->
|
||||
<string name="temperature_dc_display_name_short">decideg. C</string>
|
||||
<string name="temperature_dc_display_name_long">decidegrees Celsius</string>
|
||||
<string name="temperature_dc_nominative_long">%s decidegrees Celsius</string>
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_short">deg. C</string>
|
||||
<string name="temperature_c_display_name_long">degrees Celsius</string>
|
||||
<string name="temperature_c_nominative_short">%s°C</string>
|
||||
<string name="temperature_c_nominative_long">%s degrees Celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_short">deg. F</string>
|
||||
<string name="temperature_f_display_name_long">degrees Fahrenheit</string>
|
||||
<string name="temperature_f_nominative_short">%s°F</string>
|
||||
<string name="temperature_f_nominative_long">%s degrees Fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvins</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvins</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">micrometers</string>
|
||||
<string name="length_microm_nominative_long">%s micrometers</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">millimeters</string>
|
||||
<string name="length_mm_nominative_long">%s millimeters</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centimeters</string>
|
||||
<string name="length_cm_nominative_long">%s centimeters</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">meters</string>
|
||||
<string name="length_m_nominative_long">%s meters</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometers</string>
|
||||
<string name="length_km_nominative_long">%s kilometers</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">inches</string>
|
||||
<string name="length_in_nominative_long">%s inches</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">feet</string>
|
||||
<string name="length_ft_nominative_long">%s feet</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">miles</string>
|
||||
<string name="length_mi_nominative_long">%s miles</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">nautical miles</string>
|
||||
<string name="length_nmi_nominative_long">%s nautical miles</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s per square meter</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">knots</string>
|
||||
<string name="speed_kn_nominative_long">%s knots</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_long">Beaufort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s per cubic meter</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">liters</string>
|
||||
<string name="volume_l_nominative_long">%s liters</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">micrograms</string>
|
||||
<string name="weight_microg_nominative_long">%s micrograms</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">milligrams</string>
|
||||
<string name="weight_mg_nominative_long">%s milligrams</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascals</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascals</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hectopascals</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hectopascals</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopascals</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopascals</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">millibars</string>
|
||||
<string name="pressure_mbar_nominative_long">%s millibars</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmospheres</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmospheres</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">millimeters of mercury</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s millimeters of mercury</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">inches of mercury</string>
|
||||
<string name="pressure_inhg_nominative_long">%s inches of mercury</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s hr</string>
|
||||
<string name="duration_hr_nominative_long">%s hours</string>
|
||||
<string name="duration_hr_per_long">%s per hour</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minutes</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s sec</string>
|
||||
<string name="duration_sec_nominative_long">%s seconds</string>
|
||||
<string name="duration_sec_per_long">%s per second</string>
|
||||
|
||||
</resources>
|
||||
147
weather-unit/src/main/res/values-eo/strings.xml
Normal file
147
weather-unit/src/main/res/values-eo/strings.xml
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/eo.html -->
|
||||
<!-- Completed with Wikipedia data, when lacking in CLDR -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Decidegree Celsius -->
|
||||
<string name="temperature_dc_display_name_long">decigradoj de Celsio</string>
|
||||
<string name="temperature_dc_nominative_long">%s decigradoj de Celsio</string>
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">gradoj de Celsio</string>
|
||||
<string name="temperature_c_nominative_long">%s gradoj de Celsio</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">gradoj farenhejta</string>
|
||||
<string name="temperature_f_nominative_long">%s gradoj farenhejta</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvinoj</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvinoj</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">mikrometroj</string>
|
||||
<string name="length_microm_nominative_long">%s mikrometroj</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">milimetroj</string>
|
||||
<string name="length_mm_nominative_long">%s milimetroj</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centimetroj</string>
|
||||
<string name="length_cm_nominative_long">%s centimetroj</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metroj</string>
|
||||
<string name="length_m_nominative_long">%s metroj</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometroj</string>
|
||||
<string name="length_km_nominative_long">%s kilometroj</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">coloj</string>
|
||||
<string name="length_in_nominative_long">%s coloj</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">futoj</string>
|
||||
<string name="length_ft_nominative_long">%s futoj</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">mejloj</string>
|
||||
<string name="length_mi_nominative_long">%s mejloj</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">marmejloj</string>
|
||||
<string name="length_nmi_nominative_long">%s marmejloj</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s je kvadratmetro</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">knotoj</string>
|
||||
<string name="speed_kn_nominative_long">%s knotoj</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Boforto</string>
|
||||
<string name="speed_bf_nominative_long">Boforto %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s je kubmetro</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litroj</string>
|
||||
<string name="volume_l_nominative_long">%s litroj</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">mikrogramoj</string>
|
||||
<string name="weight_microg_nominative_long">%s mikrogramoj</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">miligramoj</string>
|
||||
<string name="weight_mg_nominative_long">%s miligramoj</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">paskaloj</string>
|
||||
<string name="pressure_pa_nominative_long">%s paskaloj</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hektopaskaloj</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hektopaskaloj</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopaskaloj</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopaskaloj</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">milibaroj</string>
|
||||
<string name="pressure_mbar_nominative_long">%s milibaroj</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosferoj</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosferoj</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">milimetroj da hidrargo</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s milimetroj da hidrargo</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">coloj da hidrargo</string>
|
||||
<string name="pressure_inhg_nominative_long">%s coloj da hidrargo</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s h.</string>
|
||||
<string name="duration_hr_nominative_long">%s horoj</string>
|
||||
<string name="duration_hr_per_short">%s/h.</string>
|
||||
<string name="duration_hr_per_long">%s por horo</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s m.</string>
|
||||
<string name="duration_min_nominative_long">%s minutoj</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s s.</string>
|
||||
<string name="duration_sec_nominative_long">%s sekundoj</string>
|
||||
<string name="duration_sec_per_short">%s/s.</string>
|
||||
<string name="duration_sec_per_long">%s por sekundo</string>
|
||||
|
||||
</resources>
|
||||
139
weather-unit/src/main/res/values-es/strings.xml
Normal file
139
weather-unit/src/main/res/values-es/strings.xml
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/es.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">grados Celsius</string>
|
||||
<string name="temperature_c_nominative_long">%s grados Celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">grados Fahrenheit</string>
|
||||
<string name="temperature_f_nominative_long">%s grados Fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvin</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvin</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">micrómetros</string>
|
||||
<string name="length_microm_nominative_long">%s micrómetros</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">milímetros</string>
|
||||
<string name="length_mm_nominative_long">%s milímetros</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centímetros</string>
|
||||
<string name="length_cm_nominative_long">%s centímetros</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metros</string>
|
||||
<string name="length_m_nominative_long">%s metros</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilómetros</string>
|
||||
<string name="length_km_nominative_long">%s kilómetros</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">pulgadas</string>
|
||||
<string name="length_in_nominative_long">%s pulgadas</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">pies</string>
|
||||
<string name="length_ft_nominative_long">%s pies</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">millas</string>
|
||||
<string name="length_mi_nominative_long">%s millas</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">M</string>
|
||||
<string name="length_nmi_display_name_long">millas náuticas</string>
|
||||
<string name="length_nmi_nominative_short">%s M</string>
|
||||
<string name="length_nmi_nominative_long">%s millas náuticas</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s por metro cuadrado</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">nudos</string>
|
||||
<string name="speed_kn_nominative_long">%s nudos</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_long">Beaufort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s por metro cúbico</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litros</string>
|
||||
<string name="volume_l_nominative_long">%s litros</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">microgramos</string>
|
||||
<string name="weight_microg_nominative_long">%s microgramos</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">miligramos</string>
|
||||
<string name="weight_mg_nominative_long">%s miligramos</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascales</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascales</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hectopascals</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hectopascales</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopascals</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopascales</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">milibares</string>
|
||||
<string name="pressure_mbar_nominative_long">%s milibares</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmósferas</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmósferas</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">milímetros de mercurio</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s milímetros de mercurio</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">pulgadas de mercurio</string>
|
||||
<string name="pressure_inhg_nominative_long">%s pulgadas de mercurio</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_long">%s horas</string>
|
||||
<string name="duration_hr_per_long">%s por hora</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minutos</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_long">%s segundos</string>
|
||||
<string name="duration_sec_per_long">%s por segundo</string>
|
||||
|
||||
</resources>
|
||||
145
weather-unit/src/main/res/values-et/strings.xml
Normal file
145
weather-unit/src/main/res/values-et/strings.xml
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/et.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">Celsiuse kraadid</string>
|
||||
<string name="temperature_c_nominative_long">%s Celsiuse kraadi</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">Fahrenheiti kraadid</string>
|
||||
<string name="temperature_f_nominative_long">%s Fahrenheiti kraadi</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvinid</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvinit</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">mikromeetrid</string>
|
||||
<string name="length_microm_nominative_long">%s mikromeetrit</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">millimeetrid</string>
|
||||
<string name="length_mm_nominative_long">%s millimeetrit</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">sentimeetrid</string>
|
||||
<string name="length_cm_nominative_long">%s sentimeetrit</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">meetrid</string>
|
||||
<string name="length_m_nominative_long">%s meetrit</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilomeetrid</string>
|
||||
<string name="length_km_nominative_long">%s kilomeetrit</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">tollid</string>
|
||||
<string name="length_in_nominative_long">%s tolli</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">jalad</string>
|
||||
<string name="length_ft_nominative_long">%s jalga</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">miilid</string>
|
||||
<string name="length_mi_nominative_long">%s miili</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">meremiilid</string>
|
||||
<string name="length_nmi_nominative_long">%s meremiili</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s ruutmeetri kohta</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">sõlm</string>
|
||||
<string name="speed_kn_nominative_long">%s sõlme</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_long">Beaufort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s kuupmeetri kohta</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">liitrid</string>
|
||||
<string name="volume_l_nominative_long">%s liitrit</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">mikrogrammid</string>
|
||||
<string name="weight_microg_nominative_long">%s mikrogrammi</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">milligrammid</string>
|
||||
<string name="weight_mg_nominative_long">%s milligrammi</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">paskalid</string>
|
||||
<string name="pressure_pa_nominative_long">%s paskalit</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hektopaskalid</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hektopaskalit</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopascalid</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopaskalit</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">millibaarid</string>
|
||||
<string name="pressure_mbar_nominative_long">%s millibaari</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosfäärid</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosfääri</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mm Hg</string>
|
||||
<string name="pressure_mmhg_display_name_long">millimeetrid elavhõbedasammast</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s millimeetrid elavhõbedasammast</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_short">in Hg</string>
|
||||
<string name="pressure_inhg_display_name_long">tollid elavhõbedasammast</string>
|
||||
<string name="pressure_inhg_nominative_short">%s in Hg</string>
|
||||
<string name="pressure_inhg_nominative_long">%s tollid elavhõbedasammast</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s t</string>
|
||||
<string name="duration_hr_nominative_long">%s tundi</string>
|
||||
<string name="duration_hr_per_short">%s/t</string>
|
||||
<string name="duration_hr_per_long">%s tunnis</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minutit</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s sek</string>
|
||||
<string name="duration_sec_nominative_long">%s sekundit</string>
|
||||
<string name="duration_sec_per_short">%s/sek</string>
|
||||
<string name="duration_sec_per_long">%s sekundis</string>
|
||||
|
||||
</resources>
|
||||
143
weather-unit/src/main/res/values-eu/strings.xml
Normal file
143
weather-unit/src/main/res/values-eu/strings.xml
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/eu.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">Celsius graduak</string>
|
||||
<string name="temperature_c_nominative_long">%s Celsius gradu</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">Fahrenheit graduak</string>
|
||||
<string name="temperature_f_nominative_long">%s Fahrenheit gradu</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvin graduak</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvin gradu</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">mikrometro</string>
|
||||
<string name="length_microm_nominative_long">%s mikrometro</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">milimetro</string>
|
||||
<string name="length_mm_nominative_long">%s milimetro</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">zentimetro</string>
|
||||
<string name="length_cm_nominative_long">%s zentimetro</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metro</string>
|
||||
<string name="length_m_nominative_long">%s metro</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometro</string>
|
||||
<string name="length_km_nominative_long">%s kilometro</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">hazbete</string>
|
||||
<string name="length_in_nominative_long">%s hazbete</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">oin</string>
|
||||
<string name="length_ft_nominative_long">%s oin</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">milia</string>
|
||||
<string name="length_mi_nominative_long">%s milia</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">milia nautiko</string>
|
||||
<string name="length_nmi_nominative_long">%s milia nautiko</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s metro karratu bakoitzeko</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">korapilo</string>
|
||||
<string name="speed_kn_nominative_long">%s korapilo</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_short">BFT</string>
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_long">Beaufort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s metro kubiko bakoitzeko</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litro</string>
|
||||
<string name="volume_l_nominative_long">%s litro</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">mikrogramoak</string>
|
||||
<string name="weight_microg_nominative_long">%s mikrogramo</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">miligramoak</string>
|
||||
<string name="weight_mg_nominative_long">%s miligramo</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascal</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascal</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hektopascalak</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hektopascal</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopascal</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopascal</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_short">mb</string>
|
||||
<string name="pressure_mbar_display_name_long">milibarrak</string>
|
||||
<string name="pressure_mbar_nominative_short">%s mb</string>
|
||||
<string name="pressure_mbar_nominative_long">%s milibar</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<!-- The two below are marked for short, but I believe this is an error -->
|
||||
<string name="pressure_atm_display_name_long">atmosfera</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosfera</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mm Hg</string>
|
||||
<string name="pressure_mmhg_display_name_long">merkurio-milimetroak</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s merkurio-milimetro</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">merkurio-hazbeteak</string>
|
||||
<string name="pressure_inhg_nominative_long">%s merkurio-hazbete</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_long">%s ordu</string>
|
||||
<string name="duration_hr_per_long">%s ordu bakoitzeko</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minutu</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_long">%s segundo</string>
|
||||
<string name="duration_sec_per_long">%s segundo bakoitzeko</string>
|
||||
|
||||
</resources>
|
||||
146
weather-unit/src/main/res/values-fa/strings.xml
Normal file
146
weather-unit/src/main/res/values-fa/strings.xml
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/fa.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">درجهٔ سلسیوس</string>
|
||||
<string name="temperature_c_nominative_long">%s درجهٔ سلسیوس</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">درجهٔ فارنهایت</string>
|
||||
<string name="temperature_f_nominative_long">%s درجهٔ فارنهایت</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">درجهٔ کلوین</string>
|
||||
<string name="temperature_k_nominative_long">%s درجهٔ کلوین</string>
|
||||
|
||||
<!-- Value separator -->
|
||||
<string name="locale_separator">،\u0020</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_short">میکرومتر</string>
|
||||
<string name="length_microm_nominative_short">%s میکرومتر</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_short">میلیمتر</string>
|
||||
<string name="length_mm_nominative_short">%s میلیمتر</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_short">سانتیمتر</string>
|
||||
<string name="length_cm_nominative_short">%s سانتیمتر</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_short">متر</string>
|
||||
<string name="length_m_nominative_short">%s متر</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_short">کیلومتر</string>
|
||||
<string name="length_km_nominative_short">%s کیلومتر</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">اینچ</string>
|
||||
<string name="length_in_nominative_short">%s اینچ</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">فوت</string>
|
||||
<string name="length_ft_nominative_short">%s فوت</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_short">مایل</string>
|
||||
<string name="length_mi_nominative_short">%s مایل</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">مایل دریایی</string>
|
||||
<string name="length_nmi_nominative_short">%s مایل دریایی</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s در متر مربع</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_short">گره</string>
|
||||
<string name="speed_kn_nominative_short">%s گره</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_short">بوفورت</string>
|
||||
<string name="speed_bf_nominative_short">%s بوفورت</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s در متر مکعب</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_short">لیتر</string>
|
||||
<string name="volume_l_nominative_short">%sL</string>
|
||||
<string name="volume_l_nominative_long">%s لیتر</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">میکروگرم</string>
|
||||
<string name="weight_microg_nominative_long">%s میکروگرم</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">میلیگرم</string>
|
||||
<string name="weight_mg_nominative_long">%s میلیگرم</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_short">پاسکال</string>
|
||||
<string name="pressure_pa_nominative_short">%s پاسکال</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_short">هکتوپاسکال</string>
|
||||
<string name="pressure_hpa_nominative_short">%s هکتوپاسکال</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_short">ک.پاسکال</string>
|
||||
<string name="pressure_kpa_display_name_long">کیلوپاسکال</string>
|
||||
<string name="pressure_kpa_nominative_short">%s ک.پاسکال</string>
|
||||
<string name="pressure_kpa_nominative_long">%s کیلوپاسکال</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_short">میلیبار</string>
|
||||
<string name="pressure_mbar_nominative_short">%s میلیبار</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">اتمسفر</string>
|
||||
<string name="pressure_atm_nominative_long">%s اتمسفر</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">میلیمتر جیوه</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s مم جیوه</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s میلیمتر جیوه</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_short">اینچ جیوه</string>
|
||||
<string name="pressure_inhg_nominative_short">%s اینچ جیوه</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s ساعت</string>
|
||||
<string name="duration_hr_per_short">%s/ساعت</string>
|
||||
<string name="duration_hr_per_long">%s در ساعت</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s دقیقه</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s ثانیه</string>
|
||||
<string name="duration_sec_per_short">%s/ثانیه</string>
|
||||
<string name="duration_sec_per_long">%s در ثانیه</string>
|
||||
|
||||
</resources>
|
||||
141
weather-unit/src/main/res/values-fi/strings.xml
Normal file
141
weather-unit/src/main/res/values-fi/strings.xml
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/fi.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">celsiusasteet</string>
|
||||
<string name="temperature_c_nominative_long">%s celsiusastetta</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">fahrenheitasteet</string>
|
||||
<string name="temperature_f_nominative_long">%s fahrenheitastetta</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvinit</string>
|
||||
<string name="temperature_k_nominative_long">%s kelviniä</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">mikrometrit</string>
|
||||
<string name="length_microm_nominative_long">%s mikrometriä</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">millimetrit</string>
|
||||
<string name="length_mm_nominative_long">%s millimetriä</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">senttimetrit</string>
|
||||
<string name="length_cm_nominative_long">%s senttimetriä</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metrit</string>
|
||||
<string name="length_m_nominative_long">%s metriä</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometrit</string>
|
||||
<string name="length_km_nominative_long">%s kilometriä</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">tuumat</string>
|
||||
<string name="length_in_nominative_long">%s tuumaa</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">jalat</string>
|
||||
<string name="length_ft_nominative_long">%s jalkaa</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">mailit</string>
|
||||
<string name="length_mi_nominative_long">%s mailia</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">mpk</string>
|
||||
<string name="length_nmi_display_name_long">meripeninkulmat</string>
|
||||
<string name="length_nmi_nominative_short">%s mpk</string>
|
||||
<string name="length_nmi_nominative_long">%s meripeninkulmaa</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s / neliömetri</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">solmut</string>
|
||||
<string name="speed_kn_nominative_long">%s solmua</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">bofori</string>
|
||||
<string name="speed_bf_nominative_long">%s boforia</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s / kuutiometri</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litrat</string>
|
||||
<string name="volume_l_nominative_long">%s litraa</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">mikrogrammat</string>
|
||||
<string name="weight_microg_nominative_long">%s mikrogrammaa</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">milligrammat</string>
|
||||
<string name="weight_mg_nominative_long">%s milligrammaa</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascalit</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascalia</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hehtopascalit</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hehtopascalia</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopascalit</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopascalia</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">millibaarit</string>
|
||||
<string name="pressure_mbar_nominative_long">%s millibaaria</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">normaali-ilmakehät</string>
|
||||
<string name="pressure_atm_nominative_long">%s normaali-ilmakehää</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">elohopeamillimetrit</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s elohopeamillimetriä</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">elohopeatuumat</string>
|
||||
<string name="pressure_inhg_nominative_long">%s elohopeatuumaa</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s t</string>
|
||||
<string name="duration_hr_nominative_long">%s tuntia</string>
|
||||
<string name="duration_hr_per_short">%s/t</string>
|
||||
<string name="duration_hr_per_long">%s / tunti</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minuuttia</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_long">%s sekuntia</string>
|
||||
<string name="duration_sec_per_long">%s / sekunti</string>
|
||||
|
||||
</resources>
|
||||
143
weather-unit/src/main/res/values-fr/strings.xml
Normal file
143
weather-unit/src/main/res/values-fr/strings.xml
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/fr.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Decidegree Celsius -->
|
||||
<string name="temperature_dc_display_name_long">decidegrés Celsius</string>
|
||||
<string name="temperature_dc_nominative_long">%s decidegrés Celsius</string>
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">degrés Celsius</string>
|
||||
<string name="temperature_c_nominative_long">%s degrés Celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">degrés Fahrenheit</string>
|
||||
<string name="temperature_f_nominative_long">%s degrés Fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvins</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvins</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">micromètres</string>
|
||||
<string name="length_microm_nominative_long">%s micromètres</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">millimètres</string>
|
||||
<string name="length_mm_nominative_long">%s millimètres</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centimètres</string>
|
||||
<string name="length_cm_nominative_long">%s centimètres</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">mètres</string>
|
||||
<string name="length_m_nominative_long">%s mètres</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilomètres</string>
|
||||
<string name="length_km_nominative_long">%s kilomètres</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">pouces</string>
|
||||
<string name="length_in_nominative_long">%s pouces</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">pieds</string>
|
||||
<string name="length_ft_nominative_long">%s pieds</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">miles</string>
|
||||
<string name="length_mi_nominative_long">%s miles</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">milles marins</string>
|
||||
<string name="length_nmi_nominative_long">%s milles marins</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s par mètre carré</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">nœuds</string>
|
||||
<string name="speed_kn_nominative_long">%s nœuds</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_short">Bf</string>
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_short">%s Bf</string>
|
||||
<string name="speed_bf_nominative_long">%s degrés Beaufort</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s par mètre cube</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litres</string>
|
||||
<string name="volume_l_nominative_long">%s litres</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">microgrammes</string>
|
||||
<string name="weight_microg_nominative_long">%s microgrammes</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">milligrammes</string>
|
||||
<string name="weight_mg_nominative_long">%s milligrammes</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascals</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascals</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hectopascals</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hectopascals</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopascals</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopascals</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">millibars</string>
|
||||
<string name="pressure_mbar_nominative_long">%s millibars</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosphères</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosphères</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">millimètres de mercure</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s millimètres de mercure</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">pouces de mercure</string>
|
||||
<string name="pressure_inhg_nominative_long">%s pouces de mercure</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_long">%s heures</string>
|
||||
<string name="duration_hr_per_long">%s par heure</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minutes</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_long">%s secondes</string>
|
||||
<string name="duration_sec_per_long">%s par seconde</string>
|
||||
|
||||
</resources>
|
||||
146
weather-unit/src/main/res/values-ga/strings.xml
Normal file
146
weather-unit/src/main/res/values-ga/strings.xml
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/ga.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">céimeanna Celsius</string>
|
||||
<string name="temperature_c_nominative_long">%s céim Celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">céimeanna Fahrenheit</string>
|
||||
<string name="temperature_f_nominative_long">%s céim Fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">céimeanna ceilvin</string>
|
||||
<string name="temperature_k_nominative_long">%s céim ceilvin</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_short">μméadair</string>
|
||||
<string name="length_microm_display_name_long">micriméadair</string>
|
||||
<string name="length_microm_nominative_long">%s micriméadar</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">milliméadair</string>
|
||||
<string name="length_mm_nominative_long">%s milliméadar</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">ceintiméadair</string>
|
||||
<string name="length_cm_nominative_long">%s ceintiméadar</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">méadair</string>
|
||||
<string name="length_m_nominative_long">%s méadar</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">ciliméadair</string>
|
||||
<string name="length_km_nominative_long">%s ciliméadar</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">or.</string>
|
||||
<string name="length_in_display_name_long">orlaí</string>
|
||||
<string name="length_in_nominative_short">%s or.</string>
|
||||
<string name="length_in_nominative_long">%s orlach</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">tr.</string>
|
||||
<string name="length_ft_display_name_long">troithe</string>
|
||||
<string name="length_ft_nominative_short">%s tr.</string>
|
||||
<string name="length_ft_nominative_long">%s thr.</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">mílte</string>
|
||||
<string name="length_mi_nominative_long">%s míle</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">muirmh.</string>
|
||||
<string name="length_nmi_nominative_short">%s muirmh.</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s sa mhéadar cearnach</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">mrml/u</string>
|
||||
<string name="speed_kn_nominative_long">%s mrml/u</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_long">Beaufort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s sa mhéadar ciúbach</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">lítir</string>
|
||||
<string name="volume_l_nominative_long">%s lítear</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">micreagraim</string>
|
||||
<string name="weight_microg_nominative_long">%s micreagram</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">milleagraim</string>
|
||||
<string name="weight_mg_nominative_long">%s milleagram</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">Pascail</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascal</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">heicteapascail</string>
|
||||
<string name="pressure_hpa_nominative_long">%s heicteapascal</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">cileapascail</string>
|
||||
<string name="pressure_kpa_nominative_long">%s cileapascal</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">milleabair</string>
|
||||
<string name="pressure_mbar_nominative_long">%s milleabar</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmaisféir</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmaisféir</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mm Hg</string>
|
||||
<string name="pressure_mmhg_display_name_long">milliméadair mearcair</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s mhilliméadar mearcair</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_short">orlaí Hg</string>
|
||||
<string name="pressure_inhg_display_name_long">orlaí mearcair</string>
|
||||
<string name="pressure_inhg_nominative_short">%s or. Hg</string>
|
||||
<string name="pressure_inhg_nominative_long">%s orlach mearcair</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s u</string>
|
||||
<string name="duration_hr_per_short">%s/u</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s nóim</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s soic</string>
|
||||
<string name="duration_sec_per_short">%s/s</string>
|
||||
|
||||
</resources>
|
||||
141
weather-unit/src/main/res/values-gl/strings.xml
Normal file
141
weather-unit/src/main/res/values-gl/strings.xml
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/gl.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">graos Celsius</string>
|
||||
<string name="temperature_c_nominative_long">%s graos Celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">graos Fahrenheit</string>
|
||||
<string name="temperature_f_nominative_long">%s graos Fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvins</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvins</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">micrómetros</string>
|
||||
<string name="length_microm_nominative_long">%s micrómetros</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">milímetros</string>
|
||||
<string name="length_mm_nominative_long">%s milímetros</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centímetros</string>
|
||||
<string name="length_cm_nominative_long">%s centímetros</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metros</string>
|
||||
<string name="length_m_nominative_long">%s metros</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">quilómetros</string>
|
||||
<string name="length_km_nominative_long">%s quilómetros</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">polg.</string>
|
||||
<string name="length_in_display_name_long">polgadas</string>
|
||||
<string name="length_in_nominative_long">%s polgadas</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">pés</string>
|
||||
<string name="length_ft_nominative_long">%s pés</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">millas</string>
|
||||
<string name="length_mi_nominative_long">%s millas</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">M</string>
|
||||
<string name="length_nmi_display_name_long">millas náuticas</string>
|
||||
<string name="length_nmi_nominative_short">%s M</string>
|
||||
<string name="length_nmi_nominative_long">%s millas náuticas</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s por metro cadrado</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_short">nós</string>
|
||||
<string name="speed_kn_nominative_short">%s nós</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_short">Bft %s</string>
|
||||
<string name="speed_bf_nominative_long">Beaufort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s por metro cúbico</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litros</string>
|
||||
<string name="volume_l_nominative_long">%s litros</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">microgramos</string>
|
||||
<string name="weight_microg_nominative_long">%s microgramos</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">miligramos</string>
|
||||
<string name="weight_mg_nominative_long">%s miligramos</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascais</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascais</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hectopascais</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hectopascais</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">quilopascais</string>
|
||||
<string name="pressure_kpa_nominative_long">%s quilopascais</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">milibares</string>
|
||||
<string name="pressure_mbar_nominative_long">%s milibares</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosferas</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosferas</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">milímetros de mercurio</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s milímetros de mercurio</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">polgadas de mercurio</string>
|
||||
<string name="pressure_inhg_nominative_long">%s polgadas de mercurio</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_long">%s horas</string>
|
||||
<string name="duration_hr_per_long">%s por hora</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minutos</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_long">%s segundos</string>
|
||||
<string name="duration_sec_per_long">%s por segundo</string>
|
||||
|
||||
</resources>
|
||||
159
weather-unit/src/main/res/values-he/strings.xml
Normal file
159
weather-unit/src/main/res/values-he/strings.xml
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/he.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">מעלות צלזיוס</string>
|
||||
<string name="temperature_c_nominative_long">%s מעלות צלזיוס</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">מעלות פרנהייט</string>
|
||||
<string name="temperature_f_nominative_long">%s מעלות פרנהייט</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">מעלות קלווין</string>
|
||||
<string name="temperature_k_nominative_long">%s קלווין</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">מיקרומטרים</string>
|
||||
<string name="length_microm_nominative_long">%s מיקרומטרים</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_short">מ״מ</string>
|
||||
<string name="length_mm_display_name_long">מילימטרים</string>
|
||||
<string name="length_mm_nominative_short">%s מ״מ</string>
|
||||
<string name="length_mm_nominative_long">%s מילימטרים</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_short">ס״מ</string>
|
||||
<string name="length_cm_display_name_long">סנטימטרים</string>
|
||||
<string name="length_cm_nominative_short">%s ס״מ</string>
|
||||
<string name="length_cm_nominative_long">%s סנטימטרים</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_short">מטרים</string>
|
||||
<string name="length_m_nominative_short">%s מ׳</string>
|
||||
<string name="length_m_nominative_long">%s מטרים</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_short">ק״מ</string>
|
||||
<string name="length_km_display_name_long">קילומטרים</string>
|
||||
<string name="length_km_nominative_short">%s ק״מ</string>
|
||||
<string name="length_km_nominative_long">%s קילומטרים</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">אינץ׳</string>
|
||||
<string name="length_in_nominative_long">%s אינץ׳</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">רגל</string>
|
||||
<string name="length_ft_nominative_long">%s רגל</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_short">מייל</string>
|
||||
<string name="length_mi_nominative_short">%s מייל</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">מ״י</string>
|
||||
<string name="length_nmi_display_name_long">מייל ימי</string>
|
||||
<string name="length_nmi_nominative_short">%s מ״י</string>
|
||||
<string name="length_nmi_nominative_long">%s מייל ימי</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_short">%s/מ״ר</string>
|
||||
<string name="area_m2_per_long">%s למטר רבוע</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">קשר</string>
|
||||
<string name="speed_kn_nominative_long">%s קשר</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">בופורט</string>
|
||||
<string name="speed_bf_nominative_long">%s בופורט</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s/מטר מעוקב</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_short">ליטר</string>
|
||||
<string name="volume_l_nominative_short">%s ל׳</string>
|
||||
<string name="volume_l_nominative_long">%s ליטר</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_short">מק״ג</string>
|
||||
<string name="weight_microg_display_name_long">מיקרוגרם</string>
|
||||
<string name="weight_microg_nominative_short">%s מק״ג</string>
|
||||
<string name="weight_microg_nominative_long">%s מיקרוגרם</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_short">מ״ג</string>
|
||||
<string name="weight_mg_display_name_long">מיליגרם</string>
|
||||
<string name="weight_mg_nominative_short">%s מ״ג</string>
|
||||
<string name="weight_mg_nominative_long">%s מיליגרם</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">פסקל</string>
|
||||
<string name="pressure_pa_nominative_long">%s פסקל</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">הקטופסקל</string>
|
||||
<string name="pressure_hpa_nominative_long">%s הקטופסקל</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">קילו-פסקל</string>
|
||||
<string name="pressure_kpa_nominative_long">%s קילו-פסקל</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">מיליבר</string>
|
||||
<string name="pressure_mbar_nominative_long">%s מיליבר</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">אטמוספרות</string>
|
||||
<string name="pressure_atm_nominative_long">%s אטמוספרות</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mm Hg</string>
|
||||
<string name="pressure_mmhg_display_name_long">מילימטר כספית</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s מילימטר כספית</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">אינץ׳ כספית</string>
|
||||
<string name="pressure_inhg_nominative_long">%s אינץ׳ כספית</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s שע׳</string>
|
||||
<string name="duration_hr_nominative_long">%s שעות</string>
|
||||
<string name="duration_hr_per_short">%s/שעה</string>
|
||||
<string name="duration_hr_per_long">%s לשעה</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s דק׳</string>
|
||||
<string name="duration_min_nominative_long">%s דקות</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s שנ׳</string>
|
||||
<string name="duration_sec_nominative_long">%s שניות</string>
|
||||
<string name="duration_sec_per_short">%s/שנ׳</string>
|
||||
<string name="duration_sec_per_long">%s לשניה</string>
|
||||
|
||||
</resources>
|
||||
170
weather-unit/src/main/res/values-hi/strings.xml
Normal file
170
weather-unit/src/main/res/values-hi/strings.xml
Normal file
|
|
@ -0,0 +1,170 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/hi.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_short">°से॰</string>
|
||||
<string name="temperature_c_display_name_long">डिग्री सेल्सियस</string>
|
||||
<string name="temperature_c_nominative_short">%s°से॰</string>
|
||||
<string name="temperature_c_nominative_long">%s डिग्री सेल्सियस</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_short">°फ़ेरन</string>
|
||||
<string name="temperature_f_display_name_long">डिग्री फ़ेरनहाइट</string>
|
||||
<string name="temperature_f_nominative_short">%s°फ़ेरन</string>
|
||||
<string name="temperature_f_nominative_long">%s डिग्री फ़ेरनहाइट</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">केल्विन</string>
|
||||
<string name="temperature_k_nominative_long">%s केल्विन</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_short">μ मा॰मी॰</string>
|
||||
<string name="length_microm_display_name_long">माइक्रोमीटर</string>
|
||||
<string name="length_microm_nominative_short">%s μ मा॰मी॰</string>
|
||||
<string name="length_microm_nominative_long">%s माइक्रोमीटर</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_short">मि॰मी॰</string>
|
||||
<string name="length_mm_display_name_long">मिलीमीटर</string>
|
||||
<string name="length_mm_nominative_short">%s मि॰मी॰</string>
|
||||
<string name="length_mm_nominative_long">%s मिलीमीटर</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_short">सें॰मी॰</string>
|
||||
<string name="length_cm_display_name_long">सेंटीमीटर</string>
|
||||
<string name="length_cm_nominative_short">%s सें॰मी॰</string>
|
||||
<string name="length_cm_nominative_long">%s सेंटीमीटर</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_short">मीटर</string>
|
||||
<string name="length_m_nominative_short">%s मी</string>
|
||||
<string name="length_m_nominative_long">%s मीटर</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_short">कि॰मी॰</string>
|
||||
<string name="length_km_display_name_long">किलोमीटर</string>
|
||||
<string name="length_km_nominative_short">%s कि॰मी॰</string>
|
||||
<string name="length_km_nominative_long">%s किलोमीटर</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">इंच</string>
|
||||
<string name="length_in_nominative_short">%s इंच</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">फ़ीट</string>
|
||||
<string name="length_ft_nominative_long">%s फ़ीट</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_short">मील</string>
|
||||
<string name="length_mi_nominative_short">%s मील</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">नॉ॰ मी॰</string>
|
||||
<string name="length_nmi_display_name_long">नॉटिकल मील</string>
|
||||
<string name="length_nmi_nominative_short">%s नॉ॰ मी॰</string>
|
||||
<string name="length_nmi_nominative_long">%s नॉटिकल मील</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_short">%s/वर्ग मी</string>
|
||||
<string name="area_m2_per_long">%s/वर्ग मीटर</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_short">नॉट</string>
|
||||
<string name="speed_kn_nominative_short">%s नॉट</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_short">ब्यूफ़ोर्ट</string>
|
||||
<string name="speed_bf_nominative_short">ब्यूफ़ोर्ट %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_short">%s/घन मी॰</string>
|
||||
<string name="volume_m3_per_long">%s/घन मीटर</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_short">लीटर</string>
|
||||
<string name="volume_l_nominative_short">%s ली॰</string>
|
||||
<string name="volume_l_nominative_long">%s लीटर</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_short">मा॰ग्रा॰</string>
|
||||
<string name="weight_microg_display_name_long">माइक्रोग्राम</string>
|
||||
<string name="weight_microg_nominative_short">%s मा॰ग्रा॰</string>
|
||||
<string name="weight_microg_nominative_long">%s माइक्रोग्राम</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_short">मि॰ग्रा॰</string>
|
||||
<string name="weight_mg_display_name_long">मिलीग्राम</string>
|
||||
<string name="weight_mg_nominative_short">%s मि॰ग्रा॰</string>
|
||||
<string name="weight_mg_nominative_long">%s मिलीग्राम</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_short">पा॰</string>
|
||||
<string name="pressure_pa_display_name_long">पास्कल</string>
|
||||
<string name="pressure_pa_nominative_short">%s पा॰</string>
|
||||
<string name="pressure_pa_nominative_long">%s पास्कल</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">हेक्टोपास्कल</string>
|
||||
<string name="pressure_hpa_nominative_long">%s हेक्टोपास्कल</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_short">किपा॰</string>
|
||||
<string name="pressure_kpa_display_name_long">किलोपास्कल</string>
|
||||
<string name="pressure_kpa_nominative_short">%s किपा॰</string>
|
||||
<string name="pressure_kpa_nominative_long">%s किलोपास्कल</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">मिलीबार</string>
|
||||
<string name="pressure_mbar_nominative_long">%s मिलीबार</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">वायुमण्डलीय दबाव</string>
|
||||
<string name="pressure_atm_nominative_long">%s वायुमंडलीय दबाव</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mm Hg</string>
|
||||
<string name="pressure_mmhg_display_name_long">मर्क्यूरी मिलीमीटर</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s मर्क्यूरी मिलीमीटर</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">मर्करी इंच</string>
|
||||
<string name="pressure_inhg_nominative_long">%s मर्करी इंच</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s घं॰</string>
|
||||
<string name="duration_hr_nominative_long">%s घंटे</string>
|
||||
<string name="duration_hr_per_short">%s/घं॰</string>
|
||||
<string name="duration_hr_per_long">%s प्रति घंटा</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s मि॰</string>
|
||||
<string name="duration_min_nominative_long">%s मिनट</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s से॰</string>
|
||||
<string name="duration_sec_nominative_long">%s सेकंड</string>
|
||||
<string name="duration_sec_per_short">%s/से॰</string>
|
||||
<string name="duration_sec_per_long">%s प्रति सेकंड</string>
|
||||
|
||||
</resources>
|
||||
138
weather-unit/src/main/res/values-hr/strings.xml
Normal file
138
weather-unit/src/main/res/values-hr/strings.xml
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/hr.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">Celzijevi stupnjevi</string>
|
||||
<string name="temperature_c_nominative_long">%s Celzijevih stupnjeva</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">Fahrenheitovi stupnjevi</string>
|
||||
<string name="temperature_f_nominative_long">%s Fahrenheitovih stupnjeva</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvini</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvina</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">mikrometri</string>
|
||||
<string name="length_microm_nominative_long">%s mikrometra</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">milimetri</string>
|
||||
<string name="length_mm_nominative_long">%s milimetra</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centimetri</string>
|
||||
<string name="length_cm_nominative_long">%s centimetra</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metri</string>
|
||||
<string name="length_m_nominative_long">%s metra</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometri</string>
|
||||
<string name="length_km_nominative_long">%s kilometra</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">inči</string>
|
||||
<string name="length_in_nominative_long">%s inča</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">stope</string>
|
||||
<string name="length_ft_nominative_long">%s stope</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">milje</string>
|
||||
<string name="length_mi_nominative_long">%s milje</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">nautičke milje</string>
|
||||
<string name="length_nmi_nominative_long">%s nautičke milje</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_short">čv</string>
|
||||
<string name="speed_kn_display_name_long">čvor</string>
|
||||
<string name="speed_kn_nominative_short">%s čv</string>
|
||||
<string name="speed_kn_nominative_long">%s čvora</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufortova ljestvica</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litre</string>
|
||||
<string name="volume_l_nominative_long">%s litre</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">mikrogrami</string>
|
||||
<string name="weight_microg_nominative_long">%s mikrograma</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">miligrami</string>
|
||||
<string name="weight_mg_nominative_long">%s miligrama</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">paskali</string>
|
||||
<string name="pressure_pa_nominative_long">%s paskala</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hektopaskali</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hektopaskala</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopaskali</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopaskala</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">milibari</string>
|
||||
<string name="pressure_mbar_nominative_long">%s milibara</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosfere</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosfere</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mm Hg</string>
|
||||
<string name="pressure_mmhg_display_name_long">milimetri živina stupca</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s milimetara živina stupca</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">inči žive</string>
|
||||
<string name="pressure_inhg_nominative_long">%s inča žive</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_long">%s sati</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minute</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_long">%s sekunde</string>
|
||||
|
||||
</resources>
|
||||
146
weather-unit/src/main/res/values-hu/strings.xml
Normal file
146
weather-unit/src/main/res/values-hu/strings.xml
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/hu.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">Celsius-fok</string>
|
||||
<string name="temperature_c_nominative_long">%s Celsius-fok</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">Fahrenheit-fok</string>
|
||||
<string name="temperature_f_nominative_long">%s Fahrenheit-fok</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvin</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvin</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">mikrométer</string>
|
||||
<string name="length_microm_nominative_long">%s mikrométer</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">milliméter</string>
|
||||
<string name="length_mm_nominative_long">%s milliméter</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centiméter</string>
|
||||
<string name="length_cm_nominative_long">%s centiméter</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">méter</string>
|
||||
<string name="length_m_nominative_long">%s méter</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilométer</string>
|
||||
<string name="length_km_nominative_long">%s kilométer</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">hüvelyk</string>
|
||||
<string name="length_in_nominative_long">%s hüvelyk</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">láb</string>
|
||||
<string name="length_ft_nominative_short">%s láb</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_short">mf</string>
|
||||
<string name="length_mi_display_name_long">mérföld</string>
|
||||
<string name="length_mi_nominative_short">%s mf</string>
|
||||
<string name="length_mi_nominative_long">%s mérföld</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">tengeri mérföld</string>
|
||||
<string name="length_nmi_nominative_long">%s tengeri mérföld</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s/négyzetméter</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">csomó</string>
|
||||
<string name="speed_kn_nominative_long">%s csomó</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_long">Beaufort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s/köbméter</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">liter</string>
|
||||
<string name="volume_l_nominative_long">%s liter</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">mikrogramm</string>
|
||||
<string name="weight_microg_nominative_long">%s mikrogramm</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">milligramm</string>
|
||||
<string name="weight_mg_nominative_long">%s milligramm</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascal</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascal</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hektopascal</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hektopascal</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopascal</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopascal</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">millibar</string>
|
||||
<string name="pressure_mbar_nominative_long">%s millibar</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmoszféra</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmoszféra</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">Hgmm</string>
|
||||
<string name="pressure_mmhg_display_name_long">higanymilliméter</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s Hgmm</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s higanymilliméter</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">higanyhüvelyk</string>
|
||||
<string name="pressure_inhg_nominative_long">%s higanyhüvelyk</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s ó</string>
|
||||
<string name="duration_hr_nominative_long">%s óra</string>
|
||||
<string name="duration_hr_per_short">%s/ó</string>
|
||||
<string name="duration_hr_per_long">%s/óra</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s p</string>
|
||||
<string name="duration_min_nominative_long">%s perc</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s mp</string>
|
||||
<string name="duration_sec_nominative_long">%s másodperc</string>
|
||||
<string name="duration_sec_per_short">%s/mp</string>
|
||||
<string name="duration_sec_per_long">%s/másodperc</string>
|
||||
|
||||
</resources>
|
||||
138
weather-unit/src/main/res/values-ia/strings.xml
Normal file
138
weather-unit/src/main/res/values-ia/strings.xml
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/ia.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">grados Celsius</string>
|
||||
<string name="temperature_c_nominative_long">%s grados Celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">grados Fahrenheit</string>
|
||||
<string name="temperature_f_nominative_long">%s grados Fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvin</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvin</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">micrometros</string>
|
||||
<string name="length_microm_nominative_long">%s micrometros</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">millimetros</string>
|
||||
<string name="length_mm_nominative_long">%s millimetros</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centimetros</string>
|
||||
<string name="length_cm_nominative_long">%s centimetros</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metros</string>
|
||||
<string name="length_m_nominative_long">%s metros</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometros</string>
|
||||
<string name="length_km_nominative_long">%s kilometros</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">pollices</string>
|
||||
<string name="length_in_nominative_long">%s pollices</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">pedes</string>
|
||||
<string name="length_ft_nominative_long">%s pedes</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">millias</string>
|
||||
<string name="length_mi_nominative_long">%s millias</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">millias nautic</string>
|
||||
<string name="length_nmi_nominative_long">%s nautical miles</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s per metro quadrate</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">nodos</string>
|
||||
<string name="speed_kn_nominative_long">%s nodos</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s per metro cubic</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litros</string>
|
||||
<string name="volume_l_nominative_long">%s litros</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">microgrammas</string>
|
||||
<string name="weight_microg_nominative_long">%s microgrammas</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">milligrammas</string>
|
||||
<string name="weight_mg_nominative_long">%s milligrammas</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hectopascales</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hectopascales</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">millibares</string>
|
||||
<string name="pressure_mbar_nominative_long">%s millibares</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmospheras</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmospheras</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mm Hg</string>
|
||||
<string name="pressure_mmhg_display_name_long">milimetros de mercurio</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s milimetros de mercurio</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">pollices de mercurio</string>
|
||||
<string name="pressure_inhg_nominative_long">%s pollices de mercurio</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s hr</string>
|
||||
<string name="duration_hr_nominative_long">%s horas</string>
|
||||
<string name="duration_hr_per_long">%s per hora</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minutas</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s sec</string>
|
||||
<string name="duration_sec_nominative_long">%s secundas</string>
|
||||
<string name="duration_sec_per_long">%s per secunda</string>
|
||||
|
||||
</resources>
|
||||
144
weather-unit/src/main/res/values-id/strings.xml
Normal file
144
weather-unit/src/main/res/values-id/strings.xml
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/id.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">derajat Celsius</string>
|
||||
<string name="temperature_c_nominative_long">%s derajat Celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">derajat Fahrenheit</string>
|
||||
<string name="temperature_f_nominative_long">%s derajat Fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvin</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvin</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">mikrometer</string>
|
||||
<string name="length_microm_nominative_long">%s mikrometer</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">milimeter</string>
|
||||
<string name="length_mm_nominative_long">%s milimeter</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">sentimeter</string>
|
||||
<string name="length_cm_nominative_long">%s sentimeter</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">meter</string>
|
||||
<string name="length_m_nominative_long">%s meter</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometer</string>
|
||||
<string name="length_km_nominative_long">%s kilometer</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">inci</string>
|
||||
<string name="length_in_nominative_long">%s inci</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">kaki</string>
|
||||
<string name="length_ft_nominative_long">%s kaki</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">mil</string>
|
||||
<string name="length_mi_nominative_long">%s mil</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">mil laut</string>
|
||||
<string name="length_nmi_nominative_long">%s mil laut</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s per meter persegi</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">knot</string>
|
||||
<string name="speed_kn_nominative_long">%s knot</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_long">Beaufort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s per meter kubik</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">liter</string>
|
||||
<string name="volume_l_nominative_long">%s liter</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">mikrogram</string>
|
||||
<string name="weight_microg_nominative_long">%s mikrogram</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">miligram</string>
|
||||
<string name="weight_mg_nominative_long">%s miligram</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascal</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascal</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hektopascal</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hektopascal</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopascal</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopascal</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">milibar</string>
|
||||
<string name="pressure_mbar_nominative_long">%s milibar</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosfer</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosfer</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">milimeter raksa</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s milimeter raksa</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_short">in Hg</string>
|
||||
<string name="pressure_inhg_display_name_long">inci raksa</string>
|
||||
<string name="pressure_inhg_nominative_short">%s in Hg</string>
|
||||
<string name="pressure_inhg_nominative_long">%s inci raksa</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s j</string>
|
||||
<string name="duration_hr_nominative_long">%s jam</string>
|
||||
<string name="duration_hr_per_short">%s/j</string>
|
||||
<string name="duration_hr_per_long">%s per jam</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s mnt</string>
|
||||
<string name="duration_min_nominative_long">%s menit</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s dtk</string>
|
||||
<string name="duration_sec_nominative_long">%s detik</string>
|
||||
<string name="duration_sec_per_short">%s/dtk</string>
|
||||
<string name="duration_sec_per_long">%s per detik</string>
|
||||
|
||||
</resources>
|
||||
152
weather-unit/src/main/res/values-is/strings.xml
Normal file
152
weather-unit/src/main/res/values-is/strings.xml
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/is.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">gráður á Celsius</string>
|
||||
<string name="temperature_c_nominative_long">%s gráður á Celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">gráður á Fahrenheit</string>
|
||||
<string name="temperature_f_nominative_long">%s gráður á Fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvin</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvin</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">míkrómetrar</string>
|
||||
<string name="length_microm_nominative_long">%s míkrómetrar</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">millimetrar</string>
|
||||
<string name="length_mm_nominative_long">%s millimetrar</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">sentimetrar</string>
|
||||
<string name="length_cm_nominative_long">%s sentimetrar</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metrar</string>
|
||||
<string name="length_m_nominative_long">%s metrar</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kílómetrar</string>
|
||||
<string name="length_km_nominative_long">%s kílómetrar</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">tommur</string>
|
||||
<string name="length_in_nominative_short">%s t.</string>
|
||||
<string name="length_in_nominative_long">%s tommur</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">fet</string>
|
||||
<string name="length_ft_nominative_short">%s fet</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_short">mí</string>
|
||||
<string name="length_mi_display_name_long">mílur</string>
|
||||
<string name="length_mi_nominative_short">%s mí</string>
|
||||
<string name="length_mi_nominative_long">%s mílur</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">sml</string>
|
||||
<string name="length_nmi_display_name_long">sjómílur</string>
|
||||
<string name="length_nmi_nominative_short">%s sml</string>
|
||||
<string name="length_nmi_nominative_long">%s sjómílur</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s á fermetra</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">hnútar</string>
|
||||
<string name="speed_kn_nominative_long">%s hnútar</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_short">%s Bft</string>
|
||||
<string name="speed_bf_nominative_long">%s Beaufort</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s á rúmmetra</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">lítrar</string>
|
||||
<string name="volume_l_nominative_long">%s lítrar</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">míkrógrömm</string>
|
||||
<string name="weight_microg_nominative_long">%s míkrógrömm</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">milligrömm</string>
|
||||
<string name="weight_mg_nominative_long">%s milligrömm</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pasköl</string>
|
||||
<string name="pressure_pa_nominative_long">%s pasköl</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hektópasköl</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hektópasköl</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kílópasköl</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kílópasköl</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">millibör</string>
|
||||
<string name="pressure_mbar_nominative_long">%s millibör</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">loftþyngdir</string>
|
||||
<string name="pressure_atm_nominative_long">%s loftþyngdir</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mm Hg</string>
|
||||
<string name="pressure_mmhg_display_name_long">millimetrar af kvikasilfri</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s millimetrar af kvikasilfri</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_short">to Hg</string>
|
||||
<string name="pressure_inhg_display_name_long">tommur af kvikasilfri</string>
|
||||
<string name="pressure_inhg_nominative_short">%s to Hg</string>
|
||||
<string name="pressure_inhg_nominative_long">%s tommur af kvikasilfri</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s klst.</string>
|
||||
<string name="duration_hr_nominative_long">%s klukkustundir</string>
|
||||
<string name="duration_hr_per_short">%s/klst.</string>
|
||||
<string name="duration_hr_per_long">%s á klukkustundir</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s mín.</string>
|
||||
<string name="duration_min_nominative_long">%s mínútur</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s sek.</string>
|
||||
<string name="duration_sec_nominative_long">%s sekúndur</string>
|
||||
<string name="duration_sec_per_short">%s/sek.</string>
|
||||
<string name="duration_sec_per_long">%s á sekúndu</string>
|
||||
|
||||
</resources>
|
||||
140
weather-unit/src/main/res/values-it/strings.xml
Normal file
140
weather-unit/src/main/res/values-it/strings.xml
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/it.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">gradi Celsius</string>
|
||||
<string name="temperature_c_nominative_long">%s gradi Celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">gradi Fahrenheit</string>
|
||||
<string name="temperature_f_nominative_long">%s gradi Fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">Kelvin</string>
|
||||
<string name="temperature_k_nominative_long">%s Kelvin</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">micrometri</string>
|
||||
<string name="length_microm_nominative_long">%s micrometri</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">millimetri</string>
|
||||
<string name="length_mm_nominative_long">%s millimetri</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centimetri</string>
|
||||
<string name="length_cm_nominative_long">%s centimetri</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metri</string>
|
||||
<string name="length_m_nominative_long">%s metri</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">chilometri</string>
|
||||
<string name="length_km_nominative_long">%s chilometri</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">pollici</string>
|
||||
<string name="length_in_nominative_long">%s pollici</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">piedi</string>
|
||||
<string name="length_ft_nominative_long">%s piedi</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">miglia</string>
|
||||
<string name="length_mi_nominative_long">%s miglia</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">miglia nautiche</string>
|
||||
<string name="length_nmi_nominative_long">%s miglia nautiche</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s per metro quadrato</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">nodi</string>
|
||||
<string name="speed_kn_nominative_long">%s nodi</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_short">Bft %s</string>
|
||||
<string name="speed_bf_nominative_long">Beaufort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s per metro cubo</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litri</string>
|
||||
<string name="volume_l_nominative_long">%s litri</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">microgrammi</string>
|
||||
<string name="weight_microg_nominative_long">%s microgrammi</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">milligrammi</string>
|
||||
<string name="weight_mg_nominative_long">%s milligrammi</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascal</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascal</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">ettopascal</string>
|
||||
<string name="pressure_hpa_nominative_long">%s ettopascal</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">chilopascal</string>
|
||||
<string name="pressure_kpa_nominative_long">%s chilopascal</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">millibar</string>
|
||||
<string name="pressure_mbar_nominative_long">%s millibar</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosfere</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosfere</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mm Hg</string>
|
||||
<string name="pressure_mmhg_display_name_long">millimetri di mercurio</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s millimetri di mercurio</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">pollici di mercurio</string>
|
||||
<string name="pressure_inhg_nominative_long">%s pollici di mercurio</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_long">%s ore</string>
|
||||
<string name="duration_hr_per_long">%s all’ora</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minuti</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_long">%s secondi</string>
|
||||
<string name="duration_sec_per_long">%s al secondo</string>
|
||||
|
||||
</resources>
|
||||
144
weather-unit/src/main/res/values-ja/strings.xml
Normal file
144
weather-unit/src/main/res/values-ja/strings.xml
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/ja.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Value separator -->
|
||||
<string name="locale_separator">、</string>
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">摂氏</string>
|
||||
<string name="temperature_c_nominative_long">摂氏 %s 度</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">華氏</string>
|
||||
<string name="temperature_f_nominative_long">華氏 %s 度</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">ケルビン</string>
|
||||
<string name="temperature_k_nominative_long">%s ケルビン</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">マイクロメートル</string>
|
||||
<string name="length_microm_nominative_long">%s マイクロメートル</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">ミリメートル</string>
|
||||
<string name="length_mm_nominative_long">%s ミリメートル</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">センチメートル</string>
|
||||
<string name="length_cm_nominative_long">%s センチメートル</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">メートル</string>
|
||||
<string name="length_m_nominative_long">%s メートル</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">キロメートル</string>
|
||||
<string name="length_km_nominative_long">%s キロメートル</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">インチ</string>
|
||||
<string name="length_in_nominative_long">%s インチ</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">フィート</string>
|
||||
<string name="length_ft_nominative_long">%s フィート</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_short">マイル</string>
|
||||
<string name="length_mi_nominative_long">%s マイル</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">海里</string>
|
||||
<string name="length_nmi_nominative_short">%s 海里</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s/平方メートル</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_short">ノット</string>
|
||||
<string name="speed_kn_nominative_long">%s ノット</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_short">風力階級</string>
|
||||
<string name="speed_bf_display_name_long">ビューフォート風力階級</string>
|
||||
<string name="speed_bf_nominative_short">風力%s</string>
|
||||
<string name="speed_bf_nominative_long">ビューフォート風力階級 %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s/立方メートル</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">リットル</string>
|
||||
<string name="volume_l_nominative_long">%s リットル</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">マイクログラム</string>
|
||||
<string name="weight_microg_nominative_long">%s マイクログラム</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">ミリグラム</string>
|
||||
<string name="weight_mg_nominative_long">%s ミリグラム</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_short">パスカル</string>
|
||||
<string name="pressure_pa_nominative_long">%s パスカル</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_short">ヘクトパスカル</string>
|
||||
<string name="pressure_hpa_nominative_long">%s ヘクトパスカル</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_short">キロパスカル</string>
|
||||
<string name="pressure_kpa_nominative_long">%s キロパスカル</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_short">ミリバール</string>
|
||||
<string name="pressure_mbar_nominative_short">%s mb</string>
|
||||
<string name="pressure_mbar_nominative_long">%s ミリバール</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_short">気圧</string>
|
||||
<string name="pressure_atm_nominative_long">%s 気圧</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">水銀柱ミリメートル</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s 水銀柱ミリメートル</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_short">水銀柱インチ</string>
|
||||
<string name="pressure_inhg_nominative_long">%s 水銀柱インチ</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s 時間</string>
|
||||
<string name="duration_hr_per_short">%s/時間</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s 分</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s 秒</string>
|
||||
<string name="duration_sec_per_short">%s/秒</string>
|
||||
|
||||
</resources>
|
||||
143
weather-unit/src/main/res/values-kab/strings.xml
Normal file
143
weather-unit/src/main/res/values-kab/strings.xml
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/kab.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_short">℃</string>
|
||||
<string name="temperature_c_nominative_short">%s ℃</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_short">℉</string>
|
||||
<string name="temperature_f_nominative_short">%s ℉</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">imikrumitren</string>
|
||||
<string name="length_microm_nominative_long">%s n yimikrumitren</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">imilimitren</string>
|
||||
<string name="length_mm_nominative_long">%s n yimilimitren</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">isantimitren</string>
|
||||
<string name="length_cm_nominative_long">%s n yisantimitren</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">lmitrat</string>
|
||||
<string name="length_m_nominative_long">%s n lmitrat</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">ikilumitren</string>
|
||||
<string name="length_km_nominative_long">%s n yikilumitren</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">db</string>
|
||||
<string name="length_in_display_name_long">idebbuzen</string>
|
||||
<string name="length_in_nominative_short">%s db</string>
|
||||
<string name="length_in_nominative_long">%s n yidebbuzen</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">ḍr</string>
|
||||
<string name="length_ft_display_name_long">iḍarren</string>
|
||||
<string name="length_ft_nominative_short">%s ḍr</string>
|
||||
<string name="length_ft_nominative_long">%s n iḍarren</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">imilen</string>
|
||||
<string name="length_mi_nominative_long">%s n yimilen</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">miw</string>
|
||||
<string name="length_nmi_display_name_long">imilen iwlalen</string>
|
||||
<string name="length_nmi_nominative_short">%s miw</string>
|
||||
<string name="length_nmi_nominative_long">%s n yimilen iwlalen</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s deg mitra uzmir-sin</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_short">krs</string>
|
||||
<string name="speed_kn_display_name_long">timukrisin</string>
|
||||
<string name="speed_kn_nominative_short">%s krs</string>
|
||||
<string name="speed_kn_nominative_long">%s n tmukrisin</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s i umitr uzmir-kraḍ</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litrat</string>
|
||||
<string name="volume_l_nominative_long">%s n litrat</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">imikrugramen</string>
|
||||
<string name="weight_microg_nominative_long">%s n imikrugramen</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">imiligramen</string>
|
||||
<string name="weight_mg_nominative_long">%s n imiligramen</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">ihiktupaskalen</string>
|
||||
<string name="pressure_hpa_nominative_long">%s n ihiktupaskalen</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Millibar -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s sr</string>
|
||||
<string name="duration_hr_nominative_long">%s n yisragen</string>
|
||||
<string name="duration_hr_per_short">%s/r</string>
|
||||
<string name="duration_hr_per_long">%s i usrag</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s tsd</string>
|
||||
<string name="duration_min_nominative_long">%s n tesdatin</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s tsn</string>
|
||||
<string name="duration_sec_nominative_long">%s n tsinin</string>
|
||||
<string name="duration_sec_per_short">%s/n</string>
|
||||
<string name="duration_sec_per_long">%s i tsint</string>
|
||||
|
||||
</resources>
|
||||
158
weather-unit/src/main/res/values-ko/strings.xml
Normal file
158
weather-unit/src/main/res/values-ko/strings.xml
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/ko.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">섭씨</string>
|
||||
<string name="temperature_c_nominative_short">%s°C</string>
|
||||
<string name="temperature_c_nominative_long">섭씨 %s도</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">화씨</string>
|
||||
<string name="temperature_f_nominative_short">%s°F</string>
|
||||
<string name="temperature_f_nominative_long">화씨 %s도</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">켈빈</string>
|
||||
<string name="temperature_k_nominative_short">%sK</string>
|
||||
<string name="temperature_k_nominative_long">%s켈빈</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">마이크로미터</string>
|
||||
<string name="length_microm_nominative_short">%sμm</string>
|
||||
<string name="length_microm_nominative_long">%s마이크로미터</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">밀리미터</string>
|
||||
<string name="length_mm_nominative_short">%smm</string>
|
||||
<string name="length_mm_nominative_long">%s밀리미터</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">센티미터</string>
|
||||
<string name="length_cm_nominative_short">%scm</string>
|
||||
<string name="length_cm_nominative_long">%s센티미터</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">미터</string>
|
||||
<string name="length_m_nominative_short">%sm</string>
|
||||
<string name="length_m_nominative_long">%s미터</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">킬로미터</string>
|
||||
<string name="length_km_nominative_short">%skm</string>
|
||||
<string name="length_km_nominative_long">%s킬로미터</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">인치</string>
|
||||
<string name="length_in_nominative_short">%sin</string>
|
||||
<string name="length_in_nominative_long">%s인치</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">피트</string>
|
||||
<string name="length_ft_nominative_short">%sft</string>
|
||||
<string name="length_ft_nominative_long">%s피트</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">마일</string>
|
||||
<string name="length_mi_nominative_short">%smi</string>
|
||||
<string name="length_mi_nominative_long">%s마일</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">해리</string>
|
||||
<string name="length_nmi_nominative_short">%snmi</string>
|
||||
<string name="length_nmi_nominative_long">%s해리</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">제곱미터당 %s</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">노트</string>
|
||||
<string name="speed_kn_nominative_short">%skn</string>
|
||||
<string name="speed_kn_nominative_long">%s노트</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">보퍼트</string>
|
||||
<string name="speed_bf_nominative_long">보퍼트 계급 %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">세제곱미터당 %s</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">리터</string>
|
||||
<string name="volume_l_nominative_short">%sL</string>
|
||||
<string name="volume_l_nominative_long">%s리터</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">마이크로그램</string>
|
||||
<string name="weight_microg_nominative_short">%sμg</string>
|
||||
<string name="weight_microg_nominative_long">%s 마이크로그램</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">밀리그램</string>
|
||||
<string name="weight_mg_nominative_short">%smg</string>
|
||||
<string name="weight_mg_nominative_long">%s 밀리그램</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">파스칼</string>
|
||||
<string name="pressure_pa_nominative_short">%sPa</string>
|
||||
<string name="pressure_pa_nominative_long">%s파스칼</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">헥토파스칼</string>
|
||||
<string name="pressure_hpa_nominative_short">%shPa</string>
|
||||
<string name="pressure_hpa_nominative_long">%s헥토파스칼</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">킬로파스칼</string>
|
||||
<string name="pressure_kpa_nominative_short">%skPa</string>
|
||||
<string name="pressure_kpa_nominative_long">%s킬로파스칼</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">밀리바</string>
|
||||
<string name="pressure_mbar_nominative_short">%smb</string>
|
||||
<string name="pressure_mbar_nominative_long">%s밀리바</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_nominative_short">%satm</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">수은주밀리미터</string>
|
||||
<string name="pressure_mmhg_nominative_short">%smmHg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s수은주밀리미터</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">수은주인치</string>
|
||||
<string name="pressure_inhg_nominative_short">%sinHg</string>
|
||||
<string name="pressure_inhg_nominative_long">%s수은주인치</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s시간</string>
|
||||
<string name="duration_hr_per_long">시간당 %s</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s분</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s초</string>
|
||||
<string name="duration_sec_per_long">초당 %s</string>
|
||||
|
||||
</resources>
|
||||
144
weather-unit/src/main/res/values-lt/strings.xml
Normal file
144
weather-unit/src/main/res/values-lt/strings.xml
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/lt.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">Celsijaus laipsniai</string>
|
||||
<string name="temperature_c_nominative_long">%s Celsijaus laipsniai</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">Farenheito laipsniai</string>
|
||||
<string name="temperature_f_nominative_long">%s Farenheito laipsniai</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvinai</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvinai</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">mikrometrai</string>
|
||||
<string name="length_microm_nominative_long">%s mikrometrai</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">milimetrai</string>
|
||||
<string name="length_mm_nominative_long">%s milimetrai</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centimetrai</string>
|
||||
<string name="length_cm_nominative_long">%s centimetrai</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metrai</string>
|
||||
<string name="length_m_nominative_long">%s metrai</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometrai</string>
|
||||
<string name="length_km_nominative_long">%s kilometrai</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">coliai</string>
|
||||
<string name="length_in_nominative_long">%s coliai</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">pėdos</string>
|
||||
<string name="length_ft_nominative_long">%s pėdos</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">mylios</string>
|
||||
<string name="length_mi_nominative_long">%s mylios</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">M</string>
|
||||
<string name="length_nmi_display_name_long">jūrmylės</string>
|
||||
<string name="length_nmi_nominative_short">%s M</string>
|
||||
<string name="length_nmi_nominative_long">%s jūrmylės</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_short">KN</string>
|
||||
<string name="speed_kn_display_name_long">mazgas</string>
|
||||
<string name="speed_kn_nominative_short">%s KN</string>
|
||||
<string name="speed_kn_nominative_long">%s mazgai</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Bofortas</string>
|
||||
<string name="speed_bf_nominative_long">Boforto %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litrai</string>
|
||||
<string name="volume_l_nominative_long">%s litrai</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">mikrogramai</string>
|
||||
<string name="weight_microg_nominative_long">%s mikrogramai</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">miligramai</string>
|
||||
<string name="weight_mg_nominative_long">%s miligramai</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">paskaliai</string>
|
||||
<string name="pressure_pa_nominative_long">%s paskaliai</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hektopaskaliai</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hektopaskaliai</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopaskaliai</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopaskaliai</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">milibarai</string>
|
||||
<string name="pressure_mbar_nominative_long">%s milibarai</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosferos</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosferos</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mm Hg</string>
|
||||
<string name="pressure_mmhg_display_name_long">gysidabrio stulpelio milimetrai</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s gysidabrio stulpelio milimetrai</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">gyvsidabrio stulpelio coliai</string>
|
||||
<string name="pressure_inhg_nominative_long">%s gyvsidabrio stulpelio coliai</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s val.</string>
|
||||
<string name="duration_hr_nominative_long">%s valandos</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s min.</string>
|
||||
<string name="duration_min_nominative_long">%s minutės</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s sek.</string>
|
||||
<string name="duration_sec_nominative_long">%s sekundės</string>
|
||||
|
||||
</resources>
|
||||
139
weather-unit/src/main/res/values-lv/strings.xml
Normal file
139
weather-unit/src/main/res/values-lv/strings.xml
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/lv.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">Celsija grādi</string>
|
||||
<string name="temperature_c_nominative_long">%s Celsija grādi</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">Fārenheita grādi</string>
|
||||
<string name="temperature_f_nominative_long">%s Fārenheita grādi</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvini</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvini</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">mikrometri</string>
|
||||
<string name="length_microm_nominative_long">%s mikrometri</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">milimetri</string>
|
||||
<string name="length_mm_nominative_long">%s milimetri</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centimetri</string>
|
||||
<string name="length_cm_nominative_long">%s centimetri</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metri</string>
|
||||
<string name="length_m_nominative_long">%s metri</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometri</string>
|
||||
<string name="length_km_nominative_long">%s kilometri</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">collas</string>
|
||||
<string name="length_in_nominative_long">%s collas</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">pēdas</string>
|
||||
<string name="length_ft_nominative_long">%s pēdas</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">jūdzes</string>
|
||||
<string name="length_mi_nominative_long">%s jūdzes</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">jūras jūdzes</string>
|
||||
<string name="length_nmi_nominative_long">%s jūras jūdzes</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s per square meter</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">mezgls</string>
|
||||
<string name="speed_kn_nominative_long">%s mezgli</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_long">Beaufort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s per cubic meter</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">liters</string>
|
||||
<string name="volume_l_nominative_long">%s liters</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">mikrogrami</string>
|
||||
<string name="weight_microg_nominative_long">%s mikrogrami</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">miligrami</string>
|
||||
<string name="weight_mg_nominative_long">%s miligrami</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">paskāli</string>
|
||||
<string name="pressure_pa_nominative_long">%s paskāli</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hektopaskāli</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hektopaskāli</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopaskāli</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopaskāli</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">milibāri</string>
|
||||
<string name="pressure_mbar_nominative_long">%s milibāri</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosfēras</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosfēras</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">dzīvsudraba stabiņa milimetri</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s dzīvsudraba stabiņa milimetri</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">dzīvsudraba stabiņa collas</string>
|
||||
<string name="pressure_inhg_nominative_long">%s dzīvsudraba stabiņa collas</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s st.</string>
|
||||
<string name="duration_hr_nominative_long">%s stundas</string>
|
||||
<string name="duration_hr_per_long">%s stundā</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minūtes</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s sek.</string>
|
||||
<string name="duration_sec_nominative_long">%s sekundes</string>
|
||||
<string name="duration_sec_per_long">%s sekundē</string>
|
||||
|
||||
</resources>
|
||||
143
weather-unit/src/main/res/values-mk/strings.xml
Normal file
143
weather-unit/src/main/res/values-mk/strings.xml
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/mk.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">целзиусови степени</string>
|
||||
<string name="temperature_c_nominative_long">%s целзиусови степени</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">фаренхајтови степени</string>
|
||||
<string name="temperature_f_nominative_long">%s фаренхајтови степени</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">келвини</string>
|
||||
<string name="temperature_k_nominative_long">%s келвини</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">микрометри</string>
|
||||
<string name="length_microm_nominative_long">%s микрометри</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">милиметри</string>
|
||||
<string name="length_mm_nominative_long">%s милиметри</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">сантиметри</string>
|
||||
<string name="length_cm_nominative_long">%s сантиметри</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">метри</string>
|
||||
<string name="length_m_nominative_long">%s метри</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">километри</string>
|
||||
<string name="length_km_nominative_long">%s километри</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">инчи</string>
|
||||
<string name="length_in_nominative_long">%s инчи</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">стапки</string>
|
||||
<string name="length_ft_nominative_long">%s стапки</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">милји</string>
|
||||
<string name="length_mi_nominative_long">%s милји</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">наутички милји</string>
|
||||
<string name="length_nmi_nominative_long">%s наутички милји</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s по квадратен метар</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">јазли</string>
|
||||
<string name="speed_kn_nominative_long">%s јазли</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">бофори</string>
|
||||
<string name="speed_bf_nominative_long">%s бофори</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s на кубен метар</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">литри</string>
|
||||
<string name="volume_l_nominative_long">%s литри</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">микрограми</string>
|
||||
<string name="weight_microg_nominative_long">%s микрограми</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">милиграми</string>
|
||||
<string name="weight_mg_nominative_long">%s милиграми</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">паскали</string>
|
||||
<string name="pressure_pa_nominative_long">%s паскали</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">хектопаскали</string>
|
||||
<string name="pressure_hpa_nominative_long">%s хектопаскали</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">килопаскали</string>
|
||||
<string name="pressure_kpa_nominative_long">%s килопаскали</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">милибари</string>
|
||||
<string name="pressure_mbar_nominative_long">%s милибари</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">атмосфери</string>
|
||||
<string name="pressure_atm_nominative_long">%s атмосфери</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">милиметри жива</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s милиметри жива</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">инчи жива</string>
|
||||
<string name="pressure_inhg_nominative_long">%s инчи жива</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s ч.</string>
|
||||
<string name="duration_hr_nominative_long">%s часа</string>
|
||||
<string name="duration_hr_per_short">%s/ч.</string>
|
||||
<string name="duration_hr_per_long">%s на час</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s мин.</string>
|
||||
<string name="duration_min_nominative_long">%s минути</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s сек.</string>
|
||||
<string name="duration_sec_nominative_long">%s секунди</string>
|
||||
<!-- Obvious swapping between short and narrow -->
|
||||
<string name="duration_sec_per_short">%s/с.</string>
|
||||
<string name="duration_sec_per_long">%s во секунда</string>
|
||||
|
||||
</resources>
|
||||
166
weather-unit/src/main/res/values-mr/strings.xml
Normal file
166
weather-unit/src/main/res/values-mr/strings.xml
Normal file
|
|
@ -0,0 +1,166 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/mr.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_short">°से</string>
|
||||
<string name="temperature_c_display_name_long">अंश सेल्सिअस</string>
|
||||
<string name="temperature_c_nominative_short">%s°से</string>
|
||||
<string name="temperature_c_nominative_long">%s अंश सेल्सिअस</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_short">°फॅ</string>
|
||||
<string name="temperature_f_display_name_long">अंश फॅरनहाईट</string>
|
||||
<string name="temperature_f_nominative_short">%s°फॅ</string>
|
||||
<string name="temperature_f_nominative_long">%s अंश फॅरनहाईट</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">केल्व्हिन</string>
|
||||
<string name="temperature_k_nominative_long">%s केल्व्हिन</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">मायक्रोमीटर</string>
|
||||
<string name="length_microm_nominative_long">%s मायक्रोमीटर</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_short">मिमी</string>
|
||||
<string name="length_mm_display_name_long">मिलिमीटर</string>
|
||||
<string name="length_mm_nominative_short">%s मिमी</string>
|
||||
<string name="length_mm_nominative_long">%s मिलिमीटर</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_short">सेंमी</string>
|
||||
<string name="length_cm_display_name_long">सेंटीमीटर</string>
|
||||
<string name="length_cm_nominative_short">%s सेंमी</string>
|
||||
<string name="length_cm_nominative_long">%s सेंटीमीटर</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_short">मी</string>
|
||||
<string name="length_m_display_name_long">मीटर</string>
|
||||
<string name="length_m_nominative_short">%s मी</string>
|
||||
<string name="length_m_nominative_long">%s मीटर</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_short">किमी</string>
|
||||
<string name="length_km_display_name_long">किलोमीटर</string>
|
||||
<string name="length_km_nominative_short">%s किमी</string>
|
||||
<string name="length_km_nominative_long">%s किलोमीटर</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">इंच</string>
|
||||
<string name="length_in_nominative_short">%s इंच</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">फूट</string>
|
||||
<string name="length_ft_nominative_short">%s फूट</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_short">मैल</string>
|
||||
<string name="length_mi_nominative_short">%s मैल</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">नॉटिकल मैल</string>
|
||||
<string name="length_nmi_nominative_long">%s नॉटिकल मैल</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_short">%s दर चौरस मीटर</string>
|
||||
<string name="area_m2_per_long">%s/मी²</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">नॉट</string>
|
||||
<string name="speed_kn_nominative_long">%s नॉट</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">ब्युफोर्ट</string>
|
||||
<string name="speed_bf_nominative_short">%s ब्यु</string>
|
||||
<string name="speed_bf_nominative_long">%s ब्युफोर्ट</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_short">%s/मी³</string>
|
||||
<string name="volume_m3_per_long">%s दर घन मीटर</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_short">ली</string>
|
||||
<string name="volume_l_display_name_long">लीटर</string>
|
||||
<string name="volume_l_nominative_short">%s ली</string>
|
||||
<string name="volume_l_nominative_long">%s लीटर</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">मायक्रोग्रॅम</string>
|
||||
<string name="weight_microg_nominative_long">%s मायक्रोग्रॅम</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_short">मिग्रॅ</string>
|
||||
<string name="weight_mg_display_name_long">मिलिग्रॅम</string>
|
||||
<string name="weight_mg_nominative_short">%s मिमिग्रॅ</string>
|
||||
<string name="weight_mg_nominative_long">%s मिलिग्रॅम</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">पास्काल</string>
|
||||
<string name="pressure_pa_nominative_long">%s पास्काल</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">हेक्टोपास्कल</string>
|
||||
<string name="pressure_hpa_nominative_long">%s हेक्टोपास्कल</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">किलोपास्कल</string>
|
||||
<string name="pressure_kpa_nominative_long">%s किलोपास्कल</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">मिलिबार</string>
|
||||
<string name="pressure_mbar_nominative_long">%s मिलिबार</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">वातावरण</string>
|
||||
<string name="pressure_atm_nominative_long">%s वातावरण</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mm Hg</string>
|
||||
<string name="pressure_mmhg_display_name_long">मर्क्यूरी मिलिमीटर</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s मर्क्यूरी मिलिमीटर</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_short">in Hg</string>
|
||||
<string name="pressure_inhg_display_name_long">मर्क्यूरी इंच</string>
|
||||
<!-- Not in CLDR, but seems suspicious given the short display name above -->
|
||||
<string name="pressure_inhg_nominative_short">%s in Hg</string>
|
||||
<string name="pressure_inhg_nominative_long">%s मर्क्यूरी इंच</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s ता</string>
|
||||
<string name="duration_hr_nominative_long">%s तास</string>
|
||||
<string name="duration_hr_per_short">%sप्रता</string>
|
||||
<string name="duration_hr_per_long">%s प्रति तास</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s मिनि</string>
|
||||
<string name="duration_min_nominative_long">%s मिनिटे</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s से</string>
|
||||
<string name="duration_sec_nominative_long">%s सेकंद</string>
|
||||
<string name="duration_sec_per_short">%sप्रसे</string>
|
||||
<string name="duration_sec_per_long">%s प्रति सेकंद</string>
|
||||
|
||||
</resources>
|
||||
142
weather-unit/src/main/res/values-nb-rNO/strings.xml
Normal file
142
weather-unit/src/main/res/values-nb-rNO/strings.xml
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/nb.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">grader celsius</string>
|
||||
<string name="temperature_c_nominative_long">%s grader celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">grader fahrenheit</string>
|
||||
<string name="temperature_f_nominative_long">%s grader fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvin</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvin</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">mikrometer</string>
|
||||
<string name="length_microm_nominative_long">%s mikrometer</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">millimeter</string>
|
||||
<string name="length_mm_nominative_long">%s millimeter</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centimeter</string>
|
||||
<string name="length_cm_nominative_long">%s centimeter</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">meter</string>
|
||||
<string name="length_m_nominative_long">%s meter</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometer</string>
|
||||
<string name="length_km_nominative_long">%s kilometer</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">tommer</string>
|
||||
<string name="length_in_nominative_short">%s tommer</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">fot</string>
|
||||
<string name="length_ft_nominative_short">%s fot</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">miles</string>
|
||||
<string name="length_mi_nominative_long">%s miles</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">nautical miles</string>
|
||||
<string name="length_nmi_nominative_long">%s nautical miles</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s per kvadratmeter</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">knop</string>
|
||||
<string name="speed_kn_nominative_long">%s knop</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_short">Bf</string>
|
||||
<string name="speed_bf_display_name_long">beaufort</string>
|
||||
<string name="speed_bf_nominative_short">Bf %s</string>
|
||||
<string name="speed_bf_nominative_long">beaufort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s per kubikkmeter</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">liter</string>
|
||||
<string name="volume_l_nominative_long">%s liter</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">mikrogram</string>
|
||||
<string name="weight_microg_nominative_long">%s mikrogram</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">milligram</string>
|
||||
<string name="weight_mg_nominative_long">%s milligram</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascal</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascal</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hektopascal</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hektopascal</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopascal</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopascal</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">millibar</string>
|
||||
<string name="pressure_mbar_nominative_long">%s millibar</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosfærer</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosfærer</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">millimeter kvikksølv</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s millimeter kvikksølv</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">tommer kvikksølv</string>
|
||||
<string name="pressure_inhg_nominative_long">%s tommer kvikksølv</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s t</string>
|
||||
<string name="duration_hr_nominative_long">%s timer</string>
|
||||
<string name="duration_hr_per_short">%s/t</string>
|
||||
<string name="duration_hr_per_long">%s per time</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minutter</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s sek</string>
|
||||
<string name="duration_sec_nominative_long">%s sekunder</string>
|
||||
<string name="duration_sec_per_long">%s per sekund</string>
|
||||
|
||||
</resources>
|
||||
142
weather-unit/src/main/res/values-nl/strings.xml
Normal file
142
weather-unit/src/main/res/values-nl/strings.xml
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/nl.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">graden Celsius</string>
|
||||
<string name="temperature_c_nominative_long">%s graden Celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">graden Fahrenheit</string>
|
||||
<string name="temperature_f_nominative_long">%s graden Fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvin</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvin</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">micrometer</string>
|
||||
<string name="length_microm_nominative_long">%s micrometer</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">millimeter</string>
|
||||
<string name="length_mm_nominative_long">%s millimeter</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centimeter</string>
|
||||
<string name="length_cm_nominative_long">%s centimeter</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">meter</string>
|
||||
<string name="length_m_nominative_long">%s meter</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometer</string>
|
||||
<string name="length_km_nominative_long">%s kilometer</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">inches</string>
|
||||
<string name="length_in_nominative_long">%s inches</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">voet</string>
|
||||
<string name="length_ft_nominative_long">%s voet</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">mijl</string>
|
||||
<string name="length_mi_nominative_long">%s mijl</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">zeemijl</string>
|
||||
<string name="length_nmi_nominative_long">%s zeemijlen</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s per vierkante meter</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_short">kt</string>
|
||||
<string name="speed_kn_display_name_long">knoop</string>
|
||||
<string name="speed_kn_nominative_short">%s kt</string>
|
||||
<string name="speed_kn_nominative_long">%s knopen</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_short">windkracht</string>
|
||||
<string name="speed_bf_nominative_short">%s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s per kubieke meter</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">liter</string>
|
||||
<string name="volume_l_nominative_long">%s liter</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">microgram</string>
|
||||
<string name="weight_microg_nominative_long">%s microgram</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">milligram</string>
|
||||
<string name="weight_mg_nominative_long">%s milligram</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascal</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascal</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hectopascal</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hectopascal</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopascal</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopascal</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">millibar</string>
|
||||
<string name="pressure_mbar_nominative_long">%s millibar</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosfeer</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosfeer</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">millimeter-kwikdruk</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s millimeter-kwikdruk</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">inch-kwikdruk</string>
|
||||
<string name="pressure_inhg_nominative_long">%s inch-kwikdruk</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s uur</string>
|
||||
<string name="duration_hr_per_short">%s/uur</string>
|
||||
<string name="duration_hr_per_long">%s per uur</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minuten</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s sec</string>
|
||||
<string name="duration_sec_nominative_long">%s seconden</string>
|
||||
<string name="duration_sec_per_short">%s/sec</string>
|
||||
<string name="duration_sec_per_long">%s per seconde</string>
|
||||
|
||||
</resources>
|
||||
131
weather-unit/src/main/res/values-oc/strings.xml
Normal file
131
weather-unit/src/main/res/values-oc/strings.xml
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/oc.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_short">gr. Celsius</string>
|
||||
<string name="temperature_c_display_name_long">grases Celsius</string>
|
||||
<string name="temperature_c_nominative_long">%s grases Celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_short">gr. Fahrenheit</string>
|
||||
<string name="temperature_f_display_name_long">grases Fahrenheit</string>
|
||||
<string name="temperature_f_nominative_long">%s grases Fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">micromètres</string>
|
||||
<string name="length_microm_nominative_long">%s micromètres</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">milimètres</string>
|
||||
<string name="length_mm_nominative_long">%s milimètres</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centimètres</string>
|
||||
<string name="length_cm_nominative_long">%s centimètres</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">mètres</string>
|
||||
<string name="length_m_nominative_long">%s mètres</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">quilomètres</string>
|
||||
<string name="length_km_nominative_long">%s quilomètres</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Foot -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Mile -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s per mètres cairats</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">noses</string>
|
||||
<string name="speed_kn_nominative_long">%s noses</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s per mètres cubics</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litres</string>
|
||||
<string name="volume_l_nominative_long">%s litres</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">microgramas</string>
|
||||
<string name="weight_microg_nominative_long">%s microgramas</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">miligramas</string>
|
||||
<string name="weight_mg_nominative_long">%s miligramas</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">ectopascals</string>
|
||||
<string name="pressure_hpa_nominative_long">%s ectopascals</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">quilopascals</string>
|
||||
<string name="pressure_kpa_nominative_long">%s quilopascals</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">milibars</string>
|
||||
<string name="pressure_mbar_nominative_long">%s milibars</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosfèras</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosfèras</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mm Hg</string>
|
||||
<string name="pressure_mmhg_display_name_long">milimètres de mercuri</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s milimètres de mercuri</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_long">%s oras</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minutas</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_long">%s segondas</string>
|
||||
|
||||
</resources>
|
||||
146
weather-unit/src/main/res/values-pl/strings.xml
Normal file
146
weather-unit/src/main/res/values-pl/strings.xml
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/pl.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_short">st. C</string>
|
||||
<string name="temperature_c_display_name_long">stopnie Celsjusza</string>
|
||||
<string name="temperature_c_nominative_long">%s stopnie Celsjusza</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_short">st. F</string>
|
||||
<string name="temperature_f_display_name_long">stopnie Fahrenheita</string>
|
||||
<string name="temperature_f_nominative_long">%s stopnie Fahrenheita</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelwiny</string>
|
||||
<string name="temperature_k_nominative_long">%s kelwiny</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">mikrometry</string>
|
||||
<string name="length_microm_nominative_long">%s mikrometry</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">milimetry</string>
|
||||
<string name="length_mm_nominative_long">%s milimetry</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centymetry</string>
|
||||
<string name="length_cm_nominative_long">%s centymetry</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metry</string>
|
||||
<string name="length_m_nominative_long">%s metry</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometry</string>
|
||||
<string name="length_km_nominative_long">%s kilometry</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">cale</string>
|
||||
<string name="length_in_nominative_short">%s cale</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">stopy</string>
|
||||
<string name="length_ft_nominative_short">%s stopy</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_short">mile</string>
|
||||
<string name="length_mi_nominative_short">%s mile</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">Mm</string>
|
||||
<string name="length_nmi_display_name_long">mile morskie</string>
|
||||
<string name="length_nmi_nominative_short">%s Mm</string>
|
||||
<string name="length_nmi_nominative_long">%s mile morskie</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s na metr kwadratowy</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_short">w.</string>
|
||||
<string name="speed_kn_display_name_long">węzeł</string>
|
||||
<string name="speed_kn_nominative_short">%s w.</string>
|
||||
<string name="speed_kn_nominative_long">%s węzły</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_long">%s w skali Beauforta</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s na metr sześcienny</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litry</string>
|
||||
<string name="volume_l_nominative_long">%s litry</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">mikrogramy</string>
|
||||
<string name="weight_microg_nominative_long">%s mikrogramy</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">miligramy</string>
|
||||
<string name="weight_mg_nominative_long">%s miligramy</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">paskale</string>
|
||||
<string name="pressure_pa_nominative_long">%s paskale</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hektopaskale</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hektopaskale</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopaskale</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopaskale</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">milibary</string>
|
||||
<string name="pressure_mbar_nominative_long">%s milibary</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosfery</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosfery</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">milimetry słupa rtęci</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s milimetry słupa rtęci</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">cale słupa rtęci</string>
|
||||
<string name="pressure_inhg_nominative_long">%s cale słupa rtęci</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s godz.</string>
|
||||
<string name="duration_hr_nominative_long">%s godziny</string>
|
||||
<string name="duration_hr_per_short">%s/godz.</string>
|
||||
<string name="duration_hr_per_long">%s na godzinę</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minuty</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s sek.</string>
|
||||
<string name="duration_sec_nominative_long">%s sekundy</string>
|
||||
<string name="duration_sec_per_long">%s na sekundę</string>
|
||||
|
||||
</resources>
|
||||
144
weather-unit/src/main/res/values-pt-rBR/strings.xml
Normal file
144
weather-unit/src/main/res/values-pt-rBR/strings.xml
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/pt.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_short">graus C</string>
|
||||
<string name="temperature_c_display_name_long">graus Celsius</string>
|
||||
<string name="temperature_c_nominative_long">%s graus Celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_short">graus F</string>
|
||||
<string name="temperature_f_display_name_long">graus Fahrenheit</string>
|
||||
<string name="temperature_f_nominative_long">%s graus Fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvins</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvins</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">micrômetros</string>
|
||||
<string name="length_microm_nominative_long">%s micrômetros</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">milímetros</string>
|
||||
<string name="length_mm_nominative_long">%s milímetros</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centímetros</string>
|
||||
<string name="length_cm_nominative_long">%s centímetros</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metros</string>
|
||||
<string name="length_m_nominative_long">%s metros</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">quilômetros</string>
|
||||
<string name="length_km_nominative_long">%s quilômetros</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">pol.</string>
|
||||
<string name="length_in_display_name_long">polegadas</string>
|
||||
<string name="length_in_nominative_short">%s pol.</string>
|
||||
<string name="length_in_nominative_long">%s polegadas</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">pés</string>
|
||||
<string name="length_ft_nominative_long">%s pés</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">milhas</string>
|
||||
<string name="length_mi_nominative_long">%s milhas</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">mn</string>
|
||||
<string name="length_nmi_display_name_long">milhas náuticas</string>
|
||||
<string name="length_nmi_nominative_short">%s mn</string>
|
||||
<string name="length_nmi_nominative_long">%s milhas náuticas</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s por metro quadrado</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_short">nós</string>
|
||||
<string name="speed_kn_nominative_short">%s nós</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_long">%s Beaufort</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s por metro cúbico</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litros</string>
|
||||
<string name="volume_l_nominative_long">%s litros</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">microgramas</string>
|
||||
<string name="weight_microg_nominative_long">%s microgramas</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">miligramas</string>
|
||||
<string name="weight_mg_nominative_long">%s miligramas</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascais</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascais</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hectopascais</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hectopascais</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">quilopascais</string>
|
||||
<string name="pressure_kpa_nominative_long">%s quilopascais</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<!-- Note: Portugal uses “mb” for short, but for simplicity, we will not support it -->
|
||||
<string name="pressure_mbar_display_name_long">milibares</string>
|
||||
<string name="pressure_mbar_nominative_long">%s milibares</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosferas</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosferas</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">milímetros de mercúrio</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s milímetros de mercúrio</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">polegadas de mercúrio</string>
|
||||
<string name="pressure_inhg_nominative_long">%s polegadas de mercúrio</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_long">%s horas</string>
|
||||
<string name="duration_hr_per_long">%s por hora</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minutos</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_long">%s segundos</string>
|
||||
<string name="duration_sec_per_long">%s por segundo</string>
|
||||
|
||||
</resources>
|
||||
142
weather-unit/src/main/res/values-pt/strings.xml
Normal file
142
weather-unit/src/main/res/values-pt/strings.xml
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/pt.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_short">graus C</string>
|
||||
<string name="temperature_c_display_name_long">graus Celsius</string>
|
||||
<string name="temperature_c_nominative_long">%s graus Celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_short">graus F</string>
|
||||
<string name="temperature_f_display_name_long">graus Fahrenheit</string>
|
||||
<string name="temperature_f_nominative_long">%s graus Fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvins</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvins</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">micrómetros</string>
|
||||
<string name="length_microm_nominative_long">%s micrómetros</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">milímetros</string>
|
||||
<string name="length_mm_nominative_long">%s milímetros</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centímetros</string>
|
||||
<string name="length_cm_nominative_long">%s centímetros</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metros</string>
|
||||
<string name="length_m_nominative_long">%s metros</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">quilómetros</string>
|
||||
<string name="length_km_nominative_long">%s quilómetros</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">pol.</string>
|
||||
<string name="length_in_display_name_long">polegadas</string>
|
||||
<string name="length_in_nominative_short">%s pol.</string>
|
||||
<string name="length_in_nominative_long">%s polegadas</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">pés</string>
|
||||
<string name="length_ft_nominative_long">%s pés</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">milhas</string>
|
||||
<string name="length_mi_nominative_long">%s milhas</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">milhas náuticas</string>
|
||||
<string name="length_nmi_nominative_long">%s milhas náuticas</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s por metro quadrado</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_short">nós</string>
|
||||
<string name="speed_kn_nominative_short">%s nós</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_long">%s Beaufort</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s por metro cúbico</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litros</string>
|
||||
<string name="volume_l_nominative_long">%s litros</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">microgramas</string>
|
||||
<string name="weight_microg_nominative_long">%s microgramas</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">miligramas</string>
|
||||
<string name="weight_mg_nominative_long">%s miligramas</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascais</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascais</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hectopascais</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hectopascais</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">quilopascais</string>
|
||||
<string name="pressure_kpa_nominative_long">%s quilopascais</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<!-- Note: Portugal uses “mb” for short, but for simplicity, we will not support it -->
|
||||
<string name="pressure_mbar_display_name_long">milibares</string>
|
||||
<string name="pressure_mbar_nominative_long">%s milibares</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosferas</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosferas</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">milímetros de mercúrio</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s milímetros de mercúrio</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">polegadas de mercúrio</string>
|
||||
<string name="pressure_inhg_nominative_long">%s polegadas de mercúrio</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_long">%s horas</string>
|
||||
<string name="duration_hr_per_long">%s por hora</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minutos</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_long">%s segundos</string>
|
||||
<string name="duration_sec_per_long">%s por segundo</string>
|
||||
|
||||
</resources>
|
||||
143
weather-unit/src/main/res/values-ro/strings.xml
Normal file
143
weather-unit/src/main/res/values-ro/strings.xml
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/ro.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">grade Celsius</string>
|
||||
<string name="temperature_c_nominative_long">%s grade Celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">grade Fahrenheit</string>
|
||||
<string name="temperature_f_nominative_long">%s grade Fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvini</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvini</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">micrometri</string>
|
||||
<string name="length_microm_nominative_long">%s micrometri</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">milimetri</string>
|
||||
<string name="length_mm_nominative_long">%s milimetri</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centimetri</string>
|
||||
<string name="length_cm_nominative_long">%s centimetri</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metri</string>
|
||||
<string name="length_m_nominative_long">%s metri</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometri</string>
|
||||
<string name="length_km_nominative_long">%s kilometri</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">inchi</string>
|
||||
<string name="length_in_nominative_long">%s inchi</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">picioare</string>
|
||||
<string name="length_ft_nominative_long">%s picioare</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">mile</string>
|
||||
<string name="length_mi_nominative_long">%s mile</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">mn</string>
|
||||
<string name="length_nmi_display_name_long">mile nautice</string>
|
||||
<string name="length_nmi_nominative_short">%s mn</string>
|
||||
<string name="length_nmi_nominative_long">%s mile nautice</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s pe metru pătrat</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">nod</string>
|
||||
<string name="speed_kn_nominative_long">%s noduri</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_nominative_long">Beaufort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s pe metru cub</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litri</string>
|
||||
<string name="volume_l_nominative_long">%s litri</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">micrograme</string>
|
||||
<string name="weight_microg_nominative_long">%s micrograme</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">miligrame</string>
|
||||
<string name="weight_mg_nominative_long">%s miligrame</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascali</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascali</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hectopascali</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hectopascali</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopascali</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopascali</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">milibari</string>
|
||||
<string name="pressure_mbar_nominative_long">%s milibari</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosfere</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosfere</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mm Hg</string>
|
||||
<string name="pressure_mmhg_display_name_long">milimetri coloană de mercur</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s milimetri coloană de mercur</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_short">in Hg</string>
|
||||
<string name="pressure_inhg_display_name_long">inchi coloană de mercur</string>
|
||||
<string name="pressure_inhg_nominative_short">%s in Hg</string>
|
||||
<string name="pressure_inhg_nominative_long">%s inchi coloană de mercur</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_long">%s ore</string>
|
||||
<string name="duration_hr_per_long">%s pe oră</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s min.</string>
|
||||
<string name="duration_min_nominative_long">%s minute</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_long">%s secunde</string>
|
||||
<string name="duration_sec_per_long">%s pe secundă</string>
|
||||
|
||||
</resources>
|
||||
186
weather-unit/src/main/res/values-ru/strings.xml
Normal file
186
weather-unit/src/main/res/values-ru/strings.xml
Normal file
|
|
@ -0,0 +1,186 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/ru.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">градусы Цельсия</string>
|
||||
<string name="temperature_c_nominative_long">%s градуса Цельсия</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">градусы Фаренгейта</string>
|
||||
<string name="temperature_f_nominative_long">%s градуса Фаренгейта</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">кельвины</string>
|
||||
<string name="temperature_k_nominative_long">%s кельвина</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_short">мкм</string>
|
||||
<string name="length_microm_display_name_long">микрометры</string>
|
||||
<string name="length_microm_nominative_short">%s мкм</string>
|
||||
<string name="length_microm_nominative_long">%s микрометра</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_short">мм</string>
|
||||
<string name="length_mm_display_name_long">миллиметры</string>
|
||||
<string name="length_mm_nominative_short">%s мм</string>
|
||||
<string name="length_mm_nominative_long">%s миллиметра</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_short">см</string>
|
||||
<string name="length_cm_display_name_long">сантиметры</string>
|
||||
<string name="length_cm_nominative_short">%s см</string>
|
||||
<string name="length_cm_nominative_long">%s сантиметра</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_short">м</string>
|
||||
<string name="length_m_display_name_long">метры</string>
|
||||
<string name="length_m_nominative_short">%s м</string>
|
||||
<string name="length_m_nominative_long">%s метра</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_short">км</string>
|
||||
<string name="length_km_display_name_long">километры</string>
|
||||
<string name="length_km_nominative_short">%s км</string>
|
||||
<string name="length_km_nominative_long">%s километра</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">дюйм.</string>
|
||||
<string name="length_in_display_name_long">дюймы</string>
|
||||
<string name="length_in_nominative_short">%s дюйм.</string>
|
||||
<string name="length_in_nominative_long">%s дюйма</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">фт</string>
|
||||
<string name="length_ft_display_name_long">футы</string>
|
||||
<string name="length_ft_nominative_short">%s фт</string>
|
||||
<string name="length_ft_nominative_long">%s фута</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_short">ми</string>
|
||||
<string name="length_mi_display_name_long">мили</string>
|
||||
<string name="length_mi_nominative_short">%s ми</string>
|
||||
<string name="length_mi_nominative_long">%s мили</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">мор. ми</string>
|
||||
<string name="length_nmi_display_name_long">морские мили</string>
|
||||
<string name="length_nmi_nominative_short">%s мор. ми</string>
|
||||
<string name="length_nmi_nominative_long">%s морские мили</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_short">%s/м²</string>
|
||||
<string name="area_m2_per_long">%s на квадратный метр</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_short">уз</string>
|
||||
<string name="speed_kn_display_name_long">узел</string>
|
||||
<string name="speed_kn_nominative_short">%s уз</string>
|
||||
<string name="speed_kn_nominative_long">%s узла</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_short">Бфт</string>
|
||||
<string name="speed_bf_display_name_long">баллы Бофорта</string>
|
||||
<string name="speed_bf_nominative_short">%s Бфт</string>
|
||||
<string name="speed_bf_nominative_long">%s балла Бофорта</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_short">%s/м³</string>
|
||||
<string name="volume_m3_per_long">%s на кубический метр</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_short">л</string>
|
||||
<string name="volume_l_display_name_long">литры</string>
|
||||
<string name="volume_l_nominative_short">%s л</string>
|
||||
<string name="volume_l_nominative_long">%s литра</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_short">мкг</string>
|
||||
<string name="weight_microg_display_name_long">микрограммы</string>
|
||||
<string name="weight_microg_nominative_short">%s мкг</string>
|
||||
<string name="weight_microg_nominative_long">%s микрограмма</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_short">мг</string>
|
||||
<string name="weight_mg_display_name_long">миллиграммы</string>
|
||||
<string name="weight_mg_nominative_short">%s мг</string>
|
||||
<string name="weight_mg_nominative_long">%s миллиграмма</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_short">Па</string>
|
||||
<string name="pressure_pa_display_name_long">паскали</string>
|
||||
<string name="pressure_pa_nominative_short">%s Па</string>
|
||||
<string name="pressure_pa_nominative_long">%s паскали</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_short">гПа</string>
|
||||
<string name="pressure_hpa_display_name_long">гектопаскали</string>
|
||||
<string name="pressure_hpa_nominative_short">%s гПа</string>
|
||||
<string name="pressure_hpa_nominative_long">%s гектопаскали</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_short">кПа</string>
|
||||
<string name="pressure_kpa_display_name_long">килопаскали</string>
|
||||
<string name="pressure_kpa_nominative_short">%s кПа</string>
|
||||
<string name="pressure_kpa_nominative_long">%s килопаскали</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_short">мбар</string>
|
||||
<string name="pressure_mbar_display_name_long">миллибары</string>
|
||||
<string name="pressure_mbar_nominative_short">%s мбар</string>
|
||||
<string name="pressure_mbar_nominative_long">%s миллибары</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_short">атм</string>
|
||||
<string name="pressure_atm_display_name_long">атмосферы</string>
|
||||
<string name="pressure_atm_nominative_short">%s атм</string>
|
||||
<string name="pressure_atm_nominative_long">%s атмосферы</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">мм рт. ст.</string>
|
||||
<string name="pressure_mmhg_display_name_long">миллиметры ртутного столба</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s мм рт. ст.</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s миллиметры ртутного столба</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_short">д. рт. ст.</string>
|
||||
<string name="pressure_inhg_display_name_long">дюймы ртутного столба</string>
|
||||
<string name="pressure_inhg_nominative_short">%s д. рт. ст.</string>
|
||||
<string name="pressure_inhg_nominative_long">%s дюймы ртутного столба</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s ч</string>
|
||||
<string name="duration_hr_nominative_long">%s часы</string>
|
||||
<string name="duration_hr_per_short">%s/ч</string>
|
||||
<string name="duration_hr_per_long">%s в час</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s мин</string>
|
||||
<string name="duration_min_nominative_long">%s минуты</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s c</string>
|
||||
<string name="duration_sec_nominative_long">%s секунды</string>
|
||||
<string name="duration_sec_per_short">%s/c</string>
|
||||
<string name="duration_sec_per_long">%s в секунду</string>
|
||||
|
||||
</resources>
|
||||
141
weather-unit/src/main/res/values-sk/strings.xml
Normal file
141
weather-unit/src/main/res/values-sk/strings.xml
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/sk.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">stupne Celzia</string>
|
||||
<string name="temperature_c_nominative_long">%s stupne Celzia</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">stupne Fahrenheita</string>
|
||||
<string name="temperature_f_nominative_long">%s stupne Fahrenheita</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelviny</string>
|
||||
<string name="temperature_k_nominative_long">%s kelviny</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">mikrometre</string>
|
||||
<string name="length_microm_nominative_long">%s mikrometre</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">milimetre</string>
|
||||
<string name="length_mm_nominative_long">%s milimetre</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centimetre</string>
|
||||
<string name="length_cm_nominative_long">%s centimetre</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metre</string>
|
||||
<string name="length_m_nominative_long">%s metre</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometre</string>
|
||||
<string name="length_km_nominative_long">%s kilometre</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">palce</string>
|
||||
<string name="length_in_nominative_long">%s palce</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">stopy</string>
|
||||
<string name="length_ft_nominative_long">%s stopy</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">míle</string>
|
||||
<string name="length_mi_nominative_long">%s míle</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">NM</string>
|
||||
<string name="length_nmi_display_name_long">námorné míle</string>
|
||||
<string name="length_nmi_nominative_short">%s NM</string>
|
||||
<string name="length_nmi_nominative_long">%s námorné míle</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s na meter štvorcový</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">uzly</string>
|
||||
<string name="speed_kn_nominative_long">%s uzly</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">stupeň Beaufortovej stupnice</string>
|
||||
<string name="speed_bf_nominative_long">%s stupne Beaufortovej stupnice</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s na kubický meter</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litre</string>
|
||||
<string name="volume_l_nominative_long">%s litre</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">mikrogramy</string>
|
||||
<string name="weight_microg_nominative_long">%s mikrogramy</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">miligramy</string>
|
||||
<string name="weight_mg_nominative_long">%s miligramy</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascaly</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascaly</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hektopascaly</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hektopascaly</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopascaly</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopascaly</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">milibary</string>
|
||||
<string name="pressure_mbar_nominative_long">%s milibary</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosféry</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosféry</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mm Hg</string>
|
||||
<string name="pressure_mmhg_display_name_long">milimetre ortuťového stĺpca</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s milimetre ortuťového stĺpca</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">palce ortuťového stĺpca</string>
|
||||
<string name="pressure_inhg_nominative_long">%s palce ortuťového stĺpca</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_long">%s hodiny</string>
|
||||
<string name="duration_hr_per_long">%s za hodinu</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minúty</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_long">%s sekundy</string>
|
||||
<string name="duration_sec_per_long">%s za sekundu</string>
|
||||
|
||||
</resources>
|
||||
140
weather-unit/src/main/res/values-sl-rSI/strings.xml
Normal file
140
weather-unit/src/main/res/values-sl-rSI/strings.xml
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/sl.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">stopinje Celzija</string>
|
||||
<string name="temperature_c_nominative_long">%s stopinje Celzija</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">stopinje Farenheita</string>
|
||||
<string name="temperature_f_nominative_long">%s stopinje Farenheita</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvini</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvini</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">mikrometri</string>
|
||||
<string name="length_microm_nominative_long">%s mikrometri</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">milimetri</string>
|
||||
<string name="length_mm_nominative_long">%s milimetri</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centimetri</string>
|
||||
<string name="length_cm_nominative_long">%s centimetri</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metri</string>
|
||||
<string name="length_m_nominative_long">%s metri</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometri</string>
|
||||
<string name="length_km_nominative_long">%s kilometri</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">palec</string>
|
||||
<string name="length_in_nominative_long">%s palci</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">čevlji</string>
|
||||
<string name="length_ft_nominative_long">%s čevlji</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">milje</string>
|
||||
<string name="length_mi_nominative_long">%s milje</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">navtična milja</string>
|
||||
<string name="length_nmi_nominative_long">%s navtične milje</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s na kvadratni meter</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">vozel</string>
|
||||
<string name="speed_kn_nominative_long">%s vozli</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_short">Bf</string>
|
||||
<string name="speed_bf_display_name_long">bofor</string>
|
||||
<string name="speed_bf_nominative_short">%s Bf</string>
|
||||
<string name="speed_bf_nominative_long">%s bofori</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s na kubični meter</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litri</string>
|
||||
<string name="volume_l_nominative_long">%s litri</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">mikrogrami</string>
|
||||
<string name="weight_microg_nominative_long">%s mikrogrami</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">miligrami</string>
|
||||
<string name="weight_mg_nominative_long">%s miligrami</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">paskali</string>
|
||||
<string name="pressure_pa_nominative_long">%s paskali</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hektopaskali</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hektopaskali</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopaskali</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopaskali</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">milibari</string>
|
||||
<string name="pressure_mbar_nominative_long">%s milibari</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosfere</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosfere</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">milimetri živega srebra</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s milimetri živega srebra</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">palci živega srebra</string>
|
||||
<string name="pressure_inhg_nominative_long">%s palci živega srebra</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_long">%s ure</string>
|
||||
<string name="duration_hr_per_long">%s na uro</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minute</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s sek.</string>
|
||||
<string name="duration_sec_nominative_long">%s sekunde</string>
|
||||
<string name="duration_sec_per_long">%s na sekundo</string>
|
||||
|
||||
</resources>
|
||||
146
weather-unit/src/main/res/values-sr/strings.xml
Normal file
146
weather-unit/src/main/res/values-sr/strings.xml
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/sr.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">степени Целзијуса</string>
|
||||
<string name="temperature_c_nominative_long">%s степени Целзијуса</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">степени Фаренхајта</string>
|
||||
<string name="temperature_f_nominative_long">%s степени Фаренхајта</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">келвин</string>
|
||||
<string name="temperature_k_nominative_long">%s келвина</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">микрометри</string>
|
||||
<string name="length_microm_nominative_long">%s микрометра</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">милиметри</string>
|
||||
<string name="length_mm_nominative_long">%s милиметра</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">центиметри</string>
|
||||
<string name="length_cm_nominative_long">%s центиметра</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">метри</string>
|
||||
<string name="length_m_nominative_long">%s метра</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">километри</string>
|
||||
<string name="length_km_nominative_long">%s километра</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">инчи</string>
|
||||
<string name="length_in_nominative_short">%s инчи</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">стопе</string>
|
||||
<string name="length_ft_nominative_long">%s стопе</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">миље</string>
|
||||
<string name="length_mi_nominative_long">%s миље</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">наутичке миље</string>
|
||||
<string name="length_nmi_nominative_long">%s наутичке миље</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">чвор</string>
|
||||
<string name="speed_kn_nominative_long">%s чвора</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_short">Bf</string>
|
||||
<string name="speed_bf_display_name_long">Бофор</string>
|
||||
<string name="speed_bf_nominative_short">Bf %s</string>
|
||||
<string name="speed_bf_nominative_long">Бофор %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">литри</string>
|
||||
<string name="volume_l_nominative_long">%s литра</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">микрограми</string>
|
||||
<string name="weight_microg_nominative_long">%s микрограма</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">милиграми</string>
|
||||
<string name="weight_mg_nominative_long">%s милиграма</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">паскали</string>
|
||||
<string name="pressure_pa_nominative_long">%s паскали</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">хектопаскали</string>
|
||||
<string name="pressure_hpa_nominative_long">%s хектопаскали</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">килопаскали</string>
|
||||
<string name="pressure_kpa_nominative_long">%s килопаскали</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">милибари</string>
|
||||
<string name="pressure_mbar_nominative_long">%s милибари</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">атмосфере</string>
|
||||
<string name="pressure_atm_nominative_long">%s атмосфере</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mm Hg</string>
|
||||
<string name="pressure_mmhg_display_name_long">милиметри живиног стуба</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s милиметри живиног стуба</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">инчи живиног стуба</string>
|
||||
<string name="pressure_inhg_nominative_long">%s инчи живиног стуба</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s ч</string>
|
||||
<string name="duration_hr_nominative_long">%s сати</string>
|
||||
<string name="duration_hr_per_short">%s/ч</string>
|
||||
<string name="duration_hr_per_long">%s/сат</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s мин</string>
|
||||
<string name="duration_min_nominative_long">%s минути</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s сек</string>
|
||||
<string name="duration_sec_nominative_long">%s секунде</string>
|
||||
<string name="duration_sec_per_short">%s/с</string>
|
||||
<string name="duration_sec_per_long">%s/у секунди</string>
|
||||
|
||||
</resources>
|
||||
144
weather-unit/src/main/res/values-sv/strings.xml
Normal file
144
weather-unit/src/main/res/values-sv/strings.xml
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/sv.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">grader Celsius</string>
|
||||
<string name="temperature_c_nominative_long">%s grader Celsius</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">grader Fahrenheit</string>
|
||||
<string name="temperature_f_nominative_long">%s grader Fahrenheit</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvin</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvin</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">mikrometer</string>
|
||||
<string name="length_microm_nominative_long">%s mikrometer</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">millimeter</string>
|
||||
<string name="length_mm_nominative_long">%s millimeter</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">centimeter</string>
|
||||
<string name="length_cm_nominative_long">%s centimeter</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">meter</string>
|
||||
<string name="length_m_nominative_long">%s meter</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometer</string>
|
||||
<string name="length_km_nominative_long">%s kilometer</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">tum</string>
|
||||
<string name="length_in_nominative_short">%s tum</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">fot</string>
|
||||
<string name="length_ft_nominative_short">%s fot</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">mile</string>
|
||||
<string name="length_mi_nominative_long">%s mile</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">naut. mil</string>
|
||||
<string name="length_nmi_display_name_long">nautiska mil</string>
|
||||
<string name="length_nmi_nominative_short">%s naut. mil</string>
|
||||
<string name="length_nmi_nominative_long">%s nautiska mil</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s per kvadratmeter</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_short">knop</string>
|
||||
<string name="speed_kn_nominative_short">%s knop</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_long">Beaufort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s per kubikmeter</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">liter</string>
|
||||
<string name="volume_l_nominative_long">%s liter</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">mikrogram</string>
|
||||
<string name="weight_microg_nominative_long">%s mikrogram</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">milligram</string>
|
||||
<string name="weight_mg_nominative_long">%s milligram</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascal</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascal</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hektopascal</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hektopascal</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopascal</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopascal</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">millibar</string>
|
||||
<string name="pressure_mbar_nominative_long">%s millibar</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosfärer</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosfärer</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mm Hg</string>
|
||||
<string name="pressure_mmhg_display_name_long">millimeter kvicksilver</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s millimeter kvicksilver</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_short">tum Hg</string>
|
||||
<string name="pressure_inhg_display_name_long">tum kvicksilver</string>
|
||||
<string name="pressure_inhg_nominative_short">%s tum Hg</string>
|
||||
<string name="pressure_inhg_nominative_long">%s tum kvicksilver</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s tim</string>
|
||||
<string name="duration_hr_nominative_long">%s timmar</string>
|
||||
<string name="duration_hr_per_long">%s per timme</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_long">%s minuter</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_long">%s sekunder</string>
|
||||
<string name="duration_sec_per_long">%s per sekund</string>
|
||||
|
||||
</resources>
|
||||
188
weather-unit/src/main/res/values-ta/strings.xml
Normal file
188
weather-unit/src/main/res/values-ta/strings.xml
Normal file
|
|
@ -0,0 +1,188 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/ta.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_short">°செ</string>
|
||||
<string name="temperature_c_display_name_long">டிகிரி செல்சியஸ்</string>
|
||||
<string name="temperature_c_nominative_short">%s°செ.</string>
|
||||
<string name="temperature_c_nominative_long">%s டிகிரி செல்சியஸ்</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_short">°ஃபா</string>
|
||||
<string name="temperature_f_display_name_long">டிகிரி ஃபாரன்ஹீட்</string>
|
||||
<string name="temperature_f_nominative_short">%s°ஃபா.</string>
|
||||
<string name="temperature_f_nominative_long">%s டிகிரி ஃபாரன்ஹீட்</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_short">கெல்.</string>
|
||||
<string name="temperature_k_display_name_long">கெல்வின்</string>
|
||||
<string name="temperature_k_nominative_short">%s கெல்.</string>
|
||||
<string name="temperature_k_nominative_long">%s கெல்வின்ஸ்</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_short">μமீ.</string>
|
||||
<string name="length_microm_display_name_long">மைக்ரோமீட்டர்கள்</string>
|
||||
<string name="length_microm_nominative_short">%s μமீ.</string>
|
||||
<string name="length_microm_nominative_long">%s மைக்ரோமீட்டர்கள்</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_short">மி.மீ.</string>
|
||||
<string name="length_mm_display_name_long">மில்லிமீட்டர்கள்</string>
|
||||
<string name="length_mm_nominative_short">%s மி.மீ.</string>
|
||||
<string name="length_mm_nominative_long">%s மில்லிமீட்டர்கள்</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_short">செ.மீ.</string>
|
||||
<string name="length_cm_display_name_long">சென்டிமீட்டர்கள்</string>
|
||||
<string name="length_cm_nominative_short">%s செ.மீ.</string>
|
||||
<string name="length_cm_nominative_long">%s சென்டிமீட்டர்கள்</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_short">மீ.</string>
|
||||
<string name="length_m_display_name_long">மீட்டர்கள்</string>
|
||||
<string name="length_m_nominative_short">%s மீ.</string>
|
||||
<string name="length_m_nominative_long">%s மீட்டர்கள்</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_short">கி.மீ.</string>
|
||||
<string name="length_km_display_name_long">கிலோமீட்டர்கள்</string>
|
||||
<string name="length_km_nominative_short">%s கி.மீ.</string>
|
||||
<string name="length_km_nominative_long">%s கிலோமீட்டர்கள்</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">அங்.</string>
|
||||
<string name="length_in_display_name_long">அங்குலங்கள்</string>
|
||||
<string name="length_in_nominative_short">%s அங்.</string>
|
||||
<string name="length_in_nominative_long">%s அங்குலங்கள்</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">அடி</string>
|
||||
<string name="length_ft_nominative_short">%s அடி</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_short">மை.</string>
|
||||
<string name="length_mi_display_name_long">மைல்கள்</string>
|
||||
<string name="length_mi_nominative_short">%s மை.</string>
|
||||
<string name="length_mi_nominative_long">%s மைல்கள்</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">க.மை.</string>
|
||||
<string name="length_nmi_display_name_long">கடல் மைல்கள்</string>
|
||||
<string name="length_nmi_nominative_short">%s க.மை.s</string>
|
||||
<string name="length_nmi_nominative_long">%s கடல் மைல்கள்</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_short">%s/மீ²</string>
|
||||
<string name="area_m2_per_long">%s/சதுர மீட்டர்</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_short">நா.</string>
|
||||
<string name="speed_kn_display_name_long">நாட்</string>
|
||||
<string name="speed_kn_nominative_short">%s நா.</string>
|
||||
<string name="speed_kn_nominative_long">%s நாட்</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_short">பியூ.</string>
|
||||
<string name="speed_bf_display_name_long">பியூஃபோர்ட்</string>
|
||||
<string name="speed_bf_nominative_short">பியூ. %s</string>
|
||||
<string name="speed_bf_nominative_long">பியூஃபோர்ட் %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_short">%s/மீ³</string>
|
||||
<string name="volume_m3_per_long">%s/கன மீட்டர்</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_short">லி.</string>
|
||||
<string name="volume_l_display_name_long">லிட்டர்கள்</string>
|
||||
<string name="volume_l_nominative_short">%s லி.</string>
|
||||
<string name="volume_l_nominative_long">%s லிட்டர்கள்</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_short">μகி</string>
|
||||
<string name="weight_microg_display_name_long">மைக்ரோ கிராம்கள்</string>
|
||||
<string name="weight_microg_nominative_short">%s μகி</string>
|
||||
<string name="weight_microg_nominative_long">%s மைக்ரோ கிராம்கள்</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_short">மி.கி.</string>
|
||||
<string name="weight_mg_display_name_long">மில்லி கிராம்கள்</string>
|
||||
<string name="weight_mg_nominative_short">%s மி.கி.</string>
|
||||
<string name="weight_mg_nominative_long">%s மில்லி கிராம்கள்</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_short">பா.</string>
|
||||
<string name="pressure_pa_display_name_long">பாஸ்கல்கள்</string>
|
||||
<string name="pressure_pa_nominative_short">%s பா.</string>
|
||||
<string name="pressure_pa_nominative_long">%s பாஸ்கல்கள்</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_short">ஹெ.பாஸ்.</string>
|
||||
<string name="pressure_hpa_display_name_long">ஹெக்டோபாஸ்கல்</string>
|
||||
<string name="pressure_hpa_nominative_short">%s ஹெ.பாஸ்.</string>
|
||||
<string name="pressure_hpa_nominative_long">%s ஹெக்டோபாஸ்கல்</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_short">கிபா</string>
|
||||
<string name="pressure_kpa_display_name_long">கிலோபாஸ்கல்ஸ்</string>
|
||||
<string name="pressure_kpa_nominative_short">%s கிபா</string>
|
||||
<string name="pressure_kpa_nominative_long">%s கிலோபாஸ்கல்ஸ்</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_short">மி.பா.</string>
|
||||
<string name="pressure_mbar_display_name_long">மில்லிபார்கள்</string>
|
||||
<string name="pressure_mbar_nominative_short">%s மி.பா.</string>
|
||||
<string name="pressure_mbar_nominative_long">%s மில்லிபார்கள்</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">வளிமண்டலம்</string>
|
||||
<string name="pressure_atm_nominative_long">%s வளிமண்டலம்</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">பாத. மி.மீ.</string>
|
||||
<string name="pressure_mmhg_display_name_long">பாதரச மில்லிமீட்டர்கள்</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s பாத. மி.மீ.</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s பாதரச மில்லிமீட்டர்கள்</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_short">பாத. அங்.</string>
|
||||
<string name="pressure_inhg_display_name_long">பாதரச அங்குலங்கள்</string>
|
||||
<string name="pressure_inhg_nominative_short">%s பாத. அங்.</string>
|
||||
<string name="pressure_inhg_nominative_long">%s பாதரச அங்குலங்கள்</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s மணிநேர.</string>
|
||||
<string name="duration_hr_nominative_long">%s மணிநேரங்கள்</string>
|
||||
<string name="duration_hr_per_short">%s/ம.நே</string>
|
||||
<string name="duration_hr_per_long">%s/மணிநேரம்</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s நிமிட.</string>
|
||||
<string name="duration_min_nominative_long">%s நிமிடங்கள்</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s விநாடி</string>
|
||||
<string name="duration_sec_nominative_long">%s விநாடிகள்</string>
|
||||
<string name="duration_sec_per_short">%s/வி.</string>
|
||||
<string name="duration_sec_per_long">%s/விநாடி</string>
|
||||
|
||||
</resources>
|
||||
161
weather-unit/src/main/res/values-th/strings.xml
Normal file
161
weather-unit/src/main/res/values-th/strings.xml
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/th.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">องศาเซลเซียส</string>
|
||||
<string name="temperature_c_nominative_long">%s องศาเซลเซียส</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">องศาฟาเรนไฮต์</string>
|
||||
<string name="temperature_f_nominative_long">%s องศาฟาเรนไฮต์</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">เคลวิน</string>
|
||||
<string name="temperature_k_nominative_long">%s เคลวิน</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">ไมโครเมตร</string>
|
||||
<string name="length_microm_nominative_long">%s ไมโครเมตร</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_short">มม.</string>
|
||||
<string name="length_mm_display_name_long">มิลลิเมตร</string>
|
||||
<string name="length_mm_nominative_short">%s มม.</string>
|
||||
<string name="length_mm_nominative_long">%s มิลลิเมตร</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_short">ซม.</string>
|
||||
<string name="length_cm_display_name_long">เซนติเมตร</string>
|
||||
<string name="length_cm_nominative_short">%s ซม.</string>
|
||||
<string name="length_cm_nominative_long">%s เซนติเมตร</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_short">ม.</string>
|
||||
<string name="length_m_display_name_long">เมตร</string>
|
||||
<string name="length_m_nominative_short">%s ม.</string>
|
||||
<string name="length_m_nominative_long">%s เมตร</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_short">กม.</string>
|
||||
<string name="length_km_display_name_long">กิโลเมตร</string>
|
||||
<string name="length_km_nominative_short">%s กม.</string>
|
||||
<string name="length_km_nominative_long">%s กิโลเมตร</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">นิ้ว</string>
|
||||
<string name="length_in_nominative_short">%s นิ้ว</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">ฟุต</string>
|
||||
<string name="length_ft_nominative_short">%s ฟุต</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_short">ไมล์</string>
|
||||
<string name="length_mi_nominative_short">%s ไมล์</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">ไมล์ทะเล</string>
|
||||
<string name="length_nmi_nominative_short">%s ไมล์ทะเล</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_short">%s/ตร.ม.</string>
|
||||
<string name="area_m2_per_long">%s ต่อตารางเมตร</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_short">นอต</string>
|
||||
<string name="speed_kn_nominative_short">%s นอต</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">โบฟอร์ต</string>
|
||||
<string name="speed_bf_nominative_long">โบฟอร์ต %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_short">%s/ลบ.ม.</string>
|
||||
<string name="volume_m3_per_long">%s ต่อลูกบาศก์เมตร</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_short">ล.</string>
|
||||
<string name="volume_l_display_name_long">ลิตร</string>
|
||||
<string name="volume_l_nominative_short">%s ล.</string>
|
||||
<string name="volume_l_nominative_long">%s ลิตร</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_short">มคก.</string>
|
||||
<string name="weight_microg_display_name_long">ไมโครกรัม</string>
|
||||
<string name="weight_microg_nominative_short">%s มคก.</string>
|
||||
<string name="weight_microg_nominative_long">%s ไมโครกรัม</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_short">มก.</string>
|
||||
<string name="weight_mg_display_name_long">มิลลิกรัม</string>
|
||||
<string name="weight_mg_nominative_short">%s มก.</string>
|
||||
<string name="weight_mg_nominative_long">%s มิลลิกรัม</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Hectopascal is inconsistent with other *pascal units in this language, but well… -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">ปาสกาล</string>
|
||||
<string name="pressure_pa_nominative_long">%s ปาสกาล</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_short">เฮกโตปาสกาล</string>
|
||||
<string name="pressure_hpa_nominative_short">%s เฮกโตปาสกาล</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">กิโลปาสกาล</string>
|
||||
<string name="pressure_kpa_nominative_long">%s กิโลปาสกาล</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_short">มิลลิบาร์</string>
|
||||
<string name="pressure_mbar_nominative_short">%s มิลลิบาร์</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_short">บรรยากาศ</string>
|
||||
<string name="pressure_atm_nominative_short">%s บรรยากาศ</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">มม. ปรอท</string>
|
||||
<string name="pressure_mmhg_display_name_long">มิลลิเมตรปรอท</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s มม. ปรอท</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s มิลลิเมตรปรอท</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_short">นิ้วปรอท</string>
|
||||
<string name="pressure_inhg_nominative_short">%s นิ้วปรอท</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s ชม.</string>
|
||||
<string name="duration_hr_nominative_long">%s ชั่วโมง</string>
|
||||
<string name="duration_hr_per_short">%s/ชม.</string>
|
||||
<string name="duration_hr_per_long">%s ต่อชั่วโมง</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s นาที</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s วิ</string>
|
||||
<string name="duration_sec_nominative_long">%s วินาที</string>
|
||||
<string name="duration_sec_per_short">%s/วิ</string>
|
||||
<string name="duration_sec_per_long">%s ต่อวินาที</string>
|
||||
|
||||
</resources>
|
||||
142
weather-unit/src/main/res/values-tr/strings.xml
Normal file
142
weather-unit/src/main/res/values-tr/strings.xml
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/tr.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">santigrat derece</string>
|
||||
<string name="temperature_c_nominative_long">%s santigrat derece</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">fahrenhayt derece</string>
|
||||
<string name="temperature_f_nominative_long">%s fahrenhayt derece</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">kelvin</string>
|
||||
<string name="temperature_k_nominative_long">%s kelvin</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">mikrometre</string>
|
||||
<string name="length_microm_nominative_long">%s mikrometre</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">milimetre</string>
|
||||
<string name="length_mm_nominative_long">%s milimetre</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">santimetre</string>
|
||||
<string name="length_cm_nominative_long">%s santimetre</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">metre</string>
|
||||
<string name="length_m_nominative_long">%s metre</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilometre</string>
|
||||
<string name="length_km_nominative_long">%s kilometre</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">inç</string>
|
||||
<string name="length_in_nominative_short">%s inç</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">fit</string>
|
||||
<string name="length_ft_nominative_short">%s fit</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_short">mil</string>
|
||||
<string name="length_mi_nominative_short">%s mil</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">deniz mili</string>
|
||||
<string name="length_nmi_nominative_long">%s deniz mili</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s/metrekare</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">knot</string>
|
||||
<string name="speed_kn_nominative_long">%s knot</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_long">Beaufort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s/metreküp</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">litre</string>
|
||||
<string name="volume_l_nominative_long">%s litre</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">mikrogram</string>
|
||||
<string name="weight_microg_nominative_long">%s mikrogram</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">miligram</string>
|
||||
<string name="weight_mg_nominative_long">%s miligram</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">paskal</string>
|
||||
<string name="pressure_pa_nominative_long">%s paskal</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">hektopaskal</string>
|
||||
<string name="pressure_hpa_nominative_long">%s hektopaskal</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilopaskal</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilopaskal</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">milibar</string>
|
||||
<string name="pressure_mbar_nominative_long">%s milibar</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">atmosfer</string>
|
||||
<string name="pressure_atm_nominative_long">%s atmosfer</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">milimetre cıva</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s milimetre cıva</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">inç cıva</string>
|
||||
<string name="pressure_inhg_nominative_long">%s inç cıva</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s sa.</string>
|
||||
<string name="duration_hr_nominative_long">%s saat</string>
|
||||
<string name="duration_hr_per_short">%s/sa</string>
|
||||
<string name="duration_hr_per_long">%s/saat</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s dk.</string>
|
||||
<string name="duration_min_nominative_long">%s dakika</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s sn.</string>
|
||||
<string name="duration_sec_nominative_long">%s saniye</string>
|
||||
<string name="duration_sec_per_short">%s/sn</string>
|
||||
<string name="duration_sec_per_long">%s/saniye</string>
|
||||
|
||||
</resources>
|
||||
184
weather-unit/src/main/res/values-uk/strings.xml
Normal file
184
weather-unit/src/main/res/values-uk/strings.xml
Normal file
|
|
@ -0,0 +1,184 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/uk.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">градуси Цельсія</string>
|
||||
<string name="temperature_c_nominative_long">%s градуси Цельсія</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">градуси Фаренгейта</string>
|
||||
<string name="temperature_f_nominative_long">%s градуси Фаренгейта</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">кельвіни</string>
|
||||
<string name="temperature_k_nominative_long">%s кельвіни</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_short">мкм</string>
|
||||
<string name="length_microm_display_name_long">мікрометри</string>
|
||||
<string name="length_microm_nominative_short">%s мкм</string>
|
||||
<string name="length_microm_nominative_long">%s мікрометри</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_short">мм</string>
|
||||
<string name="length_mm_display_name_long">міліметри</string>
|
||||
<string name="length_mm_nominative_short">%s мм</string>
|
||||
<string name="length_mm_nominative_long">%s міліметри</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_short">см</string>
|
||||
<string name="length_cm_display_name_long">сантиметри</string>
|
||||
<string name="length_cm_nominative_short">%s см</string>
|
||||
<string name="length_cm_nominative_long">%s сантиметри</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_short">м</string>
|
||||
<string name="length_m_display_name_long">метри</string>
|
||||
<string name="length_m_nominative_short">%s м</string>
|
||||
<string name="length_m_nominative_long">%s метри</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_short">км</string>
|
||||
<string name="length_km_display_name_long">кілометри</string>
|
||||
<string name="length_km_nominative_short">%s км</string>
|
||||
<string name="length_km_nominative_long">%s кілометри</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">дюйми</string>
|
||||
<string name="length_in_nominative_short">%s дюйми</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">фт</string>
|
||||
<string name="length_ft_display_name_long">фути</string>
|
||||
<string name="length_ft_nominative_short">%s фт</string>
|
||||
<string name="length_ft_nominative_long">%s фути</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_short">мл</string>
|
||||
<string name="length_mi_display_name_long">милі</string>
|
||||
<string name="length_mi_nominative_short">%s мл</string>
|
||||
<string name="length_mi_nominative_long">%s милі</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">м. милі</string>
|
||||
<string name="length_nmi_display_name_long">морські милі</string>
|
||||
<string name="length_nmi_nominative_short">%s м. милі</string>
|
||||
<string name="length_nmi_nominative_long">%s морські милі</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_short">%s/м²</string>
|
||||
<string name="area_m2_per_long">%s на квадратний метр</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_short">вуз.</string>
|
||||
<string name="speed_kn_display_name_long">вузли</string>
|
||||
<string name="speed_kn_nominative_short">%s вуз.</string>
|
||||
<string name="speed_kn_nominative_long">%s вузли</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_short">Бофорт</string>
|
||||
<string name="speed_bf_display_name_long">бали за шкалою Бофорта</string>
|
||||
<string name="speed_bf_nominative_short">%s бала</string>
|
||||
<string name="speed_bf_nominative_long">%s бала за шкалою Бофорта</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_short">%s/м³</string>
|
||||
<string name="volume_m3_per_long">%s на кубічний метр</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_short">л</string>
|
||||
<string name="volume_l_display_name_long">літри</string>
|
||||
<string name="volume_l_nominative_short">%s л</string>
|
||||
<string name="volume_l_nominative_long">%s літри</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_short">мкг</string>
|
||||
<string name="weight_microg_display_name_long">мікрограми</string>
|
||||
<string name="weight_microg_nominative_short">%s мкг</string>
|
||||
<string name="weight_microg_nominative_long">%s мікрограми</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_short">мг</string>
|
||||
<string name="weight_mg_display_name_long">міліграми</string>
|
||||
<string name="weight_mg_nominative_short">%s мг</string>
|
||||
<string name="weight_mg_nominative_long">%s міліграми</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_short">Па</string>
|
||||
<string name="pressure_pa_display_name_long">паскалі</string>
|
||||
<string name="pressure_pa_nominative_short">%s Па</string>
|
||||
<string name="pressure_pa_nominative_long">%s паскалі</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_short">гПа</string>
|
||||
<string name="pressure_hpa_display_name_long">гектопаскалі</string>
|
||||
<string name="pressure_hpa_nominative_short">%s гПа</string>
|
||||
<string name="pressure_hpa_nominative_long">%s гектопаскалі</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_short">кПа</string>
|
||||
<string name="pressure_kpa_display_name_long">кілопаскалі</string>
|
||||
<string name="pressure_kpa_nominative_short">%s кПа</string>
|
||||
<string name="pressure_kpa_nominative_long">%s кілопаскалі</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_short">мбар</string>
|
||||
<string name="pressure_mbar_display_name_long">мілібари</string>
|
||||
<string name="pressure_mbar_nominative_short">%s мбар</string>
|
||||
<string name="pressure_mbar_nominative_long">%s мілібари</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_short">атм</string>
|
||||
<string name="pressure_atm_display_name_long">атмосфери</string>
|
||||
<string name="pressure_atm_nominative_short">%s атм</string>
|
||||
<string name="pressure_atm_nominative_long">%s атмосфери</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">мм рт. ст.</string>
|
||||
<string name="pressure_mmhg_display_name_long">міліметри ртутного стовпа</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s мм рт. ст.</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s міліметри ртутного стовпа</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_short">дюйми рт. ст.</string>
|
||||
<string name="pressure_inhg_display_name_long">дюйми ртутного стовпа</string>
|
||||
<string name="pressure_inhg_nominative_short">%s дюйми рт. ст.</string>
|
||||
<string name="pressure_inhg_nominative_long">%s дюйми ртутного стовпа</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s год</string>
|
||||
<string name="duration_hr_nominative_long">%s години</string>
|
||||
<string name="duration_hr_per_short">%s/год</string>
|
||||
<string name="duration_hr_per_long">%s на годину</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s хв</string>
|
||||
<string name="duration_min_nominative_long">%s хвилини</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s с</string>
|
||||
<string name="duration_sec_nominative_long">%s секунди</string>
|
||||
<string name="duration_sec_per_short">%s/с</string>
|
||||
<string name="duration_sec_per_long">%s на секунду</string>
|
||||
|
||||
</resources>
|
||||
141
weather-unit/src/main/res/values-vi/strings.xml
Normal file
141
weather-unit/src/main/res/values-vi/strings.xml
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/vi.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">độ C</string>
|
||||
<string name="temperature_c_nominative_long">%s độ C</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">độ F</string>
|
||||
<string name="temperature_f_nominative_long">%s độ F</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">độ K</string>
|
||||
<string name="temperature_k_nominative_long">%s độ K</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">micrômét</string>
|
||||
<string name="length_microm_nominative_long">%s micrômét</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">milimét</string>
|
||||
<string name="length_mm_nominative_long">%s milimét</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">xentimét</string>
|
||||
<string name="length_cm_nominative_long">%s xentimét</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">mét</string>
|
||||
<string name="length_m_nominative_long">%s mét</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">kilômét</string>
|
||||
<string name="length_km_nominative_long">%s kilômét</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">inch</string>
|
||||
<string name="length_in_nominative_long">%s inch</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">feet</string>
|
||||
<string name="length_ft_nominative_long">%s feet</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_short">dặm</string>
|
||||
<string name="length_mi_nominative_short">%s dặm</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">hải lý</string>
|
||||
<string name="length_nmi_nominative_long">%s hải lý</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">hải lý/giờ</string>
|
||||
<string name="speed_kn_nominative_long">%s hải lý/giờ</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_long">Beaufort</string>
|
||||
<string name="speed_bf_nominative_long">Beaufort %s</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<!-- No change -->
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">lít</string>
|
||||
<string name="volume_l_nominative_long">%s lít</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">micrôgam</string>
|
||||
<string name="weight_microg_nominative_long">%s micrôgam</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">miligam</string>
|
||||
<string name="weight_mg_nominative_long">%s miligam</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Fixing inconsistencies in Pascal units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">pascal</string>
|
||||
<string name="pressure_pa_nominative_long">%s pascal</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">héctô pascal</string>
|
||||
<string name="pressure_hpa_nominative_long">%s héctô pascal</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">kilô pascal</string>
|
||||
<string name="pressure_kpa_nominative_long">%s kilô pascal</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">millibar</string>
|
||||
<string name="pressure_mbar_nominative_long">%s millibar</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">átmốtphe</string>
|
||||
<string name="pressure_atm_nominative_long">%s átmốtphe</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mm Hg</string>
|
||||
<string name="pressure_mmhg_display_name_long">milimét thủy ngân</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mm Hg</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s milimét thủy ngân</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">inch thủy ngân</string>
|
||||
<string name="pressure_inhg_nominative_long">%s inch thủy ngân</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s giờ</string>
|
||||
<string name="duration_hr_per_short">%s/giờ</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s phút</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s giây</string>
|
||||
<string name="duration_sec_per_short">%s/giây</string>
|
||||
|
||||
</resources>
|
||||
144
weather-unit/src/main/res/values-zh-rCN/strings.xml
Normal file
144
weather-unit/src/main/res/values-zh-rCN/strings.xml
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/zh.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Value separator -->
|
||||
<string name="locale_separator">,</string>
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">摄氏度</string>
|
||||
<string name="temperature_c_nominative_short">%s°C</string>
|
||||
<string name="temperature_c_nominative_long">%s摄氏度</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">摄氏度</string>
|
||||
<string name="temperature_f_nominative_short">%s°F</string>
|
||||
<string name="temperature_f_nominative_long">%s摄氏度</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">开尔文</string>
|
||||
<string name="temperature_k_nominative_short">%sK</string>
|
||||
<string name="temperature_k_nominative_long">%s开尔文</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_short">微米</string>
|
||||
<string name="length_microm_nominative_short">%s微米</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_short">毫米</string>
|
||||
<string name="length_mm_nominative_short">%s毫米</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_short">厘米</string>
|
||||
<string name="length_cm_nominative_short">%s厘米</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_short">米</string>
|
||||
<string name="length_m_nominative_short">%s米</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_short">公里</string>
|
||||
<string name="length_km_nominative_short">%s公里</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">英寸</string>
|
||||
<string name="length_in_nominative_short">%s英寸</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">英尺</string>
|
||||
<string name="length_ft_nominative_short">%s英尺</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_short">英里</string>
|
||||
<string name="length_mi_nominative_short">%s英里</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">海里</string>
|
||||
<string name="length_nmi_nominative_short">%s海里</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s/平方米</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">节</string>
|
||||
<string name="speed_kn_nominative_long">%s节</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_short">蒲福风级</string>
|
||||
<string name="speed_bf_nominative_short">%s级</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s/立方米</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_short">升</string>
|
||||
<string name="volume_l_nominative_short">%s升</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">微克</string>
|
||||
<string name="weight_microg_nominative_long">%s微克</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">毫克</string>
|
||||
<string name="weight_mg_nominative_long">%s毫克</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">帕斯卡</string>
|
||||
<string name="pressure_pa_nominative_long">%s帕斯卡</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">百帕斯卡</string>
|
||||
<string name="pressure_hpa_nominative_long">%s百帕斯卡</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">千帕斯卡</string>
|
||||
<string name="pressure_kpa_nominative_long">%s千帕斯卡</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">毫巴</string>
|
||||
<string name="pressure_mbar_nominative_long">%s毫巴</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">标准大气压</string>
|
||||
<string name="pressure_atm_nominative_long">%s标准大气压</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">毫米汞柱</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s毫米汞柱</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">英寸汞柱</string>
|
||||
<string name="pressure_inhg_nominative_long">%s英寸汞柱</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s小时</string>
|
||||
<string name="duration_hr_per_short">%s/小时</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s分钟</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s秒</string>
|
||||
<string name="duration_sec_nominative_long">%s秒钟</string>
|
||||
<string name="duration_sec_per_short">%s/秒</string>
|
||||
|
||||
</resources>
|
||||
145
weather-unit/src/main/res/values-zh-rHK/strings.xml
Normal file
145
weather-unit/src/main/res/values-zh-rHK/strings.xml
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Loosely based on https://www.unicode.org/cldr/charts/47/summary/zh_Hant.html -->
|
||||
<!-- Due to various major issues -->
|
||||
<!-- https://unicode-org.atlassian.net/jira/software/c/projects/CLDR/issues/CLDR-10604 -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Value separator -->
|
||||
<string name="locale_separator">,</string>
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_long">攝氏度</string>
|
||||
<string name="temperature_c_nominative_short">%s°C</string>
|
||||
<string name="temperature_c_nominative_long">攝氏 %s 度</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">華氏度</string>
|
||||
<string name="temperature_f_nominative_short">%s°F</string>
|
||||
<string name="temperature_f_nominative_long">華氏 %s 度</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">克耳文</string>
|
||||
<string name="temperature_k_nominative_long">%s 克耳文</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">微米</string>
|
||||
<string name="length_microm_nominative_long">%s微米</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">毫米</string>
|
||||
<string name="length_mm_nominative_long">%s毫米</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">厘米</string>
|
||||
<string name="length_cm_nominative_long">%s厘米</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">米</string>
|
||||
<string name="length_m_nominative_long">%s米</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">公里</string>
|
||||
<string name="length_km_nominative_long">%s公里</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">吋</string>
|
||||
<string name="length_in_nominative_long">%s吋</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">呎</string>
|
||||
<string name="length_ft_nominative_long">%s呎</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">哩</string>
|
||||
<string name="length_mi_nominative_long">%s哩</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">浬</string>
|
||||
<string name="length_nmi_nominative_long">%s浬</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">%s 每平方米</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">節</string>
|
||||
<string name="speed_kn_nominative_long">%s節</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_short">蒲福風級</string>
|
||||
<string name="speed_bf_nominative_short">%s級</string>
|
||||
<string name="speed_bf_nominative_long">蒲福氏風級 %s 級</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">%s 每立方米</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">公升</string>
|
||||
<string name="volume_l_nominative_long">%s 公升</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">微克</string>
|
||||
<string name="weight_microg_nominative_long">%s微克</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">毫克</string>
|
||||
<string name="weight_mg_nominative_long">%s毫克</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">帕斯卡</string>
|
||||
<string name="pressure_pa_nominative_long">%s帕斯卡</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">百帕</string>
|
||||
<string name="pressure_hpa_nominative_long">%s百帕</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">千帕</string>
|
||||
<string name="pressure_kpa_nominative_long">%s千帕</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">毫巴</string>
|
||||
<string name="pressure_mbar_nominative_long">%s毫巴</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">氣壓</string>
|
||||
<string name="pressure_atm_nominative_long">%s大氣壓</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">毫米汞柱</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s毫米汞柱</string>
|
||||
|
||||
<!-- Inch of mercury - SPECIFIC to HK -->
|
||||
<string name="pressure_inhg_display_name_long">吋汞柱</string>
|
||||
<string name="pressure_inhg_nominative_long">%s吋汞柱</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s小時</string>
|
||||
<string name="duration_hr_per_short">%s 每小時</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s分鐘</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s秒</string>
|
||||
<string name="duration_sec_per_short">%s 每秒</string>
|
||||
|
||||
</resources>
|
||||
149
weather-unit/src/main/res/values-zh-rTW/strings.xml
Normal file
149
weather-unit/src/main/res/values-zh-rTW/strings.xml
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- ONLY values changed from the original file are included -->
|
||||
<!-- Loosely based on https://www.unicode.org/cldr/charts/47/summary/zh_Hant.html -->
|
||||
<!-- Due to various major issues -->
|
||||
<!-- https://unicode-org.atlassian.net/jira/software/c/projects/CLDR/issues/CLDR-10604 -->
|
||||
<!-- Taiwan guidelines: https://www.bsmi.gov.tw/wSite/public/Attachment/f1736149048776.pdf -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Value separator -->
|
||||
<string name="locale_separator">,</string>
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_short">攝氏</string>
|
||||
<string name="temperature_c_display_name_long">攝氏度數</string>
|
||||
<string name="temperature_c_nominative_short">%s°C</string>
|
||||
<string name="temperature_c_nominative_long">攝氏 %s 度</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_long">華氏度數</string>
|
||||
<string name="temperature_f_nominative_short">%s°F</string>
|
||||
<string name="temperature_f_nominative_long">華氏 %s 度</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_long">克耳文</string>
|
||||
<string name="temperature_k_nominative_long">%s 克耳文</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_long">微米</string>
|
||||
<string name="length_microm_nominative_long">%s微米</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_long">公釐</string>
|
||||
<string name="length_mm_nominative_long">%s公釐</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_long">公分</string>
|
||||
<string name="length_cm_nominative_long">%s公分</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_long">公尺</string>
|
||||
<string name="length_m_nominative_long">%s公尺</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_long">公里</string>
|
||||
<string name="length_km_nominative_long">%s公里</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_long">英寸</string>
|
||||
<string name="length_in_nominative_long">%s英寸</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_long">英尺</string>
|
||||
<string name="length_ft_nominative_long">%s英尺</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_long">英里</string>
|
||||
<string name="length_mi_nominative_long">%s英里</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_long">海里</string>
|
||||
<string name="length_nmi_nominative_long">%s海里</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_long">每平方公尺 %s</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_long">節</string>
|
||||
<string name="speed_kn_nominative_long">%s節</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_short">蒲福風級</string>
|
||||
<string name="speed_bf_nominative_short">%s級</string>
|
||||
<string name="speed_bf_nominative_long">蒲福風級 %s 級</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_long">每立方公尺 %s</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_long">公升</string>
|
||||
<string name="volume_l_nominative_long">%s 公升</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_long">微克</string>
|
||||
<string name="weight_microg_nominative_long">%s微克</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_long">毫克</string>
|
||||
<string name="weight_mg_nominative_long">%s毫克</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_long">帕斯卡</string>
|
||||
<string name="pressure_pa_nominative_long">%s帕斯卡</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_long">百帕</string>
|
||||
<string name="pressure_hpa_nominative_long">%s百帕</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_long">千帕</string>
|
||||
<string name="pressure_kpa_nominative_long">%s千帕</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_long">毫巴</string>
|
||||
<string name="pressure_mbar_nominative_long">%s毫巴</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_long">氣壓</string>
|
||||
<string name="pressure_atm_nominative_long">%s大氣壓</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_long">毫米汞柱</string>
|
||||
<string name="pressure_mmhg_nominative_long">%s毫米汞柱</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_long">英寸汞柱</string>
|
||||
<string name="pressure_inhg_nominative_long">%s英寸汞柱</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Hours -->
|
||||
<string name="duration_hr_nominative_short">%s小時</string>
|
||||
<string name="duration_hr_per_short">%s/小時</string>
|
||||
<string name="duration_hr_per_long">每小時 %s</string>
|
||||
|
||||
<!-- Minutes -->
|
||||
<string name="duration_min_nominative_short">%s分鐘</string>
|
||||
|
||||
<!-- Seconds -->
|
||||
<string name="duration_sec_nominative_short">%s秒</string>
|
||||
<string name="duration_sec_per_short">%s/秒</string>
|
||||
<string name="duration_sec_per_long">每秒 %s</string>
|
||||
|
||||
</resources>
|
||||
253
weather-unit/src/main/res/values/strings.xml
Normal file
253
weather-unit/src/main/res/values/strings.xml
Normal file
|
|
@ -0,0 +1,253 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
|
||||
|
||||
<!-- Generic translations -->
|
||||
<!-- Based on https://www.unicode.org/cldr/charts/47/summary/root.html -->
|
||||
<!-- If you believe there is an error, please open a discussion -->
|
||||
|
||||
<!-- Value separator -->
|
||||
<string name="locale_separator">,\u0020</string>
|
||||
|
||||
<!-- Temperature units -->
|
||||
|
||||
<!-- Decidegree Celsius -->
|
||||
<string name="temperature_dc_display_name_short" translatable="false">d°C</string>
|
||||
<string name="temperature_dc_display_name_long" translatable="false">@string/temperature_dc_display_name_short</string>
|
||||
<string name="temperature_dc_nominative_narrow" translatable="false">%s d°</string>
|
||||
<string name="temperature_dc_nominative_short" translatable="false">%s d°C</string>
|
||||
<string name="temperature_dc_nominative_long" translatable="false">@string/temperature_dc_nominative_short</string>
|
||||
|
||||
<!-- Degree Celsius -->
|
||||
<string name="temperature_c_display_name_short">°C</string>
|
||||
<string name="temperature_c_display_name_long">@string/temperature_c_display_name_short</string>
|
||||
<string name="temperature_c_nominative_narrow">%s°</string>
|
||||
<string name="temperature_c_nominative_short">%s °C</string>
|
||||
<string name="temperature_c_nominative_long">@string/temperature_c_nominative_short</string>
|
||||
|
||||
<!-- Degree Fahrenheit -->
|
||||
<string name="temperature_f_display_name_short">°F</string>
|
||||
<string name="temperature_f_display_name_long">@string/temperature_f_display_name_short</string>
|
||||
<string name="temperature_f_nominative_narrow">%s°</string>
|
||||
<string name="temperature_f_nominative_short">%s °F</string>
|
||||
<string name="temperature_f_nominative_long">@string/temperature_f_nominative_short</string>
|
||||
|
||||
<!-- Kelvin -->
|
||||
<string name="temperature_k_display_name_short">K</string>
|
||||
<string name="temperature_k_display_name_long">@string/temperature_k_display_name_short</string>
|
||||
<string name="temperature_k_nominative_narrow">%sK</string>
|
||||
<string name="temperature_k_nominative_short">%s K</string>
|
||||
<string name="temperature_k_nominative_long">@string/temperature_k_nominative_short</string>
|
||||
|
||||
<!-- Length units -->
|
||||
|
||||
<!-- Micrometer -->
|
||||
<string name="length_microm_display_name_short">μm</string>
|
||||
<string name="length_microm_display_name_long">@string/length_microm_display_name_short</string>
|
||||
<string name="length_microm_nominative_short">%s μm</string>
|
||||
<string name="length_microm_nominative_long">@string/length_microm_nominative_short</string>
|
||||
|
||||
<!-- Millimeter -->
|
||||
<string name="length_mm_display_name_short">mm</string>
|
||||
<string name="length_mm_display_name_long">@string/length_mm_display_name_short</string>
|
||||
<string name="length_mm_nominative_short">%s mm</string>
|
||||
<string name="length_mm_nominative_long">@string/length_mm_nominative_short</string>
|
||||
|
||||
<!-- Centimeter -->
|
||||
<string name="length_cm_display_name_short">cm</string>
|
||||
<string name="length_cm_display_name_long">@string/length_cm_display_name_short</string>
|
||||
<string name="length_cm_nominative_short">%s cm</string>
|
||||
<string name="length_cm_nominative_long">@string/length_cm_nominative_short</string>
|
||||
|
||||
<!-- Meter -->
|
||||
<string name="length_m_display_name_short">m</string>
|
||||
<string name="length_m_display_name_long">@string/length_m_display_name_short</string>
|
||||
<string name="length_m_nominative_short">%s m</string>
|
||||
<string name="length_m_nominative_long">@string/length_m_nominative_short</string>
|
||||
|
||||
<!-- Kilometer -->
|
||||
<string name="length_km_display_name_short">km</string>
|
||||
<string name="length_km_display_name_long">@string/length_km_display_name_short</string>
|
||||
<string name="length_km_nominative_short">%s km</string>
|
||||
<string name="length_km_nominative_long">@string/length_km_nominative_short</string>
|
||||
|
||||
<!-- Inch -->
|
||||
<string name="length_in_display_name_short">in</string>
|
||||
<string name="length_in_display_name_long">@string/length_in_display_name_short</string>
|
||||
<string name="length_in_nominative_short">%s in</string>
|
||||
<string name="length_in_nominative_long">@string/length_in_nominative_short</string>
|
||||
|
||||
<!-- Foot -->
|
||||
<string name="length_ft_display_name_short">ft</string>
|
||||
<string name="length_ft_display_name_long">@string/length_ft_display_name_short</string>
|
||||
<string name="length_ft_nominative_short">%s ft</string>
|
||||
<string name="length_ft_nominative_long">@string/length_ft_nominative_short</string>
|
||||
|
||||
<!-- Mile -->
|
||||
<string name="length_mi_display_name_short">mi</string>
|
||||
<string name="length_mi_display_name_long">@string/length_mi_display_name_short</string>
|
||||
<string name="length_mi_nominative_short">%s mi</string>
|
||||
<string name="length_mi_nominative_long">@string/length_mi_nominative_short</string>
|
||||
|
||||
<!-- Nautical mile -->
|
||||
<string name="length_nmi_display_name_short">nmi</string>
|
||||
<string name="length_nmi_display_name_long">@string/length_nmi_display_name_short</string>
|
||||
<string name="length_nmi_nominative_short">%s nmi</string>
|
||||
<string name="length_nmi_nominative_long">@string/length_nmi_nominative_short</string>
|
||||
|
||||
<!-- Area units -->
|
||||
|
||||
<!-- Square meter -->
|
||||
<string name="area_m2_per_short">%s/m²</string>
|
||||
<string name="area_m2_per_long">@string/area_m2_per_short</string>
|
||||
|
||||
<!-- Speed units -->
|
||||
|
||||
<!-- Knot -->
|
||||
<string name="speed_kn_display_name_short">kn</string>
|
||||
<string name="speed_kn_display_name_long">@string/speed_kn_display_name_short</string>
|
||||
<string name="speed_kn_nominative_short">%s kn</string>
|
||||
<string name="speed_kn_nominative_long">@string/speed_kn_nominative_short</string>
|
||||
|
||||
<!-- Beaufort scale -->
|
||||
<string name="speed_bf_display_name_short">Bft</string>
|
||||
<string name="speed_bf_display_name_long">@string/speed_bf_display_name_short</string>
|
||||
<string name="speed_bf_nominative_short">%s Bft</string>
|
||||
<string name="speed_bf_nominative_long">@string/speed_bf_nominative_short</string>
|
||||
|
||||
<!-- Volume units -->
|
||||
|
||||
<!-- Cubic meter -->
|
||||
<string name="volume_m3_per_short">%s/m³</string>
|
||||
<string name="volume_m3_per_long">@string/volume_m3_per_short</string>
|
||||
|
||||
<!-- Liter -->
|
||||
<string name="volume_l_display_name_short">l</string>
|
||||
<string name="volume_l_display_name_long">@string/volume_l_display_name_short</string>
|
||||
<string name="volume_l_nominative_short">%s l</string>
|
||||
<string name="volume_l_nominative_long">@string/volume_l_nominative_short</string>
|
||||
|
||||
<!-- Weight units -->
|
||||
|
||||
<!-- Microgram -->
|
||||
<string name="weight_microg_display_name_short">μg</string>
|
||||
<string name="weight_microg_display_name_long">@string/weight_microg_display_name_short</string>
|
||||
<string name="weight_microg_nominative_short">%s μg</string>
|
||||
<string name="weight_microg_nominative_long">@string/weight_microg_nominative_short</string>
|
||||
|
||||
<!-- Milligram -->
|
||||
<string name="weight_mg_display_name_short">mg</string>
|
||||
<string name="weight_mg_display_name_long">@string/weight_mg_display_name_short</string>
|
||||
<string name="weight_mg_nominative_short">%s mg</string>
|
||||
<string name="weight_mg_nominative_long">@string/weight_mg_nominative_short</string>
|
||||
|
||||
<!-- Pressure units -->
|
||||
|
||||
<!-- Pascal -->
|
||||
<string name="pressure_pa_display_name_short">Pa</string>
|
||||
<string name="pressure_pa_display_name_long">@string/pressure_pa_display_name_short</string>
|
||||
<string name="pressure_pa_nominative_short">%s Pa</string>
|
||||
<string name="pressure_pa_nominative_long">@string/pressure_pa_nominative_short</string>
|
||||
|
||||
<!-- Hectopascal -->
|
||||
<string name="pressure_hpa_display_name_short">hPa</string>
|
||||
<string name="pressure_hpa_display_name_long">@string/pressure_hpa_display_name_short</string>
|
||||
<string name="pressure_hpa_nominative_short">%s hPa</string>
|
||||
<string name="pressure_hpa_nominative_long">@string/pressure_hpa_nominative_short</string>
|
||||
|
||||
<!-- Kilopascal -->
|
||||
<string name="pressure_kpa_display_name_short">kPa</string>
|
||||
<string name="pressure_kpa_display_name_long">@string/pressure_kpa_display_name_short</string>
|
||||
<string name="pressure_kpa_nominative_short">%s kPa</string>
|
||||
<string name="pressure_kpa_nominative_long">@string/pressure_kpa_nominative_short</string>
|
||||
|
||||
<!-- Millibar -->
|
||||
<string name="pressure_mbar_display_name_short">mbar</string>
|
||||
<string name="pressure_mbar_display_name_long">@string/pressure_mbar_display_name_short</string>
|
||||
<string name="pressure_mbar_nominative_short">%s mbar</string>
|
||||
<string name="pressure_mbar_nominative_long">@string/pressure_mbar_nominative_short</string>
|
||||
|
||||
<!-- Atmosphere -->
|
||||
<string name="pressure_atm_display_name_short">atm</string>
|
||||
<string name="pressure_atm_display_name_long">@string/pressure_atm_display_name_short</string>
|
||||
<string name="pressure_atm_nominative_short">%s atm</string>
|
||||
<string name="pressure_atm_nominative_long">@string/pressure_atm_nominative_short</string>
|
||||
|
||||
<!-- Millimeter of mercury -->
|
||||
<string name="pressure_mmhg_display_name_short">mmHg</string>
|
||||
<string name="pressure_mmhg_display_name_long">@string/pressure_mmhg_display_name_short</string>
|
||||
<string name="pressure_mmhg_nominative_short">%s mmHg</string>
|
||||
<string name="pressure_mmhg_nominative_long">@string/pressure_mmhg_nominative_short</string>
|
||||
|
||||
<!-- Inch of mercury -->
|
||||
<string name="pressure_inhg_display_name_short">inHg</string>
|
||||
<string name="pressure_inhg_display_name_long">@string/pressure_inhg_display_name_short</string>
|
||||
<string name="pressure_inhg_nominative_short">%s inHg</string>
|
||||
<string name="pressure_inhg_nominative_long">@string/pressure_inhg_nominative_short</string>
|
||||
|
||||
<!-- Duration units -->
|
||||
|
||||
<!-- Days / Not used in Breezy Weather, so not translating -->
|
||||
<string name="duration_day_display_name_short" translatable="false">day</string>
|
||||
<string name="duration_day_display_name_long" translatable="false">@string/duration_day_display_name_short</string>
|
||||
<string name="duration_day_nominative_short" translatable="false">%s d</string>
|
||||
<string name="duration_day_nominative_long" translatable="false">@string/duration_day_nominative_short</string>
|
||||
<string name="duration_day_per_short" translatable="false">%s/d</string>
|
||||
<string name="duration_day_per_long" translatable="false">@string/duration_day_per_short</string>
|
||||
|
||||
<!-- Hours / Only partially used in Breezy Weather -->
|
||||
<string name="duration_hr_display_name_short" translatable="false">hr</string>
|
||||
<string name="duration_hr_display_name_long" translatable="false">@string/duration_hr_display_name_short</string>
|
||||
<string name="duration_hr_nominative_short">%s h</string>
|
||||
<string name="duration_hr_nominative_long">@string/duration_hr_nominative_short</string>
|
||||
<string name="duration_hr_per_short">%s/h</string>
|
||||
<string name="duration_hr_per_long">@string/duration_hr_per_short</string>
|
||||
|
||||
<!-- Minutes / Only partially used in Breezy Weather -->
|
||||
<string name="duration_min_display_name_short" translatable="false">min</string>
|
||||
<string name="duration_min_display_name_long" translatable="false">@string/duration_min_display_name_short</string>
|
||||
<string name="duration_min_nominative_short">%s min</string>
|
||||
<string name="duration_min_nominative_long">@string/duration_min_nominative_short</string>
|
||||
<string name="duration_min_per_short" translatable="false">%s/min</string>
|
||||
<string name="duration_min_per_long" translatable="false">@string/duration_min_per_short</string>
|
||||
|
||||
<!-- Seconds / Only partially used in Breezy Weather -->
|
||||
<string name="duration_sec_display_name_short" translatable="false">sec</string>
|
||||
<string name="duration_sec_display_name_long" translatable="false">@string/duration_sec_display_name_short</string>
|
||||
<string name="duration_sec_nominative_short">%s s</string>
|
||||
<string name="duration_sec_nominative_long">@string/duration_sec_nominative_short</string>
|
||||
<string name="duration_sec_per_short">%s/s</string>
|
||||
<string name="duration_sec_per_long">@string/duration_sec_per_short</string>
|
||||
|
||||
<!-- Milliseconds / Not used in Breezy Weather -->
|
||||
<string name="duration_ms_display_name_short" translatable="false">ms</string>
|
||||
<string name="duration_ms_display_name_long" translatable="false">@string/duration_ms_display_name_short</string>
|
||||
<string name="duration_ms_nominative_short" translatable="false">%s ms</string>
|
||||
<string name="duration_ms_nominative_long" translatable="false">@string/duration_ms_nominative_short</string>
|
||||
|
||||
<!-- Microseconds / Not used in Breezy Weather -->
|
||||
<string name="duration_micros_display_name_short" translatable="false">μs</string>
|
||||
<string name="duration_micros_display_name_long" translatable="false">@string/duration_micros_display_name_short</string>
|
||||
<string name="duration_micros_nominative_short" translatable="false">%s μs</string>
|
||||
<string name="duration_micros_nominative_long" translatable="false">@string/duration_micros_nominative_short</string>
|
||||
|
||||
<!-- Nanoseconds / Not used in Breezy Weather -->
|
||||
<string name="duration_ns_display_name_short" translatable="false">ns</string>
|
||||
<string name="duration_ns_display_name_long" translatable="false">@string/duration_ns_display_name_short</string>
|
||||
<string name="duration_ns_nominative_short" translatable="false">%s ns</string>
|
||||
<string name="duration_ns_nominative_long" translatable="false">@string/duration_ns_nominative_short</string>
|
||||
|
||||
<!-- Ratio units -->
|
||||
|
||||
<!-- Permille -->
|
||||
<string name="ratio_permille_display_name_short" translatable="false">‰</string>
|
||||
<string name="ratio_permille_nominative_short" translatable="false">%s ‰</string>
|
||||
|
||||
<!-- Percent -->
|
||||
<string name="ratio_percent_display_name_short" translatable="false">%</string>
|
||||
<string name="ratio_percent_nominative_short" translatable="false">%s %</string>
|
||||
|
||||
<!-- Fragment -->
|
||||
<string name="ratio_fraction_display_name_short" translatable="false">/</string>
|
||||
<string name="ratio_fraction_nominative_short" translatable="false">%s</string>
|
||||
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.computing
|
||||
|
||||
import io.kotest.matchers.shouldBe
|
||||
import kotlinx.coroutines.test.runTest
|
||||
import org.breezyweather.unit.temperature.Temperature.Companion.celsius
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
/**
|
||||
* TODO: To be completed
|
||||
*/
|
||||
class TemperatureComputingTest {
|
||||
|
||||
@Test
|
||||
fun computeHumidexTest() = runTest {
|
||||
computeHumidex(null, null) shouldBe null
|
||||
computeHumidex(null, 13.0.celsius) shouldBe null
|
||||
computeHumidex(20.0.celsius, null) shouldBe null
|
||||
computeHumidex(20.0.celsius, 13.0.celsius)?.inCelsius shouldBe 22.8
|
||||
computeHumidex(39.0.celsius, 26.0.celsius)?.inCelsius shouldBe 52.5
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.formatting
|
||||
|
||||
import io.kotest.matchers.shouldBe
|
||||
import kotlinx.coroutines.test.runTest
|
||||
import org.junit.jupiter.api.Test
|
||||
import java.util.Locale
|
||||
|
||||
/**
|
||||
* TODO: Add instrumented tests for NumberFormatter and NumberFormat
|
||||
* TODO: Thousand separator tests
|
||||
*/
|
||||
class NumberFormattingTest {
|
||||
@Test
|
||||
fun `Format double with decimals and French-style number formatting`() = runTest {
|
||||
7.00646.format(
|
||||
decimals = 2,
|
||||
locale = Locale.Builder().setLanguage("fr").setRegion("FR").build()
|
||||
) shouldBe "7,01"
|
||||
14.34234.format(
|
||||
decimals = 2,
|
||||
locale = Locale.Builder().setLanguage("fr").setRegion("FR").build()
|
||||
) shouldBe "14,34"
|
||||
14.34834.format(
|
||||
decimals = 2,
|
||||
locale = Locale.Builder().setLanguage("fr").setRegion("FR").build()
|
||||
) shouldBe "14,35"
|
||||
14.34834.format(
|
||||
decimals = 3,
|
||||
locale = Locale.Builder().setLanguage("fr").setRegion("FR").build()
|
||||
) shouldBe "14,348"
|
||||
14.34864.format(
|
||||
decimals = 3,
|
||||
locale = Locale.Builder().setLanguage("fr").setRegion("FR").build()
|
||||
) shouldBe "14,349"
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Format double without values ending with a 0`() = runTest {
|
||||
7.00246.format(
|
||||
decimals = 2,
|
||||
locale = Locale.Builder().setLanguage("en").setRegion("US").build()
|
||||
) shouldBe "7"
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Format int`() = runTest {
|
||||
14.format(
|
||||
decimals = 0,
|
||||
locale = Locale.Builder().setLanguage("en").setRegion("US").build()
|
||||
) shouldBe "14"
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Format with leading sign`() = runTest {
|
||||
7.3.format(
|
||||
decimals = 1,
|
||||
locale = Locale.Builder().setLanguage("en").setRegion("US").build(),
|
||||
showSign = true
|
||||
) shouldBe "+7.3"
|
||||
(-7.3).format(
|
||||
decimals = 1,
|
||||
locale = Locale.Builder().setLanguage("en").setRegion("US").build(),
|
||||
showSign = true
|
||||
) shouldBe "-7.3"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,235 @@
|
|||
/*
|
||||
* This file is part of Breezy Weather.
|
||||
*
|
||||
* Breezy Weather is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Breezy Weather is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.breezyweather.unit.temperature
|
||||
|
||||
import android.content.Context
|
||||
import androidx.core.text.util.LocalePreferences
|
||||
import io.kotest.matchers.shouldBe
|
||||
import io.mockk.every
|
||||
import io.mockk.mockk
|
||||
import io.mockk.mockkStatic
|
||||
import io.mockk.slot
|
||||
import kotlinx.coroutines.test.runTest
|
||||
import org.breezyweather.unit.formatting.UnitWidth
|
||||
import org.breezyweather.unit.temperature.Temperature.Companion.celsius
|
||||
import org.breezyweather.unit.temperature.Temperature.Companion.deciCelsius
|
||||
import org.breezyweather.unit.temperature.Temperature.Companion.fahrenheit
|
||||
import org.junit.jupiter.api.Test
|
||||
import java.util.Locale
|
||||
|
||||
/**
|
||||
* TODO:
|
||||
* - Deviation conversion
|
||||
* - Instrumented tests formatting with Android 16 (currently, SDK is always 0)
|
||||
*/
|
||||
class TemperatureTest {
|
||||
|
||||
@Test
|
||||
fun `convert from reference unit to Fahrenheit`() = runTest {
|
||||
0.deciCelsius.inFahrenheit shouldBe 32.0
|
||||
100.deciCelsius.inFahrenheit shouldBe 50.0
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `convert from Fahrenheit to reference unit`() = runTest {
|
||||
32.0.fahrenheit.value shouldBe 0L
|
||||
50.0.fahrenheit.value shouldBe 100L
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `convert from Celsius to Fahrenheit`() = runTest {
|
||||
0.celsius.inFahrenheit shouldBe 32.0
|
||||
10.celsius.inFahrenheit shouldBe 50.0
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `convert from Celsius to Kelvin`() = runTest {
|
||||
0.celsius.inKelvins shouldBe 273.15
|
||||
10.celsius.inKelvins shouldBe 283.15
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `format Celsius with narrow unit width with Android translations`() = runTest {
|
||||
val formattedNumberSlot = slot<String>()
|
||||
val context = mockk<Context>().apply {
|
||||
every { getString(any()) } returns "FAILED"
|
||||
every {
|
||||
getString(
|
||||
org.breezyweather.unit.R.string.temperature_c_nominative_narrow,
|
||||
capture(formattedNumberSlot)
|
||||
)
|
||||
} answers { "${formattedNumberSlot.captured}°" }
|
||||
every {
|
||||
getString(
|
||||
org.breezyweather.unit.R.string.temperature_k_nominative_narrow,
|
||||
capture(formattedNumberSlot)
|
||||
)
|
||||
} answers { "${formattedNumberSlot.captured}K" }
|
||||
}
|
||||
101.4.deciCelsius.format(
|
||||
context = context,
|
||||
unit = TemperatureUnit.CELSIUS,
|
||||
valueWidth = UnitWidth.NARROW,
|
||||
unitWidth = UnitWidth.NARROW,
|
||||
locale = Locale.Builder().setLanguage("fr").setRegion("FR").build()
|
||||
) shouldBe "10°"
|
||||
101.4.deciCelsius.format(
|
||||
context = context,
|
||||
unit = TemperatureUnit.CELSIUS,
|
||||
valueWidth = UnitWidth.SHORT,
|
||||
unitWidth = UnitWidth.NARROW,
|
||||
locale = Locale.Builder().setLanguage("fr").setRegion("FR").build()
|
||||
) shouldBe "10,1°"
|
||||
0.deciCelsius.format(
|
||||
context = context,
|
||||
unit = TemperatureUnit.KELVIN,
|
||||
valueWidth = UnitWidth.LONG,
|
||||
unitWidth = UnitWidth.NARROW,
|
||||
locale = Locale.Builder().setLanguage("fr").setRegion("FR").build()
|
||||
) shouldBe "273,15K"
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `format Celsius with short unit width with Android translations`() = runTest {
|
||||
val formattedNumberSlot = slot<String>()
|
||||
val context = mockk<Context>().apply {
|
||||
every { getString(any()) } returns "FAILED"
|
||||
every {
|
||||
getString(
|
||||
org.breezyweather.unit.R.string.temperature_c_nominative_short,
|
||||
capture(formattedNumberSlot)
|
||||
)
|
||||
} answers { "${formattedNumberSlot.captured} °C" }
|
||||
every {
|
||||
getString(
|
||||
org.breezyweather.unit.R.string.temperature_k_nominative_short,
|
||||
capture(formattedNumberSlot)
|
||||
)
|
||||
} answers { "${formattedNumberSlot.captured} K" }
|
||||
}
|
||||
101.4.deciCelsius.format(
|
||||
context = context,
|
||||
unit = TemperatureUnit.CELSIUS,
|
||||
valueWidth = UnitWidth.NARROW,
|
||||
unitWidth = UnitWidth.SHORT,
|
||||
locale = Locale.Builder().setLanguage("fr").setRegion("FR").build()
|
||||
) shouldBe "10 °C"
|
||||
101.4.deciCelsius.format(
|
||||
context = context,
|
||||
unit = TemperatureUnit.CELSIUS,
|
||||
valueWidth = UnitWidth.SHORT,
|
||||
unitWidth = UnitWidth.SHORT,
|
||||
locale = Locale.Builder().setLanguage("fr").setRegion("FR").build()
|
||||
) shouldBe "10,1 °C"
|
||||
0.deciCelsius.format(
|
||||
context = context,
|
||||
unit = TemperatureUnit.KELVIN,
|
||||
valueWidth = UnitWidth.LONG,
|
||||
unitWidth = UnitWidth.SHORT,
|
||||
locale = Locale.Builder().setLanguage("fr").setRegion("FR").build()
|
||||
) shouldBe "273,15 K"
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `format Celsius with long unit width with Android translations`() = runTest {
|
||||
val formattedNumberSlot = slot<String>()
|
||||
val context = mockk<Context>().apply {
|
||||
every { getString(any()) } returns "FAILED"
|
||||
every {
|
||||
getString(
|
||||
org.breezyweather.unit.R.string.temperature_c_nominative_long,
|
||||
capture(formattedNumberSlot)
|
||||
)
|
||||
} answers { "${formattedNumberSlot.captured} degrés Celsius" }
|
||||
every {
|
||||
getString(
|
||||
org.breezyweather.unit.R.string.temperature_k_nominative_long,
|
||||
capture(formattedNumberSlot)
|
||||
)
|
||||
} answers { "${formattedNumberSlot.captured} kelvins" }
|
||||
}
|
||||
101.4.deciCelsius.format(
|
||||
context = context,
|
||||
unit = TemperatureUnit.CELSIUS,
|
||||
valueWidth = UnitWidth.NARROW,
|
||||
unitWidth = UnitWidth.LONG,
|
||||
locale = Locale.Builder().setLanguage("fr").setRegion("FR").build()
|
||||
) shouldBe "10 degrés Celsius"
|
||||
101.4.deciCelsius.format(
|
||||
context = context,
|
||||
unit = TemperatureUnit.CELSIUS,
|
||||
valueWidth = UnitWidth.SHORT,
|
||||
unitWidth = UnitWidth.LONG,
|
||||
locale = Locale.Builder().setLanguage("fr").setRegion("FR").build()
|
||||
) shouldBe "10,1 degrés Celsius"
|
||||
0.deciCelsius.format(
|
||||
context = context,
|
||||
unit = TemperatureUnit.KELVIN,
|
||||
valueWidth = UnitWidth.LONG,
|
||||
unitWidth = UnitWidth.LONG,
|
||||
locale = Locale.Builder().setLanguage("fr").setRegion("FR").build()
|
||||
) shouldBe "273,15 kelvins"
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `get temperature display name`() = runTest {
|
||||
val context = mockk<Context>().apply {
|
||||
every { getString(any()) } returns "FAILED"
|
||||
every {
|
||||
getString(org.breezyweather.unit.R.string.temperature_f_display_name_short)
|
||||
} answers { "°F" }
|
||||
every {
|
||||
getString(org.breezyweather.unit.R.string.temperature_f_display_name_long)
|
||||
} returns "degrés Fahrenheit"
|
||||
}
|
||||
TemperatureUnit.FAHRENHEIT.getDisplayName(
|
||||
context = context,
|
||||
locale = Locale.Builder().setLanguage("fr").setRegion("FR").build(),
|
||||
width = UnitWidth.SHORT
|
||||
) shouldBe "°F"
|
||||
TemperatureUnit.FAHRENHEIT.getDisplayName(
|
||||
context = context,
|
||||
locale = Locale.Builder().setLanguage("fr").setRegion("FR").build(),
|
||||
width = UnitWidth.LONG
|
||||
) shouldBe "degrés Fahrenheit"
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `default temperature unit with locale preference set`() = runTest {
|
||||
mockkStatic(LocalePreferences::class)
|
||||
every { LocalePreferences.getTemperatureUnit() } returns LocalePreferences.TemperatureUnit.KELVIN
|
||||
TemperatureUnit.getDefaultUnit(
|
||||
Locale.Builder().setLanguage("en").setRegion("US").build()
|
||||
) shouldBe TemperatureUnit.KELVIN
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `default temperature unit for country`() = runTest {
|
||||
mockkStatic(LocalePreferences::class)
|
||||
every { LocalePreferences.getTemperatureUnit() } returns LocalePreferences.TemperatureUnit.DEFAULT
|
||||
TemperatureUnit.getDefaultUnit(
|
||||
Locale.Builder().setLanguage("en").setRegion("US").build()
|
||||
) shouldBe TemperatureUnit.FAHRENHEIT
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `get TemperatureUnit from id`() = runTest {
|
||||
TemperatureUnit.getUnit("c") shouldBe TemperatureUnit.CELSIUS
|
||||
TemperatureUnit.getUnit("f") shouldBe TemperatureUnit.FAHRENHEIT
|
||||
TemperatureUnit.getUnit("k") shouldBe TemperatureUnit.KELVIN
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue