String (Period period, int n) { switch (period) { case DAY: return UtilBundle.message("date.format.n.days.ago", n); case MINUTE: return UtilBundle.message("date.format.n.minutes.ago", n); case HOUR: return UtilBundle.message("date.format.n.hours.ago", n); case MONTH: return UtilBundle.message("date.format.n.months.ago", n); case WEEK: return UtilBundle.message("date.format.n.weeks.ago", n); default: return UtilBundle.message("date.format.n.years.ago", n); } }