Author: sbavencoff Date: 2014-04-14 09:29:08 +0200 (Mon, 14 Apr 2014) New Revision: 3777 Url: http://forge.chorem.org/projects/lima/repository/revisions/3777 Log: Version 8 : update dependencies Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/LimaConfig.java trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java trunk/lima-business/src/main/java/org/chorem/lima/business/utils/DocumentsEnum.java trunk/lima-business/src/test/java/org/chorem/lima/business/accountingrules/TestAccountingRules.java trunk/lima-callao/src/main/java/org/chorem/lima/FinancialStatementWayEnum.java trunk/lima-callao/src/main/java/org/chorem/lima/beans/AbstractBigDecimalCondition.java trunk/lima-callao/src/main/java/org/chorem/lima/beans/AbstractStringCondition.java trunk/lima-callao/src/main/java/org/chorem/lima/beans/DateCondition.java trunk/lima-swing/src/license/THIRD-PARTY.properties trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java trunk/lima-swing/src/main/java/org/chorem/lima/LimaExceptionHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java trunk/lima-swing/src/main/java/org/chorem/lima/actions/MiscAction.java trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxAccountsEnum.java trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxDatesEnum.java trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxEntryBooksEnum.java trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxLetterEnum.java trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxOperatorsEnum.java trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxPeriodEnum.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/Filter/BigDecimalCondition/CreditConditionView.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/Filter/BigDecimalCondition/DebitConditionView.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/Filter/StringCondition/DescriptionConditionView.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/Filter/StringCondition/LetteringConditionView.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/Filter/StringCondition/VoucherConditionView.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/NumberSeparatorCellRenderer.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/IntervalPanel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/AccountColumn.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/BalanceColumn.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/CreditColumn.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/DateColumn.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/DebitColumn.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/DescriptionColumn.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/EntryBookColumn.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/LetterColumn.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/VoucherColumn.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/TypeEntry.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartTreeTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/util/ErrorHelper.java trunk/lima-swing/src/main/resources/lima-config.properties trunk/lima-swing/src/main/resources/log4j.properties trunk/pom.xml Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/LimaConfig.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/LimaConfig.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/LimaConfig.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -40,8 +40,8 @@ import java.io.File; -import static org.nuiton.i18n.I18n._; -import static org.nuiton.i18n.I18n.n_; +import static org.nuiton.i18n.I18n.t; +import static org.nuiton.i18n.I18n.n; /** * Configuration pour le business. @@ -177,14 +177,14 @@ */ public enum Option implements ConfigOptionDef { - CONFIG_FILE(CONFIG_FILE_NAME, n_("lima.config.configFileName.description"), "lima.properties", String.class, true, true), - DATA_DIR("lima.data.dir", n_("lima.config.data.dir.description"), "${user.home}/.lima", File.class, false, false), - REPORTS_DIR("lima.reports.dir", n_("lima.config.reports.dir.description"), "${lima.data.dir}/reports", File.class, false, false), - RULES_NATIONALTY("lima.rules", n_("lima.config.rulesnationality.description"), FranceAccountingRules.class.getName(), String.class, false, false), - HTTP_PORT("lima.httpport", n_("lima.config.httpport.description"), "5462", String.class, false, false), - SERVER_ADRESS("lima.serveraddress", n_("lima.config.serveraddress.description"), "", String.class, false, false), - SCALE("lima.scale", n_("lima.config.scale.description"), "2", String.class, false, false), - VAT_PDF_URL("lima.report.vatpdfurl", n_("lima.config.reportvatpdfurl.description"), "default", String.class, false, false); + CONFIG_FILE(CONFIG_FILE_NAME, n("lima.config.configFileName.description"), "lima.properties", String.class, true, true), + DATA_DIR("lima.data.dir", n("lima.config.data.dir.description"), "${user.home}/.lima", File.class, false, false), + REPORTS_DIR("lima.reports.dir", n("lima.config.reports.dir.description"), "${lima.data.dir}/reports", File.class, false, false), + RULES_NATIONALTY("lima.rules", n("lima.config.rulesnationality.description"), FranceAccountingRules.class.getName(), String.class, false, false), + HTTP_PORT("lima.httpport", n("lima.config.httpport.description"), "5462", String.class, false, false), + SERVER_ADRESS("lima.serveraddress", n("lima.config.serveraddress.description"), "", String.class, false, false), + SCALE("lima.scale", n("lima.config.scale.description"), "2", String.class, false, false), + VAT_PDF_URL("lima.report.vatpdfurl", n("lima.config.reportvatpdfurl.description"), "default", String.class, false, false); private final String key; @@ -240,7 +240,7 @@ @Override public String getDescription() { - return _(description); + return t(description); } @Override Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,12 +25,6 @@ package org.chorem.lima.business.accountingrules; -import static org.nuiton.i18n.I18n._; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -54,6 +48,14 @@ import org.chorem.lima.entity.FiscalPeriodDAO; import org.nuiton.topia.TopiaException; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import static org.nuiton.i18n.I18n.t; + +; + /** * Defaults rules, if no localized rules classes is instantiated * this default class contain the strict minimum rules to check the data integrity. @@ -85,7 +87,7 @@ // Check if the numberaccount is not blank if (StringUtils.isBlank(account.getAccountNumber())) { - throw new LimaBusinessException(_("lima-business.defaultaccountingrules.invalidaccountnumber", + throw new LimaBusinessException(t("lima-business.defaultaccountingrules.invalidaccountnumber", account.getAccountNumber())); } } @@ -94,7 +96,7 @@ public void updateAccountRules(Account account) throws LimaException { // Check if the numberaccount is not blank if (StringUtils.isBlank(account.getAccountNumber())) { - throw new LimaBusinessException(_("lima-business.defaultaccountingrules.invalidaccountnumber", + throw new LimaBusinessException(t("lima-business.defaultaccountingrules.invalidaccountnumber", account.getAccountNumber())); } } @@ -104,7 +106,7 @@ public List<FinancialPeriod> createFiscalPeriodRules(FiscalPeriod fiscalPeriod) throws LimaException { //check if the enddate period is after the begindate period if (fiscalPeriod.getEndDate().before(fiscalPeriod.getBeginDate())) { - throw new LimaBusinessException(_("lima-business.defaultaccountingrules.enddateerror")); + throw new LimaBusinessException(t("lima-business.defaultaccountingrules.enddateerror")); } return null; } @@ -132,7 +134,7 @@ // Check if account have entries int nbentries = entryDAO.findAllByAccount(account).size(); if (nbentries != 0) { - throw new LimaBusinessException(_("lima-business.defaultaccountingrules.deleteaccounterror")); + throw new LimaBusinessException(t("lima-business.defaultaccountingrules.deleteaccounterror")); } } catch (TopiaException ex) { throw new LimaException("Can't remvoe account", ex); @@ -148,7 +150,7 @@ // Check if entrybook have entries long nbfinancialtransaction = financialTransactionDAO.getCountByEntryBook(entryBook); if (nbfinancialtransaction != 0) { - throw new LimaBusinessException(_("lima-business.defaultaccountingrules.deleteentrybookerror")); + throw new LimaBusinessException(t("lima-business.defaultaccountingrules.deleteentrybookerror")); } } catch (TopiaException ex) { throw new LimaException("Can't check rule", ex); @@ -168,7 +170,7 @@ FinancialPeriodDAO financialPeriodDAO = getDaoHelper().getFinancialPeriodDAO(); FinancialPeriod financialPeriod = financialPeriodDAO.findByDate(financialTransaction.getTransactionDate()); if (financialPeriod.isLocked()) { - throw new LimaBusinessException(_("lima-business.defaultaccountingrules.financialperiodblocked")); + throw new LimaBusinessException(t("lima-business.defaultaccountingrules.financialperiodblocked")); } //check all entrybook of his financial period are blocked @@ -190,7 +192,7 @@ } } if (entryBooks.size() == closedEntryBooks.size()) { - throw new LimaBusinessException(_("lima-business.defaultaccountingrules.allentrybookclosed")); + throw new LimaBusinessException(t("lima-business.defaultaccountingrules.allentrybookclosed")); } } catch (TopiaException ex) { throw new LimaException("Can't check rule", ex); @@ -219,7 +221,7 @@ List<FinancialTransaction> result = financialTransactionDAO.getAllUnbalancedTransaction(period.getBeginDate(), period.getEndDate(), closedPeriodicEntryBook.getEntryBook()); if (result.size() > 0) { - throw new LimaBusinessException(_("lima-business.defaultaccountingrules.blockerrorequillibrate")); + throw new LimaBusinessException(t("lima-business.defaultaccountingrules.blockerrorequillibrate")); } // Check if all financial transactions of this closedperiodicentrybook/financialPeriod are well filled in @@ -228,7 +230,7 @@ // FIXME echatellier 20120504 unutile de recuperer une liste // entiere juste pour tester l'existence if (result.size() > 0) { - throw new LimaBusinessException(_("lima-business.defaultaccountingrules.missingelements")); + throw new LimaBusinessException(t("lima-business.defaultaccountingrules.missingelements")); } // Check if all financial transactions have EntryBooks @@ -238,7 +240,7 @@ // entiere juste pour tester l'existence if (result.size() > 0) { FinancialTransaction transaction = result.get(0); - throw new LimaBusinessException(_("lima-business.defaultaccountingrules.missingentrybook", transaction.getTransactionDate())); + throw new LimaBusinessException(t("lima-business.defaultaccountingrules.missingentrybook", transaction.getTransactionDate())); } } catch (TopiaException ex) { @@ -269,7 +271,7 @@ closedPeriodicEntryBookDAO.findByEntryBookAndFinancialPeriod( entryOld.getFinancialTransaction().getEntryBook(), financialPeriod); if (closedPeriodicEntryBook.getLocked()) { - throw new LimaBusinessException(_("lima-Business.defaultaccountingrules.updateentryerror")); + throw new LimaBusinessException(t("lima-Business.defaultaccountingrules.updateentryerror")); } } @@ -280,7 +282,7 @@ // Check 2 & 3 cases if (closedPeriodicEntryBook2.getLocked()) { - throw new LimaBusinessException(_("lima-Business.defaultaccountingrules.updateentryerror")); + throw new LimaBusinessException(t("lima-Business.defaultaccountingrules.updateentryerror")); } } catch (TopiaException ex) { @@ -322,14 +324,14 @@ if (log.isDebugEnabled()) { log.debug("Date de la transaction avant (antérieure) la date de début du premier exercice"); } - throw new LimaBusinessException(_("lima-business.defaultaccountingrules.datebeforeerror")); + throw new LimaBusinessException(t("lima-business.defaultaccountingrules.datebeforeerror")); } if (financialTransactionDate.after(endDateLastFiscalPeriod)) { if (log.isDebugEnabled()) { log.debug("Date de la transaction après (postérieure) la date de fin du dernier exercice"); } - throw new LimaBusinessException(_("lima-business.defaultaccountingrules.dateaftererror")); + throw new LimaBusinessException(t("lima-business.defaultaccountingrules.dateaftererror")); } }else{ //date on a fiscal period (and consequently on a financial), now test if financial is open @@ -342,7 +344,7 @@ if (log.isDebugEnabled()) { log.debug("Periode (Old) financière bloquée"); } - throw new LimaBusinessException(_("lima-business.defaultaccountingrules.financialtransactionblocked")); + throw new LimaBusinessException(t("lima-business.defaultaccountingrules.financialtransactionblocked")); } //3. check new financial period locked @@ -350,7 +352,7 @@ if (log.isDebugEnabled()) { log.debug("Periode (New) financière bloquée"); } - throw new LimaBusinessException(_("lima-business.defaultaccountingrules.financialnewdateblocked")); + throw new LimaBusinessException(t("lima-business.defaultaccountingrules.financialnewdateblocked")); } } Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -47,7 +47,7 @@ import java.util.Date; import java.util.List; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * Surcharge des regles par defaut pour application à la comptabilité française. @@ -69,13 +69,13 @@ // ledger account must be located in 411 account if (!StringUtils.isNumeric(accountNumber) && !accountNumber.startsWith("4")) { - log.warn(_("lima-business.franceaccountingrules.accountnumbernotnumeric", + log.warn(t("lima-business.franceaccountingrules.accountnumbernotnumeric", account.getAccountNumber())); } // Check root account starts with 1 to 8 if (accountNumber.length() >= 1 && !accountNumber.substring(0, 1).matches("[1-8]")) { - throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountstartnumbererror", + throw new LimaBusinessException(t("lima-business.franceaccountingrules.accountstartnumbererror", account.getAccountNumber())); } @@ -89,13 +89,13 @@ // Check if the number account is type numeric if (!StringUtils.isNumeric(account.getAccountNumber())) { - throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountnumbernotnumeric", + throw new LimaBusinessException(t("lima-business.franceaccountingrules.accountnumbernotnumeric", account.getAccountNumber())); } // Check root account starts with 1 to 8 if (accountNumber.length() >= 1 && !accountNumber.substring(0, 1).matches("[1-8]")) { - throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountstartnumbererror", + throw new LimaBusinessException(t("lima-business.franceaccountingrules.accountstartnumbererror", account.getAccountNumber())); } } @@ -133,7 +133,7 @@ Date dateFiscalPeriod = fiscalPeriod.getBeginDate(); if (dateLastFiscalPeriod.compareTo(dateFiscalPeriod) != 0) { - throw new LimaBusinessException(_("lima-business.franceaccountingrules.newfiscalperiodadjoiningerror")); + throw new LimaBusinessException(t("lima-business.franceaccountingrules.newfiscalperiodadjoiningerror")); } //We can create a new fiscal period meantime the last fiscal period was not locked @@ -141,7 +141,7 @@ int unblockedFiscalPeriod = fiscalPeriodDAO.findAllByLocked(false).size(); if (unblockedFiscalPeriod > 1) { - throw new LimaBusinessException(_("lima-business.franceaccountingrules.antefiscalperiodnotblocked")); + throw new LimaBusinessException(t("lima-business.franceaccountingrules.antefiscalperiodnotblocked")); } } @@ -188,7 +188,7 @@ //Check if the fiscal period to block is the oldest if (oldestUnBlockedFiscalPeriod.equals(fiscalPeriod)) { - throw new LimaBusinessException(_("lima-business.franceaccountingrules.lastFiscalPeriodCantBlocked")); + throw new LimaBusinessException(t("lima-business.franceaccountingrules.lastFiscalPeriodCantBlocked")); } } catch (TopiaException ex) { throw new LimaException("Can't check rule", ex); @@ -209,7 +209,7 @@ //Check if the fiscal period to delete is empty if (financialTransactionDAO.findAllByDates(fiscalPeriod.getBeginDate(), fiscalPeriod.getEndDate()).size() != 0) { - throw new LimaBusinessException(_("lima-business.franceaccountingrules.fiscalperiodnotempty")); + throw new LimaBusinessException(t("lima-business.franceaccountingrules.fiscalperiodnotempty")); } } catch (TopiaException ex) { throw new LimaException("Can't check rule", ex); @@ -269,7 +269,7 @@ //Check if the fiscal period to block is the oldest if (nbClosedPeriodicEntryBooks != nbBlockedClosedPeriodicEntryBooks) { - throw new LimaBusinessException(_("lima-business.franceaccountingrules.antefinancialperiodnotblockedentrybook")); + throw new LimaBusinessException(t("lima-business.franceaccountingrules.antefinancialperiodnotblockedentrybook")); } } catch (TopiaException ex) { Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,7 +25,7 @@ package org.chorem.lima.business.ejb; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; import java.util.Collections; import java.util.List; @@ -95,7 +95,7 @@ if (accountDAO.existByNaturalId(account.getAccountNumber())) { throw new LimaBusinessException( - _("lima-business.account.accountalreardyexist", + t("lima-business.account.accountalreardyexist", account.getAccountNumber())); } Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -74,7 +74,7 @@ import java.util.Date; import java.util.List; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * TODO david: 17/01/14, Ce service doit être entièrement revue, !!! @@ -159,14 +159,14 @@ "<tr align=\"center\">\n"; if (printedType == 0) { - String[] columnHeaderTable = {boldBegin+_("lima-business.document.label")+boldEnd, boldBegin+_("lima-business.document.grossamount")+boldEnd, - boldBegin+_("lima-business.document.provisiondeprecationamount")+boldEnd, boldBegin+_("lima-business.document.netamount")+boldEnd}; + String[] columnHeaderTable = {boldBegin+t("lima-business.document.label")+boldEnd, boldBegin+t("lima-business.document.grossamount")+boldEnd, + boldBegin+t("lima-business.document.provisiondeprecationamount")+boldEnd, boldBegin+t("lima-business.document.netamount")+boldEnd}; financialReport += constructTableLine(columnHeaderTable); } else if (printedType == 1) { - String[] columnHeaderTable = {boldBegin+_("lima-business.document.label")+boldEnd, boldBegin+_("lima-business.document.amount")+boldEnd}; + String[] columnHeaderTable = {boldBegin+t("lima-business.document.label")+boldEnd, boldBegin+t("lima-business.document.amount")+boldEnd}; financialReport += constructTableLine(columnHeaderTable); } else { - String[] columnHeaderTable = {boldBegin+_("lima-business.document.label")+boldEnd, boldBegin+_("lima-business.document.amount")+boldEnd}; + String[] columnHeaderTable = {boldBegin+t("lima-business.document.label")+boldEnd, boldBegin+t("lima-business.document.amount")+boldEnd}; financialReport += constructTableLine(columnHeaderTable); } @@ -255,7 +255,7 @@ Date endDate) throws LimaException { List<Object> list = new ArrayList<Object>(); - String ledgerReport = constructHtmlHeader(_("lima-business.document.ledger")); + String ledgerReport = constructHtmlHeader(t("lima-business.document.ledger")); if (beginDate != null && endDate != null) { try { @@ -284,12 +284,12 @@ while (i < n) { - ledgerReport += constructHeaderTitle(_("lima-business.document.ledger"), beginDate, endDate); + ledgerReport += constructHeaderTitle(t("lima-business.document.ledger"), beginDate, endDate); ledgerReport += "<table align=\"left\" border=\"1\" cellpadding=\"3\" cellspacing=\"0\" style=\"font-size:13px;\" >\n"; - String [] columnsNames = {_("lima-business.document.account"), _("lima-business.document.debit"), - _("lima-business.document.credit"), _("lima-business.document.solde")}; + String [] columnsNames = {t("lima-business.document.account"), t("lima-business.document.debit"), + t("lima-business.document.credit"), t("lima-business.document.solde")}; ledgerReport += constructTableHeader(columnsNames); ledgerReport += "<tbody>\n"; @@ -338,15 +338,15 @@ ledgerReport +="<tr>"; if (indexEntry == 0) { ledgerReport += "<td><table align=\"right\" border=\"1\" cellpadding=\"3\" cellspacing=\"0\" style=\"font-size:13px;\" >\n"; - String [] columnsEntry = {_("lima-business.document.date"), - _("lima-business.document.entrybook"), _("lima-business.document.voucher"), - _("lima-business.document.description"), _("lima-business.document.debit"), - _("lima-business.document.credit"), _("lima-business.document.solde")}; + String [] columnsEntry = {t("lima-business.document.date"), + t("lima-business.document.entrybook"), t("lima-business.document.voucher"), + t("lima-business.document.description"), t("lima-business.document.debit"), + t("lima-business.document.credit"), t("lima-business.document.solde")}; ledgerReport += constructTableHeader(columnsEntry); ledgerReport += "<tbody>"; } - String [] columnsTable = {_("lima-business.document.dateformat",entry.getFinancialTransaction().getTransactionDate()), + String [] columnsTable = {t("lima-business.document.dateformat",entry.getFinancialTransaction().getTransactionDate()), entryBookCode, entry.getVoucher(), entry.getDescription(), amountDebit.toString(), amountCredit.toString(), amountDebit.subtract(amountCredit).toString()}; ledgerReport += constructTableLine(columnsTable, even); @@ -373,7 +373,7 @@ i = i + n; } //final amounts - String [] columnsTable = { boldBegin + _("lima-business.document.amounts") + boldEnd, + String [] columnsTable = { boldBegin + t("lima-business.document.amounts") + boldEnd, boldBegin + currentAmountDebit.toString() + boldEnd, boldBegin + currentAmountCredit.toString() + boldEnd, boldBegin + currentAmountDebit.subtract(currentAmountCredit).toString() + boldEnd}; ledgerReport += constructTableLine(columnsTable, even); @@ -393,7 +393,7 @@ String entryBookReport; SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MMMMM yyyy"); try { - entryBookReport = constructHtmlHeader(_("lima-business.document.entrybooks")); + entryBookReport = constructHtmlHeader(t("lima-business.document.entrybooks")); if (beginDate != null && endDate != null) { @@ -433,12 +433,12 @@ } } - String subTitleSecPart = _("lima-business.document.date") + " : " + + String subTitleSecPart = t("lima-business.document.date") + " : " + simpleDateFormat.format(closedPeriodicEntryBook.getFinancialPeriod().getBeginDate()); if (closedPeriodicEntryBook.getEntryBook() != null) { String label = Strings.isNullOrEmpty(closedPeriodicEntryBook.getEntryBook().getLabel()) ? "-" :closedPeriodicEntryBook.getEntryBook().getLabel(); if (!journal.equals(label)) { - entryBookReport += constructSubTitleHtml(_("lima-business.document.entrybook") + entryBookReport += constructSubTitleHtml(t("lima-business.document.entrybook") + " : " + label, subTitleSecPart); journal = label; @@ -450,10 +450,10 @@ entryBookReport += "<table border=\"1\" width=\"100%\" cellpadding=\"3\" cellspacing=\"0\">\n" + "<tr align=\"center\">\n"; - String [] columnNames = {_("lima-business.document.date"), _("lima-business.document.accountnumber"), - _("lima-business.document.voucher"), _("lima-business.document.description"), - _("lima-business.document.debit"), - _("lima-business.document.credit")}; + String [] columnNames = {t("lima-business.document.date"), t("lima-business.document.accountnumber"), + t("lima-business.document.voucher"), t("lima-business.document.description"), + t("lima-business.document.debit"), + t("lima-business.document.credit")}; entryBookReport += constructTableHeader(columnNames); @@ -462,7 +462,7 @@ if (entry.getAccount() != null) { numaccount = entry.getAccount().getAccountNumber(); } - String [] columnData = {_("lima-business.document.dateformat", entry.getFinancialTransaction().getTransactionDate()), + String [] columnData = {t("lima-business.document.dateformat", entry.getFinancialTransaction().getTransactionDate()), (StringUtils.isBlank(numaccount)?"":numaccount), (StringUtils.isBlank(entry.getVoucher())?"":entry.getVoucher()), (StringUtils.isBlank(entry.getDescription())?"":entry.getDescription()), (entry.getDebit() ? entry.getAmount() : BigDecimal.ZERO).toString(), @@ -470,7 +470,7 @@ entryBookReport += constructTableHeader(columnData); } - String [] columnDataTotal = {"", "", "", _("lima-business.document.amounts"), debit.toString(), credit.toString()}; + String [] columnDataTotal = {"", "", "", t("lima-business.document.amounts"), debit.toString(), credit.toString()}; entryBookReport += constructTableHeader(columnDataTotal); entryBookReport += "</table></p>\n"; } @@ -495,7 +495,7 @@ List<ReportsDatas> list = (List<ReportsDatas>) balanceTrial.getReportsDatas(); - String balanceReport = constructHtmlHeader(_("lima-business.document.balance")); + String balanceReport = constructHtmlHeader(t("lima-business.document.balance")); if (beginDate != null && endDate != null) { try{ @@ -511,13 +511,13 @@ boolean even = true; while (i < n) { - balanceReport += constructHeaderTitle(_("lima-business.document.balance"), beginDate, endDate); + balanceReport += constructHeaderTitle(t("lima-business.document.balance"), beginDate, endDate); balanceReport += "<table border=\"1\" width=\"100%\" cellpadding=\"3\" cellspacing=\"0\">\n"; - String [] columnsNames = {_("lima-business.document.accountnumber"), _("lima-business.document.description"), - _("lima-business.document.movementdebit"), _("lima-business.document.movementcredit"), - _("lima-business.document.soldedebit"), _("lima-business.document.soldecredit")}; + String [] columnsNames = {t("lima-business.document.accountnumber"), t("lima-business.document.description"), + t("lima-business.document.movementdebit"), t("lima-business.document.movementcredit"), + t("lima-business.document.soldedebit"), t("lima-business.document.soldecredit")}; balanceReport += constructTableHeader(columnsNames); balanceReport += "\t\t<tbody>\n"; @@ -545,7 +545,7 @@ //final amounts String boldBegin = "<b>"; String boldEnd = "</b>"; - String [] columnsBalanceAmount = {"", boldBegin + _("lima-business.document.amounts") + boldEnd, + String [] columnsBalanceAmount = {"", boldBegin + t("lima-business.document.amounts") + boldEnd, boldBegin + currentAmountDebit.toString() + boldEnd, boldBegin + currentAmountCredit.toString() + boldEnd, boldBegin + currentSoldeDebit.toString() + boldEnd,boldBegin + currentSoldeCredit.toString() + boldEnd}; balanceReport += constructTableLine(columnsBalanceAmount, even); @@ -570,13 +570,13 @@ String entryBookReport; try { - entryBookReport = constructHtmlHeader(_("lima-business.document.entrybook")); + entryBookReport = constructHtmlHeader(t("lima-business.document.entrybook")); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd MMMMM yyyy"); if (beginDate != null && endDate != null) { - String subTitle = _("lima-business.document.period1") + + String subTitle = t("lima-business.document.period1") + simpleDateFormat.format(beginDate) + " " + - _("lima-business.document.period2") + + t("lima-business.document.period2") + simpleDateFormat.format(endDate); entryBookReport += constructSubTitleHtml(subTitle); @@ -658,9 +658,9 @@ entryBookReport += "<table border=\"1\" width=\"100%\" cellpadding=\"3\" cellspacing=\"0\">\n"; - String[] columnNames = {_("lima-business.document.entrybook"), _("lima-business.document.label"), - _("lima-business.document.date"), _("lima-business.document.debit"), - _("lima-business.document.credit")}; + String[] columnNames = {t("lima-business.document.entrybook"), t("lima-business.document.label"), + t("lima-business.document.date"), t("lima-business.document.debit"), + t("lima-business.document.credit")}; entryBookReport += constructTableHeader(columnNames); entryBookReport += "\t\t<tbody>\n"; @@ -681,7 +681,7 @@ description = ""; } String[] columnData = {code, description, - _("lima-business.document.monthformat", generalEntryBooksDataInList.getPeriod()), + t("lima-business.document.monthformat", generalEntryBooksDataInList.getPeriod()), generalEntryBooksDataInList.getDebit().toString(), generalEntryBooksDataInList.getCredit().toString()}; entryBookReport += constructTableLine(columnData, even); @@ -689,9 +689,9 @@ } else { String amount; if (generalEntryBooksDataInList.getAmount()) { - amount = _("lima-business.document.amounts"); + amount = t("lima-business.document.amounts"); } else { - amount = _("lima-business.document.amountsperiod", generalEntryBooksDataInList.getPeriod()); + amount = t("lima-business.document.amountsperiod", generalEntryBooksDataInList.getPeriod()); } String[] columnDataTotal = {"", "", (StringUtils.isBlank(amount)?"":amount), generalEntryBooksDataInList.getDebit().toString(), @@ -800,23 +800,23 @@ Account accountFormat = accountDAO.findByTopiaId(account); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd MMMMM yyyy"); - accountReport = constructHtmlHeader(_("lima.reports.accounts")); + accountReport = constructHtmlHeader(t("lima.reports.accounts")); ReportsDatas results; if (beginDate != null && endDate != null && account != null) { - String subTitleFirstpart = _("lima.ui.fiscalperiod.fiscalperiod") + " : " + simpleDateFormat.format(beginDate) + " - " + simpleDateFormat.format(endDate); - String subTitleSecPart = _("lima.ui.financialtransaction.account") + " : " + accountFormat.getAccountNumber() + " - " + accountFormat.getLabel(); + String subTitleFirstpart = t("lima.ui.fiscalperiod.fiscalperiod") + " : " + simpleDateFormat.format(beginDate) + " - " + simpleDateFormat.format(endDate); + String subTitleSecPart = t("lima.ui.financialtransaction.account") + " : " + accountFormat.getAccountNumber() + " - " + accountFormat.getLabel(); accountReport += constructSubTitleHtml(subTitleFirstpart, subTitleSecPart); results = reportService.generateAccountsReports(accountFormat, true, beginDate, endDate); List<Entry> entries = results.getListEntry(); - String[] columnNames = {_("lima.table.number"), _("lima.table.date"), _("lima.table.entrybook"), - _("lima.table.voucher"), _("lima.table.description"), _("lima.table.letter"), - _("lima.table.debit"), _("lima.table.credit")}; + String[] columnNames = {t("lima.table.number"), t("lima.table.date"), t("lima.table.entrybook"), + t("lima.table.voucher"), t("lima.table.description"), t("lima.table.letter"), + t("lima.table.debit"), t("lima.table.credit")}; accountReport += "\t<table border=\"1\" width=\"100%\" cellpadding=\"3\" cellspacing=\"0\">\n"; @@ -851,7 +851,7 @@ "</body>\n"; } else { - JOptionPane.showMessageDialog(null, _("lima.reports.account.noaccount"), _("lima.reports.account.noaccounttitle"), JOptionPane.INFORMATION_MESSAGE); + JOptionPane.showMessageDialog(null, t("lima.reports.account.noaccount"), t("lima.reports.account.noaccounttitle"), JOptionPane.INFORMATION_MESSAGE); } accountReport += "</html>"; @@ -938,50 +938,50 @@ String boldItalicEnd = "</i>" + "</b>"; if (identity != null) { - String [] columnsNameSociety = {boldItalicBegin + _("lima-business.document.society") + boldItalicEnd, + String [] columnsNameSociety = {boldItalicBegin + t("lima-business.document.society") + boldItalicEnd, "<i>" + (StringUtils.isNotEmpty(identity.getName()) ? identity.getName() : " - ") + "</i>", }; headerTitle += constructTableLine(columnsNameSociety); - String [] columnsDescription = {boldItalicBegin + _("lima-business.document.description") + boldItalicEnd, + String [] columnsDescription = {boldItalicBegin + t("lima-business.document.description") + boldItalicEnd, "<i>" + (StringUtils.isNotEmpty(identity.getDescription()) ? identity.getDescription() : " - ") + "</i>", }; headerTitle += constructTableLine(columnsDescription); - String [] columnsAdressOne = {boldItalicBegin + _("lima-business.document.adress") + boldItalicEnd, + String [] columnsAdressOne = {boldItalicBegin + t("lima-business.document.adress") + boldItalicEnd, "<i>" + (StringUtils.isNotEmpty(identity.getAddress()) ? identity.getAddress() : " - ") + "</i>", }; headerTitle += constructTableLine(columnsAdressOne); - String [] columnsAdressTwo = {boldItalicBegin + _("lima-business.document.adresssuite") + boldItalicEnd, + String [] columnsAdressTwo = {boldItalicBegin + t("lima-business.document.adresssuite") + boldItalicEnd, "<i>" + (StringUtils.isNotEmpty(identity.getAddress2()) ? identity.getAddress2() : " - ") + "</i>", }; headerTitle += constructTableLine(columnsAdressTwo); - String [] columnsZipCode = {boldItalicBegin + _("lima-business.document.zipcode") + boldItalicEnd, + String [] columnsZipCode = {boldItalicBegin + t("lima-business.document.zipcode") + boldItalicEnd, "<i>" + (StringUtils.isNotEmpty(identity.getZipCode()) ? identity.getZipCode() : " - ") + "</i>", }; headerTitle += constructTableLine(columnsZipCode); - String [] columnsCity = {boldItalicBegin + _("lima-business.document.city") + boldItalicEnd, + String [] columnsCity = {boldItalicBegin + t("lima-business.document.city") + boldItalicEnd, "<i>" + (StringUtils.isNotEmpty(identity.getCity()) ? identity.getCity() : " - ") + "</i>", }; headerTitle += constructTableLine(columnsCity); - String [] columnsBusinessNumber = {boldItalicBegin + _("lima-business.document.businessnumber") + + String [] columnsBusinessNumber = {boldItalicBegin + t("lima-business.document.businessnumber") + boldItalicEnd, "<i>" + (StringUtils.isNotEmpty(identity.getBusinessNumber()) ? identity.getBusinessNumber() : " - ") + "</i>"}; headerTitle += constructTableLine(columnsBusinessNumber); - String [] columnsClassifCode = {boldItalicBegin + _("lima-business.document.classificationcode") + + String [] columnsClassifCode = {boldItalicBegin + t("lima-business.document.classificationcode") + boldItalicEnd, "<i>" + (StringUtils.isNotEmpty(identity.getClassificationCode()) ? identity.getClassificationCode() : " - ") + "</i>"}; headerTitle += constructTableLine(columnsClassifCode); - String [] columnsVatNumber = {boldItalicBegin + _("lima-business.document.vatnumber") + boldItalicEnd, + String [] columnsVatNumber = {boldItalicBegin + t("lima-business.document.vatnumber") + boldItalicEnd, "<i>" + (StringUtils.isNotEmpty(identity.getVatNumber()) ? identity.getVatNumber() : " - ") + "</i>", }; headerTitle += constructTableLine(columnsVatNumber); } - String [] columnsPeriodOne = {boldItalicBegin + _("lima-business.document.period1") + boldItalicEnd, "<i>" - + _("lima-business.document.period1format", beginDate)+ "</i>"}; + String [] columnsPeriodOne = {boldItalicBegin + t("lima-business.document.period1") + boldItalicEnd, "<i>" + + t("lima-business.document.period1format", beginDate)+ "</i>"}; headerTitle += constructTableLine(columnsPeriodOne); headerTitle += "<tr>\n"; - String [] columnsPeriodTwo = {boldItalicBegin + _("lima-business.document.period2") + boldItalicEnd, "<i>" - + _("lima-business.document.period2format", endDate)+ "</i>"}; + String [] columnsPeriodTwo = {boldItalicBegin + t("lima-business.document.period2") + boldItalicEnd, "<i>" + + t("lima-business.document.period2format", endDate)+ "</i>"}; headerTitle += constructTableLine(columnsPeriodTwo); headerTitle += "</table>" + Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -45,7 +45,7 @@ import java.util.List; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * Implémente la fonction multi-EntryBook. Il est possible de créer ici le @@ -71,7 +71,7 @@ entryBookDAO.findByCode(entryBook.getCode()); if (existingEntryBook != null) { throw new LimaBusinessException( - _("lima-business.entrybook.entrybookalreadyexist", + t("lima-business.entrybook.entrybookalreadyexist", entryBook.getCode())); } Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,7 +25,7 @@ package org.chorem.lima.business.ejb; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; import java.math.BigDecimal; import java.util.ArrayList; @@ -455,7 +455,7 @@ @Override public String checkFinancialStatementChart() throws LimaException { StringBuilder result = - new StringBuilder(_("lima-business.financialstatement.check.warn")); + new StringBuilder(t("lima-business.financialstatement.check.warn")); try { @@ -489,7 +489,7 @@ for (Account account : accountsList) { - result.append(_("lima-business.financialstatement.check.nothing", + result.append(t("lima-business.financialstatement.check.nothing", account.getAccountNumber(), account.getLabel())); } Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -62,7 +62,7 @@ import java.util.Date; import java.util.List; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * Cette classe permet la création d'une transaction comptable dans l'application. @@ -233,7 +233,7 @@ amountsCalculation(secondEntryDebitSubtract, sameAccountEntry, costOrProductEntry); } - String accountRegularization = _("lima.ui.lettering.accountRegularization"); + String accountRegularization = t("lima.ui.lettering.accountRegularization"); if (log.isDebugEnabled()) { log.debug("accountRegularization : " + accountRegularization); Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -66,7 +66,7 @@ import java.util.Iterator; import java.util.List; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * Gestion des exercices. @@ -223,7 +223,7 @@ try { if (fiscalPeriod.getLocked()) { - throw new LimaBusinessException(_("lima-business.fiscalperiod.fiscalperiodalreadyblocked")); + throw new LimaBusinessException(t("lima-business.fiscalperiod.fiscalperiodalreadyblocked")); } //check rules accountingRules.blockFiscalPeriodRules(fiscalPeriod); @@ -398,7 +398,7 @@ } } if (!found) { - throw new LimaBusinessException(_("lima-business.fiscalperiod.newfinancialperioderror")); + throw new LimaBusinessException(t("lima-business.fiscalperiod.newfinancialperioderror")); } //holds entries of all closing transactions @@ -437,8 +437,8 @@ //close accounts by removing amounts from all class 1 to 5 accounts Entry beginEntry = new EntryImpl(); - beginEntry.setDescription(_("lima-business.financialtransaction.retainedearnings.description") + " (" + calendar.get(Calendar.YEAR) + ")"); - beginEntry.setVoucher(_("lima-business.financialtransaction.retainedearnings.voucher")); + beginEntry.setDescription(t("lima-business.financialtransaction.retainedearnings.description") + " (" + calendar.get(Calendar.YEAR) + ")"); + beginEntry.setVoucher(t("lima-business.financialtransaction.retainedearnings.voucher")); beginEntry.setFinancialTransaction(endfinancialTransaction); beginEntry.setAccount(report.getAccount()); beginEntry.setAmount(report.getAmountSolde().abs()); @@ -447,8 +447,8 @@ //save amounts inside account number 891 beginEntry = new EntryImpl(); - beginEntry.setDescription(_("lima-business.financialtransaction.retainedearnings.description") + " (" + calendar.get(Calendar.YEAR) + ")"); - beginEntry.setVoucher(_("lima-business.financialtransaction.retainedearnings.voucher")); + beginEntry.setDescription(t("lima-business.financialtransaction.retainedearnings.description") + " (" + calendar.get(Calendar.YEAR) + ")"); + beginEntry.setVoucher(t("lima-business.financialtransaction.retainedearnings.voucher")); beginEntry.setFinancialTransaction(endfinancialTransaction); beginEntry.setAccount(endRetainedAccount); beginEntry.setAmount(report.getAmountSolde().abs()); @@ -458,8 +458,8 @@ //open new year accounts if new year exists and a date has been found for the transaction //give back amounts from class 1 to 5 accounts beginEntry = new EntryImpl(); - beginEntry.setDescription(_("lima-business.financialtransaction.retainedearnings.description") + " (" + calendar.get(Calendar.YEAR) + ")"); - beginEntry.setVoucher(_("lima-business.financialtransaction.retainedearnings.voucher")); + beginEntry.setDescription(t("lima-business.financialtransaction.retainedearnings.description") + " (" + calendar.get(Calendar.YEAR) + ")"); + beginEntry.setVoucher(t("lima-business.financialtransaction.retainedearnings.voucher")); beginEntry.setFinancialTransaction(beginfinancialTransaction); beginEntry.setAccount(report.getAccount()); beginEntry.setAmount(report.getAmountSolde().abs()); @@ -467,8 +467,8 @@ financialTransactionService.createEntry(beginEntry); //close account by removing amount from account number 890 beginEntry = new EntryImpl(); - beginEntry.setDescription(_("lima-business.financialtransaction.retainedearnings.description") + " (" + calendar.get(Calendar.YEAR) + ")"); - beginEntry.setVoucher(_("lima-business.financialtransaction.retainedearnings.voucher")); + beginEntry.setDescription(t("lima-business.financialtransaction.retainedearnings.description") + " (" + calendar.get(Calendar.YEAR) + ")"); + beginEntry.setVoucher(t("lima-business.financialtransaction.retainedearnings.voucher")); beginEntry.setFinancialTransaction(beginfinancialTransaction); beginEntry.setAccount(endRetainedAccount); beginEntry.setAmount(report.getAmountSolde().abs()); Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,7 +25,7 @@ package org.chorem.lima.business.ejb; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; import java.io.File; import java.io.IOException; @@ -301,11 +301,11 @@ + "<body>\n" + "<table class=\"padding\">\n" + "<tr><td><img src=\"?img=puzzle_icon_mini.png\"/></td>\n" + "<td><h1>LIMA Documents Report</h1></td></tr>\n" + "<tr><td class=\"tdright\"><img src=\"?img=identity.png\"/></td>\n" + "<td rowspan=3><form method=GET action=") .append(serverAdress).append(">\n") - .append(_("lima-business.document.date.begin")) + .append(t("lima-business.document.date.begin")) .append("<input value=\"") .append(DATEFORMAT.format(beginDatePicker)) .append("\" type=\"date\" name=\"beginDate\">\n") - .append(_("lima-business.document.date.end")) + .append(t("lima-business.document.date.end")) .append("<input value=\"") .append(DATEFORMAT.format(endDatePicker)) .append("\" type=\"date\" name=\"endDate\">\n<br/><br/>"); Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,7 +25,7 @@ package org.chorem.lima.business.ejb; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; import java.io.File; import java.io.FileInputStream; @@ -164,7 +164,7 @@ public String importEntriesFromEbp(String datas) throws LimaException { if (datas.isEmpty()) { - throw new LimaBusinessException(_("lima-business.import.ebpnoentry")); + throw new LimaBusinessException(t("lima-business.import.ebpnoentry")); } // use for logs @@ -193,7 +193,7 @@ headEntry.add("Lettre"); if (!Arrays.asList(strat.getColumnMapping()).containsAll(headEntry)) { throw new LimaBusinessException( - _("lima-business.import.ebpnoheader")); + t("lima-business.import.ebpnoheader")); } // Sorts the list according to the entry date @@ -210,7 +210,7 @@ int nbFiscalPeriods = fiscalPeriods.size(); if (nbFiscalPeriods == 0) { throw new LimaBusinessException( - _("lima-business.import.nofiscalperiodopen")); + t("lima-business.import.nofiscalperiodopen")); } // attributes declaration @@ -236,13 +236,13 @@ // if entry date have fiscalperiod open if (dateEcr.compareTo(fiscalPeriods.get(0).getBeginDate()) < 0 || dateEcr.compareTo(fiscalPeriods.get(nbFiscalPeriods - 1).getEndDate()) > 0) { - result.append(_( + result.append(t( "lima-business.import.entriesoutofdatesrange", dateEcr)); } // if account not exist not export -> exception else if (account == null) { - throw new LimaBusinessException(_( + throw new LimaBusinessException(t( "lima-business.import.ebpmissingaccount", entryEBP.getCompte())); } @@ -290,7 +290,7 @@ //financialTransaction = null; // create it entryBook = entryBookService.createEntryBook(entryBook); - result.append(_( + result.append(t( "lima-business.import.entrybooknotexist", entryBook)); } @@ -308,14 +308,14 @@ financialTransaction.setTransactionDate(dateEcr); financialTransaction = financialTransactionService .createFinancialTransaction(financialTransaction); - result.append(_( + result.append(t( "lima-business.import.transactionadded", dateEcr, entryBook.getCode())); } // Inside the db, the entries reference the financialTransaction entry.setFinancialTransaction(financialTransaction); entry = financialTransactionService.createEntry(entry); - result.append(_("lima-business.import.entryadded", + result.append(t("lima-business.import.entryadded", entry.getDescription(), entry.getAmount())); } @@ -358,7 +358,7 @@ if (!Arrays.asList(strat.getColumnMapping()).containsAll( headAccount)) { throw new LimaBusinessException( - _("lima-business.import.noaccount")); + t("lima-business.import.noaccount")); } // FIXME echatellier 20120424 read csv line by line without @@ -373,7 +373,7 @@ account.setAccountNumber(accountNumber); account.setLabel(label); accountService.createAccount(account); - result.append(_("lima-business.import.accountadded", + result.append(t("lima-business.import.accountadded", accountNumber, label)); } @@ -411,7 +411,7 @@ String[] headers = csvReader.readNext(); if (!headers[0].equals("Code") || !headers[2].equals("Libelle")) { throw new LimaBusinessException( - _("lima-business.import.noaccount")); + t("lima-business.import.noaccount")); } // create entry book for each line @@ -422,7 +422,7 @@ entryBook.setCode(line[0]); entryBook.setLabel(line[2]); entryBookService.createEntryBook(entryBook); - result.append(_("lima-business.import.accountadded", entryBook.getCode(), entryBook.getLabel())); + result.append(t("lima-business.import.accountadded", entryBook.getCode(), entryBook.getLabel())); count++; line = csvReader.readNext(); @@ -727,7 +727,7 @@ // Check line format if (nextLine.length < 3 || ! nextLine[0].equals(ImportExportEntityEnum.ACCOUNT.getLabel())) { - throw new LimaException(_("lima-business.import.lineformatmismatch")); + throw new LimaException(t("lima-business.import.lineformatmismatch")); } StringBuilder result = new StringBuilder(); @@ -746,11 +746,11 @@ } accountService.createAccount(account); - result.append(_("lima-business.import.accountadded", + result.append(t("lima-business.import.accountadded", account.getAccountNumber(), account.getLabel())); } else { - result.append(_("lima-business.import.accountalreadyexist", accountNumber)); + result.append(t("lima-business.import.accountalreadyexist", accountNumber)); } return result.toString(); @@ -782,7 +782,7 @@ if (financialPeriodService.getFinancialPeriods(beginDate, endDate) == null) { fiscalPeriods.add(fiscalPeriod); } else { - result.append(_("lima-business.import.fiscalperiodalreadyexist", beginDate, endDate)); + result.append(t("lima-business.import.fiscalperiodalreadyexist", beginDate, endDate)); } return result.toString(); @@ -805,11 +805,11 @@ // if exist, skip if (entryBookService.getEntryBookByCode(entryBook.getCode()) != null) { - result.append(_("lima-business.import.entrybookalreadyexist", entryBook.getLabel())); + result.append(t("lima-business.import.entrybookalreadyexist", entryBook.getLabel())); } else { // create it entryBookService.createEntryBook(entryBook); - result.append(_("lima-business.import.financialstatementadded", entryBook.getLabel())); + result.append(t("lima-business.import.financialstatementadded", entryBook.getLabel())); } return result.toString(); @@ -895,7 +895,7 @@ financialStatements.put(label, list); } } else { - result.append(_("lima-business.import.financialstatementalreadyexist", label)); + result.append(t("lima-business.import.financialstatementalreadyexist", label)); } return result.toString(); @@ -942,7 +942,7 @@ vatStatements.put(label, list); } } else { - result.append(_("lima-business.import.vatstatementalreadyexist", label)); + result.append(t("lima-business.import.vatstatementalreadyexist", label)); } return result.toString(); @@ -1063,13 +1063,13 @@ masterFinancialStatement, financialStatement); - result.append(_("lima-business.import.financialstatementadded", + result.append(t("lima-business.import.financialstatementadded", financialStatementImport.getLabel())); itr2.remove(); } else if (!financialStatements .containsKey(masterFinancialStatementLabel)) { - result.append(_("lima-business.import.financialstatementalnomaster", + result.append(t("lima-business.import.financialstatementalnomaster", financialStatementImport.getLabel(), masterFinancialStatementLabel)); itr2.remove(); @@ -1124,13 +1124,13 @@ masterVatStatement, vatStatement); - result.append(_("lima-business.import.vatstatementadded", + result.append(t("lima-business.import.vatstatementadded", vatStatementImport.getLabel())); itr2.remove(); } else if (!vatStatements .containsKey(masterVatStatementLabel)) { - result.append(_("lima-business.import.vatstatementalnomaster", + result.append(t("lima-business.import.vatstatementalnomaster", vatStatementImport.getLabel(), masterVatStatementLabel)); itr2.remove(); @@ -1151,11 +1151,11 @@ // create fiscalPeriod try { fiscalPeriodService.createFiscalPeriod(fiscalPeriod); - result.append(_("lima-business.import.fiscalperiodadded", + result.append(t("lima-business.import.fiscalperiodadded", fiscalPeriod.getBeginDate(), fiscalPeriod.getEndDate())); } catch (LimaException eee) { - result.append(_("lima-business.common.failed", eee.getMessage())); + result.append(t("lima-business.common.failed", eee.getMessage())); } } return result.toString(); @@ -1189,10 +1189,10 @@ try { financialPeriodService .blockClosedPeriodicEntryBook(closedPeriodicEntryBook); - result.append(_("lima-business.import.closedperiodicentrybookupdated", + result.append(t("lima-business.import.closedperiodicentrybookupdated", beginDateFinancialPeriod, endDateFinancialPeriod, codeEntryBook)); } catch (LimaException eee) { - result.append(_("lima-business.common.failed", eee)); + result.append(t("lima-business.common.failed", eee)); } } @@ -1266,7 +1266,7 @@ identityService.updateIdentity(identity); // create it - result.append(_("lima-business.import.identityadded", identity.getName())); + result.append(t("lima-business.import.identityadded", identity.getName())); return result.toString(); } Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/utils/DocumentsEnum.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/utils/DocumentsEnum.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/utils/DocumentsEnum.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,18 +25,18 @@ package org.chorem.lima.business.utils; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; public enum DocumentsEnum { - GENERAL_ENTRYBOOK(_("lima-business.document.generalentrybook"), "lima_general_entybook"), - ENTRYBOOKS(_("lima-business.document.entrybook"), "lima_entrybooks"), - BALANCE(_("lima-business.document.balance"), "lima_balance"), - LEDGER(_("lima-business.document.ledger"), "lima_ledger"), - FINANCIALSTATEMENT(_("lima-business.document.financialstatement"), "lima_financialstatements"), - VAT(_("lima-business.document.vat"), "lima_vat"), - ACCOUNT(_("lima-business.document.account"), "lima_account"); + GENERAL_ENTRYBOOK(t("lima-business.document.generalentrybook"), "lima_general_entybook"), + ENTRYBOOKS(t("lima-business.document.entrybook"), "lima_entrybooks"), + BALANCE(t("lima-business.document.balance"), "lima_balance"), + LEDGER(t("lima-business.document.ledger"), "lima_ledger"), + FINANCIALSTATEMENT(t("lima-business.document.financialstatement"), "lima_financialstatements"), + VAT(t("lima-business.document.vat"), "lima_vat"), + ACCOUNT(t("lima-business.document.account"), "lima_account"); private final String fileName; Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/accountingrules/TestAccountingRules.java =================================================================== --- trunk/lima-business/src/test/java/org/chorem/lima/business/accountingrules/TestAccountingRules.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-business/src/test/java/org/chorem/lima/business/accountingrules/TestAccountingRules.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -38,7 +38,7 @@ import java.util.Date; import java.util.List; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * Cette classe existe car les tests tourne 2 fois: @@ -81,7 +81,7 @@ dateLastFiscalPeriod = DateUtils.truncate(dateLastFiscalPeriod, Calendar.DATE); Date dateFiscalPeriod = fiscalPeriod.getBeginDate(); if (dateLastFiscalPeriod.compareTo(dateFiscalPeriod) != 0) { - throw new LimaBusinessException(_("lima-business.franceaccountingrules.newfiscalperiodadjoiningerror")); + throw new LimaBusinessException(t("lima-business.franceaccountingrules.newfiscalperiodadjoiningerror")); } //We can create a new fiscal period meantime the last fiscal period was not locked @@ -89,7 +89,7 @@ int unblockedFiscalPeriod = fiscalPeriodDAO.findAllByLocked(false).size(); if (unblockedFiscalPeriod > 1) { - throw new LimaBusinessException(_("lima-business.franceaccountingrules.antefiscalperiodnotblocked")); + throw new LimaBusinessException(t("lima-business.franceaccountingrules.antefiscalperiodnotblocked")); } } Modified: trunk/lima-callao/src/main/java/org/chorem/lima/FinancialStatementWayEnum.java =================================================================== --- trunk/lima-callao/src/main/java/org/chorem/lima/FinancialStatementWayEnum.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-callao/src/main/java/org/chorem/lima/FinancialStatementWayEnum.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,13 +25,13 @@ package org.chorem.lima; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; public enum FinancialStatementWayEnum { - BOTH(_("lima.enum.comboboxamount.both")), - DEBIT(_("lima.enum.comboboxamount.debit")), - CREDIT(_("lima.enum.comboboxamount.credit")); + BOTH(t("lima.enum.comboboxamount.both")), + DEBIT(t("lima.enum.comboboxamount.debit")), + CREDIT(t("lima.enum.comboboxamount.credit")); private final String description; Modified: trunk/lima-callao/src/main/java/org/chorem/lima/beans/AbstractBigDecimalCondition.java =================================================================== --- trunk/lima-callao/src/main/java/org/chorem/lima/beans/AbstractBigDecimalCondition.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-callao/src/main/java/org/chorem/lima/beans/AbstractBigDecimalCondition.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -27,7 +27,7 @@ import java.io.Serializable; import java.math.BigDecimal; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * @author Sylvain Bavencoff <bavencoff@codelutin.com> @@ -59,12 +59,12 @@ } public static enum Operand implements Labeled { - EQUAL(_("lima.enum.BigDecimal.operand.equal")), - NOT_EQUAL(_("lima.enum.BigDecimal.operand.notequal")), - LOWER(_("lima.enum.BigDecimal.operand.lower")), - LOWER_OR_EQUAL(_("lima.enum.BigDecimal.operand.lowerorequal")), - UPPER(_("lima.enum.BigDecimal.operand.upper")), - UPPER_OR_EQUAL(_("lima.enum.BigDecimal.operand.upperorequal")); + EQUAL(t("lima.enum.BigDecimal.operand.equal")), + NOT_EQUAL(t("lima.enum.BigDecimal.operand.notequal")), + LOWER(t("lima.enum.BigDecimal.operand.lower")), + LOWER_OR_EQUAL(t("lima.enum.BigDecimal.operand.lowerorequal")), + UPPER(t("lima.enum.BigDecimal.operand.upper")), + UPPER_OR_EQUAL(t("lima.enum.BigDecimal.operand.upperorequal")); protected String label; Modified: trunk/lima-callao/src/main/java/org/chorem/lima/beans/AbstractStringCondition.java =================================================================== --- trunk/lima-callao/src/main/java/org/chorem/lima/beans/AbstractStringCondition.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-callao/src/main/java/org/chorem/lima/beans/AbstractStringCondition.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -26,7 +26,7 @@ import java.io.Serializable; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * @author Sylvain Bavencoff <bavencoff@codelutin.com> @@ -69,11 +69,11 @@ } public static enum Operand implements Labeled { - EQUAL(_("lima.enum.string.operand.equal")), - NOT_EQUAL(_("lima.string.date.operand.notequal")), - BEGIN(_("lima.enum.string.operand.begin")), - ENDING(_("lima.enum.string.operand.ending")), - CONTAIN(_("lima.enum.string.operand.contain")); + EQUAL(t("lima.enum.string.operand.equal")), + NOT_EQUAL(t("lima.string.date.operand.notequal")), + BEGIN(t("lima.enum.string.operand.begin")), + ENDING(t("lima.enum.string.operand.ending")), + CONTAIN(t("lima.enum.string.operand.contain")); protected String label; Modified: trunk/lima-callao/src/main/java/org/chorem/lima/beans/DateCondition.java =================================================================== --- trunk/lima-callao/src/main/java/org/chorem/lima/beans/DateCondition.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-callao/src/main/java/org/chorem/lima/beans/DateCondition.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -27,7 +27,7 @@ import java.io.Serializable; import java.util.Date; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * @author Sylvain Bavencoff <bavencoff@codelutin.com> @@ -69,10 +69,10 @@ } public static enum Operand implements Labeled { - SAME(_("lima.enum.date.operand.same")), - AFTER(_("lima.enum.date.operand.after")), - PREVIOUS(_("lima.enum.date.operand.previous")), - DIFFERENT(_("lima.enum.date.operand.different")); + SAME(t("lima.enum.date.operand.same")), + AFTER(t("lima.enum.date.operand.after")), + PREVIOUS(t("lima.enum.date.operand.previous")), + DIFFERENT(t("lima.enum.date.operand.different")); protected String label; Modified: trunk/lima-swing/src/license/THIRD-PARTY.properties =================================================================== --- trunk/lima-swing/src/license/THIRD-PARTY.properties 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/license/THIRD-PARTY.properties 2014-04-14 07:29:08 UTC (rev 3777) @@ -1,21 +1,23 @@ # Generated by org.codehaus.mojo.license.AddThirdPartyMojo #------------------------------------------------------------------------------- # Already used licenses in project : +# - AL 2.0 # - Apache 2 -# - Apache 2.0 # - Apache License 2.0 +# - Apache License, version 2.0 # - Apache Software License - Version 2.0 +# - Apache Software License 2.0 # - BSD # - BSD License # - CDDL # - CDDL 1.1 # - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 -# - CPL +# - Common Development and Distribution License # - Common Public License Version 1.0 +# - Eclipse Distribution License (EDL), Version 1.0 +# - Eclipse Public License (EPL), Version 1.0 # - Eclipse Public License - Version 1.0 -# - GNU General Lesser Public License (LGPL) version 3.0 -# - GNU LESSER GENERAL PUBLIC LICENSE -# - GNU Lesser General Public Licence +# - GNU General Public License, Version 2 with the Classpath Exception # - GNU Lesser General Public License # - GNU Library or Lesser General Public License # - GPL2 w/ CPE @@ -27,21 +29,20 @@ # - Lesser General Public License (LGPL) v 3.0 # - MIT License # - MPL 1.1 -# - Mozilla Public License Version 2.0 # - New BSD License +# - Public Domain # - The Apache Software License, Version 2.0 # - The H2 License, Version 1.0 # - http://asm.ow2.org/license.html # - http://www.apache.org/licenses/LICENSE-2.0.txt # - jdomlicence -# - license.txt #------------------------------------------------------------------------------- # Please fill the missing licenses for dependencies : # # -#Tue Jun 04 10:01:31 CEST 2013 -antlr--antlr--2.7.6=BSD License +#Fri Apr 11 18:18:52 CEST 2014 commons-jxpath--commons-jxpath--1.3=The Apache Software License, Version 2.0 commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0 dom4j--dom4j--1.6.1=jdomlicence -javax.transaction--jta--1.1=COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 +org.metatype.sxc--sxc-jaxb-core--0.8=CDDL 1.1 +org.metatype.sxc--sxc-runtime--0.8=CDDL 1.1 Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -49,8 +49,8 @@ import java.util.Locale; import java.util.Set; -import static org.nuiton.i18n.I18n._; -import static org.nuiton.i18n.I18n.n_; +import static org.nuiton.i18n.I18n.t; +import static org.nuiton.i18n.I18n.n; /** * La configuration de l'application. @@ -418,247 +418,247 @@ CONFIG_FILE(CONFIG_FILE_NAME, - _("lima.config.configFileName.label"), - n_("lima.config.configFileName.description"), + t("lima.config.configFileName.label"), + n("lima.config.configFileName.description"), "lima-config.properties", String.class, true, true), DATA_DIR("lima.data.dir", - _("lima.config.data.dir.label"), - n_("lima.config.data.dir.description"), + t("lima.config.data.dir.label"), + n("lima.config.data.dir.description"), "${user.home}/.lima", File.class, false, false), RESOURCES_DIRECTORY("lima.resources.dir", - _("lima.config.resources.dir.label"), - n_("lima.config.resources.dir.description"), + t("lima.config.resources.dir.label"), + n("lima.config.resources.dir.description"), "${lima.data.dir}/resources-${application.version}", String.class, false, false), I18N_DIRECTORY("lima.i18n.dir", - _("lima.config.i18n.dir.label"), - n_("lima.config.i18n.dir.description"), + t("lima.config.i18n.dir.label"), + n("lima.config.i18n.dir.description"), "${lima.resources.dir}/i18n", String.class, false, false), LOCALE("lima.ui.locale", - _("lima.config.locale.label"), - n_("lima.config.locale.description"), + t("lima.config.locale.label"), + n("lima.config.locale.description"), "fr_FR", Locale.class, false, false), DECIMAL_SEPARATOR("lima.data.bigDecimal.decimalSeparator", - _("lima.config.decimalseparator.label"), - n_("lima.config.decimalseparator.description"), + t("lima.config.decimalseparator.label"), + n("lima.config.decimalseparator.description"), ",", Character.class, false, false), SCALE("lima.data.bigDecimal.scale", - _("lima.config.scale.label"), - n_("lima.config.scale.description"), + t("lima.config.scale.label"), + n("lima.config.scale.description"), "2", Integer.class, false, false), THOUSAND_SEPARATOR("lima.thousandSeparator", - _("limma.config.thousandseparator.label"), - n_("limma.config.thousandseparator.description"), + t("limma.config.thousandseparator.label"), + n("limma.config.thousandseparator.description"), " ", Character.class, false, false), CURRENCY("lima.config.currency", - _("lima.config.currency.label"), - n_("lima.config.currency.description"), + t("lima.config.currency.label"), + n("lima.config.currency.description"), "false", Boolean.class, false, false), FULL_SCREEN("lima.ui.fullscreen", - _("lima.config.ui.fullscreen.label"), - n_("lima.config.ui.fullscreen.description"), + t("lima.config.ui.fullscreen.label"), + n("lima.config.ui.fullscreen.description"), "false", Boolean.class, false, false), LAUNCH_UI("lima.ui.launchui", - _("lima.config.ui.flaunchui.label"), - n_("lima.config.ui.flaunchui.description"), + t("lima.config.ui.flaunchui.label"), + n("lima.config.ui.flaunchui.description"), "true", Boolean.class, true, true), SUPPORT_EMAIL("lima.misc.supportemail", - _("lima.misc.supportemail.label"), - n_("lima.misc.supportemail.description"), + t("lima.misc.supportemail.label"), + n("lima.misc.supportemail.description"), "support@codelutin.com", String.class, false, false), OPENEJB_REMOTEMODE("lima.openejb.remotemode", - _("lima.openejb.remotemode.label"), - n_("lima.openejb.remotemode.description"), + t("lima.openejb.remotemode.label"), + n("lima.openejb.remotemode.description"), "false", String.class, false, false), LIMA_HOST_ADDRESS("lima.host.address", - _("lima.config.host.adress.label"), - n_("lima.config.host.adress.description"), + t("lima.config.host.adress.label"), + n("lima.config.host.adress.description"), "localhost", String.class, false, false), LIMA_STATE_FILE("lima.ui.state.file", - _("lima.config.state.file.label"), - n_("lima.config.state.file.description"), + t("lima.config.state.file.label"), + n("lima.config.state.file.description"), "${lima.data.dir}/limaState.xml", String.class, false, false), COLOR_SELECTION_FOCUS("lima.ui.table.cell.colorSelectionFocus", - _("lima.config.colorselectionfocus.label"), - n_("lima.config.colorselectionfocus.description"), + t("lima.config.colorselectionfocus.label"), + n("lima.config.colorselectionfocus.description"), "#000000", Color.class, false, false), SELECT_ALL_EDITING_CELL("lima.ui.table.cell.selectAllEditingCell", - _("lima.config.selectAllEditingCell.label"), - n_("lima.config.selectAllEditingCell.description"), + t("lima.config.selectAllEditingCell.label"), + n("lima.config.selectAllEditingCell.description"), "true", Boolean.class, false, false), TABLE_CELL_BACKGROUND("lima.ui.table.cell.background", - _("lima.config.cell.background.label"), - n_("lima.config.cell.background.description"), + t("lima.config.cell.background.label"), + n("lima.config.cell.background.description"), "#FFFFFF", Color.class, false, false), TABLE_CELL_FOREGROUND("lima.ui.table.cell.foreground", - _("lima.config.cell.foreground.label"), - n_("lima.config.cell.foreground.description"), + t("lima.config.cell.foreground.label"), + n("lima.config.cell.foreground.description"), "#000000", Color.class, false, false), TABLE_CELL_PAIR_BACKGROUND("lima.ui.table.cell.pair.background", - _("lima.config.cell.pair.background.label"), - n_("lima.config.cell.pair.background.description"), + t("lima.config.cell.pair.background.label"), + n("lima.config.cell.pair.background.description"), "#EEEEEE", Color.class, false, false), TABLE_CELL_PAIR_FOREGROUND("lima.ui.table.cell.pair.foreground", - _("lima.config.cell.pair.foreground.label"), - n_("lima.config.cell.pair.foreground.description"), + t("lima.config.cell.pair.foreground.label"), + n("lima.config.cell.pair.foreground.description"), "#000000", Color.class, false, false), TABLE_CELL_SELECTED_BACKGROUND("lima.ui.table.cell.selected.background", - _("lima.config.cell.selected.background.label"), - n_("lima.config.cell.selected.background.description"), + t("lima.config.cell.selected.background.label"), + n("lima.config.cell.selected.background.description"), "#0066CC", Color.class, false, false), TABLE_CELL_SELECTED_FOREGROUND("lima.ui.table.cell.selected.foreground", - _("lima.config.cell.selected.foreground.label"), - n_("lima.config.cell.selected.foreground.description"), + t("lima.config.cell.selected.foreground.label"), + n("lima.config.cell.selected.foreground.description"), "#FFFFFF", Color.class, false, false), TABLE_CELL_PAIR_SELECTED_BACKGROUND("lima.ui.table.cell.pair.selected.background", - _("lima.config.cell.pair.selected.background.label"), - n_("lima.config.cell.pair.selected.background.description"), + t("lima.config.cell.pair.selected.background.label"), + n("lima.config.cell.pair.selected.background.description"), "#006699", Color.class, false, false), TABLE_CELL_PAIR_SELECTED_FOREGROUND("lima.ui.table.cell.pair.selected.foreground", - _("lima.config.cell.pair.selected.foreground.label"), - n_("lima.config.cell.pair.selected.foreground.description"), + t("lima.config.cell.pair.selected.foreground.label"), + n("lima.config.cell.pair.selected.foreground.description"), "#FFFFFF", Color.class, false, false), TABLE_CELL_ERROR_BACKGROUND("lima.ui.table.cell.error.background", - _("lima.config.cell.error.background.label"), - n_("lima.config.cell.error.background.description"), + t("lima.config.cell.error.background.label"), + n("lima.config.cell.error.background.description"), "#FFFFFF", Color.class, false, false), TABLE_CELL_ERROR_FOREGROUND("lima.ui.table.cell.error.foreground", - _("lima.config.cell.error.foreground.label"), - n_("lima.config.cell.error.foreground.description"), + t("lima.config.cell.error.foreground.label"), + n("lima.config.cell.error.foreground.description"), "#FF0936", Color.class, false, false), TABLE_CELL_PAIR_ERROR_BACKGROUND("lima.ui.table.cell.pair.error.background", - _("lima.config.cell.pair.error.background.label"), - n_("lima.config.cell.pair.error.background.description"), + t("lima.config.cell.pair.error.background.label"), + n("lima.config.cell.pair.error.background.description"), "#EEEEEE", Color.class, false, false), TABLE_CELL_PAIR_ERROR_FOREGROUND("lima.ui.table.cell.pair.error.foreground", - _("lima.config.cell.pair.error.foreground.label"), - n_("lima.config.cell.pair.error.foreground.description"), + t("lima.config.cell.pair.error.foreground.label"), + n("lima.config.cell.pair.error.foreground.description"), "#FC0625", Color.class, false, false), TABLE_CELL_SELECTED_ERROR_BACKGROUND("lima.ui.table.cell.selected.error.background", - _("lima.config.cell.selected.error.background.label"), - n_("lima.config.cell.selected.error.background.description"), + t("lima.config.cell.selected.error.background.label"), + n("lima.config.cell.selected.error.background.description"), "#0066CC", Color.class, false, false), TABLE_CELL_SELECTED_ERROR_FOREGROUND("lima.ui.table.cell.selected.error.foreground", - _("lima.config.cell.selected.error.foreground.label"), - n_("lima.config.cell.selected.error.foreground.description"), + t("lima.config.cell.selected.error.foreground.label"), + n("lima.config.cell.selected.error.foreground.description"), "#C998C1", Color.class, false, false), TABLE_CELL_PAIR_SELECTED_ERROR_BACKGROUND("lima.ui.table.cell.pair.selected.error.background", - _("lima.config.cell.pair.selected.error.background.label"), - n_("lima.config.cell.pair.selected.error.background.description"), + t("lima.config.cell.pair.selected.error.background.label"), + n("lima.config.cell.pair.selected.error.background.description"), "#006699", Color.class, false, false), TABLE_CELL_PAIR_SELECTED_ERROR_FOREGROUND("lima.ui.table.cell.pair.selected.error.foreground", - _("lima.config.cell.pair.selected.error.foreground.label"), - n_("lima.config.cell.pair.selected.error.foreground.description"), + t("lima.config.cell.pair.selected.error.foreground.label"), + n("lima.config.cell.pair.selected.error.foreground.description"), "#C96678", Color.class, false, false), TABLE_CELL_MANDATORY_BACKGROUND("lima.ui.table.cell.mandatory.background", - _("lima.config.cell.mandatory.background.label"), - n_("lima.config.cell.mandatory.background.description"), + t("lima.config.cell.mandatory.background.label"), + n("lima.config.cell.mandatory.background.description"), "#FFCCCC", Color.class, false, false), TABLE_CELL_MANDATORY_FOREGROUND("lima.ui.table.cell.mandatory.foreground", - _("lima.config.cell.mandatory.foreground.label"), - n_("lima.config.cell.mandatory.foreground.description"), + t("lima.config.cell.mandatory.foreground.label"), + n("lima.config.cell.mandatory.foreground.description"), "#000000", Color.class, false, false), TABLE_CELL_PAIR_MANDATORY_BACKGROUND("lima.ui.table.cell.pair.mandatory.background", - _("lima.config.cell.pair.mandatory.background.label"), - n_("lima.config.cell.pair.mandatory.background.description"), + t("lima.config.cell.pair.mandatory.background.label"), + n("lima.config.cell.pair.mandatory.background.description"), "#FF99CC", Color.class, false, false), TABLE_CELL_PAIR_MANDATORY_FOREGROUND("lima.ui.table.cell.pair.mandatory.foreground", - _("lima.config.cell.pair.mandatory.foreground.label"), - n_("lima.config.cell.pair.mandatory.foreground.description"), + t("lima.config.cell.pair.mandatory.foreground.label"), + n("lima.config.cell.pair.mandatory.foreground.description"), "#000000", Color.class, false, false), TABLE_CELL_SELECTED_MANDATORY_BACKGROUND("lima.ui.table.cell.selected.mandatory.background", - _("lima.config.cell.selected.mandatory.background.label"), - n_("lima.config.cell.selected.mandatory.background.description"), + t("lima.config.cell.selected.mandatory.background.label"), + n("lima.config.cell.selected.mandatory.background.description"), "#FF0000", Color.class, false, false), TABLE_CELL_SELECTED_MANDATORY_FOREGROUND("lima.ui.table.cell.selected.mandatory.foreground", - _("lima.config.cell.selected.mandatory.foreground.label"), - n_("lima.config.cell.selected.mandatory.foreground.description"), + t("lima.config.cell.selected.mandatory.foreground.label"), + n("lima.config.cell.selected.mandatory.foreground.description"), "#FFFFFF", Color.class, false, false), TABLE_CELL_PAIR_SELECTED_MANDATORY_BACKGROUND("lima.ui.table.cell.pair.selected.mandatory.background", - _("lima.config.cell.pair.selected.mandatory.background.label"), - n_("lima.config.cell.pair.selected.mandatory.background.description"), + t("lima.config.cell.pair.selected.mandatory.background.label"), + n("lima.config.cell.pair.selected.mandatory.background.description"), "#990000", Color.class, false, false), TABLE_CELL_PAIR_SELECTED_MANDATORY_FOREGROUND("lima.ui.table.cell.pair.selected.mandatory.foreground", - _("lima.config.cell.pair.selected.mandatory.foreground.label"), - n_("lima.config.cell.pair.selected.mandatory.foreground.description"), + t("lima.config.cell.pair.selected.mandatory.foreground.label"), + n("lima.config.cell.pair.selected.mandatory.foreground.description"), "#000000", Color.class, false, false); @@ -725,7 +725,7 @@ @Override public String getDescription() { - return _(description); + return t(description); } @Override @@ -742,7 +742,7 @@ /** Lima action definition. */ public enum Action { - HELP(n_("lima.action.commandline.help"), MiscAction.class.getName() + "#help", "-h", "--help"); + HELP(n("lima.action.commandline.help"), MiscAction.class.getName() + "#help", "-h", "--help"); /** Before init action step. */ public static final int BEFORE_EXIT_STEP = 0; @@ -763,7 +763,7 @@ } public String getDescription() { - return _(description); + return t(description); } } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaExceptionHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/LimaExceptionHandler.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaExceptionHandler.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,7 +25,7 @@ package org.chorem.lima; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; import javax.swing.JOptionPane; @@ -71,7 +71,7 @@ if (cause instanceof LimaBusinessException) { JOptionPane.showMessageDialog(null, cause.getMessage(), - _("lima.ui.common.error"), JOptionPane.ERROR_MESSAGE); + t("lima.ui.common.error"), JOptionPane.ERROR_MESSAGE); } else { ErrorHelper errorHelper = new ErrorHelper(LimaConfig.getInstance()); errorHelper.showErrorDialog(null, ex.getMessage(), ex); Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,15 +25,7 @@ package org.chorem.lima; -import static org.nuiton.i18n.I18n._; - -import java.util.Arrays; -import java.util.Date; - -import javax.swing.SwingUtilities; - import jaxx.runtime.SwingUtil; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.api.AccountService; @@ -43,6 +35,12 @@ import org.chorem.lima.ui.MainViewHandler; import org.chorem.lima.ui.opening.OpeningView; +import javax.swing.*; +import java.util.Arrays; +import java.util.Date; + +import static org.nuiton.i18n.I18n.t; + /** * Lima GUI main class. * @@ -129,12 +127,12 @@ } catch (Exception e) { // could not find nimbus look-and-feel if (log.isWarnEnabled()) { - log.warn(_("lima.warning.nimbus.landf")); + log.warn(t("lima.warning.nimbus.landf")); } } splash.drawVersion(config.getVersion()); - splash.updateProgression(0.1, _("lima.splash.1")); + splash.updateProgression(0.1, t("lima.splash.1")); LimaServiceFactory.initFactory(config); // do init ui @@ -147,7 +145,7 @@ // load accounts and test if there is an account plan defined // if not, call #loadDefaultAccount() - splash.updateProgression(0.7, _("lima.splash.2")); + splash.updateProgression(0.7, t("lima.splash.2")); //start http server LimaServiceFactory.getService(HttpServerService.class).start(); @@ -164,7 +162,7 @@ openingView.setLocationRelativeTo(null); openingView.setVisible(true); } else { - splash.updateProgression(1, _("lima.splash.3")); + splash.updateProgression(1, t("lima.splash.3")); } // show ui SwingUtilities.invokeLater(new Runnable() { @@ -189,12 +187,12 @@ // force to kill main thread if (log.isInfoEnabled()) { - log.info(_("lima.init.closed", new Date())); + log.info(t("lima.init.closed", new Date())); } Runtime.getRuntime().halt(0); } catch (Exception ex) { if (log.isErrorEnabled()) { - log.error(_("lima.init.errorclosing"), ex); + log.error(t("lima.init.errorclosing"), ex); } Runtime.getRuntime().halt(1); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/actions/MiscAction.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/actions/MiscAction.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/actions/MiscAction.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -30,7 +30,7 @@ import java.util.Arrays; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * Les actions appellables via {@link LimaMain}. @@ -51,7 +51,7 @@ } public void help() { - System.out.println(_("lima.message.help.usage")); + System.out.println(t("lima.message.help.usage")); for (LimaConfig.Option o : LimaConfig.Option.values()) { System.out.println("\t" + o.key + "(" + o.defaultValue + "):" + o.getDescription()); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxAccountsEnum.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxAccountsEnum.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxAccountsEnum.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,14 +25,14 @@ package org.chorem.lima.enums; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; public enum ComboBoxAccountsEnum { - ALL(_("lima.enum.comboboxaccount.allaccount")), - ACCOUNT(_("lima.enum.comboboxaccount.account")), - ACCOUNT_LIST(_("lima.enum.comboboxaccount.accountlist")); + ALL(t("lima.enum.comboboxaccount.allaccount")), + ACCOUNT(t("lima.enum.comboboxaccount.account")), + ACCOUNT_LIST(t("lima.enum.comboboxaccount.accountlist")); private final String description; Modified: trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxDatesEnum.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxDatesEnum.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxDatesEnum.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,7 +25,7 @@ package org.chorem.lima.enums; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * Enumeration representant un choix de type de periode. @@ -43,9 +43,9 @@ */ public enum ComboBoxDatesEnum { - FISCAL_PERIOD(_("lima.enum.comboboxperiod.fiscalperiod")), - FINANCIAL_PERIOD(_("lima.enum.comboboxperiod.financialperiod")), - PERIOD(_("lima.enum.comboboxperiod.period")); + FISCAL_PERIOD(t("lima.enum.comboboxperiod.fiscalperiod")), + FINANCIAL_PERIOD(t("lima.enum.comboboxperiod.financialperiod")), + PERIOD(t("lima.enum.comboboxperiod.period")); protected String description; Modified: trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxEntryBooksEnum.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxEntryBooksEnum.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxEntryBooksEnum.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,13 +25,13 @@ package org.chorem.lima.enums; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; public enum ComboBoxEntryBooksEnum { - ALL(_("lima.enum.comboboxentrybook.all")), - SELECT_ONE(_("lima.enum.comboboxentrybook.select_one")); + ALL(t("lima.enum.comboboxentrybook.all")), + SELECT_ONE(t("lima.enum.comboboxentrybook.select_one")); private final String description; Modified: trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxLetterEnum.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxLetterEnum.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxLetterEnum.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,13 +25,13 @@ package org.chorem.lima.enums; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; public enum ComboBoxLetterEnum { - ALL(_("lima.enum.comboboxletter.all")), - SELECT_ONE(_("lima.enum.comboboxletter.selectone")); + ALL(t("lima.enum.comboboxletter.all")), + SELECT_ONE(t("lima.enum.comboboxletter.selectone")); private final String description; Modified: trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxOperatorsEnum.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxOperatorsEnum.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxOperatorsEnum.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,18 +25,18 @@ package org.chorem.lima.enums; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; public enum ComboBoxOperatorsEnum { - EQUAL(_("lima.enum.comboboxoperator.equal"), "="), - SUPERIOR_OR_EQUAL(_("lima.enum.comboboxoperator.superiororequal"), ">="), - INFERIOR_OR_EQUAL(_("lima.enum.comboboxoperator.inferiororequal"), "<="), - SUPERIOR(_("lima.enum.comboboxoperator.superior"), ">"), - INFERIOR(_("lima.enum.comboboxoperator.inferior"), "<"), - INTERVAL(_("lima.enum.comboboxoperator.interval"), ""), - NOT_EQUAL(_("lima.enum.comboboxoperator.notequal"), "!="); + EQUAL(t("lima.enum.comboboxoperator.equal"), "="), + SUPERIOR_OR_EQUAL(t("lima.enum.comboboxoperator.superiororequal"), ">="), + INFERIOR_OR_EQUAL(t("lima.enum.comboboxoperator.inferiororequal"), "<="), + SUPERIOR(t("lima.enum.comboboxoperator.superior"), ">"), + INFERIOR(t("lima.enum.comboboxoperator.inferior"), "<"), + INTERVAL(t("lima.enum.comboboxoperator.interval"), ""), + NOT_EQUAL(t("lima.enum.comboboxoperator.notequal"), "!="); private final String description; Modified: trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxPeriodEnum.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxPeriodEnum.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxPeriodEnum.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,15 +25,15 @@ package org.chorem.lima.enums; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; public enum ComboBoxPeriodEnum { - PERIOD(_("lima.enum.comboboxperiod.period")), - DATE(_("lima.enum.comboboxperiod.date")), - FISCAL_PERIOD(_("lima.enum.comboboxperiod.fiscalperiod")), - FINANCIAL_PERIOD(_("lima.enum.comboboxperiod.financialperiod")); + PERIOD(t("lima.enum.comboboxperiod.period")), + DATE(t("lima.enum.comboboxperiod.date")), + FISCAL_PERIOD(t("lima.enum.comboboxperiod.fiscalperiod")), + FINANCIAL_PERIOD(t("lima.enum.comboboxperiod.financialperiod")); private final String description; Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/Filter/BigDecimalCondition/CreditConditionView.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/Filter/BigDecimalCondition/CreditConditionView.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/Filter/BigDecimalCondition/CreditConditionView.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -24,7 +24,7 @@ * #L% */ -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * @author Sylvain Bavencoff <bavencoff@codelutin.com> @@ -34,7 +34,7 @@ public CreditConditionView() { super(); setHandler(new CreditConditionHandler(this)); - getLabel().setText(_("lima.ui.financialtransaction.credit")); + getLabel().setText(t("lima.ui.financialtransaction.credit")); getBigDecimaleditor().setBean(handler); getBigDecimaleditor().init(); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/Filter/BigDecimalCondition/DebitConditionView.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/Filter/BigDecimalCondition/DebitConditionView.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/Filter/BigDecimalCondition/DebitConditionView.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -24,7 +24,7 @@ * #L% */ -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * @author Sylvain Bavencoff <bavencoff@codelutin.com> @@ -34,7 +34,7 @@ public DebitConditionView() { super(); setHandler(new DebitConditionHandler(this)); - getLabel().setText(_("lima.ui.financialtransaction.debit")); + getLabel().setText(t("lima.ui.financialtransaction.debit")); getBigDecimaleditor().setBean(handler); getBigDecimaleditor().init(); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/Filter/StringCondition/DescriptionConditionView.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/Filter/StringCondition/DescriptionConditionView.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/Filter/StringCondition/DescriptionConditionView.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -24,7 +24,7 @@ * #L% */ -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * @author Sylvain Bavencoff <bavencoff@codelutin.com> @@ -34,6 +34,6 @@ public DescriptionConditionView() { super(); setHandler(new DescriptionConditionHandler(this)); - getLabel().setText(_("lima.ui.financialtransaction.description")); + getLabel().setText(t("lima.ui.financialtransaction.description")); } } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/Filter/StringCondition/LetteringConditionView.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/Filter/StringCondition/LetteringConditionView.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/Filter/StringCondition/LetteringConditionView.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -24,7 +24,7 @@ * #L% */ -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * @author Sylvain Bavencoff <bavencoff@codelutin.com> @@ -34,6 +34,6 @@ public LetteringConditionView() { super(); setHandler(new LetteringConditionHandler(this)); - getLabel().setText(_("lima.ui.financialtransaction.letter")); + getLabel().setText(t("lima.ui.financialtransaction.letter")); } } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/Filter/StringCondition/VoucherConditionView.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/Filter/StringCondition/VoucherConditionView.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/Filter/StringCondition/VoucherConditionView.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -24,7 +24,7 @@ * #L% */ -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * @author Sylvain Bavencoff <bavencoff@codelutin.com> @@ -34,7 +34,7 @@ public VoucherConditionView() { super(); setHandler(new VoucherConditionHandler(this)); - getLabel().setText(_("lima.ui.financialtransaction.voucher")); + getLabel().setText(t("lima.ui.financialtransaction.voucher")); } } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -70,7 +70,7 @@ import java.net.URL; import java.util.Locale; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * Handler for main view. @@ -190,18 +190,18 @@ ConfigUIHelper helper = new ConfigUIHelper(config); - helper.registerCallBack(LimaConfig.Option.COLOR_SELECTION_FOCUS.key, _("lima.config.colorselectionfocus"), new ImageIcon(), new Runnable() { + helper.registerCallBack(LimaConfig.Option.COLOR_SELECTION_FOCUS.key, t("lima.config.colorselectionfocus"), new ImageIcon(), new Runnable() { @Override public void run() { UIManager.put("Table.focusCellHighlightBorder", new BorderUIResource(new LineBorder(config.getColorSelectionFocus(), 2))); } }); - helper.addCategory(_("lima.config.category.directories"), _("lima.config.category.directories.description")); + helper.addCategory(t("lima.config.category.directories"), t("lima.config.category.directories.description")); helper.addOption(LimaConfig.Option.CONFIG_FILE); helper.setOptionShortLabel(LimaConfig.Option.CONFIG_FILE.getLabel()); - helper.addCategory(_("lima.config.category.table"), _("lima.config.category.table.description")); + helper.addCategory(t("lima.config.category.table"), t("lima.config.category.table.description")); helper.addOption(LimaConfig.Option.TABLE_CELL_BACKGROUND); helper.setOptionShortLabel(LimaConfig.Option.TABLE_CELL_BACKGROUND.getLabel()); helper.addOption(LimaConfig.Option.TABLE_CELL_FOREGROUND); @@ -254,7 +254,7 @@ helper.setOptionShortLabel(LimaConfig.Option.COLOR_SELECTION_FOCUS.getLabel()); - helper.addCategory(_("lima.config.category.other"), _("lima.config.category.other.description")); + helper.addCategory(t("lima.config.category.other"), t("lima.config.category.other.description")); helper.addOption(LimaConfig.Option.FULL_SCREEN); helper.setOptionShortLabel(LimaConfig.Option.FULL_SCREEN.getLabel()); helper.addOption(LimaConfig.Option.LOCALE); @@ -287,7 +287,7 @@ helper.addOption(LimaConfig.Option.SELECT_ALL_EDITING_CELL); helper.setOptionShortLabel(LimaConfig.Option.SELECT_ALL_EDITING_CELL.getLabel()); - helper.buildUI(context, _("lima.config.category.directories")); + helper.buildUI(context, t("lima.config.category.directories")); helper.displayUI(ui, false); } @@ -306,8 +306,8 @@ public void showAbout(JAXXContext context) { MainView ui = getUI(context); AboutPanel about = new AboutPanel(); - about.setTitle(_("lima.title.about")); - about.setAboutText(_("lima.title.about.description")); + about.setTitle(t("lima.title.about")); + about.setAboutText(t("lima.title.about.description")); about.setBottomText(ui.getConfig().getCopyrightText()); about.setIconPath("/icons/lima.png"); about.setLicenseFile("META-INF/lima-LICENSE.txt"); @@ -321,10 +321,10 @@ translateArea.setFont(translateArea.getFont().deriveFont((float) 11)); } translateArea.setBorder(null); - String text = _("lima.about.translate.content"); + String text = t("lima.about.translate.content"); translateArea.setText(text); component.getViewport().add(translateArea); - about.getTabs().add(_("lima.title.about.translate"), component); + about.getTabs().add(t("lima.title.about.translate"), component); about.init(); about.showInDialog(ui, true); } @@ -389,7 +389,7 @@ public void showHomeView(JAXXContext rootContext) { MainView mainView = getUI(rootContext); HomeView homeView = new HomeView(mainView); - showTab(mainView, _("lima.tab.home"), homeView, false); + showTab(mainView, t("lima.tab.home"), homeView, false); } public void showIdentity(JAXXContext rootContext) { @@ -407,7 +407,7 @@ public void showAccountView(JAXXContext rootContext) { MainView mainView = getUI(rootContext); AccountView accountView = new AccountView(mainView); - showTab(mainView, _("lima.charts.account"), accountView); + showTab(mainView, t("lima.charts.account"), accountView); swingSession.add(accountView); } @@ -419,7 +419,7 @@ public void showEntryBookView(JAXXContext rootContext) { MainView mainView = getUI(rootContext); EntryBookView entryBookView = new EntryBookView(mainView); - showTab(mainView, _("lima.common.entrybooks"), entryBookView); + showTab(mainView, t("lima.common.entrybooks"), entryBookView); swingSession.add(entryBookView); } @@ -431,7 +431,7 @@ public void showFiscalPeriodView(JAXXContext rootContext) { MainView mainView = getUI(rootContext); FiscalPeriodView fiscalPeriodView = new FiscalPeriodView(mainView); - showTab(mainView, _("lima.charts.fiscalyear"), fiscalPeriodView); + showTab(mainView, t("lima.charts.fiscalyear"), fiscalPeriodView); swingSession.add(fiscalPeriodView); } @@ -444,7 +444,7 @@ MainView mainView = getUI(rootContext); FinancialPeriodView financialPeriodView = new FinancialPeriodView(mainView); - showTab(mainView, _("lima.charts.financialperiod"), financialPeriodView); + showTab(mainView, t("lima.charts.financialperiod"), financialPeriodView); swingSession.add(financialPeriodView); } @@ -457,7 +457,7 @@ MainView mainView = getUI(rootContext); FinancialStatementChartView financialStatementView = new FinancialStatementChartView(mainView); - showTab(mainView, _("lima.charts.financialstatement"), financialStatementView); + showTab(mainView, t("lima.charts.financialstatement"), financialStatementView); swingSession.add(financialStatementView); } @@ -469,7 +469,7 @@ public void showVatChartView(JAXXContext rootContext) { MainView mainView = getUI(rootContext); VatChartView vatChartView = new VatChartView(mainView); - showTab(mainView, _("lima.charts.vatstatement"), vatChartView); + showTab(mainView, t("lima.charts.vatstatement"), vatChartView); swingSession.add(vatChartView); } @@ -482,7 +482,7 @@ MainView mainView = getUI(rootContext); AccountsReportsView accountsReportsView = new AccountsReportsView(mainView); - showTab(mainView, _("lima.reports.accounts"), accountsReportsView); + showTab(mainView, t("lima.reports.accounts"), accountsReportsView); swingSession.add(accountsReportsView); } @@ -495,7 +495,7 @@ MainView mainView = getUI(rootContext); EntryBooksReportsView entryBooksReportsView = new EntryBooksReportsView(mainView); - showTab(mainView, _("lima.reports.entrybooks"), entryBooksReportsView); + showTab(mainView, t("lima.reports.entrybooks"), entryBooksReportsView); swingSession.add(entryBooksReportsView); } @@ -509,7 +509,7 @@ MainView mainView = getUI(rootContext); FinancialTransactionView transactionView = new FinancialTransactionView(mainView); - showTab(mainView, _("lima.entries.writetransaction"), + showTab(mainView, t("lima.entries.writetransaction"), transactionView); swingSession.add(transactionView); } @@ -518,7 +518,7 @@ MainView mainView = getUI(rootContext); FinancialTransactionUnbalancedView searchResultView = new FinancialTransactionUnbalancedView(mainView); - showTab(mainView, _("lima.entries.searchunbalancedtransaction"), + showTab(mainView, t("lima.entries.searchunbalancedtransaction"), searchResultView); swingSession.add(searchResultView); } @@ -527,28 +527,28 @@ MainView mainView = getUI(rootContext); FinancialTransactionSearchView searchView = new FinancialTransactionSearchView(mainView); - showTab(mainView, _("lima.entries.searchtransaction"), searchView); + showTab(mainView, t("lima.entries.searchtransaction"), searchView); swingSession.add(searchView); } public void showLetteringView(JAXXContext rootContext) { MainView mainView = getUI(rootContext); LetteringView letteringView = new LetteringView(mainView); - showTab(mainView, _("lima.entries.lettering"), letteringView); + showTab(mainView, t("lima.entries.lettering"), letteringView); swingSession.add(letteringView); } public void showBalanceView(JAXXContext rootContext) { MainView mainView = getUI(rootContext); BalanceReportsView balanceView = new BalanceReportsView(mainView); - showTab(mainView, _("lima.reports.balance"), balanceView); + showTab(mainView, t("lima.reports.balance"), balanceView); swingSession.add(balanceView); } public void showLedgerView(JAXXContext rootContext) { MainView mainView = getUI(rootContext); LedgerView ledgerView = new LedgerView(mainView); - showTab(mainView, _("lima.reports.ledger"), ledgerView); + showTab(mainView, t("lima.reports.ledger"), ledgerView); swingSession.add(ledgerView); } @@ -556,7 +556,7 @@ MainView mainView = getUI(rootContext); FinancialStatementReportView financialStatementReportView = new FinancialStatementReportView(mainView); - showTab(mainView, _("lima.reports.financialstatement"), + showTab(mainView, t("lima.reports.financialstatement"), financialStatementReportView); swingSession.add(financialStatementReportView); } @@ -564,7 +564,7 @@ public void showVatReportView(JAXXContext rootContext) { MainView mainView = getUI(rootContext); VatReportView vatReportView = new VatReportView(mainView); - showTab(mainView, _("lima.reports.vat"), vatReportView); + showTab(mainView, t("lima.reports.vat"), vatReportView); swingSession.add(vatReportView); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx 2014-04-14 07:29:08 UTC (rev 3777) @@ -45,18 +45,18 @@ <JToolBar floatable="false"> <JButton id="addButton" - toolTipText="{ _("lima.ui.account.addaccount") + " (Ctrl+N)"}" + toolTipText="{ t("lima.ui.account.addaccount") + " (Ctrl+N)"}" actionIcon='account-new' onActionPerformed="handler.addAccount()"/> <JButton id="updateButton" - toolTipText="{ _("lima.ui.common.update") + " (Ctrl+M)"}" + toolTipText="{ t("lima.ui.common.update") + " (Ctrl+M)"}" actionIcon='account-edit' onActionPerformed="handler.updateAccount()" enabled="{isSelectedRow()}"/> <JButton id="removeButton" - toolTipText="{ _("lima.ui.common.remove") + " (Del)"}" + toolTipText="{ t("lima.ui.common.remove") + " (Del)"}" actionIcon='account-remove' onActionPerformed="handler.removeAccount()" enabled="{isSelectedRow()}"/> Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -58,7 +58,7 @@ import java.util.SortedMap; import java.util.TreeMap; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * Handler associated with account view. @@ -212,7 +212,7 @@ // refreshing tree's model DefaultTreeTableModel model = new AccountTreeTableModel(root); - model.setColumnIdentifiers(Arrays.asList(_("lima.table.number"), _("lima.table.label"))); + model.setColumnIdentifiers(Arrays.asList(t("lima.table.number"), t("lima.table.label"))); JXTreeTable table = view.getAccountsTreeTable(); table.setTreeTableModel(model); } @@ -386,8 +386,8 @@ Account account = (Account)lastNode.getUserObject(); int response = JOptionPane.showConfirmDialog(view, - _("lima.ui.account.removeaccountconfirm", account.getAccountNumber()), - _("lima.ui.account.removeaccounttitle"), + t("lima.ui.account.removeaccountconfirm", account.getAccountNumber()), + t("lima.ui.account.removeaccounttitle"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (response == JOptionPane.YES_OPTION) { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceTableModel.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceTableModel.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,7 +25,7 @@ package org.chorem.lima.ui.balance; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; import java.math.BigDecimal; import java.util.List; @@ -96,22 +96,22 @@ String res = "n/a"; switch (column) { case 0: - res = _("lima.table.number"); // Numero de compte + res = t("lima.table.number"); // Numero de compte break; case 1: - res = _("lima.table.label"); // Label + res = t("lima.table.label"); // Label break; case 2: - res = _("lima.table.move.debit"); // Total Debit + res = t("lima.table.move.debit"); // Total Debit break; case 3: - res = _("lima.table.move.credit"); // Total Credit + res = t("lima.table.move.credit"); // Total Credit break; case 4: - res = _("lima.table.solde.debit"); //Solde Debit + res = t("lima.table.solde.debit"); //Solde Debit break; case 5: - res = _("lima.table.solde.credit"); //Solde Credit + res = t("lima.table.solde.credit"); //Solde Credit break; } return res; Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/NumberSeparatorCellRenderer.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/NumberSeparatorCellRenderer.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/NumberSeparatorCellRenderer.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -30,7 +30,7 @@ import java.awt.*; import java.util.Map; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * @author Sylvain Bavencoff <bavencoff@codelutin.com> @@ -51,7 +51,7 @@ if (separatorLabel == null) { separatorLabel = ""; } else { - separatorLabel = _(separatorLabel); + separatorLabel = t(separatorLabel); } separatorLabel += " \"" + separator + "\""; } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTableModel.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTableModel.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -32,7 +32,7 @@ import java.util.Comparator; import java.util.List; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * @author Sylvain Bavencoff <bavencoff@codelutin.com> @@ -172,7 +172,7 @@ @Override public String getColumnName(int column) { - String result = _("lima.ui.nonaffect"); + String result = t("lima.ui.nonaffect"); if (column >= 0 && column < columns.size()) { result = columns.get(column).getColumnName(); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/IntervalPanel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/IntervalPanel.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/IntervalPanel.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -23,13 +23,14 @@ */ package org.chorem.lima.ui.common; -import static org.nuiton.i18n.I18n._; +import org.apache.commons.lang3.time.DateUtils; +import org.chorem.lima.entity.FinancialPeriod; +import org.chorem.lima.entity.FiscalPeriod; +import org.chorem.lima.enums.ComboBoxDatesEnum; +import org.jdesktop.swingx.JXDatePicker; -import java.awt.BorderLayout; -import java.awt.CardLayout; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.Insets; +import javax.swing.*; +import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; @@ -39,16 +40,8 @@ import java.util.Date; import java.util.List; -import javax.swing.JComboBox; -import javax.swing.JLabel; -import javax.swing.JPanel; +import static org.nuiton.i18n.I18n.t; -import org.apache.commons.lang3.time.DateUtils; -import org.chorem.lima.entity.FinancialPeriod; -import org.chorem.lima.entity.FiscalPeriod; -import org.chorem.lima.enums.ComboBoxDatesEnum; -import org.jdesktop.swingx.JXDatePicker; - /** * Panel permettant de selectionner un interval de date suivant plusieurs type * possible: @@ -128,7 +121,7 @@ specificTypePanel.add(financialPeriodComboBox, ComboBoxDatesEnum.FINANCIAL_PERIOD.name()); JPanel periodPanel = new JPanel(new GridBagLayout()); - JLabel beginLabel = new JLabel(_("lima.common.begindate")); + JLabel beginLabel = new JLabel(t("lima.common.begindate")); periodPanel.add(beginLabel, new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(1, 1, 1, 1), 0, 0)); @@ -139,7 +132,7 @@ GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(1, 1, 1, 1), 0, 0)); - JLabel endLabel = new JLabel(_("lima.common.enddate")); + JLabel endLabel = new JLabel(t("lima.common.enddate")); periodPanel.add(endLabel, new GridBagConstraints(2, 0, 1, 1, 0, 0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(1, 1, 1, 1), 0, 0)); Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookTableModel.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookTableModel.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -29,7 +29,7 @@ import org.chorem.lima.ui.common.AbstractColumn; import org.chorem.lima.ui.common.AbstractLimaTableModel; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * Entry book table model only rendering entry book list. @@ -48,13 +48,13 @@ @Override protected void initColumn() { - addColumn(new AbstractColumn<EntryBookTableModel>(String.class, _("lima.ui.entrybook.code"), false) { + addColumn(new AbstractColumn<EntryBookTableModel>(String.class, t("lima.ui.entrybook.code"), false) { @Override public Object getValueAt(int row) { return tableModel.get(row).getCode(); } }); - addColumn(new AbstractColumn<EntryBookTableModel>(String.class, _("lima.ui.entrybook.label"), false) { + addColumn(new AbstractColumn<EntryBookTableModel>(String.class, t("lima.ui.entrybook.label"), false) { @Override public Object getValueAt(int row) { return tableModel.get(row).getLabel(); Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookView.jaxx 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookView.jaxx 2014-04-14 07:29:08 UTC (rev 3777) @@ -45,18 +45,18 @@ <JToolBar floatable="false"> <JButton id="addButton" - toolTipText="{ _("lima.ui.entrybook.add") + " (Ctrl+N)"}" + toolTipText="{ t("lima.ui.entrybook.add") + " (Ctrl+N)"}" actionIcon='entryBook-new' onActionPerformed="handler.addEntryBook()"/> <JButton id="updateButton" - toolTipText="{ _("lima.ui.entrybook.update") + " (Ctrl+M)"}" + toolTipText="{ t("lima.ui.entrybook.update") + " (Ctrl+M)"}" actionIcon='entryBook-edit' onActionPerformed="handler.updateEntryBook()" enabled="{isSelectedRow()}"/> <JButton id="removeButton" - toolTipText="{ _("lima.ui.entrybook.remove") + " (Del)"}" + toolTipText="{ t("lima.ui.entrybook.remove") + " (Del)"}" actionIcon='entryBook-remove' onActionPerformed="handler.deleteEntryBook()" enabled="{isSelectedRow()}"/> Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -45,7 +45,7 @@ import java.awt.event.MouseEvent; import java.util.List; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * Handler for entry book view. @@ -223,8 +223,8 @@ EntryBook selectedEntryBook = entryBookTableModel.get(selectedRow); int response = JOptionPane.showConfirmDialog(view, - _("lima.ui.entrybook.deletemessage", selectedEntryBook.getLabel()), - _("lima.ui.entrybook.deletetitle"), JOptionPane.YES_NO_OPTION, + t("lima.ui.entrybook.deletemessage", selectedEntryBook.getLabel()), + t("lima.ui.entrybook.deletetitle"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (response == JOptionPane.YES_OPTION) { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -36,7 +36,7 @@ import java.text.SimpleDateFormat; import java.util.Date; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * Entry book table model. @@ -107,25 +107,25 @@ String res = "n/a"; switch (column) { case 0: - res = _("lima.table.date"); + res = t("lima.table.date"); break; case 1: - res = _("lima.table.account"); + res = t("lima.table.account"); break; case 2: - res = _("lima.table.voucher"); + res = t("lima.table.voucher"); break; case 3: - res = _("lima.table.description"); + res = t("lima.table.description"); break; case 4: - res = _("lima.table.letter"); + res = t("lima.table.letter"); break; case 5: - res = _("lima.table.debit"); + res = t("lima.table.debit"); break; case 6: - res = _("lima.table.credit"); + res = t("lima.table.credit"); break; } return res; Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -33,7 +33,7 @@ import java.util.Date; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * Financial period table model. @@ -52,7 +52,7 @@ @Override protected void initColumn() { - addColumn(new AbstractColumn<FinancialPeriodTableModel>(Date.class, _("lima.ui.financialperiod.begin"), false) { + addColumn(new AbstractColumn<FinancialPeriodTableModel>(Date.class, t("lima.ui.financialperiod.begin"), false) { @Override public Object getValueAt(int row) { ClosedPeriodicEntryBook closedPeriodicEntryBook = tableModel.get(row); @@ -61,7 +61,7 @@ } }); - addColumn(new AbstractColumn<FinancialPeriodTableModel>(Date.class, _("lima.ui.financialperiod.end"), false) { + addColumn(new AbstractColumn<FinancialPeriodTableModel>(Date.class, t("lima.ui.financialperiod.end"), false) { @Override public Object getValueAt(int row) { ClosedPeriodicEntryBook closedPeriodicEntryBook = tableModel.get(row); @@ -70,7 +70,7 @@ } }); - addColumn(new AbstractColumn<FinancialPeriodTableModel>(EntryBook.class, _("lima.ui.financialperiod.entrybook"), false) { + addColumn(new AbstractColumn<FinancialPeriodTableModel>(EntryBook.class, t("lima.ui.financialperiod.entrybook"), false) { @Override public Object getValueAt(int row) { ClosedPeriodicEntryBook closedPeriodicEntryBook = tableModel.get(row); @@ -78,13 +78,13 @@ } }); - addColumn(new AbstractColumn<FinancialPeriodTableModel>(String.class, _("lima.ui.financialperiod.status"), false) { + addColumn(new AbstractColumn<FinancialPeriodTableModel>(String.class, t("lima.ui.financialperiod.status"), false) { @Override public Object getValueAt(int row) { ClosedPeriodicEntryBook closedPeriodicEntryBook = tableModel.get(row); - String status = _("lima.common.open"); + String status = t("lima.common.open"); if (closedPeriodicEntryBook.getLocked()) { - status = _("lima.common.closed"); + status = t("lima.common.closed"); } return status; } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx 2014-04-14 07:29:08 UTC (rev 3777) @@ -30,7 +30,7 @@ org.chorem.lima.entity.FinancialPeriod org.chorem.lima.ui.financialperiod.FinancialPeriodTable org.chorem.lima.ui.financialperiod.FinancialPeriodTableModel - static org.nuiton.i18n.I18n._ + static org.nuiton.i18n.I18n.t </import> <FinancialPeriodViewHandler id="handler" constructorParams="this"/> @@ -47,7 +47,7 @@ <JToolBar floatable="false"> <JButton id="blockButton" - toolTipText="{ _("lima.ui.financialperiod.block") + " (Ctrl+C)"}" + toolTipText="{ t("lima.ui.financialperiod.block") + " (Ctrl+C)"}" actionIcon='financialPeriod-close' onActionPerformed="handler.blockFinancialPeriod()" enabled="{isSelectedPeriod()}"/> Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -42,7 +42,7 @@ import java.util.Collections; import java.util.List; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * Handler for FinancialPeriodView. @@ -110,8 +110,8 @@ // blocked it ClosedPeriodicEntryBook closedPeriodicEntryBook = model.get(selectedRow); - int response = JOptionPane.showConfirmDialog(view, _("lima.ui.financialperiod.blockmessage"), - _("lima.ui.financialperiod.blocktitle"), + int response = JOptionPane.showConfirmDialog(view, t("lima.ui.financialperiod.blockmessage"), + t("lima.ui.financialperiod.blocktitle"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (response == JOptionPane.YES_OPTION) { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTableModel.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTableModel.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,7 +25,7 @@ package org.chorem.lima.ui.financialstatementchart; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; import java.util.List; @@ -78,19 +78,19 @@ String res = null; switch (column) { case 0: - res = _("lima.table.label"); + res = t("lima.table.label"); break; case 1: - res = _("lima.table.debitcredit"); + res = t("lima.table.debitcredit"); break; case 2: - res = _("lima.table.debit"); + res = t("lima.table.debit"); break; case 3: - res = _("lima.table.credit"); + res = t("lima.table.credit"); break; case 4: - res = _("lima.table.provisiondeprecationamount"); + res = t("lima.table.provisiondeprecationamount"); break; } return res; Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartView.jaxx 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartView.jaxx 2014-04-14 07:29:08 UTC (rev 3777) @@ -28,7 +28,7 @@ <import> javax.swing.ListSelectionModel org.jdesktop.swingx.decorator.HighlighterFactory - static org.nuiton.i18n.I18n._ + static org.nuiton.i18n.I18n.t </import> <FinancialStatementChartViewHandler id="handler" @@ -40,37 +40,37 @@ <JToolBar floatable="false"> <JButton id="addFinancialStatementHeader" - toolTipText="{ _("lima.financialstatement.header.add") + " (Ctrl+Maj+N)"}" + toolTipText="{ t("lima.financialstatement.header.add") + " (Ctrl+Maj+N)"}" actionIcon='financialstatement-add-header' onActionPerformed="handler.addFinancialStatementHeader()"/> <JButton id="addFinancialStatementMovement" - toolTipText="{ _("lima.financialstatement.movement.add") + " (Ctrl+N)"}" + toolTipText="{ t("lima.financialstatement.movement.add") + " (Ctrl+N)"}" actionIcon='financialstatement-add-movement' onActionPerformed="handler.addFinancialStatementMovement()" enabled="{isSelectedRow()}"/> <JButton id="updateButton" - toolTipText="{ _("lima.common.update") + " (Ctrl+M)"}" + toolTipText="{ t("lima.common.update") + " (Ctrl+M)"}" actionIcon='financialstatement-edit' onActionPerformed="handler.updateFinancialStatement()" enabled="{isSelectedRow()}"/> <JButton id="removeButton" - toolTipText="{ _("lima.common.remove") + " (Del)"}" + toolTipText="{ t("lima.common.remove") + " (Del)"}" actionIcon='financialstatement-remove' onActionPerformed="handler.removeFinancialStatement()" enabled="{isSelectedRow()}"/> <JButton id="importButton" - toolTipText="{ _("lima.ui.importexport.import") + " (Ctrl+I)"}" + toolTipText="{ t("lima.ui.importexport.import") + " (Ctrl+I)"}" actionIcon='financialstatement-import' onActionPerformed="handler.importFinancialStatementChart()"/> <JToolBar.Separator/> <JButton id="checkButton" - toolTipText="{ _("lima.financialstatement.check") + " (Ctrl+F)"}" + toolTipText="{ t("lima.financialstatement.check") + " (Ctrl+F)"}" actionIcon='financialstatement-check' onActionPerformed="handler.financialStatementChartCheck()"/> Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -47,7 +47,7 @@ import java.awt.event.InputEvent; import java.awt.event.KeyEvent; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * Handler associated with account view. @@ -318,8 +318,8 @@ int selectedRow = view.treeTable.getSelectedRow(); if (selectedRow != -1) { int n = JOptionPane.showConfirmDialog(view, - _("lima.charts.account.question.remove"), - _("lima.common.confirmation"), + t("lima.charts.account.question.remove"), + t("lima.common.confirmation"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (n == JOptionPane.YES_OPTION) { @@ -377,7 +377,7 @@ public void financialStatementChartCheck() { String result = financialStatementService.checkFinancialStatementChart(); - showReportDialog(result, _("lima.financialstatement.check"), view); + showReportDialog(result, t("lima.financialstatement.check"), view); } /** Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,7 +25,7 @@ package org.chorem.lima.ui.financialstatementreport; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; import java.math.BigDecimal; import java.util.List; @@ -94,16 +94,16 @@ String res = "n/a"; switch (column) { case 0: - res = _("lima.table.label"); + res = t("lima.table.label"); break; case 1: - res = _("lima.table.grossamount"); + res = t("lima.table.grossamount"); break; case 2: - res = _("lima.table.provisiondeprecationamount"); + res = t("lima.table.provisiondeprecationamount"); break; case 3: - res = _("lima.table.netamount"); + res = t("lima.table.netamount"); break; } return res; Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/AccountColumn.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/AccountColumn.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/AccountColumn.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -29,7 +29,7 @@ import org.chorem.lima.ui.common.AbstractColumn; import org.chorem.lima.ui.common.FinancialTransactionTableModel; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * @author Sylvain Bavencoff <bavencoff@codelutin.com> @@ -37,7 +37,7 @@ public class AccountColumn extends AbstractColumn<FinancialTransactionTableModel> { public AccountColumn() { - super(Account.class, _("lima.ui.financialtransaction.account"), true); + super(Account.class, t("lima.ui.financialtransaction.account"), true); } @Override Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/BalanceColumn.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/BalanceColumn.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/BalanceColumn.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -30,7 +30,7 @@ import java.math.BigDecimal; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * @author Sylvain Bavencoff <bavencoff@codelutin.com> @@ -38,7 +38,7 @@ public class BalanceColumn extends AbstractColumn<FinancialTransactionTableModel> { public BalanceColumn() { - super(BigDecimal.class, _("lima.table.balance"), false); + super(BigDecimal.class, t("lima.table.balance"), false); } @Override Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/CreditColumn.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/CreditColumn.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/CreditColumn.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -30,7 +30,7 @@ import java.math.BigDecimal; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * @author Sylvain Bavencoff <bavencoff@codelutin.com> @@ -38,7 +38,7 @@ public class CreditColumn extends AbstractColumn<FinancialTransactionTableModel> { public CreditColumn() { - super(BigDecimal.class, _("lima.ui.financialtransaction.credit"), true); + super(BigDecimal.class, t("lima.ui.financialtransaction.credit"), true); } @Override Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/DateColumn.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/DateColumn.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/DateColumn.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -31,7 +31,7 @@ import java.util.Date; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * @author Sylvain Bavencoff <bavencoff@codelutin.com> @@ -39,7 +39,7 @@ public class DateColumn extends AbstractColumn<FinancialTransactionTableModel> { public DateColumn(){ - super(Date.class, _("lima.ui.financialtransaction.date"), true); + super(Date.class, t("lima.ui.financialtransaction.date"), true); } @Override Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/DebitColumn.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/DebitColumn.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/DebitColumn.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -30,7 +30,7 @@ import java.math.BigDecimal; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * @author Sylvain Bavencoff <bavencoff@codelutin.com> @@ -38,7 +38,7 @@ public class DebitColumn extends AbstractColumn<FinancialTransactionTableModel> { public DebitColumn() { - super(BigDecimal.class, _("lima.ui.financialtransaction.debit"), true); + super(BigDecimal.class, t("lima.ui.financialtransaction.debit"), true); } @Override Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/DescriptionColumn.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/DescriptionColumn.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/DescriptionColumn.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -28,7 +28,7 @@ import org.chorem.lima.ui.common.AbstractColumn; import org.chorem.lima.ui.common.FinancialTransactionTableModel; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * @author Sylvain Bavencoff <bavencoff@codelutin.com> @@ -36,7 +36,7 @@ public class DescriptionColumn<T extends FinancialTransactionTableModel> extends AbstractColumn<T> { public DescriptionColumn() { - super(String.class, _("lima.ui.financialtransaction.description"), true); + super(String.class, t("lima.ui.financialtransaction.description"), true); } @Override public Object getValueAt(int row) { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/EntryBookColumn.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/EntryBookColumn.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/EntryBookColumn.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -30,7 +30,7 @@ import org.chorem.lima.ui.common.AbstractColumn; import org.chorem.lima.ui.common.FinancialTransactionTableModel; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * @author Sylvain Bavencoff <bavencoff@codelutin.com> @@ -38,7 +38,7 @@ public class EntryBookColumn extends AbstractColumn<FinancialTransactionTableModel> { public EntryBookColumn() { - super(EntryBook.class, _("lima.table.entrybook"), true); + super(EntryBook.class, t("lima.table.entrybook"), true); } @Override Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx 2014-04-14 07:29:08 UTC (rev 3777) @@ -61,39 +61,39 @@ <row> <cell fill="horizontal"> <JToolBar floatable="false"> - <JButton toolTipText="{ _("lima.entries.addTransaction") + " (Ctrl+Shift+N)"}" + <JButton toolTipText="{ t("lima.entries.addTransaction") + " (Ctrl+Shift+N)"}" actionIcon='add-financial-transaction' onActionPerformed="handler.addFinancialTransaction()" /> - <JButton toolTipText="{ _("lima.entries.remove.transaction") + " (Ctrl+Shift+Del)"}" + <JButton toolTipText="{ t("lima.entries.remove.transaction") + " (Ctrl+Shift+Del)"}" actionIcon='delete-financial-transaction' enabled="{isSelectedRow()}" onActionPerformed="handler.deleteSelectedTransaction()" /> - <JButton toolTipText="{ _("lima.entries.copy.transaction") + " (Ctrl+Shift+C)"}" actionIcon='copy' + <JButton toolTipText="{ t("lima.entries.copy.transaction") + " (Ctrl+Shift+C)"}" actionIcon='copy' enabled="{isSelectedRow()}" onActionPerformed="handler.copyTransaction()" /> - <JButton toolTipText="{ _("lima.entries.paste.transaction") + " (Ctrl+Shift+V)"}" actionIcon='paste' + <JButton toolTipText="{ t("lima.entries.paste.transaction") + " (Ctrl+Shift+V)"}" actionIcon='paste' enabled="{isTransactionInClipBoard()}" onActionPerformed="handler.pasteTransaction()" /> <JToolBar.Separator/> - <JButton toolTipText ="{ _("lima.entries.addEntry") + " (Ctrl+N)"}" actionIcon='add-entry' + <JButton toolTipText ="{ t("lima.entries.addEntry") + " (Ctrl+N)"}" actionIcon='add-entry' enabled="{isSelectedRow()}" onActionPerformed="handler.addEntry()" /> - <JButton toolTipText="{ _("lima.entries.remove.entry") + " (Ctrl+Del)"}" actionIcon='delete-entry' + <JButton toolTipText="{ t("lima.entries.remove.entry") + " (Ctrl+Del)"}" actionIcon='delete-entry' enabled="{isSelectedRow()}" onActionPerformed="handler.deleteSelectedEntry()" /> - <JButton toolTipText="{ _("lima.entries.copy.entry") + " (Ctrl+Alt+C)"}" actionIcon='copy' + <JButton toolTipText="{ t("lima.entries.copy.entry") + " (Ctrl+Alt+C)"}" actionIcon='copy' enabled="{isSelectedRow()}" onActionPerformed="handler.copyEntry()" /> - <JButton toolTipText="{ _("lima.entries.paste.entry") + " (Ctrl+Alt+V)"}" actionIcon='paste' + <JButton toolTipText="{ t("lima.entries.paste.entry") + " (Ctrl+Alt+V)"}" actionIcon='paste' enabled="{isEntryInClipBoard() && isSelectedRow()}" onActionPerformed="handler.pasteEntry()" /> - <JButton toolTipText="{ _("lima.entries.assign.entries") + " (Ctrl+Alt+A)"}" actionIcon='assign-all-entries-in-transaction' + <JButton toolTipText="{ t("lima.entries.assign.entries") + " (Ctrl+Alt+A)"}" actionIcon='assign-all-entries-in-transaction' enabled="{isAssignableInAllEntries() && isSelectedRow()}" onActionPerformed="handler.assignAllEntries()" /> <JToolBar.Separator/> - <JButton toolTipText="{ _("lima.entries.balance") + " (Ctrl+B)"}" actionIcon='balance' + <JButton toolTipText="{ t("lima.entries.balance") + " (Ctrl+B)"}" actionIcon='balance' enabled="{!isBalance()}" onActionPerformed="handler.balanceTransaction()" /> Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -59,7 +59,7 @@ import java.util.Date; import java.util.List; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * Handler associated with financial transaction view. @@ -587,8 +587,8 @@ cellEditor.cancelCellEditing(); } int response = JOptionPane.showConfirmDialog( - view, _("lima.ui.financialtransaction.messageremovetransaction"), - _("lima.ui.financialtransaction.titleremovetransaction"), JOptionPane.YES_NO_OPTION); + view, t("lima.ui.financialtransaction.messageremovetransaction"), + t("lima.ui.financialtransaction.titleremovetransaction"), JOptionPane.YES_NO_OPTION); if (response == JOptionPane.YES_OPTION) { @@ -622,8 +622,8 @@ cellEditor.cancelCellEditing(); } int response = JOptionPane.showConfirmDialog( - view, _("lima.ui.financialtransaction.messageremoveentry"), - _("lima.ui.financialtransaction.titleremoveentry"), JOptionPane.YES_NO_OPTION); + view, t("lima.ui.financialtransaction.messageremoveentry"), + t("lima.ui.financialtransaction.titleremoveentry"), JOptionPane.YES_NO_OPTION); if (response == JOptionPane.YES_OPTION) { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/LetterColumn.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/LetterColumn.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/LetterColumn.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -28,7 +28,7 @@ import org.chorem.lima.ui.common.AbstractColumn; import org.chorem.lima.ui.common.FinancialTransactionTableModel; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * @author Sylvain Bavencoff <bavencoff@codelutin.com> @@ -36,7 +36,7 @@ public class LetterColumn extends AbstractColumn<FinancialTransactionTableModel> { public LetterColumn() { - super(String.class, _("lima.table.letter"), true); + super(String.class, t("lima.table.letter"), true); } @Override Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/VoucherColumn.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/VoucherColumn.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/VoucherColumn.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -28,7 +28,7 @@ import org.chorem.lima.ui.common.AbstractColumn; import org.chorem.lima.ui.common.FinancialTransactionTableModel; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * @author Sylvain Bavencoff <bavencoff@codelutin.com> @@ -36,7 +36,7 @@ public class VoucherColumn extends AbstractColumn<FinancialTransactionTableModel> { public VoucherColumn() { - super(String.class, _("lima.ui.financialtransaction.voucher"), true); + super(String.class, t("lima.ui.financialtransaction.voucher"), true); } @Override Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2014-04-14 07:29:08 UTC (rev 3777) @@ -91,7 +91,7 @@ actionIcon='filter-transaction-credit' onActionPerformed="getHandler().addCreditCondition()"/> <JToolBar.Separator/> - <JButton toolTipText="{ _("lima.ui.common.refresh") + " (F5)"}" actionIcon='refresh' + <JButton toolTipText="{ t("lima.ui.common.refresh") + " (F5)"}" actionIcon='refresh' onActionPerformed="getHandler().refresh()"/> </JToolBar> </cell> Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedView.jaxx 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedView.jaxx 2014-04-14 07:29:08 UTC (rev 3777) @@ -53,18 +53,18 @@ <row> <cell fill="horizontal"> <JToolBar floatable="false"> - <JButton toolTipText="{ _("lima.entries.remove.transaction") + " (Ctrl+Shift+Del)"}" + <JButton toolTipText="{ t("lima.entries.remove.transaction") + " (Ctrl+Shift+Del)"}" actionIcon='delete-financial-transaction' enabled="{isSelectedRow()}" onActionPerformed="getHandler().deleteSelectedTransaction()" /> - <JButton toolTipText ="{ _("lima.entries.addEntry") + " (Ctrl+N)"}" actionIcon='add-entry' + <JButton toolTipText ="{ t("lima.entries.addEntry") + " (Ctrl+N)"}" actionIcon='add-entry' enabled="{isSelectedRow()}" onActionPerformed="getHandler().addEntry()" /> - <JButton toolTipText="{ _("lima.entries.remove.entry") + " (Ctrl+Del)"}" actionIcon='delete-entry' + <JButton toolTipText="{ t("lima.entries.remove.entry") + " (Ctrl+Del)"}" actionIcon='delete-entry' enabled="{isSelectedRow()}" onActionPerformed="getHandler().deleteSelectedEntry()" /> <JToolBar.Separator/> - <JButton toolTipText="{ _("lima.entries.balance") + " (Ctrl+B)"}" actionIcon='balance' + <JButton toolTipText="{ t("lima.entries.balance") + " (Ctrl+B)"}" actionIcon='balance' enabled="{!isBalance()}" onActionPerformed="handler.balanceTransaction()" /> <JToolBar.Separator/> @@ -79,7 +79,7 @@ getHandler().refresh()" editable="false"/> <JToolBar.Separator/> - <JButton toolTipText="{ _("lima.ui.common.refresh") + " (F5)"}" actionIcon='refresh' + <JButton toolTipText="{ t("lima.ui.common.refresh") + " (F5)"}" actionIcon='refresh' onActionPerformed="getHandler().refresh()"/> </JToolBar> Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedViewHandler.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedViewHandler.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -39,7 +39,7 @@ import java.awt.event.KeyEvent; import java.math.BigDecimal; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * Handler associated with financial transaction view. @@ -186,10 +186,10 @@ cellEditor.cancelCellEditing(); } - String message = _("lima.charts.financialtransaction.question.removeentry"); + String message = t("lima.charts.financialtransaction.question.removeentry"); int response = JOptionPane.showConfirmDialog(view, message, - _("lima.common.confirmation"), JOptionPane.YES_NO_OPTION); + t("lima.common.confirmation"), JOptionPane.YES_NO_OPTION); if (response == JOptionPane.YES_OPTION) { @@ -232,10 +232,10 @@ cellEditor.cancelCellEditing(); } - String message = _("lima.charts.financialtransaction.question.removetransaction"); + String message = t("lima.charts.financialtransaction.question.removetransaction"); int response = JOptionPane.showConfirmDialog(view, message, - _("lima.common.confirmation"), JOptionPane.YES_NO_OPTION); + t("lima.common.confirmation"), JOptionPane.YES_NO_OPTION); if (response == JOptionPane.YES_OPTION) { tableModel.removeTransaction(indexSelectedRow); Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -34,7 +34,7 @@ import java.util.Date; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * Modele de Fiscal period (rendu de list) @@ -58,7 +58,7 @@ @Override protected void initColumn() { - addColumn(new AbstractColumn<FiscalPeriodTableModel>(Date.class, _("lima.ui.fiscalperiod.begin"), false) { + addColumn(new AbstractColumn<FiscalPeriodTableModel>(Date.class, t("lima.ui.fiscalperiod.begin"), false) { @Override public Object getValueAt(int row) { FiscalPeriod fiscalPeriod = tableModel.get(row); @@ -66,7 +66,7 @@ } }); - addColumn(new AbstractColumn<FiscalPeriodTableModel>(Date.class, _("lima.ui.fiscalperiod.end"), false) { + addColumn(new AbstractColumn<FiscalPeriodTableModel>(Date.class, t("lima.ui.fiscalperiod.end"), false) { @Override public Object getValueAt(int row) { FiscalPeriod fiscalPeriod = tableModel.get(row); @@ -74,13 +74,13 @@ } }); - addColumn(new AbstractColumn<FiscalPeriodTableModel>(String.class, _("lima.ui.fiscalperiod.status"), false) { + addColumn(new AbstractColumn<FiscalPeriodTableModel>(String.class, t("lima.ui.fiscalperiod.status"), false) { @Override public Object getValueAt(int row) { FiscalPeriod fiscalPeriod = tableModel.get(row); - String status = _("lima.ui.fiscalperiod.open"); + String status = t("lima.ui.fiscalperiod.open"); if (fiscalPeriod.getLocked()) { - status = _("lima.ui.fiscalperiod.closed"); + status = t("lima.ui.fiscalperiod.closed"); } return status; } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodView.jaxx 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodView.jaxx 2014-04-14 07:29:08 UTC (rev 3777) @@ -28,7 +28,7 @@ <import> javax.swing.ListSelectionModel javax.swing.DefaultListSelectionModel - static org.nuiton.i18n.I18n._ + static org.nuiton.i18n.I18n.t </import> <FiscalPeriodViewHandler id="handler" constructorParams="this"/> @@ -47,24 +47,24 @@ <JToolBar floatable="false"> <JButton id="addButton" - toolTipText="{ _("lima.charts.fiscalperiod.add") + " (Ctrl+N)"}" + toolTipText="{ t("lima.charts.fiscalperiod.add") + " (Ctrl+N)"}" actionIcon='fiscalPeriod-new' onActionPerformed="handler.addFiscalPeriod()"/> <JButton id="updateButton" - toolTipText="{ _("lima.charts.fiscalperiod.update") + " (Ctrl+M)"}" + toolTipText="{ t("lima.charts.fiscalperiod.update") + " (Ctrl+M)"}" actionIcon='fiscalPeriod-edit' onActionPerformed="handler.updateFiscalPeriod()" enabled="{isDeleteEnabled()}" /> <JButton id="blockButton" - toolTipText="{ _("lima.charts.fiscalperiod.block") + " (Ctrl+B)"}" + toolTipText="{ t("lima.charts.fiscalperiod.block") + " (Ctrl+B)"}" actionIcon='fiscalPeriod-close' onActionPerformed="handler.blockFiscalPeriod()" enabled="{isBlockEnabled()}"/> <JButton id="deleteButton" - toolTipText="{ _("lima.charts.fiscalperiod.delete") + " (Del)"}" + toolTipText="{ t("lima.charts.fiscalperiod.delete") + " (Del)"}" actionIcon='fiscalPeriod-remove' onActionPerformed="handler.deleteFiscalPeriod()" enabled="{isDeleteEnabled()}"/> Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -49,7 +49,7 @@ import java.util.Date; import java.util.List; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * Handler pour la gestion des exercices (creation/fermeture). @@ -179,7 +179,7 @@ AddPeriod addPeriodDialog = new AddPeriod(view); - addPeriodDialog.setTitle(_("lima.ui.fiscalperiod.addfiscalperiodtitle")); + addPeriodDialog.setTitle(t("lima.ui.fiscalperiod.addfiscalperiodtitle")); addPeriodDialog.getBeginDatePicker().setDate(beginDate); addPeriodDialog.getEndDatePicker().setDate(endDate); addPeriodDialog.setLocationRelativeTo(view); @@ -204,7 +204,7 @@ return false; } else if (endDate.before(beginDate)) { JOptionPane.showMessageDialog(view, - _("lima.ui.fiscalperiod.addfiscalperiod.endAfterBegin"), + t("lima.ui.fiscalperiod.addfiscalperiod.endAfterBegin"), title, JOptionPane.ERROR_MESSAGE); return false; @@ -214,7 +214,7 @@ int response = JOptionPane.YES_OPTION; if (nbMonth != 12) { response = JOptionPane.showConfirmDialog(view, - _("lima.ui.fiscalperiod.addfiscalperiod.morethan12"), + t("lima.ui.fiscalperiod.addfiscalperiod.morethan12"), title, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); } @@ -243,7 +243,7 @@ if (!selectedFiscalPeriod.isLocked()) { AddPeriod addPeriodDialog = new AddPeriod(view); - addPeriodDialog.setTitle(_("lima.ui.fiscalperiod.modifyfiscalperiodtitle")); + addPeriodDialog.setTitle(t("lima.ui.fiscalperiod.modifyfiscalperiodtitle")); addPeriodDialog.getBeginDatePicker().setDate(selectedFiscalPeriod.getBeginDate()); addPeriodDialog.getEndDatePicker().setDate(selectedFiscalPeriod.getEndDate()); addPeriodDialog.setModifyPeriod(true); @@ -278,8 +278,8 @@ //check if the user want to delete the fiscal year int response = JOptionPane.showConfirmDialog(view, - _("lima.ui.fiscalperiod.delete.confirmation"), - _("lima.ui.fiscalperiod.delete.title"), JOptionPane.YES_NO_OPTION, + t("lima.ui.fiscalperiod.delete.confirmation"), + t("lima.ui.fiscalperiod.delete.title"), JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE); if (response == JOptionPane.YES_OPTION) { @@ -312,8 +312,8 @@ //check if the user want to block the fiscal year int answerBlock = JOptionPane.showConfirmDialog(view, - _("lima.ui.fiscalperiod.block.confirmation"), - _("lima.ui.fiscalperiod.block.title"), JOptionPane.YES_NO_OPTION, + t("lima.ui.fiscalperiod.block.confirmation"), + t("lima.ui.fiscalperiod.block.title"), JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE); if (answerBlock == JOptionPane.YES_OPTION) { @@ -327,8 +327,8 @@ //check if the user wants to create a new fiscal year int answerCreate = JOptionPane.showConfirmDialog(view, - _("lima.ui.fiscalperiod.block.newyear"), - _("lima.ui.fiscalperiod.block.title"), JOptionPane.YES_NO_OPTION, + t("lima.ui.fiscalperiod.block.newyear"), + t("lima.ui.fiscalperiod.block.title"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); // create a new fiscal year @@ -343,16 +343,16 @@ if (selectedFiscalPeriod.equals(lastFiscalPeriod)) { JOptionPane.showMessageDialog(view, - _("lima.ui.fiscalperiod.block.cantBalanceIfNextPeriodNotExist"), - _("lima.ui.fiscalperiod.block.title"), + t("lima.ui.fiscalperiod.block.cantBalanceIfNextPeriodNotExist"), + t("lima.ui.fiscalperiod.block.title"), JOptionPane.ERROR_MESSAGE); } else { //check if the user wants to report datas int answerRetainedEarnings = JOptionPane.showConfirmDialog(view, - _("lima.ui.fiscalperiod.block.addretainedearnings"), - _("lima.ui.fiscalperiod.block.title"), JOptionPane.YES_NO_OPTION, + t("lima.ui.fiscalperiod.block.addretainedearnings"), + t("lima.ui.fiscalperiod.block.title"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (answerRetainedEarnings == JOptionPane.YES_OPTION) { @@ -394,16 +394,16 @@ } else { JOptionPane.showMessageDialog(view, - _("lima.ui.fiscalperiod.block.cantBalanceNotBook"), - _("lima.ui.fiscalperiod.block.title"), + t("lima.ui.fiscalperiod.block.cantBalanceNotBook"), + t("lima.ui.fiscalperiod.block.title"), JOptionPane.ERROR_MESSAGE); } } else { JOptionPane.showMessageDialog(view, - _("lima.ui.fiscalperiod.block.cantBlockNotBalance"), - _("lima.ui.fiscalperiod.block.title"), + t("lima.ui.fiscalperiod.block.cantBlockNotBalance"), + t("lima.ui.fiscalperiod.block.title"), JOptionPane.ERROR_MESSAGE); } } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,10 +25,6 @@ package org.chorem.lima.ui.home; -import static org.nuiton.i18n.I18n._; - -import javax.swing.event.HyperlinkEvent; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.LimaContext; @@ -39,6 +35,10 @@ import org.chorem.lima.service.LimaServiceFactory; import org.chorem.lima.ui.MainView; +import javax.swing.event.HyperlinkEvent; + +import static org.nuiton.i18n.I18n.t; + /** * Home view pane that display account plan statistics. * @@ -89,17 +89,17 @@ long accountCount = accountService.getAccountCount(); if (accountCount > 0) { setBackground(GREEN_BACKGROUND); - String accountsString = _("lima.ui.home.chartaccounts.state1_2") + " " - + accountCount + " " + _("lima.ui.home.chartaccounts.state2_2") + String accountsString = t("lima.ui.home.chartaccounts.state1_2") + " " + + accountCount + " " + t("lima.ui.home.chartaccounts.state2_2") + "<br/><br/><a href='#accountschart'>" - + _("lima.ui.home.chartaccounts.modify") + "</a>"; + + t("lima.ui.home.chartaccounts.modify") + "</a>"; //set Text setText(htmlBegin + accountsString + htmlEnd); } else { setBackground(RED_BACKGROUND); - String accountsString = _("lima.ui.home.chartaccounts.nothing") + String accountsString = t("lima.ui.home.chartaccounts.nothing") + "<br/><br/><a href='#accountschart'>" - + _("lima.ui.home.chartaccounts.create") + "</a>"; + + t("lima.ui.home.chartaccounts.create") + "</a>"; //set Text setText(htmlBegin + accountsString + htmlEnd); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,7 +25,7 @@ package org.chorem.lima.ui.home; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; import java.util.List; @@ -95,15 +95,15 @@ setBackground(GREEN_BACKGROUND); String entryBooksString; if (ebSize == 1) { - entryBooksString = _("lima.ui.home.entrybooks.state.single") + entryBooksString = t("lima.ui.home.entrybooks.state.single") + "<br/>" + entryBooks.get(0).getLabel() + "<br/><br/><a href='#entrybookschart'>" - + _("lima.ui.home.entrybooks.modify") + "</a>"; + + t("lima.ui.home.entrybooks.modify") + "</a>"; } else { - entryBooksString = _("lima.ui.home.entrybooks.state1_2.plural") + entryBooksString = t("lima.ui.home.entrybooks.state1_2.plural") + " " + entryBooks.size() + " " - + _("lima.ui.home.entrybooks.state2_2.plural") + "<ul>"; + + t("lima.ui.home.entrybooks.state2_2.plural") + "<ul>"; for (int i = 0; i < ebSize && i < 3; i++) { // for (EntryBook entryBook : entryBooks) { EntryBook entryBook = entryBooks.get(i); @@ -115,7 +115,7 @@ } entryBooksString += "</ul></p><p horizontal-align:'center'>" + "<a href='#entrybookschart'>" - + _("lima.ui.home.entrybooks.modify") + "</a>"; + + t("lima.ui.home.entrybooks.modify") + "</a>"; } //set Text setText(htmlBegin + entryBooksString + htmlEnd); @@ -123,9 +123,9 @@ setBackground(RED_BACKGROUND); //set Text setText(htmlBegin - + _("lima.ui.home.entrybooks.nothing") + + t("lima.ui.home.entrybooks.nothing") + "<br/><br/><a href='#entrybookschart'>" - + _("lima.ui.home.entrybooks.create") + "</a>" + htmlEnd); + + t("lima.ui.home.entrybooks.create") + "</a>" + htmlEnd); } } catch (LimaException eee) { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,7 +25,7 @@ package org.chorem.lima.ui.home; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; import java.util.List; @@ -118,9 +118,9 @@ if (financialTransactionsInexact.size() > 0) { setBackground(RED_BACKGROUND); String transactionsString = financialTransactionsInexact.size() - + " " + _("lima.ui.home.transaction.inexact") + + " " + t("lima.ui.home.transaction.inexact") + "<br/><br/><a href='#financialtransactionunbalanced'>" - + _("lima.ui.home.transaction.modifiy.inexact") + "</a>"; + + t("lima.ui.home.transaction.modifiy.inexact") + "</a>"; //set Text setText(htmlBegin + transactionsString + htmlEnd); } else { @@ -130,15 +130,15 @@ if (financialTransactionsBal.size() > 0) { setBackground(GREEN_BACKGROUND); String transactionsString = financialTransactionsBal.size() - + " " + _("lima.ui.home.transaction.balanced") + + " " + t("lima.ui.home.transaction.balanced") + "<br/><br/><a href='#financialtransactionbalanced'>" - + _("lima.ui.home.transaction.modifiy.balanced") + "</a>"; + + t("lima.ui.home.transaction.modifiy.balanced") + "</a>"; setText(htmlBegin + transactionsString + htmlEnd); } else { setBackground(RED_BACKGROUND); - String transactionsString = _("lima.ui.home.transaction.nothing") + String transactionsString = t("lima.ui.home.transaction.nothing") + "<br/><br/><a href='#financialtransactionbalanced'>" - + _("lima.ui.home.transaction.create") + "</a>"; + + t("lima.ui.home.transaction.create") + "</a>"; setText(htmlBegin + transactionsString + htmlEnd); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,7 +25,7 @@ package org.chorem.lima.ui.home; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; import java.util.List; @@ -103,24 +103,24 @@ if (unblockedFiscalPeriods.size() > 0) { setBackground(GREEN_BACKGROUND); String fiscalString = unblockedFiscalPeriods.size() + " " - + _("lima.ui.home.fiscalperiod.opened") + "<br/>" + + t("lima.ui.home.fiscalperiod.opened") + "<br/>" + (fiscalPeriods.size() - unblockedFiscalPeriods.size()) - + " " + _("lima.ui.home.fiscalperiod.closed") + + " " + t("lima.ui.home.fiscalperiod.closed") + "<br/><br/><a href='#fiscalperiodschart'>" - + _("lima.ui.home.fiscalperiod.modify") + "</a>"; + + t("lima.ui.home.fiscalperiod.modify") + "</a>"; //set Text setText(htmlBegin + fiscalString + htmlEnd); } else { setBackground(RED_BACKGROUND); - String fiscalString = _("lima.ui.home.fiscalperiod.noopen"); + String fiscalString = t("lima.ui.home.fiscalperiod.noopen"); if (fiscalPeriods.size() > 0) { fiscalString += "<br/>" + fiscalPeriods.size() + " " - + _("lima.ui.home.fiscalperiod.closed"); + + t("lima.ui.home.fiscalperiod.closed"); } fiscalString += "<br/><br/><a href='#fiscalperiodschart'>" - + _("lima.ui.home.fiscalperiod.create") + "</a>"; + + t("lima.ui.home.fiscalperiod.create") + "</a>"; //set Text setText(htmlBegin + fiscalString + htmlEnd); Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx 2014-04-14 07:29:08 UTC (rev 3777) @@ -29,7 +29,7 @@ javax.swing.BoxLayout javax.swing.border.EtchedBorder jaxx.runtime.SwingUtil - static org.nuiton.i18n.I18n._ + static org.nuiton.i18n.I18n.t </import> <Dimension id="fixedSize" javaBean='new Dimension(500,200)'/> Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,7 +25,7 @@ package org.chorem.lima.ui.importexport; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; import java.awt.BorderLayout; import java.awt.Color; @@ -184,8 +184,8 @@ break; case PDF_VAT_IMPORT: int response = JOptionPane.showConfirmDialog(waitView, - _("lima.importexport.usevatpdf"), - _("lima.common.confirmation"), JOptionPane.YES_NO_OPTION); + t("lima.importexport.usevatpdf"), + t("lima.common.confirmation"), JOptionPane.YES_NO_OPTION); datas = extractFile(filePath, charset.getEncoding()); result = importService.importAsPDF(filePath, ImportExportEntityEnum.VATPDF, response == JOptionPane.YES_OPTION); break; @@ -217,8 +217,8 @@ if (verboseMode) { String result = get(); if (result.equals(null)) { - JOptionPane.showMessageDialog(viewComponent, _("lima.ui.importexport.importerror"), - _("lima.ui.importexport.importtitle"), JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(viewComponent, t("lima.ui.importexport.importerror"), + t("lima.ui.importexport.importtitle"), JOptionPane.ERROR_MESSAGE); } else { if (importMode) { @@ -233,8 +233,8 @@ } JOptionPane.showMessageDialog( waitView, - _("lima.ui.importexport.import.vatpdfimport"), - _("lima.ui.importexport.import"), + t("lima.ui.importexport.import.vatpdfimport"), + t("lima.ui.importexport.import"), JOptionPane.INFORMATION_MESSAGE); } else { if (log.isDebugEnabled()) { @@ -242,8 +242,8 @@ } JOptionPane.showMessageDialog( waitView, - _("lima.ui.importexport.import.terminated"), - _("lima.ui.importexport.import"), + t("lima.ui.importexport.import.terminated"), + t("lima.ui.importexport.import"), JOptionPane.INFORMATION_MESSAGE); } } else { @@ -252,8 +252,8 @@ } JOptionPane.showMessageDialog( waitView, - _("lima.ui.importexport.export.terminated"), - _("lima.ui.importexport.export"), + t("lima.ui.importexport.export.terminated"), + t("lima.ui.importexport.export"), JOptionPane.INFORMATION_MESSAGE); } } @@ -291,7 +291,7 @@ if (importExportMethode.getEncodingOption()) { JPanel panel = new JPanel(); panel.setLayout(new BorderLayout()); - panel.add(new JLabel(_("lima.importexport.choiceencoding")), BorderLayout.WEST); + panel.add(new JLabel(t("lima.importexport.choiceencoding")), BorderLayout.WEST); panel.add(comboBox, BorderLayout.CENTER); ((Container) chooser.getComponent(2)).add(panel, BorderLayout.SOUTH); } @@ -299,11 +299,11 @@ String approveButtonText; if (importMode) { chooser.setFileSelectionMode(JFileChooser.FILES_ONLY); - approveButtonText = _("lima.ui.importexport.import"); + approveButtonText = t("lima.ui.importexport.import"); chooser.setDialogTitle(approveButtonText); chooser.setApproveButtonText(approveButtonText); } else { - approveButtonText = _("lima.ui.importexport.export"); + approveButtonText = t("lima.ui.importexport.export"); chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); chooser.setDialogTitle(approveButtonText); chooser.setApproveButtonText(approveButtonText); Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerTableModel.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerTableModel.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,7 +25,7 @@ package org.chorem.lima.ui.ledger; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; import java.math.BigDecimal; import java.text.SimpleDateFormat; @@ -115,28 +115,28 @@ String res = "n/a"; switch (column) { case 0: - res = _("lima.table.account"); //Account + res = t("lima.table.account"); //Account break; case 1: - res = _("lima.table.date"); //Date + res = t("lima.table.date"); //Date break; case 2: - res = _("lima.table.entrybook"); + res = t("lima.table.entrybook"); break; case 3: - res = _("lima.table.voucher"); // Voucher + res = t("lima.table.voucher"); // Voucher break; case 4: - res = _("lima.table.description"); //Description + res = t("lima.table.description"); //Description break; case 5: - res = _("lima.table.debit"); //Debit + res = t("lima.table.debit"); //Debit break; case 6: - res = _("lima.table.credit"); //Credit + res = t("lima.table.credit"); //Credit break; case 7: - res = _("lima.table.solde"); + res = t("lima.table.solde"); break; } return res; Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,7 +25,7 @@ package org.chorem.lima.ui.ledger; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; import java.awt.Desktop; import java.io.IOException; Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -33,7 +33,7 @@ import java.math.BigDecimal; import java.util.Date; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * Basic transaction table model. @@ -49,7 +49,7 @@ @Override protected void initColumn() { - addColumn(new AbstractColumn<LetteringTableModel>(Date.class, _("lima.table.date"), false) { + addColumn(new AbstractColumn<LetteringTableModel>(Date.class, t("lima.table.date"), false) { @Override public Object getValueAt(int row) { Entry entry = tableModel.get(row); @@ -57,7 +57,7 @@ } }); - addColumn(new AbstractColumn<LetteringTableModel>(Account.class, _("lima.table.account"), false) { + addColumn(new AbstractColumn<LetteringTableModel>(Account.class, t("lima.table.account"), false) { @Override public Object getValueAt(int row) { Entry entry = tableModel.get(row); @@ -65,7 +65,7 @@ } }); - addColumn(new AbstractColumn<LetteringTableModel>(String.class, _("lima.table.voucher"), false) { + addColumn(new AbstractColumn<LetteringTableModel>(String.class, t("lima.table.voucher"), false) { @Override public Object getValueAt(int row) { Entry entry = tableModel.get(row); @@ -73,7 +73,7 @@ } }); - addColumn(new AbstractColumn<LetteringTableModel>(String.class, _("lima.table.description"), false) { + addColumn(new AbstractColumn<LetteringTableModel>(String.class, t("lima.table.description"), false) { @Override public Object getValueAt(int row) { Entry entry = tableModel.get(row); @@ -81,7 +81,7 @@ } }); - addColumn(new AbstractColumn<LetteringTableModel>(String.class, _("lima.table.letter"), false) { + addColumn(new AbstractColumn<LetteringTableModel>(String.class, t("lima.table.letter"), false) { @Override public Object getValueAt(int row) { Entry entry = tableModel.get(row); @@ -89,7 +89,7 @@ } }); - addColumn(new AbstractColumn<LetteringTableModel>(BigDecimal.class, _("lima.table.debit"), false) { + addColumn(new AbstractColumn<LetteringTableModel>(BigDecimal.class, t("lima.table.debit"), false) { @Override public Object getValueAt(int row) { Entry entry = tableModel.get(row); @@ -97,7 +97,7 @@ } }); - addColumn(new AbstractColumn<LetteringTableModel>(BigDecimal.class, _("lima.table.credit"), false) { + addColumn(new AbstractColumn<LetteringTableModel>(BigDecimal.class, t("lima.table.credit"), false) { @Override public Object getValueAt(int row) { Entry entry = tableModel.get(row); Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx 2014-04-14 07:29:08 UTC (rev 3777) @@ -54,19 +54,19 @@ <JToolBar floatable="false"> <JButton id="lettered" - toolTipText="{ _("lima.ui.lettering.buttonLettered") + " (Ctrl+L)"}" + toolTipText="{ t("lima.ui.lettering.buttonLettered") + " (Ctrl+L)"}" enabled="{editModel.isLettred()}" actionIcon='lettering' onActionPerformed="handler.addLetter()"/> <JButton id="noLettered" - toolTipText="{ _("lima.ui.lettering.buttonNoLettered") + " (Del)"}" + toolTipText="{ t("lima.ui.lettering.buttonNoLettered") + " (Del)"}" enabled="{editModel.isUnLettred()}" actionIcon='un-lettering' onActionPerformed="handler.removeLetter()"/> <JButton id="round" - toolTipText="{ _("lima.ui.lettering.buttonEqualize") + " (Ctrl+B)"}" + toolTipText="{ t("lima.ui.lettering.buttonEqualize") + " (Ctrl+B)"}" enabled="{editModel.isEqualized()}" actionIcon='balance' onActionPerformed="handler.roundAndCreateEntry()"/> @@ -113,7 +113,7 @@ <JToolBar.Separator/> <JButton id="refresh" - toolTipText="{ _("lima.ui.lettering.buttonRefresh") + " (F5)"}" + toolTipText="{ t("lima.ui.lettering.buttonRefresh") + " (F5)"}" actionIcon='refresh' onActionPerformed="handler.updateAllEntries()"/> Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/TypeEntry.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/TypeEntry.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/TypeEntry.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -24,7 +24,7 @@ * #L% */ -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; /** * @author Sylvain Bavencoff <bavencoff@codelutin.com> @@ -54,13 +54,13 @@ switch (this) { case LETTERED: - result = _("lima.ui.lettering.checkLettredEntry"); + result = t("lima.ui.lettering.checkLettredEntry"); break; case NO_LETTERED: - result = _("lima.ui.lettering.checkNoLettredEntry"); + result = t("lima.ui.lettering.checkNoLettredEntry"); break; case ALL: - result = _("lima.ui.lettering.checkAll"); + result = t("lima.ui.lettering.checkAll"); break; } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,7 +25,7 @@ package org.chorem.lima.ui.opening; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; import java.awt.Color; @@ -182,7 +182,7 @@ view.getFiscalperiodsIcon().setBorder(BorderFactory.createLineBorder(green, 2)); panel.add(fsPanel); panel.validate(); - view.getOk().setText(_("lima.ui.opening.end")); + view.getOk().setText(t("lima.ui.opening.end")); view.repaint(); step++; break; Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartTreeTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartTreeTableModel.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartTreeTableModel.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -24,7 +24,7 @@ */ package org.chorem.lima.ui.vatchart; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; import java.util.List; @@ -68,10 +68,10 @@ String res = null; switch (column) { case 0: - res = _("lima.table.label"); + res = t("lima.table.label"); break; case 1: - res = _("lima.table.account"); + res = t("lima.table.account"); break; } return res; Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartView.jaxx 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartView.jaxx 2014-04-14 07:29:08 UTC (rev 3777) @@ -42,18 +42,18 @@ <JToolBar floatable="false"> <JButton id="addVatStatementMovement" - toolTipText="{ _("lima.vatstatement.movement.add") + " (Ctrl+N)"}" + toolTipText="{ t("lima.vatstatement.movement.add") + " (Ctrl+N)"}" actionIcon='vatstatement-new' onActionPerformed="handler.addVatStatementMovement()"/> <JButton id="updateButton" - toolTipText="{ _("lima.common.update") + " (Ctrl+M)"}" + toolTipText="{ t("lima.common.update") + " (Ctrl+M)"}" actionIcon='vatstatement-edit' onActionPerformed="handler.updateVatStatement()" enabled="{isSelectedRow()}"/> <JButton id="removeButton" - toolTipText="{ _("lima.common.remove") + " (Del)"}" + toolTipText="{ t("lima.common.remove") + " (Del)"}" actionIcon='vatstatement-remove' onActionPerformed="handler.removeVatStatement()" enabled="{isSelectedRow()}"/> Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -44,7 +44,7 @@ import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; public class VatChartViewHandler implements ServiceListener { @@ -156,7 +156,7 @@ JOptionPane.showMessageDialog( view, eee.getMessage(), - _("lima.common.error"), + t("lima.common.error"), JOptionPane.ERROR_MESSAGE); } catch (LimaException eee) { if (log.isErrorEnabled()) { @@ -165,7 +165,7 @@ JOptionPane.showMessageDialog( view, eee.getMessage(), - _("lima.common.error"), + t("lima.common.error"), JOptionPane.ERROR_MESSAGE); } refresh(); @@ -228,7 +228,7 @@ JOptionPane.showMessageDialog( view, eee.getMessage(), - _("lima.common.error"), + t("lima.common.error"), JOptionPane.ERROR_MESSAGE); } } @@ -286,8 +286,8 @@ int selectedRow = view.treeTable.getSelectedRow(); if (selectedRow != -1) { int n = JOptionPane.showConfirmDialog(view, - _("lima.charts.vatstatement.question.remove"), - _("lima.common.confirmation"), + t("lima.charts.vatstatement.question.remove"), + t("lima.common.confirmation"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (n == JOptionPane.YES_OPTION) { @@ -298,8 +298,8 @@ if (!treeTableModel.isLeaf(vatStatement)) { JOptionPane.showMessageDialog( view, - _("lima.charts.vatstatement.deleteparent"), - _("lima.common.info"), + t("lima.charts.vatstatement.deleteparent"), + t("lima.common.info"), JOptionPane.INFORMATION_MESSAGE); } else { try { @@ -312,7 +312,7 @@ JOptionPane.showMessageDialog( view, eee.getMessage(), - _("lima.common.error"), + t("lima.common.error"), JOptionPane.ERROR_MESSAGE); } } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -24,7 +24,7 @@ */ package org.chorem.lima.ui.vatreports; -import static org.nuiton.i18n.I18n._; +import static org.nuiton.i18n.I18n.t; import java.math.BigDecimal; import java.util.Date; @@ -124,10 +124,10 @@ switch (column) { case 0: - result = _("lima.table.label"); //label + result = t("lima.table.label"); //label break; case 1: - result = _("lima.table.solde"); //solde + result = t("lima.table.solde"); //solde break; } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/util/ErrorHelper.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/util/ErrorHelper.java 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/java/org/chorem/lima/util/ErrorHelper.java 2014-04-14 07:29:08 UTC (rev 3777) @@ -25,18 +25,6 @@ package org.chorem.lima.util; -import static org.nuiton.i18n.I18n._; - -import java.awt.Component; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Date; -import java.util.List; - -import javax.swing.JOptionPane; - import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -47,6 +35,17 @@ import org.jdesktop.swingx.error.ErrorInfo; import org.jdesktop.swingx.error.ErrorReporter; +import javax.swing.*; +import java.awt.*; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.List; + +import static org.nuiton.i18n.I18n.t; + /** * Error helper. * <p/> @@ -79,8 +78,8 @@ public void showErrorDialog(Component parent, String message, Throwable cause) { JXErrorPane pane = new JXErrorPane(); - ErrorInfo info = new ErrorInfo(_("lima.common.error"), - _("lima.error.errorpane.htmlmessage", message), null, null, + ErrorInfo info = new ErrorInfo(t("lima.common.error"), + t("lima.error.errorpane.htmlmessage", message), null, null, cause, null, null); pane.setErrorInfo(info); pane.setErrorReporter(this); Modified: trunk/lima-swing/src/main/resources/lima-config.properties =================================================================== --- trunk/lima-swing/src/main/resources/lima-config.properties 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/resources/lima-config.properties 2014-04-14 07:29:08 UTC (rev 3777) @@ -57,3 +57,9 @@ #java.naming.provider.url=ejbd://127.0.0.1:4201 #java.naming.security.principal=jonathan #java.naming.security.credentials=secret + +hibernate.dialect=org.hibernate.dialect.H2Dialect +hibernate.connection.username=sa +hibernate.connection.password= +hibernate.connection.driver_class=org.h2.Driver +hibernate.connection.url=jdbc:h2:file:${lima.data.dir}/limadb Modified: trunk/lima-swing/src/main/resources/log4j.properties =================================================================== --- trunk/lima-swing/src/main/resources/log4j.properties 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/lima-swing/src/main/resources/log4j.properties 2014-04-14 07:29:08 UTC (rev 3777) @@ -36,6 +36,23 @@ log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.layout.ConversionPattern=%5p [%t] (%F:%L) %M - %m%n +#oepnEjb +openejb.logger.external=true +log4j.category.OpenEJB = warn +log4j.category.OpenEJB.server = info +log4j.category.OpenEJB.startup = info +log4j.category.OpenEJB.startup.service = warn +log4j.category.OpenEJB.startup.config = info +log4j.category.OpenEJB.hsql = info +log4j.category.CORBA-Adapter = info +log4j.category.Transaction = warn +log4j.category.org.apache.activemq = error +log4j.category.org.apache.geronimo = error +log4j.category.openjpa = error + +log4j.appender.C = org.apache.log4j.ConsoleAppender +log4j.appender.C.layout = org.apache.log4j.SimpleLayout + # package level log4j.logger.org.chorem.lima=INFO log4j.logger.org.chorem.lima.ui.financialtransaction.FinancialTransactionTable=DEBUG Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2014-04-11 15:53:59 UTC (rev 3776) +++ trunk/pom.xml 2014-04-14 07:29:08 UTC (rev 3777) @@ -5,7 +5,7 @@ <parent> <groupId>org.nuiton</groupId> <artifactId>mavenpom4redmine</artifactId> - <version>4.0</version> + <version>5.0.5</version> </parent> <groupId>org.chorem</groupId> @@ -139,7 +139,7 @@ </scm> <distributionManagement> <site> - <id>${platform}</id> + <id>doc.${platform}</id> <url>${our.site.repository}/${projectId}</url> </site> </distributionManagement> @@ -149,25 +149,26 @@ <projectId>lima</projectId> <!-- customized libs version --> - <nuitonUtilsVersion>2.6.12</nuitonUtilsVersion> - <nuitonConfigVersion>3.0-alpha-1</nuitonConfigVersion> - <nuitonDecoratorVersion>3.0-alpha-2</nuitonDecoratorVersion> - <nuitonProfilingVersion>2.7</nuitonProfilingVersion> - <eugenePluginVersion>2.6.3</eugenePluginVersion> + <nuitonUtilsVersion>3.0-rc-2</nuitonUtilsVersion> + <nuitonConfigVersion>3.0-alpha-2</nuitonConfigVersion> + <nuitonDecoratorVersion>3.0-alpha-3</nuitonDecoratorVersion> + <nuitonProfilingVersion>2.7.1</nuitonProfilingVersion> + <eugenePluginVersion>2.7.4</eugenePluginVersion> <!-- Do not move since topia can not move (tchemit 2013-07-15) --> - <topiaVersion>2.7.1</topiaVersion> + <topiaVersion>2.9-SNAPSHOT</topiaVersion> <!-- Version cannot be upgraded because of incompatibility with OpenEJB -chatellier ???--> - <jaxxVersion>2.6</jaxxVersion> - <nuitonI18nVersion>2.5.1</nuitonI18nVersion> - <openEjbVersion>4.5.2</openEjbVersion> - <slf4jVersion>1.7.5</slf4jVersion> + <jaxxVersion>2.8.4</jaxxVersion> + <nuitonI18nVersion>3.0</nuitonI18nVersion> + <openEjbVersion>4.6.0</openEjbVersion> + <slf4jVersion>1.7.7</slf4jVersion> <swingxVersion>1.6.5-1</swingxVersion> <jettyVersion>${jettyPluginVersion}</jettyVersion> <!-- license to use --> <license.licenseName>gpl_v3</license.licenseName> + <pdfboxVersion>1.8.4</pdfboxVersion> </properties> <repositories> @@ -221,30 +222,6 @@ </dependency> <dependency> - <groupId>org.apache.commons</groupId> - <artifactId>commons-email</artifactId> - <version>1.3.1</version> - </dependency> - - <dependency> - <groupId>org.apache.commons</groupId> - <artifactId>commons-lang3</artifactId> - <version>3.1</version> - </dependency> - - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.6</version> - </dependency> - - <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - <version>14.0.1</version> - </dependency> - - <dependency> <groupId>org.nuiton</groupId> <artifactId>nuiton-utils</artifactId> <version>${nuitonUtilsVersion}</version> @@ -325,14 +302,14 @@ <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> - <version>1.3.172</version> + <version>1.3.176</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> - <version>3.6.10.Final</version> + <version>4.3.5.Final</version> </dependency> <!-- Services --> @@ -457,13 +434,13 @@ <dependency> <groupId>org.apache.pdfbox</groupId> <artifactId>pdfbox</artifactId> - <version>1.8.2</version> + <version>${pdfboxVersion}</version> </dependency> <dependency> <groupId>org.apache.pdfbox</groupId> <artifactId>pdfbox-examples</artifactId> - <version>1.8.2</version> + <version>${pdfboxVersion}</version> </dependency> <dependency>