I18n-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- 786 discussions
Author: hudson
Date: 2011-05-13 16:11:05 +0200 (Fri, 13 May 2011)
New Revision: 1931
Url: http://nuiton.org/repositories/revision/i18n/1931
Log:
[maven-release-plugin] copy for tag i18n-2.4
Added:
tags/i18n-2.4/
1
0
r1930 - in trunk: . ant-i18n-task maven-i18n-plugin nuiton-i18n
by hudson@users.nuiton.org 13 May '11
by hudson@users.nuiton.org 13 May '11
13 May '11
Author: hudson
Date: 2011-05-13 16:11:04 +0200 (Fri, 13 May 2011)
New Revision: 1930
Url: http://nuiton.org/repositories/revision/i18n/1930
Log:
[maven-release-plugin] prepare release i18n-2.4
Modified:
trunk/ant-i18n-task/pom.xml
trunk/maven-i18n-plugin/pom.xml
trunk/nuiton-i18n/pom.xml
trunk/pom.xml
Modified: trunk/ant-i18n-task/pom.xml
===================================================================
--- trunk/ant-i18n-task/pom.xml 2011-05-13 10:04:08 UTC (rev 1929)
+++ trunk/ant-i18n-task/pom.xml 2011-05-13 14:11:04 UTC (rev 1930)
@@ -34,7 +34,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>i18n</artifactId>
- <version>2.4-SNAPSHOT</version>
+ <version>2.4</version>
</parent>
<groupId>org.nuiton.i18n</groupId>
Modified: trunk/maven-i18n-plugin/pom.xml
===================================================================
--- trunk/maven-i18n-plugin/pom.xml 2011-05-13 10:04:08 UTC (rev 1929)
+++ trunk/maven-i18n-plugin/pom.xml 2011-05-13 14:11:04 UTC (rev 1930)
@@ -33,7 +33,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>i18n</artifactId>
- <version>2.4-SNAPSHOT</version>
+ <version>2.4</version>
</parent>
<groupId>org.nuiton.i18n</groupId>
Modified: trunk/nuiton-i18n/pom.xml
===================================================================
--- trunk/nuiton-i18n/pom.xml 2011-05-13 10:04:08 UTC (rev 1929)
+++ trunk/nuiton-i18n/pom.xml 2011-05-13 14:11:04 UTC (rev 1930)
@@ -34,7 +34,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>i18n</artifactId>
- <version>2.4-SNAPSHOT</version>
+ <version>2.4</version>
</parent>
<groupId>org.nuiton.i18n</groupId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-05-13 10:04:08 UTC (rev 1929)
+++ trunk/pom.xml 2011-05-13 14:11:04 UTC (rev 1930)
@@ -37,7 +37,7 @@
</parent>
<artifactId>i18n</artifactId>
- <version>2.4-SNAPSHOT</version>
+ <version>2.4</version>
<modules>
<module>nuiton-i18n</module>
@@ -201,11 +201,11 @@
<!-- Source control management. -->
<scm>
- <connection>scm:svn:http://svn.nuiton.org/svn/i18n/trunk</connection>
+ <connection>scm:svn:http://svn.nuiton.org/svn/i18n/tags/i18n-2.4</connection>
<developerConnection>
- scm:svn:http://svn.nuiton.org/svn/i18n/trunk
+ scm:svn:http://svn.nuiton.org/svn/i18n/tags/i18n-2.4
</developerConnection>
- <url>http://www.nuiton.org/repositories/browse/i18n/trunk</url>
+ <url>http://www.nuiton.org/repositories/browse/i18n/tags/i18n-2.4</url>
</scm>
<profiles>
1
0
r1929 - in trunk: maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/bundle nuiton-i18n/src/main/java/org/nuiton/i18n nuiton-i18n/src/main/java/org/nuiton/i18n/bundle nuiton-i18n/src/main/java/org/nuiton/i18n/format nuiton-i18n/src/main/java/org/nuiton/i18n/init nuiton-i18n/src/main/java/org/nuiton/util/converter
by tchemit@users.nuiton.org 13 May '11
by tchemit@users.nuiton.org 13 May '11
13 May '11
Author: tchemit
Date: 2011-05-13 12:04:08 +0200 (Fri, 13 May 2011)
New Revision: 1929
Url: http://nuiton.org/repositories/revision/i18n/1929
Log:
add file headers + svn properties
Modified:
trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/bundle/AvailableConverterMojo.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/package-info.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/MessageFormatI18nMessageFormatter.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/StringFormatI18nMessageFormatter.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/package-info.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/package-info.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/package-info.java
trunk/nuiton-i18n/src/main/java/org/nuiton/util/converter/package-info.java
Property changes on: trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/bundle/AvailableConverterMojo.java
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/package-info.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/package-info.java 2011-05-13 09:59:47 UTC (rev 1928)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/package-info.java 2011-05-13 10:04:08 UTC (rev 1929)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * I18n :: Api
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2011 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.i18n.bundle;
/**
* This package contains the model of the bundle api.
Property changes on: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/package-info.java
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/MessageFormatI18nMessageFormatter.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/MessageFormatI18nMessageFormatter.java 2011-05-13 09:59:47 UTC (rev 1928)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/MessageFormatI18nMessageFormatter.java 2011-05-13 10:04:08 UTC (rev 1929)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * I18n :: Api
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2011 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.i18n.format;
import java.text.MessageFormat;
Property changes on: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/MessageFormatI18nMessageFormatter.java
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/StringFormatI18nMessageFormatter.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/StringFormatI18nMessageFormatter.java 2011-05-13 09:59:47 UTC (rev 1928)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/StringFormatI18nMessageFormatter.java 2011-05-13 10:04:08 UTC (rev 1929)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * I18n :: Api
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2011 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.i18n.format;
import java.util.Formatter;
Property changes on: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/StringFormatI18nMessageFormatter.java
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/package-info.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/package-info.java 2011-05-13 09:59:47 UTC (rev 1928)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/package-info.java 2011-05-13 10:04:08 UTC (rev 1929)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * I18n :: Api
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2011 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.i18n.format;
/**
* This package contains the format api says the contract and offered
Property changes on: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/package-info.java
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/package-info.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/package-info.java 2011-05-13 09:59:47 UTC (rev 1928)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/package-info.java 2011-05-13 10:04:08 UTC (rev 1929)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * I18n :: Api
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2011 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.i18n.init;
/**
* This package contains the initializer api says the contract and offered
Property changes on: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/package-info.java
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/package-info.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/package-info.java 2011-05-13 09:59:47 UTC (rev 1928)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/package-info.java 2011-05-13 10:04:08 UTC (rev 1929)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * I18n :: Api
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2011 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.i18n;
/**
* This is the main package of the I18n runtime api.
Property changes on: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/package-info.java
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/util/converter/package-info.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/util/converter/package-info.java 2011-05-13 09:59:47 UTC (rev 1928)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/util/converter/package-info.java 2011-05-13 10:04:08 UTC (rev 1929)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * I18n :: Api
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2011 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.util.converter;
/**
* This package contains some converters. The very package is used by the
Property changes on: trunk/nuiton-i18n/src/main/java/org/nuiton/util/converter/package-info.java
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
1
0
Author: tchemit
Date: 2011-05-13 11:59:47 +0200 (Fri, 13 May 2011)
New Revision: 1928
Url: http://nuiton.org/repositories/revision/i18n/1928
Log:
add package info (need more documentation inside them...)
format everything + fix some javadocs
introduce format package to push to I18nMessageFormatter
Added:
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/package-info.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/I18nMessageFormatter.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/MessageFormatI18nMessageFormatter.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/StringFormatI18nMessageFormatter.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/package-info.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/package-info.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/package-info.java
trunk/nuiton-i18n/src/main/java/org/nuiton/util/converter/package-info.java
Removed:
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nMessageFormatter.java
Modified:
trunk/maven-i18n-plugin/src/it/evo-1507/src/test/java/org/nuiton/i18n/ReadMessageFormatTest.java
trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/bundle/StringFormatToMessageFormatConverter.java
trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserJspMojo.java
trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ProcessorHelper.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18n.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nDefaultTooltipFilter.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nLanguage.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nStore.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nUtil.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/I18nBundle.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/I18nBundleEntry.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/I18nBundleUtil.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/ClassPathI18nInitializer.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/DefaultI18nInitializer.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/I18nInitializer.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/UserI18nInitializer.java
trunk/nuiton-i18n/src/main/java/org/nuiton/util/converter/LocaleConverter.java
trunk/nuiton-i18n/src/test/java/org/nuiton/i18n/I18nTest.java
Modified: trunk/maven-i18n-plugin/src/it/evo-1507/src/test/java/org/nuiton/i18n/ReadMessageFormatTest.java
===================================================================
--- trunk/maven-i18n-plugin/src/it/evo-1507/src/test/java/org/nuiton/i18n/ReadMessageFormatTest.java 2011-05-13 09:17:46 UTC (rev 1927)
+++ trunk/maven-i18n-plugin/src/it/evo-1507/src/test/java/org/nuiton/i18n/ReadMessageFormatTest.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -27,6 +27,7 @@
import org.junit.After;
import org.junit.Assert;
import org.junit.Test;
+import org.nuiton.i18n.format.MessageFormatI18nMessageFormatter;
import org.nuiton.i18n.init.DefaultI18nInitializer;
import org.nuiton.i18n.init.I18nInitializer;
@@ -51,7 +52,7 @@
I18nInitializer initializer = new DefaultI18nInitializer("ResultBundle");
initializer.setMessageFormatter(
- new I18nUtil.MessageFormatI18nMessageFormatter());
+ new MessageFormatI18nMessageFormatter());
I18n.init(initializer, Locale.FRANCE);
Modified: trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/bundle/StringFormatToMessageFormatConverter.java
===================================================================
--- trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/bundle/StringFormatToMessageFormatConverter.java 2011-05-13 09:17:46 UTC (rev 1927)
+++ trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/bundle/StringFormatToMessageFormatConverter.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -46,6 +46,7 @@
*/
public class StringFormatToMessageFormatConverter implements BundleFormatConverter {
+ /** Logger. */
private static final Log log =
LogFactory.getLog(StringFormatToMessageFormatConverter.class);
Modified: trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserJspMojo.java
===================================================================
--- trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserJspMojo.java 2011-05-13 09:17:46 UTC (rev 1927)
+++ trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ParserJspMojo.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -186,7 +186,7 @@
) {
// document should be well-formed...
-
+
} else {
// to be sure, document is well formed, add a start and end tag
resultFileContent = "<div>\n" + resultFileContent + "\n</div>";
Modified: trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ProcessorHelper.java
===================================================================
--- trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ProcessorHelper.java 2011-05-13 09:17:46 UTC (rev 1927)
+++ trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/impl/ProcessorHelper.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -50,7 +50,7 @@
*/
public class ProcessorHelper extends ProcessorUtil {
- /** Logger */
+ /** Logger. */
private static final Log log = LogFactory.getLog(ProcessorHelper.class);
/**
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18n.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18n.java 2011-05-13 09:17:46 UTC (rev 1927)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18n.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -27,6 +27,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.nuiton.i18n.format.I18nMessageFormatter;
import org.nuiton.i18n.init.ClassPathI18nInitializer;
import org.nuiton.i18n.init.DefaultI18nInitializer;
import org.nuiton.i18n.init.I18nInitializer;
@@ -54,7 +55,7 @@
*/
public class I18n {
- /** Logger */
+ /** Logger. */
private static final Log log = LogFactory.getLog(I18n.class);
/**
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nDefaultTooltipFilter.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nDefaultTooltipFilter.java 2011-05-13 09:17:46 UTC (rev 1927)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nDefaultTooltipFilter.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -22,21 +22,18 @@
* <http://www.gnu.org/licenses/lgpl-3.0.html>.
* #L%
*/
+package org.nuiton.i18n;
-/* *
+/**
* i18nDefaultTooltipFilter.java
- *
+ * <p/>
* Created: 2 déc. 2003
*
* @author Benjamin Poussin <poussin(a)codelutin.com>
- * Copyright Code Lutin
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : */
-
-package org.nuiton.i18n;
-
+ * @deprecated since 2.4, this filter has nothing to do in i18n api, will be
+ * removed in version 3.0 and never replaced here...
+ */
+@Deprecated
public class I18nDefaultTooltipFilter implements I18nFilter { // I18nDefaultTooltipFilter
@Override
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nLanguage.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nLanguage.java 2011-05-13 09:17:46 UTC (rev 1927)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nLanguage.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -50,7 +50,7 @@
*/
public class I18nLanguage {
- /** to use log facility, just put in your code: log.info(\"...\"); */
+ /** Logger. */
private static final Log log = LogFactory.getLog(I18nLanguage.class);
/** toutes les traductions pour cette langue */
@@ -77,7 +77,7 @@
*
* @param bundleEntries the used bundles entries to load
* @deprecated since 2.4 use {@link #load(I18nBundleEntry[], Charset)} instead,
- * charset must be provided to avoid encoding problems
+ * charset must be provided to avoid encoding problems
*/
@Deprecated
public void load(I18nBundleEntry[] bundleEntries) {
@@ -89,7 +89,7 @@
* fichiers de traduction.
*
* @param bundleEntries the used bundles entries to load
- * @param encoding Charset to use for Properties loading
+ * @param encoding Charset to use for Properties loading
* @since 2.4
*/
public void load(I18nBundleEntry[] bundleEntries, Charset encoding) {
Deleted: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nMessageFormatter.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nMessageFormatter.java 2011-05-13 09:17:46 UTC (rev 1927)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nMessageFormatter.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -1,57 +0,0 @@
-/*
- * #%L
- * I18n :: Api
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2004 - 2011 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
- *
- * You should have received a copy of the GNU General Lesser Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
- * #L%
- */
-package org.nuiton.i18n;
-
-import java.util.Locale;
-
-/**
- * Contract to format a i18n message.
- * <p/>
- * Created: 05/05/11
- *
- * @author fdesbois <desbois(a)codelutin.com>
- * @author tchemit <chemit(a)codelutin.com>
- * @see I18nUtil.DefaultI18nMessageFormatters
- * $Id$
- * @since 2.4
- */
-public interface I18nMessageFormatter {
-
- /**
- * Format a given {@code message} with {@code locale} and optinal {@code args}.
- * <p/>
- * The main purpose is to replace placeholders in {@code message} with
- * {@code args} value.
- * <p/>
- * This may depend on {@code locale} for date purpose for example.
- *
- * @param locale locale to use for formatting (number, date, ...)
- * @param message message to format (that contains placeholders)
- * @param args object array to use in formatting the message
- * @return the formatted message
- */
- String format(Locale locale, String message, Object... args);
-
-}
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nStore.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nStore.java 2011-05-13 09:17:46 UTC (rev 1927)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nStore.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -49,7 +49,7 @@
*/
public class I18nStore {
- /** Logger */
+ /** Logger. */
private static final Log log = LogFactory.getLog(I18nStore.class);
/** le language actuellement utilise */
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nUtil.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nUtil.java 2011-05-13 09:17:46 UTC (rev 1927)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nUtil.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -27,6 +27,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.nuiton.i18n.format.I18nMessageFormatter;
+import org.nuiton.i18n.format.StringFormatI18nMessageFormatter;
import org.nuiton.util.converter.LocaleConverter;
import java.io.File;
@@ -40,7 +42,6 @@
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Formatter;
import java.util.List;
import java.util.Locale;
import java.util.Stack;
@@ -392,45 +393,4 @@
return result;
}
- /**
- * Implementation of {@link I18nMessageFormatter} based on {@link Formatter}
- * syntax.
- * <p/>
- * <strong>Note: </strong> This is the default message formatter used by
- * i18n system.
- *
- * @see Formatter
- * @see String#format(Locale, String, Object...)
- * @since 2.4
- */
- public static class StringFormatI18nMessageFormatter implements I18nMessageFormatter {
-
- @Override
- public String format(Locale locale, String message, Object... args) {
- String result;
- // Previous behavior, no format will be done for empty args
- if (args.length == 0) {
- result = message;
- } else {
- result = String.format(locale, message, args);
- }
- return result;
- }
- }
-
- /**
- * Implementation of {@link I18nMessageFormatter} based on
- * {@link MessageFormat} syntax.
- *
- * @see MessageFormat
- * @since 2.4
- */
- public static class MessageFormatI18nMessageFormatter implements I18nMessageFormatter {
- @Override
- public String format(Locale locale, String message, Object... args) {
- MessageFormat formatter = new MessageFormat(message, locale);
- return formatter.format(args);
- }
- }
-
}
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/I18nBundle.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/I18nBundle.java 2011-05-13 09:17:46 UTC (rev 1927)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/I18nBundle.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -65,14 +65,14 @@
*/
public class I18nBundle implements Iterable<I18nBundleEntry> {
- /** to use log facility, just put in your code: log.info(\"...\"); */
+ /** Logger. */
static final Log log = LogFactory.getLog(I18nBundle.class);
/** les entrés du bundle */
protected List<I18nBundleEntry> entries;
/** le nom du bundle encapsulé (correspond au prefix de l'url de chargement) */
- final String bundlePrefix;
+ protected final String bundlePrefix;
public I18nBundle(String bundlePrefix) {
this.bundlePrefix = bundlePrefix;
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/I18nBundleEntry.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/I18nBundleEntry.java 2011-05-13 09:17:46 UTC (rev 1927)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/I18nBundleEntry.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -126,7 +126,7 @@
* @param resource the save of resources already loaded
* @throws IOException if any pb while reading resource file
* @deprecated since 2.4 use {@link #load(Properties, Charset)} instead,
- * charset must be provided to avoid encoding problems
+ * charset must be provided to avoid encoding problems
*/
@Deprecated
public void load(Properties resource) throws IOException {
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/I18nBundleUtil.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/I18nBundleUtil.java 2011-05-13 09:17:46 UTC (rev 1927)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/I18nBundleUtil.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -56,7 +56,7 @@
*/
public class I18nBundleUtil {
- /** Logger */
+ /** Logger. */
private static final Log log = LogFactory.getLog(I18nBundleUtil.class);
public static final String DIRECTORY_SEARCH_BUNDLE_PATTERN = "i18n";
Added: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/package-info.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/package-info.java (rev 0)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/package-info.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -0,0 +1,6 @@
+package org.nuiton.i18n.bundle;
+/**
+ * This package contains the model of the bundle api.
+ * <p/>
+ * TODO Continue the documentation.
+ */
\ No newline at end of file
Property changes on: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/package-info.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Copied: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/I18nMessageFormatter.java (from rev 1927, trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nMessageFormatter.java)
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/I18nMessageFormatter.java (rev 0)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/I18nMessageFormatter.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -0,0 +1,59 @@
+/*
+ * #%L
+ * I18n :: Api
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2011 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+package org.nuiton.i18n.format;
+
+import java.util.Locale;
+
+/**
+ * Contract to format a i18n message.
+ * <p/>
+ * Created: 05/05/11
+ * <p/>
+ * $Id$
+ *
+ * @author fdesbois <desbois(a)codelutin.com>
+ * @author tchemit <chemit(a)codelutin.com>
+ * @see StringFormatI18nMessageFormatter
+ * @see MessageFormatI18nMessageFormatter
+ * @since 2.4
+ */
+public interface I18nMessageFormatter {
+
+ /**
+ * Format a given {@code message} with {@code locale} and optinal {@code args}.
+ * <p/>
+ * The main purpose is to replace placeholders in {@code message} with
+ * {@code args} value.
+ * <p/>
+ * This may depend on {@code locale} for date purpose for example.
+ *
+ * @param locale locale to use for formatting (number, date, ...)
+ * @param message message to format (that contains placeholders)
+ * @param args object array to use in formatting the message
+ * @return the formatted message
+ */
+ String format(Locale locale, String message, Object... args);
+
+}
Property changes on: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/I18nMessageFormatter.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/MessageFormatI18nMessageFormatter.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/MessageFormatI18nMessageFormatter.java (rev 0)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/MessageFormatI18nMessageFormatter.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -0,0 +1,24 @@
+package org.nuiton.i18n.format;
+
+import java.text.MessageFormat;
+import java.util.Locale;
+
+/**
+ * Implementation of {@link I18nMessageFormatter} based on
+ * {@link MessageFormat} syntax.
+ * <p/>
+ * <strong>Note:</strong> A formatter will always be used even if there is no
+ * parameters in translation. As {@link MessageFormat} requires to espece
+ * quotes, we need to do this for every translation with or without parameters.
+ *
+ * @see MessageFormat
+ * @since 2.4
+ */
+public class MessageFormatI18nMessageFormatter implements I18nMessageFormatter {
+
+ @Override
+ public String format(Locale locale, String message, Object... args) {
+ MessageFormat formatter = new MessageFormat(message, locale);
+ return formatter.format(args);
+ }
+}
Property changes on: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/MessageFormatI18nMessageFormatter.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/StringFormatI18nMessageFormatter.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/StringFormatI18nMessageFormatter.java (rev 0)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/StringFormatI18nMessageFormatter.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -0,0 +1,35 @@
+package org.nuiton.i18n.format;
+
+import java.util.Formatter;
+import java.util.Locale;
+
+/**
+ * Implementation of {@link I18nMessageFormatter} based on {@link Formatter}
+ * syntax.
+ * <p/>
+ * <strong>Note: </strong> This is the default message formatter used by
+ * i18n system.
+ *
+ * @see Formatter
+ * @see String#format(Locale, String, Object...)
+ * @since 2.4
+ */
+public class StringFormatI18nMessageFormatter implements I18nMessageFormatter {
+
+ @Override
+ public String format(Locale locale, String message, Object... args) {
+ String result;
+
+ if (args.length == 0) {
+
+ // keep the same behavior than before version 2.3 : no format will
+ // be done if no arguments are present
+ result = message;
+ } else {
+
+ // do format with given locale, message and arguments
+ result = String.format(locale, message, args);
+ }
+ return result;
+ }
+}
Property changes on: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/StringFormatI18nMessageFormatter.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/package-info.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/package-info.java (rev 0)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/package-info.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -0,0 +1,9 @@
+package org.nuiton.i18n.format;
+/**
+ * This package contains the format api says the contract and offered
+ * implementations of object responsible of formatting translations.
+ * <p/>
+ *
+ * TODO Continue the documentation.
+ * @since 2.4
+ */
\ No newline at end of file
Property changes on: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/package-info.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/ClassPathI18nInitializer.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/ClassPathI18nInitializer.java 2011-05-13 09:17:46 UTC (rev 1927)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/ClassPathI18nInitializer.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -52,7 +52,7 @@
*/
public class ClassPathI18nInitializer extends I18nInitializer {
- /** Logger */
+ /** Logger. */
private static final Log log =
LogFactory.getLog(ClassPathI18nInitializer.class);
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/DefaultI18nInitializer.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/DefaultI18nInitializer.java 2011-05-13 09:17:46 UTC (rev 1927)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/DefaultI18nInitializer.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -48,7 +48,7 @@
*/
public class DefaultI18nInitializer extends I18nInitializer {
- /** Logger */
+ /** Logger. */
private static final Log log =
LogFactory.getLog(DefaultI18nInitializer.class);
@@ -64,15 +64,16 @@
public static String BUNDLES_FOR_LOCALE = "bundles.";
- /** the name of the bundle */
+ /** the name of the bundle. */
protected final String bundleName;
- /** class loader to use (optional) */
+ /** class loader to use (optional). */
protected ClassLoader loader;
- /** i18n path where to seek for resources (optional) */
+ /** i18n path where to seek for resources (optional). */
protected String i18nPath;
+ /** location of the definition file. */
protected URL definitionURL;
public static final String DEFAULT_I18N_PATH = "META-INF/";
@@ -121,8 +122,8 @@
}
protected URL getResourceURL(String resource) {
- if (log.isInfoEnabled()) {
- log.info("resource to seek : " + resource);
+ if (log.isDebugEnabled()) {
+ log.debug("resource to seek : " + resource);
}
URL url = getLoader().getResource(resource);
return url;
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/I18nInitializer.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/I18nInitializer.java 2011-05-13 09:17:46 UTC (rev 1927)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/I18nInitializer.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -28,7 +28,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.nuiton.i18n.I18n;
-import org.nuiton.i18n.I18nMessageFormatter;
+import org.nuiton.i18n.format.I18nMessageFormatter;
import org.nuiton.i18n.I18nUtil;
import org.nuiton.i18n.bundle.I18nBundle;
import org.nuiton.i18n.bundle.I18nBundleEntry;
@@ -44,11 +44,12 @@
* {@link I18n}.
*
* @author tchemit <chemit(a)codelutin.com>
+ * @author fdebois <debois(a)codelutin.com>
* @since 1.1
*/
public abstract class I18nInitializer {
- /** Logger */
+ /** Logger. */
private static final Log log = LogFactory.getLog(I18nInitializer.class);
/**
@@ -103,7 +104,8 @@
/**
* Get the {@link Charset} encoding used for i18n {@link Properties} file loading.
*
- * @return Charset
+ * @return encoding to use
+ * @since 2.4
*/
public Charset getEncoding() {
return encoding;
@@ -124,9 +126,11 @@
}
/**
- * Get the {@link I18nMessageFormatter} to use on each i18n message translation.
+ * Get the {@link I18nMessageFormatter} to use on each i18n message
+ * translation.
*
- * @return I18nMessageFormatter
+ * @return formatter to use
+ * @since 2.4
*/
public I18nMessageFormatter getMessageFormatter() {
return messageFormatter;
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/UserI18nInitializer.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/UserI18nInitializer.java 2011-05-13 09:17:46 UTC (rev 1927)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/UserI18nInitializer.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -28,7 +28,7 @@
import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.nuiton.i18n.I18nMessageFormatter;
+import org.nuiton.i18n.format.I18nMessageFormatter;
import org.nuiton.i18n.bundle.I18nBundle;
import org.nuiton.i18n.bundle.I18nBundleEntry;
import org.nuiton.i18n.bundle.I18nBundleUtil;
@@ -50,7 +50,7 @@
*/
public class UserI18nInitializer extends DefaultI18nInitializer {
- /** Logger */
+ /** Logger. */
private static final Log log = LogFactory.getLog(UserI18nInitializer.class);
/** the user directory where to store the i18n resources. */
Added: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/package-info.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/package-info.java (rev 0)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/package-info.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -0,0 +1,8 @@
+package org.nuiton.i18n.init;
+/**
+ * This package contains the initializer api says the contract and offered
+ * implementations of object responsible of init I18n runtime system.
+ * <p/>
+ *
+ * TODO Continue the documentation.
+ */
\ No newline at end of file
Property changes on: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/package-info.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/package-info.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/package-info.java (rev 0)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/package-info.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -0,0 +1,7 @@
+package org.nuiton.i18n;
+/**
+ * This is the main package of the I18n runtime api.
+ * <p/>
+ *
+ * TODO Continue the documentation.
+ */
\ No newline at end of file
Property changes on: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/package-info.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/util/converter/LocaleConverter.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/util/converter/LocaleConverter.java 2011-05-13 09:17:46 UTC (rev 1927)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/util/converter/LocaleConverter.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -51,7 +51,7 @@
private static final Pattern MEDIUM_SCOPE_PATTERN =
Pattern.compile("([a-zA-Z]{2})");
- /** to use log facility, just put in your code: log.info(\"...\"); */
+ /** Logger. */
static Log log = getLog(LocaleConverter.class);
@Override
@@ -133,14 +133,14 @@
public LocaleConverter() {
if (log.isDebugEnabled()) {
- log.debug(this);
+ log.debug("init locale converter : " + this);
}
}
protected boolean isEnabled(Class<?> aClass) {
return Locale.class.equals(aClass);
}
-
+
public Class<?> getType() {
return Locale.class;
}
Added: trunk/nuiton-i18n/src/main/java/org/nuiton/util/converter/package-info.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/util/converter/package-info.java (rev 0)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/util/converter/package-info.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -0,0 +1,8 @@
+package org.nuiton.util.converter;
+/**
+ * This package contains some converters. The very package is used by the
+ * nuiton-utils converter api to load converters.
+ * <p/>
+ *
+ * TODO Continue the documentation.
+ */
\ No newline at end of file
Property changes on: trunk/nuiton-i18n/src/main/java/org/nuiton/util/converter/package-info.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Modified: trunk/nuiton-i18n/src/test/java/org/nuiton/i18n/I18nTest.java
===================================================================
--- trunk/nuiton-i18n/src/test/java/org/nuiton/i18n/I18nTest.java 2011-05-13 09:17:46 UTC (rev 1927)
+++ trunk/nuiton-i18n/src/test/java/org/nuiton/i18n/I18nTest.java 2011-05-13 09:59:47 UTC (rev 1928)
@@ -28,6 +28,7 @@
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.nuiton.i18n.format.MessageFormatI18nMessageFormatter;
import org.nuiton.i18n.init.DefaultI18nInitializer;
import java.util.Date;
@@ -204,7 +205,7 @@
@Test
public void testFormatterMessageFormat() {
- initializer.setMessageFormatter(new I18nUtil.MessageFormatI18nMessageFormatter());
+ initializer.setMessageFormatter(new MessageFormatI18nMessageFormatter());
I18n.init(initializer, Locale.UK);
Date date = new GregorianCalendar(2011, 4, 5).getTime();
1
0
Author: tchemit
Date: 2011-05-13 11:17:46 +0200 (Fri, 13 May 2011)
New Revision: 1927
Url: http://nuiton.org/repositories/revision/i18n/1927
Log:
fix it
Modified:
trunk/maven-i18n-plugin/src/it/evo-1507/verify.groovy
Modified: trunk/maven-i18n-plugin/src/it/evo-1507/verify.groovy
===================================================================
--- trunk/maven-i18n-plugin/src/it/evo-1507/verify.groovy 2011-05-12 08:48:08 UTC (rev 1926)
+++ trunk/maven-i18n-plugin/src/it/evo-1507/verify.groovy 2011-05-13 09:17:46 UTC (rev 1927)
@@ -44,9 +44,9 @@
return true;
}
-assert fileExists('target/classes/org/nuiton/ResultBundle_fr_FR.properties');
+assert fileExists('target/classes/META-INF/ResultBundle_fr_FR.properties');
-assert checkContent('target/classes/org/nuiton/ResultBundle_fr_FR.properties',
+assert checkContent('target/classes/META-INF/ResultBundle_fr_FR.properties',
['lib.property.message1=Message qui a besoin de conversion pour {0} et {1}',
'app.property=Mon application {0}',
'lib.property.message2=Message qui fait attention à la conversion de {0}']);
1
0
r1926 - trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init
by fdesbois@users.nuiton.org 12 May '11
by fdesbois@users.nuiton.org 12 May '11
12 May '11
Author: fdesbois
Date: 2011-05-12 10:48:08 +0200 (Thu, 12 May 2011)
New Revision: 1926
Url: http://nuiton.org/repositories/revision/i18n/1926
Log:
Bad imports configuration
Modified:
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/I18nInitializer.java
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/I18nInitializer.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/I18nInitializer.java 2011-05-12 08:40:34 UTC (rev 1925)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/I18nInitializer.java 2011-05-12 08:48:08 UTC (rev 1926)
@@ -25,11 +25,6 @@
package org.nuiton.i18n.init;
-import java.net.URL;
-import java.nio.charset.Charset;
-import java.util.List;
-import java.util.Properties;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.nuiton.i18n.I18n;
@@ -39,6 +34,11 @@
import org.nuiton.i18n.bundle.I18nBundleEntry;
import org.nuiton.i18n.bundle.I18nBundleUtil;
+import java.net.URL;
+import java.nio.charset.Charset;
+import java.util.List;
+import java.util.Properties;
+
/**
* Abstract object to resolv {@link I18nBundle} and prepare initialization of
* {@link I18n}.
1
0
r1925 - in trunk: nuiton-i18n/src/main/java/org/nuiton/i18n/init src/site/apt
by fdesbois@users.nuiton.org 12 May '11
by fdesbois@users.nuiton.org 12 May '11
12 May '11
Author: fdesbois
Date: 2011-05-12 10:40:34 +0200 (Thu, 12 May 2011)
New Revision: 1925
Url: http://nuiton.org/repositories/revision/i18n/1925
Log:
doc improvement
Modified:
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/I18nInitializer.java
trunk/src/site/apt/index.apt
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/I18nInitializer.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/I18nInitializer.java 2011-05-11 15:46:17 UTC (rev 1924)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/I18nInitializer.java 2011-05-12 08:40:34 UTC (rev 1925)
@@ -25,6 +25,11 @@
package org.nuiton.i18n.init;
+import java.net.URL;
+import java.nio.charset.Charset;
+import java.util.List;
+import java.util.Properties;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.nuiton.i18n.I18n;
@@ -34,10 +39,6 @@
import org.nuiton.i18n.bundle.I18nBundleEntry;
import org.nuiton.i18n.bundle.I18nBundleUtil;
-import java.net.URL;
-import java.nio.charset.Charset;
-import java.util.List;
-
/**
* Abstract object to resolv {@link I18nBundle} and prepare initialization of
* {@link I18n}.
@@ -99,22 +100,46 @@
return result;
}
+ /**
+ * Get the {@link Charset} encoding used for i18n {@link Properties} file loading.
+ *
+ * @return Charset
+ */
public Charset getEncoding() {
return encoding;
}
- public void setEncoding(Charset encoding) {
+ /**
+ * Set {@code encoding} to use for i18n {@link Properties} file loading.
+ *
+ * @param encoding Charset encoding to use
+ * @throws NullPointerException if {@code encoding} is null
+ * @since 2.4
+ */
+ public void setEncoding(Charset encoding) throws NullPointerException {
if (encoding == null) {
throw new NullPointerException("Can not set a null encoding");
}
this.encoding = encoding;
}
+ /**
+ * Get the {@link I18nMessageFormatter} to use on each i18n message translation.
+ *
+ * @return I18nMessageFormatter
+ */
public I18nMessageFormatter getMessageFormatter() {
return messageFormatter;
}
- public void setMessageFormatter(I18nMessageFormatter messageFormatter) {
+ /**
+ * Set {@code messageFormatter} to use on each i18n message translation.
+ *
+ * @param messageFormatter I18nMessageFormatter to use
+ * @throws NullPointerException if {@code messageFormatter} is null
+ * @since 2.4
+ */
+ public void setMessageFormatter(I18nMessageFormatter messageFormatter) throws NullPointerException {
if (messageFormatter == null) {
throw new NullPointerException(
"Can not set a null message formatter");
Modified: trunk/src/site/apt/index.apt
===================================================================
--- trunk/src/site/apt/index.apt 2011-05-11 15:46:17 UTC (rev 1924)
+++ trunk/src/site/apt/index.apt 2011-05-12 08:40:34 UTC (rev 1925)
@@ -81,8 +81,8 @@
- au niveau du runtime en spécifiant à l'initializer le bon messageFormatter à utiliser.
(voir l'interface {{{./nuiton-i18n/apidocs/org/nuiton/i18n/I18nMessageFormatter.html}I18nMessageFormatter}}).
- A noter qu'au runtime, les syntaxes de traductions ne peuvents pas être
- changées et utiliser un formatter qui ne correspond pas à la syntaxe des
+ A noter qu'au runtime, les syntaxes de traductions ne peuvent pas être
+ changées. Utiliser un formatter qui ne correspond pas à la syntaxe des
traductions ne fonctionnera pas correctement.
Quoi de neuf dans la version 2.3
1
0
Author: tchemit
Date: 2011-05-11 17:46:17 +0200 (Wed, 11 May 2011)
New Revision: 1924
Url: http://nuiton.org/repositories/revision/i18n/1924
Log:
update docs
Modified:
trunk/src/site/apt/index.apt
trunk/src/site/en/apt/index.apt
Modified: trunk/src/site/apt/index.apt
===================================================================
--- trunk/src/site/apt/index.apt 2011-05-11 15:46:11 UTC (rev 1923)
+++ trunk/src/site/apt/index.apt 2011-05-11 15:46:17 UTC (rev 1924)
@@ -53,26 +53,47 @@
Quoi de neuf dans la version 2.4
- La version 2.4 gère désormais les fichiers properties en UTF-8 par défaut.
- Il est cependant possible de modifier cet encoding dans le plugin et via
- le {{{./nuiton-i18n/apidocs/org/nuiton/i18n/init/I18nInitializer.html}I18nInitializer}}
- pour l'api runtime.
+* Meilleure utilisation des encodings
- Il est aussi possible d'utiliser un autre formattage que celui de <String.format>
- en utilisant l'interface {{{./nuiton-i18n/apidocs/org/nuiton/i18n/I18nFormatter.html}I18nFormatter}}.
- Le plugin maven permet d'appliquer une conversion si différents formattages
- sont utilisés en utilisant le paramètre <<bundleFormatConverter>> du goal <<bundle>>.
- Ce converter implante le contrat {{{./nuiton-i18n/apidocs/org/nuiton/i18n/plugin/bundle/BundleFormatConverter.html}BundleFormatConverter}}.
+ Depuis la JDK 1.6, il est possible de charger et écrire des fichiers de
+ propriétés en spécifiant son propre encoding, il n'y a donc plus de raison de
+ rester sur un encoding ISO-8859-1 ou US/ASCII.
+ I18n a intégré ces changements, et il devient donc désormais raisonnable
+ d'utiliser comme encoding par défaut <UTF-8>. Cet encoding par défaut peut
+ toujours être modifié à différents niveaux :
+
+ - lors de la génération des fichiers i18n (via le plugin i18n)
+ - lors de l'initialisation de I18n au runtime via l'initializer ({{{./nuiton-i18n/apidocs/org/nuiton/i18n/init/I18nInitializer.html}I18nInitializer}}).
+
+* Gestion d'autre formats pour les traductions
+
+ Par défaut, I18n utilise un <String.format> et sa syntaxe pour les traductions.
+
+ Cependant, on peut vouloir utiliser le plugin i18n sans utiliser le runtime
+ I18n et utiliser à la place un système de traduction basé notamment sur
+ <MessageFormat> (comme le fait struts2 ou GWT par exemple).
+
+ La version 2.4 permet d'utiliser désormais de changer de syntaxe et ceci
+ à différents niveaux :
+
+ - au niveau de la génération d'un bundle via le paramètre <<bundleFormatConverter>> du goal <<bundle>>
+ - au niveau du runtime en spécifiant à l'initializer le bon messageFormatter à utiliser.
+ (voir l'interface {{{./nuiton-i18n/apidocs/org/nuiton/i18n/I18nMessageFormatter.html}I18nMessageFormatter}}).
+
+ A noter qu'au runtime, les syntaxes de traductions ne peuvents pas être
+ changées et utiliser un formatter qui ne correspond pas à la syntaxe des
+ traductions ne fonctionnera pas correctement.
+
Quoi de neuf dans la version 2.3
La version 2.3 améliore de façon considérable les temps de détection des clefs
- i18n pour les fichiers java (mojo <<parserJava>>).
+ i18n pour les fichiers java (mojo <<parserJava>>).
- Voir {{{http://nuiton.org/issues/show/1275}Evolution #1275: Improve parserJava performance}}.
+ Voir {{{http://nuiton.org/issues/show/1275}Evolution #1275: Improve parserJava performance}}.
- On passe à des temps très raisonnable (en dessous de 5 millisecondes par
- fichier!) comme montré ci-dessous :
+ On passe à des temps très raisonnable (en dessous de 5 millisecondes par
+ fichier!) comme montré ci-dessous :
--------------------------------------------------------------------------------
mvn package -Pnotests -Di18n.strictMode -DnuitonI18nVersion=2.2
Modified: trunk/src/site/en/apt/index.apt
===================================================================
--- trunk/src/site/en/apt/index.apt 2011-05-11 15:46:11 UTC (rev 1923)
+++ trunk/src/site/en/apt/index.apt 2011-05-11 15:46:17 UTC (rev 1924)
@@ -53,18 +53,38 @@
What's new in 2.4 version
- The 2.4 version manage properties file with UTF-8 encoding by default.
- It's also possible to change this encoding with maven plugin and with
- {{{./nuiton-i18n/apidocs/org/nuiton/i18n/init/I18nInitializer.html}I18nInitializer}}
- for runtime api.
+* Better usage of encodings
- A new formatter {{{./nuiton-i18n/apidocs/org/nuiton/i18n/I18nFormatter.html}I18nFormatter}}
- is available to allow different implementation than <String.format> (default one).
- The maven plugin also allow to apply a conversion if different format are used
- when using <<bundle>> goal, you can set the <<bundleFormatConverter>> parameter.
- This converter implements the interface
- {{{./nuiton-i18n/apidocs/org/nuiton/i18n/plugin/bundle/BundleFormatConverter.html}BundleFormatConverter}}.
+ Since JDK 1.6, it is possible to load and store properties files using a
+ given encoding, there is then no more reason to stay on a hardcoded encoding
+ such as <ISO-8859-1> or <US/ASCII>.
+ I18n integrates this changes and now it is more serious to use as default
+ encoding <<UTF-8>>.
+
+ This encoding can be changed at two places:
+
+ - while generating files (by the i18n plugin)
+ - at the runtime initialization of I18n class via the initializer ({{{./nuiton-i18n/apidocs/org/nuiton/i18n/init/I18nInitializer.html}I18nInitializer}}).
+
+* Deal other syntax formats for translations
+
+ By default, I18n use the <String.format> syntax for translations.
+
+ By sometimes, we would like to use the i18n plugin to manage translations and
+ their bundles, but use a different i18n runtime system base on <MessageFormat>
+ (like does struts2 or GWT).
+
+ Version 2.4 allows now to change the syntax of translations at differents places:
+
+ - at generation time of the bundle using parameter <<bundleFormatConverter>> of <<bundle>> mojo.
+ - at runtime time, by giving to the i18n initializer the correct messageFormatter to use.
+ (see contract {{{./nuiton-i18n/apidocs/org/nuiton/i18n/I18nMessageFormatter.html}I18nMessageFormatter}}).
+
+ Note that at runtime time translations can not be swapped froma syntax to
+ another one, using a different syntax from the one used by translations will
+ not work properly.
+
What's new in 2.3 version
Version 2.3 improves a lot performance on detection of java file i18n keys
1
0
11 May '11
Author: tchemit
Date: 2011-05-11 17:46:11 +0200 (Wed, 11 May 2011)
New Revision: 1923
Url: http://nuiton.org/repositories/revision/i18n/1923
Log:
fix inheritance...
Modified:
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/I18nInitializer.java
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/I18nInitializer.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/I18nInitializer.java 2011-05-11 14:51:07 UTC (rev 1922)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/I18nInitializer.java 2011-05-11 15:46:11 UTC (rev 1923)
@@ -68,10 +68,10 @@
protected I18nInitializer() {
// use the default encoding
- setEncoding(I18nUtil.DEFAULT_CHARSET);
+ encoding = I18nUtil.DEFAULT_CHARSET;
// use the default message formatter
- setMessageFormatter(I18nUtil.DEFAULT_MESSAGE_FORMATTER);
+ messageFormatter = I18nUtil.DEFAULT_MESSAGE_FORMATTER;
}
/**
1
0
r1922 - in trunk/nuiton-i18n/src: main/java/org/nuiton/i18n main/java/org/nuiton/i18n/bundle main/java/org/nuiton/i18n/init test/java/org/nuiton/i18n test/resources
by tchemit@users.nuiton.org 11 May '11
by tchemit@users.nuiton.org 11 May '11
11 May '11
Author: tchemit
Date: 2011-05-11 16:51:07 +0200 (Wed, 11 May 2011)
New Revision: 1922
Url: http://nuiton.org/repositories/revision/i18n/1922
Log:
clean api
Added:
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nMessageFormatter.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/format/
Removed:
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nFormat.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nFormatter.java
Modified:
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18n.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nLanguage.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nUtil.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/I18nBundleEntry.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/ClassPathI18nInitializer.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/DefaultI18nInitializer.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/I18nInitializer.java
trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/UserI18nInitializer.java
trunk/nuiton-i18n/src/test/java/org/nuiton/i18n/I18nTest.java
trunk/nuiton-i18n/src/test/resources/log4j.properties
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18n.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18n.java 2011-05-11 14:48:59 UTC (rev 1921)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18n.java 2011-05-11 14:51:07 UTC (rev 1922)
@@ -74,11 +74,15 @@
protected static I18nFilter filter;
/**
- * Formatter to use, default value is {@link I18nFormat#STRING_FORMAT}
+ * Formatter to apply on each translation.
+ * <p/>
+ * This formatter can not be configured directly here, but must be setted
+ * into the {@code initializer} used to configure the I18n system.
*
+ * @see I18nInitializer#setMessageFormatter(I18nMessageFormatter)
* @since 2.4
*/
- protected static I18nFormatter formatter = I18nFormat.STRING_FORMAT;
+ protected static I18nMessageFormatter messageFormatter;
/**
* Change le filtre des chaines traduites
@@ -90,16 +94,6 @@
}
/**
- * Change {@code formatter} to use on each translation with args.
- *
- * @param formatter I18nFormatter to use
- * @since 2.4
- */
- public static void setFormatter(I18nFormatter formatter) {
- I18n.formatter = formatter;
- }
-
- /**
* Initialize I18n system.
* <p/>
* The {@code initializer} can be null, in that case it will use the default
@@ -199,7 +193,7 @@
* Retourne la chaine traduite si possible dans la locale demandée.
*
* @param locale la locale dans lequel on souhaite la traduction
- * @param message message formate avec {@link I18nFormatter}
+ * @param message message formate avec {@link I18nMessageFormatter}
* @param args les parametres pour le message.
* @return la traduction si possible ou la chaine passee en parametre
* sinon.
@@ -217,7 +211,7 @@
I18nLanguage language = getLanguage(locale);
String result = language.translate(message);
- // Don't check the length, this will be done directly in formatter if necessary.
+ // Don't check the length, this will be done directly in messageFormatter if necessary.
// In MessageFormat case it must format all messages even there is no args (because of '' escape case).
// if (args.length == 0) {
//
@@ -226,10 +220,10 @@
// }
try {
- return applyFilter(formatter.format(locale, result, args));
+ return applyFilter(messageFormatter.format(locale, result, args));
} catch (Exception eee) {
try {
- return applyFilter(formatter.format(locale, message, args));
+ return applyFilter(messageFormatter.format(locale, message, args));
} catch (Exception zzz) {
if (log.isWarnEnabled()) {
log.warn(
@@ -244,7 +238,7 @@
/**
* Retourne la chaine traduite si possible.
*
- * @param message message formate avec {@link I18nFormatter}
+ * @param message message formate avec {@link I18nMessageFormatter}
* @param args les parametres pour le message.
* @return la traduction si possible ou la chaine passee en parametre
* sinon.
@@ -280,7 +274,7 @@
* devant être traduit seulement à leur lecture suivant la locale du lecteur
* et non du créateur.
*
- * @param message message formate avec {@link I18nFormatter}
+ * @param message message formate avec {@link I18nMessageFormatter}
* @param args les parametres pour le message.
* @return le message passe en argument mais formatté avec les parametres
*/
@@ -293,7 +287,7 @@
// XXX-fdesbois-2011-05-05 : don't know if it's relevant to format here,
// seems pretty useless because we will not use the value
// corresponding to given key message
- return formatter.format(getDefaultLocale(), message, args);
+ return messageFormatter.format(getDefaultLocale(), message, args);
} catch (Exception eee) {
if (log.isWarnEnabled()) {
log.warn(
@@ -315,6 +309,9 @@
store.close();
store = null;
}
+ if (messageFormatter != null) {
+ messageFormatter = null;
+ }
}
/**
@@ -398,8 +395,8 @@
return filter;
}
- public static I18nFormatter getFormatter() {
- return formatter;
+ public static I18nMessageFormatter getMessageFormatter() {
+ return messageFormatter;
}
/**
@@ -433,6 +430,8 @@
store = new I18nStore(locale, initializer);
setDefaultLocale(locale);
+
+ messageFormatter = initializer.getMessageFormatter();
}
protected static I18nInitializer getDefaultInitializer() {
Deleted: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nFormat.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nFormat.java 2011-05-11 14:48:59 UTC (rev 1921)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nFormat.java 2011-05-11 14:51:07 UTC (rev 1922)
@@ -1,76 +0,0 @@
-/*
- * #%L
- * I18n :: Api
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2004 - 2011 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
- *
- * You should have received a copy of the GNU General Lesser Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
- * #L%
- */
-package org.nuiton.i18n;
-
-import java.text.MessageFormat;
-import java.util.Formatter;
-import java.util.Locale;
-
-/**
- * Enum implementation for {@link I18nFormatter}. Provides basic formatter
- * such as {@link #STRING_FORMAT} and {@link #MESSAGE_FORMAT}.
- * <p/>
- * Created: 05/05/11
- *
- * @author fdesbois <desbois(a)codelutin.com>
- * $Id$
- * @since 2.4
- */
-public enum I18nFormat implements I18nFormatter {
-
- /**
- * Implementation based on printf syntax.
- *
- * @see Formatter
- * @see String#format(Locale, String, Object...)
- */
- STRING_FORMAT {
-
- @Override
- public String format(Locale locale, String message, Object... args) {
- String result;
- // Previous behavior, no format will be done for empty args
- if (args.length == 0) {
- result = message;
- } else {
- result = String.format(locale, message, args);
- }
- return result;
- }
- },
-
- /**
- * Implementation based on {@link MessageFormat} syntax.
- */
- MESSAGE_FORMAT {
-
- @Override
- public String format(Locale locale, String message, Object... args) {
- MessageFormat formatter = new MessageFormat(message, locale);
- return formatter.format(args);
- }
- }
-
-}
Deleted: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nFormatter.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nFormatter.java 2011-05-11 14:48:59 UTC (rev 1921)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nFormatter.java 2011-05-11 14:51:07 UTC (rev 1922)
@@ -1,53 +0,0 @@
-/*
- * #%L
- * I18n :: Api
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2004 - 2011 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
- *
- * You should have received a copy of the GNU General Lesser Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
- * #L%
- */
-package org.nuiton.i18n;
-
-import java.util.Locale;
-
-/**
- * Formatter to use at runtime when message need to be translated with args.
- * <p/>
- * Created: 05/05/11
- *
- * @author fdesbois <desbois(a)codelutin.com>
- * @see I18nFormat
- * $Id$
- * @since 2.4
- */
-public interface I18nFormatter {
-
- /**
- * Format a given {@code message} with {@code locale} and {@code args}.
- * The purpose is to replace placeholders in {@code message} with {@code args}
- * value. This could depends on {@code locale} for date purpose for example.
- *
- * @param locale Locale to use for formatting (number, date, ...)
- * @param message Message to format (that contains placeholders)
- * @param args Object array to use in formatting the message
- * @return the formatted message
- */
- String format(Locale locale, String message, Object... args);
-
-}
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nLanguage.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nLanguage.java 2011-05-11 14:48:59 UTC (rev 1921)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nLanguage.java 2011-05-11 14:51:07 UTC (rev 1922)
@@ -81,8 +81,7 @@
*/
@Deprecated
public void load(I18nBundleEntry[] bundleEntries) {
- Charset encoding = Charset.forName(I18nUtil.DEFAULT_ENCODING);
- load(bundleEntries, encoding);
+ load(bundleEntries, I18nUtil.DEFAULT_CHARSET);
}
/**
Copied: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nMessageFormatter.java (from rev 1920, trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nFormatter.java)
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nMessageFormatter.java (rev 0)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nMessageFormatter.java 2011-05-11 14:51:07 UTC (rev 1922)
@@ -0,0 +1,57 @@
+/*
+ * #%L
+ * I18n :: Api
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2011 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+package org.nuiton.i18n;
+
+import java.util.Locale;
+
+/**
+ * Contract to format a i18n message.
+ * <p/>
+ * Created: 05/05/11
+ *
+ * @author fdesbois <desbois(a)codelutin.com>
+ * @author tchemit <chemit(a)codelutin.com>
+ * @see I18nUtil.DefaultI18nMessageFormatters
+ * $Id$
+ * @since 2.4
+ */
+public interface I18nMessageFormatter {
+
+ /**
+ * Format a given {@code message} with {@code locale} and optinal {@code args}.
+ * <p/>
+ * The main purpose is to replace placeholders in {@code message} with
+ * {@code args} value.
+ * <p/>
+ * This may depend on {@code locale} for date purpose for example.
+ *
+ * @param locale locale to use for formatting (number, date, ...)
+ * @param message message to format (that contains placeholders)
+ * @param args object array to use in formatting the message
+ * @return the formatted message
+ */
+ String format(Locale locale, String message, Object... args);
+
+}
Property changes on: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nMessageFormatter.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nUtil.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nUtil.java 2011-05-11 14:48:59 UTC (rev 1921)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nUtil.java 2011-05-11 14:51:07 UTC (rev 1922)
@@ -36,8 +36,11 @@
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLClassLoader;
+import java.nio.charset.Charset;
+import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Formatter;
import java.util.List;
import java.util.Locale;
import java.util.Stack;
@@ -49,7 +52,7 @@
/** @author tchemit <chemit(a)codelutin.com> */
public class I18nUtil {
- /** to use log facility, just put in your code: log.info(\"...\"); */
+ /** Logger. */
private static final Log log = LogFactory.getLog(I18nUtil.class);
public static final String ISO_8859_1_ENCONDING = "ISO-8859-1";
@@ -58,6 +61,12 @@
public static final String DEFAULT_ENCODING = UTF_8_ENCONDING;
+ public static final Charset DEFAULT_CHARSET =
+ Charset.forName(DEFAULT_ENCODING);
+
+ public static final I18nMessageFormatter DEFAULT_MESSAGE_FORMATTER =
+ new StringFormatI18nMessageFormatter();
+
public static final Locale DEFAULT_LOCALE = Locale.UK;
public static final String[] EMPTY_STRING_ARRAY = new String[0];
@@ -83,7 +92,7 @@
result.add(l);
} catch (Exception e) {
throw new IllegalArgumentException("bundle " + s +
- " is not a valid locale,e");
+ " is not a valid locale", e);
}
}
return result.toArray(new Locale[result.size()]);
@@ -91,15 +100,18 @@
public static Locale newLocale(String str) {
if (str == null) {
- // get use locale
+
+ // get user locale
return newLocale(null, null);
}
try {
return (Locale) new LocaleConverter().convert(Locale.class, str);
} catch (Exception e) {
- if (log.isWarnEnabled()) {
- log.warn("could not load locale '" + str + " for reason : " + e.getMessage());
- }
+ if (log.isWarnEnabled()) {
+ log.warn("could not load locale '" + str +
+ " for reason : " + e.getMessage());
+ }
+
// use default locale
return DEFAULT_LOCALE;
}
@@ -107,6 +119,7 @@
public static Locale newLocale(String language, String country) {
if (language == null) {
+
// get user locale
language = System.getProperty("user.language",
DEFAULT_LOCALE.getLanguage());
@@ -378,4 +391,46 @@
}
return result;
}
+
+ /**
+ * Implementation of {@link I18nMessageFormatter} based on {@link Formatter}
+ * syntax.
+ * <p/>
+ * <strong>Note: </strong> This is the default message formatter used by
+ * i18n system.
+ *
+ * @see Formatter
+ * @see String#format(Locale, String, Object...)
+ * @since 2.4
+ */
+ public static class StringFormatI18nMessageFormatter implements I18nMessageFormatter {
+
+ @Override
+ public String format(Locale locale, String message, Object... args) {
+ String result;
+ // Previous behavior, no format will be done for empty args
+ if (args.length == 0) {
+ result = message;
+ } else {
+ result = String.format(locale, message, args);
+ }
+ return result;
+ }
+ }
+
+ /**
+ * Implementation of {@link I18nMessageFormatter} based on
+ * {@link MessageFormat} syntax.
+ *
+ * @see MessageFormat
+ * @since 2.4
+ */
+ public static class MessageFormatI18nMessageFormatter implements I18nMessageFormatter {
+ @Override
+ public String format(Locale locale, String message, Object... args) {
+ MessageFormat formatter = new MessageFormat(message, locale);
+ return formatter.format(args);
+ }
+ }
+
}
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/I18nBundleEntry.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/I18nBundleEntry.java 2011-05-11 14:48:59 UTC (rev 1921)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/bundle/I18nBundleEntry.java 2011-05-11 14:51:07 UTC (rev 1922)
@@ -130,8 +130,7 @@
*/
@Deprecated
public void load(Properties resource) throws IOException {
- Charset encoding = Charset.forName(I18nUtil.DEFAULT_ENCODING);
- load(resource, encoding);
+ load(resource, I18nUtil.DEFAULT_CHARSET);
}
/**
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/ClassPathI18nInitializer.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/ClassPathI18nInitializer.java 2011-05-11 14:48:59 UTC (rev 1921)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/ClassPathI18nInitializer.java 2011-05-11 14:51:07 UTC (rev 1922)
@@ -33,7 +33,6 @@
import java.net.URL;
import java.net.URLClassLoader;
-import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
@@ -71,11 +70,6 @@
}
public ClassPathI18nInitializer(ClassLoader loader, URL[] extraURLs) {
- this(loader, extraURLs, null);
- }
-
- public ClassPathI18nInitializer(ClassLoader loader, URL[] extraURLs, Charset encoding) {
- super(encoding);
this.loader = loader == null ? getClass().getClassLoader() : loader;
this.extraURLs = extraURLs;
}
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/DefaultI18nInitializer.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/DefaultI18nInitializer.java 2011-05-11 14:48:59 UTC (rev 1921)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/DefaultI18nInitializer.java 2011-05-11 14:51:07 UTC (rev 1922)
@@ -78,13 +78,13 @@
public static final String DEFAULT_I18N_PATH = "META-INF/";
public DefaultI18nInitializer(String bundleName) throws
- NullPointerException {
+ NullPointerException {
this(bundleName, null, null);
}
public DefaultI18nInitializer(String bundleName,
ClassLoader loader) throws
- NullPointerException {
+ NullPointerException {
this(bundleName, loader, null);
}
@@ -148,11 +148,12 @@
}
// Load encoding from definition file and use it as Charset encoding
- if (encoding == null) {
- String encoding = properties.getProperty(BUNDLE_DEF_ENCODING);
- Charset charset = Charset.forName(encoding);
- setEncoding(charset);
+ String encoding = properties.getProperty(BUNDLE_DEF_ENCODING);
+ Charset charset = Charset.forName(encoding);
+ if (log.isInfoEnabled()) {
+ log.info("Use encoding " + charset);
}
+ setEncoding(charset);
String prefix = url.toString();
prefix = prefix.substring(0, prefix.length() - filename.length());
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/I18nInitializer.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/I18nInitializer.java 2011-05-11 14:48:59 UTC (rev 1921)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/I18nInitializer.java 2011-05-11 14:51:07 UTC (rev 1922)
@@ -27,6 +27,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.nuiton.i18n.I18n;
+import org.nuiton.i18n.I18nMessageFormatter;
import org.nuiton.i18n.I18nUtil;
import org.nuiton.i18n.bundle.I18nBundle;
import org.nuiton.i18n.bundle.I18nBundleEntry;
@@ -37,7 +39,8 @@
import java.util.List;
/**
- * Contract of a resolver of {@link I18nBundle}.
+ * Abstract object to resolv {@link I18nBundle} and prepare initialization of
+ * {@link I18n}.
*
* @author tchemit <chemit(a)codelutin.com>
* @since 1.1
@@ -47,21 +50,28 @@
/** Logger */
private static final Log log = LogFactory.getLog(I18nInitializer.class);
- protected static Charset defaultEncoding =
- Charset.forName(I18nUtil.DEFAULT_ENCODING);
-
+ /**
+ * Encoding used to load i18n bundles.
+ *
+ * @since 2.4
+ */
protected Charset encoding;
- protected I18nInitializer() {
- }
-
/**
- * Constructor with {@code encoding} used to load Properties file.
+ * Message formatter used in {@link I18n} to produce final translated
+ * messages.
*
- * @param encoding Charset to use for Properties loading
+ * @since 2.4
*/
- protected I18nInitializer(Charset encoding) {
- this.encoding = encoding;
+ protected I18nMessageFormatter messageFormatter;
+
+ protected I18nInitializer() {
+
+ // use the default encoding
+ setEncoding(I18nUtil.DEFAULT_CHARSET);
+
+ // use the default message formatter
+ setMessageFormatter(I18nUtil.DEFAULT_MESSAGE_FORMATTER);
}
/**
@@ -86,17 +96,29 @@
log.info(bundles.size() + " bundle(s) found, in " +
entries.length + " file(s).");
}
-
return result;
}
public Charset getEncoding() {
- Charset result = encoding == null ? defaultEncoding : encoding;
- return result;
+ return encoding;
}
public void setEncoding(Charset encoding) {
+ if (encoding == null) {
+ throw new NullPointerException("Can not set a null encoding");
+ }
this.encoding = encoding;
}
+ public I18nMessageFormatter getMessageFormatter() {
+ return messageFormatter;
+ }
+
+ public void setMessageFormatter(I18nMessageFormatter messageFormatter) {
+ if (messageFormatter == null) {
+ throw new NullPointerException(
+ "Can not set a null message formatter");
+ }
+ this.messageFormatter = messageFormatter;
+ }
}
Modified: trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/UserI18nInitializer.java
===================================================================
--- trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/UserI18nInitializer.java 2011-05-11 14:48:59 UTC (rev 1921)
+++ trunk/nuiton-i18n/src/main/java/org/nuiton/i18n/init/UserI18nInitializer.java 2011-05-11 14:51:07 UTC (rev 1922)
@@ -28,6 +28,7 @@
import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.nuiton.i18n.I18nMessageFormatter;
import org.nuiton.i18n.bundle.I18nBundle;
import org.nuiton.i18n.bundle.I18nBundleEntry;
import org.nuiton.i18n.bundle.I18nBundleUtil;
@@ -37,6 +38,7 @@
import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
+import java.nio.charset.Charset;
import java.util.Properties;
/**
@@ -97,6 +99,26 @@
}
@Override
+ public Charset getEncoding() {
+ return getDelegate().getEncoding();
+ }
+
+ @Override
+ public void setEncoding(Charset encoding) {
+ getDelegate().setEncoding(encoding);
+ }
+
+ @Override
+ public I18nMessageFormatter getMessageFormatter() {
+ return getDelegate().getMessageFormatter();
+ }
+
+ @Override
+ public void setMessageFormatter(I18nMessageFormatter messageFormatter) {
+ getDelegate().setMessageFormatter(messageFormatter);
+ }
+
+ @Override
public I18nBundle[] resolvBundles() throws Exception {
File directory = getUserDirectory();
@@ -164,8 +186,7 @@
I18nBundle[] bundles = resolvBundles(urls);
// detect bundles entries
- I18nBundleEntry[] entries =
- I18nBundleUtil.getBundleEntries(bundles);
+ I18nBundleEntry[] entries = I18nBundleUtil.getBundleEntries(bundles);
// copy all bundle entries resource
for (I18nBundleEntry e : entries) {
Modified: trunk/nuiton-i18n/src/test/java/org/nuiton/i18n/I18nTest.java
===================================================================
--- trunk/nuiton-i18n/src/test/java/org/nuiton/i18n/I18nTest.java 2011-05-11 14:48:59 UTC (rev 1921)
+++ trunk/nuiton-i18n/src/test/java/org/nuiton/i18n/I18nTest.java 2011-05-11 14:51:07 UTC (rev 1922)
@@ -79,7 +79,7 @@
String actual;
// pas de traduction possible car l'initialiser n'est pas bon :)
-
+
expected = "key.with.param";
actual = I18n.l_(Locale.FRANCE, "key.with.param");
Assert.assertEquals(expected, actual);
@@ -204,8 +204,8 @@
@Test
public void testFormatterMessageFormat() {
+ initializer.setMessageFormatter(new I18nUtil.MessageFormatI18nMessageFormatter());
I18n.init(initializer, Locale.UK);
- I18n.setFormatter(I18nFormat.MESSAGE_FORMAT);
Date date = new GregorianCalendar(2011, 4, 5).getTime();
@@ -220,8 +220,5 @@
expected = "Clé avec 5 mai 2011";
actual = I18n.l_(Locale.FRANCE, "key.with.date", date);
Assert.assertEquals(expected, actual);
-
- // reset default value
- I18n.setFormatter(I18nFormat.STRING_FORMAT);
}
}
Modified: trunk/nuiton-i18n/src/test/resources/log4j.properties
===================================================================
--- trunk/nuiton-i18n/src/test/resources/log4j.properties 2011-05-11 14:48:59 UTC (rev 1921)
+++ trunk/nuiton-i18n/src/test/resources/log4j.properties 2011-05-11 14:51:07 UTC (rev 1922)
@@ -28,6 +28,6 @@
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) %M - %m%n
-#log4j.appender.stdout.layout.ConversionPattern=%%c=%c %%C=%C %%d=%d %%F=%F %%l=%l %%L=%L %%m=%m %%M=%M %%p=%p %%r=%r %%t=%t %%x=%x %%X=%X
+
# package level
-log4j.logger.org.nuiton.i18n=INFO
+log4j.logger.org.nuiton=WARN
1
0