This is an automated email from the git hooks/post-receive script. New commit to branch pollen-udpate-1.6 in repository pollen_1.x. See https://gitlab.nuiton.org/None/pollen_1.x.git commit 99587ba6672e589f1154d0f74340a362a3cdcf2b Author: Eric Chatellier <eric.chatellier@gmail.com> Date: Sat Nov 14 09:36:37 2015 +0100 Replace deprecated i18n methods --- .../pollen/business/persistence/ChoiceType.java | 10 ++--- .../persistence/PollCommentVisibility.java | 6 +-- .../pollen/business/persistence/PollType.java | 8 ++-- .../business/persistence/PollVoteVisibility.java | 18 ++++----- .../pollen/services/PollenServiceSupport.java | 8 ++-- .../exceptions/FavoriteListImportException.java | 14 +++---- .../chorem/pollen/services/impl/EmailService.java | 32 ++++++++-------- .../pollen/services/impl/FavoriteService.java | 6 +-- .../pollen/services/impl/PollFeedService.java | 44 +++++++++++----------- .../chorem/pollen/services/impl/PollService.java | 18 ++++----- .../pollen/services/impl/SecurityService.java | 8 ++-- .../chorem/pollen/services/impl/UserService.java | 10 ++--- .../pollen/votecounting/AbstractVoteCounting.java | 14 +++---- .../pollen/votecounting/BordaVoteCounting.java | 14 +++---- .../pollen/votecounting/CondorcetVoteCounting.java | 14 +++---- .../pollen/votecounting/CoombsVoteCounting.java | 14 +++---- .../votecounting/InstantRunoffVoteCounting.java | 14 +++---- .../pollen/votecounting/NormalVoteCounting.java | 10 ++--- .../pollen/votecounting/NumberVoteCounting.java | 10 ++--- .../votecounting/PercentageVoteCounting.java | 14 +++---- 20 files changed, 143 insertions(+), 143 deletions(-) diff --git a/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/ChoiceType.java b/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/ChoiceType.java index 47b5a01..511c6e6 100644 --- a/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/ChoiceType.java +++ b/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/ChoiceType.java @@ -4,7 +4,7 @@ * $Id$ * $HeadURL$ * %% - * Copyright (C) 2009 - 2012 CodeLutin + * Copyright (C) 2009 - 2015 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -22,12 +22,12 @@ */ package org.chorem.pollen.business.persistence; -import static org.nuiton.i18n.I18n.n_; +import static org.nuiton.i18n.I18n.n; public enum ChoiceType implements I18nAble { - TEXT(n_("pollen.choiceType.text")), - DATE(n_("pollen.choiceType.date")), - IMAGE(n_("pollen.choiceType.image")); + TEXT(n("pollen.choiceType.text")), + DATE(n("pollen.choiceType.date")), + IMAGE(n("pollen.choiceType.image")); private final String i18nKey; diff --git a/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/PollCommentVisibility.java b/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/PollCommentVisibility.java index fcf57e4..f47fc69 100644 --- a/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/PollCommentVisibility.java +++ b/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/PollCommentVisibility.java @@ -22,7 +22,7 @@ package org.chorem.pollen.business.persistence; * #L% */ -import static org.nuiton.i18n.I18n.n_; +import static org.nuiton.i18n.I18n.n; /** * Define how comment can be shown in a poll. @@ -33,9 +33,9 @@ import static org.nuiton.i18n.I18n.n_; public enum PollCommentVisibility implements I18nAble { /** Nobody can see comments. */ - NOBODY(n_("pollen.pollCommentVisibilty.nobody")), + NOBODY(n("pollen.pollCommentVisibilty.nobody")), /** Every body can see comments. */ - EVERYBODY(n_("pollen.pollCommentVisibilty.everybody")); + EVERYBODY(n("pollen.pollCommentVisibilty.everybody")); private final String i18nKey; diff --git a/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/PollType.java b/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/PollType.java index ffc733a..9cf5d62 100644 --- a/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/PollType.java +++ b/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/PollType.java @@ -22,13 +22,13 @@ */ package org.chorem.pollen.business.persistence; -import static org.nuiton.i18n.I18n.n_; +import static org.nuiton.i18n.I18n.n; public enum PollType implements I18nAble { - FREE(n_("pollen.pollType.free")), - RESTRICTED(n_("pollen.pollType.restricted")), - GROUP(n_("pollen.pollType.group")); + FREE(n("pollen.pollType.free")), + RESTRICTED(n("pollen.pollType.restricted")), + GROUP(n("pollen.pollType.group")); private final String i18nKey; diff --git a/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/PollVoteVisibility.java b/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/PollVoteVisibility.java index 34fd38c..e25f135 100644 --- a/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/PollVoteVisibility.java +++ b/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/PollVoteVisibility.java @@ -22,7 +22,7 @@ package org.chorem.pollen.business.persistence; * #L% */ -import static org.nuiton.i18n.I18n.n_; +import static org.nuiton.i18n.I18n.n; /** * Define how vote can be visible in a poll. @@ -37,17 +37,17 @@ public enum PollVoteVisibility implements I18nAble { * <p/> * This means every votes are anonymous. */ - NOBODY(n_("pollen.pollVoteVisibilty.nobody"), - n_("pollen.pollVoteVisibilty.nobody.help")), + NOBODY(n("pollen.pollVoteVisibilty.nobody"), + n("pollen.pollVoteVisibilty.nobody.help")), /** Only creator (or Pollen adin) can see votes. */ - CREATOR_ONLY(n_("pollen.pollVoteVisibilty.creatorOnly"), - n_("pollen.pollVoteVisibilty.creatorOnly.help")), + CREATOR_ONLY(n("pollen.pollVoteVisibilty.creatorOnly"), + n("pollen.pollVoteVisibilty.creatorOnly.help")), /** Only participant of poll can see votes. */ - PARTICIPANT_ONLY(n_("pollen.pollVoteVisibilty.participantOnly"), - n_("pollen.pollVoteVisibilty.participantOnly.help")), + PARTICIPANT_ONLY(n("pollen.pollVoteVisibilty.participantOnly"), + n("pollen.pollVoteVisibilty.participantOnly.help")), /** Every body can see votes. */ - EVERYBODY(n_("pollen.pollVoteVisibilty.everybody"), - n_("pollen.pollVoteVisibilty.everybody.help")); + EVERYBODY(n("pollen.pollVoteVisibilty.everybody"), + n("pollen.pollVoteVisibilty.everybody.help")); private final String i18nKey; diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceSupport.java b/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceSupport.java index 058249a..7d74d07 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceSupport.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceSupport.java @@ -4,7 +4,7 @@ * $Id$ * $HeadURL$ * %% - * Copyright (C) 2009 - 2012 CodeLutin, Tony Chemit + * Copyright (C) 2009 - 2015 CodeLutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -38,7 +38,7 @@ import java.util.Date; import java.util.List; import java.util.Locale; -import static org.nuiton.i18n.I18n.l_; +import static org.nuiton.i18n.I18n.l; /** * @author tchemit <chemit@codelutin.com> @@ -112,12 +112,12 @@ public class PollenServiceSupport implements PollenService { } public String getDateTimePattern() { - String result = l_(serviceContext.getLocale(), "pollen.common.dateTimePattern"); + String result = l(serviceContext.getLocale(), "pollen.common.dateTimePattern"); return result; } public String getDatePattern() { - String result = l_(serviceContext.getLocale(), "pollen.common.datePattern"); + String result = l(serviceContext.getLocale(), "pollen.common.datePattern"); return result; } diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/exceptions/FavoriteListImportException.java b/pollen-services/src/main/java/org/chorem/pollen/services/exceptions/FavoriteListImportException.java index fffacff..a820b21 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/exceptions/FavoriteListImportException.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/exceptions/FavoriteListImportException.java @@ -4,7 +4,7 @@ * $Id$ * $HeadURL$ * %% - * Copyright (C) 2009 - 2012 CodeLutin, Tony Chemit + * Copyright (C) 2009 - 2015 CodeLutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -24,9 +24,9 @@ package org.chorem.pollen.services.exceptions; import java.util.Locale; -import static org.nuiton.i18n.I18n._; -import static org.nuiton.i18n.I18n.l_; -import static org.nuiton.i18n.I18n.n_; +import static org.nuiton.i18n.I18n.t; +import static org.nuiton.i18n.I18n.l; +import static org.nuiton.i18n.I18n.n; /** * Exception during favorite list import. There is @@ -38,14 +38,14 @@ public class FavoriteListImportException extends Exception { private static final long serialVersionUID = 1L; - private static final String I18N_KEY = n_("pollen.error.import"); + private static final String I18N_KEY = n("pollen.error.import"); private String importName; private String causeMessage; public FavoriteListImportException(String importName, String causeMessage, Throwable cause) { - super(_(I18N_KEY, importName, causeMessage), cause); + super(t(I18N_KEY, importName, causeMessage), cause); this.importName = importName; this.causeMessage = causeMessage; } @@ -76,7 +76,7 @@ public class FavoriteListImportException extends Exception { result = getMessage(); } else { - result = l_(locale, I18N_KEY, getImportName(), getCauseMessage()); + result = l(locale, I18N_KEY, getImportName(), getCauseMessage()); } return result; } diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/impl/EmailService.java b/pollen-services/src/main/java/org/chorem/pollen/services/impl/EmailService.java index de4ed88..d0e6bf1 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/impl/EmailService.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/impl/EmailService.java @@ -4,7 +4,7 @@ * $Id$ * $HeadURL$ * %% - * Copyright (C) 2009 - 2012 CodeLutin, Tony Chemit + * Copyright (C) 2009 - 2015 CodeLutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -42,7 +42,7 @@ import org.nuiton.util.StringUtil; import java.util.List; import java.util.Locale; -import static org.nuiton.i18n.I18n.l_; +import static org.nuiton.i18n.I18n.l; public class EmailService extends PollenServiceSupport { @@ -55,9 +55,9 @@ public class EmailService extends PollenServiceSupport { StringUtil.isEmail(user.getEmail())) { Locale locale = getLocale(); - String subject = l_(locale, "pollen.email.userRegister.subject", + String subject = l(locale, "pollen.email.userRegister.subject", user.getLogin()); - String content = l_(locale, "pollen.email.userRegister.content", + String content = l(locale, "pollen.email.userRegister.content", user.getDisplayName(), user.getLogin(), user.getPassword(), serviceContext.getApplicationURL()); @@ -76,9 +76,9 @@ public class EmailService extends PollenServiceSupport { Locale locale = getLocale(); - String subject = l_(locale, "pollen.email.lostPassword.subject", + String subject = l(locale, "pollen.email.lostPassword.subject", user.getLogin()); - String content = l_(locale, "pollen.email.lostPassword.content", + String content = l(locale, "pollen.email.lostPassword.content", user.getDisplayName(), user.getLogin(), newPassword, serviceContext.getApplicationURL()); @@ -109,9 +109,9 @@ public class EmailService extends PollenServiceSupport { int nbVotes = poll.sizeVote(); - String subject = l_(locale, "pollen.email.voteEmail.subject", + String subject = l(locale, "pollen.email.voteEmail.subject", pollTitle); - String content = l_(locale, "pollen.email.voteEmail.content", + String content = l(locale, "pollen.email.voteEmail.content", pollTitle, nbVotes, summaryUrl); PollenEmail pollenEmail = createPollenEmail( @@ -139,15 +139,15 @@ public class EmailService extends PollenServiceSupport { String subject, content; if (poll.isPollFree()) { - subject = l_(locale, "pollen.email.createPoll.subject", + subject = l(locale, "pollen.email.createPoll.subject", pollTitle); - content = l_(locale, "pollen.email.createPoll.content", + content = l(locale, "pollen.email.createPoll.content", pollTitle, poll.getPollId(), summaryUrl); } else { - subject = l_(locale, "pollen.email.createRestrictedPoll.subject", + subject = l(locale, "pollen.email.createRestrictedPoll.subject", pollTitle); - content = l_(locale, "pollen.email.createRestrictedPoll.content", + content = l(locale, "pollen.email.createRestrictedPoll.content", pollTitle, summaryUrl); } @@ -212,7 +212,7 @@ public class EmailService extends PollenServiceSupport { List<PollAccount> votingPollAccounts = poll.getPollAccounts(true); if (CollectionUtils.isNotEmpty(votingPollAccounts)) { - String subject = l_(locale, "pollen.email.reminderEmail.subject", + String subject = l(locale, "pollen.email.reminderEmail.subject", pollTitle); List<PollenEmail> emails = Lists.newArrayList(); @@ -221,7 +221,7 @@ public class EmailService extends PollenServiceSupport { PollUrl.newPollUrl(voteURL, account.getAccountId()); String content = - l_(locale, "pollen.email.reminderEmail.content", + l(locale, "pollen.email.reminderEmail.content", pollTitle, account.getVotingId(), accountVoteURL); PollenEmail pollenEmail = createPollenEmail( @@ -239,14 +239,14 @@ public class EmailService extends PollenServiceSupport { PollAccount account, PollUrl voteURL) { - String subject = l_(locale, "pollen.email.votingEmail.subject", + String subject = l(locale, "pollen.email.votingEmail.subject", pollTitle); PollUrl accountVoteURL = PollUrl.newPollUrl(voteURL, account.getAccountId()); String content = - l_(locale, "pollen.email.votingEmail.content", + l(locale, "pollen.email.votingEmail.content", pollTitle, account.getVotingId(), accountVoteURL); PollenEmail result = createPollenEmail( diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/impl/FavoriteService.java b/pollen-services/src/main/java/org/chorem/pollen/services/impl/FavoriteService.java index 001c19d..c94801d 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/impl/FavoriteService.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/impl/FavoriteService.java @@ -4,7 +4,7 @@ * $Id$ * $HeadURL$ * %% - * Copyright (C) 2009 - 2012 CodeLutin, Tony Chemit + * Copyright (C) 2009 - 2015 CodeLutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -64,7 +64,7 @@ import java.util.List; import java.util.Locale; import java.util.Properties; -import static org.nuiton.i18n.I18n.l_; +import static org.nuiton.i18n.I18n.l; public class FavoriteService extends PollenServiceSupport { @@ -401,7 +401,7 @@ public class FavoriteService extends PollenServiceSupport { if (!StringUtil.isEmail(email)) { // email is not valid - String error = l_(locale, "pollen.error.import.invalid.email", lineNumber, email); + String error = l(locale, "pollen.error.import.invalid.email", lineNumber, email); throw new FavoriteListImportException(filename, error, null); } diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollFeedService.java b/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollFeedService.java index 6e2a76e..4d3da98 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollFeedService.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollFeedService.java @@ -4,7 +4,7 @@ * $Id$ * $HeadURL$ * %% - * Copyright (C) 2009 - 2012 CodeLutin, Tony Chemit + * Copyright (C) 2009 - 2015 CodeLutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -53,8 +53,8 @@ import java.io.IOException; import java.io.Writer; import java.util.List; -import static org.nuiton.i18n.I18n._; -import static org.nuiton.i18n.I18n.l_; +import static org.nuiton.i18n.I18n.t; +import static org.nuiton.i18n.I18n.l; /** * Service to manage feed of a poll. @@ -107,10 +107,10 @@ public class PollFeedService extends PollenServiceSupport { public void onPollCreated(Poll poll) { - String title = _("pollen.feed.createPollContent", + String title = t("pollen.feed.createPollContent", poll.getCreator().getVotingId()); - String content = _("pollen.feed.createPollContent", + String content = t("pollen.feed.createPollContent", poll.getDescription()); addFeedEntry(poll, title, content); @@ -119,10 +119,10 @@ public class PollFeedService extends PollenServiceSupport { public void onCommentAdded(Poll poll, Comment comment) { - String title = _("pollen.feed.addCommentTitle", + String title = t("pollen.feed.addCommentTitle", comment.getAuthor()); - String content = _("pollen.feed.addCommentContent", + String content = t("pollen.feed.addCommentContent", comment.getText()); addFeedEntry(poll, title, content); @@ -130,11 +130,11 @@ public class PollFeedService extends PollenServiceSupport { public void onCommentDeleted(Poll poll, Comment comment, String reason) { - String title = _("pollen.feed.deleteCommentTitle", + String title = t("pollen.feed.deleteCommentTitle", comment.getAuthor(), reason); String content = - _("pollen.feed.deleteCommentContent", comment.getText()); + t("pollen.feed.deleteCommentContent", comment.getText()); addFeedEntry(poll, title, content); } @@ -150,14 +150,14 @@ public class PollFeedService extends PollenServiceSupport { if (vote.isAnonymous()) { - userId = _("pollen.common.anonymous"); + userId = t("pollen.common.anonymous"); } else { userId = vote.getPollAccount().getVotingId(); } - String title = _("pollen.feed.addVoteTitle", userId); + String title = t("pollen.feed.addVoteTitle", userId); - String content = _("pollen.feed.addVoteContent", pollResult); + String content = t("pollen.feed.addVoteContent", pollResult); addFeedEntry(poll, title, content); } @@ -173,14 +173,14 @@ public class PollFeedService extends PollenServiceSupport { if (vote.isAnonymous()) { - userId = _("pollen.common.anonymous"); + userId = t("pollen.common.anonymous"); } else { userId = vote.getPollAccount().getVotingId(); } - String title = _("pollen.feed.updateVoteTitle", userId); + String title = t("pollen.feed.updateVoteTitle", userId); - String content = _("pollen.feed.updateVoteContent", pollResult); + String content = t("pollen.feed.updateVoteContent", pollResult); addFeedEntry(poll, title, content); } @@ -195,23 +195,23 @@ public class PollFeedService extends PollenServiceSupport { String userId; if (vote.isAnonymous()) { - userId = _("pollen.common.anonymous"); + userId = t("pollen.common.anonymous"); } else { userId = voteAccount.getVotingId(); } - String title = _("pollen.feed.deleteVoteTitle", userId, reason); + String title = t("pollen.feed.deleteVoteTitle", userId, reason); - String content = _("pollen.feed.deleteVoteContent", pollResult); + String content = t("pollen.feed.deleteVoteContent", pollResult); addFeedEntry(poll, title, content); } public void onChoiceAdded(Poll poll, Choice choice) { - String title = _("pollen.feed.addChoiceTitle", choice.getName()); + String title = t("pollen.feed.addChoiceTitle", choice.getName()); - String content = _("pollen.feed.addChoiceContent", + String content = t("pollen.feed.addChoiceContent", choice.getDescription()); addFeedEntry(poll, title, content); @@ -321,9 +321,9 @@ public class PollFeedService extends PollenServiceSupport { protected SyndFeed createFeed(File file, Poll poll) throws IOException, FeedException { - String title = l_(getLocale(), "pollen.feed.pollTitle", + String title = l(getLocale(), "pollen.feed.pollTitle", poll.getTitle()); - String description = l_(getLocale(), "pollen.feed.pollDescription", + String description = l(getLocale(), "pollen.feed.pollDescription", poll.getDescription()); PollUrlService urlService = newService(PollUrlService.class); diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollService.java b/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollService.java index e8e794b..42e9ca7 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollService.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollService.java @@ -4,7 +4,7 @@ * $Id$ * $HeadURL$ * %% - * Copyright (C) 2009 - 2012 CodeLutin, Tony Chemit + * Copyright (C) 2009 - 2015 CodeLutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -74,7 +74,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import static org.nuiton.i18n.I18n.l_; +import static org.nuiton.i18n.I18n.l; public class PollService extends PollenServiceSupport { @@ -243,12 +243,12 @@ public class PollService extends PollenServiceSupport { ); Locale l = serviceContext.getLocale(); if (poll.getBeginDate() == null) { - map.put(Poll.PROPERTY_BEGIN_DATE, l_(l, "pollen.common.undefined")); + map.put(Poll.PROPERTY_BEGIN_DATE, l(l, "pollen.common.undefined")); } else { map.put(Poll.PROPERTY_BEGIN_DATE, decorateDate(poll.getBeginDate())); } if (poll.getEndDate() == null) { - map.put(Poll.PROPERTY_END_DATE, l_(l, "pollen.common.undefined")); + map.put(Poll.PROPERTY_END_DATE, l(l, "pollen.common.undefined")); } else { map.put(Poll.PROPERTY_END_DATE, decorateDate(poll.getEndDate())); } @@ -265,26 +265,26 @@ public class PollService extends PollenServiceSupport { // can always add choices addingchoiceText = - l_(l, "pollen.common.addingChoicesAlways"); + l(l, "pollen.common.addingChoicesAlways"); } else if (beginDate == null) { // until enddate addingchoiceText = - l_(l, "pollen.common.addingChoicesTo", + l(l, "pollen.common.addingChoicesTo", decorateDate(endDate)); } else if (endDate == null) { // from begin date addingchoiceText = - l_(l, "pollen.common.addingChoicesFrom", + l(l, "pollen.common.addingChoicesFrom", decorateDate(beginDate)); } else { addingchoiceText = - l_(l, "pollen.common.addingChoicesContent", + l(l, "pollen.common.addingChoicesContent", decorateDate(beginDate), decorateDate(endDate)); } } else { - addingchoiceText = l_(l, "pollen.common.unauthorized"); + addingchoiceText = l(l, "pollen.common.unauthorized"); } map.put("addingChoices", addingchoiceText); map.put("id", poll.getTopiaId()); diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/impl/SecurityService.java b/pollen-services/src/main/java/org/chorem/pollen/services/impl/SecurityService.java index e6d7242..db6763c 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/impl/SecurityService.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/impl/SecurityService.java @@ -44,7 +44,7 @@ import java.util.List; import java.util.Set; import static org.chorem.pollen.PollenUserSecurityContext.PollenUserSecurityRole; -import static org.nuiton.i18n.I18n.n_; +import static org.nuiton.i18n.I18n.n; /** * Service to manager security. @@ -132,7 +132,7 @@ public class SecurityService extends PollenServiceSupport { if (!continuousResults && !poll.isClosed()) { // results are not continuous and poll is not closed - return n_("pollen.security.error.poll.not.closed.and.results.not.continuous"); + return n("pollen.security.error.poll.not.closed.and.results.not.continuous"); } if (!publicResults) { @@ -142,7 +142,7 @@ public class SecurityService extends PollenServiceSupport { if (!securityContext.isCreator() && !securityContext.isAdmin()) { // not a poll admin, can not access result - return n_("pollen.security.error.poll.result.private.and.access.not.granted"); + return n("pollen.security.error.poll.result.private.and.access.not.granted"); } } @@ -180,7 +180,7 @@ public class SecurityService extends PollenServiceSupport { if (!poll.isPollFree() && !securityContext.isRestrictedVoter()) { // on none free poll, only restricted user can vote - return n_("pollen.security.error.poll.not.free.and.access.not.granted"); + return n("pollen.security.error.poll.not.free.and.access.not.granted"); } return null; } diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/impl/UserService.java b/pollen-services/src/main/java/org/chorem/pollen/services/impl/UserService.java index 4e1f3a4..551ab02 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/impl/UserService.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/impl/UserService.java @@ -4,7 +4,7 @@ * $Id$ * $HeadURL$ * %% - * Copyright (C) 2009 - 2012 CodeLutin, Tony Chemit + * Copyright (C) 2009 - 2015 CodeLutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -46,7 +46,7 @@ import org.nuiton.util.beans.Binder; import java.util.List; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; public class UserService extends PollenServiceSupport { @@ -300,12 +300,12 @@ public class UserService extends PollenServiceSupport { try { createUser(user, false); if (log.isInfoEnabled()) { - log.info(_("pollen.info.admin.created", login)); + log.info(t("pollen.info.admin.created", login)); } } catch (Exception eee) { if (log.isInfoEnabled()) { - log.info(_("pollen.info.admin.exists") + " : " + - _(eee.getMessage())); + log.info(t("pollen.info.admin.exists") + " : " + + t(eee.getMessage())); } } } diff --git a/pollen-votecounting-api/src/main/java/org/chorem/pollen/votecounting/AbstractVoteCounting.java b/pollen-votecounting-api/src/main/java/org/chorem/pollen/votecounting/AbstractVoteCounting.java index e797c20..4ced60d 100644 --- a/pollen-votecounting-api/src/main/java/org/chorem/pollen/votecounting/AbstractVoteCounting.java +++ b/pollen-votecounting-api/src/main/java/org/chorem/pollen/votecounting/AbstractVoteCounting.java @@ -6,7 +6,7 @@ package org.chorem.pollen.votecounting; * $Id$ * $HeadURL$ * %% - * Copyright (C) 2009 - 2012 CodeLutin + * Copyright (C) 2009 - 2015 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -25,7 +25,7 @@ package org.chorem.pollen.votecounting; import java.util.Locale; -import static org.nuiton.i18n.I18n.l_; +import static org.nuiton.i18n.I18n.l; /** * Base abstract implementation of a {@link VoteCounting}. @@ -73,22 +73,22 @@ public abstract class AbstractVoteCounting<S extends VoteCountingStrategy> imple @Override public final String getName(Locale locale) { - String result = l_(locale, i18nName); + String result = l(locale, i18nName); return result; } @Override public final String getShortHelp(Locale locale) { - String voteName = l_(locale, i18nName); - String voteHelp = l_(locale, i18nShortHelp); + String voteName = l(locale, i18nName); + String voteHelp = l(locale, i18nShortHelp); String result = - l_(locale, "pollen.voteCountingType.help", voteName, voteHelp); + l(locale, "pollen.voteCountingType.help", voteName, voteHelp); return result; } @Override public final String getHelp(Locale locale) { - String result = l_(locale, i18nHelp); + String result = l(locale, i18nHelp); return result; } diff --git a/pollen-votecounting-borda/src/main/java/org/chorem/pollen/votecounting/BordaVoteCounting.java b/pollen-votecounting-borda/src/main/java/org/chorem/pollen/votecounting/BordaVoteCounting.java index 93c11bf..1838e2e 100644 --- a/pollen-votecounting-borda/src/main/java/org/chorem/pollen/votecounting/BordaVoteCounting.java +++ b/pollen-votecounting-borda/src/main/java/org/chorem/pollen/votecounting/BordaVoteCounting.java @@ -6,7 +6,7 @@ package org.chorem.pollen.votecounting; * $Id$ * $HeadURL$ * %% - * Copyright (C) 2009 - 2012 CodeLutin + * Copyright (C) 2009 - 2015 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -27,8 +27,8 @@ import org.chorem.pollen.votecounting.model.ChoiceToVoteRenderType; import java.util.Locale; -import static org.nuiton.i18n.I18n.l_; -import static org.nuiton.i18n.I18n.n_; +import static org.nuiton.i18n.I18n.l; +import static org.nuiton.i18n.I18n.n; /** * Borda vote counting entry point. @@ -43,9 +43,9 @@ public class BordaVoteCounting extends AbstractVoteCounting<BordaVoteCountingStr public BordaVoteCounting() { super(ID, BordaVoteCountingStrategy.class, - n_("pollen.voteCountingType.borda"), - n_("pollen.voteCountingType.borda.shortHelp"), - n_("pollen.voteCountingType.borda.help") + n("pollen.voteCountingType.borda"), + n("pollen.voteCountingType.borda.shortHelp"), + n("pollen.voteCountingType.borda.help") ); } @@ -59,7 +59,7 @@ public class BordaVoteCounting extends AbstractVoteCounting<BordaVoteCountingStr public String getVoteValueNotValidMessage(Locale locale, String choiceName, String voteValue) { - return l_(locale, "pollen.error.vote.invalidBordaVoteValue", + return l(locale, "pollen.error.vote.invalidBordaVoteValue", choiceName, voteValue); } diff --git a/pollen-votecounting-condorcet/src/main/java/org/chorem/pollen/votecounting/CondorcetVoteCounting.java b/pollen-votecounting-condorcet/src/main/java/org/chorem/pollen/votecounting/CondorcetVoteCounting.java index 2708765..e2ad38b 100644 --- a/pollen-votecounting-condorcet/src/main/java/org/chorem/pollen/votecounting/CondorcetVoteCounting.java +++ b/pollen-votecounting-condorcet/src/main/java/org/chorem/pollen/votecounting/CondorcetVoteCounting.java @@ -6,7 +6,7 @@ package org.chorem.pollen.votecounting; * $Id$ * $HeadURL$ * %% - * Copyright (C) 2009 - 2012 CodeLutin + * Copyright (C) 2009 - 2015 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -27,8 +27,8 @@ import org.chorem.pollen.votecounting.model.ChoiceToVoteRenderType; import java.util.Locale; -import static org.nuiton.i18n.I18n.l_; -import static org.nuiton.i18n.I18n.n_; +import static org.nuiton.i18n.I18n.l; +import static org.nuiton.i18n.I18n.n; /** * Coombs vote counting entry point. @@ -43,9 +43,9 @@ public class CondorcetVoteCounting extends AbstractVoteCounting<CondorcetVoteCou public CondorcetVoteCounting() { super(ID, CondorcetVoteCountingStrategy.class, - n_("pollen.voteCountingType.condorcet"), - n_("pollen.voteCountingType.condorcet.shortHelp"), - n_("pollen.voteCountingType.condorcet.help") + n("pollen.voteCountingType.condorcet"), + n("pollen.voteCountingType.condorcet.shortHelp"), + n("pollen.voteCountingType.condorcet.help") ); } @@ -59,7 +59,7 @@ public class CondorcetVoteCounting extends AbstractVoteCounting<CondorcetVoteCou public String getVoteValueNotValidMessage(Locale locale, String choiceName, String voteValue) { - return l_(locale, "pollen.error.vote.invalidCondorcetVoteValue", + return l(locale, "pollen.error.vote.invalidCondorcetVoteValue", choiceName, voteValue); } diff --git a/pollen-votecounting-coombs/src/main/java/org/chorem/pollen/votecounting/CoombsVoteCounting.java b/pollen-votecounting-coombs/src/main/java/org/chorem/pollen/votecounting/CoombsVoteCounting.java index 320f20e..e8f78d2 100644 --- a/pollen-votecounting-coombs/src/main/java/org/chorem/pollen/votecounting/CoombsVoteCounting.java +++ b/pollen-votecounting-coombs/src/main/java/org/chorem/pollen/votecounting/CoombsVoteCounting.java @@ -6,7 +6,7 @@ package org.chorem.pollen.votecounting; * $Id$ * $HeadURL$ * %% - * Copyright (C) 2009 - 2012 CodeLutin + * Copyright (C) 2009 - 2015 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -27,8 +27,8 @@ import org.chorem.pollen.votecounting.model.ChoiceToVoteRenderType; import java.util.Locale; -import static org.nuiton.i18n.I18n.l_; -import static org.nuiton.i18n.I18n.n_; +import static org.nuiton.i18n.I18n.l; +import static org.nuiton.i18n.I18n.n; /** * Coombs vote counting entry point. @@ -43,9 +43,9 @@ public class CoombsVoteCounting extends AbstractVoteCounting<CoombsVoteCountingS public CoombsVoteCounting() { super(ID, CoombsVoteCountingStrategy.class, - n_("pollen.voteCountingType.coombs"), - n_("pollen.voteCountingType.coombs.shortHelp"), - n_("pollen.voteCountingType.coombs.help") + n("pollen.voteCountingType.coombs"), + n("pollen.voteCountingType.coombs.shortHelp"), + n("pollen.voteCountingType.coombs.help") ); } @@ -59,7 +59,7 @@ public class CoombsVoteCounting extends AbstractVoteCounting<CoombsVoteCountingS public String getVoteValueNotValidMessage(Locale locale, String choiceName, String voteValue) { - return l_(locale, "pollen.error.vote.invalidCoombsVoteValue", + return l(locale, "pollen.error.vote.invalidCoombsVoteValue", choiceName, voteValue); } diff --git a/pollen-votecounting-instant-runoff/src/main/java/org/chorem/pollen/votecounting/InstantRunoffVoteCounting.java b/pollen-votecounting-instant-runoff/src/main/java/org/chorem/pollen/votecounting/InstantRunoffVoteCounting.java index 24e92ed..a18dc21 100644 --- a/pollen-votecounting-instant-runoff/src/main/java/org/chorem/pollen/votecounting/InstantRunoffVoteCounting.java +++ b/pollen-votecounting-instant-runoff/src/main/java/org/chorem/pollen/votecounting/InstantRunoffVoteCounting.java @@ -6,7 +6,7 @@ package org.chorem.pollen.votecounting; * $Id$ * $HeadURL$ * %% - * Copyright (C) 2009 - 2012 CodeLutin + * Copyright (C) 2009 - 2015 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -27,8 +27,8 @@ import org.chorem.pollen.votecounting.model.ChoiceToVoteRenderType; import java.util.Locale; -import static org.nuiton.i18n.I18n.l_; -import static org.nuiton.i18n.I18n.n_; +import static org.nuiton.i18n.I18n.l; +import static org.nuiton.i18n.I18n.n; /** * Coombs vote counting entry point. @@ -43,9 +43,9 @@ public class InstantRunoffVoteCounting extends AbstractVoteCounting<InstantRunof public InstantRunoffVoteCounting() { super(ID, InstantRunoffVoteCountingStrategy.class, - n_("pollen.voteCountingType.instantRunoff"), - n_("pollen.voteCountingType.instantRunoff.shortHelp"), - n_("pollen.voteCountingType.instantRunoff.help") + n("pollen.voteCountingType.instantRunoff"), + n("pollen.voteCountingType.instantRunoff.shortHelp"), + n("pollen.voteCountingType.instantRunoff.help") ); } @@ -59,7 +59,7 @@ public class InstantRunoffVoteCounting extends AbstractVoteCounting<InstantRunof public String getVoteValueNotValidMessage(Locale locale, String choiceName, String voteValue) { - return l_(locale, "pollen.error.vote.invalidInstantRunoffVoteValue", + return l(locale, "pollen.error.vote.invalidInstantRunoffVoteValue", choiceName, voteValue); } diff --git a/pollen-votecounting-normal/src/main/java/org/chorem/pollen/votecounting/NormalVoteCounting.java b/pollen-votecounting-normal/src/main/java/org/chorem/pollen/votecounting/NormalVoteCounting.java index 8a1260f..9ace647 100644 --- a/pollen-votecounting-normal/src/main/java/org/chorem/pollen/votecounting/NormalVoteCounting.java +++ b/pollen-votecounting-normal/src/main/java/org/chorem/pollen/votecounting/NormalVoteCounting.java @@ -6,7 +6,7 @@ package org.chorem.pollen.votecounting; * $Id$ * $HeadURL$ * %% - * Copyright (C) 2009 - 2012 CodeLutin + * Copyright (C) 2009 - 2015 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -27,7 +27,7 @@ import org.chorem.pollen.votecounting.model.ChoiceToVoteRenderType; import java.util.Locale; -import static org.nuiton.i18n.I18n.n_; +import static org.nuiton.i18n.I18n.n; /** * Coombs vote counting entry point. @@ -42,9 +42,9 @@ public class NormalVoteCounting extends AbstractVoteCounting<NormalVoteCountingS public NormalVoteCounting() { super(ID, NormalVoteCountingStrategy.class, - n_("pollen.voteCountingType.normal"), - n_("pollen.voteCountingType.normal.shortHelp"), - n_("pollen.voteCountingType.normal.help") + n("pollen.voteCountingType.normal"), + n("pollen.voteCountingType.normal.shortHelp"), + n("pollen.voteCountingType.normal.help") ); } diff --git a/pollen-votecounting-number/src/main/java/org/chorem/pollen/votecounting/NumberVoteCounting.java b/pollen-votecounting-number/src/main/java/org/chorem/pollen/votecounting/NumberVoteCounting.java index 53458e5..5b055e0 100644 --- a/pollen-votecounting-number/src/main/java/org/chorem/pollen/votecounting/NumberVoteCounting.java +++ b/pollen-votecounting-number/src/main/java/org/chorem/pollen/votecounting/NumberVoteCounting.java @@ -6,7 +6,7 @@ package org.chorem.pollen.votecounting; * $Id$ * $HeadURL$ * %% - * Copyright (C) 2009 - 2012 CodeLutin + * Copyright (C) 2009 - 2015 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -27,7 +27,7 @@ import org.chorem.pollen.votecounting.model.ChoiceToVoteRenderType; import java.util.Locale; -import static org.nuiton.i18n.I18n.n_; +import static org.nuiton.i18n.I18n.n; /** * Coombs vote counting entry point. @@ -42,9 +42,9 @@ public class NumberVoteCounting extends AbstractVoteCounting<NumberVoteCountingS public NumberVoteCounting() { super(ID, NumberVoteCountingStrategy.class, - n_("pollen.voteCountingType.number"), - n_("pollen.voteCountingType.number.shortHelp"), - n_("pollen.voteCountingType.number.help") + n("pollen.voteCountingType.number"), + n("pollen.voteCountingType.number.shortHelp"), + n("pollen.voteCountingType.number.help") ); } diff --git a/pollen-votecounting-percentage/src/main/java/org/chorem/pollen/votecounting/PercentageVoteCounting.java b/pollen-votecounting-percentage/src/main/java/org/chorem/pollen/votecounting/PercentageVoteCounting.java index f209ff5..97bb695 100644 --- a/pollen-votecounting-percentage/src/main/java/org/chorem/pollen/votecounting/PercentageVoteCounting.java +++ b/pollen-votecounting-percentage/src/main/java/org/chorem/pollen/votecounting/PercentageVoteCounting.java @@ -6,7 +6,7 @@ package org.chorem.pollen.votecounting; * $Id$ * $HeadURL$ * %% - * Copyright (C) 2009 - 2012 CodeLutin + * Copyright (C) 2009 - 2015 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -27,8 +27,8 @@ import org.chorem.pollen.votecounting.model.ChoiceToVoteRenderType; import java.util.Locale; -import static org.nuiton.i18n.I18n.l_; -import static org.nuiton.i18n.I18n.n_; +import static org.nuiton.i18n.I18n.l; +import static org.nuiton.i18n.I18n.n; /** * Coombs vote counting entry point. @@ -43,9 +43,9 @@ public class PercentageVoteCounting extends AbstractVoteCounting<PercentageVoteC public PercentageVoteCounting() { super(ID, PercentageVoteCountingStrategy.class, - n_("pollen.voteCountingType.percentage"), - n_("pollen.voteCountingType.percentage.shortHelp"), - n_("pollen.voteCountingType.percentage.help") + n("pollen.voteCountingType.percentage"), + n("pollen.voteCountingType.percentage.shortHelp"), + n("pollen.voteCountingType.percentage.help") ); } @@ -91,7 +91,7 @@ public class PercentageVoteCounting extends AbstractVoteCounting<PercentageVoteC @Override public String getTotalVoteValueNotValidMessage(Locale locale) { - return l_(locale, "pollen.error.vote.percentage"); + return l(locale, "pollen.error.vote.percentage"); } } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.