Problem in the visualization of comments' restriction

RosaBlanka December 27, 2019

Hello, 

I see in global.vm file 

 #set($currentSelection = "$i18n.getText('security.level.restricted.to',${textutils.htmlEncode($level.name)})") 

However the '$i18n.getText('security.level.restricted.to',${textutils.htmlEncode($level.name)})' is not compiling and returned as it is.

Would you please advise how to solve this problem?

Annotation 2019-12-27 165018.png

Thank you.

1 answer

0 votes
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 6, 2020

Hi @RosaBlanka ,

Thanks for reaching out and it looks like you are running into the same or similar issues that is discussed in the following thread, noting there is a link to a feature request at the top as the accepted answer, but further down the thread there is a note on a workaround that worked in this case:

And drawing focus to the conversation between Parashar Joshi Sep 28, 2017 and Martin Tang Sep 28, 2017
Hi Martin,

 

We worked around the rendering issue by updating global.vm where we replaced the line
#set($currentSelection = "$i18n.getText('security.level.restricted.to', $

{textutils.htmlEncode($level.name)}

)")

with

#set($currentSelection = "Restricted to <span class='redText'>Users</span>")

with this we do not see the rendering issue but this restricts the internationalization of the text displayed meaning any user irrespective of their language preference they see the text "Restricted to Users".

The change in  system-comment-field-edit.vm would still be needed and global.vm change is only to fix the Text displayed in the browser UI.

Hope this helps.

-Parashar

AND

Hi Parashar,

Thanks so much for the reply.

I did in a similar way. You are right the issue is somehow related to $18n function here.

But instead of giving a fixed value, I set like this " Restricted to <span class='redText'>${textutils.htmlEncode($level.name)}</span>"

Regards,

-M

Regards,
Earl

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events