Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RStudio i18n: Handle Command Shortcuts #760

Closed
Tracked by #510
skyeturriff opened this issue Dec 1, 2021 · 3 comments
Closed
Tracked by #510

RStudio i18n: Handle Command Shortcuts #760

skyeturriff opened this issue Dec 1, 2021 · 3 comments
Assignees
Labels
size/L 4-5 days

Comments

@skyeturriff
Copy link

Shortcuts need to be addressed.

How to handle translation of conditional shortcuts (i.e. shortcuts that depend on if statements)
Eg: how to handle for i18n a shortcut of: newFile="ctrl+f" if windows, "cmd+f" if mac

For background info/work, see:
StatCan/aaw-kubeflow-containers#149 (comment)
#553

@skyeturriff skyeturriff added the size/M 2-3 days label Dec 1, 2021
@skyeturriff skyeturriff self-assigned this Dec 1, 2021
@skyeturriff skyeturriff changed the title RStudio i18n: Shortcuts RStudio i18n: Shortcuts 😭 Dec 1, 2021
@skyeturriff skyeturriff changed the title RStudio i18n: Shortcuts 😭 RStudio i18n: Handle Command Shortcuts Dec 1, 2021
@skyeturriff skyeturriff added size/L 4-5 days and removed size/M 2-3 days labels Dec 1, 2021
@skyeturriff
Copy link
Author

@skyeturriff
Copy link
Author

Update from upstream:

Hello Skye,

You're on the right track. There are several places where we build UI for shortcut modifiers so each one will probably need to be changed. You mentioned that the command palette wasn't responding; that's because it builds UI for shortcut modifiers here:

https://github.com/rstudio/rstudio/blob/dd4a28934b56b516ec37e3ef6c637c2d5cfa41ea/src/gwt/src/org/rstudio/studio/client/palette/ui/CommandPaletteCommand.java#L36-L64

For the Files menu, are you working with RStudio Desktop or RStudio Server? You should be able to pick up the code that draws menu items in the respective MenuCallback implementations (DesktopMenuCallback/WebMenuCallback).

Hope that's helpful, let me know if it raises more questions!

@skyeturriff
Copy link
Author

PR created upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L 4-5 days
Projects
None yet
Development

No branches or pull requests

1 participant