Internationalized Help files?

46 views
Skip to first unread message

JordanGS

unread,
Apr 11, 2017, 11:48:56 PM4/11/17
to Jenkins Developers
We can internationalize the job config page. After following: these instructions. I got that working for the ones Jenkins didn't automatically pick up.

I was wondering though, can we also internationalize the help files? For example i have a help file called help-myproject.html, i tried changing it to help-myproject_fr.html

That was my first thought but it didn't work. I haven't seen any documentation to show that it can't be done, but i also haven't seen any that shows how to do it. I have seen the Mailer plugin attempt the same thing as i but it doesn't work in it, so maybe this was a feature that's not longer supported?

Thank you

Ullrich Hafner

unread,
Apr 12, 2017, 4:07:54 AM4/12/17
to Jenkins Developers
On my instance this feature is still working (Jenkins ver. 2.46.1). Here is an example project that uses the feature: 

You can add a _fr help file and check if the help in the system configuration of Jenkins appears. 
signature.asc

JordanGS

unread,
Apr 12, 2017, 10:42:35 AM4/12/17
to Jenkins Developers
Thanks for the reply. I'm using the same Jenkins instance (Jenkins ver. 2.46.1)

Please see the attached screenshot, the config page changed but not the help file for me. How are you changing your locale to test this feature? A Jenkins Plugin or Firefox/Chrome Plugin?
nohelpinternational.png

Daniel Beck

unread,
Apr 12, 2017, 10:47:44 AM4/12/17
to jenkin...@googlegroups.com

> On 12.04.2017, at 16:42, JordanGS <develop...@gmail.com> wrote:
>
> Please see the attached screenshot, the config page changed but not the help file for me.

Just to make sure the obvious problem is out of the way, both help-myproject.html and help-myproject_de.html exist? The file isn't named …_fr.html?

If you could publish the full sources for the plugin you experience the problem with, even after a full rebuild (!), that would help.

JordanGS

unread,
Apr 12, 2017, 10:56:27 AM4/12/17
to Jenkins Developers, m...@beckweb.net
@Daniel Beck The attached screenshot is @Ullrich Hafner's warnings-plugin. You can see here that he has english (en) and german (de) internationalization.

In my own case i have English and french (fr): help-myproject.html and help-myproject_fr.htm

The mailer plugin also has internationalized help files. I uploaded a screenshot to show Ullrich what i see when i use the Locale Plugin to change my locale. Maybe i'm changing my locale wrong? I am using this plugin: https://wiki.jenkins-ci.org/display/JENKINS/Locale+Plugin

Daniel Beck

unread,
Apr 12, 2017, 11:57:07 AM4/12/17
to jenkin...@googlegroups.com

> On 12.04.2017, at 16:56, JordanGS <develop...@gmail.com> wrote:
>
> Maybe i'm changing my locale wrong?

Just set your browser's Accept-Language. There may be something wrong with Locale Plugin.

Message has been deleted

Oleg Nenashev

unread,
Apr 12, 2017, 2:19:10 PM4/12/17
to Jenkins Developers, m...@beckweb.net
IIRC Locale plugin does not handle the help boxes correctly, because this text is being downloaded via AJAX calls. FTR https://issues.jenkins-ci.org/browse/JENKINS-2410

среда, 12 апреля 2017 г., 20:00:12 UTC+2 пользователь JordanGS написал:

I did, see screenshot below. I removed the Locale Plugin and changed the Accept-Language value in Firefox to de. As you can see from the screenshot. It will update the language in the job config but not the help file. I have now tried 5 different plugins that have internationalized help files. I have also asked 2 other people whom i know to test this. The help file does NOT change. Rather than telling me something works, can you please try it yourself one time and tell me if it works for you?

Jenkins Version is Jenkins ver. 2.46.1
Firefox is 52.0.1

Daniel Beck

unread,
Apr 12, 2017, 2:20:25 PM4/12/17
to jenkin...@googlegroups.com

> On 12.04.2017, at 20:00, JordanGS <develop...@gmail.com> wrote:
>
> Rather than telling me something works, can you please try it yourself one time and tell me if it works for you?

It has always worked for me, and still does.

https://ci.jenkins.io/descriptor/hudson.tasks.junit.JUnitResultArchiver/help/keepLongStdio is German when my Accept-Language is de.

JordanGS

unread,
Apr 12, 2017, 2:39:18 PM4/12/17
to Jenkins Developers, m...@beckweb.net

Here is my uploaded repository: https://github.com/JordanGS/zap-plugin/tree/myfeature

What you see in the screenshots is attempts at internationalization using the webapps folder.


uses the main/src/resources
  <f:entry field="translationTestA" title="${%TranslationTestA}">
   
<f:textbox/>
 
</f:entry>


uses the main/src/webapps
  <f:entry field="translationTestB" title="${%TranslationTestB}" help="/plugin/zap/help-translationTestB.html">
   
<f:textbox/>
 
</f:entry>

help-translationTestB.html : https://github.com/JordanGS/zap-plugin/blob/myfeature/src/main/webapp/help-translationTestB.html
help-translationTestB_fr.html : https://github.com/JordanGS/zap-plugin/blob/myfeature/src/main/webapp/help-translationTestB_fr.html
help-translationTestB_de.html : https://github.com/JordanGS/zap-plugin/blob/myfeature/src/main/webapp/help-translationTestB_de.html

I simplified the translations to just say English, German, French. The webapps folder only generates the first one for some reason. My problem being that i have to declare help="..." elsewhere.

AS you can see from the links, they are all different html files, yet as you can see from the screenshot. Only english is displayed when using help="..."

Thank you


JordanGS

unread,
Apr 12, 2017, 2:49:23 PM4/12/17
to Jenkins Developers, m...@beckweb.net
If using help="/plugin/<ARTIFACT_ID>/<FILENAME>.html" which will check the main/src/webapps directory, then you need to clear your browser cache/history every time that you change the browser's Accept-Language otherwise it will only display the help file in the language in which it was first loaded.

If you do not specify help="/plugin/<ARTIFACT_ID>/<FILENAME>.html"> then it just works without having to worry about clearing your browser cache/history.

Thank you all 3 so much, the other plugins i mentioned still don't work when i try to get them translated so maybe they have bugs haha. But it does work now on my own plugin when i clear my cache/history.
Reply all
Reply to author
Forward
0 new messages