StatCan / aaw

Documentation for the Advanced Analytics Workspace Platform
https://statcan.github.io/aaw/
Other
68 stars 12 forks source link

RStudio i18n: Handle Command Shortcuts #760

Closed skyeturriff closed 2 years ago

skyeturriff commented 2 years ago

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: https://github.com/StatCan/aaw-kubeflow-containers/issues/149#issuecomment-805107505 https://github.com/StatCan/daaas/issues/553

skyeturriff commented 2 years ago

#9083 (comment) https://github.com/rstudio/rstudio/issues/10217

skyeturriff commented 2 years ago

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 commented 2 years ago

PR created upstream