JavaPropertyScanner extends AbstractPropertyScanner implements PropertyScanner { @Override public File computeTranslationPath(File template, Locale templateLocale, Locale translationLocale) { Matcher matcher = LOCALE_PATTERN.matcher(template.getName()); if (!matcher.matches()) return null; String newName = matcher.group(1) + "_" + translationLocale.toString() + matcher.group(3); return new File(template.getParentFile(),newName); }  @Override File findTemplate(File propertyFile, ScanConfiguration config); @Override Locale getLocale(File propertyFile); @Override Map<Locale, File> findTranslations(File template, ScanConfiguration config); @Override File computeTranslationPath(File template, Locale templateLocale, Locale translationLocale); @Override boolean isBilingual(); @Override PropertyConverter createConverter(URI resource); @Override String[] getDefaultIncludes(); @Override String[] getDefaultExcludes(); @Override String getEncoding(); @Property(name=PropertyScanner.TYPE, value="PROPERTIES_ENCODED")
	 static final String TYPE; }
@Test public void testComputeTranslationPath() { assertEquals("test_de_DE.properties", getFixture().computeTranslationPath(new File("test.properties"), null, new Locale("de","DE")).getName()); assertEquals("tes_en_USt_de_DE.properties", getFixture().computeTranslationPath(new File("tes_en_USt.properties"), null, new Locale("de","DE")).getName()); assertEquals("test_de_DE.properties", getFixture().computeTranslationPath(new File("test_en.properties"), new Locale("en"), new Locale("de","DE")).getName()); }