r3709 - in trunk: pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/vote pollen-votecounting-api/src/main/java/org/chorem/pollen/votecounting pollen-votecounting-api/src/test/java/org/chorem/pollen/votecounting pollen-votecounting-borda/src/main/java/org/chorem/pollen/votecounting pollen-votecounting-borda/src/main/resources/i18n pollen-votecounting-borda/src/test/java/org/chorem/pollen/votecounting pollen-votecounting-condorcet/src/main/java/org/chorem/pollen/votecounting p
Author: tchemit Date: 2012-09-29 15:06:12 +0200 (Sat, 29 Sep 2012) New Revision: 3709 Url: http://chorem.org/repositories/revision/pollen/3709 Log: refs #590: Refactor votecounting module (clean packages + fix i18n) Added: trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-borda_en_GB.properties trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-borda_fr_FR.properties trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-condorcet_en_GB.properties trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-condorcet_fr_FR.properties trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-coombs_en_GB.properties trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-coombs_fr_FR.properties trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-instant-runoff_en_GB.properties trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-instant-runoff_fr_FR.properties trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-normal_en_GB.properties trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-normal_fr_FR.properties trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-number_en_GB.properties trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-number_fr_FR.properties trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-percentage_en_GB.properties trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-percentage_fr_FR.properties Removed: trunk/pollen-votecounting-api/src/main/java/org/chorem/pollen/votecounting/strategy/ trunk/pollen-votecounting-api/src/test/java/org/chorem/pollen/votecounting/strategy/ trunk/pollen-votecounting-borda/src/main/java/org/chorem/pollen/votecounting/strategy/ trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-strategy-borda_en_GB.properties trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-strategy-borda_fr_FR.properties trunk/pollen-votecounting-borda/src/test/java/org/chorem/pollen/votecounting/strategy/ trunk/pollen-votecounting-condorcet/src/main/java/org/chorem/pollen/votecounting/strategy/ trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-strategy-condorcet_en_GB.properties trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-strategy-condorcet_fr_FR.properties trunk/pollen-votecounting-condorcet/src/test/java/org/chorem/pollen/votecounting/strategy/ trunk/pollen-votecounting-coombs/src/main/java/org/chorem/pollen/votecounting/strategy/ trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-strategy-coombs_en_GB.properties trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-strategy-coombs_fr_FR.properties trunk/pollen-votecounting-coombs/src/test/java/org/chorem/pollen/votecounting/strategy/ trunk/pollen-votecounting-instant-runoff/src/main/java/org/chorem/pollen/votecounting/strategy/ trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-strategy-instant-runoff_en_GB.properties trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-strategy-instant-runoff_fr_FR.properties trunk/pollen-votecounting-instant-runoff/src/test/java/org/chorem/pollen/votecounting/strategy/ trunk/pollen-votecounting-normal/src/main/java/org/chorem/pollen/votecounting/strategy/ trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-strategy-normal_en_GB.properties trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-strategy-normal_fr_FR.properties trunk/pollen-votecounting-normal/src/test/java/org/chorem/pollen/votecounting/strategy/ trunk/pollen-votecounting-number/src/main/java/org/chorem/pollen/votecounting/strategy/ trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-strategy-number_en_GB.properties trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-strategy-number_fr_FR.properties trunk/pollen-votecounting-number/src/test/java/org/chorem/pollen/votecounting/strategy/ trunk/pollen-votecounting-percentage/src/main/java/org/chorem/pollen/votecounting/strategy/ trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-strategy-percentage_en_GB.properties trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-strategy-percentage_fr_FR.properties trunk/pollen-votecounting-percentage/src/test/java/org/chorem/pollen/votecounting/strategy/ Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/vote/VoteForPoll.java trunk/pollen-votecounting-api/src/main/java/org/chorem/pollen/votecounting/VoteCounting.java trunk/pollen-votecounting-borda/src/main/java/org/chorem/pollen/votecounting/BordaVoteCounting.java trunk/pollen-votecounting-condorcet/src/main/java/org/chorem/pollen/votecounting/CondorcetVoteCounting.java trunk/pollen-votecounting-coombs/src/main/java/org/chorem/pollen/votecounting/CoombsVoteCounting.java trunk/pollen-votecounting-instant-runoff/src/main/java/org/chorem/pollen/votecounting/InstantRunoffVoteCounting.java trunk/pollen-votecounting-normal/src/main/java/org/chorem/pollen/votecounting/NormalVoteCounting.java trunk/pollen-votecounting-number/src/main/java/org/chorem/pollen/votecounting/NumberVoteCounting.java trunk/pollen-votecounting-percentage/src/main/java/org/chorem/pollen/votecounting/PercentageVoteCounting.java Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/vote/VoteForPoll.java =================================================================== --- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/vote/VoteForPoll.java 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/vote/VoteForPoll.java 2012-09-29 13:06:12 UTC (rev 3709) @@ -117,23 +117,28 @@ voteNumber++; Integer value = voteToChoice.getVoteValue(); + String originalValue; + if (value == null) { // check value if same as the one return by request // otherwise it means there is a conversion error String[] values = getParameters().get("vote.choiceVoteToChoice[" + voteNumber + "].voteValue"); - String paramValue = values == null || values.length < 1 ? null : values[0]; + originalValue = values == null || values.length < 1 ? null : values[0]; - if (StringUtils.isNotBlank(paramValue)) { + if (StringUtils.isNotBlank(originalValue)) { // vote value changed String validMessage = - _("pollen.error.vote.invalidFormat", voteToChoice.getChoice().getName(), paramValue); + _("pollen.error.vote.invalidFormat", voteToChoice.getChoice().getName(), originalValue); addFieldError("vote.choices", validMessage); voteValid = false; break; } + } else { + originalValue = String.valueOf(value); } + // check if vote is null ? boolean voteNull = voteCounting.isVoteValueNull(value); @@ -154,7 +159,10 @@ // not a valid vote value, mark it and skip other fields validation String validMessage = - voteCounting.getVoteValueNotValidMessage(getLocale()); + voteCounting.getVoteValueNotValidMessage( + getLocale(), + voteToChoice.getChoice().getName(), + originalValue); addFieldError("vote.choices", validMessage); voteValid = false; break; @@ -183,12 +191,6 @@ @Override public String execute() throws Exception { - // REMARQUES : - // - pas le droit de modif si le pollAccount est rattaché a un userAccount et qu'on est pas loggé ?!? - // - Ce serait plus simple que l'Admin ne puisse jamais voter, il ne peut que modérer les votes - //TODO tchemit-2012-08-12 Non l'admin est un user comme les autres, - //TODO on doit pouvoir gérer tous les cas de manière simple (enfin je crois) - Poll poll = getPoll(); Vote vote = getVote(); Modified: trunk/pollen-votecounting-api/src/main/java/org/chorem/pollen/votecounting/VoteCounting.java =================================================================== --- trunk/pollen-votecounting-api/src/main/java/org/chorem/pollen/votecounting/VoteCounting.java 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-api/src/main/java/org/chorem/pollen/votecounting/VoteCounting.java 2012-09-29 13:06:12 UTC (rev 3709) @@ -85,10 +85,14 @@ /** * If a vote value is not valid, gets the localized message of the error. * - * @param locale the locale used to render the error message + * @param locale the locale used to render the error message + * @param choiceName name of thechoice + * @param voteValue value fo the vote * @return the localized validation message */ - String getVoteValueNotValidMessage(Locale locale); + String getVoteValueNotValidMessage(Locale locale, + String choiceName, + String voteValue); /** * Tests if the total values of a vote is valid. Modified: trunk/pollen-votecounting-borda/src/main/java/org/chorem/pollen/votecounting/BordaVoteCounting.java =================================================================== --- trunk/pollen-votecounting-borda/src/main/java/org/chorem/pollen/votecounting/BordaVoteCounting.java 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-borda/src/main/java/org/chorem/pollen/votecounting/BordaVoteCounting.java 2012-09-29 13:06:12 UTC (rev 3709) @@ -32,8 +32,11 @@ } @Override - public String getVoteValueNotValidMessage(Locale locale) { - return l_(locale, "pollen.error.vote.invalidBordaVoteValue"); + public String getVoteValueNotValidMessage(Locale locale, + String choiceName, + String voteValue) { + return l_(locale, "pollen.error.vote.invalidBordaVoteValue", + choiceName, voteValue); } @Override Copied: trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-borda_en_GB.properties (from rev 3708, trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-strategy-borda_en_GB.properties) =================================================================== --- trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-borda_en_GB.properties (rev 0) +++ trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-borda_en_GB.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -0,0 +1,3 @@ +pollen.error.vote.invalidBordaVoteValue=The value '%s' of vote for choice %s is not valid, only integer values are authorized. +pollen.voteCountingType.borda=Borda +pollen.voteCountingType.borda.help=Rank choices by preference order from 1 to N (1\=favorite). Only the rank is taken into account, not the values. Two choices can have the same value. Property changes on: trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-borda_en_GB.properties ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Copied: trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-borda_fr_FR.properties (from rev 3708, trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-strategy-borda_fr_FR.properties) =================================================================== --- trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-borda_fr_FR.properties (rev 0) +++ trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-borda_fr_FR.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -0,0 +1,3 @@ +pollen.error.vote.invalidBordaVoteValue=La valeur du vote '%s' pour le choix %s n'est pas correcte, seul des valeurs entières sont autorisées. +pollen.voteCountingType.borda=Borda +pollen.voteCountingType.borda.help=Classer les choix par ordre de préférence de 1 à N (1\=préféré). Seul l'ordre des choix compte, peu importe les valeurs. Deux choix peuvent avoir la même valeur. Property changes on: trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-borda_fr_FR.properties ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Deleted: trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-strategy-borda_en_GB.properties =================================================================== --- trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-strategy-borda_en_GB.properties 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-strategy-borda_en_GB.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -1,3 +0,0 @@ -pollen.error.vote.invalidBordaVoteValue= -pollen.voteCountingType.borda=Borda -pollen.voteCountingType.borda.help=Rank choices by preference order from 1 to N (1\=favorite). Only the rank is taken into account, not the values. Two choices can have the same value. Deleted: trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-strategy-borda_fr_FR.properties =================================================================== --- trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-strategy-borda_fr_FR.properties 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-strategy-borda_fr_FR.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -1,3 +0,0 @@ -pollen.error.vote.invalidBordaVoteValue= -pollen.voteCountingType.borda=Borda -pollen.voteCountingType.borda.help=Classer les choix par ordre de préférence de 1 à N (1\=préféré). Seul l'ordre des choix compte, peu importe les valeurs. Deux choix peuvent avoir la même valeur. Modified: trunk/pollen-votecounting-condorcet/src/main/java/org/chorem/pollen/votecounting/CondorcetVoteCounting.java =================================================================== --- trunk/pollen-votecounting-condorcet/src/main/java/org/chorem/pollen/votecounting/CondorcetVoteCounting.java 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-condorcet/src/main/java/org/chorem/pollen/votecounting/CondorcetVoteCounting.java 2012-09-29 13:06:12 UTC (rev 3709) @@ -32,8 +32,11 @@ } @Override - public String getVoteValueNotValidMessage(Locale locale) { - return l_(locale, "pollen.error.vote.invalidCondorcetVoteValue"); + public String getVoteValueNotValidMessage(Locale locale, + String choiceName, + String voteValue) { + return l_(locale, "pollen.error.vote.invalidCondorcetVoteValue", + choiceName, voteValue); } @Override Copied: trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-condorcet_en_GB.properties (from rev 3708, trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-strategy-condorcet_en_GB.properties) =================================================================== --- trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-condorcet_en_GB.properties (rev 0) +++ trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-condorcet_en_GB.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -0,0 +1,3 @@ +pollen.error.vote.invalidCondorcetVoteValue=The value '%s' of vote for choice %s is not valid, only integer values are authorized. +pollen.voteCountingType.condorcet=Condorcet +pollen.voteCountingType.condorcet.help=Rank choices by preference order from 1 to N (1\=favorite). Only the rank is taken into account, not the values. Two choices can have the same value. Property changes on: trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-condorcet_en_GB.properties ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Copied: trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-condorcet_fr_FR.properties (from rev 3708, trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-strategy-condorcet_fr_FR.properties) =================================================================== --- trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-condorcet_fr_FR.properties (rev 0) +++ trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-condorcet_fr_FR.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -0,0 +1,3 @@ +pollen.error.vote.invalidCondorcetVoteValue=La valeur du vote '%s' pour le choix %s n'est pas correcte, seul des valeurs entières sont autorisées. +pollen.voteCountingType.condorcet=Condorcet +pollen.voteCountingType.condorcet.help=Classer les choix par ordre de préférence de 1 à N (1\=préféré). Seul l'ordre des choix compte, peu importe les valeurs. Deux choix peuvent avoir la même valeur. Property changes on: trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-condorcet_fr_FR.properties ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Deleted: trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-strategy-condorcet_en_GB.properties =================================================================== --- trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-strategy-condorcet_en_GB.properties 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-strategy-condorcet_en_GB.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -1,3 +0,0 @@ -pollen.error.vote.invalidCondorcetVoteValue= -pollen.voteCountingType.condorcet=Condorcet -pollen.voteCountingType.condorcet.help=Rank choices by preference order from 1 to N (1\=favorite). Only the rank is taken into account, not the values. Two choices can have the same value. Deleted: trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-strategy-condorcet_fr_FR.properties =================================================================== --- trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-strategy-condorcet_fr_FR.properties 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-strategy-condorcet_fr_FR.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -1,3 +0,0 @@ -pollen.error.vote.invalidCondorcetVoteValue= -pollen.voteCountingType.condorcet=Condorcet -pollen.voteCountingType.condorcet.help=Classer les choix par ordre de préférence de 1 à N (1\=préféré). Seul l'ordre des choix compte, peu importe les valeurs. Deux choix peuvent avoir la même valeur. Modified: trunk/pollen-votecounting-coombs/src/main/java/org/chorem/pollen/votecounting/CoombsVoteCounting.java =================================================================== --- trunk/pollen-votecounting-coombs/src/main/java/org/chorem/pollen/votecounting/CoombsVoteCounting.java 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-coombs/src/main/java/org/chorem/pollen/votecounting/CoombsVoteCounting.java 2012-09-29 13:06:12 UTC (rev 3709) @@ -32,8 +32,12 @@ } @Override - public String getVoteValueNotValidMessage(Locale locale) { - return l_(locale, "pollen.error.vote.invalidCoombsVoteValue"); + public String getVoteValueNotValidMessage(Locale locale, + String choiceName, + String voteValue) { + return l_(locale, "pollen.error.vote.invalidCoombsVoteValue", + choiceName, + voteValue); } @Override Copied: trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-coombs_en_GB.properties (from rev 3708, trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-strategy-coombs_en_GB.properties) =================================================================== --- trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-coombs_en_GB.properties (rev 0) +++ trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-coombs_en_GB.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -0,0 +1,3 @@ +pollen.error.vote.invalidCoombsVoteValue=The value '%s' of vote for choice %s is not valid, only integer values are authorized. +pollen.voteCountingType.coombs=Coombs +pollen.voteCountingType.coombs.help=Rank choices by preference order from 1 to N (1\=favorite). Only the rank is taken into account, not the values. Two choices can have the same value. Property changes on: trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-coombs_en_GB.properties ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Copied: trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-coombs_fr_FR.properties (from rev 3708, trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-strategy-coombs_fr_FR.properties) =================================================================== --- trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-coombs_fr_FR.properties (rev 0) +++ trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-coombs_fr_FR.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -0,0 +1,3 @@ +pollen.error.vote.invalidCoombsVoteValue=La valeur du vote '%s' pour le choix %s n'est pas correcte, seul des valeurs entières sont autorisées. +pollen.voteCountingType.coombs=Coombs +pollen.voteCountingType.coombs.help=Classer les choix par ordre de préférence de 1 à N (1\=préféré). Seul l'ordre des choix compte, peu importe les valeurs. Deux choix peuvent avoir la même valeur. Property changes on: trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-coombs_fr_FR.properties ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Deleted: trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-strategy-coombs_en_GB.properties =================================================================== --- trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-strategy-coombs_en_GB.properties 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-strategy-coombs_en_GB.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -1,3 +0,0 @@ -pollen.error.vote.invalidCoombsVoteValue= -pollen.voteCountingType.coombs=Coombs -pollen.voteCountingType.coombs.help=Rank choices by preference order from 1 to N (1\=favorite). Only the rank is taken into account, not the values. Two choices can have the same value. Deleted: trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-strategy-coombs_fr_FR.properties =================================================================== --- trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-strategy-coombs_fr_FR.properties 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-strategy-coombs_fr_FR.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -1,3 +0,0 @@ -pollen.error.vote.invalidCoombsVoteValue= -pollen.voteCountingType.coombs=Coombs -pollen.voteCountingType.coombs.help=Classer les choix par ordre de préférence de 1 à N (1\=préféré). Seul l'ordre des choix compte, peu importe les valeurs. Deux choix peuvent avoir la même valeur. Modified: trunk/pollen-votecounting-instant-runoff/src/main/java/org/chorem/pollen/votecounting/InstantRunoffVoteCounting.java =================================================================== --- trunk/pollen-votecounting-instant-runoff/src/main/java/org/chorem/pollen/votecounting/InstantRunoffVoteCounting.java 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-instant-runoff/src/main/java/org/chorem/pollen/votecounting/InstantRunoffVoteCounting.java 2012-09-29 13:06:12 UTC (rev 3709) @@ -32,8 +32,12 @@ } @Override - public String getVoteValueNotValidMessage(Locale locale) { - return l_(locale, "pollen.error.vote.invalidInstantRunoffVoteValue"); + public String getVoteValueNotValidMessage(Locale locale, + String choiceName, + String voteValue) { + return l_(locale, "pollen.error.vote.invalidInstantRunoffVoteValue", + choiceName, + voteValue); } @Override Copied: trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-instant-runoff_en_GB.properties (from rev 3708, trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-strategy-instant-runoff_en_GB.properties) =================================================================== --- trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-instant-runoff_en_GB.properties (rev 0) +++ trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-instant-runoff_en_GB.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -0,0 +1,3 @@ +pollen.error.vote.invalidInstantRunoffVoteValue=The value '%s' of vote for choice %s is not valid, only integer values are authorized. +pollen.voteCountingType.instantRunoff=Instant Runoff +pollen.voteCountingType.instantRunoff.help=Rank choices by preference order from 1 to N (1\=favorite). Only the rank is taken into account, not the values. Two choices can have the same value. Property changes on: trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-instant-runoff_en_GB.properties ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Copied: trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-instant-runoff_fr_FR.properties (from rev 3708, trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-strategy-instant-runoff_fr_FR.properties) =================================================================== --- trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-instant-runoff_fr_FR.properties (rev 0) +++ trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-instant-runoff_fr_FR.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -0,0 +1,3 @@ +pollen.error.vote.invalidInstantRunoffVoteValue=La valeur du vote '%s' pour le choix %s n'est pas correcte, seul des valeurs entières sont autorisées. +pollen.voteCountingType.instantRunoff=Vote alternatif +pollen.voteCountingType.instantRunoff.help=Classer les choix par ordre de préférence de 1 à N (1\=préféré). Seul l'ordre des choix compte, peu importe les valeurs. Deux choix peuvent avoir la même valeur. Property changes on: trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-instant-runoff_fr_FR.properties ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Deleted: trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-strategy-instant-runoff_en_GB.properties =================================================================== --- trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-strategy-instant-runoff_en_GB.properties 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-strategy-instant-runoff_en_GB.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -1,3 +0,0 @@ -pollen.error.vote.invalidInstantRunoffVoteValue= -pollen.voteCountingType.instantRunoff=Instant Runoff -pollen.voteCountingType.instantRunoff.help=Rank choices by preference order from 1 to N (1\=favorite). Only the rank is taken into account, not the values. Two choices can have the same value. Deleted: trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-strategy-instant-runoff_fr_FR.properties =================================================================== --- trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-strategy-instant-runoff_fr_FR.properties 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-strategy-instant-runoff_fr_FR.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -1,3 +0,0 @@ -pollen.error.vote.invalidInstantRunoffVoteValue= -pollen.voteCountingType.instantRunoff=Vote alternatif -pollen.voteCountingType.instantRunoff.help=Classer les choix par ordre de préférence de 1 à N (1\=préféré). Seul l'ordre des choix compte, peu importe les valeurs. Deux choix peuvent avoir la même valeur. Modified: trunk/pollen-votecounting-normal/src/main/java/org/chorem/pollen/votecounting/NormalVoteCounting.java =================================================================== --- trunk/pollen-votecounting-normal/src/main/java/org/chorem/pollen/votecounting/NormalVoteCounting.java 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-normal/src/main/java/org/chorem/pollen/votecounting/NormalVoteCounting.java 2012-09-29 13:06:12 UTC (rev 3709) @@ -57,7 +57,9 @@ } @Override - public String getVoteValueNotValidMessage(Locale locale) { + public String getVoteValueNotValidMessage(Locale locale, + String choiceName, + String voteValue) { // no validation on not null vote value, so no message return null; } Copied: trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-normal_en_GB.properties (from rev 3708, trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-strategy-normal_en_GB.properties) =================================================================== --- trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-normal_en_GB.properties (rev 0) +++ trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-normal_en_GB.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -0,0 +1,2 @@ +pollen.voteCountingType.normal=Normal +pollen.voteCountingType.normal.help=Vote for your favorite choice. Property changes on: trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-normal_en_GB.properties ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Copied: trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-normal_fr_FR.properties (from rev 3708, trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-strategy-normal_fr_FR.properties) =================================================================== --- trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-normal_fr_FR.properties (rev 0) +++ trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-normal_fr_FR.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -0,0 +1,2 @@ +pollen.voteCountingType.normal=Normal +pollen.voteCountingType.normal.help=Voter pour le ou les choix préférés. Property changes on: trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-normal_fr_FR.properties ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Deleted: trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-strategy-normal_en_GB.properties =================================================================== --- trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-strategy-normal_en_GB.properties 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-strategy-normal_en_GB.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -1,2 +0,0 @@ -pollen.voteCountingType.normal=Normal -pollen.voteCountingType.normal.help=Vote for your favorite choice. Deleted: trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-strategy-normal_fr_FR.properties =================================================================== --- trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-strategy-normal_fr_FR.properties 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-strategy-normal_fr_FR.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -1,2 +0,0 @@ -pollen.voteCountingType.normal=Normal -pollen.voteCountingType.normal.help=Voter pour le ou les choix préférés. Modified: trunk/pollen-votecounting-number/src/main/java/org/chorem/pollen/votecounting/NumberVoteCounting.java =================================================================== --- trunk/pollen-votecounting-number/src/main/java/org/chorem/pollen/votecounting/NumberVoteCounting.java 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-number/src/main/java/org/chorem/pollen/votecounting/NumberVoteCounting.java 2012-09-29 13:06:12 UTC (rev 3709) @@ -63,7 +63,9 @@ } @Override - public String getVoteValueNotValidMessage(Locale locale) { + public String getVoteValueNotValidMessage(Locale locale, + String choiceName, + String voteValue) { // no validation on not null vote value, so no message return null; } Copied: trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-number_en_GB.properties (from rev 3708, trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-strategy-number_en_GB.properties) =================================================================== --- trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-number_en_GB.properties (rev 0) +++ trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-number_en_GB.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -0,0 +1,2 @@ +pollen.voteCountingType.number=Number +pollen.voteCountingType.number.help=The answer is free, leave blank or enter a integer. Property changes on: trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-number_en_GB.properties ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Copied: trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-number_fr_FR.properties (from rev 3708, trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-strategy-number_fr_FR.properties) =================================================================== --- trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-number_fr_FR.properties (rev 0) +++ trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-number_fr_FR.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -0,0 +1,2 @@ +pollen.voteCountingType.number=Nombre +pollen.voteCountingType.number.help=La réponse est libre, laissez vide ou entrez un nombre entier Property changes on: trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-number_fr_FR.properties ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Deleted: trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-strategy-number_en_GB.properties =================================================================== --- trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-strategy-number_en_GB.properties 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-strategy-number_en_GB.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -1,2 +0,0 @@ -pollen.voteCountingType.number=Number -pollen.voteCountingType.number.help=The answer is free, leave blank or enter a integer. Deleted: trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-strategy-number_fr_FR.properties =================================================================== --- trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-strategy-number_fr_FR.properties 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-strategy-number_fr_FR.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -1,2 +0,0 @@ -pollen.voteCountingType.number=Nombre -pollen.voteCountingType.number.help=La réponse est libre, laissez vide ou entrez un nombre entier Modified: trunk/pollen-votecounting-percentage/src/main/java/org/chorem/pollen/votecounting/PercentageVoteCounting.java =================================================================== --- trunk/pollen-votecounting-percentage/src/main/java/org/chorem/pollen/votecounting/PercentageVoteCounting.java 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-percentage/src/main/java/org/chorem/pollen/votecounting/PercentageVoteCounting.java 2012-09-29 13:06:12 UTC (rev 3709) @@ -58,7 +58,9 @@ } @Override - public String getVoteValueNotValidMessage(Locale locale) { + public String getVoteValueNotValidMessage(Locale locale, + String choiceName, + String voteValue) { // no validation on not null vote value, so no message return null; } Copied: trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-percentage_en_GB.properties (from rev 3708, trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-strategy-percentage_en_GB.properties) =================================================================== --- trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-percentage_en_GB.properties (rev 0) +++ trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-percentage_en_GB.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -0,0 +1,3 @@ +pollen.error.vote.percentage= +pollen.voteCountingType.percentage=Percentage +pollen.voteCountingType.percentage.help=Allocate choices to get a 100%% total. Property changes on: trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-percentage_en_GB.properties ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Copied: trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-percentage_fr_FR.properties (from rev 3708, trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-strategy-percentage_fr_FR.properties) =================================================================== --- trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-percentage_fr_FR.properties (rev 0) +++ trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-percentage_fr_FR.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -0,0 +1,3 @@ +pollen.error.vote.percentage= +pollen.voteCountingType.percentage=Pourcentage +pollen.voteCountingType.percentage.help=Répartir les choix de manière à obtenir 100%% au total. Property changes on: trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-percentage_fr_FR.properties ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Deleted: trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-strategy-percentage_en_GB.properties =================================================================== --- trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-strategy-percentage_en_GB.properties 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-strategy-percentage_en_GB.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -1,3 +0,0 @@ -pollen.error.vote.percentage= -pollen.voteCountingType.percentage=Percentage -pollen.voteCountingType.percentage.help=Allocate choices to get a 100%% total. Deleted: trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-strategy-percentage_fr_FR.properties =================================================================== --- trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-strategy-percentage_fr_FR.properties 2012-09-29 12:36:25 UTC (rev 3708) +++ trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-strategy-percentage_fr_FR.properties 2012-09-29 13:06:12 UTC (rev 3709) @@ -1,3 +0,0 @@ -pollen.error.vote.percentage= -pollen.voteCountingType.percentage=Pourcentage -pollen.voteCountingType.percentage.help=Répartir les choix de manière à obtenir 100%% au total.
participants (1)
-
tchemit@users.chorem.org