fill the repeat interval dialog dynamically

This commit is contained in:
tibbi 2017-02-19 13:38:52 +01:00
parent c32e768d2f
commit d205c0a5ec
20 changed files with 393 additions and 111 deletions

View File

@ -11,10 +11,7 @@ import com.simplemobiletools.calendar.R
import com.simplemobiletools.calendar.dialogs.EventReminderDialog
import com.simplemobiletools.calendar.dialogs.EventRepeatIntervalDialog
import com.simplemobiletools.calendar.dialogs.SelectEventTypeDialog
import com.simplemobiletools.calendar.extensions.config
import com.simplemobiletools.calendar.extensions.getAppropriateTheme
import com.simplemobiletools.calendar.extensions.getReminderText
import com.simplemobiletools.calendar.extensions.seconds
import com.simplemobiletools.calendar.extensions.*
import com.simplemobiletools.calendar.helpers.*
import com.simplemobiletools.calendar.models.Event
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
@ -228,7 +225,7 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
}
private fun updateRepetitionText() {
event_repetition.text = getRepetitionToString(mRepeatInterval)
event_repetition.text = getRepetitionText(mRepeatInterval)
}
private fun updateEventType() {
@ -239,15 +236,6 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
}
}
private fun getRepetitionToString(seconds: Int) = getString(when (seconds) {
DAY -> R.string.daily
WEEK -> R.string.weekly
BIWEEK -> R.string.biweekly
MONTH -> R.string.monthly
YEAR -> R.string.yearly
else -> R.string.no_repetition
})
fun toggleAllDay(isChecked: Boolean) {
event_start_time.beGoneIf(isChecked)
event_end_time.beGoneIf(isChecked)

View File

@ -11,7 +11,8 @@ import com.simplemobiletools.commons.extensions.setupDialogStuff
import kotlinx.android.synthetic.main.dialog_radio_group.view.*
import java.util.*
class EventReminderDialog(val activity: Activity, val defaultMinutes: Int, val callback: (minutes: Int) -> Unit) : AlertDialog.Builder(activity), RadioGroup.OnCheckedChangeListener {
class EventReminderDialog(val activity: Activity, val reminderMinutes: Int, val callback: (minutes: Int) -> Unit) : AlertDialog.Builder(activity),
RadioGroup.OnCheckedChangeListener {
val dialog: AlertDialog?
var wasInit = false
var minutes = TreeSet<Int>()
@ -27,7 +28,7 @@ class EventReminderDialog(val activity: Activity, val defaultMinutes: Int, val c
add(0)
add(10)
add(30)
add(defaultMinutes)
add(reminderMinutes)
}
minutes.forEachIndexed { index, value ->
@ -46,7 +47,7 @@ class EventReminderDialog(val activity: Activity, val defaultMinutes: Int, val c
private fun addRadioButton(textValue: String, value: Int, index: Int) {
val radioButton = (activity.layoutInflater.inflate(R.layout.radio_button, null) as RadioButton).apply {
text = textValue
isChecked = value == defaultMinutes
isChecked = value == reminderMinutes
id = index
}
radioGroup.addView(radioButton, RadioGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT))

View File

@ -2,49 +2,69 @@ package com.simplemobiletools.calendar.dialogs
import android.app.Activity
import android.support.v7.app.AlertDialog
import android.view.LayoutInflater
import android.view.ViewGroup
import android.widget.RadioButton
import android.widget.RadioGroup
import com.simplemobiletools.calendar.R
import com.simplemobiletools.calendar.extensions.getRepetitionText
import com.simplemobiletools.calendar.helpers.*
import com.simplemobiletools.commons.extensions.setupDialogStuff
import kotlinx.android.synthetic.main.dialog_change_views.view.*
import kotlinx.android.synthetic.main.dialog_radio_group.view.*
import java.util.*
class EventRepeatIntervalDialog(val activity: Activity, val repeatInterval: Int, val callback: (mins: Int) -> Unit) : AlertDialog.Builder(activity),
class EventRepeatIntervalDialog(val activity: Activity, val repeatSeconds: Int, val callback: (mins: Int) -> Unit) : AlertDialog.Builder(activity),
RadioGroup.OnCheckedChangeListener {
val dialog: AlertDialog?
var wasInit = false
var seconds = TreeSet<Int>()
var radioGroup: RadioGroup
init {
val view = LayoutInflater.from(activity).inflate(R.layout.dialog_event_repeat_interval, null).dialog_radio_view.apply {
check(getCheckedItem())
setOnCheckedChangeListener(this@EventRepeatIntervalDialog)
val view = activity.layoutInflater.inflate(R.layout.dialog_radio_group, null)
radioGroup = view.dialog_radio_group
radioGroup.setOnCheckedChangeListener(this)
seconds.apply {
add(0)
add(DAY)
add(WEEK)
add(BIWEEK)
add(MONTH)
add(YEAR)
add(repeatSeconds)
}
seconds.forEachIndexed { index, value ->
addRadioButton(activity.getRepetitionText(value), value, index)
}
addRadioButton(activity.getString(R.string.custom), -1, seconds.size)
dialog = AlertDialog.Builder(activity)
.create().apply {
activity.setupDialogStuff(view, this, R.string.select_repeat_interval)
}
wasInit = true
}
private fun getCheckedItem() = when (repeatInterval) {
DAY -> R.id.dialog_radio_daily
WEEK -> R.id.dialog_radio_weekly
BIWEEK -> R.id.dialog_radio_biweekly
MONTH -> R.id.dialog_radio_monthly
YEAR -> R.id.dialog_radio_yearly
else -> R.id.dialog_radio_no_repetition
private fun addRadioButton(textValue: String, value: Int, index: Int) {
val radioButton = (activity.layoutInflater.inflate(R.layout.radio_button, null) as RadioButton).apply {
text = textValue
isChecked = value == repeatSeconds
id = index
}
radioGroup.addView(radioButton, RadioGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT))
}
override fun onCheckedChanged(group: RadioGroup?, checkedId: Int) {
callback.invoke(getSelectionValue(checkedId))
dialog?.dismiss()
}
if (!wasInit)
return
private fun getSelectionValue(id: Int) = when (id) {
R.id.dialog_radio_daily -> DAY
R.id.dialog_radio_weekly -> WEEK
R.id.dialog_radio_biweekly -> BIWEEK
R.id.dialog_radio_monthly -> MONTH
R.id.dialog_radio_yearly -> YEAR
else -> 0
if (checkedId == seconds.size) {
} else {
callback.invoke(seconds.elementAt(checkedId))
dialog?.dismiss()
}
}
}

View File

@ -122,6 +122,28 @@ fun Context.getReminderText(minutes: Int) = when (minutes) {
}
}
fun Context.getRepetitionText(seconds: Int): String {
val days = seconds / 60 / 60 / 24
return when (days) {
0 -> getString(R.string.no_repetition)
1 -> getString(R.string.daily)
7 -> getString(R.string.weekly)
14 -> getString(R.string.biweekly)
30 -> getString(R.string.monthly)
365 -> getString(R.string.yearly)
else -> {
if (days % 365 == 0)
resources.getQuantityString(R.plurals.years, days / 365, days / 365)
else if (days % 30 == 0)
resources.getQuantityString(R.plurals.months, days / 30, days / 30)
else if (days % 7 == 0)
resources.getQuantityString(R.plurals.weeks, days / 7, days / 7)
else
resources.getQuantityString(R.plurals.days, days, days)
}
}
}
fun Context.getFilteredEvents(events: List<Event>): List<Event> {
val displayEventTypes = config.displayEventTypes
val filtered = events.filter { displayEventTypes.contains(it.eventType.toString()) }

View File

@ -1,56 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RadioGroup
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/dialog_radio_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MyCompatRadioButton
android:id="@+id/dialog_radio_no_repetition"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin"
android:text="@string/no_repetition"/>
<com.simplemobiletools.commons.views.MyCompatRadioButton
android:id="@+id/dialog_radio_daily"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin"
android:text="@string/daily"/>
<com.simplemobiletools.commons.views.MyCompatRadioButton
android:id="@+id/dialog_radio_weekly"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin"
android:text="@string/weekly"/>
<com.simplemobiletools.commons.views.MyCompatRadioButton
android:id="@+id/dialog_radio_biweekly"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin"
android:text="@string/biweekly"/>
<com.simplemobiletools.commons.views.MyCompatRadioButton
android:id="@+id/dialog_radio_monthly"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin"
android:text="@string/monthly"/>
<com.simplemobiletools.commons.views.MyCompatRadioButton
android:id="@+id/dialog_radio_yearly"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin"
android:text="@string/yearly"/>
</RadioGroup>

View File

@ -38,6 +38,26 @@
<string name="repeat_till">Repeat till:</string>
<string name="forever">Forever</string>
<plurals name="days">
<item quantity="one">%1$d day</item>
<item quantity="other">%1$d days</item>
</plurals>
<plurals name="weeks">
<item quantity="one">%1$d week</item>
<item quantity="other">%1$d weeks</item>
</plurals>
<plurals name="months">
<item quantity="one">%1$d month</item>
<item quantity="other">%1$d months</item>
</plurals>
<plurals name="years">
<item quantity="one">%1$d year</item>
<item quantity="other">%1$d years</item>
</plurals>
<!-- Event Reminders -->
<string name="select_event_reminder">Select an event reminder</string>
<string name="reminder">Recordatorio</string>
@ -60,7 +80,7 @@
<item quantity="other">%1$d horas antes de</item>
</plurals>
<plurals name="days">
<plurals name="days_before">
<item quantity="one">%1$d day before</item>
<item quantity="other">%1$d días antes de</item>
</plurals>

View File

@ -38,6 +38,26 @@
<string name="repeat_till">Wiederholen bis:</string>
<string name="forever">unendlich</string>
<plurals name="days">
<item quantity="one">%1$d day</item>
<item quantity="other">%1$d days</item>
</plurals>
<plurals name="weeks">
<item quantity="one">%1$d week</item>
<item quantity="other">%1$d weeks</item>
</plurals>
<plurals name="months">
<item quantity="one">%1$d month</item>
<item quantity="other">%1$d months</item>
</plurals>
<plurals name="years">
<item quantity="one">%1$d year</item>
<item quantity="other">%1$d years</item>
</plurals>
<!-- Event Reminders -->
<string name="select_event_reminder">Wähle eine Termin Erinnerung</string>
<string name="reminder">Erinnerung</string>
@ -60,7 +80,7 @@
<item quantity="other">%1$d Stunden vorher</item>
</plurals>
<plurals name="days">
<plurals name="days_before">
<item quantity="one">%1$d Tag vorher</item>
<item quantity="other">%1$d Tage vorher</item>
</plurals>

View File

@ -38,6 +38,26 @@
<string name="repeat_till">Repeat till:</string>
<string name="forever">Forever</string>
<plurals name="days">
<item quantity="one">%1$d day</item>
<item quantity="other">%1$d days</item>
</plurals>
<plurals name="weeks">
<item quantity="one">%1$d week</item>
<item quantity="other">%1$d weeks</item>
</plurals>
<plurals name="months">
<item quantity="one">%1$d month</item>
<item quantity="other">%1$d months</item>
</plurals>
<plurals name="years">
<item quantity="one">%1$d year</item>
<item quantity="other">%1$d years</item>
</plurals>
<!-- Event Reminders -->
<string name="select_event_reminder">Select an event reminder</string>
<string name="reminder">Recordatorio</string>
@ -60,7 +80,7 @@
<item quantity="other">%1$d horas antes de</item>
</plurals>
<plurals name="days">
<plurals name="days_before">
<item quantity="one">%1$d day before</item>
<item quantity="other">%1$d días antes de</item>
</plurals>

View File

@ -38,6 +38,26 @@
<string name="repeat_till">Repeat till:</string>
<string name="forever">Forever</string>
<plurals name="days">
<item quantity="one">%1$d day</item>
<item quantity="other">%1$d days</item>
</plurals>
<plurals name="weeks">
<item quantity="one">%1$d week</item>
<item quantity="other">%1$d weeks</item>
</plurals>
<plurals name="months">
<item quantity="one">%1$d month</item>
<item quantity="other">%1$d months</item>
</plurals>
<plurals name="years">
<item quantity="one">%1$d year</item>
<item quantity="other">%1$d years</item>
</plurals>
<!-- Event Reminders -->
<string name="select_event_reminder">Select an event reminder</string>
<string name="reminder">Rappel</string>
@ -60,7 +80,7 @@
<item quantity="other">%1$d heures avant</item>
</plurals>
<plurals name="days">
<plurals name="days_before">
<item quantity="one">%1$d day before</item>
<item quantity="other">%1$d jours avant</item>
</plurals>

View File

@ -38,6 +38,26 @@
<string name="repeat_till">Repeat till:</string>
<string name="forever">Forever</string>
<plurals name="days">
<item quantity="one">%1$d day</item>
<item quantity="other">%1$d days</item>
</plurals>
<plurals name="weeks">
<item quantity="one">%1$d week</item>
<item quantity="other">%1$d weeks</item>
</plurals>
<plurals name="months">
<item quantity="one">%1$d month</item>
<item quantity="other">%1$d months</item>
</plurals>
<plurals name="years">
<item quantity="one">%1$d year</item>
<item quantity="other">%1$d years</item>
</plurals>
<!-- Event Reminders -->
<string name="select_event_reminder">Select an event reminder</string>
<string name="reminder">Recordatorio</string>
@ -60,7 +80,7 @@
<item quantity="other">%1$d horas antes de</item>
</plurals>
<plurals name="days">
<plurals name="days_before">
<item quantity="one">%1$d day before</item>
<item quantity="other">%1$d días antes de</item>
</plurals>

View File

@ -38,6 +38,26 @@
<string name="repeat_till">Repeat till:</string>
<string name="forever">Forever</string>
<plurals name="days">
<item quantity="one">%1$d day</item>
<item quantity="other">%1$d days</item>
</plurals>
<plurals name="weeks">
<item quantity="one">%1$d week</item>
<item quantity="other">%1$d weeks</item>
</plurals>
<plurals name="months">
<item quantity="one">%1$d month</item>
<item quantity="other">%1$d months</item>
</plurals>
<plurals name="years">
<item quantity="one">%1$d year</item>
<item quantity="other">%1$d years</item>
</plurals>
<!-- Event Reminders -->
<string name="select_event_reminder">Select an event reminder</string>
<string name="reminder">रिमाइंडर</string>
@ -60,7 +80,7 @@
<item quantity="other">%1$d hours before</item>
</plurals>
<plurals name="days">
<plurals name="days_before">
<item quantity="one">%1$d day before</item>
<item quantity="other">%1$d days before</item>
</plurals>

View File

@ -38,6 +38,26 @@
<string name="repeat_till">Repeat till:</string>
<string name="forever">Forever</string>
<plurals name="days">
<item quantity="one">%1$d day</item>
<item quantity="other">%1$d days</item>
</plurals>
<plurals name="weeks">
<item quantity="one">%1$d week</item>
<item quantity="other">%1$d weeks</item>
</plurals>
<plurals name="months">
<item quantity="one">%1$d month</item>
<item quantity="other">%1$d months</item>
</plurals>
<plurals name="years">
<item quantity="one">%1$d year</item>
<item quantity="other">%1$d years</item>
</plurals>
<!-- Event Reminders -->
<string name="select_event_reminder">Select an event reminder</string>
<string name="reminder">Emlékeztető</string>
@ -60,7 +80,7 @@
<item quantity="other">%1$d órával korábban</item>
</plurals>
<plurals name="days">
<plurals name="days_before">
<item quantity="one">%1$d nappal korábban</item>
<item quantity="other">%1$d nappal korábban</item>
</plurals>

View File

@ -38,6 +38,26 @@
<string name="repeat_till">Repeat till:</string>
<string name="forever">Forever</string>
<plurals name="days">
<item quantity="one">%1$d day</item>
<item quantity="other">%1$d days</item>
</plurals>
<plurals name="weeks">
<item quantity="one">%1$d week</item>
<item quantity="other">%1$d weeks</item>
</plurals>
<plurals name="months">
<item quantity="one">%1$d month</item>
<item quantity="other">%1$d months</item>
</plurals>
<plurals name="years">
<item quantity="one">%1$d year</item>
<item quantity="other">%1$d years</item>
</plurals>
<!-- Event Reminders -->
<string name="select_event_reminder">Select an event reminder</string>
<string name="reminder">Promemoria</string>
@ -60,7 +80,7 @@
<item quantity="other">%1$d hours before</item>
</plurals>
<plurals name="days">
<plurals name="days_before">
<item quantity="one">%1$d day before</item>
<item quantity="other">%1$d days before</item>
</plurals>

View File

@ -38,6 +38,26 @@
<string name="repeat_till">Repeat till:</string>
<string name="forever">Forever</string>
<plurals name="days">
<item quantity="one">%1$d day</item>
<item quantity="other">%1$d days</item>
</plurals>
<plurals name="weeks">
<item quantity="one">%1$d week</item>
<item quantity="other">%1$d weeks</item>
</plurals>
<plurals name="months">
<item quantity="one">%1$d month</item>
<item quantity="other">%1$d months</item>
</plurals>
<plurals name="years">
<item quantity="one">%1$d year</item>
<item quantity="other">%1$d years</item>
</plurals>
<!-- Event Reminders -->
<string name="select_event_reminder">Select an event reminder</string>
<string name="reminder">תזכורת</string>
@ -60,7 +80,7 @@
<item quantity="other">%1$d hours before</item>
</plurals>
<plurals name="days">
<plurals name="days_before">
<item quantity="one">%1$d day before</item>
<item quantity="other">%1$d days before</item>
</plurals>

View File

@ -38,6 +38,26 @@
<string name="repeat_till">Repeat till:</string>
<string name="forever">Forever</string>
<plurals name="days">
<item quantity="one">%1$d day</item>
<item quantity="other">%1$d days</item>
</plurals>
<plurals name="weeks">
<item quantity="one">%1$d week</item>
<item quantity="other">%1$d weeks</item>
</plurals>
<plurals name="months">
<item quantity="one">%1$d month</item>
<item quantity="other">%1$d months</item>
</plurals>
<plurals name="years">
<item quantity="one">%1$d year</item>
<item quantity="other">%1$d years</item>
</plurals>
<!-- Event Reminders -->
<string name="select_event_reminder">Select an event reminder</string>
<string name="reminder">リマインダー</string>
@ -60,7 +80,7 @@
<item quantity="other">%1$d 時間 前</item>
</plurals>
<plurals name="days">
<plurals name="days_before">
<item quantity="one">%1$d day before</item>
<item quantity="other">%1$d 日 前</item>
</plurals>

View File

@ -38,6 +38,26 @@
<string name="repeat_till">Repetir até:</string>
<string name="forever">Eternamente</string>
<plurals name="days">
<item quantity="one">%1$d day</item>
<item quantity="other">%1$d days</item>
</plurals>
<plurals name="weeks">
<item quantity="one">%1$d week</item>
<item quantity="other">%1$d weeks</item>
</plurals>
<plurals name="months">
<item quantity="one">%1$d month</item>
<item quantity="other">%1$d months</item>
</plurals>
<plurals name="years">
<item quantity="one">%1$d year</item>
<item quantity="other">%1$d years</item>
</plurals>
<!-- Event Reminders -->
<string name="select_event_reminder">Selecione um lembrete</string>
<string name="reminder">Lembrete</string>
@ -60,7 +80,7 @@
<item quantity="other">%1$d horas antes</item>
</plurals>
<plurals name="days">
<plurals name="days_before">
<item quantity="one">%1$d dia antes</item>
<item quantity="other">%1$d dias antes</item>
</plurals>

View File

@ -38,6 +38,26 @@
<string name="repeat_till">Повторять до:</string>
<string name="forever">Бесконечно</string>
<plurals name="days">
<item quantity="one">%1$d day</item>
<item quantity="other">%1$d days</item>
</plurals>
<plurals name="weeks">
<item quantity="one">%1$d week</item>
<item quantity="other">%1$d weeks</item>
</plurals>
<plurals name="months">
<item quantity="one">%1$d month</item>
<item quantity="other">%1$d months</item>
</plurals>
<plurals name="years">
<item quantity="one">%1$d year</item>
<item quantity="other">%1$d years</item>
</plurals>
<!-- Event Reminders -->
<string name="select_event_reminder">Выбрать напоминание для события</string>
<string name="reminder">Напоминание</string>
@ -60,7 +80,7 @@
<item quantity="other">%1$d часа(-ов) до события</item>
</plurals>
<plurals name="days">
<plurals name="days_before">
<item quantity="one">%1$d день до события</item>
<item quantity="other">%1$d дня(-ей) до события</item>
</plurals>

View File

@ -38,6 +38,30 @@
<string name="repeat_till">Opakovať do:</string>
<string name="forever">Navždy</string>
<plurals name="days">
<item quantity="one">%1$d deň</item>
<item quantity="few">%1$d dni</item>
<item quantity="other">%1$d dní</item>
</plurals>
<plurals name="weeks">
<item quantity="one">%1$d týždeň</item>
<item quantity="few">%1$d týždne</item>
<item quantity="other">%1$d týždňov</item>
</plurals>
<plurals name="months">
<item quantity="one">%1$d mesiac</item>
<item quantity="few">%1$d mesiace</item>
<item quantity="other">%1$d mesiacov</item>
</plurals>
<plurals name="years">
<item quantity="one">%1$d rok</item>
<item quantity="two">%1$d roky</item>
<item quantity="other">%1$d rokov</item>
</plurals>
<!-- Event Reminders -->
<string name="select_event_reminder">Zvoľte pripomienku</string>
<string name="reminder">Pripomenka</string>
@ -52,16 +76,19 @@
<plurals name="minutes">
<item quantity="one">%1$d minútu vopred</item>
<item quantity="few">%1$d minúty vopred</item>
<item quantity="other">%1$d minút vopred</item>
</plurals>
<plurals name="hours">
<item quantity="one">%1$d hodinu vopred</item>
<item quantity="few">%1$d hodiny vopred</item>
<item quantity="other">%1$d hodín vopred</item>
</plurals>
<plurals name="days">
<plurals name="days_before">
<item quantity="one">%1$d deň vopred</item>
<item quantity="few">%1$d dni vopred</item>
<item quantity="other">%1$d dní vopred</item>
</plurals>

View File

@ -38,6 +38,26 @@
<string name="repeat_till">Repeat till:</string>
<string name="forever">Forever</string>
<plurals name="days">
<item quantity="one">%1$d day</item>
<item quantity="other">%1$d days</item>
</plurals>
<plurals name="weeks">
<item quantity="one">%1$d week</item>
<item quantity="other">%1$d weeks</item>
</plurals>
<plurals name="months">
<item quantity="one">%1$d month</item>
<item quantity="other">%1$d months</item>
</plurals>
<plurals name="years">
<item quantity="one">%1$d year</item>
<item quantity="other">%1$d years</item>
</plurals>
<!-- Event Reminders -->
<string name="select_event_reminder">Select an event reminder</string>
<string name="reminder">Påminnelse</string>
@ -60,7 +80,7 @@
<item quantity="other">%1$d timmar före</item>
</plurals>
<plurals name="days">
<plurals name="days_before">
<item quantity="one">%1$d day before</item>
<item quantity="other">%1$d dagar före</item>
</plurals>

View File

@ -38,6 +38,26 @@
<string name="repeat_till">Repeat till:</string>
<string name="forever">Forever</string>
<plurals name="days">
<item quantity="one">%1$d day</item>
<item quantity="other">%1$d days</item>
</plurals>
<plurals name="weeks">
<item quantity="one">%1$d week</item>
<item quantity="other">%1$d weeks</item>
</plurals>
<plurals name="months">
<item quantity="one">%1$d month</item>
<item quantity="other">%1$d months</item>
</plurals>
<plurals name="years">
<item quantity="one">%1$d year</item>
<item quantity="other">%1$d years</item>
</plurals>
<!-- Event Reminders -->
<string name="select_event_reminder">Select an event reminder</string>
<string name="reminder">Reminder</string>
@ -60,7 +80,7 @@
<item quantity="other">%1$d hours before</item>
</plurals>
<plurals name="days">
<plurals name="days_before">
<item quantity="one">%1$d day before</item>
<item quantity="other">%1$d days before</item>
</plurals>