package com.fsck.k9.ui.messageview.ical;


import android.content.res.Resources;

import biweekly.util.Frequency;
import biweekly.util.Recurrence;
import com.fsck.k9.R;


public class ICalendarUtils {

    static String buildRule(Recurrence recurrence, Resources resources) {
        Frequency frequency = recurrence.getFrequency();
        switch (frequency) {
            case SECONDLY:
                return resources.getQuantityString(R.plurals.ical_recurrence_second, recurrence.getInterval());
            case MINUTELY:
                return resources.getQuantityString(R.plurals.ical_recurrence_minute, recurrence.getInterval());
            case HOURLY:
                return resources.getQuantityString(R.plurals.ical_recurrence_hourly, recurrence.getInterval());
            case DAILY:
                return resources.getQuantityString(R.plurals.ical_recurrence_daily, recurrence.getInterval());
            case WEEKLY:
                return resources.getQuantityString(R.plurals.ical_recurrence_weekly, recurrence.getInterval());
            case MONTHLY:
                return resources.getQuantityString(R.plurals.ical_recurrence_monthly, recurrence.getInterval());
            case YEARLY:
                return resources.getQuantityString(R.plurals.ical_recurrence_yearly, recurrence.getInterval());
        }
        return "";
    }
}

@@ -326,16 +326,69 @@
 ency();%0A
+        Integer interval = recurrence.getInterval();%0A
         
@@ -524,32 +524,26 @@
 nd, 
-recurrence.getI
+interval, i
 nterval
-()
 );%0A 
@@ -657,32 +657,26 @@
 te, 
-recurrence.getI
+interval, i
 nterval
-()
 );%0A 
@@ -788,32 +788,26 @@
 ly, 
-recurrence.getI
+interval, i
 nterval
-()
 );%0A 
@@ -917,32 +917,26 @@
 ly, 
-recurrence.getI
+interval, i
 nterval
-()
 );%0A 
@@ -1048,32 +1048,26 @@
 ly, 
-recurrence.getI
+interval, i
 nterval
-()
 );%0A 
@@ -1181,32 +1181,26 @@
 ly, 
-recurrence.getI
+interval, i
 nterval
-()
 );%0A 
@@ -1312,32 +1312,26 @@
 ly, 
-recurrence.getI
+interval, i
 nterval
-()
 );%0A 

Fix plural strings for ICalendarUtils