Author: tchemit Date: 2012-10-01 07:11:10 +0200 (Mon, 01 Oct 2012) New Revision: 3715 Url: http://chorem.org/repositories/revision/pollen/3715 Log: refs #590: Refactor votecounting module (add help on form + review api) Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/ResultForPoll.java trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/form/AbstractPollForm.java trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/vote/AbstractVoteAction.java trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollForm.jsp trunk/pollen-votecounting-api/src/main/java/org/chorem/pollen/votecounting/AbstractVoteCounting.java trunk/pollen-votecounting-api/src/main/java/org/chorem/pollen/votecounting/VoteCounting.java trunk/pollen-votecounting-api/src/main/java/org/chorem/pollen/votecounting/VoteCountingFactory.java trunk/pollen-votecounting-borda/src/main/java/org/chorem/pollen/votecounting/BordaVoteCounting.java 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/java/org/chorem/pollen/votecounting/CondorcetVoteCounting.java 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/java/org/chorem/pollen/votecounting/CoombsVoteCounting.java 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/java/org/chorem/pollen/votecounting/InstantRunoffVoteCounting.java 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/java/org/chorem/pollen/votecounting/NormalVoteCounting.java 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/java/org/chorem/pollen/votecounting/NumberVoteCounting.java 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/java/org/chorem/pollen/votecounting/PercentageVoteCounting.java 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 Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/ResultForPoll.java =================================================================== --- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/ResultForPoll.java 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/ResultForPoll.java 2012-10-01 05:11:10 UTC (rev 3715) @@ -132,13 +132,13 @@ public String getVoteCountingTypeName() { VoteCounting voteCounting = getVoteCounting(getPoll()); - String result = voteCounting.getStrategyName(getLocale()); + String result = voteCounting.getName(getLocale()); return result; } public String getVoteCountingTypeHelp() { VoteCounting voteCounting = getVoteCounting(getPoll()); - String result = voteCounting.getStrategyHelp(getLocale()); + String result = voteCounting.getShortHelp(getLocale()); return result; } Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/form/AbstractPollForm.java =================================================================== --- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/form/AbstractPollForm.java 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/form/AbstractPollForm.java 2012-10-01 05:11:10 UTC (rev 3715) @@ -113,6 +113,8 @@ private Map<String, String> voteCountingTypes; + private Map<String, String> voteCountingTypesHelp; + private Map<String, String> choiceTypes; private Map<String, String> pollVoteVisibilities; @@ -457,7 +459,7 @@ poll.addChoice(choice); } - if (!isFreePoll()) { + if (!poll.isPollFree()) { for (Integer index : votingLists.keySet()) { VotingList votingList = votingLists.get(index); @@ -569,6 +571,7 @@ return result; } + @Override public PollUri getPollUri() { return pollUri; } @@ -657,15 +660,6 @@ this.reminderHourCountdown = reminderHourCountdown; } - public boolean isFreePoll() { - return poll.isPollFree(); - } - - public boolean isGroupPoll() { - PollType pollType = poll.getPollType(); - return pollType == PollType.GROUP; - } - public boolean isPollCommentVisible() { PollCommentVisibility pollCommentVisibility = poll.getPollCommentVisibility(); @@ -711,15 +705,8 @@ } } - public String getVoteCountingHelp() { - - StringBuilder builder = new StringBuilder(); - VoteCountingFactory voteCountingFactory = getVoteCountingFactory(); - for (VoteCounting strategy : voteCountingFactory) { - String strategyHelp = strategy.getStrategyHelp(getLocale()); - builder.append(strategyHelp).append("<br/><br/>"); - } - return builder.toString(); + public String getVoteCountingHelp(String type) { + return voteCountingTypesHelp.get(type); } public void prepareFormPage() throws Exception { @@ -730,11 +717,14 @@ choiceTypes = decorateToName(ChoiceType.values()); pollVoteVisibilities = decorateToName(PollVoteVisibility.values()); voteCountingTypes = Maps.newTreeMap(); + voteCountingTypesHelp = Maps.newTreeMap(); VoteCountingFactory voteCountingFactory = getVoteCountingFactory(); for (VoteCounting strategy : voteCountingFactory) { - String strategyHelp = strategy.getStrategyName(getLocale()); - voteCountingTypes.put(strategy.getId() + "", strategyHelp); + String strategyName = strategy.getName(getLocale()); + String strategyHelp = strategy.getHelp(getLocale()); + voteCountingTypes.put(strategy.getId() + "", strategyName); + voteCountingTypesHelp.put(strategy.getId() + "", strategyHelp); } textChoices = Lists.newArrayList(); @@ -962,7 +952,7 @@ // -- VotingList -- // - if (isFreePoll()) { + if (poll.isPollFree()) { // nothing to validate @@ -1069,7 +1059,7 @@ String fieldNamePrefix = "votingList" + votingListType + "_" + votingListNumber; - if (isGroupPoll()) { + if (poll.isPollGroup()) { // group poll Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/vote/AbstractVoteAction.java =================================================================== --- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/vote/AbstractVoteAction.java 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/vote/AbstractVoteAction.java 2012-10-01 05:11:10 UTC (rev 3715) @@ -170,13 +170,13 @@ public String getVoteCountingTypeName() { VoteCounting voteCounting = getVoteCounting(getPoll()); - String result = voteCounting.getStrategyName(getLocale()); + String result = voteCounting.getName(getLocale()); return result; } public String getVoteCountingTypeHelp() { VoteCounting voteCounting = getVoteCounting(getPoll()); - String result = voteCounting.getStrategyHelp(getLocale()); + String result = voteCounting.getShortHelp(getLocale()); return result; } Modified: trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties =================================================================== --- trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties 2012-10-01 05:11:10 UTC (rev 3715) @@ -163,6 +163,7 @@ pollen.common.voteAction=Vote pollen.common.voteAnonymous=Anonymous vote pollen.common.voteCountingType=Response type +pollen.common.voteCountingTypeHelp=Poll response type pollen.common.voteNbVotes=%d existing votes pollen.common.voteNoVote=No existing vote pollen.common.voteOneVote=1 existing vote Modified: trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties =================================================================== --- trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties 2012-10-01 05:11:10 UTC (rev 3715) @@ -165,6 +165,7 @@ pollen.common.voteAnonymous=Vote anonyme pollen.common.voteCountingType=Type de Réponse pollen.common.voteCountingType.help=Normal \: sélection de 1 ou n choix parmis les choix possibles <br/><br/> Pourcentage \: attribution d'un pourcentage à chaque choix <br/><br/> Condorcet \: classement des choix par ordre de préférence <br/><br/> Nombre \: Réponse libre. Fait la somme et la moyenne des nombres +pollen.common.voteCountingTypeHelp=Type de réponse du sondage pollen.common.voteNbVotes=%d votes existants pollen.common.voteNoVote=Pas de vote existant pollen.common.voteOneVote=1 vote existant Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollForm.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollForm.jsp 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollForm.jsp 2012-10-01 05:11:10 UTC (rev 3715) @@ -59,9 +59,28 @@ pollType:'<s:property value="%{poll.pollType.name()}"/>', confirmCloseTitle:"<s:text name='pollen.title.close.poll'/>", confirmCloseUrl:'<s:url action="confirmClosePoll/%{poll.adminId}" namespace="/poll"/>', - confirmCloseRedirectUrl:'<s:url action="summary/%{poll.adminId}" namespace="/poll"/>' + confirmCloseRedirectUrl:'<s:url action="summary/%{poll.adminId}" namespace="/poll"/>', + voteCountingTypeHelp:{} } ); + $(document).ready(function () { + + var voteCountingTypeHelp = $(document).data('voteCountingTypeHelp'); + <s:iterator value="voteCountingTypes" status="status"> + voteCountingTypeHelp['<s:property value="#status.index"/>'] = + "<s:property value='%{getVoteCountingHelp(#status.index)}' escapeHtml="false"/>"; + </s:iterator> + + function displayVoteCountingHelp(type) { + var help= $(document).data('voteCountingTypeHelp'); + console.info("Change vct to "+type+" : "+help[type]); + $('#voteCountingHelp').html(help[type]); + } + $('[name="poll.voteCountingType"]').change(function () { + displayVoteCountingHelp(this.value); + }); + displayVoteCountingHelp('<s:property value="poll.voteCountingType"/>'); + }); </script> <script type="text/javascript" @@ -109,13 +128,15 @@ <fieldset class="disableForVoteStarted"> <legend> - <s:text name="pollen.common.voteCountingType"/> + <s:text name='pollen.common.voteCountingType'/> <img src="<s:url value='/img/tooltip.png'/>" class="tooltip" - alt="<s:property value='voteCountingHelp'/>" - title="<s:property value='voteCountingHelp'/>"/> + alt="<s:text name='pollen.common.voteCountingTypeHelp'/>" + title="<s:text name='pollen.common.voteCountingTypeHelp'/>"/> </legend> <s:radio key='poll.voteCountingType' list="voteCountingTypes" label='' theme="simple"/> + <hr/> + <p id="voteCountingHelp"></p> </fieldset> <br/> @@ -355,7 +376,7 @@ var item = $(ui.item); var container = item.data('choiceType'); var choiceNumber = item.data('choiceNumber'); - console.info('Moved ' + container + ' -- ' + choiceNumber); + //console.info('Moved ' + container + ' -- ' + choiceNumber); reorder(container); } }); Modified: trunk/pollen-votecounting-api/src/main/java/org/chorem/pollen/votecounting/AbstractVoteCounting.java =================================================================== --- trunk/pollen-votecounting-api/src/main/java/org/chorem/pollen/votecounting/AbstractVoteCounting.java 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-api/src/main/java/org/chorem/pollen/votecounting/AbstractVoteCounting.java 2012-10-01 05:11:10 UTC (rev 3715) @@ -44,21 +44,26 @@ /** I18n key for name of this vote counting type. */ protected final String i18nName; + /** I18n Key for short help of this vote counting type. */ + protected final String i18nShortHelp; + /** I18n Key for help of this vote counting type. */ protected final String i18nHelp; protected AbstractVoteCounting(int id, - Class<S> strategyType, - String i18nName, - String i18nHelp) { + Class<S> strategyType, + String i18nName, + String i18nShortHelp, + String i18nHelp) { this.id = id; this.strategyType = strategyType; this.i18nName = i18nName; + this.i18nShortHelp = i18nShortHelp; this.i18nHelp = i18nHelp; } @Override - public final S newVoteCountingStrategy() { + public final S newStrategy() { try { return strategyType.newInstance(); } catch (Exception e) { @@ -67,32 +72,28 @@ } @Override - public final String getStrategyName(Locale locale) { - String result = l_(locale, getI18nName()); + public final String getName(Locale locale) { + String result = l_(locale, i18nName); return result; } @Override - public final String getStrategyHelp(Locale locale) { - String voteName = l_(locale, getI18nName()); - String voteHelp = l_(locale, getI18nHelp()); - String result = l_(locale, "pollen.voteCountingType.help", voteName, voteHelp); + public final String getShortHelp(Locale locale) { + String voteName = l_(locale, i18nName); + String voteHelp = l_(locale, i18nShortHelp); + String result = + l_(locale, "pollen.voteCountingType.help", voteName, voteHelp); return result; } @Override - public final int getId() { - return id; + public final String getHelp(Locale locale) { + String result = l_(locale, i18nHelp); + return result; } @Override - public final String getI18nName() { - return i18nName; + public final int getId() { + return id; } - - @Override - public final String getI18nHelp() { - return i18nHelp; - } - } 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-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-api/src/main/java/org/chorem/pollen/votecounting/VoteCounting.java 2012-10-01 05:11:10 UTC (rev 3715) @@ -41,7 +41,7 @@ * @return a new instance of vote counting strategy for this type * of vote counting. */ - S newVoteCountingStrategy(); + S newStrategy(); /** * Obtains the unique id of this strategy. @@ -51,20 +51,6 @@ int getId(); /** - * Obtains the i18n name of this strategy. - * - * @return the i18n name of this strategy. - */ - String getI18nName(); - - /** - * Obtains the i18n help of this strategy. - * - * @return the i18n help of this strategy. - */ - String getI18nHelp(); - - /** * Get the value to display for a given vote value in the vote page. * * @param voteValue the vote value to display @@ -86,15 +72,23 @@ * @param locale the locale used to render the strategy name * @return the localized vote counting strategy name */ - String getStrategyName(Locale locale); + String getName(Locale locale); /** + * Get the vote counting short help to display in UI. + * + * @param locale the locale used to render the strategy name + * @return the localized vote counting short help + */ + String getShortHelp(Locale locale); + + /** * Get the vote counting strategy help to display in UI. * * @param locale the locale used to render the strategy name * @return the localized vote counting strategy help */ - String getStrategyHelp(Locale locale); + String getHelp(Locale locale); /** * Tests if the given vote value is valid. Modified: trunk/pollen-votecounting-api/src/main/java/org/chorem/pollen/votecounting/VoteCountingFactory.java =================================================================== --- trunk/pollen-votecounting-api/src/main/java/org/chorem/pollen/votecounting/VoteCountingFactory.java 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-api/src/main/java/org/chorem/pollen/votecounting/VoteCountingFactory.java 2012-10-01 05:11:10 UTC (rev 3715) @@ -28,6 +28,7 @@ import org.apache.commons.logging.LogFactory; import java.util.Iterator; +import java.util.Locale; import java.util.Map; import java.util.ServiceLoader; @@ -54,19 +55,22 @@ ServiceLoader<VoteCounting> loader = ServiceLoader.load(VoteCounting.class); + Locale l = Locale.getDefault(); + for (VoteCounting strategy : loader) { int id = strategy.getId(); + String voteCountingName = strategy.getName(l); if (voteCountings.containsKey(id)) { throw new IllegalStateException( "Strategy [" + - strategy.getI18nName() + "] with id " + id + + voteCountingName + "] with id " + id + ", can not be used since the id is already used " + - "by strategy [" + voteCountings.get(id).getI18nName() + "] "); + "by strategy [" + voteCountings.get(id).getName(l) + "] "); } if (log.isInfoEnabled()) { log.info("Detected strategy [" + id + "-" + - strategy.getI18nName() + "] : " + + voteCountingName + "] : " + strategy.getClass().getName()); } voteCountings.put(id, strategy); 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-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-borda/src/main/java/org/chorem/pollen/votecounting/BordaVoteCounting.java 2012-10-01 05:11:10 UTC (rev 3715) @@ -44,6 +44,7 @@ super(ID, BordaVoteCountingStrategy.class, n_("pollen.voteCountingType.borda"), + n_("pollen.voteCountingType.borda.shortHelp"), n_("pollen.voteCountingType.borda.help") ); } Modified: 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_en_GB.properties 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-borda_en_GB.properties 2012-10-01 05:11:10 UTC (rev 3715) @@ -1,3 +1,4 @@ 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. +pollen.voteCountingType.borda.help=Rank choices by preference order from 1 to N (1\=favorite).<br/>Only the rank is taken into account, not the values. Two choices can have the same value.<br/><a href\='http\://fr.wikipedia.org/wiki/M%C3%A9thode_Borda' target\='\#doc'>More about this method</a> +pollen.voteCountingType.borda.shortHelp=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. Modified: trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-borda_fr_FR.properties =================================================================== --- trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-borda_fr_FR.properties 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-borda/src/main/resources/i18n/pollen-votecounting-borda_fr_FR.properties 2012-10-01 05:11:10 UTC (rev 3715) @@ -1,3 +1,4 @@ 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. +pollen.voteCountingType.borda.help=Classer les choix par ordre de préférence de 1 à N (1\=préféré).<br/> Seul l'ordre des choix compte, peu importe les valeurs. Deux choix peuvent avoir la même valeur.<br/><a href\='http\://fr.wikipedia.org/wiki/M%C3%A9thode_Borda' target\='\#doc'>Pour en savoir plus</a> +pollen.voteCountingType.borda.shortHelp=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-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-condorcet/src/main/java/org/chorem/pollen/votecounting/CondorcetVoteCounting.java 2012-10-01 05:11:10 UTC (rev 3715) @@ -44,6 +44,7 @@ super(ID, CondorcetVoteCountingStrategy.class, n_("pollen.voteCountingType.condorcet"), + n_("pollen.voteCountingType.condorcet.shortHelp"), n_("pollen.voteCountingType.condorcet.help") ); } Modified: 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_en_GB.properties 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-condorcet_en_GB.properties 2012-10-01 05:11:10 UTC (rev 3715) @@ -1,3 +1,4 @@ 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. +pollen.voteCountingType.condorcet.help=Rank choices by preference order from 1 to N (1\=favorite).<br/>Only the rank is taken into account, not the values. Two choices can have the same value.<br/><a href\='http\://fr.wikipedia.org/wiki/M%C3%A9thode_Condorcet' target\='\#doc'>More about this method</a> +pollen.voteCountingType.condorcet.shortHelp=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. Modified: trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-condorcet_fr_FR.properties =================================================================== --- trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-condorcet_fr_FR.properties 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-condorcet/src/main/resources/i18n/pollen-votecounting-condorcet_fr_FR.properties 2012-10-01 05:11:10 UTC (rev 3715) @@ -1,3 +1,4 @@ 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. +pollen.voteCountingType.condorcet.help=Classer les choix par ordre de préférence de 1 à N (1\=préféré).<br/>Seul l'ordre des choix compte, peu importe les valeurs. Deux choix peuvent avoir la même valeur.<br/><a href\='http\://fr.wikipedia.org/wiki/M%C3%A9thode_Condorcet' target\='\#doc'>Pour en savoir plus</a> +pollen.voteCountingType.condorcet.shortHelp=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-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-coombs/src/main/java/org/chorem/pollen/votecounting/CoombsVoteCounting.java 2012-10-01 05:11:10 UTC (rev 3715) @@ -44,6 +44,7 @@ super(ID, CoombsVoteCountingStrategy.class, n_("pollen.voteCountingType.coombs"), + n_("pollen.voteCountingType.coombs.shortHelp"), n_("pollen.voteCountingType.coombs.help") ); } Modified: 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_en_GB.properties 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-coombs_en_GB.properties 2012-10-01 05:11:10 UTC (rev 3715) @@ -1,3 +1,4 @@ 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. +pollen.voteCountingType.coombs.help=Rank choices by preference order from 1 to N (1\=favorite).<br/>Only the rank is taken into account, not the values. Two choices can have the same value.<br/><a href\='http\://fr.wikipedia.org/wiki/M%C3%A9thode_de_Coombs' target\='\#doc'>More about this method</a> +pollen.voteCountingType.coombs.shortHelp=Rank choices by preference order from 1 to N (1\=favorite).<br/>Only the rank is taken into account, not the values. Two choices can have the same value. Modified: trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-coombs_fr_FR.properties =================================================================== --- trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-coombs_fr_FR.properties 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-coombs/src/main/resources/i18n/pollen-votecounting-coombs_fr_FR.properties 2012-10-01 05:11:10 UTC (rev 3715) @@ -1,3 +1,4 @@ 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. +pollen.voteCountingType.coombs.help=Classer les choix par ordre de préférence de 1 à N (1\=préféré).<br/>Seul l'ordre des choix compte, peu importe les valeurs. Deux choix peuvent avoir la même valeur.<br/><a href\='http\://fr.wikipedia.org/wiki/M%C3%A9thode_de_Coombs' target\='\#doc'>Pour en savoir plus</a> +pollen.voteCountingType.coombs.shortHelp=Classer les choix par ordre de préférence de 1 à N (1\=préféré).<br/>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-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-instant-runoff/src/main/java/org/chorem/pollen/votecounting/InstantRunoffVoteCounting.java 2012-10-01 05:11:10 UTC (rev 3715) @@ -44,6 +44,7 @@ super(ID, InstantRunoffVoteCountingStrategy.class, n_("pollen.voteCountingType.instantRunoff"), + n_("pollen.voteCountingType.instantRunoff.shortHelp"), n_("pollen.voteCountingType.instantRunoff.help") ); } Modified: 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_en_GB.properties 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-instant-runoff_en_GB.properties 2012-10-01 05:11:10 UTC (rev 3715) @@ -1,3 +1,4 @@ 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. +pollen.voteCountingType.instantRunoff.help=Rank choices by preference order from 1 to N (1\=favorite).<br/>Only the rank is taken into account, not the values. Two choices can have the same value.<br/><a href\='http\://fr.wikipedia.org/wiki/Vote_alternatif' target\='\#doc'>More about this method</a> +pollen.voteCountingType.instantRunoff.shortHelp=Rank choices by preference order from 1 to N (1\=favorite).<br/>Only the rank is taken into account, not the values. Two choices can have the same value. Modified: trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-instant-runoff_fr_FR.properties =================================================================== --- trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-instant-runoff_fr_FR.properties 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-instant-runoff/src/main/resources/i18n/pollen-votecounting-instant-runoff_fr_FR.properties 2012-10-01 05:11:10 UTC (rev 3715) @@ -1,3 +1,4 @@ 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. +pollen.voteCountingType.instantRunoff.help=Classer les choix par ordre de préférence de 1 à N (1\=préféré).<br/>Seul l'ordre des choix compte, peu importe les valeurs. Deux choix peuvent avoir la même valeur.<br/><a href\='http\://fr.wikipedia.org/wiki/Vote_alternatif' target\='\#doc'>Pour en savoir plus</a> +pollen.voteCountingType.instantRunoff.shortHelp=Classer les choix par ordre de préférence de 1 à N (1\=préféré).<br/>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-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-normal/src/main/java/org/chorem/pollen/votecounting/NormalVoteCounting.java 2012-10-01 05:11:10 UTC (rev 3715) @@ -43,6 +43,7 @@ super(ID, NormalVoteCountingStrategy.class, n_("pollen.voteCountingType.normal"), + n_("pollen.voteCountingType.normal.shortHelp"), n_("pollen.voteCountingType.normal.help") ); } Modified: 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_en_GB.properties 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-normal_en_GB.properties 2012-10-01 05:11:10 UTC (rev 3715) @@ -1,2 +1,3 @@ pollen.voteCountingType.normal=Normal pollen.voteCountingType.normal.help=Vote for your favorite choice. +pollen.voteCountingType.normal.shortHelp=Vote for your favorite choice. Modified: trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-normal_fr_FR.properties =================================================================== --- trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-normal_fr_FR.properties 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-normal/src/main/resources/i18n/pollen-votecounting-normal_fr_FR.properties 2012-10-01 05:11:10 UTC (rev 3715) @@ -1,2 +1,3 @@ pollen.voteCountingType.normal=Normal pollen.voteCountingType.normal.help=Voter pour le ou les choix préférés. +pollen.voteCountingType.normal.shortHelp=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-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-number/src/main/java/org/chorem/pollen/votecounting/NumberVoteCounting.java 2012-10-01 05:11:10 UTC (rev 3715) @@ -43,6 +43,7 @@ super(ID, NumberVoteCountingStrategy.class, n_("pollen.voteCountingType.number"), + n_("pollen.voteCountingType.number.shortHelp"), n_("pollen.voteCountingType.number.help") ); } Modified: 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_en_GB.properties 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-number_en_GB.properties 2012-10-01 05:11:10 UTC (rev 3715) @@ -1,2 +1,3 @@ pollen.voteCountingType.number=Number pollen.voteCountingType.number.help=The answer is free, leave blank or enter a integer. +pollen.voteCountingType.number.shortHelp=The answer is free, leave blank or enter a integer. Modified: trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-number_fr_FR.properties =================================================================== --- trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-number_fr_FR.properties 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-number/src/main/resources/i18n/pollen-votecounting-number_fr_FR.properties 2012-10-01 05:11:10 UTC (rev 3715) @@ -1,2 +1,3 @@ pollen.voteCountingType.number=Nombre pollen.voteCountingType.number.help=La réponse est libre, laissez vide ou entrez un nombre entier +pollen.voteCountingType.number.shortHelp=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-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-percentage/src/main/java/org/chorem/pollen/votecounting/PercentageVoteCounting.java 2012-10-01 05:11:10 UTC (rev 3715) @@ -44,6 +44,7 @@ super(ID, PercentageVoteCountingStrategy.class, n_("pollen.voteCountingType.percentage"), + n_("pollen.voteCountingType.percentage.shortHelp"), n_("pollen.voteCountingType.percentage.help") ); } Modified: 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_en_GB.properties 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-percentage_en_GB.properties 2012-10-01 05:11:10 UTC (rev 3715) @@ -1,3 +1,4 @@ pollen.error.vote.percentage= pollen.voteCountingType.percentage=Percentage -pollen.voteCountingType.percentage.help=Allocate choices to get a 100%% total. +pollen.voteCountingType.percentage.help=Allocate choices to get a 100% total. +pollen.voteCountingType.percentage.shortHelp=Allocate choices to get a 100% total. Modified: trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-percentage_fr_FR.properties =================================================================== --- trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-percentage_fr_FR.properties 2012-10-01 04:06:59 UTC (rev 3714) +++ trunk/pollen-votecounting-percentage/src/main/resources/i18n/pollen-votecounting-percentage_fr_FR.properties 2012-10-01 05:11:10 UTC (rev 3715) @@ -1,3 +1,4 @@ pollen.error.vote.percentage= pollen.voteCountingType.percentage=Pourcentage -pollen.voteCountingType.percentage.help=Répartir les choix de manière à obtenir 100%% au total. +pollen.voteCountingType.percentage.help=Répartir les choix de manière à obtenir 100% au total. +pollen.voteCountingType.percentage.shortHelp=Répartir les choix de manière à obtenir 100% au total.