Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the database language via getText function

Lara Weber
Contributor
June 8, 2020

Dear Community,

I want to get a list with all entries of a projects permission scheme in german language. Which table do I need to look at and which getText function (https://docs.atlassian.com/software/jira/docs/api/8.0.1/com/atlassian/jira/util/I18nHelper.html) do I need for that?

The HTML-file I want to adapt is the following:

#set ( $permissionScheme = ${helper.getPermissionScheme()} )
#set ( $permissionKeys = ${helper.getProjectPermissionKeys()} )
<h1>Berechtigungsschema</h1>
<ac:structured-macro ac:name="expand" ac:schema-version="1" ac:macro-id="${helper.getUUID()}">
<ac:parameter ac:name="title">$!permissionScheme.name</ac:parameter>
<ac:rich-text-body>
<table>
<thead>
<tr>
<th>Permission</th>
<th>Granted to</th>
</tr>
</thead>
<tbody>
#foreach ( $permissionKey in $permissionKeys )
<tr>
<td>$!permissionKey</td>
#set ( $permissions = ${helper.getPermissionSchemeEntries($permissionScheme, $permissionKey)} )
<td>
<ul>
#foreach ( $permission in $permissions )
#if ( $permission.type == "applicationRole" )
<li>Any logged in user</li>

#elseif ( $permission.type == "projectrole" )
#set ( $projectrole = ${helper.getProjectRoleById($!permission.parameter)} )
<li>$permission.type&nbsp;-&nbsp;$!projectrole</li>

#else
<li>$permission.type&nbsp;-&nbsp;$!permission.parameter</li>
#end
#end
</ul>
</td>
</tr>
#end
</tbody>
</table>
</ac:rich-text-body>
</ac:structured-macro>

 

Thanks for your help and kind regards

Lara

0 answers

Suggest an answer

Log in or Sign up to answer