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

[WIP]Add localisation for keyboard keys #23700

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft

Conversation

Aaron-Junker
Copy link
Collaborator

@Aaron-Junker Aaron-Junker commented Jan 31, 2023

Summary of the Pull Request

Add localisation support to keyboard keys.

PR Checklist

Detailed Description of the Pull Request / Additional comments

image

To-Do:

  • Move logic in seperate class
  • Make the same for keyboard manager

Validation Steps Performed

@github-actions

This comment has been minimized.

@Aaron-Junker
Copy link
Collaborator Author

@niels9001 You speak dutch right? I don't get if space in dutch is "Mellemrumstast" (used in Microsoft help articles) or "spatiebalk" (used on Wikipedia).

@niels9001
Copy link
Contributor

Mellemrumstast

I have now idea what Mellemrumstast means... :)..

But yeah, should be "Spatiebalk"!

@Aaron-Junker
Copy link
Collaborator Author

Mellemrumstast

I have now idea what Mellemrumstast means... :)..

But yeah, should be "Spatiebalk"!

Ok Thank you!

@htcfreek
Copy link
Collaborator

@Aaron-Junker

  • Can't we use our translation system for that?
  • Please check the list of supported langs against our docs page. I think Chinese is missing.

@Aaron-Junker
Copy link
Collaborator Author

@Aaron-Junker

  • Can't we use our translation system for that?

Technically yes, but I think the translations won't be very reliable

  • Please check the list of supported langs against our docs page. I think Chinese is missing.

I know, this is still in draft.

@Jay-o-Way
Copy link
Collaborator

Jay-o-Way commented Jan 31, 2023

@Aaron-Junker what's the source you are using? You are using Danish in stead of Dutch.

Also note the difference between "space" (a character) and "space bar" (the physical thing)

Copy link
Collaborator

@Jay-o-Way Jay-o-Way left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switch / Case keywords?

_keyVisual.Style = GetStyleSize("TextKeyVisualStyle");
_keyVisual._keyPresenter.Content = _keyVisual.Content;

if (currentLanguage == "de")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These look like perfect Switch conditions


if (currentLanguage == "de")
{
if ((string)_keyVisual._keyPresenter.Content == "Ctrl")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for this level

@Aaron-Junker
Copy link
Collaborator Author

@Aaron-Junker what's the source you are using? You are using Danish in stead of Dutch.

🙈Oh, you're right. I'm so sorry. As I said I used this help article in different languages

@Aaron-Junker
Copy link
Collaborator Author

@crutkas I want your opinion on this. Should this be something the localization team should do?

@jaimecbernardo
Copy link
Collaborator

Hi @Aaron-Junker ,
Thanks for opening the PR.
I think the way to doing this would be to rely on Resource files to have the localization team handle it.

@crutkas
Copy link
Member

crutkas commented Feb 22, 2023

Answer was these should go through translation service and we should add a comment such as "The string of the "Ctrl" part of the shortcuts in tooltips, (Ex: Ctrl+V)" if we were translating Ctrl

@Aaron-Junker Aaron-Junker changed the title [WIP]Add translations for keybindings [WIP]Add localisation for keyboard keys Feb 24, 2023
@github-actions

This comment has been minimized.

@Aaron-Junker

This comment was marked as resolved.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@Aaron-Junker
Copy link
Collaborator Author

Aaron-Junker commented Feb 26, 2023

@jaimecbernardo I reworked everything. There's just one thing that needs to be fixed and I don't know how. The Keyboard Manager Editor is using it's own resource file instead of the PowerToys interop one.

image

@stefansjfw
Copy link
Collaborator

@jaimecbernardo I reworked everything. There's just one thing that needs to be fixed and I don't know how. The Keyboard Manager Editor is using it's own resource file instead of the PowerToys interop one.

image

I see what the problem is with KBM. In theory, it should be possible to include 2 .rc files, although we don't have an example for that in our code.

@Aaron-Junker
Copy link
Collaborator Author

@jaimecbernardo I reworked everything. There's just one thing that needs to be fixed and I don't know how. The Keyboard Manager Editor is using it's own resource file instead of the PowerToys interop one.
image

I see what the problem is with KBM. In theory, it should be possible to include 2 .rc files, although we don't have an example for that in our code.

I don't even get how the first one is included. I have no idea how I could do this.

@jaimecbernardo jaimecbernardo self-assigned this Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants