diff --git a/launch/owlcms h2 no reset.launch b/launch/owlcms h2 no reset.launch index cd89fc51e..affa12442 100644 --- a/launch/owlcms h2 no reset.launch +++ b/launch/owlcms h2 no reset.launch @@ -11,7 +11,6 @@ - diff --git a/owlcms/src/main/java/app/owlcms/data/config/Config.java b/owlcms/src/main/java/app/owlcms/data/config/Config.java index 978991afa..257047685 100644 --- a/owlcms/src/main/java/app/owlcms/data/config/Config.java +++ b/owlcms/src/main/java/app/owlcms/data/config/Config.java @@ -809,9 +809,10 @@ public boolean isTraceMemory() { @JsonIgnore public boolean isUseCompetitionDate() { if (this.useCompetitionDate == null) { - this.useCompetitionDate = StartupUtils.getBooleanParam("useCompetitionDate"); + this.useCompetitionDate = StartupUtils.getBooleanParamOrElseNull("useCompetitionDate"); } - return this.useCompetitionDate; + // if not defined, use the competition date as stored in the database + return this.useCompetitionDate != null ? this.useCompetitionDate : true; } public void setClearZip(boolean clearZipRequested) { diff --git a/owlcms/src/main/java/app/owlcms/data/jpa/ProdData.java b/owlcms/src/main/java/app/owlcms/data/jpa/ProdData.java index b0375657a..320155aa2 100644 --- a/owlcms/src/main/java/app/owlcms/data/jpa/ProdData.java +++ b/owlcms/src/main/java/app/owlcms/data/jpa/ProdData.java @@ -57,40 +57,36 @@ protected static Competition createDefaultCompetition() { Competition competition = new Competition(); - competition.setCompetitionName(Translator.translate("Competition", getLocale()) + " ?"); - competition.setCompetitionCity(Translator.translate("Competition.competitionCity", getLocale()) + " ?"); + competition.setCompetitionName("\u2013"); + competition.setCompetitionCity("\u2013"); competition.setCompetitionDate(LocalDate.now()); competition - .setCompetitionOrganizer(Translator.translate("Competition.competitionOrganizer", getLocale()) + " ?"); - competition.setCompetitionSite(Translator.translate("Competition.competitionSite", getLocale()) + " ?"); + .setCompetitionOrganizer("\u2013"); + competition.setCompetitionSite("\u2013"); - String federationLabel = Translator.translate("Competition.federation", getLocale()) + " ?"; String defaultFederationKey = "Competition.defaultFederation"; String defaultFederation = Translator.translate(defaultFederationKey, getLocale()); // if string is not translated, we get its key back. - competition.setFederation(defaultFederation.equals(defaultFederationKey) ? federationLabel : defaultFederation); + competition.setFederation(defaultFederation.equals(defaultFederationKey) ? "\u2013" : defaultFederation); - String federationAddressLabel = Translator.translate("Competition.federationAddress", getLocale()) + " ?"; String defaultFederationAddressKey = "Competition.defaultFederationAddress"; String defaultFederationAddress = Translator.translate(defaultFederationAddressKey, getLocale()); // if string is not translated, we get its key back. competition.setFederationAddress( - defaultFederationAddress.equals(defaultFederationAddressKey) ? federationAddressLabel + defaultFederationAddress.equals(defaultFederationAddressKey) ? "\u2013" : defaultFederationAddress); - String federationEMailLabel = Translator.translate("Competition.federationEMail", getLocale()) + " ?"; String defaultFederationEMailKey = "Competition.defaultFederationEMail"; String defaultFederationEMail = Translator.translate(defaultFederationEMailKey, getLocale()); // if string is not translated, we get its key back. - competition.setFederationEMail(defaultFederationEMail.equals(defaultFederationEMailKey) ? federationEMailLabel + competition.setFederationEMail(defaultFederationEMail.equals(defaultFederationEMailKey) ? "\u2013" : defaultFederationEMail); - String federationWebSiteLabel = Translator.translate("Competition.federationWebSite", getLocale()) + " ?"; String defaultFederationWebSiteKey = "Competition.defaultFederationWebSite"; String defaultFederationWebSite = Translator.translate(defaultFederationWebSiteKey, getLocale()); // if string is not translated, we get its key back. competition.setFederationWebSite( - defaultFederationWebSite.equals(defaultFederationWebSiteKey) ? federationWebSiteLabel + defaultFederationWebSite.equals(defaultFederationWebSiteKey) ? "\u2013" : defaultFederationWebSite); competition.setUseBirthYear(false);