Skip to content

Commit

Permalink
fallback property file for unknown locales
Browse files Browse the repository at this point in the history
Fallback property file if the there is no property file which fits the locale.
This should avoid following error:

Caused by: java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key days
    at java.util.ResourceBundle.getObject(ResourceBundle.java:450)
    at java.util.ResourceBundle.getString(ResourceBundle.java:407)
    at com.cronutils.descriptor.CronDescriptor.describeDayOfMonth(CronDescriptor.java:92)
    at com.cronutils.descriptor.CronDescriptor.describe(CronDescriptor.java:61)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
  • Loading branch information
jgoldhammer authored Oct 28, 2016
1 parent 48b775e commit d746eca
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/main/resources/CronUtilsI18N.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
between_x_and_y=between {0} and {1}
every=every
and=and
at=at
day=day
days=days
hour=hour
hours=hours
minute=minute
minutes=minutes
second=second
seconds=seconds
month=month
months=months
year=year
years=years
between=between
of_every_month=of every month
of_the_month=of the month
last=last
the_nearest_weekday_to_the=the nearest weekday to the
last_day_of_month=last day of month
last_weekday_of_month=last weekday of month

0 comments on commit d746eca

Please sign in to comment.