doubt regarding translating Jelly strings

31 views
Skip to first unread message

Alceu Rodrigues de Freitas Junior

unread,
Nov 6, 2022, 3:30:23 PM11/6/22
to Jenkins Documentation
Hello folks,

I'm updating the translation of Jenkins to Brazilian Portuguese and got a new string:

Got warnings for core/src/main/resources/hudson/slaves/JNLPLauncher/main_pt_BR.properties:
    Missing 'Note\:\ PowerShell\ users\ must\ use\ curl.exe\ instead\ of\ curl\ because\ curl\ is\ a\ default\ PowerShell\ cmdlet\ alias\ for\ Invoke-WebRequest.'

I was curious about this particular key and decided to look into the corresponding Jelly file:

<p>
${%Note: PowerShell users must use curl.exe instead of curl because curl is a default PowerShell cmdlet alias for Invoke-WebRequest.}
</p>

Now let's compare that with another key from the same file:

<div class="error">
${%slaveAgentPort.disabled}
<l:isAdmin><a href="${rootURL}/configureSecurity">${%configure.link.text}</a>.</l:isAdmin>
</div>

slaveAgentPort.disabled looks like a proper key name. Besides that, it is also available in a Java Properties file in the same directory:

main.properties
24:slaveAgentPort.disabled=JNLP agent port is disabled and agents cannot connect this way.

So, if I got it right, slaveAgentPort.disabled is properly (no pun intented) loading the text from a property file, while the new string is using text directly inserted in the Jelly file, without using the indirection.

What is the proper way to include strings to be translated using Jelly? My guess here is that this new string should be added as something like that:

${%powershell.users}

In the main.jelly and then adding:

powershell.users=Note: PowerShell users must use curl.exe instead of curl because curl is a default PowerShell cmdlet alias for Invoke-WebRequest.

Into the main.properties file.

Please advice.

Thanks in advance,

Alceu

Reply all
Reply to author
Forward
0 new messages