-
Notifications
You must be signed in to change notification settings - Fork 17.4k
Fix/not update menu with i18n (#22594) #22597
Fix/not update menu with i18n (#22594) #22597
Conversation
"Check for Update" and "Reopen Project" menu dose not work.
The fixed bug is that "Reopen Project" menu has no project.
Edit: ohhhh I get it now. This pr adds "id" for identification instead of label And I see that label is not redundant with id, they're different concepts even though the tests show that they're usually the same... |
FIx bug of atom/spec/*menu*.js, that are not tested at 1st Pull Request.
1. Atom Internationalization (i18n)For globally used applications, such as VS Code and Atom editor, it is very important that they are localized in their own languages. In Japan, VS Code is almost all localized, so it has become more popular than Atom editor, last year. For internationalization of Atom, the 2. Fix the bug of CI errorI fixed the bug of the following CI bugs, and pass the CI test.
|
Change spec/{context-,}-menu-manager.spec.js
Co-authored-by: Sadick <sadickjunior@gmail.com>
Co-authored-by: Sadick <sadickjunior@gmail.com>
Co-authored-by: Sadick <sadickjunior@gmail.com>
Co-authored-by: Sadick <sadickjunior@gmail.com>
Co-authored-by: Sadick <sadickjunior@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree.
Co-authored-by: Sadick <sadickjunior@gmail.com>
Co-authored-by: Sadick <sadickjunior@gmail.com>
Co-authored-by: Sadick <sadickjunior@gmail.com>
Co-authored-by: Sadick <sadickjunior@gmail.com>
Co-authored-by: Sadick <sadickjunior@gmail.com>
Co-authored-by: Sadick <sadickjunior@gmail.com>
Co-authored-by: Sadick <sadickjunior@gmail.com>
Note: I commented in a resolved suggestion - don't know how to make it show up: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for opening this PR and making the changes requested. 🙇
Identify the Bug
Issue #22594
Description of the Change
In regard to MenuManager.add(items) in atom/src/menu-manager.coffee.
Atom Core and
atom-i18n
package use the samelabel
member of the argument items,which is mentioned above.
After
atom-i18n
localize menus and submenus, Atom Core can not update them correctly.So, I added the class member
id
to the argumentitems
, which means a member of class MenuItem in Electron.After
atom-i18n
localizelabel
, Atom Core useid
(instead oflabel
, which is current implementation) to update menus and submenus.Modified files
Alternate Designs
I used
sublabel
instead ofid
. But strings ofsublabel
appear under the strings oflabel
.Possible Drawbacks
Verification Process
I imported
atom-i18n
package, and set locale to Japanese.Release Notes
When Atom is localized with the atom-i18n package, the "File" menu is no longer added to the menu bar and "Check for Update" is localized and displayed in the "Help" menu on Windows.