Bug 59131 - JLabeledChoice isn't localized (L10N)
Summary: JLabeledChoice isn't localized (L10N)
Status: NEW
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: Nightly (Please specify date)
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on: 59083
Blocks:
  Show dependency tree
 
Reported: 2016-03-06 08:54 UTC by Milamber
Modified: 2016-03-29 19:11 UTC (History)
1 user (show)



Attachments
JLabeledChoice Not L10N (12.37 KB, image/png)
2016-03-06 08:54 UTC, Milamber
Details
Plus or Minus are characters (9.63 KB, image/png)
2016-03-06 08:54 UTC, Milamber
Details
Plus or Minus are icons (12.14 KB, image/png)
2016-03-06 08:55 UTC, Milamber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milamber 2016-03-06 08:54:11 UTC
Created attachment 33630 [details]
JLabeledChoice Not L10N

The new change of the Method field to have an editable field to add or delete a method bring an issue in the localized versions of JMeter, the label of Add and Delete button isn't localize, it's hard-coded in the src/jorphan/org/apache/jorphan/gui/JLabeledChoice.java L149/L153.

This class is build inside the jorphan.jar package, which don't have any import form JMeter API, so it's not possible to use the JMeter L10N mechanism.

Three options:

1/ Change the "Add" and "Del" label with " + " and " - " characters. Not necessary to add some L10N mechanism, the plus and minus are recognized for Add and Delete action in UI.

2/ Use icons for + and - (same than the collapse/expand toolbar button). Need to add inside the jorphan.jar the icons and manage the HiDPI (some properties to add or try to manage this automatically)

3/ Add some L10N messages.properties mechanism inside the jorphan.jar and use this to translate the UI.

In attachment, some draft screenshot.

What is your prefer option ? 1 / 2 / 3 / other way ?
Comment 1 Milamber 2016-03-06 08:54:57 UTC
Created attachment 33631 [details]
Plus or Minus are characters
Comment 2 Milamber 2016-03-06 08:55:21 UTC
Created attachment 33632 [details]
Plus or Minus are icons
Comment 3 Philippe Mouawad 2016-03-06 12:41:33 UTC
(In reply to Milamber from comment #0)
> Created attachment 33630 [details]
> JLabeledChoice Not L10N
> 
> The new change of the Method field to have an editable field to add or
> delete a method bring an issue in the localized versions of JMeter, the
> label of Add and Delete button isn't localize, it's hard-coded in the
> src/jorphan/org/apache/jorphan/gui/JLabeledChoice.java L149/L153.
> 
> This class is build inside the jorphan.jar package, which don't have any
> import form JMeter API, so it's not possible to use the JMeter L10N
> mechanism.
> 
> Three options:
> 
> 1/ Change the "Add" and "Del" label with " + " and " - " characters. Not
> necessary to add some L10N mechanism, the plus and minus are recognized for
> Add and Delete action in UI.
> 
+1 for me
> 2/ Use icons for + and - (same than the collapse/expand toolbar button).
> Need to add inside the jorphan.jar the icons and manage the HiDPI (some
> properties to add or try to manage this automatically)
> 
> 3/ Add some L10N messages.properties mechanism inside the jorphan.jar and
> use this to translate the UI.
> 
> In attachment, some draft screenshot.
> 
> What is your prefer option ? 1 / 2 / 3 / other way ?
Comment 4 Sebb 2016-03-07 16:36:45 UTC
I'm not sure why there needs to be a Delete function. Surely one just does not select it?

Indeed, I'm not sure why there needs to be an Add button either.

The way this works for the TestBean-based GUIs is to have an editable entry in the drop-down box. For example like the Language field in the JSR223Sampler.

This can then either be a fixed value or even a variable reference.

If this were done there would be no L10N issue.

So my vote is for 'other way'.
Comment 5 Sebb 2016-03-09 02:18:05 UTC
Solved for HTTPRequest by dropping the Buttons

URL: http://svn.apache.org/viewvc?rev=1734185&view=rev
Log:
HTTP Request : Make Method field editable so that additional methods (Webdav) can be added easily
Don't display Add/Del buttons
Bugzilla Id: 59083

Modified:
    jmeter/trunk/src/jorphan/org/apache/jorphan/gui/JLabeledChoice.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
Comment 6 Sebb 2016-03-09 02:19:10 UTC
Renamed; it's not HTTP specific
Comment 7 Sebb 2016-03-09 02:23:17 UTC
(In reply to Sebb from comment #4)
> I'm not sure why there needs to be a Delete function. Surely one just does
> not select it?
> 
> Indeed, I'm not sure why there needs to be an Add button either.
> 
> The way this works for the TestBean-based GUIs is to have an editable entry
> in the drop-down box. For example like the Language field in the
> JSR223Sampler.
> 
> This can then either be a fixed value or even a variable reference.
> 
> If this were done there would be no L10N issue.
> 
> So my vote is for 'other way'.

I was confused by the title; it's a generic L10N issue, not just for HTTP GUI, so it still may need addressing at some point.

Another solution would be to move the class out of Jorphan so the property mechanisms are available.

I think we need to see if there are other classes that have the same issue.
Comment 8 The ASF infrastructure team 2022-09-24 20:38:03 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3884