diff --git a/app/src/main/java/com/futsch1/medtimer/helpers/Interval.kt b/app/src/main/java/com/futsch1/medtimer/helpers/Interval.kt
index b615927fb..debce5180 100644
--- a/app/src/main/java/com/futsch1/medtimer/helpers/Interval.kt
+++ b/app/src/main/java/com/futsch1/medtimer/helpers/Interval.kt
@@ -4,13 +4,14 @@ import android.content.Context
import com.futsch1.medtimer.R
enum class IntervalUnit {
- MINUTES, HOURS, DAYS
+ MINUTES, HOURS, DAYS, MONTHS
}
private fun getMinutes(unit: IntervalUnit, value: Int) = when (unit) {
IntervalUnit.MINUTES -> value
IntervalUnit.HOURS -> value * 60
IntervalUnit.DAYS -> value * 60 * 24
+ IntervalUnit.MONTHS -> value * 60 * 24 * 31
}
class Interval(var minutesValue: Int, var maxMinutesValue: Int = MAX_INTERVAL_MINUTES) {
@@ -21,6 +22,7 @@ class Interval(var minutesValue: Int, var maxMinutesValue: Int = MAX_INTERVAL_MI
fun getUnit(): IntervalUnit {
return when {
+ minutesValue % (60 * 24 * 31) == 0 -> IntervalUnit.MONTHS
minutesValue % (60 * 24) == 0 -> IntervalUnit.DAYS
minutesValue % 60 == 0 -> IntervalUnit.HOURS
else -> IntervalUnit.MINUTES
@@ -32,6 +34,7 @@ class Interval(var minutesValue: Int, var maxMinutesValue: Int = MAX_INTERVAL_MI
IntervalUnit.MINUTES -> minutesValue
IntervalUnit.HOURS -> minutesValue / 60
IntervalUnit.DAYS -> minutesValue / (60 * 24)
+ IntervalUnit.MONTHS -> minutesValue / (60 * 24 * 31)
}
}
@@ -40,6 +43,7 @@ class Interval(var minutesValue: Int, var maxMinutesValue: Int = MAX_INTERVAL_MI
IntervalUnit.MINUTES -> minutesValue
IntervalUnit.HOURS -> minutesValue / 60
IntervalUnit.DAYS -> minutesValue / (60 * 24)
+ IntervalUnit.MONTHS -> minutesValue / (60 * 24 * 31)
}
}
@@ -65,6 +69,6 @@ class Interval(var minutesValue: Int, var maxMinutesValue: Int = MAX_INTERVAL_MI
}
companion object {
- const val MAX_INTERVAL_MINUTES = 31 * 60 * 24
+ const val MAX_INTERVAL_MINUTES = 60 * 24 * 31 * 12
}
}
diff --git a/app/src/main/java/com/futsch1/medtimer/medicine/editors/IntervalEditor.kt b/app/src/main/java/com/futsch1/medtimer/medicine/editors/IntervalEditor.kt
index 64a996238..cb639c118 100644
--- a/app/src/main/java/com/futsch1/medtimer/medicine/editors/IntervalEditor.kt
+++ b/app/src/main/java/com/futsch1/medtimer/medicine/editors/IntervalEditor.kt
@@ -56,6 +56,7 @@ class IntervalEditor(
IntervalUnit.MINUTES -> timeEditLayout.context.getString(R.string.minutes_string)
IntervalUnit.HOURS -> timeEditLayout.context.getString(R.string.hours_string)
IntervalUnit.DAYS -> timeEditLayout.context.getString(R.string.days_string)
+ IntervalUnit.MONTHS -> timeEditLayout.context.getString(R.string.months_string)
}
}
@@ -83,6 +84,7 @@ class IntervalEditor(
private fun checkedIntervalUnit(checkedId: Int) = when (checkedId) {
intervalUnitToggle.getChildAt(0).id -> IntervalUnit.MINUTES
intervalUnitToggle.getChildAt(1).id -> IntervalUnit.HOURS
- else -> IntervalUnit.DAYS
+ intervalUnitToggle.getChildAt(2).id -> IntervalUnit.DAYS
+ else -> IntervalUnit.MONTHS
}
}
diff --git a/app/src/main/java/com/futsch1/medtimer/reminders/scheduling/Scheduling.kt b/app/src/main/java/com/futsch1/medtimer/reminders/scheduling/Scheduling.kt
index ee32511f4..6b7c62776 100644
--- a/app/src/main/java/com/futsch1/medtimer/reminders/scheduling/Scheduling.kt
+++ b/app/src/main/java/com/futsch1/medtimer/reminders/scheduling/Scheduling.kt
@@ -69,7 +69,7 @@ abstract class SchedulingBase(
}
protected fun getNextNotRemindedDay(start: Long = 0): Instant? {
- for (day in start..31) {
+ for (day in start..(31 * 12)) {
val day = today() + day
if (!isRaisedOn(day)) {
return localDateToReminderInstant(LocalDate.ofEpochDay(day))
diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml
index dbd4e6fcf..bf2ba89f7 100644
--- a/app/src/main/res/values-ar/strings.xml
+++ b/app/src/main/res/values-ar/strings.xml
@@ -182,6 +182,15 @@
- يوم
أيام
+
+ - ???
+ - ???
+ - ???
+ - ???
+ - ???
+ - ???
+
+ Months
أنشئ تذكير
الفاصل الزمني
وقت بداية الفاصل الزمني
diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml
index 7b81501d8..2c4fd902e 100644
--- a/app/src/main/res/values-bg/strings.xml
+++ b/app/src/main/res/values-bg/strings.xml
@@ -160,6 +160,11 @@
- дни
Дни
+
+ - ???
+ - ???
+
+ ???
Създаване на напомняне
Интервал
Начало на интервала
diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml
index e3dc36a65..b9144287c 100644
--- a/app/src/main/res/values-cs/strings.xml
+++ b/app/src/main/res/values-cs/strings.xml
@@ -172,6 +172,13 @@
- dní
Dny
+
+ - ???
+ - ???
+ - ???
+ - ???
+
+ ???
Vytvořit připomenutí
Interval
Čas začátku intervalu
diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml
index 9aedc1f8b..ffdce4275 100644
--- a/app/src/main/res/values-da/strings.xml
+++ b/app/src/main/res/values-da/strings.xml
@@ -156,6 +156,11 @@
- dage
Dage
+
+ - ???
+ - ???
+
+ ???
Opret påmindelse
Interval
Interval starttid
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 2ec1e46ac..9417d4202 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -150,17 +150,22 @@
- Minute
- Minuten
+ Minuten
- Stunde
- Stunden
+ Stunden
- Tag
- Tage
- Minuten
- Stunden
Tage
+
+ - ???
+ - ???
+
+ ???
Erinnerung erstellen
Interval
Startzeit des Intervalls
diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml
index 7131360a0..e5ecc8940 100644
--- a/app/src/main/res/values-el/strings.xml
+++ b/app/src/main/res/values-el/strings.xml
@@ -161,6 +161,11 @@
- ημέρες
Ημέρες
+
+ - ???
+ - ???
+
+ ???
Δημιουργία υπενθύμισης
Χρονικό διάστημα
Ώρα έναρξης χρονικού διαστήματος
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index ae26e9e82..4e8383b57 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -153,19 +153,25 @@
- minutos
- minutos
+ Minutos
- hora
- horas
- horas
+ Horas
- día
- días
- días
- Minutos
- Horas
Días
+
+ - ???
+ - ???
+ - ???
+
+ ???
Crear recordatorio
Intervalo
Hora de inicio del intervalo
diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml
index 09a667b0c..ccc290459 100644
--- a/app/src/main/res/values-fi/strings.xml
+++ b/app/src/main/res/values-fi/strings.xml
@@ -162,6 +162,11 @@
- päivää
Päivää
+
+ - ???
+ - ???
+
+ ???
Luo muistutus
Väliaika
Väliajan aloitusaika
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index b35788099..beb6dfabc 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -153,19 +153,25 @@
- minute
- minutes
+ Minutes
- heure
- heures
- heures
+ Heures
- jour
- jours
- jours
- Minutes
- Heures
Jours
+
+ - ???
+ - ???
+ - ???
+
+ ???
Créer un rappel
Intervalle
Heure de début de l\'intervalle
diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml
index 3f6f16ee7..c1308c980 100644
--- a/app/src/main/res/values-hu/strings.xml
+++ b/app/src/main/res/values-hu/strings.xml
@@ -162,6 +162,11 @@
- nap
Nap
+
+ - ???
+ - ???
+
+ ???
Emlékeztető létrehozása
Ismétlési idő
Ismétlés kezdete
diff --git a/app/src/main/res/values-is/strings.xml b/app/src/main/res/values-is/strings.xml
index 31ea09d31..8a6575a5b 100644
--- a/app/src/main/res/values-is/strings.xml
+++ b/app/src/main/res/values-is/strings.xml
@@ -162,6 +162,11 @@
- dagar
Dagar
+
+ - ???
+ - ???
+
+ ???
Búa til áminningu
Tímabil
Byrjun tímabils
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index a6fc8237c..35d338d41 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -153,19 +153,25 @@
- minuti
- minuti
+ Minuti
- ora
- ore
- ore
+ Ore
- giorno
- giorni
- giorni
- Minuti
- Ore
Giorni
+
+ - ???
+ - ???
+ - ???
+
+ ???
Crea il promemoria
Intervallo
Orario di inizio dell\'intervallo
diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml
index 19aee91df..ca11aa645 100644
--- a/app/src/main/res/values-iw/strings.xml
+++ b/app/src/main/res/values-iw/strings.xml
@@ -163,6 +163,12 @@
- ימים
ימים
+
+ - ???
+ - ???
+ - ???
+
+ ???
צרו תזכורת
מחזור
זמן תחילת מחזור
diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml
index 9ca29e651..d26c739d9 100644
--- a/app/src/main/res/values-nl/strings.xml
+++ b/app/src/main/res/values-nl/strings.xml
@@ -150,17 +150,22 @@
- minuut
- minuten
+ Minuten
- uur
- uren
+ Uren
- dag
- dagen
- Minuten
- Uren
Dagen
+
+ - ???
+ - ???
+
+ ???
Herinnering maken
Interval
Starttijd interval
diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml
index 413a4a4c3..df70ec0cd 100644
--- a/app/src/main/res/values-pl/strings.xml
+++ b/app/src/main/res/values-pl/strings.xml
@@ -113,8 +113,6 @@
Dodaj przypomnienie o następnej dawce
Opóźnienie kolejnej dawki
Opóźnienie
- Minut
- Godzin
Utwórz przypomnienie
Co %s
Zawsze, gdy poniżej progu
@@ -172,7 +170,6 @@
Następny miesiąc
1 minuta
Zaawansowane
- Dni
Codziennie
Przypomnienia cykliczne
Aplikacja przechowuje wszystkie zdarzenia przypominające. Możesz analizować swoje poprzednie dawki na ekranie analizy i eksportować historię za pomocą menu kebab (trzy kropki). Historia zostanie zachowana, nawet jeśli leki lub przypomnienia zostaną usunięte lub przemianowane.
@@ -194,18 +191,28 @@
- minut
- minut
+ Minut
- godzina
- godziny
- godzin
- godzin
+ Godzin
- dzień
- dni
- dni
- dni
+ Dni
+
+ - ???
+ - ???
+ - ???
+ - ???
+
+ ???
Względna data/godzina
Pole musi zawierać liczbę, aby włączyć śledzenie zapasów leków dla tego przypomnienia.
Stałe przypomnienia na ekranie blokady
diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml
index fc3e9e7c9..8be4919a2 100644
--- a/app/src/main/res/values-pt-rBR/strings.xml
+++ b/app/src/main/res/values-pt-rBR/strings.xml
@@ -135,6 +135,13 @@
- dias
- dias
+ Dias
+
+ - ???
+ - ???
+ - ???
+
+ ???
Intervalo
O intervalo começa ao marcar como tomado ou pulado
Cada %s
@@ -192,7 +199,6 @@
Os lembretes não podem ser dispensados na tela de bloqueio, apenas na gaveta de notificações\nObservação: alguns smartwatches podem não mostrar mais notificações
O valor deve conter um número para permitir o monitoramento do estoque de medicamentos para este lembrete.
Nunca
- Dias
O MedTimer é um aplicativo de lembrete de medicamentos gratuito e de código aberto com foco na privacidade.\n\nEle requer permissão de exibir notificações para criar lembretes de medicamentos.
Número de repetições
Quando o horário de um lembrete chegar, uma notificação aparecerá oferecendo-lhe a opção de marcar a dose como tomada (clicando no botão \"TOMADO\"), pular (descartando a notificação) ou ser lembrado novamente após algum tempo (\"ADIAR\").
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index 7e01f5a23..6c5490a3f 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -135,6 +135,13 @@
- dias
- dias
+ Dias
+
+ - ???
+ - ???
+ - ???
+
+ ???
Intervalo
O intervalo começa ao marcar como tomado ou pulado
Cada %s
@@ -192,7 +199,6 @@
Os lembretes não podem ser dispensados na tela de bloqueio, apenas na gaveta de notificações\nObservação: alguns smartwatches podem não mostrar mais notificações
O valor deve conter um número para permitir o monitoramento do estoque de medicamentos para este lembrete.
Nunca
- Dias
O MedTimer é um aplicativo de lembrete de medicamentos gratuito e de código aberto com foco na privacidade.\n\nEle requer permissão de exibir notificações para criar lembretes de medicamentos.
Número de repetições
Quando o horário de um lembrete chegar, uma notificação aparecerá oferecendo-lhe a opção de marcar a dose como tomada (clicando no botão \"TOMADO\"), pular (descartando a notificação) ou ser lembrado novamente após algum tempo (\"ADIAR\").
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index e1a1dea07..017a51410 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -155,19 +155,25 @@
- минуты
- минут
+ Минуты
- час
- часа
- часов
+ Часы
- день
- дня
- дней
- Минуты
- Часы
Дни
+
+ - ???
+ - ???
+ - ???
+
+ ???
Создать напоминание
Интервал
Время начала интервала
diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml
index 7b8ad5b62..e1cb60d1e 100644
--- a/app/src/main/res/values-sv/strings.xml
+++ b/app/src/main/res/values-sv/strings.xml
@@ -164,6 +164,11 @@
- dagar
Dagar
+
+ - ???
+ - ???
+
+ ???
Skapa påminnelse
Intervall
Starttid för intervall
diff --git a/app/src/main/res/values-ta/strings.xml b/app/src/main/res/values-ta/strings.xml
index cd5ce8d24..7d6f5d796 100644
--- a/app/src/main/res/values-ta/strings.xml
+++ b/app/src/main/res/values-ta/strings.xml
@@ -146,9 +146,6 @@
இந்த நிகழ்வை நீக்கி அறிவிப்பை மீண்டும் உயர்த்த விரும்புகிறீர்களா?
நேர அடிப்படையிலான நினைவூட்டல்
இடைவெளி அடிப்படையிலான நினைவூட்டல்
- Minutes
- மணிகள்
- நாட்கள்
நினைவூட்டலை உருவாக்கவும்
இடைவேளை
இடைவெளி தொடக்க நேரம்
@@ -172,14 +169,22 @@
- நிமிடம்
- நிமிடங்கள்
+ Minutes
- மணிநேரம்
- மணிநேரங்கள்
+ மணிகள்
- நாள்
- நாட்கள்
+ நாட்கள்
+
+ - ???
+ - ???
+
+ ???
குறியீடுகள்
குறியீட்டைச் சேர்
குறியீட்டை நீக்க உறுதியாக இருக்கிறீர்களா?
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index 6b408bc0a..313fb11f8 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -150,17 +150,22 @@
- dakika
- dakika
+ Dakika
- saat
- saat
+ Saatler
- gün
- gün
- Dakika
- Saatler
Günler
+
+ - ???
+ - ???
+
+ ???
Hatırlatma oluşturun
Aralık
Aralık başlangıç zamanı
diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml
index 173019025..96aec5126 100644
--- a/app/src/main/res/values-uk/strings.xml
+++ b/app/src/main/res/values-uk/strings.xml
@@ -144,9 +144,6 @@
Ви хочете видалити цю подію і повторно підняти сповіщення?
Нагадування за розкладом
Інтервальне нагадування
- Хвилини
- Години
- Дні
Створити нагадування
Інтервал
Початок інтервалу
@@ -172,6 +169,7 @@
- хвилини
- хвилин
+ Хвилини
- Останні 24 години
- Останні %1$d дні
@@ -184,12 +182,21 @@
- години
- годин
+ Години
- день
- дні
- дні
- днів
+ Дні
+
+ - ???
+ - ???
+ - ???
+ - ???
+
+ ???
Теги
Додати тег
Певні, що хочете видалити тег?
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 6b4020a8a..ed0718057 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -147,15 +147,19 @@
- 分钟
+ 分钟
- 小时
+ 小时
- 天
- 分钟
- 小时
天
+
+ - ???
+
+ ???
创建提醒
间隔
间隔提醒起始时间
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index 2b321dcc7..d316343dc 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -153,9 +153,13 @@
- 天
+ 天
+
+ - ???
+
+ ???
時間型提醒
間隔型提醒
- 天
建立提醒
間隔
間隔開始時間
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 5209546f2..48868b369 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -166,6 +166,11 @@
- days
Days
+
+ - month
+ - months
+
+ Months
Create reminder
Interval
Interval start time