Index: lutini18neditor/src/java/org/codelutin/i18n/editor/ManagerI18n.java diff -u lutini18neditor/src/java/org/codelutin/i18n/editor/ManagerI18n.java:1.1 lutini18neditor/src/java/org/codelutin/i18n/editor/ManagerI18n.java:1.2 --- lutini18neditor/src/java/org/codelutin/i18n/editor/ManagerI18n.java:1.1 Fri Jan 18 18:15:02 2008 +++ lutini18neditor/src/java/org/codelutin/i18n/editor/ManagerI18n.java Wed Jan 23 09:43:27 2008 @@ -57,7 +57,7 @@ /** * Nom du projet sur lequelle on travail */ - protected static String PROJECT_NAME = "isisfish"; // TODO: Récupération automatique + protected static String PROJECT_NAME; /** * Répertoire d'enregistrement des modification ou des nouveaux bundles @@ -106,19 +106,22 @@ userBundles = new HashMap(); // Récupération des fichiers - List files = Resource.getURLs(".*-.?.?_.?.?\\.properties"); + List files = Resource.getURLs(".*i18n/.+\\.properties"); for (URL file : files) { String path = file.getPath(); - Matcher matcher = PATTERN_FILE_NAME.matcher(path); - matcher.matches(); - // Ajout seulement des fichiers non agrégés - if(!"language".equals(matcher.group(1))) { - I18nFileReader property = new I18nFileReader(); - property.load2(file.openStream(), "ISO-8859-1"); - bundles.put(path, property); - } - } + I18nFileReader property = new I18nFileReader(); + property.load2(file.openStream(), "ISO-8859-1"); + bundles.put(path, property); + } + + // Détermination du nom du projet + List projects = Resource.getURLs(".*/i18n/.+\\.properties"); + String project = projects.get(0).getPath(); + Matcher matcher = PATTERN_FILE_NAME.matcher(project); + matcher.matches(); + + PROJECT_NAME = matcher.group(1); } /**