diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index beae360464..ba6c659ccf 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -295,6 +295,7 @@ codeofconduct codereview COINIT Colorbrush +colorconv colorpicker colorpickerref COLORREF @@ -903,6 +904,8 @@ hresult hrgn HRSRC HSCROLL +hsb +hsi hsl hstring hsv @@ -913,6 +916,7 @@ html htt http hu +hwb HWINEVENTHOOK hwnd HWNDFIRST @@ -1087,6 +1091,7 @@ IPrincipal IProgram IPublic IQuery +IRead IReflect IRegistered IRegistration @@ -1246,6 +1251,7 @@ LOGMSG logon LOGPIXELSX LOn +lookbehind lowlevel lowlevelkb LOWORD @@ -1332,6 +1338,8 @@ memset Mensching MENUITEMINFO menurc +menuitem +MENUITEMINFOW MENUSTART messagebox METACHARSET @@ -1438,6 +1446,7 @@ NCMBUTTONDOWN NCMBUTTONUP NCMOUSELEAVE NCMOUSEMOVE +NCol NCPAINT NCRBUTTONDBLCLK NCRBUTTONDOWN diff --git a/.github/actions/spell-check/patterns.txt b/.github/actions/spell-check/patterns.txt index 60513959e0..e5192cd0c3 100644 --- a/.github/actions/spell-check/patterns.txt +++ b/.github/actions/spell-check/patterns.txt @@ -10,6 +10,11 @@ data:[a-zA-Z=;,/0-9+-]+ "Lorem[^"]+?\." TestCase\("[^"]+" +# Test line with hexadecimal colors +\[DataRow\("[0-9A-F]{6}", \d{3}, \d{3}, \d{3}\)\] +\[DataRow\("[0-9A-F]{6}", \d{3}.\d{1}, \d{3}.\d{1}, \d{3}.\d{1}\)\] +\[DataRow\("[0-9A-F]{6}", "[BCGMRY]\d\d?", \d{3}, \d{3}\)\] + # Windows paths \\native \\notifications diff --git a/installer/PowerToysBootstrapper/bootstrapper/loc/cs/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl b/installer/PowerToysBootstrapper/bootstrapper/loc/cs/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl index 6bcc4709de..2665b211a9 100644 --- a/installer/PowerToysBootstrapper/bootstrapper/loc/cs/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl +++ b/installer/PowerToysBootstrapper/bootstrapper/loc/cs/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl @@ -28,6 +28,276 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/installer/PowerToysBootstrapper/bootstrapper/loc/de/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl b/installer/PowerToysBootstrapper/bootstrapper/loc/de/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl index 0ceb815e69..771214b185 100644 --- a/installer/PowerToysBootstrapper/bootstrapper/loc/de/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl +++ b/installer/PowerToysBootstrapper/bootstrapper/loc/de/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl @@ -28,6 +28,276 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/installer/PowerToysBootstrapper/bootstrapper/loc/fr/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl b/installer/PowerToysBootstrapper/bootstrapper/loc/fr/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl index 68c63c6898..a335bc10cb 100644 --- a/installer/PowerToysBootstrapper/bootstrapper/loc/fr/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl +++ b/installer/PowerToysBootstrapper/bootstrapper/loc/fr/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl @@ -28,6 +28,276 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/installer/PowerToysBootstrapper/bootstrapper/loc/ja/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl b/installer/PowerToysBootstrapper/bootstrapper/loc/ja/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl index 0ea663700a..0737562e17 100644 --- a/installer/PowerToysBootstrapper/bootstrapper/loc/ja/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl +++ b/installer/PowerToysBootstrapper/bootstrapper/loc/ja/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl @@ -28,6 +28,276 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/installer/PowerToysBootstrapper/bootstrapper/loc/ko/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl b/installer/PowerToysBootstrapper/bootstrapper/loc/ko/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl index cb0067fb68..fbb380dbaa 100644 --- a/installer/PowerToysBootstrapper/bootstrapper/loc/ko/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl +++ b/installer/PowerToysBootstrapper/bootstrapper/loc/ko/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl @@ -28,6 +28,276 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/installer/PowerToysBootstrapper/bootstrapper/loc/nl/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl b/installer/PowerToysBootstrapper/bootstrapper/loc/nl/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl index 732cf16cab..a582fd976c 100644 --- a/installer/PowerToysBootstrapper/bootstrapper/loc/nl/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl +++ b/installer/PowerToysBootstrapper/bootstrapper/loc/nl/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl @@ -28,6 +28,276 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/installer/PowerToysBootstrapper/bootstrapper/loc/pl/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl b/installer/PowerToysBootstrapper/bootstrapper/loc/pl/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl index f5a1997401..cda1050b45 100644 --- a/installer/PowerToysBootstrapper/bootstrapper/loc/pl/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl +++ b/installer/PowerToysBootstrapper/bootstrapper/loc/pl/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl @@ -28,6 +28,276 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/installer/PowerToysBootstrapper/bootstrapper/loc/ru/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl b/installer/PowerToysBootstrapper/bootstrapper/loc/ru/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl index 841505881b..c22b646bcd 100644 --- a/installer/PowerToysBootstrapper/bootstrapper/loc/ru/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl +++ b/installer/PowerToysBootstrapper/bootstrapper/loc/ru/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl @@ -28,6 +28,276 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/installer/PowerToysBootstrapper/bootstrapper/loc/sv/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl b/installer/PowerToysBootstrapper/bootstrapper/loc/sv/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl index 506e8580a1..b7fe6dd1fb 100644 --- a/installer/PowerToysBootstrapper/bootstrapper/loc/sv/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl +++ b/installer/PowerToysBootstrapper/bootstrapper/loc/sv/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl @@ -28,6 +28,276 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/installer/PowerToysBootstrapper/bootstrapper/loc/zh-Hans/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl b/installer/PowerToysBootstrapper/bootstrapper/loc/zh-Hans/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl index a1d18ae8d6..1731bcea89 100644 --- a/installer/PowerToysBootstrapper/bootstrapper/loc/zh-Hans/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl +++ b/installer/PowerToysBootstrapper/bootstrapper/loc/zh-Hans/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl @@ -28,6 +28,276 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/installer/PowerToysBootstrapper/bootstrapper/loc/zh-Hant/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl b/installer/PowerToysBootstrapper/bootstrapper/loc/zh-Hant/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl index a8017c3c4b..2c9ef89651 100644 --- a/installer/PowerToysBootstrapper/bootstrapper/loc/zh-Hant/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl +++ b/installer/PowerToysBootstrapper/bootstrapper/loc/zh-Hant/installer/PowerToysBootstrapper/bootstrapper/Resources.resx.lcl @@ -28,6 +28,276 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/action_runner/loc/cs/src/action_runner/Resources.resx.lcl b/src/action_runner/loc/cs/src/action_runner/Resources.resx.lcl new file mode 100644 index 0000000000..c9147c7ac7 --- /dev/null +++ b/src/action_runner/loc/cs/src/action_runner/Resources.resx.lcl @@ -0,0 +1,303 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Startup Settings.]]> + + Nastavení spouštění.]]> + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/action_runner/loc/cs/src/runner/Resources.resx.lcl b/src/action_runner/loc/cs/src/runner/Resources.resx.lcl deleted file mode 100644 index f6d43d2ad5..0000000000 --- a/src/action_runner/loc/cs/src/runner/Resources.resx.lcl +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/action_runner/loc/de/src/runner/Resources.resx.lcl b/src/action_runner/loc/de/src/action_runner/Resources.resx.lcl similarity index 100% rename from src/action_runner/loc/de/src/runner/Resources.resx.lcl rename to src/action_runner/loc/de/src/action_runner/Resources.resx.lcl diff --git a/src/action_runner/loc/es/src/runner/Resources.resx.lcl b/src/action_runner/loc/es/src/action_runner/Resources.resx.lcl similarity index 100% rename from src/action_runner/loc/es/src/runner/Resources.resx.lcl rename to src/action_runner/loc/es/src/action_runner/Resources.resx.lcl diff --git a/src/action_runner/loc/fr/src/runner/Resources.resx.lcl b/src/action_runner/loc/fr/src/action_runner/Resources.resx.lcl similarity index 100% rename from src/action_runner/loc/fr/src/runner/Resources.resx.lcl rename to src/action_runner/loc/fr/src/action_runner/Resources.resx.lcl diff --git a/src/action_runner/loc/hu/src/runner/Resources.resx.lcl b/src/action_runner/loc/hu/src/action_runner/Resources.resx.lcl similarity index 100% rename from src/action_runner/loc/hu/src/runner/Resources.resx.lcl rename to src/action_runner/loc/hu/src/action_runner/Resources.resx.lcl diff --git a/src/action_runner/loc/it/src/runner/Resources.resx.lcl b/src/action_runner/loc/it/src/action_runner/Resources.resx.lcl similarity index 100% rename from src/action_runner/loc/it/src/runner/Resources.resx.lcl rename to src/action_runner/loc/it/src/action_runner/Resources.resx.lcl diff --git a/src/action_runner/loc/ja/src/action_runner/Resources.resx.lcl b/src/action_runner/loc/ja/src/action_runner/Resources.resx.lcl new file mode 100644 index 0000000000..8813a2a087 --- /dev/null +++ b/src/action_runner/loc/ja/src/action_runner/Resources.resx.lcl @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/action_runner/loc/ja/src/runner/Resources.resx.lcl b/src/action_runner/loc/ja/src/runner/Resources.resx.lcl deleted file mode 100644 index f8c5716a14..0000000000 --- a/src/action_runner/loc/ja/src/runner/Resources.resx.lcl +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/action_runner/loc/ko/src/action_runner/Resources.resx.lcl b/src/action_runner/loc/ko/src/action_runner/Resources.resx.lcl new file mode 100644 index 0000000000..c3c4dd4e4e --- /dev/null +++ b/src/action_runner/loc/ko/src/action_runner/Resources.resx.lcl @@ -0,0 +1,303 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Startup Settings.]]> + + 시작 설정을 통해 수동으로 사용하지 않도록 설정되었습니다.]]> + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/action_runner/loc/ko/src/runner/Resources.resx.lcl b/src/action_runner/loc/ko/src/runner/Resources.resx.lcl deleted file mode 100644 index 2974248ca9..0000000000 --- a/src/action_runner/loc/ko/src/runner/Resources.resx.lcl +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/action_runner/loc/nl/src/runner/Resources.resx.lcl b/src/action_runner/loc/nl/src/action_runner/Resources.resx.lcl similarity index 100% rename from src/action_runner/loc/nl/src/runner/Resources.resx.lcl rename to src/action_runner/loc/nl/src/action_runner/Resources.resx.lcl diff --git a/src/action_runner/loc/pl/src/action_runner/Resources.resx.lcl b/src/action_runner/loc/pl/src/action_runner/Resources.resx.lcl new file mode 100644 index 0000000000..b54fa6740c --- /dev/null +++ b/src/action_runner/loc/pl/src/action_runner/Resources.resx.lcl @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/action_runner/loc/pl/src/runner/Resources.resx.lcl b/src/action_runner/loc/pl/src/runner/Resources.resx.lcl deleted file mode 100644 index d7c06f208b..0000000000 --- a/src/action_runner/loc/pl/src/runner/Resources.resx.lcl +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/action_runner/loc/pt-BR/src/runner/Resources.resx.lcl b/src/action_runner/loc/pt-BR/src/action_runner/Resources.resx.lcl similarity index 100% rename from src/action_runner/loc/pt-BR/src/runner/Resources.resx.lcl rename to src/action_runner/loc/pt-BR/src/action_runner/Resources.resx.lcl diff --git a/src/action_runner/loc/pt-PT/src/runner/Resources.resx.lcl b/src/action_runner/loc/pt-PT/src/action_runner/Resources.resx.lcl similarity index 100% rename from src/action_runner/loc/pt-PT/src/runner/Resources.resx.lcl rename to src/action_runner/loc/pt-PT/src/action_runner/Resources.resx.lcl diff --git a/src/action_runner/loc/ru/src/runner/Resources.resx.lcl b/src/action_runner/loc/ru/src/action_runner/Resources.resx.lcl similarity index 100% rename from src/action_runner/loc/ru/src/runner/Resources.resx.lcl rename to src/action_runner/loc/ru/src/action_runner/Resources.resx.lcl diff --git a/src/action_runner/loc/sv/src/runner/Resources.resx.lcl b/src/action_runner/loc/sv/src/action_runner/Resources.resx.lcl similarity index 100% rename from src/action_runner/loc/sv/src/runner/Resources.resx.lcl rename to src/action_runner/loc/sv/src/action_runner/Resources.resx.lcl diff --git a/src/action_runner/loc/tr/src/runner/Resources.resx.lcl b/src/action_runner/loc/tr/src/action_runner/Resources.resx.lcl similarity index 100% rename from src/action_runner/loc/tr/src/runner/Resources.resx.lcl rename to src/action_runner/loc/tr/src/action_runner/Resources.resx.lcl diff --git a/src/action_runner/loc/zh-Hans/src/action_runner/Resources.resx.lcl b/src/action_runner/loc/zh-Hans/src/action_runner/Resources.resx.lcl new file mode 100644 index 0000000000..86212d0b78 --- /dev/null +++ b/src/action_runner/loc/zh-Hans/src/action_runner/Resources.resx.lcl @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/action_runner/loc/zh-Hans/src/runner/Resources.resx.lcl b/src/action_runner/loc/zh-Hans/src/runner/Resources.resx.lcl deleted file mode 100644 index 6443430967..0000000000 --- a/src/action_runner/loc/zh-Hans/src/runner/Resources.resx.lcl +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/action_runner/loc/zh-Hant/src/runner/Resources.resx.lcl b/src/action_runner/loc/zh-Hant/src/action_runner/Resources.resx.lcl similarity index 100% rename from src/action_runner/loc/zh-Hant/src/runner/Resources.resx.lcl rename to src/action_runner/loc/zh-Hant/src/action_runner/Resources.resx.lcl diff --git a/src/core/Microsoft.PowerToys.Settings.UI.Library/ColorPickerProperties.cs b/src/core/Microsoft.PowerToys.Settings.UI.Library/ColorPickerProperties.cs index 7f65789992..f5305f5960 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI.Library/ColorPickerProperties.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI.Library/ColorPickerProperties.cs @@ -4,37 +4,10 @@ using System.Text.Json; using System.Text.Json.Serialization; +using Microsoft.PowerToys.Settings.UI.Library.Enumerations; namespace Microsoft.PowerToys.Settings.UI.Library { - public enum ColorRepresentationType - { - /// - /// Color presentation as hexadecimal color value without the alpha-value (e.g. #0055FF) - /// - HEX = 0, - - /// - /// Color presentation as RGB color value (red[0..255], green[0..255], blue[0..255]) - /// - RGB = 1, - - /// - /// Color presentation as CMYK color value (cyan[0%..100%], magenta[0%..100%], yellow[0%..100%], black key[0%..100%]) - /// - CMYK = 2, - - /// - /// Color presentation as HSL color value (hue[0°..360°], saturation[0..100%], lightness[0%..100%]) - /// - HSL = 3, - - /// - /// Color presentation as HSV color value (hue[0°..360°], saturation[0%..100%], value[0%..100%]) - /// - HSV = 4, - } - public class ColorPickerProperties { public ColorPickerProperties() diff --git a/src/core/Microsoft.PowerToys.Settings.UI.Library/ColorPickerSettings.cs b/src/core/Microsoft.PowerToys.Settings.UI.Library/ColorPickerSettings.cs index 72ebb295c9..a27a1076a3 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI.Library/ColorPickerSettings.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI.Library/ColorPickerSettings.cs @@ -40,14 +40,10 @@ namespace Microsoft.PowerToys.Settings.UI.Library } public string GetModuleName() - { - return Name; - } + => Name; // This can be utilized in the future if the settings.json file is to be modified/deleted. public bool UpgradeSettingsConfiguration() - { - return false; - } + => false; } } diff --git a/src/core/Microsoft.PowerToys.Settings.UI.Library/Enumerations/ColorRepresentationType.cs b/src/core/Microsoft.PowerToys.Settings.UI.Library/Enumerations/ColorRepresentationType.cs new file mode 100644 index 0000000000..9e456dfef6 --- /dev/null +++ b/src/core/Microsoft.PowerToys.Settings.UI.Library/Enumerations/ColorRepresentationType.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.PowerToys.Settings.UI.Library.Enumerations +{ + // NOTE: don't change the order (numbers) of the enumeration entires + + /// + /// The type of the color representation + /// + public enum ColorRepresentationType + { + /// + /// Color presentation as hexadecimal color value without the alpha-value (e.g. #0055FF) + /// + HEX = 0, + + /// + /// Color presentation as RGB color value (red[0..255], green[0..255], blue[0..255]) + /// + RGB = 1, + + /// + /// Color presentation as CMYK color value (cyan[0%..100%], magenta[0%..100%], yellow[0%..100%], black key[0%..100%]) + /// + CMYK = 2, + + /// + /// Color presentation as HSL color value (hue[0°..360°], saturation[0..100%], lightness[0%..100%]) + /// + HSL = 3, + + /// + /// Color presentation as HSV color value (hue[0°..360°], saturation[0%..100%], value[0%..100%]) + /// + HSV = 4, + + /// + /// Color presentation as HSB color value (hue[0°..360°], saturation[0%..100%], brightness[0%..100%]) + /// + HSB = 5, + + /// + /// Color presentation as HSI color value (hue[0°..360°], saturation[0%..100%], intensity[0%..100%]) + /// + HSI = 6, + + /// + /// Color presentation as HWB color value (hue[0°..360°], whiteness[0%..100%], blackness[0%..100%]) + /// + HWB = 7, + + /// + /// Color presentation as natural color (hue, whiteness[0%..100%], blackness[0%..100%]) + /// + NCol = 8, + } +} diff --git a/src/core/Microsoft.PowerToys.Settings.UI.Library/PowerRenameLocalProperties.cs b/src/core/Microsoft.PowerToys.Settings.UI.Library/PowerRenameLocalProperties.cs index 2bed187bcd..5812b2a082 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI.Library/PowerRenameLocalProperties.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI.Library/PowerRenameLocalProperties.cs @@ -16,6 +16,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library MaxMRUSize = 0; ShowIcon = false; ExtendedContextMenuOnly = false; + UseBoostLib = false; } private int _maxSize; @@ -48,6 +49,8 @@ namespace Microsoft.PowerToys.Settings.UI.Library public bool ExtendedContextMenuOnly { get; set; } + public bool UseBoostLib { get; set; } + public string ToJsonString() { return JsonSerializer.Serialize(this); diff --git a/src/core/Microsoft.PowerToys.Settings.UI.Library/PowerRenameProperties.cs b/src/core/Microsoft.PowerToys.Settings.UI.Library/PowerRenameProperties.cs index 1c64f119d3..6cc5bc4b3d 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI.Library/PowerRenameProperties.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI.Library/PowerRenameProperties.cs @@ -15,6 +15,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library MaxMRUSize = new IntProperty(); ShowIcon = new BoolProperty(); ExtendedContextMenuOnly = new BoolProperty(); + UseBoostLib = new BoolProperty(); Enabled = new BoolProperty(); } @@ -34,5 +35,8 @@ namespace Microsoft.PowerToys.Settings.UI.Library [JsonPropertyName("bool_show_extended_menu")] public BoolProperty ExtendedContextMenuOnly { get; set; } + + [JsonPropertyName("bool_use_boost_lib")] + public BoolProperty UseBoostLib { get; set; } } } diff --git a/src/core/Microsoft.PowerToys.Settings.UI.Library/PowerRenameSettings.cs b/src/core/Microsoft.PowerToys.Settings.UI.Library/PowerRenameSettings.cs index be74a62ba1..1673dc2f11 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI.Library/PowerRenameSettings.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI.Library/PowerRenameSettings.cs @@ -35,6 +35,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library Properties.MaxMRUSize.Value = localProperties.MaxMRUSize; Properties.ShowIcon.Value = localProperties.ShowIcon; Properties.ExtendedContextMenuOnly.Value = localProperties.ExtendedContextMenuOnly; + Properties.UseBoostLib.Value = localProperties.UseBoostLib; Version = "1"; Name = ModuleName; diff --git a/src/core/Microsoft.PowerToys.Settings.UI.Library/ViewModels/ColorPickerViewModel.cs b/src/core/Microsoft.PowerToys.Settings.UI.Library/ViewModels/ColorPickerViewModel.cs index ff4f37f612..9d6dce41d6 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI.Library/ViewModels/ColorPickerViewModel.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI.Library/ViewModels/ColorPickerViewModel.cs @@ -3,8 +3,10 @@ // See the LICENSE file in the project root for more information. using System; +using System.Collections.Generic; using System.Globalization; using System.Text.Json; +using Microsoft.PowerToys.Settings.UI.Library.Enumerations; using Microsoft.PowerToys.Settings.UI.Library.Helpers; using Microsoft.PowerToys.Settings.UI.Library.Interfaces; @@ -16,7 +18,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels private readonly ISettingsUtils _settingsUtils; - private ColorPickerSettings _colorPickerSettings; + private readonly ColorPickerSettings _colorPickerSettings; private bool _isEnabled; @@ -30,6 +32,19 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels throw new ArgumentNullException(nameof(settingsRepository)); } + SelectableColorRepresentations = new Dictionary + { + { ColorRepresentationType.CMYK, "CMYK - cmyk(100%, 50%, 75%, 0%)" }, + { ColorRepresentationType.HEX, "HEX - #FFAA00" }, + { ColorRepresentationType.HSB, "HSB - hsb(100, 50%, 75%)" }, + { ColorRepresentationType.HSI, "HSI - hsi(100, 50%, 75%)" }, + { ColorRepresentationType.HSL, "HSL - hsl(100, 50%, 75%)" }, + { ColorRepresentationType.HSV, "HSV - hsv(100, 50%, 75%)" }, + { ColorRepresentationType.HWB, "HWB - hwb(100, 50%, 75%)" }, + { ColorRepresentationType.NCol, "NCol - R10, 50%, 75%" }, + { ColorRepresentationType.RGB, "RGB - rgb(100, 50, 75)" }, + }; + GeneralSettingsConfig = settingsRepository.SettingsConfig; _settingsUtils = settingsUtils ?? throw new ArgumentNullException(nameof(settingsUtils)); @@ -48,13 +63,14 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels SendConfigMSG = ipcMSGCallBackFunc; } + /// + /// Gets a list with all selectable s + /// + public IReadOnlyDictionary SelectableColorRepresentations { get; } + public bool IsEnabled { - get - { - return _isEnabled; - } - + get => _isEnabled; set { if (_isEnabled != value) @@ -64,7 +80,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels // Set the status of ColorPicker in the general settings GeneralSettingsConfig.Enabled.ColorPicker = value; - OutGoingGeneralSettings outgoing = new OutGoingGeneralSettings(GeneralSettingsConfig); + var outgoing = new OutGoingGeneralSettings(GeneralSettingsConfig); SendConfigMSG(outgoing.ToString()); } @@ -73,11 +89,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels public bool ChangeCursor { - get - { - return _colorPickerSettings.Properties.ChangeCursor; - } - + get => _colorPickerSettings.Properties.ChangeCursor; set { if (_colorPickerSettings.Properties.ChangeCursor != value) @@ -91,11 +103,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels public HotkeySettings ActivationShortcut { - get - { - return _colorPickerSettings.Properties.ActivationShortcut; - } - + get => _colorPickerSettings.Properties.ActivationShortcut; set { if (_colorPickerSettings.Properties.ActivationShortcut != value) @@ -107,19 +115,15 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels } } - public int CopiedColorRepresentationIndex + public ColorRepresentationType SelectedColorRepresentationValue { - get - { - return (int)_colorPickerSettings.Properties.CopiedColorRepresentation; - } - + get => _colorPickerSettings.Properties.CopiedColorRepresentation; set { - if (_colorPickerSettings.Properties.CopiedColorRepresentation != (ColorRepresentationType)value) + if (_colorPickerSettings.Properties.CopiedColorRepresentation != value) { - _colorPickerSettings.Properties.CopiedColorRepresentation = (ColorRepresentationType)value; - OnPropertyChanged(nameof(CopiedColorRepresentationIndex)); + _colorPickerSettings.Properties.CopiedColorRepresentation = value; + OnPropertyChanged(nameof(SelectedColorRepresentationValue)); NotifySettingsChanged(); } } diff --git a/src/core/Microsoft.PowerToys.Settings.UI.Library/ViewModels/PowerRenameViewModel.cs b/src/core/Microsoft.PowerToys.Settings.UI.Library/ViewModels/PowerRenameViewModel.cs index 99ef38b1a9..f437a151b6 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI.Library/ViewModels/PowerRenameViewModel.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI.Library/ViewModels/PowerRenameViewModel.cs @@ -67,6 +67,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels _powerRenameRestoreFlagsOnLaunch = Settings.Properties.PersistState.Value; _powerRenameMaxDispListNumValue = Settings.Properties.MaxMRUSize.Value; _autoComplete = Settings.Properties.MRUEnabled.Value; + _powerRenameUseBoostLib = Settings.Properties.UseBoostLib.Value; _powerRenameEnabled = GeneralSettingsConfig.Enabled.PowerRename; } @@ -76,6 +77,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels private bool _powerRenameRestoreFlagsOnLaunch; private int _powerRenameMaxDispListNumValue; private bool _autoComplete; + private bool _powerRenameUseBoostLib; public bool IsEnabled { @@ -199,6 +201,24 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels } } + public bool UseBoostLib + { + get + { + return _powerRenameUseBoostLib; + } + + set + { + if (value != _powerRenameUseBoostLib) + { + _powerRenameUseBoostLib = value; + Settings.Properties.UseBoostLib.Value = value; + RaisePropertyChanged(); + } + } + } + public string GetSettingsSubPath() { return _settingsConfigFileFolder + "\\" + ModuleName; diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw b/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw index d019cbaebf..49a0e14420 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw +++ b/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw @@ -817,4 +817,11 @@ Window behavior + + Behavior + + + Use Boost library (provides extended features but may use different regex syntax) + Boost is a product name, should not be translated + \ No newline at end of file diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Views/ColorPickerPage.xaml b/src/core/Microsoft.PowerToys.Settings.UI/Views/ColorPickerPage.xaml index 7fb9e40c5d..1c9b6333b7 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/Views/ColorPickerPage.xaml +++ b/src/core/Microsoft.PowerToys.Settings.UI/Views/ColorPickerPage.xaml @@ -13,6 +13,95 @@ AutomationProperties.LandmarkType="Main"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -26,109 +115,16 @@ - - + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Views/ColorPickerPage.xaml.cs b/src/core/Microsoft.PowerToys.Settings.UI/Views/ColorPickerPage.xaml.cs index 6d994eedc2..c7a17a3335 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/Views/ColorPickerPage.xaml.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI/Views/ColorPickerPage.xaml.cs @@ -21,5 +21,33 @@ namespace Microsoft.PowerToys.Settings.UI.Views DataContext = ViewModel; InitializeComponent(); } + + /// + /// Event is called when the is completely loaded, inclusive the ItemSource + /// + /// The sender of this event + /// The arguments of this event + private void ColorPicker_ComboBox_Loaded(object sender, Windows.UI.Xaml.RoutedEventArgs e) + { + /** + * UWP hack + * because UWP load the bound ItemSource of the ComboBox asynchronous, + * so after InitializeComponent() the ItemSource is still empty and can't automatically select a entry. + * Selection via SelectedItem and SelectedValue is still not working too + */ + var index = 0; + + foreach (var item in ViewModel.SelectableColorRepresentations) + { + if (item.Key == ViewModel.SelectedColorRepresentationValue) + { + break; + } + + index++; + } + + ColorPicker_ComboBox.SelectedIndex = index; + } } } diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Views/PowerRenamePage.xaml b/src/core/Microsoft.PowerToys.Settings.UI/Views/PowerRenamePage.xaml index 66bb16619e..1429ad2f89 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/Views/PowerRenamePage.xaml +++ b/src/core/Microsoft.PowerToys.Settings.UI/Views/PowerRenamePage.xaml @@ -90,6 +90,15 @@ Margin="0, 17, 0, 0" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.RestoreFlagsOnLaunch}" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/> + + + + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/loc/cs/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl b/src/core/Microsoft.PowerToys.Settings.UI/loc/cs/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl index 645ec990f9..3a011e2db2 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/loc/cs/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl +++ b/src/core/Microsoft.PowerToys.Settings.UI/loc/cs/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl @@ -109,24 +109,6 @@ - - - - - - - - - - - - - - - - - - @@ -136,7 +118,7 @@ - + @@ -154,7 +136,7 @@ - + @@ -190,7 +172,7 @@ - + @@ -237,14 +219,17 @@ - + - + + + + - + @@ -253,7 +238,7 @@ - + @@ -262,7 +247,16 @@ - + + + + + + + + + + @@ -307,30 +301,39 @@ - + - + - + + + + - + - + + + + - + - + - + + + + @@ -361,7 +364,7 @@ - + @@ -433,6 +436,15 @@ + + + + + + + + + @@ -444,10 +456,13 @@ - + - + + + + @@ -460,7 +475,7 @@ - + @@ -469,7 +484,7 @@ - + @@ -541,7 +556,7 @@ - + @@ -550,7 +565,7 @@ - + @@ -559,7 +574,7 @@ - + @@ -595,7 +610,7 @@ - + @@ -604,7 +619,7 @@ - + @@ -613,7 +628,7 @@ - + @@ -696,10 +711,13 @@ - + - + + + + @@ -856,7 +874,7 @@ - + @@ -1081,7 +1099,7 @@ - + @@ -1090,7 +1108,7 @@ - + @@ -1099,7 +1117,7 @@ - + @@ -1189,6 +1207,15 @@ + + + + + + + + + @@ -1216,7 +1243,7 @@ - + @@ -1297,7 +1324,7 @@ - + @@ -1333,7 +1360,7 @@ - + @@ -1342,12 +1369,15 @@ - + - + - + + + + @@ -1407,14 +1437,17 @@ - + - + + + + - + @@ -1441,7 +1474,7 @@ - + @@ -1585,6 +1618,15 @@ + + + + + + + + + @@ -1603,7 +1645,7 @@ - + @@ -1621,7 +1663,7 @@ - + @@ -1666,6 +1708,12 @@ + + + + + + @@ -1693,7 +1741,7 @@ - + @@ -1702,7 +1750,7 @@ - + @@ -1711,7 +1759,7 @@ - + @@ -1738,7 +1786,16 @@ - + + + + + + + + + + @@ -1813,15 +1870,6 @@ - - - - - - - - - @@ -1876,7 +1924,7 @@ - + @@ -1921,7 +1969,7 @@ - + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/loc/de/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl b/src/core/Microsoft.PowerToys.Settings.UI/loc/de/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl index 6a172bd48e..534ce63a4c 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/loc/de/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl +++ b/src/core/Microsoft.PowerToys.Settings.UI/loc/de/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl @@ -118,7 +118,7 @@ - + @@ -136,7 +136,7 @@ - + @@ -172,7 +172,7 @@ - + @@ -219,14 +219,17 @@ - + - + + + + - + @@ -235,7 +238,7 @@ - + @@ -244,7 +247,16 @@ - + + + + + + + + + + @@ -289,30 +301,39 @@ - + - + - + + + + - + - + + + + - + - + - + + + + @@ -343,7 +364,7 @@ - + @@ -415,6 +436,15 @@ + + + + + + + + + @@ -426,10 +456,13 @@ - + - + + + + @@ -442,7 +475,7 @@ - + @@ -451,7 +484,7 @@ - + @@ -523,7 +556,7 @@ - + @@ -532,7 +565,7 @@ - + @@ -541,7 +574,7 @@ - + @@ -577,7 +610,7 @@ - + @@ -586,7 +619,7 @@ - + @@ -595,7 +628,7 @@ - + @@ -678,10 +711,13 @@ - + - + + + + @@ -838,7 +874,7 @@ - + @@ -1063,7 +1099,7 @@ - + @@ -1072,7 +1108,7 @@ - + @@ -1081,7 +1117,7 @@ - + @@ -1171,6 +1207,15 @@ + + + + + + + + + @@ -1198,7 +1243,7 @@ - + @@ -1279,7 +1324,7 @@ - + @@ -1315,7 +1360,7 @@ - + @@ -1324,12 +1369,15 @@ - + - + - + + + + @@ -1389,14 +1437,17 @@ - + - + + + + - + @@ -1423,7 +1474,7 @@ - + @@ -1567,6 +1618,15 @@ + + + + + + + + + @@ -1585,7 +1645,7 @@ - + @@ -1603,7 +1663,7 @@ - + @@ -1648,6 +1708,12 @@ + + + + + + @@ -1675,7 +1741,7 @@ - + @@ -1720,7 +1786,16 @@ - + + + + + + + + + + @@ -1849,7 +1924,7 @@ - + @@ -1894,7 +1969,7 @@ - + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/loc/es/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl b/src/core/Microsoft.PowerToys.Settings.UI/loc/es/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl index 76942ed249..c76829a878 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/loc/es/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl +++ b/src/core/Microsoft.PowerToys.Settings.UI/loc/es/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl @@ -23,7 +23,7 @@ - + @@ -109,24 +109,6 @@ - - - - - - - - - - - - - - - - - - @@ -136,7 +118,7 @@ - + @@ -154,7 +136,7 @@ - + @@ -190,7 +172,7 @@ - + @@ -237,14 +219,17 @@ - - + + + + + - + @@ -253,7 +238,7 @@ - + @@ -262,11 +247,20 @@ - + + + + + + + + + + - + @@ -307,30 +301,39 @@ - + - - + + + + + - - + + + + + - + - - + + + + + @@ -361,7 +364,7 @@ - + @@ -433,6 +436,12 @@ + + + + + + @@ -444,10 +453,13 @@ - - + + + + + @@ -460,16 +472,16 @@ - + - + - + @@ -541,7 +553,7 @@ - + @@ -550,7 +562,7 @@ - + @@ -559,7 +571,7 @@ - + @@ -595,7 +607,7 @@ - + @@ -604,7 +616,7 @@ - + @@ -613,7 +625,7 @@ - + @@ -696,10 +708,13 @@ - - + + + + + @@ -856,7 +871,7 @@ - + @@ -1081,7 +1096,7 @@ - + @@ -1090,7 +1105,7 @@ - + @@ -1099,7 +1114,7 @@ - + @@ -1189,6 +1204,12 @@ + + + + + + @@ -1216,7 +1237,7 @@ - + @@ -1297,7 +1318,7 @@ - + @@ -1333,7 +1354,7 @@ - + @@ -1342,12 +1363,15 @@ - + - + - + + + + @@ -1407,14 +1431,17 @@ - - + + + + + - + @@ -1441,7 +1468,7 @@ - + @@ -1585,6 +1612,15 @@ + + + + + + + + + @@ -1603,7 +1639,7 @@ - + @@ -1621,7 +1657,7 @@ - + @@ -1666,6 +1702,12 @@ + + + + + + @@ -1693,7 +1735,7 @@ - + @@ -1702,7 +1744,7 @@ - + @@ -1711,7 +1753,7 @@ - + @@ -1738,7 +1780,16 @@ - + + + + + + + + + + @@ -1781,7 +1832,7 @@ - + @@ -1813,15 +1864,6 @@ - - - - - - - - - @@ -1876,7 +1918,7 @@ - + @@ -1921,7 +1963,7 @@ - + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/loc/fr/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl b/src/core/Microsoft.PowerToys.Settings.UI/loc/fr/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl index 5c2c8ff25b..088c108ede 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/loc/fr/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl +++ b/src/core/Microsoft.PowerToys.Settings.UI/loc/fr/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl @@ -109,24 +109,6 @@ - - - - - - - - - - - - - - - - - - @@ -136,7 +118,7 @@ - + @@ -154,7 +136,7 @@ - + @@ -190,7 +172,7 @@ - + @@ -237,14 +219,17 @@ - + - + + + + - + @@ -253,7 +238,7 @@ - + @@ -262,7 +247,16 @@ - + + + + + + + + + + @@ -307,30 +301,39 @@ - + - + - + + + + - + - + + + + - + - + - + + + + @@ -361,7 +364,7 @@ - + @@ -433,6 +436,15 @@ + + + + + + + + + @@ -444,10 +456,13 @@ - + - + + + + @@ -460,7 +475,7 @@ - + @@ -469,7 +484,7 @@ - + @@ -541,7 +556,7 @@ - + @@ -550,7 +565,7 @@ - + @@ -559,7 +574,7 @@ - + @@ -595,7 +610,7 @@ - + @@ -604,7 +619,7 @@ - + @@ -613,7 +628,7 @@ - + @@ -696,10 +711,13 @@ - + - + + + + @@ -856,7 +874,7 @@ - + @@ -1081,7 +1099,7 @@ - + @@ -1090,7 +1108,7 @@ - + @@ -1099,7 +1117,7 @@ - + @@ -1189,6 +1207,15 @@ + + + + + + + + + @@ -1216,7 +1243,7 @@ - + @@ -1297,7 +1324,7 @@ - + @@ -1333,7 +1360,7 @@ - + @@ -1342,12 +1369,15 @@ - + - + - + + + + @@ -1407,14 +1437,17 @@ - + - + + + + - + @@ -1441,7 +1474,7 @@ - + @@ -1585,6 +1618,15 @@ + + + + + + + + + @@ -1603,7 +1645,7 @@ - + @@ -1621,7 +1663,7 @@ - + @@ -1666,6 +1708,12 @@ + + + + + + @@ -1693,7 +1741,7 @@ - + @@ -1702,7 +1750,7 @@ - + @@ -1711,7 +1759,7 @@ - + @@ -1738,7 +1786,16 @@ - + + + + + + + + + + @@ -1813,15 +1870,6 @@ - - - - - - - - - @@ -1876,7 +1924,7 @@ - + @@ -1921,7 +1969,7 @@ - + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/loc/hu/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl b/src/core/Microsoft.PowerToys.Settings.UI/loc/hu/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl index 11a3d1d736..650534f90a 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/loc/hu/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl +++ b/src/core/Microsoft.PowerToys.Settings.UI/loc/hu/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl @@ -118,7 +118,7 @@ - + @@ -136,7 +136,7 @@ - + @@ -172,7 +172,7 @@ - + @@ -219,14 +219,17 @@ - - + + + + + - + @@ -235,7 +238,7 @@ - + @@ -244,7 +247,16 @@ - + + + + + + + + + + @@ -289,30 +301,39 @@ - + - - + + + + + - - + + + + + - + - - + + + + + @@ -343,7 +364,7 @@ - + @@ -415,6 +436,12 @@ + + + + + + @@ -426,10 +453,13 @@ - - + + + + + @@ -442,7 +472,7 @@ - + @@ -451,7 +481,7 @@ - + @@ -523,7 +553,7 @@ - + @@ -532,7 +562,7 @@ - + @@ -541,7 +571,7 @@ - + @@ -577,7 +607,7 @@ - + @@ -586,7 +616,7 @@ - + @@ -595,7 +625,7 @@ - + @@ -678,10 +708,13 @@ - - + + + + + @@ -838,7 +871,7 @@ - + @@ -1063,7 +1096,7 @@ - + @@ -1072,7 +1105,7 @@ - + @@ -1081,7 +1114,7 @@ - + @@ -1171,6 +1204,12 @@ + + + + + + @@ -1198,7 +1237,7 @@ - + @@ -1279,7 +1318,7 @@ - + @@ -1315,7 +1354,7 @@ - + @@ -1324,12 +1363,15 @@ - + - + - + + + + @@ -1389,14 +1431,17 @@ - - + + + + + - + @@ -1423,7 +1468,7 @@ - + @@ -1567,6 +1612,15 @@ + + + + + + + + + @@ -1585,7 +1639,7 @@ - + @@ -1603,7 +1657,7 @@ - + @@ -1648,6 +1702,12 @@ + + + + + + @@ -1675,7 +1735,7 @@ - + @@ -1720,7 +1780,16 @@ - + + + + + + + + + + @@ -1849,7 +1918,7 @@ - + @@ -1894,7 +1963,7 @@ - + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/loc/it/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl b/src/core/Microsoft.PowerToys.Settings.UI/loc/it/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl index ced1cf6ecb..375abcb9b0 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/loc/it/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl +++ b/src/core/Microsoft.PowerToys.Settings.UI/loc/it/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl @@ -1618,6 +1618,16 @@ + + + + + + + + + + @@ -1699,6 +1709,15 @@ + + + + + + + + + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/loc/ja/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl b/src/core/Microsoft.PowerToys.Settings.UI/loc/ja/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl index ec94f042b9..11ceea590f 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/loc/ja/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl +++ b/src/core/Microsoft.PowerToys.Settings.UI/loc/ja/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl @@ -118,7 +118,7 @@ - + @@ -136,7 +136,7 @@ - + @@ -172,7 +172,7 @@ - + @@ -219,14 +219,17 @@ - + - + + + + - + @@ -235,7 +238,7 @@ - + @@ -244,7 +247,16 @@ - + + + + + + + + + + @@ -289,30 +301,39 @@ - + - + - + + + + - + - + + + + - + - + - + + + + @@ -343,7 +364,7 @@ - + @@ -415,6 +436,15 @@ + + + + + + + + + @@ -426,10 +456,13 @@ - + - + + + + @@ -442,7 +475,7 @@ - + @@ -451,7 +484,7 @@ - + @@ -523,7 +556,7 @@ - + @@ -532,7 +565,7 @@ - + @@ -541,7 +574,7 @@ - + @@ -577,7 +610,7 @@ - + @@ -586,7 +619,7 @@ - + @@ -595,7 +628,7 @@ - + @@ -678,10 +711,13 @@ - + - + + + + @@ -838,7 +874,7 @@ - + @@ -1063,7 +1099,7 @@ - + @@ -1072,7 +1108,7 @@ - + @@ -1081,7 +1117,7 @@ - + @@ -1171,6 +1207,15 @@ + + + + + + + + + @@ -1198,7 +1243,7 @@ - + @@ -1279,7 +1324,7 @@ - + @@ -1315,7 +1360,7 @@ - + @@ -1324,12 +1369,15 @@ - + - + - + + + + @@ -1389,14 +1437,17 @@ - + - + + + + - + @@ -1423,7 +1474,7 @@ - + @@ -1567,6 +1618,15 @@ + + + + + + + + + @@ -1585,7 +1645,7 @@ - + @@ -1603,7 +1663,7 @@ - + @@ -1648,6 +1708,12 @@ + + + + + + @@ -1675,7 +1741,7 @@ - + @@ -1720,7 +1786,16 @@ - + + + + + + + + + + @@ -1849,7 +1924,7 @@ - + @@ -1894,7 +1969,7 @@ - + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/loc/ko/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl b/src/core/Microsoft.PowerToys.Settings.UI/loc/ko/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl index bd437fb3bf..290114a6fa 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/loc/ko/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl +++ b/src/core/Microsoft.PowerToys.Settings.UI/loc/ko/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl @@ -118,7 +118,7 @@ - + @@ -136,7 +136,7 @@ - + @@ -172,7 +172,7 @@ - + @@ -219,14 +219,17 @@ - + - + + + + - + @@ -235,7 +238,7 @@ - + @@ -244,7 +247,16 @@ - + + + + + + + + + + @@ -289,30 +301,39 @@ - + - + - + + + + - + - + + + + - + - + - + + + + @@ -343,7 +364,7 @@ - + @@ -383,7 +404,7 @@ - + @@ -415,6 +436,15 @@ + + + + + + + + + @@ -426,10 +456,13 @@ - + - + + + + @@ -437,12 +470,12 @@ - + - + @@ -451,7 +484,7 @@ - + @@ -523,7 +556,7 @@ - + @@ -532,7 +565,7 @@ - + @@ -541,7 +574,7 @@ - + @@ -577,7 +610,7 @@ - + @@ -586,7 +619,7 @@ - + @@ -595,7 +628,7 @@ - + @@ -678,10 +711,13 @@ - + - + + + + @@ -838,7 +874,7 @@ - + @@ -1063,7 +1099,7 @@ - + @@ -1072,7 +1108,7 @@ - + @@ -1081,7 +1117,7 @@ - + @@ -1171,6 +1207,15 @@ + + + + + + + + + @@ -1198,7 +1243,7 @@ - + @@ -1279,7 +1324,7 @@ - + @@ -1315,7 +1360,7 @@ - + @@ -1324,12 +1369,15 @@ - + - + - + + + + @@ -1389,14 +1437,17 @@ - + - + + + + - + @@ -1423,7 +1474,7 @@ - + @@ -1567,6 +1618,15 @@ + + + + + + + + + @@ -1585,7 +1645,7 @@ - + @@ -1603,7 +1663,7 @@ - + @@ -1648,6 +1708,12 @@ + + + + + + @@ -1675,7 +1741,7 @@ - + @@ -1720,7 +1786,16 @@ - + + + + + + + + + + @@ -1849,7 +1924,7 @@ - + @@ -1894,7 +1969,7 @@ - + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/loc/nl/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl b/src/core/Microsoft.PowerToys.Settings.UI/loc/nl/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl index 7124408af1..8c046852c0 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/loc/nl/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl +++ b/src/core/Microsoft.PowerToys.Settings.UI/loc/nl/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl @@ -118,7 +118,7 @@ - + @@ -136,7 +136,7 @@ - + @@ -172,7 +172,7 @@ - + @@ -219,14 +219,17 @@ - + - + + + + - + @@ -235,7 +238,7 @@ - + @@ -244,7 +247,16 @@ - + + + + + + + + + + @@ -289,30 +301,39 @@ - + - + - + + + + - + - + + + + - + - + - + + + + @@ -343,7 +364,7 @@ - + @@ -415,6 +436,15 @@ + + + + + + + + + @@ -426,10 +456,13 @@ - + - + + + + @@ -442,7 +475,7 @@ - + @@ -451,7 +484,7 @@ - + @@ -523,7 +556,7 @@ - + @@ -532,7 +565,7 @@ - + @@ -541,7 +574,7 @@ - + @@ -577,7 +610,7 @@ - + @@ -586,7 +619,7 @@ - + @@ -595,7 +628,7 @@ - + @@ -678,10 +711,13 @@ - + - + + + + @@ -838,7 +874,7 @@ - + @@ -1063,7 +1099,7 @@ - + @@ -1072,7 +1108,7 @@ - + @@ -1081,7 +1117,7 @@ - + @@ -1171,6 +1207,15 @@ + + + + + + + + + @@ -1198,7 +1243,7 @@ - + @@ -1279,7 +1324,7 @@ - + @@ -1315,7 +1360,7 @@ - + @@ -1324,12 +1369,15 @@ - + - + - + + + + @@ -1389,14 +1437,17 @@ - + - + + + + - + @@ -1423,7 +1474,7 @@ - + @@ -1567,6 +1618,15 @@ + + + + + + + + + @@ -1585,7 +1645,7 @@ - + @@ -1603,7 +1663,7 @@ - + @@ -1648,6 +1708,12 @@ + + + + + + @@ -1675,7 +1741,7 @@ - + @@ -1720,7 +1786,16 @@ - + + + + + + + + + + @@ -1849,7 +1924,7 @@ - + @@ -1894,7 +1969,7 @@ - + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/loc/pl/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl b/src/core/Microsoft.PowerToys.Settings.UI/loc/pl/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl index db40066ade..71f2875ce9 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/loc/pl/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl +++ b/src/core/Microsoft.PowerToys.Settings.UI/loc/pl/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl @@ -23,7 +23,7 @@ - + @@ -118,7 +118,7 @@ - + @@ -136,7 +136,7 @@ - + @@ -172,7 +172,7 @@ - + @@ -219,14 +219,17 @@ - + - + + + + - + @@ -235,7 +238,7 @@ - + @@ -244,11 +247,20 @@ - + + + + + + + + + + - + @@ -289,30 +301,39 @@ - + - + - + + + + - + - + + + + - + - + - + + + + @@ -343,7 +364,7 @@ - + @@ -415,6 +436,15 @@ + + + + + + + + + @@ -426,10 +456,13 @@ - + - + + + + @@ -442,16 +475,16 @@ - + - + - + @@ -523,7 +556,7 @@ - + @@ -532,7 +565,7 @@ - + @@ -541,7 +574,7 @@ - + @@ -577,7 +610,7 @@ - + @@ -586,7 +619,7 @@ - + @@ -595,7 +628,7 @@ - + @@ -678,10 +711,13 @@ - + - + + + + @@ -838,7 +874,7 @@ - + @@ -1063,7 +1099,7 @@ - + @@ -1072,7 +1108,7 @@ - + @@ -1081,7 +1117,7 @@ - + @@ -1171,6 +1207,15 @@ + + + + + + + + + @@ -1198,7 +1243,7 @@ - + @@ -1279,7 +1324,7 @@ - + @@ -1315,7 +1360,7 @@ - + @@ -1324,12 +1369,15 @@ - + - + - + + + + @@ -1389,14 +1437,17 @@ - + - + + + + - + @@ -1423,7 +1474,7 @@ - + @@ -1567,6 +1618,15 @@ + + + + + + + + + @@ -1585,7 +1645,7 @@ - + @@ -1603,7 +1663,7 @@ - + @@ -1648,6 +1708,12 @@ + + + + + + @@ -1675,7 +1741,7 @@ - + @@ -1720,7 +1786,16 @@ - + + + + + + + + + + @@ -1763,7 +1838,7 @@ - + @@ -1849,7 +1924,7 @@ - + @@ -1894,7 +1969,7 @@ - + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/loc/pt-BR/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl b/src/core/Microsoft.PowerToys.Settings.UI/loc/pt-BR/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl index 1747bcd139..6ee41d25ea 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/loc/pt-BR/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl +++ b/src/core/Microsoft.PowerToys.Settings.UI/loc/pt-BR/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl @@ -118,7 +118,7 @@ - + @@ -136,7 +136,7 @@ - + @@ -172,7 +172,7 @@ - + @@ -219,14 +219,17 @@ - - + + + + + - + @@ -235,7 +238,7 @@ - + @@ -244,7 +247,16 @@ - + + + + + + + + + + @@ -289,30 +301,39 @@ - + - - + + + + + - - + + + + + - + - - + + + + + @@ -343,7 +364,7 @@ - + @@ -415,6 +436,12 @@ + + + + + + @@ -426,10 +453,13 @@ - - + + + + + @@ -442,7 +472,7 @@ - + @@ -451,7 +481,7 @@ - + @@ -523,7 +553,7 @@ - + @@ -532,7 +562,7 @@ - + @@ -541,7 +571,7 @@ - + @@ -577,7 +607,7 @@ - + @@ -586,7 +616,7 @@ - + @@ -595,7 +625,7 @@ - + @@ -678,10 +708,13 @@ - - + + + + + @@ -838,7 +871,7 @@ - + @@ -1063,7 +1096,7 @@ - + @@ -1072,7 +1105,7 @@ - + @@ -1081,7 +1114,7 @@ - + @@ -1171,6 +1204,12 @@ + + + + + + @@ -1198,7 +1237,7 @@ - + @@ -1279,7 +1318,7 @@ - + @@ -1315,7 +1354,7 @@ - + @@ -1324,12 +1363,15 @@ - + - + - + + + + @@ -1389,14 +1431,17 @@ - - + + + + + - + @@ -1423,7 +1468,7 @@ - + @@ -1567,6 +1612,15 @@ + + + + + + + + + @@ -1585,7 +1639,7 @@ - + @@ -1603,7 +1657,7 @@ - + @@ -1648,6 +1702,12 @@ + + + + + + @@ -1675,7 +1735,7 @@ - + @@ -1720,7 +1780,16 @@ - + + + + + + + + + + @@ -1849,7 +1918,7 @@ - + @@ -1894,7 +1963,7 @@ - + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/loc/pt-PT/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl b/src/core/Microsoft.PowerToys.Settings.UI/loc/pt-PT/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl index 3ba8d0de62..8eb25d9cb0 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/loc/pt-PT/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl +++ b/src/core/Microsoft.PowerToys.Settings.UI/loc/pt-PT/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl @@ -23,7 +23,7 @@ - + @@ -118,7 +118,7 @@ - + @@ -136,7 +136,7 @@ - + @@ -172,7 +172,7 @@ - + @@ -219,14 +219,17 @@ - - + + + + + - + @@ -235,7 +238,7 @@ - + @@ -244,11 +247,20 @@ - + + + + + + + + + + - + @@ -289,30 +301,39 @@ - + - - + + + + + - - + + + + + - + - - + + + + + @@ -343,7 +364,7 @@ - + @@ -415,6 +436,12 @@ + + + + + + @@ -426,10 +453,13 @@ - - + + + + + @@ -442,16 +472,16 @@ - + - + - + @@ -523,7 +553,7 @@ - + @@ -532,7 +562,7 @@ - + @@ -541,7 +571,7 @@ - + @@ -577,7 +607,7 @@ - + @@ -586,7 +616,7 @@ - + @@ -595,7 +625,7 @@ - + @@ -678,10 +708,13 @@ - - + + + + + @@ -838,7 +871,7 @@ - + @@ -1063,7 +1096,7 @@ - + @@ -1072,7 +1105,7 @@ - + @@ -1081,7 +1114,7 @@ - + @@ -1171,6 +1204,12 @@ + + + + + + @@ -1198,7 +1237,7 @@ - + @@ -1279,7 +1318,7 @@ - + @@ -1315,7 +1354,7 @@ - + @@ -1324,12 +1363,15 @@ - + - + - + + + + @@ -1389,14 +1431,17 @@ - - + + + + + - + @@ -1423,7 +1468,7 @@ - + @@ -1567,6 +1612,15 @@ + + + + + + + + + @@ -1585,7 +1639,7 @@ - + @@ -1603,7 +1657,7 @@ - + @@ -1648,6 +1702,12 @@ + + + + + + @@ -1675,7 +1735,7 @@ - + @@ -1720,7 +1780,16 @@ - + + + + + + + + + + @@ -1763,7 +1832,7 @@ - + @@ -1849,7 +1918,7 @@ - + @@ -1894,7 +1963,7 @@ - + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/loc/ru/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl b/src/core/Microsoft.PowerToys.Settings.UI/loc/ru/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl index 1441f1d400..9375920ba8 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/loc/ru/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl +++ b/src/core/Microsoft.PowerToys.Settings.UI/loc/ru/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl @@ -109,24 +109,6 @@ - - - - - - - - - - - - - - - - - - @@ -136,7 +118,7 @@ - + @@ -154,7 +136,7 @@ - + @@ -190,7 +172,7 @@ - + @@ -237,14 +219,17 @@ - + - + + + + - + @@ -253,7 +238,7 @@ - + @@ -262,7 +247,16 @@ - + + + + + + + + + + @@ -307,30 +301,39 @@ - + - + - + + + + - + - + + + + - + - + - + + + + @@ -361,7 +364,7 @@ - + @@ -433,6 +436,15 @@ + + + + + + + + + @@ -444,10 +456,13 @@ - + - + + + + @@ -460,7 +475,7 @@ - + @@ -469,7 +484,7 @@ - + @@ -541,7 +556,7 @@ - + @@ -550,7 +565,7 @@ - + @@ -559,7 +574,7 @@ - + @@ -595,7 +610,7 @@ - + @@ -604,7 +619,7 @@ - + @@ -613,7 +628,7 @@ - + @@ -696,10 +711,13 @@ - + - + + + + @@ -856,7 +874,7 @@ - + @@ -1081,7 +1099,7 @@ - + @@ -1090,7 +1108,7 @@ - + @@ -1099,7 +1117,7 @@ - + @@ -1189,6 +1207,15 @@ + + + + + + + + + @@ -1216,7 +1243,7 @@ - + @@ -1297,7 +1324,7 @@ - + @@ -1333,7 +1360,7 @@ - + @@ -1342,12 +1369,15 @@ - + - + - + + + + @@ -1407,14 +1437,17 @@ - + - + + + + - + @@ -1441,7 +1474,7 @@ - + @@ -1585,6 +1618,15 @@ + + + + + + + + + @@ -1603,7 +1645,7 @@ - + @@ -1621,7 +1663,7 @@ - + @@ -1666,6 +1708,12 @@ + + + + + + @@ -1693,7 +1741,7 @@ - + @@ -1702,7 +1750,7 @@ - + @@ -1711,7 +1759,7 @@ - + @@ -1738,7 +1786,7 @@ - + @@ -1747,6 +1795,15 @@ + + + + + + + + + @@ -1813,15 +1870,6 @@ - - - - - - - - - @@ -1876,7 +1924,7 @@ - + @@ -1921,7 +1969,7 @@ - + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/loc/sv/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl b/src/core/Microsoft.PowerToys.Settings.UI/loc/sv/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl index 9eeb7fc5db..f839614ba7 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/loc/sv/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl +++ b/src/core/Microsoft.PowerToys.Settings.UI/loc/sv/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl @@ -109,24 +109,6 @@ - - - - - - - - - - - - - - - - - - @@ -136,7 +118,7 @@ - + @@ -154,7 +136,7 @@ - + @@ -190,7 +172,7 @@ - + @@ -237,14 +219,17 @@ - + - + + + + - + @@ -253,7 +238,7 @@ - + @@ -262,7 +247,16 @@ - + + + + + + + + + + @@ -307,30 +301,39 @@ - + - + - + + + + - + - + + + + - + - + - + + + + @@ -361,7 +364,7 @@ - + @@ -433,6 +436,15 @@ + + + + + + + + + @@ -444,10 +456,13 @@ - + - + + + + @@ -460,7 +475,7 @@ - + @@ -469,7 +484,7 @@ - + @@ -541,7 +556,7 @@ - + @@ -550,7 +565,7 @@ - + @@ -559,7 +574,7 @@ - + @@ -595,7 +610,7 @@ - + @@ -604,7 +619,7 @@ - + @@ -613,7 +628,7 @@ - + @@ -696,10 +711,13 @@ - + - + + + + @@ -856,7 +874,7 @@ - + @@ -1081,7 +1099,7 @@ - + @@ -1090,7 +1108,7 @@ - + @@ -1099,7 +1117,7 @@ - + @@ -1189,6 +1207,15 @@ + + + + + + + + + @@ -1216,7 +1243,7 @@ - + @@ -1297,7 +1324,7 @@ - + @@ -1333,7 +1360,7 @@ - + @@ -1342,12 +1369,15 @@ - + - + - + + + + @@ -1407,14 +1437,17 @@ - + - + + + + - + @@ -1441,7 +1474,7 @@ - + @@ -1585,6 +1618,15 @@ + + + + + + + + + @@ -1603,7 +1645,7 @@ - + @@ -1621,7 +1663,7 @@ - + @@ -1666,6 +1708,12 @@ + + + + + + @@ -1693,7 +1741,7 @@ - + @@ -1702,7 +1750,7 @@ - + @@ -1711,7 +1759,7 @@ - + @@ -1738,7 +1786,16 @@ - + + + + + + + + + + @@ -1813,15 +1870,6 @@ - - - - - - - - - @@ -1876,7 +1924,7 @@ - + @@ -1921,7 +1969,7 @@ - + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/loc/tr/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl b/src/core/Microsoft.PowerToys.Settings.UI/loc/tr/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl index d364ef53ee..d1cdd54899 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/loc/tr/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl +++ b/src/core/Microsoft.PowerToys.Settings.UI/loc/tr/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl @@ -118,7 +118,7 @@ - + @@ -136,7 +136,7 @@ - + @@ -172,7 +172,7 @@ - + @@ -219,14 +219,17 @@ - - + + + + + - + @@ -235,7 +238,7 @@ - + @@ -244,7 +247,16 @@ - + + + + + + + + + + @@ -289,30 +301,39 @@ - + - - + + + + + - - + + + + + - + - - + + + + + @@ -343,7 +364,7 @@ - + @@ -415,6 +436,12 @@ + + + + + + @@ -426,10 +453,13 @@ - - + + + + + @@ -442,7 +472,7 @@ - + @@ -451,7 +481,7 @@ - + @@ -523,7 +553,7 @@ - + @@ -532,7 +562,7 @@ - + @@ -541,7 +571,7 @@ - + @@ -577,7 +607,7 @@ - + @@ -586,7 +616,7 @@ - + @@ -595,7 +625,7 @@ - + @@ -678,10 +708,13 @@ - - + + + + + @@ -838,7 +871,7 @@ - + @@ -1063,7 +1096,7 @@ - + @@ -1072,7 +1105,7 @@ - + @@ -1081,7 +1114,7 @@ - + @@ -1171,6 +1204,12 @@ + + + + + + @@ -1198,7 +1237,7 @@ - + @@ -1279,7 +1318,7 @@ - + @@ -1315,7 +1354,7 @@ - + @@ -1324,12 +1363,15 @@ - + - + - + + + + @@ -1389,14 +1431,17 @@ - - + + + + + - + @@ -1423,7 +1468,7 @@ - + @@ -1567,6 +1612,15 @@ + + + + + + + + + @@ -1585,7 +1639,7 @@ - + @@ -1603,7 +1657,7 @@ - + @@ -1648,6 +1702,12 @@ + + + + + + @@ -1675,7 +1735,7 @@ - + @@ -1720,7 +1780,16 @@ - + + + + + + + + + + @@ -1849,7 +1918,7 @@ - + @@ -1894,7 +1963,7 @@ - + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/loc/zh-Hans/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl b/src/core/Microsoft.PowerToys.Settings.UI/loc/zh-Hans/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl index 3fd8808c47..5e25d61ee8 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/loc/zh-Hans/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl +++ b/src/core/Microsoft.PowerToys.Settings.UI/loc/zh-Hans/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl @@ -109,24 +109,6 @@ - - - - - - - - - - - - - - - - - - @@ -136,7 +118,7 @@ - + @@ -154,7 +136,7 @@ - + @@ -190,7 +172,7 @@ - + @@ -237,14 +219,17 @@ - + - + + + + - + @@ -253,7 +238,7 @@ - + @@ -262,7 +247,16 @@ - + + + + + + + + + + @@ -307,30 +301,39 @@ - + - + - + + + + - + - + + + + - + - + - + + + + @@ -361,7 +364,7 @@ - + @@ -433,6 +436,15 @@ + + + + + + + + + @@ -444,10 +456,13 @@ - + - + + + + @@ -460,7 +475,7 @@ - + @@ -469,7 +484,7 @@ - + @@ -541,7 +556,7 @@ - + @@ -550,7 +565,7 @@ - + @@ -559,7 +574,7 @@ - + @@ -595,7 +610,7 @@ - + @@ -604,7 +619,7 @@ - + @@ -613,7 +628,7 @@ - + @@ -696,10 +711,13 @@ - + - + + + + @@ -856,7 +874,7 @@ - + @@ -1081,7 +1099,7 @@ - + @@ -1090,7 +1108,7 @@ - + @@ -1099,7 +1117,7 @@ - + @@ -1189,6 +1207,15 @@ + + + + + + + + + @@ -1216,7 +1243,7 @@ - + @@ -1297,7 +1324,7 @@ - + @@ -1333,7 +1360,7 @@ - + @@ -1342,12 +1369,15 @@ - + - + - + + + + @@ -1407,14 +1437,17 @@ - + - + + + + - + @@ -1441,7 +1474,7 @@ - + @@ -1585,6 +1618,15 @@ + + + + + + + + + @@ -1603,7 +1645,7 @@ - + @@ -1621,7 +1663,7 @@ - + @@ -1666,6 +1708,12 @@ + + + + + + @@ -1693,7 +1741,7 @@ - + @@ -1702,7 +1750,7 @@ - + @@ -1711,7 +1759,7 @@ - + @@ -1738,7 +1786,16 @@ - + + + + + + + + + + @@ -1813,15 +1870,6 @@ - - - - - - - - - @@ -1876,7 +1924,7 @@ - + @@ -1921,7 +1969,7 @@ - + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/loc/zh-Hant/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl b/src/core/Microsoft.PowerToys.Settings.UI/loc/zh-Hant/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl index 865840e1c6..f7a5e50fc7 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/loc/zh-Hant/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl +++ b/src/core/Microsoft.PowerToys.Settings.UI/loc/zh-Hant/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw.lcl @@ -118,7 +118,7 @@ - + @@ -136,7 +136,7 @@ - + @@ -172,7 +172,7 @@ - + @@ -219,14 +219,17 @@ - + - + + + + - + @@ -235,7 +238,7 @@ - + @@ -244,7 +247,16 @@ - + + + + + + + + + + @@ -289,30 +301,39 @@ - + - + - + + + + - + - + + + + - + - + - + + + + @@ -343,7 +364,7 @@ - + @@ -415,6 +436,15 @@ + + + + + + + + + @@ -426,10 +456,13 @@ - + - + + + + @@ -442,7 +475,7 @@ - + @@ -451,7 +484,7 @@ - + @@ -523,7 +556,7 @@ - + @@ -532,7 +565,7 @@ - + @@ -541,7 +574,7 @@ - + @@ -577,7 +610,7 @@ - + @@ -586,7 +619,7 @@ - + @@ -595,7 +628,7 @@ - + @@ -678,10 +711,13 @@ - + - + + + + @@ -838,7 +874,7 @@ - + @@ -1063,7 +1099,7 @@ - + @@ -1072,7 +1108,7 @@ - + @@ -1081,7 +1117,7 @@ - + @@ -1171,6 +1207,15 @@ + + + + + + + + + @@ -1198,7 +1243,7 @@ - + @@ -1279,7 +1324,7 @@ - + @@ -1315,7 +1360,7 @@ - + @@ -1324,12 +1369,15 @@ - + - + - + + + + @@ -1389,14 +1437,17 @@ - + - + + + + - + @@ -1423,7 +1474,7 @@ - + @@ -1567,6 +1618,15 @@ + + + + + + + + + @@ -1585,7 +1645,7 @@ - + @@ -1603,7 +1663,7 @@ - + @@ -1648,6 +1708,12 @@ + + + + + + @@ -1675,7 +1741,7 @@ - + @@ -1720,7 +1786,16 @@ - + + + + + + + + + + @@ -1849,7 +1924,7 @@ - + @@ -1894,7 +1969,7 @@ - + diff --git a/src/modules/colorPicker/ColorPickerUI/Helpers/ColorHelper.cs b/src/modules/colorPicker/ColorPickerUI/Helpers/ColorHelper.cs index 44f547fc5b..edb2f6d1e0 100644 --- a/src/modules/colorPicker/ColorPickerUI/Helpers/ColorHelper.cs +++ b/src/modules/colorPicker/ColorPickerUI/Helpers/ColorHelper.cs @@ -13,44 +13,7 @@ namespace ColorPicker.Helpers internal static class ColorHelper { /// - /// Convert a given color to a HSL color (hue, saturation, lightness) - /// - /// The to convert - /// The hue [0°..360°], saturation [0..1] and lightness [0..1] values of the converted color - internal static (double hue, double saturation, double lightness) ConvertToHSLColor(Color color) - { - var min = Math.Min(Math.Min(color.R, color.G), color.B) / 255d; - var max = Math.Max(Math.Max(color.R, color.G), color.B) / 255d; - - var lightness = (max + min) / 2d; - - if (lightness == 0d || min == max) - { - return (color.GetHue(), 0d, lightness); - } - else if (lightness > 0d && lightness <= 0.5d) - { - return (color.GetHue(), (max - min) / (max + min), lightness); - } - - return (color.GetHue(), (max - min) / (2d - (max + min)), lightness); - } - - /// - /// Convert a given color to a HSV color (hue, saturation, value) - /// - /// The to convert - /// The hue [0°..360°], saturation [0..1] and value [0..1] of the converted color - internal static (double hue, double saturation, double value) ConvertToHSVColor(Color color) - { - var min = Math.Min(Math.Min(color.R, color.G), color.B) / 255d; - var max = Math.Max(Math.Max(color.R, color.G), color.B) / 255d; - - return (color.GetHue(), max == 0d ? 0d : (max - min) / max, max); - } - - /// - /// Convert a given color to a CYMK color (cyan, magenta, yellow, black key) + /// Convert a given to a CYMK color (cyan, magenta, yellow, black key) /// /// The to convert /// The cyan[0..1], magenta[0..1], yellow[0..1] and black key[0..1] of the converted color @@ -80,5 +43,135 @@ namespace ColorPicker.Helpers return (cyan, magenta, yellow, blackKey); } + + /// + /// Convert a given to a HSB color (hue, saturation, brightness) + /// + /// The to convert + /// The hue [0°..360°], saturation [0..1] and brightness [0..1] of the converted color + internal static (double hue, double saturation, double brightness) ConvertToHSBColor(Color color) + => (color.GetHue(), color.GetSaturation(), color.GetBrightness()); + + /// + /// Convert a given to a HSI color (hue, saturation, intensity) + /// + /// The to convert + /// The hue [0°..360°], saturation [0..1] and intensity [0..1] of the converted color + internal static (double hue, double saturation, double intensity) ConvertToHSIColor(Color color) + { + // special case for black + if (color.R == 0 && color.G == 0 && color.B == 0) + { + return (0d, 0d, 0d); + } + + var red = color.R / 255d; + var green = color.G / 255d; + var blue = color.B / 255d; + + var intensity = (red + green + blue) / 3d; + + var min = Math.Min(Math.Min(color.R, color.G), color.B) / 255d; + + return (color.GetHue(), 1d - (min / intensity), intensity); + } + + /// + /// Convert a given to a HSL color (hue, saturation, lightness) + /// + /// The to convert + /// The hue [0°..360°], saturation [0..1] and lightness [0..1] values of the converted color + internal static (double hue, double saturation, double lightness) ConvertToHSLColor(Color color) + { + var min = Math.Min(Math.Min(color.R, color.G), color.B) / 255d; + var max = Math.Max(Math.Max(color.R, color.G), color.B) / 255d; + + var lightness = (max + min) / 2d; + + if (lightness == 0d || min == max) + { + return (color.GetHue(), 0d, lightness); + } + else if (lightness > 0d && lightness <= 0.5d) + { + return (color.GetHue(), (max - min) / (max + min), lightness); + } + + return (color.GetHue(), (max - min) / (2d - (max + min)), lightness); + } + + /// + /// Convert a given to a HSV color (hue, saturation, value) + /// + /// The to convert + /// The hue [0°..360°], saturation [0..1] and value [0..1] of the converted color + internal static (double hue, double saturation, double value) ConvertToHSVColor(Color color) + { + var min = Math.Min(Math.Min(color.R, color.G), color.B) / 255d; + var max = Math.Max(Math.Max(color.R, color.G), color.B) / 255d; + + return (color.GetHue(), max == 0d ? 0d : (max - min) / max, max); + } + + /// + /// Convert a given to a HWB color (hue, whiteness, blackness) + /// + /// The to convert + /// The hue [0°..360°], whiteness [0..1] and blackness [0..1] of the converted color + internal static (double hue, double whiteness, double blackness) ConvertToHWBColor(Color color) + { + var min = Math.Min(Math.Min(color.R, color.G), color.B) / 255d; + var max = Math.Max(Math.Max(color.R, color.G), color.B) / 255d; + + return (color.GetHue(), min, 1 - max); + } + + /// + /// Convert a given to a natural color (hue, whiteness, blackness) + /// + /// The to convert + /// The hue, whiteness [0..1] and blackness [0..1] of the converted color + internal static (string hue, double whiteness, double blackness) ConvertToNaturalColor(Color color) + { + var min = Math.Min(Math.Min(color.R, color.G), color.B) / 255d; + var max = Math.Max(Math.Max(color.R, color.G), color.B) / 255d; + + return (GetNaturalColorFromHue(color.GetHue()), min, 1 - max); + } + + /// + /// Return the natural color for the given hue value + /// + /// The hue value to convert + /// A natural color + private static string GetNaturalColorFromHue(double hue) + { + if (hue < 60d) + { + return $"R{Math.Round(hue / 0.6d, 0)}"; + } + + if (hue < 120d) + { + return $"Y{Math.Round((hue - 60d) / 0.6d, 0)}"; + } + + if (hue < 180d) + { + return $"G{Math.Round((hue - 120d) / 0.6d, 0)}"; + } + + if (hue < 240d) + { + return $"C{Math.Round((hue - 180d) / 0.6d, 0)}"; + } + + if (hue < 300d) + { + return $"B{Math.Round((hue - 240d) / 0.6d, 0)}"; + } + + return $"M{Math.Round((hue - 300d) / 0.6d, 0)}"; + } } } diff --git a/src/modules/colorPicker/ColorPickerUI/Helpers/ColorRepresentationHelper.cs b/src/modules/colorPicker/ColorPickerUI/Helpers/ColorRepresentationHelper.cs index 1b2294d915..b21304a9ab 100644 --- a/src/modules/colorPicker/ColorPickerUI/Helpers/ColorRepresentationHelper.cs +++ b/src/modules/colorPicker/ColorPickerUI/Helpers/ColorRepresentationHelper.cs @@ -5,7 +5,7 @@ using System; using System.Drawing; using System.Globalization; -using Microsoft.PowerToys.Settings.UI.Library; +using Microsoft.PowerToys.Settings.UI.Library.Enumerations; namespace ColorPicker.Helpers { @@ -25,14 +25,38 @@ namespace ColorPicker.Helpers { ColorRepresentationType.CMYK => ColorToCYMK(color), ColorRepresentationType.HEX => ColorToHex(color), + ColorRepresentationType.HSB => ColorToHSB(color), + ColorRepresentationType.HSI => ColorToHSI(color), ColorRepresentationType.HSL => ColorToHSL(color), ColorRepresentationType.HSV => ColorToHSV(color), + ColorRepresentationType.HWB => ColorToHWB(color), + ColorRepresentationType.NCol => ColorToNCol(color), ColorRepresentationType.RGB => ColorToRGB(color), // Fall-back value, when "_userSettings.CopiedColorRepresentation.Value" is incorrect _ => ColorToHex(color), }; + /// + /// Return a representation of a CYMK color + /// + /// The for the CYMK color presentation + /// A representation of a CYMK color + private static string ColorToCYMK(Color color) + { + var (cyan, magenta, yellow, blackKey) = ColorHelper.ConvertToCMYKColor(color); + + cyan = Math.Round(cyan * 100); + magenta = Math.Round(magenta * 100); + yellow = Math.Round(yellow * 100); + blackKey = Math.Round(blackKey * 100); + + return $"cmyk({cyan.ToString(CultureInfo.InvariantCulture)}%" + + $", {magenta.ToString(CultureInfo.InvariantCulture)}%" + + $", {yellow.ToString(CultureInfo.InvariantCulture)}%" + + $", {blackKey.ToString(CultureInfo.InvariantCulture)}%)"; + } + /// /// Return a hexadecimal representation of a RGB color /// @@ -44,19 +68,45 @@ namespace ColorPicker.Helpers + $"{color.B.ToString("X2", CultureInfo.InvariantCulture)}"; /// - /// Return a representation of a RGB color + /// Return a representation of a HSB color /// - /// The see cref="Color"/> for the RGB color presentation - /// A representation of a RGB color - private static string ColorToRGB(Color color) - => $"rgb({color.R.ToString(CultureInfo.InvariantCulture)}" - + $", {color.G.ToString(CultureInfo.InvariantCulture)}" - + $", {color.B.ToString(CultureInfo.InvariantCulture)})"; + /// The for the HSB color presentation + /// A representation of a HSB color + private static string ColorToHSB(Color color) + { + var (hue, saturation, brightness) = ColorHelper.ConvertToHSBColor(color); + + hue = Math.Round(hue); + saturation = Math.Round(saturation * 100); + brightness = Math.Round(brightness * 100); + + return $"hsb({hue.ToString(CultureInfo.InvariantCulture)}" + + $", {saturation.ToString(CultureInfo.InvariantCulture)}%" + + $", {brightness.ToString(CultureInfo.InvariantCulture)}%)"; + } + + /// + /// Return a representation of a HSI color + /// + /// The for the HSI color presentation + /// A representation of a HSI color + private static string ColorToHSI(Color color) + { + var (hue, saturation, intensity) = ColorHelper.ConvertToHSIColor(color); + + hue = Math.Round(hue); + saturation = Math.Round(saturation * 100); + intensity = Math.Round(intensity * 100); + + return $"hsi({hue.ToString(CultureInfo.InvariantCulture)}" + + $", {saturation.ToString(CultureInfo.InvariantCulture)}%" + + $", {intensity.ToString(CultureInfo.InvariantCulture)}%)"; + } /// /// Return a representation of a HSL color /// - /// The see cref="Color"/> for the HSL color presentation + /// The for the HSL color presentation /// A representation of a HSL color private static string ColorToHSL(Color color) { @@ -75,7 +125,7 @@ namespace ColorPicker.Helpers /// /// Return a representation of a HSV color /// - /// The see cref="Color"/> for the HSV color presentation + /// The for the HSV color presentation /// A representation of a HSV color private static string ColorToHSV(Color color) { @@ -92,24 +142,48 @@ namespace ColorPicker.Helpers } /// - /// Return a representation of a HSV color + /// Return a representation of a HWB color /// - /// The see cref="Color"/> for the HSV color presentation - /// A representation of a HSV color - private static string ColorToCYMK(Color color) + /// The for the HWB color presentation + /// A representation of a HWB color + private static string ColorToHWB(Color color) { - var (cyan, magenta, yellow, blackKey) = ColorHelper.ConvertToCMYKColor(color); + var (hue, whiteness, blackness) = ColorHelper.ConvertToHWBColor(color); - cyan = Math.Round(cyan * 100); - magenta = Math.Round(magenta * 100); - yellow = Math.Round(yellow * 100); - blackKey = Math.Round(blackKey * 100); + hue = Math.Round(hue); + whiteness = Math.Round(whiteness * 100); + blackness = Math.Round(blackness * 100); - // Using InvariantCulture since this is used for color representation - return $"cmyk({cyan.ToString(CultureInfo.InvariantCulture)}%" - + $", {magenta.ToString(CultureInfo.InvariantCulture)}%" - + $", {yellow.ToString(CultureInfo.InvariantCulture)}%" - + $", {blackKey.ToString(CultureInfo.InvariantCulture)}%)"; + return $"hwb({hue.ToString(CultureInfo.InvariantCulture)}" + + $", {whiteness.ToString(CultureInfo.InvariantCulture)}%" + + $", {blackness.ToString(CultureInfo.InvariantCulture)}%)"; } + + /// + /// Return a representation of a natural color + /// + /// The for the natural color presentation + /// A representation of a natural color + private static string ColorToNCol(Color color) + { + var (hue, whiteness, blackness) = ColorHelper.ConvertToNaturalColor(color); + + whiteness = Math.Round(whiteness * 100); + blackness = Math.Round(blackness * 100); + + return $"{hue}" + + $", {whiteness.ToString(CultureInfo.InvariantCulture)}%" + + $", {blackness.ToString(CultureInfo.InvariantCulture)}%"; + } + + /// + /// Return a representation of a RGB color + /// + /// The see cref="Color"/> for the RGB color presentation + /// A representation of a RGB color + private static string ColorToRGB(Color color) + => $"rgb({color.R.ToString(CultureInfo.InvariantCulture)}" + + $", {color.G.ToString(CultureInfo.InvariantCulture)}" + + $", {color.B.ToString(CultureInfo.InvariantCulture)})"; } } diff --git a/src/modules/colorPicker/ColorPickerUI/Settings/IUserSettings.cs b/src/modules/colorPicker/ColorPickerUI/Settings/IUserSettings.cs index b05be4d12e..585b441279 100644 --- a/src/modules/colorPicker/ColorPickerUI/Settings/IUserSettings.cs +++ b/src/modules/colorPicker/ColorPickerUI/Settings/IUserSettings.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.PowerToys.Settings.UI.Library; +using Microsoft.PowerToys.Settings.UI.Library.Enumerations; namespace ColorPicker.Settings { diff --git a/src/modules/colorPicker/ColorPickerUI/Settings/UserSettings.cs b/src/modules/colorPicker/ColorPickerUI/Settings/UserSettings.cs index 3ccea1f1e4..852278f90b 100644 --- a/src/modules/colorPicker/ColorPickerUI/Settings/UserSettings.cs +++ b/src/modules/colorPicker/ColorPickerUI/Settings/UserSettings.cs @@ -8,6 +8,7 @@ using System.IO; using System.IO.Abstractions; using System.Threading; using Microsoft.PowerToys.Settings.UI.Library; +using Microsoft.PowerToys.Settings.UI.Library.Enumerations; using Microsoft.PowerToys.Settings.UI.Library.Utilities; namespace ColorPicker.Settings diff --git a/src/modules/colorPicker/ColorPickerUI/ViewModels/MainViewModel.cs b/src/modules/colorPicker/ColorPickerUI/ViewModels/MainViewModel.cs index a600471f61..d747eae0a2 100644 --- a/src/modules/colorPicker/ColorPickerUI/ViewModels/MainViewModel.cs +++ b/src/modules/colorPicker/ColorPickerUI/ViewModels/MainViewModel.cs @@ -15,7 +15,6 @@ using ColorPicker.Mouse; using ColorPicker.Settings; using ColorPicker.Telemetry; using ColorPicker.ViewModelContracts; -using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Telemetry; namespace ColorPicker.ViewModels diff --git a/src/modules/colorPicker/UnitTest-ColorPickerUI/Helpers/ColorHelperTest.cs b/src/modules/colorPicker/UnitTest-ColorPickerUI/Helpers/ColorHelperTest.cs index aae56ac7c2..804ecddd7a 100644 --- a/src/modules/colorPicker/UnitTest-ColorPickerUI/Helpers/ColorHelperTest.cs +++ b/src/modules/colorPicker/UnitTest-ColorPickerUI/Helpers/ColorHelperTest.cs @@ -1,5 +1,6 @@ using System; using System.Drawing; +using System.Globalization; using ColorPicker.Helpers; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -41,7 +42,7 @@ namespace UnitTest_ColorPickerUI.Helpers [DataRow(315, 100, 050, 100, 000, 075)] // Red-magenta [DataRow(330, 100, 050, 100, 000, 050)] // Blue-red [DataRow(345, 100, 050, 100, 000, 025)] // Light blue-red - public void ColorRGBtoHSL(double hue, double saturation, double lightness, int red, int green, int blue) + public void ColorRGBtoHSLTest(double hue, double saturation, double lightness, int red, int green, int blue) { red = Convert.ToInt32(Math.Round(255d / 100d * red)); // [0%..100%] to [0..255] green = Convert.ToInt32(Math.Round(255d / 100d * green)); // [0%..100%] to [0..255] @@ -90,7 +91,7 @@ namespace UnitTest_ColorPickerUI.Helpers [DataRow(315, 100, 100, 100, 000, 075)] // Red-magenta [DataRow(330, 100, 100, 100, 000, 050)] // Blue-red [DataRow(345, 100, 100, 100, 000, 025)] // Light blue-red - public void ColorRGBtoHSV(double hue, double saturation, double value, int red, int green, int blue) + public void ColorRGBtoHSVTest(double hue, double saturation, double value, int red, int green, int blue) { red = Convert.ToInt32(Math.Round(255d / 100d * red)); // [0%..100%] to [0..255] green = Convert.ToInt32(Math.Round(255d / 100d * green)); // [0%..100%] to [0..255] @@ -138,7 +139,7 @@ namespace UnitTest_ColorPickerUI.Helpers [DataRow(000, 100, 025, 000, 255, 000, 192)] // Red-magenta [DataRow(000, 100, 050, 000, 255, 000, 128)] // Blue-red [DataRow(000, 100, 075, 000, 255, 000, 064)] // Light blue-red - public void ColorRGBtoCMYK(int cyan, int magenta, int yellow, int blackKey, int red, int green, int blue) + public void ColorRGBtoCMYKTest(int cyan, int magenta, int yellow, int blackKey, int red, int green, int blue) { var color = Color.FromArgb(255, red, green, blue); var result = ColorHelper.ConvertToCMYKColor(color); @@ -156,8 +157,130 @@ namespace UnitTest_ColorPickerUI.Helpers Assert.AreEqual(result.blackKey * 100d, blackKey, 0.5d); } + // values taken from https://en.wikipedia.org/wiki/HSL_and_HSV#Examples [TestMethod] - public void ColorRGBtoCMYKZeroDiv() + [DataRow("FFFFFF", 000.0, 000.0, 100.0)] // white + [DataRow("808080", 000.0, 000.0, 050.0)] // gray + [DataRow("000000", 000.0, 000.0, 000.0)] // black + [DataRow("FF0000", 000.0, 100.0, 033.3)] // red + [DataRow("BFBF00", 060.0, 100.0, 050.0)] // yellow + [DataRow("008000", 120.0, 100.0, 016.7)] // green + [DataRow("80FFFF", 180.0, 040.0, 083.3)] // cyan + [DataRow("8080FF", 240.0, 025.0, 066.7)] // blue + [DataRow("BF40BF", 300.0, 057.1, 058.3)] // magenta + [DataRow("A0A424", 061.8, 069.9, 047.1)] + [DataRow("411BEA", 251.1, 075.6, 042.6)] + [DataRow("1EAC41", 134.9, 066.7, 034.9)] + [DataRow("F0C80E", 049.5, 091.1, 059.3)] + [DataRow("B430E5", 283.7, 068.6, 059.6)] + [DataRow("ED7651", 014.3, 044.6, 057.0)] + [DataRow("FEF888", 056.9, 036.3, 083.5)] + [DataRow("19CB97", 162.4, 080.0, 049.5)] + [DataRow("362698", 248.3, 053.3, 031.9)] + [DataRow("7E7EB8", 240.5, 013.5, 057.0)] + public void ColorRGBtoHSITest(string hexValue, double hue, double saturation, double intensity) + { + var red = int.Parse(hexValue.Substring(0, 2), NumberStyles.HexNumber); + var green = int.Parse(hexValue.Substring(2, 2), NumberStyles.HexNumber); + var blue = int.Parse(hexValue.Substring(4, 2), NumberStyles.HexNumber); + + var color = Color.FromArgb(255, red, green, blue); + var result = ColorHelper.ConvertToHSIColor(color); + + // hue[0..360] + Assert.AreEqual(result.hue, hue, 0.5d); + + // saturation[0..1] + Assert.AreEqual(result.saturation * 100d, saturation, 0.5d); + + // intensity[0..1] + Assert.AreEqual(result.intensity * 100d, intensity, 0.5d); + } + + // values taken from https://en.wikipedia.org/wiki/HSL_and_HSV#Examples + // and manual convert via https://colorconv.com/hwb + [TestMethod] + [DataRow("FFFFFF", 000, 100, 000)] // white + [DataRow("808080", 000, 050, 050)] // gray + [DataRow("000000", 000, 000, 100)] // black + [DataRow("FF0000", 000, 000, 000)] // red + [DataRow("BFBF00", 060, 000, 025)] // yellow + [DataRow("008000", 120, 000, 050)] // green + [DataRow("80FFFF", 180, 050, 000)] // cyan + [DataRow("8080FF", 240, 050, 000)] // blue + [DataRow("BF40BF", 300, 025, 025)] // magenta + [DataRow("A0A424", 062, 014, 036)] + [DataRow("411BEA", 251, 011, 008)] + [DataRow("1EAC41", 135, 012, 033)] + [DataRow("F0C80E", 049, 005, 006)] + [DataRow("B430E5", 284, 019, 010)] + [DataRow("ED7651", 014, 032, 007)] + [DataRow("FEF888", 057, 053, 000)] + [DataRow("19CB97", 162, 010, 020)] + [DataRow("362698", 248, 015, 040)] + [DataRow("7E7EB8", 240, 049, 028)] + public void ColorRGBtoHWBTest(string hexValue, double hue, double whiteness, double blackness) + { + var red = int.Parse(hexValue.Substring(0, 2), NumberStyles.HexNumber); + var green = int.Parse(hexValue.Substring(2, 2), NumberStyles.HexNumber); + var blue = int.Parse(hexValue.Substring(4, 2), NumberStyles.HexNumber); + + var color = Color.FromArgb(255, red, green, blue); + var result = ColorHelper.ConvertToHWBColor(color); + + // hue[0..360] + Assert.AreEqual(result.hue, hue, 0.5d); + + // whiteness[0..1] + Assert.AreEqual(result.whiteness * 100d, whiteness, 0.5d); + + // blackness[0..1] + Assert.AreEqual(result.blackness * 100d, blackness, 0.5d); + } + + // values taken from https://en.wikipedia.org/wiki/HSL_and_HSV#Examples + // and manual convert via https://colorconv.com/hwb + [TestMethod] + [DataRow("FFFFFF", "R0", 100, 000)] // white + [DataRow("808080", "R0", 050, 050)] // gray + [DataRow("000000", "R0", 000, 100)] // black + [DataRow("FF0000", "R0", 000, 000)] // red + [DataRow("BFBF00", "Y0", 000, 025)] // yellow + [DataRow("008000", "G0", 000, 050)] // green + [DataRow("80FFFF", "C0", 050, 000)] // cyan + [DataRow("8080FF", "B0", 050, 000)] // blue + [DataRow("BF40BF", "M0", 025, 025)] // magenta + [DataRow("A0A424", "Y3", 014, 036)] + [DataRow("411BEA", "B18", 011, 008)] + [DataRow("1EAC41", "G25", 012, 033)] + [DataRow("F0C80E", "R82", 005, 006)] + [DataRow("B430E5", "B73", 019, 010)] + [DataRow("ED7651", "R24", 032, 007)] + [DataRow("FEF888", "R95", 053, 000)] + [DataRow("19CB97", "G71", 010, 020)] + [DataRow("362698", "B14", 015, 040)] + [DataRow("7E7EB8", "B0", 049, 028)] + public void ColorRGBtoNColTest(string hexValue, string hue, double whiteness, double blackness) + { + var red = int.Parse(hexValue.Substring(0, 2), NumberStyles.HexNumber); + var green = int.Parse(hexValue.Substring(2, 2), NumberStyles.HexNumber); + var blue = int.Parse(hexValue.Substring(4, 2), NumberStyles.HexNumber); + + var color = Color.FromArgb(255, red, green, blue); + var result = ColorHelper.ConvertToNaturalColor(color); + + // hue + Assert.AreEqual(result.hue, hue); + + // whiteness[0..1] + Assert.AreEqual(result.whiteness * 100d, whiteness, 0.5d); + + // blackness[0..1] + Assert.AreEqual(result.blackness * 100d, blackness, 0.5d); + } + + [TestMethod] + public void ColorRGBtoCMYKZeroDivTest() { for(var red = 0; red < 256; red++) { diff --git a/src/modules/colorPicker/UnitTest-ColorPickerUI/Helpers/ColorRepresentationHelperTest.cs b/src/modules/colorPicker/UnitTest-ColorPickerUI/Helpers/ColorRepresentationHelperTest.cs index fe6fddf015..d9ce148756 100644 --- a/src/modules/colorPicker/UnitTest-ColorPickerUI/Helpers/ColorRepresentationHelperTest.cs +++ b/src/modules/colorPicker/UnitTest-ColorPickerUI/Helpers/ColorRepresentationHelperTest.cs @@ -1,5 +1,5 @@ using ColorPicker.Helpers; -using Microsoft.PowerToys.Settings.UI.Library; +using Microsoft.PowerToys.Settings.UI.Library.Enumerations; using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Drawing; @@ -11,11 +11,15 @@ namespace UnitTest_ColorPickerUI.Helpers [TestMethod] [DataRow(ColorRepresentationType.CMYK, "cmyk(0%, 0%, 0%, 100%)")] [DataRow(ColorRepresentationType.HEX, "#000000")] + [DataRow(ColorRepresentationType.NCol, "R0, 0%, 100%")] + [DataRow(ColorRepresentationType.HSB, "hsb(0, 0%, 0%)")] + [DataRow(ColorRepresentationType.HSI, "hsi(0, 0%, 0%)")] [DataRow(ColorRepresentationType.HSL, "hsl(0, 0%, 0%)")] [DataRow(ColorRepresentationType.HSV, "hsv(0, 0%, 0%)")] + [DataRow(ColorRepresentationType.HWB, "hwb(0, 0%, 100%)")] [DataRow(ColorRepresentationType.RGB, "rgb(0, 0, 0)")] - public void ColorRGBtoCMYKZeroDiv(ColorRepresentationType type, string expected) + public void GetStringRepresentationTest(ColorRepresentationType type, string expected) { var result = ColorRepresentationHelper.GetStringRepresentation(Color.Black, type); Assert.AreEqual(result, expected); diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/MainWindow.xaml b/src/modules/fancyzones/editor/FancyZonesEditor/MainWindow.xaml index 2105ac361d..bbf8ce879d 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/MainWindow.xaml +++ b/src/modules/fancyzones/editor/FancyZonesEditor/MainWindow.xaml @@ -211,7 +211,10 @@ + MouseDown="LayoutItem_Click" + Focusable="True" + FocusManager.GotFocus="LayoutItem_Focused" + KeyDown="LayoutItem_Apply"> + MouseDown="LayoutItem_Click" + Focusable="True" + FocusManager.GotFocus="LayoutItem_Focused" + KeyDown="LayoutItem_Apply"> (5); - _focusModel = new CanvasLayoutModel(FocusLayoutID, LayoutType.Focus); + _focusModel = new CanvasLayoutModel(Properties.Resources.Template_Layout_Focus, LayoutType.Focus); DefaultModels.Add(_focusModel); - _columnsModel = new GridLayoutModel(ColumnsLayoutID, LayoutType.Columns) + _columnsModel = new GridLayoutModel(Properties.Resources.Template_Layout_Columns, LayoutType.Columns) { Rows = 1, RowPercents = new List(1) { _multiplier }, }; DefaultModels.Add(_columnsModel); - _rowsModel = new GridLayoutModel(RowsLayoutID, LayoutType.Rows) + _rowsModel = new GridLayoutModel(Properties.Resources.Template_Layout_Rows, LayoutType.Rows) { Columns = 1, ColumnPercents = new List(1) { _multiplier }, }; DefaultModels.Add(_rowsModel); - _gridModel = new GridLayoutModel(GridLayoutID, LayoutType.Grid); + _gridModel = new GridLayoutModel(Properties.Resources.Template_Layout_Grid, LayoutType.Grid); DefaultModels.Add(_gridModel); - _priorityGridModel = new GridLayoutModel(PriorityGridLayoutID, LayoutType.PriorityGrid); + _priorityGridModel = new GridLayoutModel(Properties.Resources.Template_Layout_Priority_Grid, LayoutType.PriorityGrid); DefaultModels.Add(_priorityGridModel); - _blankCustomModel = new CanvasLayoutModel(CreateNewCustomLabel, LayoutType.Blank); + _blankCustomModel = new CanvasLayoutModel(Properties.Resources.Custom_Layout_Create_New, LayoutType.Blank); UpdateLayoutModels(); } @@ -495,7 +481,7 @@ namespace FancyZonesEditor } catch (Exception ex) { - LayoutModel.ShowExceptionMessageBox(ErrorParsingDeviceInfo, ex); + LayoutModel.ShowExceptionMessageBox(Properties.Resources.Error_Parsing_Device_Info, ex); } } @@ -514,7 +500,7 @@ namespace FancyZonesEditor } else { - MessageBox.Show(ErrorInvalidArgs, ErrorMessageBoxTitle); + MessageBox.Show(Properties.Resources.Error_Invalid_Arguments, Properties.Resources.Error_Message_Box_Title); ((App)Application.Current).Shutdown(); } } @@ -526,7 +512,7 @@ namespace FancyZonesEditor var parsedLocation = singleMonitorString.Split('_'); if (parsedLocation.Length != 4) { - MessageBox.Show(ErrorInvalidArgs, ErrorMessageBoxTitle); + MessageBox.Show(Properties.Resources.Error_Invalid_Arguments, Properties.Resources.Error_Message_Box_Title); ((App)Application.Current).Shutdown(); } @@ -553,7 +539,7 @@ namespace FancyZonesEditor } else { - MessageBox.Show(ErrorNonStandaloneApp, ErrorMessageBoxTitle); + MessageBox.Show(Properties.Resources.Error_Invalid_Arguments, Properties.Resources.Error_Message_Box_Title); ((App)Application.Current).Shutdown(); } } diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.Designer.cs b/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.Designer.cs index c17fd8b3da..ccb9055150 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.Designer.cs +++ b/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.Designer.cs @@ -132,6 +132,15 @@ namespace FancyZonesEditor.Properties { } } + /// + /// Looks up a localized string similar to Create new custom. + /// + public static string Custom_Layout_Create_New { + get { + return ResourceManager.GetString("Custom_Layout_Create_New", resourceCulture); + } + } + /// /// Looks up a localized string similar to Custom layout creator. /// @@ -177,6 +186,42 @@ namespace FancyZonesEditor.Properties { } } + /// + /// Looks up a localized string similar to FancyZones Editor arguments are invalid.. + /// + public static string Error_Invalid_Arguments { + get { + return ResourceManager.GetString("Error_Invalid_Arguments", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to FancyZones Editor Error. + /// + public static string Error_Message_Box_Title { + get { + return ResourceManager.GetString("Error_Message_Box_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to FancyZones Editor should not be run as standalone application.. + /// + public static string Error_Not_Standalone_App { + get { + return ResourceManager.GetString("Error_Not_Standalone_App", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error parsing device info data.. + /// + public static string Error_Parsing_Device_Info { + get { + return ResourceManager.GetString("Error_Parsing_Device_Info", resourceCulture); + } + } + /// /// Looks up a localized string similar to FancyZones Editor. /// @@ -249,6 +294,51 @@ namespace FancyZonesEditor.Properties { } } + /// + /// Looks up a localized string similar to Columns. + /// + public static string Template_Layout_Columns { + get { + return ResourceManager.GetString("Template_Layout_Columns", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Focus. + /// + public static string Template_Layout_Focus { + get { + return ResourceManager.GetString("Template_Layout_Focus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Grid. + /// + public static string Template_Layout_Grid { + get { + return ResourceManager.GetString("Template_Layout_Grid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Priority Grid. + /// + public static string Template_Layout_Priority_Grid { + get { + return ResourceManager.GetString("Template_Layout_Priority_Grid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Rows. + /// + public static string Template_Layout_Rows { + get { + return ResourceManager.GetString("Template_Layout_Rows", resourceCulture); + } + } + /// /// Looks up a localized string similar to Templates. /// diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx b/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx index a49da8022c..82cdbb0745 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx +++ b/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx @@ -189,4 +189,35 @@ Delete custom layout + + Create new custom + As in Create new custom layout + + + FancyZones Editor arguments are invalid. + + + FancyZones Editor Error + + + FancyZones Editor should not be run as standalone application. + + + Error parsing device info data. + + + Columns + + + Focus + + + Grid + + + Priority Grid + + + Rows + \ No newline at end of file diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/loc/cs/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl b/src/modules/fancyzones/editor/FancyZonesEditor/loc/cs/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl index d8e7b99aed..5189f6b690 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/loc/cs/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl +++ b/src/modules/fancyzones/editor/FancyZonesEditor/loc/cs/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl @@ -91,6 +91,15 @@ + + + + + + + + + @@ -136,6 +145,15 @@ + + + + + + + + + @@ -190,6 +208,24 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/loc/de/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl b/src/modules/fancyzones/editor/FancyZonesEditor/loc/de/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl index af65343da3..d416ff4165 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/loc/de/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl +++ b/src/modules/fancyzones/editor/FancyZonesEditor/loc/de/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl @@ -91,6 +91,15 @@ + + + + + + + + + @@ -136,6 +145,15 @@ + + + + + + + + + @@ -190,6 +208,24 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/loc/es/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl b/src/modules/fancyzones/editor/FancyZonesEditor/loc/es/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl index 5f1a145b4b..b20092f2aa 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/loc/es/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl +++ b/src/modules/fancyzones/editor/FancyZonesEditor/loc/es/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl @@ -91,6 +91,12 @@ + + + + + + @@ -122,7 +128,7 @@ - + @@ -131,11 +137,17 @@ - + + + + + + + @@ -190,6 +202,18 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/loc/fr/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl b/src/modules/fancyzones/editor/FancyZonesEditor/loc/fr/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl index cf0e5edd9d..d1665f4d16 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/loc/fr/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl +++ b/src/modules/fancyzones/editor/FancyZonesEditor/loc/fr/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl @@ -91,6 +91,15 @@ + + + + + + + + + @@ -136,6 +145,15 @@ + + + + + + + + + @@ -190,6 +208,24 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/loc/ja/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl b/src/modules/fancyzones/editor/FancyZonesEditor/loc/ja/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl index 479ec52c40..28cc4781bc 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/loc/ja/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl +++ b/src/modules/fancyzones/editor/FancyZonesEditor/loc/ja/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl @@ -91,6 +91,15 @@ + + + + + + + + + @@ -136,6 +145,15 @@ + + + + + + + + + @@ -190,6 +208,24 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/loc/ko/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl b/src/modules/fancyzones/editor/FancyZonesEditor/loc/ko/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl index cd6e5f0f7a..90eb39642d 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/loc/ko/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl +++ b/src/modules/fancyzones/editor/FancyZonesEditor/loc/ko/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl @@ -91,6 +91,15 @@ + + + + + + + + + @@ -136,6 +145,15 @@ + + + + + + + + + @@ -190,6 +208,24 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/loc/nl/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl b/src/modules/fancyzones/editor/FancyZonesEditor/loc/nl/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl index 6096dc2e39..4fd61af632 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/loc/nl/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl +++ b/src/modules/fancyzones/editor/FancyZonesEditor/loc/nl/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl @@ -91,6 +91,15 @@ + + + + + + + + + @@ -136,6 +145,15 @@ + + + + + + + + + @@ -190,6 +208,24 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/loc/pl/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl b/src/modules/fancyzones/editor/FancyZonesEditor/loc/pl/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl index 676c09d80c..82881d5f2c 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/loc/pl/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl +++ b/src/modules/fancyzones/editor/FancyZonesEditor/loc/pl/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl @@ -91,6 +91,15 @@ + + + + + + + + + @@ -122,7 +131,7 @@ - + @@ -131,7 +140,16 @@ - + + + + + + + + + + @@ -190,6 +208,24 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/loc/pt-PT/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl b/src/modules/fancyzones/editor/FancyZonesEditor/loc/pt-PT/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl index 496f39a5a9..ac4e4a1d6b 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/loc/pt-PT/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl +++ b/src/modules/fancyzones/editor/FancyZonesEditor/loc/pt-PT/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl @@ -91,6 +91,12 @@ + + + + + + @@ -122,7 +128,7 @@ - + @@ -131,11 +137,17 @@ - + + + + + + + @@ -190,6 +202,18 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/loc/ru/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl b/src/modules/fancyzones/editor/FancyZonesEditor/loc/ru/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl index 4e57e1f7c7..9b8af09a28 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/loc/ru/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl +++ b/src/modules/fancyzones/editor/FancyZonesEditor/loc/ru/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl @@ -91,6 +91,15 @@ + + + + + + + + + @@ -136,6 +145,15 @@ + + + + + + + + + @@ -190,6 +208,24 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/loc/sv/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl b/src/modules/fancyzones/editor/FancyZonesEditor/loc/sv/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl index febfbe7dad..ae43b7197a 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/loc/sv/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl +++ b/src/modules/fancyzones/editor/FancyZonesEditor/loc/sv/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl @@ -91,6 +91,15 @@ + + + + + + + + + @@ -136,6 +145,15 @@ + + + + + + + + + @@ -190,6 +208,24 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/loc/zh-Hans/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl b/src/modules/fancyzones/editor/FancyZonesEditor/loc/zh-Hans/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl index c62997a510..01a68d155f 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/loc/zh-Hans/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl +++ b/src/modules/fancyzones/editor/FancyZonesEditor/loc/zh-Hans/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl @@ -91,6 +91,15 @@ + + + + + + + + + @@ -136,6 +145,15 @@ + + + + + + + + + @@ -190,6 +208,24 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/loc/zh-Hant/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl b/src/modules/fancyzones/editor/FancyZonesEditor/loc/zh-Hant/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl index a6671619d0..8130e7540a 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/loc/zh-Hant/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl +++ b/src/modules/fancyzones/editor/FancyZonesEditor/loc/zh-Hant/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx.lcl @@ -91,6 +91,15 @@ + + + + + + + + + @@ -136,6 +145,15 @@ + + + + + + + + + @@ -190,6 +208,24 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/fancyzones/lib/loc/es/src/modules/fancyzones/lib/Resources.resx.lcl b/src/modules/fancyzones/lib/loc/es/src/modules/fancyzones/lib/Resources.resx.lcl index a78f091346..3a5d4b4209 100644 --- a/src/modules/fancyzones/lib/loc/es/src/modules/fancyzones/lib/Resources.resx.lcl +++ b/src/modules/fancyzones/lib/loc/es/src/modules/fancyzones/lib/Resources.resx.lcl @@ -41,7 +41,7 @@ - + @@ -50,7 +50,7 @@ - + @@ -59,7 +59,7 @@ - + @@ -68,7 +68,7 @@ - + @@ -77,7 +77,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -251,7 +251,7 @@ - + diff --git a/src/modules/fancyzones/lib/loc/ko/src/modules/fancyzones/lib/Resources.resx.lcl b/src/modules/fancyzones/lib/loc/ko/src/modules/fancyzones/lib/Resources.resx.lcl index a3fd0b18f2..caf3a69d8b 100644 --- a/src/modules/fancyzones/lib/loc/ko/src/modules/fancyzones/lib/Resources.resx.lcl +++ b/src/modules/fancyzones/lib/loc/ko/src/modules/fancyzones/lib/Resources.resx.lcl @@ -194,7 +194,7 @@ - + @@ -260,7 +260,7 @@ - + diff --git a/src/modules/fancyzones/lib/loc/pl/src/modules/fancyzones/lib/Resources.resx.lcl b/src/modules/fancyzones/lib/loc/pl/src/modules/fancyzones/lib/Resources.resx.lcl index d292c63493..8aaa07c156 100644 --- a/src/modules/fancyzones/lib/loc/pl/src/modules/fancyzones/lib/Resources.resx.lcl +++ b/src/modules/fancyzones/lib/loc/pl/src/modules/fancyzones/lib/Resources.resx.lcl @@ -41,7 +41,7 @@ - + @@ -50,7 +50,7 @@ - + @@ -59,7 +59,7 @@ - + @@ -68,7 +68,7 @@ - + @@ -77,7 +77,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -251,7 +251,7 @@ - + diff --git a/src/modules/fancyzones/lib/loc/pt-PT/src/modules/fancyzones/lib/Resources.resx.lcl b/src/modules/fancyzones/lib/loc/pt-PT/src/modules/fancyzones/lib/Resources.resx.lcl index 618d33465e..e231651489 100644 --- a/src/modules/fancyzones/lib/loc/pt-PT/src/modules/fancyzones/lib/Resources.resx.lcl +++ b/src/modules/fancyzones/lib/loc/pt-PT/src/modules/fancyzones/lib/Resources.resx.lcl @@ -41,7 +41,7 @@ - + @@ -50,7 +50,7 @@ - + @@ -59,7 +59,7 @@ - + @@ -68,7 +68,7 @@ - + @@ -77,7 +77,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -251,7 +251,7 @@ - + diff --git a/src/modules/launcher/PowerLauncher/PowerLauncher.csproj b/src/modules/launcher/PowerLauncher/PowerLauncher.csproj index 2d7cb8d48b..f6c2e81670 100644 --- a/src/modules/launcher/PowerLauncher/PowerLauncher.csproj +++ b/src/modules/launcher/PowerLauncher/PowerLauncher.csproj @@ -106,7 +106,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/src/modules/launcher/PowerLauncher/ReportWindow.xaml.cs b/src/modules/launcher/PowerLauncher/ReportWindow.xaml.cs index 733bcc9d60..ca59b37410 100644 --- a/src/modules/launcher/PowerLauncher/ReportWindow.xaml.cs +++ b/src/modules/launcher/PowerLauncher/ReportWindow.xaml.cs @@ -42,9 +42,9 @@ namespace PowerLauncher { string path = Log.CurrentLogDirectory; var directory = new DirectoryInfo(path); - var log = directory.GetFiles().OrderByDescending(f => f.LastWriteTime).First(); + var log = directory.GetFiles().OrderByDescending(f => f.LastWriteTime).FirstOrDefault(); - LogFilePathBox.Text = log.FullName; + LogFilePathBox.Text = log?.FullName; StringBuilder content = new StringBuilder(); content.AppendLine(ErrorReporting.RuntimeInfo()); diff --git a/src/modules/launcher/PowerLauncher/loc/ru/src/modules/launcher/PowerLauncher/Properties/Resources.resx.lcl b/src/modules/launcher/PowerLauncher/loc/ru/src/modules/launcher/PowerLauncher/Properties/Resources.resx.lcl index 54cd57d146..562a8afdff 100644 --- a/src/modules/launcher/PowerLauncher/loc/ru/src/modules/launcher/PowerLauncher/Properties/Resources.resx.lcl +++ b/src/modules/launcher/PowerLauncher/loc/ru/src/modules/launcher/PowerLauncher/Properties/Resources.resx.lcl @@ -120,10 +120,13 @@ - + - + + + + @@ -154,7 +157,7 @@ - + @@ -163,7 +166,7 @@ - + diff --git a/src/modules/launcher/Wox.Plugin/Logger/Log.cs b/src/modules/launcher/Wox.Plugin/Logger/Log.cs index 76fedeac68..69dd96a558 100644 --- a/src/modules/launcher/Wox.Plugin/Logger/Log.cs +++ b/src/modules/launcher/Wox.Plugin/Logger/Log.cs @@ -41,8 +41,8 @@ namespace Wox.Plugin.Logger var rule = new LoggingRule("*", LogLevel.Info, target); #endif configuration.LoggingRules.Add(rule); - LogManager.Configuration = configuration; target.Dispose(); + LogManager.Configuration = configuration; } private static void LogInternalException(string message, System.Exception e, Type fullClassName, [CallerMemberName] string methodName = "", [CallerFilePath] string sourceFilePath = "", [CallerLineNumber] int sourceLineNumber = 0) diff --git a/src/modules/launcher/Wox.Plugin/Wox.Plugin.csproj b/src/modules/launcher/Wox.Plugin/Wox.Plugin.csproj index 3b6893a3c1..7214d66c6b 100644 --- a/src/modules/launcher/Wox.Plugin/Wox.Plugin.csproj +++ b/src/modules/launcher/Wox.Plugin/Wox.Plugin.csproj @@ -84,7 +84,7 @@ - + all diff --git a/src/modules/powerrename/UWPui/PowerRenameUWPUI.vcxproj b/src/modules/powerrename/UWPui/PowerRenameUWPUI.vcxproj index 56a7f3db70..b47014a15d 100644 --- a/src/modules/powerrename/UWPui/PowerRenameUWPUI.vcxproj +++ b/src/modules/powerrename/UWPui/PowerRenameUWPUI.vcxproj @@ -146,6 +146,8 @@ + + @@ -153,5 +155,7 @@ + + \ No newline at end of file diff --git a/src/modules/powerrename/UWPui/packages.config b/src/modules/powerrename/UWPui/packages.config index 81f107b8bc..f93921797a 100644 --- a/src/modules/powerrename/UWPui/packages.config +++ b/src/modules/powerrename/UWPui/packages.config @@ -1,4 +1,6 @@  + + \ No newline at end of file diff --git a/src/modules/powerrename/dll/PowerRenameExt.vcxproj b/src/modules/powerrename/dll/PowerRenameExt.vcxproj index 17d52b0aa6..56dc44af79 100644 --- a/src/modules/powerrename/dll/PowerRenameExt.vcxproj +++ b/src/modules/powerrename/dll/PowerRenameExt.vcxproj @@ -218,6 +218,8 @@ + + @@ -225,5 +227,7 @@ + + \ No newline at end of file diff --git a/src/modules/powerrename/dll/Resources.resx b/src/modules/powerrename/dll/Resources.resx index bb6727ab76..2347ab2bc6 100644 --- a/src/modules/powerrename/dll/Resources.resx +++ b/src/modules/powerrename/dll/Resources.resx @@ -144,4 +144,8 @@ Only show the PowerRename menu item on the extended context menu (Shift + Right-click). - \ No newline at end of file + + Use Boost library (provides extended features but may use different regex syntax). + Boost is a product name, should not be translated + + diff --git a/src/modules/powerrename/dll/dllmain.cpp b/src/modules/powerrename/dll/dllmain.cpp index d9aede9323..606add869e 100644 --- a/src/modules/powerrename/dll/dllmain.cpp +++ b/src/modules/powerrename/dll/dllmain.cpp @@ -234,6 +234,11 @@ public: GET_RESOURCE_STRING(IDS_EXTENDED_MENU_INFO), CSettingsInstance().GetExtendedContextMenuOnly()); + settings.add_bool_toggle( + L"bool_use_boost_lib", + GET_RESOURCE_STRING(IDS_USE_BOOST_LIB), + CSettingsInstance().GetUseBoostLib()); + return settings.serialize_to_buffer(buffer, buffer_size); } @@ -252,6 +257,7 @@ public: CSettingsInstance().SetMaxMRUSize(values.get_int_value(L"int_max_mru_size").value()); CSettingsInstance().SetShowIconOnMenu(values.get_bool_value(L"bool_show_icon_on_menu").value()); CSettingsInstance().SetExtendedContextMenuOnly(values.get_bool_value(L"bool_show_extended_menu").value()); + CSettingsInstance().SetUseBoostLib(values.get_bool_value(L"bool_use_boost_lib").value()); CSettingsInstance().Save(); Trace::SettingsChanged(); diff --git a/src/modules/powerrename/dll/loc/it/src/modules/powerrename/dll/Resources.resx.lcl b/src/modules/powerrename/dll/loc/it/src/modules/powerrename/dll/Resources.resx.lcl index bbe5f5aa47..9c3a2a74ad 100644 --- a/src/modules/powerrename/dll/loc/it/src/modules/powerrename/dll/Resources.resx.lcl +++ b/src/modules/powerrename/dll/loc/it/src/modules/powerrename/dll/Resources.resx.lcl @@ -28,7 +28,7 @@ - + @@ -46,7 +46,7 @@ - + @@ -55,7 +55,7 @@ - + @@ -82,6 +82,15 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/modules/powerrename/dll/packages.config b/src/modules/powerrename/dll/packages.config index 81f107b8bc..f93921797a 100644 --- a/src/modules/powerrename/dll/packages.config +++ b/src/modules/powerrename/dll/packages.config @@ -1,4 +1,6 @@  + + \ No newline at end of file diff --git a/src/modules/powerrename/lib/PowerRenameLib.vcxproj b/src/modules/powerrename/lib/PowerRenameLib.vcxproj index 733319fcb2..552bf6ce25 100644 --- a/src/modules/powerrename/lib/PowerRenameLib.vcxproj +++ b/src/modules/powerrename/lib/PowerRenameLib.vcxproj @@ -189,6 +189,8 @@ + + @@ -196,5 +198,7 @@ + + \ No newline at end of file diff --git a/src/modules/powerrename/lib/PowerRenameRegEx.cpp b/src/modules/powerrename/lib/PowerRenameRegEx.cpp index c3fc84a3e1..1bafd89d76 100644 --- a/src/modules/powerrename/lib/PowerRenameRegEx.cpp +++ b/src/modules/powerrename/lib/PowerRenameRegEx.cpp @@ -1,8 +1,10 @@ #include "pch.h" #include "PowerRenameRegEx.h" +#include "Settings.h" #include #include #include +#include using namespace std; @@ -177,6 +179,8 @@ CPowerRenameRegEx::CPowerRenameRegEx() : // Init to empty strings SHStrDup(L"", &m_searchTerm); SHStrDup(L"", &m_replaceTerm); + + _useBoostLib = CSettingsInstance().GetUseBoostLib(); } CPowerRenameRegEx::~CPowerRenameRegEx() @@ -206,14 +210,29 @@ HRESULT CPowerRenameRegEx::Replace(_In_ PCWSTR source, _Outptr_ PWSTR* result) if (m_flags & UseRegularExpressions) { - std::wregex pattern(m_searchTerm, (!(m_flags & CaseSensitive)) ? regex_constants::icase | regex_constants::ECMAScript : regex_constants::ECMAScript); - if (m_flags & MatchAllOccurences) + if (_useBoostLib) { - res = regex_replace(wstring(source), pattern, replaceTerm); + boost::wregex pattern(m_searchTerm, (!(m_flags & CaseSensitive)) ? boost::regex::icase | boost::regex::ECMAScript : boost::regex::ECMAScript); + if (m_flags & MatchAllOccurences) + { + res = boost::regex_replace(wstring(source), pattern, replaceTerm); + } + else + { + res = boost::regex_replace(wstring(source), pattern, replaceTerm, boost::regex_constants::format_first_only); + } } else { - res = regex_replace(wstring(source), pattern, replaceTerm, regex_constants::format_first_only); + std::wregex pattern(m_searchTerm, (!(m_flags & CaseSensitive)) ? regex_constants::icase | regex_constants::ECMAScript : regex_constants::ECMAScript); + if (m_flags & MatchAllOccurences) + { + res = regex_replace(wstring(source), pattern, replaceTerm); + } + else + { + res = regex_replace(wstring(source), pattern, replaceTerm, regex_constants::format_first_only); + } } } else diff --git a/src/modules/powerrename/lib/PowerRenameRegEx.h b/src/modules/powerrename/lib/PowerRenameRegEx.h index ea2aa2f5c5..1bef0c2885 100644 --- a/src/modules/powerrename/lib/PowerRenameRegEx.h +++ b/src/modules/powerrename/lib/PowerRenameRegEx.h @@ -39,6 +39,7 @@ protected: size_t _Find(std::wstring data, std::wstring toSearch, bool caseInsensitive, size_t pos); + bool _useBoostLib = false; DWORD m_flags = DEFAULT_FLAGS; PWSTR m_searchTerm = nullptr; PWSTR m_replaceTerm = nullptr; diff --git a/src/modules/powerrename/lib/Settings.cpp b/src/modules/powerrename/lib/Settings.cpp index b0d9b87b87..961c8057ae 100644 --- a/src/modules/powerrename/lib/Settings.cpp +++ b/src/modules/powerrename/lib/Settings.cpp @@ -31,6 +31,7 @@ namespace const wchar_t c_mruEnabled[] = L"MRUEnabled"; const wchar_t c_mruList[] = L"MRUList"; const wchar_t c_insertionIdx[] = L"InsertionIdx"; + const wchar_t c_useBoostLib[] = L"UseBoostLib"; unsigned int GetRegNumber(const std::wstring& valueName, unsigned int defaultValue) { @@ -414,6 +415,7 @@ void CSettings::Save() jsonData.SetNamedValue(c_maxMRUSize, json::value(settings.maxMRUSize)); jsonData.SetNamedValue(c_searchText, json::value(settings.searchText)); jsonData.SetNamedValue(c_replaceText, json::value(settings.replaceText)); + jsonData.SetNamedValue(c_useBoostLib, json::value(settings.useBoostLib)); json::to_file(jsonFilePath, jsonData); GetSystemTimeAsFileTime(&lastLoadedTime); @@ -457,6 +459,7 @@ void CSettings::MigrateFromRegistry() settings.flags = GetRegNumber(c_flags, 0); settings.searchText = GetRegString(c_searchText, L""); settings.replaceText = GetRegString(c_replaceText, L""); + settings.useBoostLib = false; // Never existed in registry, disabled by default. } void CSettings::ParseJson() @@ -499,6 +502,10 @@ void CSettings::ParseJson() { settings.replaceText = jsonSettings.GetNamedString(c_replaceText); } + if (json::has(jsonSettings, c_useBoostLib, json::JsonValueType::Boolean)) + { + settings.useBoostLib = jsonSettings.GetNamedBoolean(c_useBoostLib); + } } catch (const winrt::hresult_error&) { } } diff --git a/src/modules/powerrename/lib/Settings.h b/src/modules/powerrename/lib/Settings.h index f91ad4c9ec..dcc3d5f30c 100644 --- a/src/modules/powerrename/lib/Settings.h +++ b/src/modules/powerrename/lib/Settings.h @@ -51,6 +51,16 @@ public: settings.persistState = persistState; } + inline bool GetUseBoostLib() const + { + return settings.useBoostLib; + } + + inline void SetUseBoostLib(bool useBoostLib) + { + settings.useBoostLib = useBoostLib; + } + inline bool GetMRUEnabled() const { return settings.MRUEnabled; @@ -114,6 +124,7 @@ private: bool showIconOnMenu{ true }; bool extendedContextMenuOnly{ false }; // Disabled by default. bool persistState{ true }; + bool useBoostLib{ false }; // Disabled by default. bool MRUEnabled{ true }; unsigned int maxMRUSize{ 10 }; unsigned int flags{ 0 }; diff --git a/src/modules/powerrename/lib/packages.config b/src/modules/powerrename/lib/packages.config index 81f107b8bc..f93921797a 100644 --- a/src/modules/powerrename/lib/packages.config +++ b/src/modules/powerrename/lib/packages.config @@ -1,4 +1,6 @@  + + \ No newline at end of file diff --git a/src/modules/powerrename/lib/trace.cpp b/src/modules/powerrename/lib/trace.cpp index ff539984f0..f04a085df0 100644 --- a/src/modules/powerrename/lib/trace.cpp +++ b/src/modules/powerrename/lib/trace.cpp @@ -85,5 +85,6 @@ void Trace::SettingsChanged() noexcept TraceLoggingBoolean(CSettingsInstance().GetPersistState(), "PersistState"), TraceLoggingBoolean(CSettingsInstance().GetMRUEnabled(), "IsMRUEnabled"), TraceLoggingUInt64(CSettingsInstance().GetMaxMRUSize(), "MaxMRUSize"), + TraceLoggingBoolean(CSettingsInstance().GetUseBoostLib(), "UseBoostLib"), TraceLoggingUInt64(CSettingsInstance().GetFlags(), "Flags")); } diff --git a/src/modules/powerrename/testapp/PowerRenameTest.vcxproj b/src/modules/powerrename/testapp/PowerRenameTest.vcxproj index 0ce40dc8c0..066763927f 100644 --- a/src/modules/powerrename/testapp/PowerRenameTest.vcxproj +++ b/src/modules/powerrename/testapp/PowerRenameTest.vcxproj @@ -202,6 +202,8 @@ + + @@ -209,5 +211,7 @@ + + \ No newline at end of file diff --git a/src/modules/powerrename/testapp/packages.config b/src/modules/powerrename/testapp/packages.config index 81f107b8bc..f93921797a 100644 --- a/src/modules/powerrename/testapp/packages.config +++ b/src/modules/powerrename/testapp/packages.config @@ -1,4 +1,6 @@  + + \ No newline at end of file diff --git a/src/modules/powerrename/ui/loc/cs/src/modules/powerrename/ui/Resources.resx.lcl b/src/modules/powerrename/ui/loc/cs/src/modules/powerrename/ui/Resources.resx.lcl index 7907dc9ef5..ebe5cc481a 100644 --- a/src/modules/powerrename/ui/loc/cs/src/modules/powerrename/ui/Resources.resx.lcl +++ b/src/modules/powerrename/ui/loc/cs/src/modules/powerrename/ui/Resources.resx.lcl @@ -37,11 +37,20 @@ - + - + - + + + + + + + + + + @@ -118,12 +127,24 @@ + + + + + + + + + - + - + + + + diff --git a/src/modules/powerrename/ui/loc/de/src/modules/powerrename/ui/Resources.resx.lcl b/src/modules/powerrename/ui/loc/de/src/modules/powerrename/ui/Resources.resx.lcl index a261e2db06..838483566c 100644 --- a/src/modules/powerrename/ui/loc/de/src/modules/powerrename/ui/Resources.resx.lcl +++ b/src/modules/powerrename/ui/loc/de/src/modules/powerrename/ui/Resources.resx.lcl @@ -37,11 +37,20 @@ - + - + - + + + + + + + + + + @@ -118,12 +127,24 @@ + + + + + + + + + - + - + + + + diff --git a/src/modules/powerrename/ui/loc/fr/src/modules/powerrename/ui/Resources.resx.lcl b/src/modules/powerrename/ui/loc/fr/src/modules/powerrename/ui/Resources.resx.lcl index db6d7cc702..6e2f74d524 100644 --- a/src/modules/powerrename/ui/loc/fr/src/modules/powerrename/ui/Resources.resx.lcl +++ b/src/modules/powerrename/ui/loc/fr/src/modules/powerrename/ui/Resources.resx.lcl @@ -37,11 +37,20 @@ - + - + - + + + + + + + + + + @@ -118,12 +127,24 @@ + + + + + + + + + - + - + + + + diff --git a/src/modules/powerrename/ui/loc/ja/src/modules/powerrename/ui/Resources.resx.lcl b/src/modules/powerrename/ui/loc/ja/src/modules/powerrename/ui/Resources.resx.lcl index 3727839476..f2641b91f8 100644 --- a/src/modules/powerrename/ui/loc/ja/src/modules/powerrename/ui/Resources.resx.lcl +++ b/src/modules/powerrename/ui/loc/ja/src/modules/powerrename/ui/Resources.resx.lcl @@ -37,11 +37,20 @@ - + - + - + + + + + + + + + + @@ -118,12 +127,24 @@ + + + + + + + + + - + - + + + + diff --git a/src/modules/powerrename/ui/loc/ko/src/modules/powerrename/ui/Resources.resx.lcl b/src/modules/powerrename/ui/loc/ko/src/modules/powerrename/ui/Resources.resx.lcl index 79d4336d1b..6be2df18c1 100644 --- a/src/modules/powerrename/ui/loc/ko/src/modules/powerrename/ui/Resources.resx.lcl +++ b/src/modules/powerrename/ui/loc/ko/src/modules/powerrename/ui/Resources.resx.lcl @@ -37,11 +37,20 @@ - + - + - + + + + + + + + + + @@ -118,12 +127,24 @@ + + + + + + + + + - + - + + + + diff --git a/src/modules/powerrename/ui/loc/nl/src/modules/powerrename/ui/Resources.resx.lcl b/src/modules/powerrename/ui/loc/nl/src/modules/powerrename/ui/Resources.resx.lcl index 3bdc44ab47..9ea17e461a 100644 --- a/src/modules/powerrename/ui/loc/nl/src/modules/powerrename/ui/Resources.resx.lcl +++ b/src/modules/powerrename/ui/loc/nl/src/modules/powerrename/ui/Resources.resx.lcl @@ -37,11 +37,20 @@ - + - + - + + + + + + + + + + @@ -118,12 +127,24 @@ + + + + + + + + + - + - + + + + diff --git a/src/modules/powerrename/ui/loc/pl/src/modules/powerrename/ui/Resources.resx.lcl b/src/modules/powerrename/ui/loc/pl/src/modules/powerrename/ui/Resources.resx.lcl index 94b2680ebc..8d9b3f981f 100644 --- a/src/modules/powerrename/ui/loc/pl/src/modules/powerrename/ui/Resources.resx.lcl +++ b/src/modules/powerrename/ui/loc/pl/src/modules/powerrename/ui/Resources.resx.lcl @@ -37,11 +37,20 @@ - + - + - + + + + + + + + + + @@ -118,12 +127,24 @@ + + + + + + + + + - + - + + + + diff --git a/src/modules/powerrename/ui/loc/ru/src/modules/powerrename/ui/Resources.resx.lcl b/src/modules/powerrename/ui/loc/ru/src/modules/powerrename/ui/Resources.resx.lcl index 97e05024d5..741ff97932 100644 --- a/src/modules/powerrename/ui/loc/ru/src/modules/powerrename/ui/Resources.resx.lcl +++ b/src/modules/powerrename/ui/loc/ru/src/modules/powerrename/ui/Resources.resx.lcl @@ -37,11 +37,20 @@ - + - + - + + + + + + + + + + @@ -118,12 +127,24 @@ + + + + + + + + + - + - + + + + diff --git a/src/modules/powerrename/ui/loc/sv/src/modules/powerrename/ui/Resources.resx.lcl b/src/modules/powerrename/ui/loc/sv/src/modules/powerrename/ui/Resources.resx.lcl index 9063c0ff99..5222ec021c 100644 --- a/src/modules/powerrename/ui/loc/sv/src/modules/powerrename/ui/Resources.resx.lcl +++ b/src/modules/powerrename/ui/loc/sv/src/modules/powerrename/ui/Resources.resx.lcl @@ -37,11 +37,20 @@ - + - + - + + + + + + + + + + @@ -118,12 +127,24 @@ + + + + + + + + + - + - + + + + diff --git a/src/modules/powerrename/ui/loc/zh-Hans/src/modules/powerrename/ui/Resources.resx.lcl b/src/modules/powerrename/ui/loc/zh-Hans/src/modules/powerrename/ui/Resources.resx.lcl index 15d6097287..461b6948d9 100644 --- a/src/modules/powerrename/ui/loc/zh-Hans/src/modules/powerrename/ui/Resources.resx.lcl +++ b/src/modules/powerrename/ui/loc/zh-Hans/src/modules/powerrename/ui/Resources.resx.lcl @@ -37,11 +37,20 @@ - + - + - + + + + + + + + + + @@ -118,12 +127,24 @@ + + + + + + + + + - + - + + + + diff --git a/src/modules/powerrename/ui/loc/zh-Hant/src/modules/powerrename/ui/Resources.resx.lcl b/src/modules/powerrename/ui/loc/zh-Hant/src/modules/powerrename/ui/Resources.resx.lcl index 1fe817eeeb..d520b17748 100644 --- a/src/modules/powerrename/ui/loc/zh-Hant/src/modules/powerrename/ui/Resources.resx.lcl +++ b/src/modules/powerrename/ui/loc/zh-Hant/src/modules/powerrename/ui/Resources.resx.lcl @@ -37,11 +37,20 @@ - + - + - + + + + + + + + + + @@ -118,12 +127,24 @@ + + + + + + + + + - + - + + + + diff --git a/src/modules/powerrename/unittests/PowerRenameLibUnitTests.vcxproj b/src/modules/powerrename/unittests/PowerRenameLibUnitTests.vcxproj index 03fe128bad..8f27a9ca47 100644 --- a/src/modules/powerrename/unittests/PowerRenameLibUnitTests.vcxproj +++ b/src/modules/powerrename/unittests/PowerRenameLibUnitTests.vcxproj @@ -1,4 +1,4 @@ - + @@ -196,6 +196,7 @@ + Create @@ -217,6 +218,8 @@ + + @@ -224,5 +227,7 @@ + + \ No newline at end of file diff --git a/src/modules/powerrename/unittests/PowerRenameLibUnitTests.vcxproj.filters b/src/modules/powerrename/unittests/PowerRenameLibUnitTests.vcxproj.filters index b8eb4c4f74..8708f3397e 100644 --- a/src/modules/powerrename/unittests/PowerRenameLibUnitTests.vcxproj.filters +++ b/src/modules/powerrename/unittests/PowerRenameLibUnitTests.vcxproj.filters @@ -8,6 +8,7 @@ + diff --git a/src/modules/powerrename/unittests/PowerRenameRegExBoostTests.cpp b/src/modules/powerrename/unittests/PowerRenameRegExBoostTests.cpp new file mode 100644 index 0000000000..9fe33b3a18 --- /dev/null +++ b/src/modules/powerrename/unittests/PowerRenameRegExBoostTests.cpp @@ -0,0 +1,437 @@ +#include "pch.h" +#include "CppUnitTest.h" +#include "powerrename/lib/Settings.h" +#include +#include +#include "MockPowerRenameRegExEvents.h" + +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + +namespace PowerRenameRegExBoostTests +{ + struct SearchReplaceExpected + { + PCWSTR search; + PCWSTR replace; + PCWSTR test; + PCWSTR expected; + }; + + TEST_CLASS(SimpleTests) + { + public: +TEST_CLASS_INITIALIZE(ClassInitialize) +{ + CSettingsInstance().SetUseBoostLib(true); +} + +TEST_CLASS_CLEANUP(ClassCleanup) +{ + CSettingsInstance().SetUseBoostLib(false); +} + +TEST_METHOD(GeneralReplaceTest) +{ + CComPtr renameRegEx; + Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK); + PWSTR result = nullptr; + Assert::IsTrue(renameRegEx->PutSearchTerm(L"foo") == S_OK); + Assert::IsTrue(renameRegEx->PutReplaceTerm(L"big") == S_OK); + Assert::IsTrue(renameRegEx->Replace(L"foobar", &result) == S_OK); + Assert::IsTrue(wcscmp(result, L"bigbar") == 0); + CoTaskMemFree(result); +} + +TEST_METHOD(ReplaceNoMatch) +{ + CComPtr renameRegEx; + Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK); + PWSTR result = nullptr; + Assert::IsTrue(renameRegEx->PutSearchTerm(L"notfound") == S_OK); + Assert::IsTrue(renameRegEx->PutReplaceTerm(L"big") == S_OK); + Assert::IsTrue(renameRegEx->Replace(L"foobar", &result) == S_OK); + Assert::IsTrue(wcscmp(result, L"foobar") == 0); + CoTaskMemFree(result); +} + +TEST_METHOD(ReplaceNoSearchOrReplaceTerm) +{ + CComPtr renameRegEx; + Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK); + PWSTR result = nullptr; + Assert::IsTrue(renameRegEx->Replace(L"foobar", &result) != S_OK); + Assert::IsTrue(result == nullptr); + CoTaskMemFree(result); +} + +TEST_METHOD(ReplaceNoReplaceTerm) +{ + CComPtr renameRegEx; + Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK); + PWSTR result = nullptr; + Assert::IsTrue(renameRegEx->PutSearchTerm(L"foo") == S_OK); + Assert::IsTrue(renameRegEx->Replace(L"foobar", &result) == S_OK); + Assert::IsTrue(wcscmp(result, L"bar") == 0); + CoTaskMemFree(result); +} + +TEST_METHOD(ReplaceEmptyStringReplaceTerm) +{ + CComPtr renameRegEx; + Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK); + PWSTR result = nullptr; + Assert::IsTrue(renameRegEx->PutSearchTerm(L"foo") == S_OK); + Assert::IsTrue(renameRegEx->PutReplaceTerm(L"") == S_OK); + Assert::IsTrue(renameRegEx->Replace(L"foobar", &result) == S_OK); + Assert::IsTrue(wcscmp(result, L"bar") == 0); + CoTaskMemFree(result); +} + +TEST_METHOD(VerifyDefaultFlags) +{ + CComPtr renameRegEx; + Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK); + DWORD flags = 0; + Assert::IsTrue(renameRegEx->GetFlags(&flags) == S_OK); + Assert::IsTrue(flags == MatchAllOccurences); +} + +TEST_METHOD(VerifyCaseSensitiveSearch) +{ + CComPtr renameRegEx; + Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK); + DWORD flags = CaseSensitive; + Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK); + + SearchReplaceExpected sreTable[] = { + { L"Foo", L"Foo", L"FooBar", L"FooBar" }, + { L"Foo", L"boo", L"FooBar", L"booBar" }, + { L"Foo", L"boo", L"foobar", L"foobar" }, + { L"123", L"654", L"123456", L"654456" }, + }; + + for (int i = 0; i < ARRAYSIZE(sreTable); i++) + { + PWSTR result = nullptr; + Assert::IsTrue(renameRegEx->PutSearchTerm(sreTable[i].search) == S_OK); + Assert::IsTrue(renameRegEx->PutReplaceTerm(sreTable[i].replace) == S_OK); + Assert::IsTrue(renameRegEx->Replace(sreTable[i].test, &result) == S_OK); + Assert::IsTrue(wcscmp(result, sreTable[i].expected) == 0); + CoTaskMemFree(result); + } +} + +TEST_METHOD(VerifyReplaceFirstOnly) +{ + CComPtr renameRegEx; + Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK); + DWORD flags = 0; + Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK); + + SearchReplaceExpected sreTable[] = { + { L"B", L"BB", L"ABA", L"ABBA" }, + { L"B", L"A", L"ABBBA", L"AABBA" }, + { L"B", L"BBB", L"ABABAB", L"ABBBABAB" }, + }; + + for (int i = 0; i < ARRAYSIZE(sreTable); i++) + { + PWSTR result = nullptr; + Assert::IsTrue(renameRegEx->PutSearchTerm(sreTable[i].search) == S_OK); + Assert::IsTrue(renameRegEx->PutReplaceTerm(sreTable[i].replace) == S_OK); + Assert::IsTrue(renameRegEx->Replace(sreTable[i].test, &result) == S_OK); + Assert::IsTrue(wcscmp(result, sreTable[i].expected) == 0); + CoTaskMemFree(result); + } +} + +TEST_METHOD(VerifyReplaceAll) +{ + CComPtr renameRegEx; + Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK); + DWORD flags = MatchAllOccurences; + Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK); + + SearchReplaceExpected sreTable[] = { + { L"B", L"BB", L"ABA", L"ABBA" }, + { L"B", L"A", L"ABBBA", L"AAAAA" }, + { L"B", L"BBB", L"ABABAB", L"ABBBABBBABBB" }, + }; + + for (int i = 0; i < ARRAYSIZE(sreTable); i++) + { + PWSTR result = nullptr; + Assert::IsTrue(renameRegEx->PutSearchTerm(sreTable[i].search) == S_OK); + Assert::IsTrue(renameRegEx->PutReplaceTerm(sreTable[i].replace) == S_OK); + Assert::IsTrue(renameRegEx->Replace(sreTable[i].test, &result) == S_OK); + Assert::IsTrue(wcscmp(result, sreTable[i].expected) == 0); + CoTaskMemFree(result); + } +} + +TEST_METHOD(VerifyReplaceAllCaseInsensitive) +{ + CComPtr renameRegEx; + Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK); + DWORD flags = MatchAllOccurences | CaseSensitive; + Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK); + + SearchReplaceExpected sreTable[] = { + { L"B", L"BB", L"ABA", L"ABBA" }, + { L"B", L"A", L"ABBBA", L"AAAAA" }, + { L"B", L"BBB", L"ABABAB", L"ABBBABBBABBB" }, + { L"b", L"BBB", L"AbABAb", L"ABBBABABBB" }, + }; + + for (int i = 0; i < ARRAYSIZE(sreTable); i++) + { + PWSTR result = nullptr; + Assert::IsTrue(renameRegEx->PutSearchTerm(sreTable[i].search) == S_OK); + Assert::IsTrue(renameRegEx->PutReplaceTerm(sreTable[i].replace) == S_OK); + Assert::IsTrue(renameRegEx->Replace(sreTable[i].test, &result) == S_OK); + Assert::IsTrue(wcscmp(result, sreTable[i].expected) == 0); + CoTaskMemFree(result); + } +} + +TEST_METHOD(VerifyReplaceFirstOnlyUseRegEx) +{ + CComPtr renameRegEx; + Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK); + DWORD flags = UseRegularExpressions; + Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK); + + SearchReplaceExpected sreTable[] = { + { L"B", L"BB", L"ABA", L"ABBA" }, + { L"B", L"A", L"ABBBA", L"AABBA" }, + { L"B", L"BBB", L"ABABAB", L"ABBBABAB" }, + }; + + for (int i = 0; i < ARRAYSIZE(sreTable); i++) + { + PWSTR result = nullptr; + Assert::IsTrue(renameRegEx->PutSearchTerm(sreTable[i].search) == S_OK); + Assert::IsTrue(renameRegEx->PutReplaceTerm(sreTable[i].replace) == S_OK); + Assert::IsTrue(renameRegEx->Replace(sreTable[i].test, &result) == S_OK); + Assert::IsTrue(wcscmp(result, sreTable[i].expected) == 0); + CoTaskMemFree(result); + } +} + +TEST_METHOD(VerifyReplaceAllUseRegEx) +{ + CComPtr renameRegEx; + Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK); + DWORD flags = MatchAllOccurences | UseRegularExpressions; + Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK); + + SearchReplaceExpected sreTable[] = { + { L"B", L"BB", L"ABA", L"ABBA" }, + { L"B", L"A", L"ABBBA", L"AAAAA" }, + { L"B", L"BBB", L"ABABAB", L"ABBBABBBABBB" }, + }; + + for (int i = 0; i < ARRAYSIZE(sreTable); i++) + { + PWSTR result = nullptr; + Assert::IsTrue(renameRegEx->PutSearchTerm(sreTable[i].search) == S_OK); + Assert::IsTrue(renameRegEx->PutReplaceTerm(sreTable[i].replace) == S_OK); + Assert::IsTrue(renameRegEx->Replace(sreTable[i].test, &result) == S_OK); + Assert::IsTrue(wcscmp(result, sreTable[i].expected) == 0); + CoTaskMemFree(result); + } +} + +TEST_METHOD(VerifyReplaceAllUseRegExCaseSensitive) +{ + CComPtr renameRegEx; + Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK); + DWORD flags = MatchAllOccurences | UseRegularExpressions | CaseSensitive; + Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK); + + SearchReplaceExpected sreTable[] = { + { L"B", L"BB", L"ABA", L"ABBA" }, + { L"B", L"A", L"ABBBA", L"AAAAA" }, + { L"b", L"BBB", L"AbABAb", L"ABBBABABBB" }, + }; + + for (int i = 0; i < ARRAYSIZE(sreTable); i++) + { + PWSTR result = nullptr; + Assert::IsTrue(renameRegEx->PutSearchTerm(sreTable[i].search) == S_OK); + Assert::IsTrue(renameRegEx->PutReplaceTerm(sreTable[i].replace) == S_OK); + Assert::IsTrue(renameRegEx->Replace(sreTable[i].test, &result) == S_OK); + Assert::IsTrue(wcscmp(result, sreTable[i].expected) == 0); + CoTaskMemFree(result); + } +} + +TEST_METHOD(VerifyMatchAllWildcardUseRegEx) +{ + CComPtr renameRegEx; + Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK); + DWORD flags = MatchAllOccurences | UseRegularExpressions; + Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK); + + // This differs from the Standard Library: .* has two matches (all and nothing). + SearchReplaceExpected sreTable[] = { + //search, replace, test, result + { L".*", L"Foo", L"AAAAAA", L"FooFoo" }, + { L".+", L"Foo", L"AAAAAA", L"Foo" }, + }; + + for (int i = 0; i < ARRAYSIZE(sreTable); i++) + { + PWSTR result = nullptr; + Assert::IsTrue(renameRegEx->PutSearchTerm(sreTable[i].search) == S_OK); + Assert::IsTrue(renameRegEx->PutReplaceTerm(sreTable[i].replace) == S_OK); + Assert::IsTrue(renameRegEx->Replace(sreTable[i].test, &result) == S_OK); + Assert::IsTrue(wcscmp(result, sreTable[i].expected) == 0); + CoTaskMemFree(result); + } +} + +void VerifyReplaceFirstWildcard(SearchReplaceExpected sreTable[], int tableSize, DWORD flags) +{ + CComPtr renameRegEx; + Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK); + Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK); + + for (int i = 0; i < tableSize; i++) + { + PWSTR result = nullptr; + Assert::IsTrue(renameRegEx->PutSearchTerm(sreTable[i].search) == S_OK); + Assert::IsTrue(renameRegEx->PutReplaceTerm(sreTable[i].replace) == S_OK); + Assert::IsTrue(renameRegEx->Replace(sreTable[i].test, &result) == S_OK); + Assert::AreEqual(sreTable[i].expected, result); + CoTaskMemFree(result); + } +} + +TEST_METHOD(VerifyReplaceFirstWildCardUseRegex) +{ + SearchReplaceExpected sreTable[] = { + //search, replace, test, result + { L".*", L"Foo", L"AAAAAA", L"Foo" }, + }; + VerifyReplaceFirstWildcard(sreTable, ARRAYSIZE(sreTable), UseRegularExpressions); +} + +TEST_METHOD(VerifyReplaceFirstWildCardUseRegexMatchAllOccurrences) +{ + // This differs from the Standard Library: .* has two matches (all and nothing). + SearchReplaceExpected sreTable[] = { + //search, replace, test, result + { L".*", L"Foo", L"AAAAAA", L"FooFoo" }, + { L".+", L"Foo", L"AAAAAA", L"Foo" }, + }; + VerifyReplaceFirstWildcard(sreTable, ARRAYSIZE(sreTable), UseRegularExpressions | MatchAllOccurences); +} + +TEST_METHOD(VerifyReplaceFirstWildCardMatchAllOccurrences) +{ + SearchReplaceExpected sreTable[] = { + //search, replace, test, result + { L".*", L"Foo", L"AAAAAA", L"AAAAAA" }, + { L".*", L"Foo", L".*", L"Foo" }, + { L".*", L"Foo", L".*Bar.*", L"FooBarFoo" }, + }; + VerifyReplaceFirstWildcard(sreTable, ARRAYSIZE(sreTable), MatchAllOccurences); +} + +TEST_METHOD(VerifyReplaceFirstWildNoFlags) +{ + SearchReplaceExpected sreTable[] = { + //search, replace, test, result + { L".*", L"Foo", L"AAAAAA", L"AAAAAA" }, + { L".*", L"Foo", L".*", L"Foo" }, + }; + VerifyReplaceFirstWildcard(sreTable, ARRAYSIZE(sreTable), 0); +} + +TEST_METHOD(VerifyHandleCapturingGroups) +{ + // This differs from the Standard Library: Boost does not recognize $123 as $1 and "23". + // To use a capturing group followed by numbers as replacement curly braces are needed. + CComPtr renameRegEx; + Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK); + DWORD flags = MatchAllOccurences | UseRegularExpressions | CaseSensitive; + Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK); + + SearchReplaceExpected sreTable[] = { + //search, replace, test, result + { L"(foo)(bar)", L"$1_$002_$223_$001021_$00001", L"foobar", L"foo_$002__$001021_$00001" }, + { L"(foo)(bar)", L"$1_$002_${2}23_$001021_$00001", L"foobar", L"foo_$002_bar23_$001021_$00001" }, + { L"(foo)(bar)", L"_$1$2_$123$040", L"foobar", L"_foobar_$040" }, + { L"(foo)(bar)", L"_$1$2_${1}23$040", L"foobar", L"_foobar_foo23$040" }, + { L"(foo)(bar)", L"$$$1", L"foobar", L"$foo" }, + { L"(foo)(bar)", L"$$1", L"foobar", L"$1" }, + { L"(foo)(bar)", L"$12", L"foobar", L"" }, + { L"(foo)(bar)", L"${1}2", L"foobar", L"foo2" }, + { L"(foo)(bar)", L"$10", L"foobar", L"" }, + { L"(foo)(bar)", L"${1}0", L"foobar", L"foo0" }, + { L"(foo)(bar)", L"$01", L"foobar", L"$01" }, + { L"(foo)(bar)", L"$$$11", L"foobar", L"$" }, + { L"(foo)(bar)", L"$$${1}1", L"foobar", L"$foo1" }, + { L"(foo)(bar)", L"$$$$113a", L"foobar", L"$$113a" }, + }; + + for (int i = 0; i < ARRAYSIZE(sreTable); i++) + { + PWSTR result = nullptr; + Assert::IsTrue(renameRegEx->PutSearchTerm(sreTable[i].search) == S_OK); + Assert::IsTrue(renameRegEx->PutReplaceTerm(sreTable[i].replace) == S_OK); + Assert::IsTrue(renameRegEx->Replace(sreTable[i].test, &result) == S_OK); + Assert::IsTrue(wcscmp(result, sreTable[i].expected) == 0); + CoTaskMemFree(result); + } +} + +TEST_METHOD(VerifyLookbehind) +{ + SearchReplaceExpected sreTable[] = { + //search, replace, test, result + { L"(?<=E12).*", L"Foo", L"AAE12BBB", L"AAE12Foo" }, + { L"(?<=E12).+", L"Foo", L"AAE12BBB", L"AAE12Foo" }, + { L"(?<=E\\d\\d).+", L"Foo", L"AAE12BBB", L"AAE12Foo" }, + { L"(? renameRegEx; + Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK); + Assert::IsTrue(renameRegEx->PutFlags(UseRegularExpressions) == S_OK); + + for (int i = 0; i < ARRAYSIZE(sreTable); i++) + { + PWSTR result = nullptr; + Assert::IsTrue(renameRegEx->PutSearchTerm(sreTable[i].search) == S_OK); + Assert::IsTrue(renameRegEx->PutReplaceTerm(sreTable[i].replace) == S_OK); + Assert::IsTrue(renameRegEx->Replace(sreTable[i].test, &result) == S_OK); + Assert::IsTrue(wcscmp(result, sreTable[i].expected) == 0); + CoTaskMemFree(result); + } +} + +TEST_METHOD(VerifyEventsFire) +{ + CComPtr renameRegEx; + Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK); + CMockPowerRenameRegExEvents* mockEvents = new CMockPowerRenameRegExEvents(); + CComPtr regExEvents; + Assert::IsTrue(mockEvents->QueryInterface(IID_PPV_ARGS(®ExEvents)) == S_OK); + DWORD cookie = 0; + Assert::IsTrue(renameRegEx->Advise(regExEvents, &cookie) == S_OK); + DWORD flags = MatchAllOccurences | UseRegularExpressions | CaseSensitive; + Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK); + Assert::IsTrue(renameRegEx->PutSearchTerm(L"FOO") == S_OK); + Assert::IsTrue(renameRegEx->PutReplaceTerm(L"BAR") == S_OK); + Assert::IsTrue(lstrcmpi(L"FOO", mockEvents->m_searchTerm) == 0); + Assert::IsTrue(lstrcmpi(L"BAR", mockEvents->m_replaceTerm) == 0); + Assert::IsTrue(flags == mockEvents->m_flags); + Assert::IsTrue(renameRegEx->UnAdvise(cookie) == S_OK); + mockEvents->Release(); +} +}; +} diff --git a/src/modules/powerrename/unittests/PowerRenameRegExTests.cpp b/src/modules/powerrename/unittests/PowerRenameRegExTests.cpp index 69a041b885..356dbe42b9 100644 --- a/src/modules/powerrename/unittests/PowerRenameRegExTests.cpp +++ b/src/modules/powerrename/unittests/PowerRenameRegExTests.cpp @@ -1,5 +1,6 @@ #include "pch.h" #include "CppUnitTest.h" +#include "powerrename/lib/Settings.h" #include #include #include "MockPowerRenameRegExEvents.h" @@ -18,8 +19,14 @@ namespace PowerRenameRegExTests TEST_CLASS(SimpleTests){ public: - TEST_METHOD(GeneralReplaceTest){ - CComPtr renameRegEx; +TEST_CLASS_INITIALIZE(ClassInitialize) +{ + CSettingsInstance().SetUseBoostLib(false); +} + +TEST_METHOD(GeneralReplaceTest) +{ + CComPtr renameRegEx; Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK); PWSTR result = nullptr; Assert::IsTrue(renameRegEx->PutSearchTerm(L"foo") == S_OK); @@ -362,6 +369,30 @@ TEST_METHOD(VerifyHandleCapturingGroups) } } +TEST_METHOD(VerifyLookbehindFails) +{ + // Standard Library Regex Engine does not support lookbehind, thus test should fail. + SearchReplaceExpected sreTable[] = { + //search, replace, test, result + { L"(?<=E12).*", L"Foo", L"AAAAAA", nullptr }, + { L"(? renameRegEx; + Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK); + Assert::IsTrue(renameRegEx->PutFlags(UseRegularExpressions) == S_OK); + + for (int i = 0; i < ARRAYSIZE(sreTable); i++) + { + PWSTR result = nullptr; + Assert::IsTrue(renameRegEx->PutSearchTerm(sreTable[i].search) == S_OK); + Assert::IsTrue(renameRegEx->PutReplaceTerm(sreTable[i].replace) == S_OK); + Assert::IsTrue(renameRegEx->Replace(sreTable[i].test, &result) == E_FAIL); + Assert::AreEqual(sreTable[i].expected, result); + CoTaskMemFree(result); + } +} + TEST_METHOD(VerifyEventsFire) { CComPtr renameRegEx; diff --git a/src/modules/powerrename/unittests/packages.config b/src/modules/powerrename/unittests/packages.config index 81f107b8bc..f93921797a 100644 --- a/src/modules/powerrename/unittests/packages.config +++ b/src/modules/powerrename/unittests/packages.config @@ -1,4 +1,6 @@  + + \ No newline at end of file diff --git a/src/runner/Resources.resx b/src/runner/Resources.resx index 836c1340d3..c8c791df95 100644 --- a/src/runner/Resources.resx +++ b/src/runner/Resources.resx @@ -154,4 +154,11 @@ Snooze - \ No newline at end of file + + Settings + + + Exit + Exit as a verb, as in Exit the application + + diff --git a/src/runner/loc/cs/src/action_runner/Resources.resx.lcl b/src/runner/loc/cs/src/action_runner/Resources.resx.lcl deleted file mode 100644 index 89e892c2e6..0000000000 --- a/src/runner/loc/cs/src/action_runner/Resources.resx.lcl +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/runner/loc/cs/src/runner/Resources.resx.lcl b/src/runner/loc/cs/src/runner/Resources.resx.lcl new file mode 100644 index 0000000000..0d330e08ef --- /dev/null +++ b/src/runner/loc/cs/src/runner/Resources.resx.lcl @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/runner/loc/de/src/action_runner/Resources.resx.lcl b/src/runner/loc/de/src/runner/Resources.resx.lcl similarity index 100% rename from src/runner/loc/de/src/action_runner/Resources.resx.lcl rename to src/runner/loc/de/src/runner/Resources.resx.lcl diff --git a/src/runner/loc/es/src/action_runner/Resources.resx.lcl b/src/runner/loc/es/src/runner/Resources.resx.lcl similarity index 100% rename from src/runner/loc/es/src/action_runner/Resources.resx.lcl rename to src/runner/loc/es/src/runner/Resources.resx.lcl diff --git a/src/runner/loc/fr/src/action_runner/Resources.resx.lcl b/src/runner/loc/fr/src/runner/Resources.resx.lcl similarity index 100% rename from src/runner/loc/fr/src/action_runner/Resources.resx.lcl rename to src/runner/loc/fr/src/runner/Resources.resx.lcl diff --git a/src/runner/loc/hu/src/action_runner/Resources.resx.lcl b/src/runner/loc/hu/src/runner/Resources.resx.lcl similarity index 100% rename from src/runner/loc/hu/src/action_runner/Resources.resx.lcl rename to src/runner/loc/hu/src/runner/Resources.resx.lcl diff --git a/src/runner/loc/it/src/action_runner/Resources.resx.lcl b/src/runner/loc/it/src/runner/Resources.resx.lcl similarity index 100% rename from src/runner/loc/it/src/action_runner/Resources.resx.lcl rename to src/runner/loc/it/src/runner/Resources.resx.lcl diff --git a/src/runner/loc/ja/src/action_runner/Resources.resx.lcl b/src/runner/loc/ja/src/action_runner/Resources.resx.lcl deleted file mode 100644 index bee976fffd..0000000000 --- a/src/runner/loc/ja/src/action_runner/Resources.resx.lcl +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/runner/loc/ja/src/runner/Resources.resx.lcl b/src/runner/loc/ja/src/runner/Resources.resx.lcl new file mode 100644 index 0000000000..86703cdb8f --- /dev/null +++ b/src/runner/loc/ja/src/runner/Resources.resx.lcl @@ -0,0 +1,264 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Startup Settings.]]> + + スタートアップ設定を使用して手動で無効にされています。]]> + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/runner/loc/ko/src/action_runner/Resources.resx.lcl b/src/runner/loc/ko/src/action_runner/Resources.resx.lcl deleted file mode 100644 index 83398492a5..0000000000 --- a/src/runner/loc/ko/src/action_runner/Resources.resx.lcl +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/runner/loc/ko/src/runner/Resources.resx.lcl b/src/runner/loc/ko/src/runner/Resources.resx.lcl new file mode 100644 index 0000000000..1f76ab7fcc --- /dev/null +++ b/src/runner/loc/ko/src/runner/Resources.resx.lcl @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/runner/loc/nl/src/action_runner/Resources.resx.lcl b/src/runner/loc/nl/src/runner/Resources.resx.lcl similarity index 100% rename from src/runner/loc/nl/src/action_runner/Resources.resx.lcl rename to src/runner/loc/nl/src/runner/Resources.resx.lcl diff --git a/src/runner/loc/pl/src/action_runner/Resources.resx.lcl b/src/runner/loc/pl/src/action_runner/Resources.resx.lcl deleted file mode 100644 index e92c8753fe..0000000000 --- a/src/runner/loc/pl/src/action_runner/Resources.resx.lcl +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/runner/loc/pl/src/runner/Resources.resx.lcl b/src/runner/loc/pl/src/runner/Resources.resx.lcl new file mode 100644 index 0000000000..603dec5cb7 --- /dev/null +++ b/src/runner/loc/pl/src/runner/Resources.resx.lcl @@ -0,0 +1,261 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Startup Settings.]]> + + ustawień uruchamiania.]]> + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/runner/loc/pt-BR/src/action_runner/Resources.resx.lcl b/src/runner/loc/pt-BR/src/runner/Resources.resx.lcl similarity index 100% rename from src/runner/loc/pt-BR/src/action_runner/Resources.resx.lcl rename to src/runner/loc/pt-BR/src/runner/Resources.resx.lcl diff --git a/src/runner/loc/pt-PT/src/action_runner/Resources.resx.lcl b/src/runner/loc/pt-PT/src/runner/Resources.resx.lcl similarity index 100% rename from src/runner/loc/pt-PT/src/action_runner/Resources.resx.lcl rename to src/runner/loc/pt-PT/src/runner/Resources.resx.lcl diff --git a/src/runner/loc/ru/src/action_runner/Resources.resx.lcl b/src/runner/loc/ru/src/runner/Resources.resx.lcl similarity index 100% rename from src/runner/loc/ru/src/action_runner/Resources.resx.lcl rename to src/runner/loc/ru/src/runner/Resources.resx.lcl diff --git a/src/runner/loc/sv/src/action_runner/Resources.resx.lcl b/src/runner/loc/sv/src/action_runner/Resources.resx.lcl deleted file mode 100644 index c7408b5485..0000000000 --- a/src/runner/loc/sv/src/action_runner/Resources.resx.lcl +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/runner/loc/sv/src/runner/Resources.resx.lcl b/src/runner/loc/sv/src/runner/Resources.resx.lcl new file mode 100644 index 0000000000..8ade3d7309 --- /dev/null +++ b/src/runner/loc/sv/src/runner/Resources.resx.lcl @@ -0,0 +1,225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Startup Settings.]]> + + Startinställningar.]]> + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/runner/loc/tr/src/action_runner/Resources.resx.lcl b/src/runner/loc/tr/src/runner/Resources.resx.lcl similarity index 100% rename from src/runner/loc/tr/src/action_runner/Resources.resx.lcl rename to src/runner/loc/tr/src/runner/Resources.resx.lcl diff --git a/src/runner/loc/zh-Hans/src/action_runner/Resources.resx.lcl b/src/runner/loc/zh-Hans/src/action_runner/Resources.resx.lcl deleted file mode 100644 index dcae1a05a7..0000000000 --- a/src/runner/loc/zh-Hans/src/action_runner/Resources.resx.lcl +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/runner/loc/zh-Hans/src/runner/Resources.resx.lcl b/src/runner/loc/zh-Hans/src/runner/Resources.resx.lcl new file mode 100644 index 0000000000..510b488c9d --- /dev/null +++ b/src/runner/loc/zh-Hans/src/runner/Resources.resx.lcl @@ -0,0 +1,267 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Startup Settings.]]> + + 启动设置被手动禁用。]]> + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/runner/loc/zh-Hant/src/action_runner/Resources.resx.lcl b/src/runner/loc/zh-Hant/src/runner/Resources.resx.lcl similarity index 100% rename from src/runner/loc/zh-Hant/src/action_runner/Resources.resx.lcl rename to src/runner/loc/zh-Hant/src/runner/Resources.resx.lcl diff --git a/src/runner/tray_icon.cpp b/src/runner/tray_icon.cpp index 49ab345eae..1d95d9b73f 100644 --- a/src/runner/tray_icon.cpp +++ b/src/runner/tray_icon.cpp @@ -49,6 +49,14 @@ bool dispatch_run_on_main_ui_thread(main_loop_callback_function _callback, PVOID return true; } +void change_menu_item_text(const UINT item_id, wchar_t* new_text) +{ + MENUITEMINFOW menuitem = { .cbSize = sizeof(MENUITEMINFOW), .fMask = MIIM_TYPE | MIIM_DATA }; + GetMenuItemInfoW(h_menu, item_id, false, &menuitem); + menuitem.dwTypeData = new_text; + SetMenuItemInfoW(h_menu, item_id, false, &menuitem); +} + LRESULT __stdcall tray_icon_window_proc(HWND window, UINT message, WPARAM wparam, LPARAM lparam) { switch (message) @@ -125,6 +133,13 @@ LRESULT __stdcall tray_icon_window_proc(HWND window, UINT message, WPARAM wparam { h_menu = LoadMenu(reinterpret_cast(&__ImageBase), MAKEINTRESOURCE(ID_TRAY_MENU)); } + if (h_menu) + { + static std::wstring settings_menuitem_label = GET_RESOURCE_STRING(IDS_SETTINGS_MENU_TEXT); + static std::wstring exit_menuitem_label = GET_RESOURCE_STRING(IDS_EXIT_MENU_TEXT); + change_menu_item_text(ID_SETTINGS_MENU_COMMAND, settings_menuitem_label.data()); + change_menu_item_text(ID_EXIT_MENU_COMMAND, exit_menuitem_label.data()); + } if (!h_sub_menu) { h_sub_menu = GetSubMenu(h_menu, 0); @@ -193,7 +208,7 @@ void start_tray_icon() tray_icon_data.uID = id_tray_icon; tray_icon_data.uCallbackMessage = wm_icon_notify; std::wstring about_msg_pt_version = L"PowerToys\n" + get_product_version(); - wcscpy_s(tray_icon_data.szTip, sizeof(tray_icon_data.szTip) / sizeof(WCHAR), about_msg_pt_version.c_str()); + wcscpy_s(tray_icon_data.szTip, sizeof(tray_icon_data.szTip) / sizeof(WCHAR), about_msg_pt_version.c_str()); tray_icon_data.uFlags = NIF_ICON | NIF_TIP | NIF_MESSAGE; tray_icon_created = Shell_NotifyIcon(NIM_ADD, &tray_icon_data) == TRUE;