Index: src/main/java/com/xpn/xwiki/plugin/applicationmanager/doc/XWikiApplicationClass.java
===================================================================
--- src/main/java/com/xpn/xwiki/plugin/applicationmanager/doc/XWikiApplicationClass.java	(révision 4880)
+++ src/main/java/com/xpn/xwiki/plugin/applicationmanager/doc/XWikiApplicationClass.java	(copie de travail)
@@ -183,7 +183,7 @@
         // TODO : move into BaseClass.addStaticListField with "separators' parameter when/if
         // http://jira.xwiki.org/jira/browse/XWIKI-1683 is applied in XWiki Core and when this
         // starts depending on that version where it's applied.
-        slc = (StaticListClass)baseClass.getField(FIELD_dependencies);
+        slc = (StaticListClass)baseClass.getField(FIELD_applications);
         slc.setSeparators("|");
         slc.setSeparator("|");
 
@@ -192,7 +192,7 @@
         // TODO : move into BaseClass.addStaticListField with "separators' parameter when/if
         // http://jira.xwiki.org/jira/browse/XWIKI-1683 is applied in XWiki Core and when this
         // starts depending on that version where it's applied.
-        slc = (StaticListClass)baseClass.getField(FIELD_dependencies);
+        slc = (StaticListClass)baseClass.getField(FIELD_documents);
         slc.setSeparators("|");
         slc.setSeparator("|");
 
@@ -201,7 +201,7 @@
         // TODO : move into BaseClass.addStaticListField with "separators' parameter when/if
         // http://jira.xwiki.org/jira/browse/XWIKI-1683 is applied in XWiki Core and when this
         // starts depending on that version where it's applied.
-        slc = (StaticListClass)baseClass.getField(FIELD_dependencies);
+        slc = (StaticListClass)baseClass.getField(FIELD_docstoinclude);
         slc.setSeparators("|");
         slc.setSeparator("|");
 
@@ -210,7 +210,7 @@
         // TODO : move into BaseClass.addStaticListField with "separators' parameter when/if
         // http://jira.xwiki.org/jira/browse/XWIKI-1683 is applied in XWiki Core and when this
         // starts depending on that version where it's applied.
-        slc = (StaticListClass)baseClass.getField(FIELD_dependencies);
+        slc = (StaticListClass)baseClass.getField(FIELD_docstolink);
         slc.setSeparators("|");
         slc.setSeparator("|");
 
@@ -219,7 +219,7 @@
         // TODO : move into BaseClass.addStaticListField with "separators' parameter when/if
         // http://jira.xwiki.org/jira/browse/XWIKI-1683 is applied in XWiki Core and when this
         // starts depending on that version where it's applied.
-        slc = (StaticListClass)baseClass.getField(FIELD_dependencies);
+        slc = (StaticListClass)baseClass.getField(FIELD_translationdocs);
         slc.setSeparators("|");
         slc.setSeparator("|");
 
Index: src/main/java/com/xpn/xwiki/plugin/applicationmanager/ApplicationManagerPluginApi.java
===================================================================
--- src/main/java/com/xpn/xwiki/plugin/applicationmanager/ApplicationManagerPluginApi.java	(révision 4880)
+++ src/main/java/com/xpn/xwiki/plugin/applicationmanager/ApplicationManagerPluginApi.java	(copie de travail)
@@ -21,6 +21,7 @@
 
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
 
 import com.xpn.xwiki.api.XWikiExceptionApi;
@@ -150,7 +151,7 @@
         int returncode = XWikiExceptionApi.ERROR_NOERROR;
 
         try {
-            ApplicationManager.getInstance().exportApplicationXAR(appName, context);
+            ApplicationManager.getInstance().exportApplicationXAR(appName, false, context);
         } catch (ApplicationManagerException e) {
             LOG.error("Try to get application document", e);
 
@@ -184,27 +185,70 @@
         return returncode;
     }
     
-    public int reloadApplication(String appName) throws XWikiException
-    {
-        if (!hasAdminRights())
-            return XWikiException.ERROR_XWIKI_ACCESS_DENIED;
-        
-        int returncode = XWikiExceptionApi.ERROR_NOERROR;
+    /**
+	 * Reload xwiki application. It means : - update XWikiPreferences with
+	 * application translation documents
+	 * 
+	 * @return int Error code.
+	 * 
+	 * @throws XWikiException
+	 */
+	public int reloadApplication(String appName) throws XWikiException {
+		if (!hasAdminRights())
+			return XWikiException.ERROR_XWIKI_ACCESS_DENIED;
 
-        try {
-            XWikiApplication app = ApplicationManager.getInstance().getApplication(appName, context, true);
-            ApplicationManager.getInstance().updateApplicationTranslation(app, context);
-        } catch (ApplicationManagerException e) {
-            LOG.error("Try to get application document", e);
+		int returncode = XWikiExceptionApi.ERROR_NOERROR;
 
-            context.put("lasterrorcode", new Integer(e.getCode()));
-            context.put("lastexception", new XWikiExceptionApi(e, context));
-            
-            returncode = e.getCode();
-        }
+		try {
+			XWikiApplication app = ApplicationManager.getInstance()
+					.getApplication(appName, context, true);
+			ApplicationManager.getInstance().updateApplicationTranslation(app,
+					context);
+		} catch (ApplicationManagerException e) {
+			LOG.error("Try to get application document", e);
 
-        return returncode;
-    }
+			context.put("lasterrorcode", new Integer(e.getCode()));
+			context.put("lastexception", new XWikiExceptionApi(e, context));
+
+			returncode = e.getCode();
+		}
+
+		return returncode;
+	}
+
+	/**
+	 * Reload all xwiki applications. It means : - update XWikiPreferences with
+	 * each application translation documents
+	 * 
+	 * @return int Error code.
+	 * 
+	 * @throws XWikiException
+	 */
+	public int reloadAllApplications() throws XWikiException {
+		if (!hasAdminRights())
+			return XWikiException.ERROR_XWIKI_ACCESS_DENIED;
+
+		int returncode = XWikiExceptionApi.ERROR_NOERROR;
+
+		try {
+			List applist = ApplicationManager.getInstance().getApplicationList(
+					context);
+			for (Iterator it = applist.iterator(); it.hasNext();) {
+				XWikiApplication app = (XWikiApplication) it.next();
+				ApplicationManager.getInstance().updateApplicationTranslation(
+						app, context);
+			}
+		} catch (ApplicationManagerException e) {
+			LOG.error("Try to get application document", e);
+
+			context.put("lasterrorcode", new Integer(e.getCode()));
+			context.put("lastexception", new XWikiExceptionApi(e, context));
+
+			returncode = e.getCode();
+		}
+
+		return returncode;
+	}
     
     public XWikiApplication getRootApplication(XWikiContext context) throws XWikiException
     {
Index: src/main/java/com/xpn/xwiki/plugin/applicationmanager/ApplicationManager.java
===================================================================
--- src/main/java/com/xpn/xwiki/plugin/applicationmanager/ApplicationManager.java	(révision 4880)
+++ src/main/java/com/xpn/xwiki/plugin/applicationmanager/ApplicationManager.java	(copie de travail)
@@ -216,7 +216,7 @@
         return updateprefs;
     }
 
-    public void exportApplicationXAR(String appName, XWikiContext context) throws XWikiException,
+    public void exportApplicationXAR(String appName, boolean withDocHistory, XWikiContext context) throws XWikiException,
         IOException
     {
         XWikiApplication app =
@@ -230,6 +230,8 @@
         for (Iterator it = documents.iterator(); it.hasNext();) {
             export.add((String) it.next(), DocumentInfo.ACTION_OVERWRITE);
         }
+        
+        export.setWithVersions(withDocHistory);
 
         export.export();
     }
