From 60b2a977c541df148ab79bd1d092b1d5f00ab7a7 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Wed, 2 Sep 2020 18:27:57 -0700 Subject: [PATCH] fixed spring msg with args for several views --- src/main/resources/templates/linkout.ftlh | 2 +- src/main/resources/templates/projects/settings.ftlh | 2 +- src/main/resources/templates/projects/versions/create.ftlh | 2 +- src/main/resources/templates/projects/versions/log.ftlh | 2 +- src/main/resources/templates/projects/versions/view.ftlh | 3 +-- src/main/resources/templates/projects/view.ftlh | 2 +- src/main/resources/templates/users/view.ftlh | 4 ++-- 7 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/main/resources/templates/linkout.ftlh b/src/main/resources/templates/linkout.ftlh index 1d37ef770..5444e8a02 100644 --- a/src/main/resources/templates/linkout.ftlh +++ b/src/main/resources/templates/linkout.ftlh @@ -13,7 +13,7 @@
-

<@spring.messageArgs "general.linkout.warning", [remoteUrl] />

+

<@spring.messageArgs code="general.linkout.warning" args=[remoteUrl] />

<@spring.message "project.back" /> diff --git a/src/main/resources/templates/projects/settings.ftlh b/src/main/resources/templates/projects/settings.ftlh index 58309f6c1..f55e4169c 100644 --- a/src/main/resources/templates/projects/settings.ftlh +++ b/src/main/resources/templates/projects/settings.ftlh @@ -278,7 +278,7 @@
- <@spring.messageArgs "project.delete.info.uniqueid", p.project.name /> + <@spring.messageArgs code="project.delete.info.uniqueid" args=[p.project.name] />
- <@spring.messageArgs "version.create.tos" "#" /> + <@spring.messageArgs code="version.create.tos" args=["#"] /> <#import "*/projects/helper/createSteps.ftlh" as createSteps> diff --git a/src/main/resources/templates/projects/versions/log.ftlh b/src/main/resources/templates/projects/versions/log.ftlh index b2aaad24b..3fd4ffdd4 100644 --- a/src/main/resources/templates/projects/versions/log.ftlh +++ b/src/main/resources/templates/projects/versions/log.ftlh @@ -2,7 +2,7 @@ <#import "*/utils/hangar.ftlh" as hangar /> <#import "*/layout/base.ftlh" as base /> -<#assign message><@spring.messageArgs "version.log.logger.title" project.namespace /> +<#assign message><@spring.messageArgs code="version.log.logger.title" args=[project.namespace] /> <@base.base title=message>
diff --git a/src/main/resources/templates/projects/versions/view.ftlh b/src/main/resources/templates/projects/versions/view.ftlh index e226a1356..316485fc1 100644 --- a/src/main/resources/templates/projects/versions/view.ftlh +++ b/src/main/resources/templates/projects/versions/view.ftlh @@ -55,8 +55,7 @@ <#if headerData.globalPerm(Permission.Reviewer)> <#if v.approvedBy?has_content> - <#assign msgArgs=[v.approvedBy, utils.prettifyDateTime(v.v.approvedAt)] /> - <@spring.messageArgs "version.approved.info" msgArgs /> + <@spring.messageArgs code="version.approed.info" args=[v.approvedBy, utils.prettifyDateTime(v.v.approvedAt)] /> diff --git a/src/main/resources/templates/projects/view.ftlh b/src/main/resources/templates/projects/view.ftlh index c110525b0..3afecb099 100644 --- a/src/main/resources/templates/projects/view.ftlh +++ b/src/main/resources/templates/projects/view.ftlh @@ -48,7 +48,7 @@ Base template for Project overview. ${p.renderVisibilityChange(markdownService, "Unknown")} <#else> <#if p.visibility == Visibility.SOFTDELETE> - <@spring.messageArgs "visibility.notice." + p.visibility.getName(), [p.lastVisibilityChangeUser] /> + <@spring.messageArgs code="visibility.notice." + p.visibility.getName() args=[p.lastVisibilityChangeUser] /> <#else> <@spring.message "visibility.notice." + p.visibility.getName() /> ${p.renderVisibilityChange(markdownService, "")} diff --git a/src/main/resources/templates/users/view.ftlh b/src/main/resources/templates/users/view.ftlh index f7c9e927e..dd2c6788e 100644 --- a/src/main/resources/templates/users/view.ftlh +++ b/src/main/resources/templates/users/view.ftlh @@ -26,8 +26,8 @@ CATEGORY_TITLE['${category.apiName}'] = '${category.title}'; CATEGORY_ICON['${category.apiName}'] = '${category.icon}'; - NO_ACTION_MESSAGE.starred = '<@spring.messageArgs "user.noStars" u.user.name />'; - NO_ACTION_MESSAGE.watching = '<@spring.messageArgs "user.noWatching" u.user.name />'; + NO_ACTION_MESSAGE.starred = '<@spring.messageArgs code="user.noStars" args=[u.user.name] />'; + NO_ACTION_MESSAGE.watching = '<@spring.messageArgs code="user.noWatching" args=[u.user.name] />'; ${additionalScripts}