You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2022/11/14 21:40:14 UTC

[maven-doxia-sitetools] branch DOXIASITETOOLS-271 updated (2927a85 -> b2f249f)

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch DOXIASITETOOLS-271
in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git


 discard 2927a85  [DOXIASITETOOLS-271] Overhaul locale support and make telescopic
     new b2f249f  [DOXIASITETOOLS-271] Overhaul locale support and make telescopic

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (2927a85)
            \
             N -- N -- N   refs/heads/DOXIASITETOOLS-271 (b2f249f)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/org/apache/maven/doxia/tools/DefaultSiteTool.java    | 11 ++++++-----
 .../test/java/org/apache/maven/doxia/tools/SiteToolTest.java  |  4 ++--
 .../maven/doxia/siterenderer/DefaultSiteRendererTest.java     |  5 -----
 3 files changed, 8 insertions(+), 12 deletions(-)


[maven-doxia-sitetools] 01/01: [DOXIASITETOOLS-271] Overhaul locale support and make telescopic

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch DOXIASITETOOLS-271
in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git

commit b2f249f1cbc340d0a687b612c1530245ec7b592b
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Nov 6 23:20:06 2022 +0100

    [DOXIASITETOOLS-271] Overhaul locale support and make telescopic
    
    This closes #67
---
 .../apache/maven/doxia/tools/DefaultSiteTool.java  | 97 +++++++++++++---------
 .../org/apache/maven/doxia/tools/SiteTool.java     | 20 +++--
 .../org/apache/maven/doxia/tools/SiteToolTest.java | 79 +++++++++++++-----
 .../unit/site-tool-locales-test/full/pom.xml       | 40 +++++++++
 .../site-tool-locales-test/full/src/site/site.xml  | 45 ++++++++++
 .../full/src/site/site_de_DE_BY.xml                | 45 ++++++++++
 .../unit/site-tool-locales-test/language/pom.xml   | 40 +++++++++
 .../language/src/site/site.xml                     | 45 ++++++++++
 .../language/src/site/site_de.xml                  | 45 ++++++++++
 .../language_country/pom.xml                       | 40 +++++++++
 .../language_country/src/site/site.xml             | 45 ++++++++++
 .../language_country/src/site/site_de_DE.xml       | 45 ++++++++++
 .../doxia/siterenderer/SiteRenderingContext.java   |  2 +-
 .../siterenderer/DefaultSiteRendererTest.java      |  9 +-
 14 files changed, 520 insertions(+), 77 deletions(-)

diff --git a/doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java b/doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java
index ca364f5..dcda2fd 100644
--- a/doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java
+++ b/doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java
@@ -335,14 +335,34 @@ public class DefaultSiteTool
     public File getSiteDescriptor( File siteDirectory, Locale locale )
     {
         Objects.requireNonNull( siteDirectory, "siteDirectory cannot be null" );
-        final Locale llocale = ( locale == null ) ? new Locale( "" ) : locale;
+        Objects.requireNonNull( locale, "locale cannot be null" );
 
-        File siteDescriptor = new File( siteDirectory, "site_" + llocale.getLanguage() + ".xml" );
+        String language = locale.getLanguage();
+        String country = locale.getCountry();
+        String variant = locale.getVariant();
 
-        if ( !siteDescriptor.isFile() )
+        File siteDescriptor = null;
+
+        if ( !variant.isEmpty() )
+        {
+            siteDescriptor = new File( siteDirectory, "site_" + language + "_" + country + "_" + variant + ".xml" );
+        }
+
+        if ( ( siteDescriptor == null || !siteDescriptor.isFile() ) && !country.isEmpty() )
+        {
+            siteDescriptor = new File( siteDirectory, "site_" + language + "_" + country + ".xml" );
+        }
+
+        if ( ( siteDescriptor == null || !siteDescriptor.isFile() ) && !language.isEmpty() )
+        {
+            siteDescriptor = new File( siteDirectory, "site_" + language + ".xml" );
+        }
+
+        if ( siteDescriptor == null || !siteDescriptor.isFile() )
         {
             siteDescriptor = new File( siteDirectory, "site.xml" );
         }
+
         return siteDescriptor;
     }
 
@@ -352,8 +372,8 @@ public class DefaultSiteTool
      * @param project the Maven project, not null.
      * @param localRepository the Maven local repository, not null.
      * @param repositories the Maven remote repositories, not null.
-     * @param locale the locale wanted for the site descriptor. If not null, searching for
-     * <code>site_<i>localeLanguage</i>.xml</code>, otherwise searching for <code>site.xml</code>.
+     * @param locale the locale wanted for the site descriptor, not null.
+     * See {@link #getSiteDescriptor(File, Locale)} for details.
      * @return the site descriptor into the local repository after download of it from repositories or null if not
      * found in repositories.
      * @throws SiteToolException if any
@@ -365,12 +385,11 @@ public class DefaultSiteTool
         Objects.requireNonNull( project, "project cannot be null" );
         Objects.requireNonNull( localRepository, "localRepository cannot be null" );
         Objects.requireNonNull( repositories, "repositories cannot be null" );
-
-        final Locale llocale = ( locale == null ) ? new Locale( "" ) : locale;
+        Objects.requireNonNull( locale, "locale cannot be null" );
 
         try
         {
-            return resolveSiteDescriptor( project, localRepository, repositories, llocale );
+            return resolveSiteDescriptor( project, localRepository, repositories, locale );
         }
         catch ( ArtifactNotFoundException e )
         {
@@ -393,17 +412,17 @@ public class DefaultSiteTool
                                                List<ArtifactRepository> repositories )
         throws SiteToolException
     {
+        Objects.requireNonNull( locale, "locale cannot be null" );
         Objects.requireNonNull( project, "project cannot be null" );
         Objects.requireNonNull( reactorProjects, "reactorProjects cannot be null" );
         Objects.requireNonNull( localRepository, "localRepository cannot be null" );
         Objects.requireNonNull( repositories, "repositories cannot be null" );
 
-        final Locale llocale = ( locale == null ) ? Locale.getDefault() : locale;
-
-        LOGGER.debug( "Computing decoration model of " + project.getId() + " for locale " + llocale );
+        LOGGER.debug( "Computing decoration model of " + project.getId() + " for "
+                + ( locale.equals( SiteTool.DEFAULT_LOCALE ) ? "default locale " : " locale '" + locale + "'" ) );
 
         Map.Entry<DecorationModel, MavenProject> result =
-            getDecorationModel( 0, siteDirectory, llocale, project, reactorProjects, localRepository, repositories );
+            getDecorationModel( 0, siteDirectory, locale, project, reactorProjects, localRepository, repositories );
         DecorationModel decorationModel = result.getKey();
         MavenProject parentProject = result.getValue();
 
@@ -423,12 +442,12 @@ public class DefaultSiteTool
 
         if ( parentProject != null )
         {
-            populateParentMenu( decorationModel, llocale, project, parentProject, true );
+            populateParentMenu( decorationModel, locale, project, parentProject, true );
         }
 
         try
         {
-            populateModulesMenu( decorationModel, llocale, project, reactorProjects, localRepository, true );
+            populateModulesMenu( decorationModel, locale, project, reactorProjects, localRepository, true );
         }
         catch ( IOException e )
         {
@@ -506,7 +525,7 @@ public class DefaultSiteTool
      * if used through <code>&lt;menu ref="parent"/&gt;</code>.
      *
      * @param decorationModel the Doxia Sitetools DecorationModel, not null.
-     * @param locale the locale used for the i18n in DecorationModel. If null, using the default locale in the jvm.
+     * @param locale the locale used for the i18n in DecorationModel, not null.
      * @param project a Maven project, not null.
      * @param parentProject a Maven parent project, not null.
      * @param keepInheritedRefs used for inherited references.
@@ -515,6 +534,7 @@ public class DefaultSiteTool
                                     MavenProject parentProject, boolean keepInheritedRefs )
     {
         Objects.requireNonNull( decorationModel, "decorationModel cannot be null" );
+        Objects.requireNonNull( locale, "locale cannot be null" );
         Objects.requireNonNull( project, "project cannot be null" );
         Objects.requireNonNull( parentProject, "parentProject cannot be null" );
 
@@ -530,8 +550,6 @@ public class DefaultSiteTool
             return;
         }
 
-        final Locale llocale = ( locale == null ) ? Locale.getDefault() : locale;
-
         String parentUrl = getDistMgmntSiteUrl( parentProject );
 
         if ( parentUrl != null )
@@ -570,7 +588,7 @@ public class DefaultSiteTool
         {
             if ( menu.getName() == null )
             {
-                menu.setName( i18n.getString( "site-tool", llocale, "decorationModel.menu.parentproject" ) );
+                menu.setName( i18n.getString( "site-tool", locale, "decorationModel.menu.parentproject" ) );
             }
 
             MenuItem item = new MenuItem();
@@ -585,7 +603,7 @@ public class DefaultSiteTool
      * if used through <code>&lt;menu ref="modules"/&gt;</code>.
      *
      * @param decorationModel the Doxia Sitetools DecorationModel, not null.
-     * @param locale the locale used for the i18n in DecorationModel. If null, using the default locale in the jvm.
+     * @param locale the locale used for the i18n in DecorationModel, not null.
      * @param project a Maven project, not null.
      * @param reactorProjects the Maven reactor projects, not null.
      * @param localRepository the Maven local repository, not null.
@@ -598,10 +616,11 @@ public class DefaultSiteTool
                                      boolean keepInheritedRefs )
         throws SiteToolException, IOException
     {
+        Objects.requireNonNull( decorationModel, "decorationModel cannot be null" );
+        Objects.requireNonNull( locale, "locale cannot be null" );
         Objects.requireNonNull( project, "project cannot be null" );
         Objects.requireNonNull( reactorProjects, "reactorProjects cannot be null" );
         Objects.requireNonNull( localRepository, "localRepository cannot be null" );
-        Objects.requireNonNull( decorationModel, "decorationModel cannot be null" );
 
         Menu menu = decorationModel.getMenuRef( "modules" );
 
@@ -615,14 +634,12 @@ public class DefaultSiteTool
             return;
         }
 
-        final Locale llocale = ( locale == null ) ? Locale.getDefault() : locale ;
-
         // we require child modules and reactors to process module menu
         if ( project.getModules().size() > 0 )
         {
             if ( menu.getName() == null )
             {
-                menu.setName( i18n.getString( "site-tool", llocale, "decorationModel.menu.projectmodules" ) );
+                menu.setName( i18n.getString( "site-tool", locale, "decorationModel.menu.projectmodules" ) );
             }
 
             for ( String module : (List<String>) project.getModules() )
@@ -699,6 +716,7 @@ public class DefaultSiteTool
                                      Map<String, List<MavenReport>> categories )
     {
         Objects.requireNonNull( decorationModel, "decorationModel cannot be null" );
+        Objects.requireNonNull( locale, "locale cannot be null" );
         Objects.requireNonNull( categories, "categories cannot be null" );
 
         Menu menu = decorationModel.getMenuRef( "reports" );
@@ -708,11 +726,9 @@ public class DefaultSiteTool
             return;
         }
 
-        final Locale llocale = ( locale == null ) ? Locale.getDefault() : locale;
-
         if ( menu.getName() == null )
         {
-            menu.setName( i18n.getString( "site-tool", llocale, "decorationModel.menu.projectdocumentation" ) );
+            menu.setName( i18n.getString( "site-tool", locale, "decorationModel.menu.projectdocumentation" ) );
         }
 
         boolean found = false;
@@ -722,9 +738,9 @@ public class DefaultSiteTool
             if ( !isEmptyList( categoryReports ) )
             {
                 MenuItem item = createCategoryMenu(
-                                                    i18n.getString( "site-tool", llocale,
+                                                    i18n.getString( "site-tool", locale,
                                                                     "decorationModel.menu.projectinformation" ),
-                                                    "/project-info.html", categoryReports, llocale );
+                                                    "/project-info.html", categoryReports, locale );
                 menu.getItems().add( item );
                 found = true;
             }
@@ -733,8 +749,8 @@ public class DefaultSiteTool
             if ( !isEmptyList( categoryReports ) )
             {
                 MenuItem item =
-                    createCategoryMenu( i18n.getString( "site-tool", llocale, "decorationModel.menu.projectreports" ),
-                                        "/project-reports.html", categoryReports, llocale );
+                    createCategoryMenu( i18n.getString( "site-tool", locale, "decorationModel.menu.projectreports" ),
+                                        "/project-reports.html", categoryReports, locale );
                 menu.getItems().add( item );
                 found = true;
             }
@@ -777,10 +793,8 @@ public class DefaultSiteTool
                 continue;
             }
 
-            // Default bundles are in English
-            if ( ( !locale.getLanguage().equals( DEFAULT_LOCALE.getLanguage() ) )
-                && ( !i18n.getBundle( "site-tool", locale ).getLocale().getLanguage()
-                    .equals( locale.getLanguage() ) ) )
+            if ( !i18n.getBundle( "site-tool", locale ).getLocale().equals( locale )
+                    || !i18n.getBundle( "site-tool", locale ).getLocale().getLanguage().equals( locale.getLanguage() ) )
             {
                 if ( LOGGER.isWarnEnabled() )
                 {
@@ -808,12 +822,14 @@ public class DefaultSiteTool
     /**
      * Converts a locale code like "en", "en_US" or "en_US_win" to a <code>java.util.Locale</code>
      * object.
-     * <p>If localeCode = <code>default</code>, return the current value of the default locale for this instance
+     * <p>If localeCode = <code>system</code>, return the current value of the default locale for this instance
      * of the Java Virtual Machine.</p>
+     * <p>If localeCode = <code>default</code>, return the root locale.</p>
      *
      * @param localeCode the locale code string.
      * @return a java.util.Locale object instanced or null if errors occurred
-     * @see <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Locale.html">java.util.Locale#getDefault()</a>
+     * @see Locale#getDefault()
+     * @see Locale#ROOT
      */
     private Locale codeToLocale( String localeCode )
     {
@@ -822,11 +838,16 @@ public class DefaultSiteTool
             return null;
         }
 
-        if ( "default".equalsIgnoreCase( localeCode ) )
+        if ( "system".equalsIgnoreCase( localeCode ) )
         {
             return Locale.getDefault();
         }
 
+        if ( "default".equalsIgnoreCase( localeCode ) )
+        {
+            return Locale.ROOT;
+        }
+
         String language = "";
         String country = "";
         String variant = "";
@@ -891,6 +912,7 @@ public class DefaultSiteTool
      * @throws ArtifactResolutionException if any
      * @throws ArtifactNotFoundException if any
      */
+    // TODO here we need to telescope
     private File resolveSiteDescriptor( MavenProject project, ArtifactRepository localRepository,
                                         List<ArtifactRepository> repositories, Locale locale )
         throws IOException, ArtifactResolutionException, ArtifactNotFoundException
@@ -1326,6 +1348,7 @@ public class DefaultSiteTool
     {
         if ( distMgmnt != null && distMgmnt.getSite() != null && distMgmnt.getSite().getUrl() != null )
         {
+            // TODO This needs to go, it is just logically wrong
             return urlEncode( distMgmnt.getSite().getUrl() );
         }
 
diff --git a/doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/SiteTool.java b/doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/SiteTool.java
index b5454ce..73ca7fb 100644
--- a/doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/SiteTool.java
+++ b/doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/SiteTool.java
@@ -40,9 +40,9 @@ public interface SiteTool
 {
     /**
      * The locale by default for a Maven Site
-     * @see Locale#ENGLISH
+     * @see Locale#ROOT
      */
-    Locale DEFAULT_LOCALE = Locale.ENGLISH;
+    Locale DEFAULT_LOCALE = Locale.ROOT;
 
     /**
      * Get a skin artifact from one of the repositories.
@@ -63,8 +63,9 @@ public interface SiteTool
      * Get a site descriptor from the project's site directory.
      *
      * @param siteDirectory the site directory, not null
-     * @param locale the locale wanted for the site descriptor. If not null, searching for
-     * <code>site_<i>localeLanguage</i>.xml</code>, otherwise searching for <code>site.xml</code>.
+     * @param locale the locale wanted for the site descriptor, not null. Telescoping lookup for
+     * <code>site_language_country_variant.xml</code>, <code>site_language_country.xml</code>,
+     * <code>site_language.xml}</code>, or <code>site.xml</code> as last resort for {@link Locale#ROOT}.
      * @return the site descriptor file
      */ // used by maven-pdf-plugin (should not?)
     File getSiteDescriptor( File siteDirectory, Locale locale );
@@ -107,7 +108,8 @@ public interface SiteTool
      * Get a decoration model for a project.
      *
      * @param siteDirectory the site directory, may be null if project from repository
-     * @param locale the locale used for the i18n in DecorationModel. If null, using the default locale in the jvm.
+     * @param locale the locale used for the i18n in DecorationModel, not null.
+     * See {@link #getSiteDescriptor(File, Locale)} for details.
      * @param project the Maven project, not null.
      * @param reactorProjects the Maven reactor projects, not null.
      * @param localRepository the Maven local repository, not null.
@@ -128,7 +130,8 @@ public interface SiteTool
      * 2 separate menus: "Project Information" and "Project Reports".
      *
      * @param decorationModel the Doxia Sitetools DecorationModel, not null.
-     * @param locale the locale used for the i18n in DecorationModel. If null, using the default locale in the jvm.
+     * @param locale the locale used for the i18n in DecorationModel, not null.
+     * See {@link #getSiteDescriptor(File, Locale)} for details.
      * @param reportsPerCategory reports per category to put in "Reports" or "Information" menus, not null.
      * @see MavenReport#CATEGORY_PROJECT_INFORMATION
      * @see MavenReport#CATEGORY_PROJECT_REPORTS
@@ -138,11 +141,10 @@ public interface SiteTool
 
     /**
      * Extracts from a comma-separated list the locales that are available in <code>site-tool</code>
-     * resource bundle. Notice that <code>default</code> value will be changed to the default locale of
-     * the JVM.
+     * resource bundle.
      *
      * @param locales A comma separated list of locales
-     * @return a list of <code>Locale</code>, which at least contains the Maven default locale which is english
+     * @return a list of <code>Locale</code>s.
      * @since 1.7, was previously getAvailableLocales(String)
      */
     List<Locale> getSiteLocales( String locales );
diff --git a/doxia-integration-tools/src/test/java/org/apache/maven/doxia/tools/SiteToolTest.java b/doxia-integration-tools/src/test/java/org/apache/maven/doxia/tools/SiteToolTest.java
index 071ba27..14010ed 100644
--- a/doxia-integration-tools/src/test/java/org/apache/maven/doxia/tools/SiteToolTest.java
+++ b/doxia-integration-tools/src/test/java/org/apache/maven/doxia/tools/SiteToolTest.java
@@ -212,13 +212,50 @@ public class SiteToolTest
         assertNotNull( tool );
 
         SiteToolMavenProjectStub project = new SiteToolMavenProjectStub( "site-tool-test" );
-        assertEquals( tool.getSiteDescriptor( new File( project.getBasedir(), "src/site" ), null ).toString(),
+        assertEquals( tool.getSiteDescriptor( new File( project.getBasedir(), "src/site" ), SiteTool.DEFAULT_LOCALE ).toString(),
             project.getBasedir() + File.separator + "src" + File.separator + "site" + File.separator + "site.xml" );
         assertEquals( tool.getSiteDescriptor( new File( project.getBasedir(), "src/site" ), Locale.ENGLISH ).toString(),
             project.getBasedir() + File.separator + "src" + File.separator + "site" + File.separator + "site.xml" );
         String siteDir = "src/blabla";
-        assertEquals( tool.getSiteDescriptor( new File( project.getBasedir(), siteDir ), null ).toString(),
+        assertEquals( tool.getSiteDescriptor( new File( project.getBasedir(), siteDir ), SiteTool.DEFAULT_LOCALE ).toString(),
             project.getBasedir() + File.separator + "src" + File.separator + "blabla" + File.separator + "site.xml" );
+
+        project = new SiteToolMavenProjectStub( "site-tool-locales-test/full" );
+        final Locale BAVARIAN = new Locale( "de", "DE", "BY" );
+        assertEquals( tool.getSiteDescriptor( new File( project.getBasedir(), "src/site" ), SiteTool.DEFAULT_LOCALE ).toString(),
+            project.getBasedir() + File.separator + "src" + File.separator + "site" + File.separator + "site.xml" );
+        assertEquals( tool.getSiteDescriptor( new File( project.getBasedir(), "src/site" ), BAVARIAN ).toString(),
+            project.getBasedir() + File.separator + "src" + File.separator + "site" + File.separator + "site_de_DE_BY.xml" );
+        assertEquals( tool.getSiteDescriptor( new File( project.getBasedir(), "src/site" ), Locale.GERMANY ).toString(),
+                project.getBasedir() + File.separator + "src" + File.separator + "site" + File.separator + "site.xml" );
+        assertEquals( tool.getSiteDescriptor( new File( project.getBasedir(), "src/site" ), Locale.ENGLISH ).toString(),
+                project.getBasedir() + File.separator + "src" + File.separator + "site" + File.separator + "site.xml" );
+        assertEquals( tool.getSiteDescriptor( new File( project.getBasedir(), "src/site" ), Locale.GERMAN ).toString(),
+                project.getBasedir() + File.separator + "src" + File.separator + "site" + File.separator + "site.xml" );
+
+        project = new SiteToolMavenProjectStub( "site-tool-locales-test/language_country" );
+        assertEquals( tool.getSiteDescriptor( new File( project.getBasedir(), "src/site" ), SiteTool.DEFAULT_LOCALE ).toString(),
+            project.getBasedir() + File.separator + "src" + File.separator + "site" + File.separator + "site.xml" );
+        assertEquals( tool.getSiteDescriptor( new File( project.getBasedir(), "src/site" ), BAVARIAN ).toString(),
+            project.getBasedir() + File.separator + "src" + File.separator + "site" + File.separator + "site_de_DE.xml" );
+        assertEquals( tool.getSiteDescriptor( new File( project.getBasedir(), "src/site" ), Locale.GERMANY ).toString(),
+                project.getBasedir() + File.separator + "src" + File.separator + "site" + File.separator + "site_de_DE.xml" );
+        assertEquals( tool.getSiteDescriptor( new File( project.getBasedir(), "src/site" ), Locale.ENGLISH ).toString(),
+                project.getBasedir() + File.separator + "src" + File.separator + "site" + File.separator + "site.xml" );
+        assertEquals( tool.getSiteDescriptor( new File( project.getBasedir(), "src/site" ), Locale.GERMAN ).toString(),
+                project.getBasedir() + File.separator + "src" + File.separator + "site" + File.separator + "site.xml" );
+
+        project = new SiteToolMavenProjectStub( "site-tool-locales-test/language" );
+        assertEquals( tool.getSiteDescriptor( new File( project.getBasedir(), "src/site" ), SiteTool.DEFAULT_LOCALE ).toString(),
+            project.getBasedir() + File.separator + "src" + File.separator + "site" + File.separator + "site.xml" );
+        assertEquals( tool.getSiteDescriptor( new File( project.getBasedir(), "src/site" ), BAVARIAN ).toString(),
+            project.getBasedir() + File.separator + "src" + File.separator + "site" + File.separator + "site_de.xml" );
+        assertEquals( tool.getSiteDescriptor( new File( project.getBasedir(), "src/site" ), Locale.GERMANY ).toString(),
+                project.getBasedir() + File.separator + "src" + File.separator + "site" + File.separator + "site_de.xml" );
+        assertEquals( tool.getSiteDescriptor( new File( project.getBasedir(), "src/site" ), Locale.ENGLISH ).toString(),
+                project.getBasedir() + File.separator + "src" + File.separator + "site" + File.separator + "site.xml" );
+        assertEquals( tool.getSiteDescriptor( new File( project.getBasedir(), "src/site" ), Locale.GERMAN ).toString(),
+                project.getBasedir() + File.separator + "src" + File.separator + "site" + File.separator + "site_de.xml" );
     }
 
     /**
@@ -239,7 +276,7 @@ public class SiteToolTest
             + "maven-site-1.0-site.xml";
 
         assertEquals( tool.getSiteDescriptorFromRepository( project, getLocalRepo(),
-                                                            project.getRemoteArtifactRepositories(), Locale.ENGLISH )
+                                                            project.getRemoteArtifactRepositories(), SiteTool.DEFAULT_LOCALE )
             .toString(), result );
     }
 
@@ -257,7 +294,7 @@ public class SiteToolTest
 
         // model from current local build
         DecorationModel model =
-            tool.getDecorationModel( new File( project.getBasedir(), "src/site" ), Locale.getDefault(), project,
+            tool.getDecorationModel( new File( project.getBasedir(), "src/site" ), SiteTool.DEFAULT_LOCALE, project,
                                      reactorProjects, getLocalRepo(), project.getRemoteArtifactRepositories() );
         assertNotNull( model );
         assertNotNull( model.getBannerLeft() );
@@ -269,24 +306,20 @@ public class SiteToolTest
         assertEquals( "http://maven.apache.org/images/maven-small.gif", model.getBannerRight().getSrc() );
         assertNull( model.getBannerRight().getHref() );
 
-        // model from repo: https://repo1.maven.org/maven2/org/apache/maven/maven-site/1.0/maven-site-1.0-site.xml
-        // TODO Enable this test as soon as we haven a site.xml with head content as string
-        /*project.setBasedir( null );
+        // model from repo: https://repo1.maven.org/maven2/org/apache/maven/maven/3.8.6/maven-3.8.6-site.xml
+        project.setBasedir( null );
         project.setGroupId( "org.apache.maven" );
-        project.setArtifactId( "maven-site" );
-        project.setVersion( "1.0" );
+        project.setArtifactId( "maven" );
+        project.setVersion( "3.8.6" );
         DecorationModel modelFromRepo =
-            tool.getDecorationModel( null, Locale.getDefault(), project, reactorProjects, getLocalRepo(),
+            tool.getDecorationModel( null, SiteTool.DEFAULT_LOCALE, project, reactorProjects, getLocalRepo(),
                                      project.getRemoteArtifactRepositories() );
         assertNotNull( modelFromRepo );
         assertNotNull( modelFromRepo.getBannerLeft() );
-        assertEquals( "Maven", modelFromRepo.getBannerLeft().getName() );
-        assertEquals( "images/apache-maven-project-2.png", modelFromRepo.getBannerLeft().getSrc() );
-        assertEquals( "http://maven.apache.org/", modelFromRepo.getBannerLeft().getHref() );
-        assertNotNull( modelFromRepo.getBannerRight() );
-        assertNull( modelFromRepo.getBannerRight().getName() );
-        assertEquals( "images/maven-logo-2.gif", modelFromRepo.getBannerRight().getSrc() );
-        assertNull( modelFromRepo.getBannerRight().getHref() );*/
+        assertEquals( "dummy", modelFromRepo.getBannerLeft().getName() );
+        assertEquals( "https://maven.apache.org/images/apache-maven-project.png", modelFromRepo.getBannerLeft().getSrc() );
+        assertEquals( "https://maven.apache.org/", modelFromRepo.getBannerLeft().getHref() );
+        assertNull( modelFromRepo.getBannerRight() );
     }
 
     /**
@@ -303,7 +336,7 @@ public class SiteToolTest
         List<MavenProject> reactorProjects = new ArrayList<MavenProject>();
 
         DecorationModel model =
-            tool.getDecorationModel( new File( project.getBasedir(), siteDirectory ), Locale.getDefault(), project,
+            tool.getDecorationModel( new File( project.getBasedir(), siteDirectory ), SiteTool.DEFAULT_LOCALE, project,
                                      reactorProjects, getLocalRepo(), project.getRemoteArtifactRepositories() );
         assertNotNull( model );
     }
@@ -312,10 +345,10 @@ public class SiteToolTest
     public void testGetAvailableLocales()
                     throws Exception
     {
-        assertEquals( Collections.singletonList( SiteTool.DEFAULT_LOCALE ), tool.getSiteLocales( "en" ) );
+        assertEquals( Collections.singletonList( SiteTool.DEFAULT_LOCALE ), tool.getSiteLocales( "default" ) );
 
         assertEquals( Arrays.asList( SiteTool.DEFAULT_LOCALE, Locale.FRENCH, Locale.ITALIAN ),
-                      tool.getSiteLocales( "en,fr,it" ) );
+                      tool.getSiteLocales( "default,fr,it" ) );
 
         // by default, only DEFAULT_LOCALE
         assertEquals( Collections.singletonList( SiteTool.DEFAULT_LOCALE ), tool.getSiteLocales( "" ) );
@@ -358,16 +391,16 @@ public class SiteToolTest
         assertNotNull( tool );
 
         SiteToolMavenProjectStub parentProject = new SiteToolMavenProjectStub( "interpolation-parent-test" );
-        parentProject.setDistgributionManagementSiteUrl( "dav:https://davs.codehaus.org/site" );
+        parentProject.setDistgributionManagementSiteUrl( "dav+https://davs.codehaus.org/site" );
 
         SiteToolMavenProjectStub childProject = new SiteToolMavenProjectStub( "interpolation-child-test" );
         childProject.setParent( parentProject );
-        childProject.setDistgributionManagementSiteUrl( "dav:https://davs.codehaus.org/site/child" );
+        childProject.setDistgributionManagementSiteUrl( "dav+https://davs.codehaus.org/site/child" );
 
         List<MavenProject> reactorProjects = Collections.<MavenProject>singletonList( parentProject );
 
         DecorationModel model = tool.getDecorationModel( new File( childProject.getBasedir(), "src/site" ),
-                                                         Locale.getDefault(), childProject, reactorProjects,
+                                                         Locale.ROOT, childProject, reactorProjects,
                                                          getLocalRepo(), childProject.getRemoteArtifactRepositories() );
         assertNotNull( model );
 
diff --git a/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/full/pom.xml b/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/full/pom.xml
new file mode 100644
index 0000000..fb40c17
--- /dev/null
+++ b/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/full/pom.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.shared</groupId>
+  <artifactId>site-tool-test</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+
+  <name>dummy</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/full/src/site/site.xml b/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/full/src/site/site.xml
new file mode 100644
index 0000000..aaa2bae
--- /dev/null
+++ b/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/full/src/site/site.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project name="Maven Dummy Site">
+  <bannerLeft>
+    <name>Maven Site</name>
+    <src>http://maven.apache.org/images/apache-maven-project.png</src>
+    <href>http://maven.apache.org/</href>
+  </bannerLeft>
+  <bannerRight>
+    <src>http://maven.apache.org/images/maven-small.gif</src>
+  </bannerRight>
+  <skin>
+    <groupId>org.apache.maven.skins</groupId>
+    <artifactId>maven-stylus-skin</artifactId>
+  </skin>
+  <body>
+    <links>
+      <item name="Maven 2" href="http://maven.apache.org/maven2/"/>
+    </links>
+
+    <menu name="Overview">
+      <item name="Test" href="/test.html"/>
+    </menu>
+    <menu ref="reports"/>
+  </body>
+</project>
diff --git a/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/full/src/site/site_de_DE_BY.xml b/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/full/src/site/site_de_DE_BY.xml
new file mode 100644
index 0000000..aaa2bae
--- /dev/null
+++ b/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/full/src/site/site_de_DE_BY.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project name="Maven Dummy Site">
+  <bannerLeft>
+    <name>Maven Site</name>
+    <src>http://maven.apache.org/images/apache-maven-project.png</src>
+    <href>http://maven.apache.org/</href>
+  </bannerLeft>
+  <bannerRight>
+    <src>http://maven.apache.org/images/maven-small.gif</src>
+  </bannerRight>
+  <skin>
+    <groupId>org.apache.maven.skins</groupId>
+    <artifactId>maven-stylus-skin</artifactId>
+  </skin>
+  <body>
+    <links>
+      <item name="Maven 2" href="http://maven.apache.org/maven2/"/>
+    </links>
+
+    <menu name="Overview">
+      <item name="Test" href="/test.html"/>
+    </menu>
+    <menu ref="reports"/>
+  </body>
+</project>
diff --git a/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/language/pom.xml b/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/language/pom.xml
new file mode 100644
index 0000000..fb40c17
--- /dev/null
+++ b/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/language/pom.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.shared</groupId>
+  <artifactId>site-tool-test</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+
+  <name>dummy</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/language/src/site/site.xml b/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/language/src/site/site.xml
new file mode 100644
index 0000000..aaa2bae
--- /dev/null
+++ b/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/language/src/site/site.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project name="Maven Dummy Site">
+  <bannerLeft>
+    <name>Maven Site</name>
+    <src>http://maven.apache.org/images/apache-maven-project.png</src>
+    <href>http://maven.apache.org/</href>
+  </bannerLeft>
+  <bannerRight>
+    <src>http://maven.apache.org/images/maven-small.gif</src>
+  </bannerRight>
+  <skin>
+    <groupId>org.apache.maven.skins</groupId>
+    <artifactId>maven-stylus-skin</artifactId>
+  </skin>
+  <body>
+    <links>
+      <item name="Maven 2" href="http://maven.apache.org/maven2/"/>
+    </links>
+
+    <menu name="Overview">
+      <item name="Test" href="/test.html"/>
+    </menu>
+    <menu ref="reports"/>
+  </body>
+</project>
diff --git a/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/language/src/site/site_de.xml b/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/language/src/site/site_de.xml
new file mode 100644
index 0000000..aaa2bae
--- /dev/null
+++ b/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/language/src/site/site_de.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project name="Maven Dummy Site">
+  <bannerLeft>
+    <name>Maven Site</name>
+    <src>http://maven.apache.org/images/apache-maven-project.png</src>
+    <href>http://maven.apache.org/</href>
+  </bannerLeft>
+  <bannerRight>
+    <src>http://maven.apache.org/images/maven-small.gif</src>
+  </bannerRight>
+  <skin>
+    <groupId>org.apache.maven.skins</groupId>
+    <artifactId>maven-stylus-skin</artifactId>
+  </skin>
+  <body>
+    <links>
+      <item name="Maven 2" href="http://maven.apache.org/maven2/"/>
+    </links>
+
+    <menu name="Overview">
+      <item name="Test" href="/test.html"/>
+    </menu>
+    <menu ref="reports"/>
+  </body>
+</project>
diff --git a/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/language_country/pom.xml b/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/language_country/pom.xml
new file mode 100644
index 0000000..fb40c17
--- /dev/null
+++ b/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/language_country/pom.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.shared</groupId>
+  <artifactId>site-tool-test</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+
+  <name>dummy</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/language_country/src/site/site.xml b/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/language_country/src/site/site.xml
new file mode 100644
index 0000000..aaa2bae
--- /dev/null
+++ b/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/language_country/src/site/site.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project name="Maven Dummy Site">
+  <bannerLeft>
+    <name>Maven Site</name>
+    <src>http://maven.apache.org/images/apache-maven-project.png</src>
+    <href>http://maven.apache.org/</href>
+  </bannerLeft>
+  <bannerRight>
+    <src>http://maven.apache.org/images/maven-small.gif</src>
+  </bannerRight>
+  <skin>
+    <groupId>org.apache.maven.skins</groupId>
+    <artifactId>maven-stylus-skin</artifactId>
+  </skin>
+  <body>
+    <links>
+      <item name="Maven 2" href="http://maven.apache.org/maven2/"/>
+    </links>
+
+    <menu name="Overview">
+      <item name="Test" href="/test.html"/>
+    </menu>
+    <menu ref="reports"/>
+  </body>
+</project>
diff --git a/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/language_country/src/site/site_de_DE.xml b/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/language_country/src/site/site_de_DE.xml
new file mode 100644
index 0000000..aaa2bae
--- /dev/null
+++ b/doxia-integration-tools/src/test/resources/unit/site-tool-locales-test/language_country/src/site/site_de_DE.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project name="Maven Dummy Site">
+  <bannerLeft>
+    <name>Maven Site</name>
+    <src>http://maven.apache.org/images/apache-maven-project.png</src>
+    <href>http://maven.apache.org/</href>
+  </bannerLeft>
+  <bannerRight>
+    <src>http://maven.apache.org/images/maven-small.gif</src>
+  </bannerRight>
+  <skin>
+    <groupId>org.apache.maven.skins</groupId>
+    <artifactId>maven-stylus-skin</artifactId>
+  </skin>
+  <body>
+    <links>
+      <item name="Maven 2" href="http://maven.apache.org/maven2/"/>
+    </links>
+
+    <menu name="Overview">
+      <item name="Test" href="/test.html"/>
+    </menu>
+    <menu ref="reports"/>
+  </body>
+</project>
diff --git a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SiteRenderingContext.java b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SiteRenderingContext.java
index 434f971..1b4c57b 100644
--- a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SiteRenderingContext.java
+++ b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SiteRenderingContext.java
@@ -50,7 +50,7 @@ public class SiteRenderingContext
 
     private Map<String, ?> templateProperties;
 
-    private Locale locale = Locale.getDefault();
+    private Locale locale = Locale.ROOT;
 
     private List<Locale> siteLocales = new ArrayList<Locale>();
 
diff --git a/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/DefaultSiteRendererTest.java b/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/DefaultSiteRendererTest.java
index e3eb8b4..2ccc2b5 100644
--- a/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/DefaultSiteRendererTest.java
+++ b/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/DefaultSiteRendererTest.java
@@ -140,9 +140,6 @@ public class DefaultSiteRendererTest
             IOUtil.close( skinIS );
             IOUtil.close( jarOS );
         }
-
-        oldLocale = Locale.getDefault();
-        Locale.setDefault( Locale.ENGLISH );
     }
 
     /**
@@ -153,8 +150,6 @@ public class DefaultSiteRendererTest
         throws Exception
     {
         container.release( renderer );
-
-        Locale.setDefault( oldLocale );
     }
 
     /**
@@ -345,7 +340,7 @@ public class DefaultSiteRendererTest
         skin.setFile( skinFile );
         SiteRenderingContext siteRenderingContext =
             renderer.createContextForSkin( skin, attributes, new DecorationModel(), "defaultWindowTitle",
-                                           Locale.ENGLISH );
+                                           Locale.ROOT );
         RenderingContext context = new RenderingContext( new File( "" ), "document.html", "generator" );
         SiteRendererSink sink = new SiteRendererSink( context );
         renderer.mergeDocumentIntoSite( writer, sink, siteRenderingContext );
@@ -379,7 +374,7 @@ public class DefaultSiteRendererTest
         skin.setFile( skinFile );
         SiteRenderingContext siteRenderingContext =
             renderer.createContextForSkin( skin, attributes,decoration, "defaultWindowTitle",
-                                                   Locale.ENGLISH );
+                                                   Locale.ROOT );
         siteRenderingContext.addSiteDirectory( getTestFile( siteDir ) );
         siteRenderingContext.setValidate( validate );