PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

UI for Pinyin

Open ChaseKnowlden opened this issue 2 years ago • 5 comments

Summary of the Pull Request

Add a toggle to turn on pinyin.

PR Checklist

  • [x] Closes: #3587
  • [x] Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • [ ] Tests: Added/updated and all pass
  • [ ] Localization: All end user facing strings can be localized
  • [ ] Dev docs: Added/updated
  • [ ] New binaries: Added on the required places
  • [ ] Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

Open PowerToys, select PowerToys Run, find Use pinyin, toggle to on, see chinese characters in search.

ChaseKnowlden avatar Feb 23 '23 21:02 ChaseKnowlden

Hi, Thanks for the contribution. Please help us out here, how could we test this change? :) Some strings we can copy paste would be helpful here / instructions on what we should see or not.

jaimecbernardo avatar Feb 24 '23 11:02 jaimecbernardo

Adds a toggle to turn on Pinyin. @Jay-o-Way

ChaseKnowlden avatar Feb 26 '23 03:02 ChaseKnowlden

Yes I see that. But can you show how or where this works?

Jay-o-Way avatar Feb 26 '23 13:02 Jay-o-Way

@Jay-o-Way It is where Chinese characters translate into RomanIan characters.

ChaseKnowlden avatar Feb 26 '23 18:02 ChaseKnowlden

There are conflicts to be resolved here.

Also, some specific validation steps would be nice. As @Jay-o-Way said, this looks like adding a toggle that is not being used anywhere.

stefansjfw avatar Mar 08 '23 16:03 stefansjfw

This guy is making an attempt to add a UI toggle for #3587 (that is, allow typing letters to match Chinese characters) although his approach is wrong.

Pinyin support was added in #21465 (previously removed in #7455, inherited from Wox) but a UI toggle was not addded.

However, the current algorithm is having severe performance issues, so it would be better to add the toggle after the algorithm is reworked.

stevenlele avatar Mar 13 '23 02:03 stevenlele

Hi, Thanks for the contribution. Please help us out here, how could we test this change? :) Some strings we can copy paste would be helpful here / instructions on what we should see or not.

Yes I see that. But can you show how or where this works?

@jaimecbernardo @Jay-o-Way

I guess you want a way to test it's behavior. To do this, you need to have a "target" named in Chinese to search. If not, you can create one and test this function in following steps:

  1. Create a target to search. In my condition, I have configured Powertoys Run to search my start menu shotcuts. So I create a new shotcuts named "测试"(means test, spells as ceshi in Pinyin). As far as I see you need to have a real, working shotcut to make it searchable. Here I **Copied my explorer shotcut and renamed it to "测试". image

  2. Now if you open Powertoys Run(a restart is needed, maybe?), type "测", and you're able to find this new shotcut. image

  3. Notice that "测试" can spell as ceshi in Pinyin. If this toggle is off, then you are not able to see it. image

  4. Now, if you have this toggled on. You can see it in the results!(forget abou my wallpaper..) powertoy_run_pinyin

Please note that I was using the method here to show this test, instead of this pr. You may test this build according to the method above.

As @Jay-o-Way said, this looks like adding a toggle that is not being used anywhere.

@stefansjfw CJK and some other languages' users need to switch IMEs to type their own characters. But mostly there characters can be Romanized in ASCII characters, so this can greatly improve efficiency if we can search files in these characters just like those in pure-English.

artiga033 avatar Mar 20 '23 14:03 artiga033

That's a very clear explanation. Thank for that! 😃 (I never use any Asian) P.S. cool wallpaper

Jay-o-Way avatar Mar 20 '23 15:03 Jay-o-Way

As I mentioned, the current algorithm has severe performance issue, see https://github.com/microsoft/PowerToys/issues/3587#issuecomment-1382859784, so it wouldn't be ideal to release such an experimental feature.

stevenlele avatar Mar 23 '23 02:03 stevenlele

Works with @artiga033 method.

ChaseKnowlden avatar Jul 14 '23 01:07 ChaseKnowlden

What's keeping this?

Jay-o-Way avatar Jul 31 '23 18:07 Jay-o-Way

I gave this a retest, since I saw it got recent commits. I have a file named "测试.txt" file on my desktop. I search for "ceshi" with Use Pinyin on and I get no results... This is simply not working for me. Am I doing something wrong?

jaimecbernardo avatar Sep 15 '23 07:09 jaimecbernardo

I gave this a retest, since I saw it got recent commits. I have a file named "测试.txt" file on my desktop. I search for "ceshi" with Use Pinyin on and I get no results... This is simply not working for me. Am I doing something wrong?

I've just built this pr myself and did a test where it surely worked.

I guess the reason why it's not working in you case is that PowerToys Run is not configured to search your desktop folder. On my machine by default it's just not searching anything on my desktop whatever the language it is.

So you need to make sure that where you do the test is surely searched. As I mentioned above, the most simple way is just copying and renaming a start menu shotcut.

This is my test result, this time I copied the Word shotcut. pwty_run_pinyin

artiga033 avatar Sep 15 '23 10:09 artiga033

I gave this a retest, since I saw it got recent commits. I have a file named "测试.txt" file on my desktop. I search for "ceshi" with Use Pinyin on and I get no results... This is simply not working for me. Am I doing something wrong?

I've just built this pr myself and did a test where it surely worked.

I guess the reason why it's not working in you case is that PowerToys Run is not configured to search your desktop folder. On my machine by default it's just not searching anything on my desktop whatever the language it is.

So you need to make sure that where you do the test is surely searched. As I mentioned above, the most simple way is just copying and renaming a start menu shotcut.

I see. I've tested with a shortcut and it's working. I think the issue for me here is that it's working for the Program's plugin but not the Search plugin? Because the files appear if I search for "测试" but not for "ceshi"

jaimecbernardo avatar Sep 18 '23 15:09 jaimecbernardo