private boolean tryAddModule ( IAggregator aggregator , List < String > list , String bundleRoot , IResource bundleRootRes , String locale , String resource , Collection < String > availableLocales ) throws IOException { if ( availableLocales != null && ! availableLocales . contains ( locale ) ) { return false ; } boolean result = false ; URI uri = bundleRootRes . getURI ( ) ; URI testUri = uri . resolve ( locale + "/" + resource + ".js" ) ; //$NON-NLS-1$ //$NON-NLS-2$ IResource testResource = aggregator . newResource ( testUri ) ; if ( availableLocales != null || testResource . exists ( ) ) { String mid = bundleRoot + "/" + locale + "/" + resource ; //$NON-NLS-1$ //$NON-NLS-2$ list . add ( mid ) ; result = true ; } return result ; }
Adds the source for the locale specific i18n resource if it exists .