branch develop updated (cfb619c -> 4841088)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository wao. See http://git.codelutin.com/wao.git from cfb619c Si une ligne est affectée à Ifremer, on autorise tous les labos à créer un contact scléro (fixes #6565) new e019a68 On change le nom du programme de « Sclérochronologie » vers « Paramètres biologiques » new 44a217f On change les intitulés dans les entêtes du plan scléro new c810cdb Dans la scléro, on appelle les contacts prélèvements (fixes #6556) new 4841088 Modification de libellés pour la sclérochronologie (fixes #6556) The 4 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 48410886ecdc51a57d8f08f6a0c30a512659d896 Merge: cfb619c c810cdb Author: Brendan Le Ny <bleny@codelutin.com> Date: Tue Feb 3 14:55:12 2015 +0100 Modification de libellés pour la sclérochronologie (fixes #6556) commit c810cdb43652805f351242690c4026c262389164 Author: Brendan Le Ny <bleny@codelutin.com> Date: Tue Feb 3 14:54:04 2015 +0100 Dans la scléro, on appelle les contacts prélèvements (fixes #6556) commit 44a217f7b026d3e7a8a7bd403965ed0c7affcc98 Author: Brendan Le Ny <bleny@codelutin.com> Date: Tue Jan 27 17:47:56 2015 +0100 On change les intitulés dans les entêtes du plan scléro commit e019a6885f365ef7c5d7ccc1e4b0f0026a218891 Author: Brendan Le Ny <bleny@codelutin.com> Date: Tue Jan 27 17:47:16 2015 +0100 On change le nom du programme de « Sclérochronologie » vers « Paramètres biologiques » Summary of changes: .../i18n/wao-persistence_en_GB.properties | 2 +- .../i18n/wao-persistence_fr_FR.properties | 2 +- .../service/csv/ContactImportExportModel.java | 78 +++++++++++----------- .../fr/ifremer/wao/web/WaoI18nTextProvider.java | 30 +++++++++ .../main/resources/i18n/wao-web_en_GB.properties | 3 +- .../main/resources/i18n/wao-web_fr_FR.properties | 3 +- wao-web/src/main/resources/struts.xml | 2 +- .../content/sclerochronology/sampling-plan.jsp | 2 +- 8 files changed, 77 insertions(+), 45 deletions(-) create mode 100644 wao-web/src/main/java/fr/ifremer/wao/web/WaoI18nTextProvider.java -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository wao. See http://git.codelutin.com/wao.git commit e019a6885f365ef7c5d7ccc1e4b0f0026a218891 Author: Brendan Le Ny <bleny@codelutin.com> Date: Tue Jan 27 17:47:16 2015 +0100 On change le nom du programme de « Sclérochronologie » vers « Paramètres biologiques » --- .../src/main/resources/i18n/wao-persistence_en_GB.properties | 2 +- .../src/main/resources/i18n/wao-persistence_fr_FR.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties b/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties index eabe04a..bfda578 100644 --- a/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties +++ b/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties @@ -32,7 +32,7 @@ LocationType.PORT=Port LocationType.REGION=Region ObsProgram.OBSMER=ObsMer ObsProgram.OBSVENTE=ObsVente -ObsProgram.SCLEROCHRONOLOGY=Sclerochronology +ObsProgram.SCLEROCHRONOLOGY=Biologic parameters ObservationType.FIELD_WORK_OBSERVATION=Field work observation ObservationType.FIELD_WORK_SURVEY=Field work survey ObservationType.PHONE_CALL=Survey by phone diff --git a/wao-persistence/src/main/resources/i18n/wao-persistence_fr_FR.properties b/wao-persistence/src/main/resources/i18n/wao-persistence_fr_FR.properties index d72722b..20646d7 100644 --- a/wao-persistence/src/main/resources/i18n/wao-persistence_fr_FR.properties +++ b/wao-persistence/src/main/resources/i18n/wao-persistence_fr_FR.properties @@ -32,7 +32,7 @@ LocationType.PORT=Port LocationType.REGION=Région Ifremer ObsProgram.OBSMER=ObsMer ObsProgram.OBSVENTE=ObsVente -ObsProgram.SCLEROCHRONOLOGY=Sclérochronologie +ObsProgram.SCLEROCHRONOLOGY=Paramètres biologiques ObservationType.FIELD_WORK_OBSERVATION=Observation de terrain ObservationType.FIELD_WORK_SURVEY=Enquête de terrain ObservationType.PHONE_CALL=Enquête téléphonique -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository wao. See http://git.codelutin.com/wao.git commit 44a217f7b026d3e7a8a7bd403965ed0c7affcc98 Author: Brendan Le Ny <bleny@codelutin.com> Date: Tue Jan 27 17:47:56 2015 +0100 On change les intitulés dans les entêtes du plan scléro --- wao-web/src/main/resources/i18n/wao-web_en_GB.properties | 3 ++- wao-web/src/main/resources/i18n/wao-web_fr_FR.properties | 3 ++- .../src/main/webapp/WEB-INF/content/sclerochronology/sampling-plan.jsp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/wao-web/src/main/resources/i18n/wao-web_en_GB.properties b/wao-web/src/main/resources/i18n/wao-web_en_GB.properties index 3ab18e1..974eb0f 100644 --- a/wao-web/src/main/resources/i18n/wao-web_en_GB.properties +++ b/wao-web/src/main/resources/i18n/wao-web_en_GB.properties @@ -541,7 +541,7 @@ wao.ui.samplingPlan.averageObservationsCount=Number of observations wao.ui.samplingPlan.averageTideTime=Average tide time (d.) wao.ui.samplingPlan.effort=Observation effort wao.ui.samplingPlan.effort.obsVente=Observation effort -wao.ui.samplingPlan.effort.sclerochronology=Observation effort in number of individuals +wao.ui.samplingPlan.effort.sclerochronology=Sampling effort in number of individuals wao.ui.samplingPlan.effort.tip=There is a difference between "0" as effort and leave it empty. O means that no effort is asked to the observers but they can still create contacts for this month. Leaving the field empty makes impossible for the observers to create contacts for this months. wao.ui.samplingPlan.estimated=estimated wao.ui.samplingPlan.expected=expected @@ -556,6 +556,7 @@ wao.ui.samplingPlan.phoneCall.see=View the phone call sampling plan wao.ui.samplingPlan.phoneCall.title=Phone call sampling plan wao.ui.samplingPlan.program=program wao.ui.samplingPlan.sampledProfessions=Sampled professions +wao.ui.samplingPlan.sampledSpecies=Sampled species wao.ui.samplingPlan.showActual=Show realisez observations efforfor validated contacts only wao.ui.samplingPlan.showExpected=Show estimated observations effort for contacts validated by company or not wao.ui.samplingPlan.title=Sampling plan diff --git a/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties b/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties index 57313fc..274b4ac 100644 --- a/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties +++ b/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties @@ -542,7 +542,7 @@ wao.ui.samplingPlan.averageObservationsCount=Nombre d'observations wao.ui.samplingPlan.averageTideTime=Durée moyenne d'une marée (J.) wao.ui.samplingPlan.effort=Effort d'observation en nombre de marées wao.ui.samplingPlan.effort.obsVente=Effort d'observation en nombre de sorties -wao.ui.samplingPlan.effort.sclerochronology=Effort d'observation en nombre d'individus +wao.ui.samplingPlan.effort.sclerochronology=Effort d'échantillonnage en nombre d'individus wao.ui.samplingPlan.effort.tip=Il y a une différence entre saisir « 0 » comme effort mensuel et laisser la case vide. Si vous indiquez un effort de 0, aucun effort n'est demandé aux observateurs mais ils pourront tout de même saisir un contact. Si vous laissez la case vide, les observateurs ne pourront pas créer de contacts pour ce mois. wao.ui.samplingPlan.estimated=estimé wao.ui.samplingPlan.expected=planifié @@ -557,6 +557,7 @@ wao.ui.samplingPlan.phoneCall.see=Voir le plan d'échantillonnage téléphonique wao.ui.samplingPlan.phoneCall.title=Plan d'échantillonnage téléphonique wao.ui.samplingPlan.program=Programme ou règlement rattachement wao.ui.samplingPlan.sampledProfessions=Métiers échantillonnés +wao.ui.samplingPlan.sampledSpecies=Espèces échantillonnées wao.ui.samplingPlan.showActual=Afficher l'effort d'observations réalisé pour les contacts validés seulement wao.ui.samplingPlan.showExpected=Afficher l'effort d'observations estimé pour les contacts validés ou non par la société wao.ui.samplingPlan.title=Plan d'échantillonnage diff --git a/wao-web/src/main/webapp/WEB-INF/content/sclerochronology/sampling-plan.jsp b/wao-web/src/main/webapp/WEB-INF/content/sclerochronology/sampling-plan.jsp index 57c283c..9a0d60d 100644 --- a/wao-web/src/main/webapp/WEB-INF/content/sclerochronology/sampling-plan.jsp +++ b/wao-web/src/main/webapp/WEB-INF/content/sclerochronology/sampling-plan.jsp @@ -198,7 +198,7 @@ <thead> <tr> <th colspan="<s:property value="#nbColumnsForProfessionInFullView" />" class="only-in-full-view"> - <s:text name="wao.ui.samplingPlan.sampledProfessions" /> + <s:text name="wao.ui.samplingPlan.sampledSpecies" /> </th> <th colspan="<s:property value="#nbColumnsForProfessionInCompactView" />" class="only-in-compact-view"> <s:text name="wao.ui.samplingPlan.sampledProfessions" /> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository wao. See http://git.codelutin.com/wao.git commit c810cdb43652805f351242690c4026c262389164 Author: Brendan Le Ny <bleny@codelutin.com> Date: Tue Feb 3 14:54:04 2015 +0100 Dans la scléro, on appelle les contacts prélèvements (fixes #6556) --- .../service/csv/ContactImportExportModel.java | 78 +++++++++++----------- .../fr/ifremer/wao/web/WaoI18nTextProvider.java | 30 +++++++++ wao-web/src/main/resources/struts.xml | 2 +- 3 files changed, 70 insertions(+), 40 deletions(-) diff --git a/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ContactImportExportModel.java b/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ContactImportExportModel.java index 487c7e7..d876e7d 100644 --- a/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ContactImportExportModel.java +++ b/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ContactImportExportModel.java @@ -141,14 +141,14 @@ public class ContactImportExportModel implements ImportExportModel<Contact> { protected ModelBuilder<Contact> getModel() { ModelBuilder<Contact> modelBuilder = new ModelBuilder<>(); - modelBuilder.newColumnForImportExport("CONTACT_ID", Contact.PROPERTY_TOPIA_ID); - modelBuilder.newColumnForImportExport("CONTACT_DATE_CREATION", Contact.PROPERTY_CREATION_DATE, new DayTimeParserFormatter(locale)); - modelBuilder.newColumnForImportExport("CONTACT_OBSERVATEUR_PRINCIPAL", Contact.PROPERTY_MAIN_OBSERVER, new UserParserFormatter(locale, waoUsers)); - modelBuilder.newColumnForImportExport("CONTACT_OBSERVATEURS_SECONDAIRES", Contact.PROPERTY_SECONDARY_OBSERVERS, new UsersParserFormatter(locale, waoUsers)); + modelBuilder.newColumnForImportExport("ID", Contact.PROPERTY_TOPIA_ID); + modelBuilder.newColumnForImportExport("DATE_CREATION", Contact.PROPERTY_CREATION_DATE, new DayTimeParserFormatter(locale)); + modelBuilder.newColumnForImportExport("OBSERVATEUR_PRINCIPAL", Contact.PROPERTY_MAIN_OBSERVER, new UserParserFormatter(locale, waoUsers)); + modelBuilder.newColumnForImportExport("OBSERVATEURS_SECONDAIRES", Contact.PROPERTY_SECONDARY_OBSERVERS, new UsersParserFormatter(locale, waoUsers)); - modelBuilder.newIgnoredColumn("CONTACT_OBSERVATEURS_NOMS"); + modelBuilder.newIgnoredColumn("OBSERVATEURS_NOMS"); modelBuilder.newColumnForExport( - "CONTACT_OBSERVATEURS_NOMS", + "OBSERVATEURS_NOMS", "allObservers", new ValueFormatter<List<WaoUser>>() { @Override @@ -161,9 +161,9 @@ public class ContactImportExportModel implements ImportExportModel<Contact> { } } ); - modelBuilder.newIgnoredColumn("CONTACT_OBSERVATEURS_ORGANISATION"); + modelBuilder.newIgnoredColumn("OBSERVATEURS_ORGANISATION"); modelBuilder.newColumnForExport( - "CONTACT_OBSERVATEURS_ORGANISATION", + "OBSERVATEURS_ORGANISATION", new ValueGetter<Contact, Organisation>() { @Override public Organisation get(Contact contact) { @@ -173,21 +173,21 @@ public class ContactImportExportModel implements ImportExportModel<Contact> { new OrganisationParserFormatter(locale, null) ); - modelBuilder.newColumnForImportExport("CONTACT_ETAT", Contact.PROPERTY_CONTACT_STATE, new ContactStateParserFormatter(locale, obsProgram)); - modelBuilder.newColumnForImportExport("CONTACT_DEBUT_OBSERVATION", Contact.PROPERTY_OBSERVATION_BEGIN_DATE, new DayTimeParserFormatter(locale)); - modelBuilder.newColumnForImportExport("CONTACT_FIN_OBSERVATION", Contact.PROPERTY_OBSERVATION_END_DATE, new DayTimeParserFormatter(locale)); + modelBuilder.newColumnForImportExport("ETAT", Contact.PROPERTY_CONTACT_STATE, new ContactStateParserFormatter(locale, obsProgram)); + modelBuilder.newColumnForImportExport("DEBUT_OBSERVATION", Contact.PROPERTY_OBSERVATION_BEGIN_DATE, new DayTimeParserFormatter(locale)); + modelBuilder.newColumnForImportExport("FIN_OBSERVATION", Contact.PROPERTY_OBSERVATION_END_DATE, new DayTimeParserFormatter(locale)); if (obsProgram.isObsMer() || obsProgram.isObsVente()) { - modelBuilder.newColumnForImportExport("CONTACT_SAISIE_DONNEES", Contact.PROPERTY_DATA_INPUT_DATE, new DayParserFormatter(locale)); + modelBuilder.newColumnForImportExport("SAISIE_DONNEES", Contact.PROPERTY_DATA_INPUT_DATE, new DayParserFormatter(locale)); } if (obsProgram.isSclerochronology()) { - modelBuilder.newColumnForImportExport("CONTACT_NOMBRE_INDIVIDUS", Contact.PROPERTY_SAMPLE_SIZE, Common.PRIMITIVE_INTEGER); - modelBuilder.newColumnForImportExport("CONTACT_DATE_ENVOI_ECHANTILLON", Contact.PROPERTY_SAMPLE_SUBMISSION, new DayParserFormatter(locale)); - modelBuilder.newColumnForImportExport("CONTACT_DATE_RECEPTION_ECHANTILLON", Contact.PROPERTY_SAMPLE_RECEPTION, new DayParserFormatter(locale)); - modelBuilder.newColumnForImportExport("CONTACT_DATE_TRAITEMENT_ECHANTILLON", Contact.PROPERTY_SAMPLE_TREATMENT, new DayParserFormatter(locale)); + modelBuilder.newColumnForImportExport("NOMBRE_INDIVIDUS", Contact.PROPERTY_SAMPLE_SIZE, Common.PRIMITIVE_INTEGER); + modelBuilder.newColumnForImportExport("DATE_ENVOI_ECHANTILLON", Contact.PROPERTY_SAMPLE_SUBMISSION, new DayParserFormatter(locale)); + modelBuilder.newColumnForImportExport("DATE_RECEPTION_ECHANTILLON", Contact.PROPERTY_SAMPLE_RECEPTION, new DayParserFormatter(locale)); + modelBuilder.newColumnForImportExport("DATE_TRAITEMENT_ECHANTILLON", Contact.PROPERTY_SAMPLE_TREATMENT, new DayParserFormatter(locale)); } - modelBuilder.newColumnForImportExport("CONTACT_COMMENTAIRE_OBSERVATEUR", Contact.PROPERTY_COMMENT); - modelBuilder.newColumnForImportExport("CONTACT_COMMENTAIRE_COORDINATEUR", Contact.PROPERTY_COMMENT_COORDINATOR); - modelBuilder.newColumnForImportExport("CONTACT_COMMENTAIRE_PROGRAMME", Contact.PROPERTY_COMMENT_ADMIN); + modelBuilder.newColumnForImportExport("COMMENTAIRE_OBSERVATEUR", Contact.PROPERTY_COMMENT); + modelBuilder.newColumnForImportExport("COMMENTAIRE_COORDINATEUR", Contact.PROPERTY_COMMENT_COORDINATOR); + modelBuilder.newColumnForImportExport("COMMENTAIRE_PROGRAMME", Contact.PROPERTY_COMMENT_ADMIN); if (obsProgram.isObsMer() || obsProgram.isObsVente()) { modelBuilder.newColumnForImportExport("NAVIRE_IMMATRICULATION", Contact.PROPERTY_BOAT, new BoatParserFormatter(boats, locale)); modelBuilder.newIgnoredColumn("NAVIRE_NOM"); @@ -199,23 +199,23 @@ public class ContactImportExportModel implements ImportExportModel<Contact> { } }); } - modelBuilder.newColumnForImportExport("CONTACT_VALIDATION_SOCIETE", Contact.PROPERTY_VALIDATION_COMPANY, Common.BOOLEAN); - modelBuilder.newColumnForImportExport("CONTACT_VALIDATION_PROGRAMME", Contact.PROPERTY_VALIDATION_PROGRAM, Common.BOOLEAN); + modelBuilder.newColumnForImportExport("VALIDATION_SOCIETE", Contact.PROPERTY_VALIDATION_COMPANY, Common.BOOLEAN); + modelBuilder.newColumnForImportExport("VALIDATION_PROGRAMME", Contact.PROPERTY_VALIDATION_PROGRAM, Common.BOOLEAN); modelBuilder.newColumnForImportExport("PLAN_CODE", Contact.PROPERTY_SAMPLE_ROW, new SampleRowParserFormatter(locale, sampleRows)); modelBuilder.newColumnForExport("PLAN_NOM_PROGRAMME", Contact.PROPERTY_SAMPLE_ROW + "." + SampleRow.PROPERTY_PROGRAM_NAME); modelBuilder.newIgnoredColumn("PLAN_NOM_PROGRAMME"); if (obsProgram.isObsMer()) { - modelBuilder.newColumnForImportExport("CONTACT_QUALITE_DONNEE", "dataReliability", + modelBuilder.newColumnForImportExport("QUALITE_DONNEE", "dataReliability", new I18nAbleParserFormatter<>(locale, DataReliability.values())); - modelBuilder.newColumnForImportExport("CONTACT_OBSERVATION_MAMMIFERE", Contact.PROPERTY_MAMMALS_OBSERVATION, Common.BOOLEAN); - modelBuilder.newColumnForImportExport("CONTACT_CAPTURE_ACCIDENTELLE", Contact.PROPERTY_MAMMALS_CAPTURE, Common.BOOLEAN); - modelBuilder.newIgnoredColumn("CONTACT_CAPTURE_ACCIDENTELLE_DETAILS"); - modelBuilder.newColumnForExport("CONTACT_CAPTURE_ACCIDENTELLE_DETAILS", Contact.PROPERTY_MAMMALS_INFO); - modelBuilder.newColumnForImportExport("CONTACT_ETAT_MOTIF_CODE", Contact.PROPERTY_CONTACT_STATE_MOTIF, new ContactStateMotivesParserFormatter(locale, motives)); - modelBuilder.newIgnoredColumn("CONTACT_ETAT_MOTIF_NOM"); - modelBuilder.newColumnForExport("CONTACT_ETAT_MOTIF_NOM", new ValueGetter<Contact, String>() { + modelBuilder.newColumnForImportExport("OBSERVATION_MAMMIFERE", Contact.PROPERTY_MAMMALS_OBSERVATION, Common.BOOLEAN); + modelBuilder.newColumnForImportExport("CAPTURE_ACCIDENTELLE", Contact.PROPERTY_MAMMALS_CAPTURE, Common.BOOLEAN); + modelBuilder.newIgnoredColumn("CAPTURE_ACCIDENTELLE_DETAILS"); + modelBuilder.newColumnForExport("CAPTURE_ACCIDENTELLE_DETAILS", Contact.PROPERTY_MAMMALS_INFO); + modelBuilder.newColumnForImportExport("ETAT_MOTIF_CODE", Contact.PROPERTY_CONTACT_STATE_MOTIF, new ContactStateMotivesParserFormatter(locale, motives)); + modelBuilder.newIgnoredColumn("ETAT_MOTIF_NOM"); + modelBuilder.newColumnForExport("ETAT_MOTIF_NOM", new ValueGetter<Contact, String>() { @Override public String get(Contact contact) { @@ -226,21 +226,21 @@ public class ContactImportExportModel implements ImportExportModel<Contact> { return name; } }); - modelBuilder.newColumnForImportExport("CONTACT_TRANSMISSION_RESTITUTION", Contact.PROPERTY_RESTITUTION, new DayParserFormatter(locale)); + modelBuilder.newColumnForImportExport("TRANSMISSION_RESTITUTION", Contact.PROPERTY_RESTITUTION, new DayParserFormatter(locale)); Set<ObservedDataControl> observedDataControlsValues = new HashSet<>(); Collections.addAll(observedDataControlsValues, ObservedDataControl.values()); observedDataControlsValues.add(null); I18nAbleParserFormatter<ObservedDataControl> valueParserFormatter = new I18nAbleParserFormatter<>(locale, observedDataControlsValues); valueParserFormatter.setAcceptNullValues(true); - modelBuilder.newColumnForImportExport("CONTACT_DONNEES_ALLEGRO_VALIDEES", Contact.PROPERTY_OBSERVED_DATA_CONTROL, valueParserFormatter); + modelBuilder.newColumnForImportExport("DONNEES_ALLEGRO_VALIDEES", Contact.PROPERTY_OBSERVED_DATA_CONTROL, valueParserFormatter); - modelBuilder.newIgnoredColumn("CONTACT_DUREE_OBSERVATION_EN_JOURS"); - modelBuilder.newColumnForExport("CONTACT_DUREE_OBSERVATION_EN_JOURS", "observationTimeInDays", Common.INTEGER); + modelBuilder.newIgnoredColumn("DUREE_OBSERVATION_EN_JOURS"); + modelBuilder.newColumnForExport("DUREE_OBSERVATION_EN_JOURS", "observationTimeInDays", Common.INTEGER); } if (obsProgram.isObsVente()) { - modelBuilder.newColumnForImportExport("CONTACT_ECHANTILLONNAGE_COMPLET", Contact.PROPERTY_COMPLETE_SAMPLING, Common.BOOLEAN); + modelBuilder.newColumnForImportExport("ECHANTILLONNAGE_COMPLET", Contact.PROPERTY_COMPLETE_SAMPLING, Common.BOOLEAN); // terrestrial location Set<LocationType> locationTypes = new HashSet<>(); @@ -252,11 +252,11 @@ public class ContactImportExportModel implements ImportExportModel<Contact> { locationTypeParserFormatter.setAcceptNullValues(true); ValueGetterSetter<Contact, LocationType> locationTypeGetter = new Common.ValueSaver<>(); modelBuilder.newMandatoryColumn( - "CONTACT_LIEU_TYPE", + "LIEU_TYPE", locationTypeParserFormatter, locationTypeGetter); modelBuilder.newColumnForExport( - "CONTACT_LIEU_TYPE", + "LIEU_TYPE", new ValueGetter<Contact, LocationType>() { @Override public LocationType get(Contact contact) { @@ -270,12 +270,12 @@ public class ContactImportExportModel implements ImportExportModel<Contact> { }, locationTypeParserFormatter); modelBuilder.newColumnForImportExport( - "CONTACT_LIEU_CODE", + "LIEU_CODE", Contact.PROPERTY_TERRESTRIAL_LOCATION, new TerrestrialLocationParserFormatter(locale, terrestrialLocations, locationTypeGetter)); - modelBuilder.newIgnoredColumn("CONTACT_LIEU_DESCRIPTION"); - modelBuilder.newColumnForExport("CONTACT_LIEU_DESCRIPTION", new ValueGetter<Contact, String>() { + modelBuilder.newIgnoredColumn("LIEU_DESCRIPTION"); + modelBuilder.newColumnForExport("LIEU_DESCRIPTION", new ValueGetter<Contact, String>() { @Override public String get(Contact contact) { String description = ""; diff --git a/wao-web/src/main/java/fr/ifremer/wao/web/WaoI18nTextProvider.java b/wao-web/src/main/java/fr/ifremer/wao/web/WaoI18nTextProvider.java new file mode 100644 index 0000000..d9c18ea --- /dev/null +++ b/wao-web/src/main/java/fr/ifremer/wao/web/WaoI18nTextProvider.java @@ -0,0 +1,30 @@ +package fr.ifremer.wao.web; + +import com.opensymphony.xwork2.ActionContext; +import fr.ifremer.wao.WaoUtils; +import org.apache.struts2.ServletActionContext; +import org.apache.struts2.dispatcher.mapper.ActionMapping; +import org.nuiton.web.struts2.I18nTextProvider; + +public class WaoI18nTextProvider extends I18nTextProvider { + + @Override + protected String getSafeText(String key, String value) { + String text = super.getSafeText(key, value); + ActionMapping actionMapping = (ActionMapping) ActionContext.getContext().get(ServletActionContext.ACTION_MAPPING); + if (actionMapping.getNamespace().contains("sclerochronology")) { + if (WaoUtils.isFrench(localeProvider.getLocale())) { + text = text.replaceAll("Contacts", "Prélèvements"); + text = text.replaceAll("contacts", "prélèvements"); + text = text.replaceAll("Contact", "Prélèvement"); + text = text.replaceAll("contact", "prélèvement"); + } else { + text = text.replaceAll("Contacts", "Samples"); + text = text.replaceAll("contacts", "samples"); + text = text.replaceAll("Contact", "Sample"); + text = text.replaceAll("contact", "sample"); + } + } + return text; + } +} diff --git a/wao-web/src/main/resources/struts.xml b/wao-web/src/main/resources/struts.xml index 76b2256..e2d7178 100644 --- a/wao-web/src/main/resources/struts.xml +++ b/wao-web/src/main/resources/struts.xml @@ -57,7 +57,7 @@ <constant name="struts.convention.package.locators.basePackage" value="fr.ifremer.wao.web.action"/> <constant name="struts.convention.default.parent.package" value="waoPackage"/> - <bean class="org.nuiton.web.struts2.I18nTextProvider" name="i18nTextProvider" type="com.opensymphony.xwork2.TextProvider"/> + <bean class="fr.ifremer.wao.web.WaoI18nTextProvider" name="i18nTextProvider" type="com.opensymphony.xwork2.TextProvider"/> <bean type="com.opensymphony.xwork2.conversion.impl.NumberConverter" class="org.nuiton.web.struts2.converters.HundredthLocalNumberConverter" scope="singleton"/> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository wao. See http://git.codelutin.com/wao.git commit 48410886ecdc51a57d8f08f6a0c30a512659d896 Merge: cfb619c c810cdb Author: Brendan Le Ny <bleny@codelutin.com> Date: Tue Feb 3 14:55:12 2015 +0100 Modification de libellés pour la sclérochronologie (fixes #6556) .../i18n/wao-persistence_en_GB.properties | 2 +- .../i18n/wao-persistence_fr_FR.properties | 2 +- .../service/csv/ContactImportExportModel.java | 78 +++++++++++----------- .../fr/ifremer/wao/web/WaoI18nTextProvider.java | 30 +++++++++ .../main/resources/i18n/wao-web_en_GB.properties | 3 +- .../main/resources/i18n/wao-web_fr_FR.properties | 3 +- wao-web/src/main/resources/struts.xml | 2 +- .../content/sclerochronology/sampling-plan.jsp | 2 +- 8 files changed, 77 insertions(+), 45 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm