/trunk/src/org/tela_botanica/client/I18n/I18n.java |
---|
File deleted |
\ No newline at end of file |
/trunk/src/org/tela_botanica/client/I18n/VocabulaireMetadonnees.java |
---|
File deleted |
/trunk/src/org/tela_botanica/client/I18n/Messages.java |
---|
File deleted |
/trunk/src/org/tela_botanica/client/I18n/VocabulaireMetadonnees.properties |
---|
File deleted |
\ No newline at end of file |
/trunk/src/org/tela_botanica/client/modeles/objets/ImageCarnet.java |
---|
4,6 → 4,10 |
import java.util.Iterator; |
import java.util.Set; |
import org.tela_botanica.client.i18n.I18n; |
import org.tela_botanica.client.i18n.VocabulaireMetadonnees; |
import com.google.gwt.dev.asm.commons.Method; |
import com.google.gwt.json.client.JSONObject; |
import com.google.gwt.xml.client.Document; |
import com.google.gwt.xml.client.Node; |
345,7 → 349,8 |
if(attributs.item(i) != null) { |
XMLParser.removeWhitespace(attributs.item(i)); |
attributs.item(i).normalize(); |
metadonnees[i][0] = attributs.item(i).getNodeName(); |
String nomMetaDonneestraduite = VocabulaireMetadonnees.getTraduction(attributs.item(i).getNodeName()); |
metadonnees[i][0] = nomMetaDonneestraduite; |
if(attributs.item(i).hasChildNodes()) { |
Node valeur = attributs.item(i).getFirstChild(); |
if(valeur.getNodeType() == Node.TEXT_NODE) { |
/trunk/src/org/tela_botanica/client/i18n/I18n.java |
---|
New file |
0,0 → 1,19 |
package org.tela_botanica.client.i18n; |
import com.google.gwt.core.client.GWT; |
public class I18n { |
public I18n() { |
} |
public static VocabulaireMetadonnees getVocabulaireMetadonnees() { |
return (VocabulaireMetadonnees) GWT.create(VocabulaireMetadonnees.class); |
} |
public static Messages getMessages() { |
return (Messages) GWT.create(Messages.class); |
} |
} |
/trunk/src/org/tela_botanica/client/i18n/VocabulaireMetadonnees.java |
---|
New file |
0,0 → 1,23 |
package org.tela_botanica.client.i18n; |
import com.google.gwt.i18n.client.Dictionary; |
/** |
* Interface to represent the constants contained in resource bundle: |
* '/home/aurelien/web/cel_GWT2/src/org/tela_botanica/client/i18n/VocabulaireMetadonnees.properties'. |
*/ |
public class VocabulaireMetadonnees { |
private static Dictionary traductionMetadonnees = Dictionary.getDictionary("traductionMetadonnees"); |
public static String getTraduction(String terme) { |
String traduction = null; |
terme = terme.toLowerCase(); |
terme = terme.replaceAll("-", ""); |
terme = terme.replaceAll(" ", ""); |
if(traductionMetadonnees.keySet().contains(terme)) { |
traduction = traductionMetadonnees.get(terme); |
} |
return traduction != null ? traduction : terme; |
} |
} |
/trunk/src/org/tela_botanica/client/i18n/Messages.java |
---|
New file |
0,0 → 1,9 |
package org.tela_botanica.client.i18n; |
/** |
* Interface to represent the constants contained in resource bundle: |
* '/home/aurelien/web/cel_GWT2/src/org/tela_botanica/client/i18n/Messages.properties'. |
*/ |
public interface Messages extends com.google.gwt.i18n.client.Constants { |
} |