diff --git a/xwiki-platform-core/xwiki-platform-legacy/xwiki-platform-legacy-oldcore/src/main/aspect/compatibility/com/xpn/xwiki/api/XWikiCompatibilityAspect.aj b/xwiki-platform-core/xwiki-platform-legacy/xwiki-platform-legacy-oldcore/src/main/aspect/compatibility/com/xpn/xwiki/api/XWikiCompatibilityAspect.aj index 47d4bacec7c2030e3ae1d5283651af332bc0cdd0..87ca10e66eb0bec757d1f78ad64a69de857a65ed 100644 --- a/xwiki-platform-core/xwiki-platform-legacy/xwiki-platform-legacy-oldcore/src/main/aspect/compatibility/com/xpn/xwiki/api/XWikiCompatibilityAspect.aj +++ b/xwiki-platform-core/xwiki-platform-legacy/xwiki-platform-legacy-oldcore/src/main/aspect/compatibility/com/xpn/xwiki/api/XWikiCompatibilityAspect.aj @@ -599,6 +599,22 @@ public privileged aspect XWikiCompatibilityAspect return this.copySpaceBetweenWikis(space, sourceWiki, targetWiki, language, clean); } + /** + * API to parse a message. A message can be an error message or an information message either as text or as a message + * ID pointing to ApplicationResources. The message is also parse for velocity scripts + * + * @return Final message + * @param id + * @return the result of the parsed message + * @deprecated use {@link XWikiMessageTool#get(String, List)} instead. From velocity you can access XWikiMessageTool + * with $msg binding. + */ + @Deprecated + public String XWiki.parseMessage(String id) + { + return this.xwiki.parseMessage(id, getXWikiContext()); + } + /** * API to get a message. A message can be an error message or an information message either as text or as a message * ID pointing to ApplicationResources. The message is also parsed for velocity scripts diff --git a/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java b/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java index 33a9ca78fe0f20af25cd46dba791ce418acff37b..6a11cd2ebd57ac14d1dda784e8064462d426374b 100644 --- a/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java +++ b/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java @@ -2883,20 +2883,4 @@ public String parseMessage() { return this.xwiki.parseMessage(getXWikiContext()); } - - /** - * API to parse a message. A message can be an error message or an information message either as text or as a message - * ID pointing to ApplicationResources. The message is also parse for velocity scripts - * - * @return Final message - * @param id - * @return the result of the parsed message - * @deprecated use {@link org.xwiki.localization.LocalizationManager} instead. From velocity you can access it - * using the {@code $services.localization} binding, see {@code LocalizationScriptService} - */ - @Deprecated - public String parseMessage(String id) - { - return this.xwiki.parseMessage(id, getXWikiContext()); - } } diff --git a/xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/ApplicationResources.properties b/xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/ApplicationResources.properties index 9e5c5409187d676a60ba49ebd8aa9a65ac2da2d3..e2dbf8536c57aa2b7705b400db6bd5a119fd488b 100644 --- a/xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/ApplicationResources.properties +++ b/xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/ApplicationResources.properties @@ -239,7 +239,6 @@ thiswikidoesnotexist=This Wiki does not exist on this server. thispagedoesnotexist=The requested document could not be found. nosuchobject=The specified object does not exist thispagealreadyexists=This document already exists. -availableversionsattachment=The available versions of file '$attachment.filename' are: attachmentdoesnotexist=The attachment does not exist. wikicontentcannotbeempty= The content of a wiki page is not allowed to be completely empty. fileuploadislarge=XWiki has a default limit of around 10Mb for attached files. This limit can be changed using the upload_maxsize parameter. Check the FAQ for more information. @@ -945,6 +944,7 @@ core.viewers.attachments.upload.removeFileInput.title=Remove this file core.viewers.attachments.upload.submit=Attach core.viewers.attachments.upload.cancel=Cancel core.viewers.attachments.upload.confirmReplace=Do you want to replace the filename with +core.viewers.attachments.revisions=The available versions of attachment ''{0}'' are: ### MIME types core.viewers.attachments.mime.audio=Audio core.viewers.attachments.mime.image=Image @@ -4576,3 +4576,8 @@ core.edit.wikiToolbar.hrtext= ####################################### ## Translations should not contain velocity code editpageTitle=Editing $services.localization.render($editor) for $tdoc.displayTitle + +####################################### +## until 5.0RC1/4.5.4 +####################################### +availableversionsattachment=The available versions of file '$attachment.filename' are: diff --git a/xwiki-platform-core/xwiki-platform-web/src/main/webapp/templates/viewattachrev.vm b/xwiki-platform-core/xwiki-platform-web/src/main/webapp/templates/viewattachrev.vm index 479ac1b6adef921469189e87735449693471e12f..cc44fbe6f538409b38c962ed884d4777dbbbac9e 100644 --- a/xwiki-platform-core/xwiki-platform-web/src/main/webapp/templates/viewattachrev.vm +++ b/xwiki-platform-core/xwiki-platform-web/src/main/webapp/templates/viewattachrev.vm @@ -1,7 +1,7 @@ #template("startpage.vm") <div class="main layoutsubsection"> <div id="mainContentArea"> -<h3>$xwiki.parseMessage("availableversionsattachment")</h3> +<h3>$services.localization.render("core.viewers.attachments.revisions", [$attachment.filename])</h3> #if ($tdoc.realLanguage!="") #set($lang = "&language=${tdoc.realLanguage}") #else