You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2020/10/11 14:15:35 UTC

[Bug 64800] New: Some menu item labels are gone (e.g, html_report, compile_jsr223, schematic_view, import_curl) once switching to non-English and back to English

https://bz.apache.org/bugzilla/show_bug.cgi?id=64800

            Bug ID: 64800
           Summary: Some menu item labels are gone (e.g, html_report,
                    compile_jsr223, schematic_view, import_curl) once
                    switching to non-English and back to English
           Product: JMeter
           Version: 5.3
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: woonsan@apache.org
  Target Milestone: JMETER_5.3.1

Created attachment 37493
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37493&action=edit
Labels of some tools menu items are going when switching to French

* Reproduction Path
- Run JMeter 5.3.
- In English (by default), you can see the "Generate HTML Report", "Compile
JSR223 Test Elements", "Generate Schematic View (alpha)" and "Import from cURL"
menu items under the "Tools" menu.
- Switch to a non-English language through "Options / Choose Language / ..."
menu item. e.g, "French".
- Check the "Tools" menu ("Outils" in French) again.
- Now some of the menu items underneath are not showing the translated
messages; instead it shows "[res_key] html_report", "[res_key=compile_jsr223]",
"[res_key=schematic_view]" and "[res_key] import_curl". (See attachment.)
- Strangely, even if you switch back to English ("Options / Choisir une langue
/ Anglais"), the four menu items under the "Tools" no more shows the proper
English translation messages.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64800] Some menu item labels are gone (e.g, html_report, compile_jsr223, schematic_view, import_curl) once switching to non-English and back to English

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64800

Woonsan Ko <wo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #37493|Labels of some tools menu   |Labels of some tools menu
        description|items are going when        |items are gone when
                   |switching to French         |switching to French

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64800] Some menu item labels are gone (e.g, html_report, compile_jsr223, schematic_view, import_curl) once switching to non-English and back to English

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64800

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|Mac OS X 10.1               |All
           Keywords|                            |FixedInTrunk
           Hardware|PC                          |All
             Status|NEW                         |RESOLVED
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om
         Resolution|---                         |FIXED

--- Comment #3 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Fixed by
https://github.com/apache/jmeter/commit/041eb898311bf9f06eb4177fbf12fb61575d2b2b

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64800] Some menu item labels are gone (e.g, html_report, compile_jsr223, schematic_view, import_curl) once switching to non-English and back to English

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64800

Woonsan Ko <wo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |woonsan@apache.org

--- Comment #1 from Woonsan Ko <wo...@apache.org> ---
Discovered while testing https://bz.apache.org/bugzilla/show_bug.cgi?id=64787.
Will try to find the root cause...

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64800] Some menu item labels are gone (e.g, html_report, compile_jsr223, schematic_view, import_curl) once switching to non-English and back to English

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64800

Woonsan Ko <wo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED

--- Comment #4 from Woonsan Ko <wo...@apache.org> ---
Thank you!

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64800] Some menu item labels are gone (e.g, html_report, compile_jsr223, schematic_view, import_curl) once switching to non-English and back to English

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64800

--- Comment #2 from Woonsan Ko <wo...@apache.org> ---
Fixes suggested and ready for review in PR:
https://github.com/apache/jmeter/pull/631

---

The root cause:

- `HtmlReportAction.getMenuItemsAtLocation(MENU_LOCATION)` reads the translated
label using the key, "generate_report_ui.html_report_menu", while its component
name is "html_report".
  `CompileJSR223TestElements.getMenuItemsAtLocation(MENU_LOCATION)` uses
"compile_menu" while its name is "compile_jsr223".
  `SchematicView.getMenuItemsAtLocation(MENU_LOCATION)` uses
"schematic_view_menu" while its name is "schematic_view".
  `ParseCurlCommandAction.getMenuItemsAtLocation(MENU_LOCATION)` uses
"curl_import_menu" while its name is "import_curl".

- `JMeterMenuBar.updateMenuElement(MenuElement)` seems to reset the label by
resolving the translated label by using the component name, "html_report", as
the key (L738-) for example.
  I assume that it was designed originally to use the action component name as
the menu item label resource key. 

- So, it was caused by the fact that each phase - (a) initial menu label
resolution and (b) resetting the menu label on language switching in
JMeterMenuBar - uses different keys for those menu item components.

---

Based on my assumption ("...designed originally to use the action component
name as the menu item label resource key"), the PR suggests to use the action
component name as the keys consistently.

-- 
You are receiving this mail because:
You are the assignee for the bug.