mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
[Localization] Move rc files to resx (#6057)
* Added localization code to pipeline and created one LocProject json for Settings * Fixed typo * Reordered nuget source * Moved nuget install to restore step * Added FZ.rc file to LocProj * Added FZ resx file and modified rc file * Fixed file names * Changed to check folder for LocProject files * Updated folder * Changed directory * Changed to src directory * Changed language set and name format, removed rc file localization * Added all projects with resx/resw files * Added newline to end of file * Removed nuget source as it is not used * Updated comments * Updated keyboard manager to use resx file * Tweaked resources.resx and added it to project files * Added comments and added in string table to resx script * Remove change from bad merge * Fix syntax error in convert stringtable * Changed file type to None * Migrated color picker's resources * Migrated resources for Microsoft.Launcher * Migrated resources for fancy zones * Revert fancyzones changes * Migrated resources for ImageResizer and modified script to add language specific code * Added try catch and checks for modification to avoid unnecessary file creation * Changed tab insertion to 4 spaces to avoid mixed file types in rc file * Migrated resources for power preview project * Added LocProject.json file for 5 projects * added resgen exception check * Moved non-localizable strings out of resx for powerpreview
This commit is contained in:
5
src/modules/keyboardmanager/Directory.Build.targets
Normal file
5
src/modules/keyboardmanager/Directory.Build.targets
Normal file
@@ -0,0 +1,5 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="GenerateResourceFiles" BeforeTargets="PrepareForBuild">
|
||||
<Exec Command="powershell -NonInteractive -executionpolicy Unrestricted $(SolutionDir)tools\build\convert-resx-to-rc.ps1 ..\dll resource.base.h resource.h KeyboardManager.base.rc KeyboardManager.rc" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "../common/shared_constants.h"
|
||||
#include <shlwapi.h>
|
||||
#include "../../common/common.h"
|
||||
#include "keyboardmanager/dll/resource.h"
|
||||
#include "keyboardmanager/dll/Generated Files/resource.h"
|
||||
#include "../common/keyboard_layout.h"
|
||||
extern "C" IMAGE_DOS_HEADER __ImageBase;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <string>
|
||||
#include <winrt/base.h>
|
||||
#include "../../common/common.h"
|
||||
#include "keyboardmanager/dll/resource.h"
|
||||
#include "keyboardmanager/dll/Generated Files/resource.h"
|
||||
extern "C" IMAGE_DOS_HEADER __ImageBase;
|
||||
|
||||
namespace KeyboardManagerConstants
|
||||
|
||||
42
src/modules/keyboardmanager/dll/KeyboardManager.base.rc
Normal file
42
src/modules/keyboardmanager/dll/KeyboardManager.base.rc
Normal file
@@ -0,0 +1,42 @@
|
||||
#include <windows.h>
|
||||
#include "resource.h"
|
||||
#include "../../../../common/version.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
#include "winres.h"
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
IDS_KEYBOARDMANAGER_ICON ICON L"../Keyboard.ico"
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION FILE_VERSION
|
||||
PRODUCTVERSION PRODUCT_VERSION
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
FILETYPE VFT_DLL
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset
|
||||
BEGIN
|
||||
VALUE "CompanyName", COMPANY_NAME
|
||||
VALUE "FileDescription", FILE_DESCRIPTION
|
||||
VALUE "FileVersion", FILE_VERSION_STRING
|
||||
VALUE "InternalName", INTERNAL_NAME
|
||||
VALUE "LegalCopyright", COPYRIGHT_NOTE
|
||||
VALUE "OriginalFilename", ORIGINAL_FILENAME
|
||||
VALUE "ProductName", PRODUCT_NAME
|
||||
VALUE "ProductVersion", PRODUCT_VERSION_STRING
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset
|
||||
END
|
||||
END
|
||||
@@ -1,91 +0,0 @@
|
||||
#include <windows.h>
|
||||
#include "resource.h"
|
||||
#include "../../../common/version.h"
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SETTINGS_DESCRIPTION L"This feature requires Windows 10 version 1903 or higher"
|
||||
IDS_KEYBOARDMANAGER L"Keyboard Manager"
|
||||
IDS_CREATEWINDOWFAILED_ERRORMESSAGE L"Call to CreateWindow failed!"
|
||||
IDS_CREATEWINDOWFAILED_ERRORTITLE L"Error"
|
||||
IDS_REGISTERCLASSFAILED_ERRORMESSAGE L"Windows registration failed!"
|
||||
IDS_REGISTERCLASSFAILED_ERRORTITLE L"Error"
|
||||
IDS_EDITKEYBOARD_WINDOWNAME L"Remap keys"
|
||||
IDS_EDITSHORTCUTS_WINDOWNAME L"Remap shortcuts"
|
||||
IDS_OK_BUTTON L"OK"
|
||||
IDS_CANCEL_BUTTON L"Cancel"
|
||||
IDS_CONTINUE_BUTTON L"Continue Anyway"
|
||||
IDS_EDITKEYBOARD_SOURCEHEADER L"Key:"
|
||||
IDS_EDITKEYBOARD_TARGETHEADER L"Mapped To:"
|
||||
IDS_EDITSHORTCUTS_SOURCEHEADER L"Shortcut:"
|
||||
IDS_EDITSHORTCUTS_TARGETHEADER L"Mapped To:"
|
||||
IDS_EDITSHORTCUTS_TARGETAPPHEADER L"Target App:"
|
||||
IDS_EDITKEYBOARD_ORPHANEDDIALOGTITLE L"The following keys are unassigned and you won't be able to use them:"
|
||||
IDS_EDITKEYBOARD_PARTIALCONFIRMATIONDIALOGTITLE L"Some of the keys could not be remapped. Do you want to continue anyway?"
|
||||
IDS_EDITSHORTCUTS_PARTIALCONFIRMATIONDIALOGTITLE L"Some of the shortcuts could not be remapped. Do you want to continue anyway?"
|
||||
IDS_EDITKEYBOARD_INFO L"Select the key you want to change (Key) and then the key or shortcut you want it to become (Mapped To)."
|
||||
IDS_EDITKEYBOARD_INFOEXAMPLE L"For example, if you want to press A and get ""Ctrl+C"", key ""A"" would be your ""Key"" column and the shortcut ""Ctrl+C"" would be your ""Mapped To"" column."
|
||||
IDS_EDITSHORTCUTS_INFO L"Select the shortcut you want to change (Shortcut) and then the key or shortcut you want it to invoke (Mapped To)."
|
||||
IDS_EDITSHORTCUTS_INFOEXAMPLE L"For example, if you want to press ""Ctrl+C"" and get ""Alt"" only on Microsoft Edge, ""Ctrl+C"" would be your ""Shortcut"" column, the key ""Alt"" would be your ""Mapped To"" column, and ""MSEdge"" would be your ""Target App"" column. If no target app is entered, it will apply globally. The name must be the process name and not the app name."
|
||||
IDS_TYPE_BUTTON L"Type"
|
||||
IDS_TYPEKEY_TITLE L"Press a key on selected keyboard:"
|
||||
IDS_TYPESHORTCUT_TITLE L"Press the keys in shortcut:"
|
||||
IDS_TYPEKEY_HEADER L"Key Pressed:"
|
||||
IDS_TYPESHORTCUT_HEADER L"Keys Pressed:"
|
||||
IDS_TYPE_HOLDENTER L"Hold Enter to continue"
|
||||
IDS_TYPE_HOLDESC L"Hold Esc to discard"
|
||||
IDS_EDITSHORTCUTS_ALLAPPS L"All Apps"
|
||||
IDS_ERRORMESSAGE_REMAPSUCCESSFUL L"Remapping successful"
|
||||
IDS_ERRORMESSAGE_REMAPUNSUCCESSFUL L"Some remappings were not applied"
|
||||
IDS_ERRORMESSAGE_SAMEKEYPREVIOUSLYMAPPED L"Cannot remap a key more than once"
|
||||
IDS_ERRORMESSAGE_MAPPEDTOSAMEKEY L"Cannot remap a key to itself"
|
||||
IDS_ERRORMESSAGE_CONFLICTINGMODIFIERKEY L"Cannot remap this key as it conflicts with another remapped key"
|
||||
IDS_ERRORMESSAGE_SAMESHORTCUTPREVIOUSLYMAPPED L"Cannot remap a shortcut more than once for the same target app"
|
||||
IDS_ERRORMESSAGE_MAPTOSAMESHORTCUT L"Cannot remap a shortcut to itself"
|
||||
IDS_ERRORMESSAGE_CONFLICTINGMODIFIERSHORTCUT L"Cannot remap this shortcut as it conflicts with another remapped shortcut"
|
||||
IDS_ERRORMESSAGE_WINL L"Cannot remap from/to Win L"
|
||||
IDS_ERRORMESSAGE_CTRLALTDEL L"Cannot remap from/to Ctrl Alt Del"
|
||||
IDS_ERRORMESSAGE_SAVEFAILED L"Failed to save the remappings"
|
||||
IDS_ERRORMESSAGE_SHORTCUTSTARTWITHMODIFIER L"Shortcut must start with a modifier key"
|
||||
IDS_ERRORMESSAGE_SHORTCUTNOREPEATEDMODIFIER L"Shortcut cannot contain a repeated modifier"
|
||||
IDS_ERRORMESSAGE_SHORTCUTATLEAST2KEYS L"Shortcut must have atleast 2 keys"
|
||||
IDS_ERRORMESSAGE_SHORTCUTONEACTIONKEY L"Shortcut must contain an action key"
|
||||
IDS_ERRORMESSAGE_SHORTCUTMAXONEACTIONKEY L"Shortcut cannot have more than one action key"
|
||||
IDS_ERRORMESSAGE_MAXSHORTCUTSIZE L"Shortcuts can only have up to 2 modifier keys"
|
||||
IDS_ERRORMESSAGE_DEFAULT L"Unexpected error"
|
||||
END
|
||||
|
||||
IDS_KEYBOARDMANAGER_ICON ICON L"Keyboard.ico"
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION FILE_VERSION
|
||||
PRODUCTVERSION PRODUCT_VERSION
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
FILETYPE VFT_DLL
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset
|
||||
BEGIN
|
||||
VALUE "CompanyName", COMPANY_NAME
|
||||
VALUE "FileDescription", FILE_DESCRIPTION
|
||||
VALUE "FileVersion", FILE_VERSION_STRING
|
||||
VALUE "InternalName", INTERNAL_NAME
|
||||
VALUE "LegalCopyright", COPYRIGHT_NOTE
|
||||
VALUE "OriginalFilename", ORIGINAL_FILENAME
|
||||
VALUE "ProductName", PRODUCT_NAME
|
||||
VALUE "ProductVersion", PRODUCT_VERSION_STRING
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset
|
||||
END
|
||||
END
|
||||
@@ -118,12 +118,14 @@
|
||||
<ClInclude Include="Input.h" />
|
||||
<ClInclude Include="KeyboardEventHandlers.h" />
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="Generated Files\resource.h" />
|
||||
<None Include="resource.base.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dllmain.cpp" />
|
||||
<ClCompile Include="Input.cpp" />
|
||||
<ClCompile Include="KeyboardEventHandlers.cpp" />
|
||||
<None Include="KeyboardManager.base.rc" />
|
||||
<ClCompile Include="pch.cpp">
|
||||
<PrecompiledHeader Condition="'$(CIBuild)'!='true'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
@@ -140,7 +142,7 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="KeyboardManager.rc" />
|
||||
<ResourceCompile Include="Generated Files\KeyboardManager.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Keyboard.ico" />
|
||||
@@ -148,6 +150,9 @@
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources.resx" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.200729.8\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.200729.8\build\native\Microsoft.Windows.CppWinRT.targets')" />
|
||||
|
||||
@@ -21,12 +21,12 @@
|
||||
<ClInclude Include="pch.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Input.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Generated Files\resource.h">
|
||||
<Filter>Generated Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
@@ -41,6 +41,9 @@
|
||||
<UniqueIdentifier>{92a52637-acd2-441f-822d-430b726eade6}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Generated Files">
|
||||
<UniqueIdentifier>{6581121b-1555-4598-8034-ab196538f593}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Keyboard.ico">
|
||||
@@ -48,11 +51,20 @@
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="KeyboardManager.rc">
|
||||
<None Include="packages.config" />
|
||||
<None Include="KeyboardManager.base.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</None>
|
||||
<None Include="resource.base.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</None>
|
||||
<None Include="Resources.resx">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
<ResourceCompile Include="Generated Files\KeyboardManager.rc">
|
||||
<Filter>Generated Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
14
src/modules/keyboardmanager/dll/LocProject.json
Normal file
14
src/modules/keyboardmanager/dll/LocProject.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"Projects": [
|
||||
{
|
||||
"LanguageSet": "Azure_Languages",
|
||||
"LocItems": [
|
||||
{
|
||||
"SourceFile": "src\\modules\\keyboardmanager\\dll\\Resources.resx",
|
||||
"CopyOption": "LangIDOnName",
|
||||
"OutputPath": "src\\modules\\keyboardmanager\\dll"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
267
src/modules/keyboardmanager/dll/Resources.resx
Normal file
267
src/modules/keyboardmanager/dll/Resources.resx
Normal file
@@ -0,0 +1,267 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Settings_Description" xml:space="preserve">
|
||||
<value>This feature requires Windows 10 version 1903 or higher</value>
|
||||
</data>
|
||||
<data name="KeyboardManager" xml:space="preserve">
|
||||
<value>Keyboard Manager</value>
|
||||
</data>
|
||||
<data name="CreateWindowFailed_ErrorMessage" xml:space="preserve">
|
||||
<value>Call to CreateWindow failed!</value>
|
||||
</data>
|
||||
<data name="CreateWindowFailed_ErrorTitle" xml:space="preserve">
|
||||
<value>Error</value>
|
||||
</data>
|
||||
<data name="RegisterClassFailed_ErrorMessage" xml:space="preserve">
|
||||
<value>Windows registration failed!</value>
|
||||
</data>
|
||||
<data name="RegisterClassFailed_ErrorTitle" xml:space="preserve">
|
||||
<value>Error</value>
|
||||
</data>
|
||||
<data name="EditKeyboard_WindowName" xml:space="preserve">
|
||||
<value>Remap keys</value>
|
||||
</data>
|
||||
<data name="EditShortcuts_WindowName" xml:space="preserve">
|
||||
<value>Remap shortcuts</value>
|
||||
</data>
|
||||
<data name="Ok_Button" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="Cancel_Button" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name="Continue_Button" xml:space="preserve">
|
||||
<value>Continue Anyway</value>
|
||||
</data>
|
||||
<data name="EditKeyboard_SourceHeader" xml:space="preserve">
|
||||
<value>Key:</value>
|
||||
</data>
|
||||
<data name="EditKeyboard_TargetHeader" xml:space="preserve">
|
||||
<value>Mapped To:</value>
|
||||
</data>
|
||||
<data name="EditShortcuts_SourceHeader" xml:space="preserve">
|
||||
<value>Shortcut:</value>
|
||||
</data>
|
||||
<data name="EditShortcuts_TargetHeader" xml:space="preserve">
|
||||
<value>Mapped To:</value>
|
||||
</data>
|
||||
<data name="EditShortcuts_TargetAppHeader" xml:space="preserve">
|
||||
<value>Target App:</value>
|
||||
</data>
|
||||
<data name="EditKeyboard_OrphanedDialogTitle" xml:space="preserve">
|
||||
<value>The following keys are unassigned and you won't be able to use them:</value>
|
||||
</data>
|
||||
<data name="EditKeyboard_PartialConfirmationDialogTitle" xml:space="preserve">
|
||||
<value>Some of the keys could not be remapped. Do you want to continue anyway?</value>
|
||||
</data>
|
||||
<data name="EditShortcuts_PartialConfirmationDialogTitle" xml:space="preserve">
|
||||
<value>Some of the shortcuts could not be remapped. Do you want to continue anyway?</value>
|
||||
</data>
|
||||
<data name="EditKeyboard_Info" xml:space="preserve">
|
||||
<value>Select the key you want to change (Key) and then the key or shortcut you want it to become (Mapped To).</value>
|
||||
</data>
|
||||
<data name="EditKeyboard_InfoExample" xml:space="preserve">
|
||||
<value>For example, if you want to press A and get ""Ctrl+C"", key ""A"" would be your ""Key"" column and the shortcut ""Ctrl+C"" would be your ""Mapped To"" column.</value>
|
||||
</data>
|
||||
<data name="EditShortcuts_Info" xml:space="preserve">
|
||||
<value>Select the shortcut you want to change (Shortcut) and then the key or shortcut you want it to invoke (Mapped To).</value>
|
||||
</data>
|
||||
<data name="EditShortcuts_InfoExample" xml:space="preserve">
|
||||
<value>For example, if you want to press ""Ctrl+C"" and get ""Alt"" only on Microsoft Edge, ""Ctrl+C"" would be your ""Shortcut"" column, the key ""Alt"" would be your ""Mapped To"" column, and ""MSEdge"" would be your ""Target App"" column. If no target app is entered, it will apply globally. The name must be the process name and not the app name.</value>
|
||||
</data>
|
||||
<data name="Type_Button" xml:space="preserve">
|
||||
<value>Type</value>
|
||||
</data>
|
||||
<data name="TypeKey_Title" xml:space="preserve">
|
||||
<value>Press a key on selected keyboard:</value>
|
||||
</data>
|
||||
<data name="TypeShortcut_Title" xml:space="preserve">
|
||||
<value>Press the keys in shortcut:</value>
|
||||
</data>
|
||||
<data name="TypeKey_Header" xml:space="preserve">
|
||||
<value>Key Pressed:</value>
|
||||
</data>
|
||||
<data name="TypeShortcut_Header" xml:space="preserve">
|
||||
<value>Keys Pressed:</value>
|
||||
</data>
|
||||
<data name="Type_HoldEnter" xml:space="preserve">
|
||||
<value>Hold Enter to continue</value>
|
||||
</data>
|
||||
<data name="Type_HoldEsc" xml:space="preserve">
|
||||
<value>Hold Esc to discard</value>
|
||||
</data>
|
||||
<data name="EditShortcuts_AllApps" xml:space="preserve">
|
||||
<value>All Apps</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_RemapSuccessful" xml:space="preserve">
|
||||
<value>Remapping successful</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_RemapUnsuccessful" xml:space="preserve">
|
||||
<value>Some remappings were not applied</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_SameKeyPreviouslyMapped" xml:space="preserve">
|
||||
<value>Cannot remap a key more than once</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_MappedToSameKey" xml:space="preserve">
|
||||
<value>Cannot remap a key to itself</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_ConflictingModifierKey" xml:space="preserve">
|
||||
<value>Cannot remap this key as it conflicts with another remapped key</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_SameShortcutPreviouslyMapped" xml:space="preserve">
|
||||
<value>Cannot remap a shortcut more than once for the same target app</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_MapToSameShortcut" xml:space="preserve">
|
||||
<value>Cannot remap a shortcut to itself</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_ConflictingModifierShortcut" xml:space="preserve">
|
||||
<value>Cannot remap this shortcut as it conflicts with another remapped shortcut</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_WinL" xml:space="preserve">
|
||||
<value>Cannot remap from/to Win L</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_CtrlAltDel" xml:space="preserve">
|
||||
<value>Cannot remap from/to Ctrl Alt Del</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_SaveFailed" xml:space="preserve">
|
||||
<value>Failed to save the remappings</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_ShortcutStartWithModifier" xml:space="preserve">
|
||||
<value>Shortcut must start with a modifier key</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_ShortcutNoRepeatedModifier" xml:space="preserve">
|
||||
<value>Shortcut cannot contain a repeated modifier</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_ShortcutAtleast2Keys" xml:space="preserve">
|
||||
<value>Shortcut must have atleast 2 keys</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_ShortcutOneActionKey" xml:space="preserve">
|
||||
<value>Shortcut must contain an action key</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_ShortcutMaxOneActionKey" xml:space="preserve">
|
||||
<value>Shortcut cannot have more than one action key</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_MaxShortcutSize" xml:space="preserve">
|
||||
<value>Shortcuts can only have up to 2 modifier keys</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_Default" xml:space="preserve">
|
||||
<value>Unexpected error</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <interface/powertoy_module_interface.h>
|
||||
#include <common/settings_objects.h>
|
||||
#include <common/shared_constants.h>
|
||||
#include "resource.h"
|
||||
#include "Generated Files/resource.h"
|
||||
#include <keyboardmanager/ui/EditKeyboardWindow.h>
|
||||
#include <keyboardmanager/ui/EditShortcutsWindow.h>
|
||||
#include <keyboardmanager/common/KeyboardManagerState.h>
|
||||
|
||||
14
src/modules/keyboardmanager/dll/resource.base.h
Normal file
14
src/modules/keyboardmanager/dll/resource.base.h
Normal file
@@ -0,0 +1,14 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by KeyboardManager.rc
|
||||
|
||||
//////////////////////////////
|
||||
// Non-localizable
|
||||
|
||||
#define FILE_DESCRIPTION "PowerToys KeyboardManager"
|
||||
#define INTERNAL_NAME "KeyboardManager"
|
||||
#define ORIGINAL_FILENAME "KeyboardManager.dll"
|
||||
#define IDS_KEYBOARDMANAGER_ICON 1001
|
||||
|
||||
// Non-localizable
|
||||
//////////////////////////////
|
||||
@@ -1,64 +0,0 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by KeyboardManager.rc
|
||||
|
||||
//////////////////////////////
|
||||
// Non-localizable
|
||||
|
||||
#define FILE_DESCRIPTION "PowerToys KeyboardManager"
|
||||
#define INTERNAL_NAME "KeyboardManager"
|
||||
#define ORIGINAL_FILENAME "KeyboardManager.dll"
|
||||
|
||||
// Non-localizable
|
||||
//////////////////////////////
|
||||
|
||||
#define IDS_SETTINGS_DESCRIPTION 101
|
||||
#define IDS_KEYBOARDMANAGER 102
|
||||
#define IDS_KEYBOARDMANAGER_ICON 103
|
||||
#define IDS_CREATEWINDOWFAILED_ERRORMESSAGE 104
|
||||
#define IDS_CREATEWINDOWFAILED_ERRORTITLE 105
|
||||
#define IDS_REGISTERCLASSFAILED_ERRORMESSAGE 106
|
||||
#define IDS_REGISTERCLASSFAILED_ERRORTITLE 107
|
||||
#define IDS_EDITKEYBOARD_WINDOWNAME 108
|
||||
#define IDS_EDITSHORTCUTS_WINDOWNAME 109
|
||||
#define IDS_CANCEL_BUTTON 110
|
||||
#define IDS_OK_BUTTON 111
|
||||
#define IDS_CONTINUE_BUTTON 112
|
||||
#define IDS_EDITKEYBOARD_SOURCEHEADER 113
|
||||
#define IDS_EDITKEYBOARD_TARGETHEADER 114
|
||||
#define IDS_EDITSHORTCUTS_SOURCEHEADER 115
|
||||
#define IDS_EDITSHORTCUTS_TARGETHEADER 116
|
||||
#define IDS_EDITSHORTCUTS_TARGETAPPHEADER 117
|
||||
#define IDS_EDITKEYBOARD_ORPHANEDDIALOGTITLE 118
|
||||
#define IDS_EDITKEYBOARD_PARTIALCONFIRMATIONDIALOGTITLE 119
|
||||
#define IDS_EDITSHORTCUTS_PARTIALCONFIRMATIONDIALOGTITLE 120
|
||||
#define IDS_EDITKEYBOARD_INFO 121
|
||||
#define IDS_EDITKEYBOARD_INFOEXAMPLE 122
|
||||
#define IDS_EDITSHORTCUTS_INFO 123
|
||||
#define IDS_EDITSHORTCUTS_INFOEXAMPLE 124
|
||||
#define IDS_TYPE_BUTTON 125
|
||||
#define IDS_TYPEKEY_TITLE 126
|
||||
#define IDS_TYPESHORTCUT_TITLE 127
|
||||
#define IDS_TYPEKEY_HEADER 128
|
||||
#define IDS_TYPESHORTCUT_HEADER 129
|
||||
#define IDS_TYPE_HOLDENTER 130
|
||||
#define IDS_TYPE_HOLDESC 131
|
||||
#define IDS_EDITSHORTCUTS_ALLAPPS 132
|
||||
#define IDS_ERRORMESSAGE_REMAPSUCCESSFUL 133
|
||||
#define IDS_ERRORMESSAGE_REMAPUNSUCCESSFUL 134
|
||||
#define IDS_ERRORMESSAGE_SAMEKEYPREVIOUSLYMAPPED 135
|
||||
#define IDS_ERRORMESSAGE_MAPPEDTOSAMEKEY 136
|
||||
#define IDS_ERRORMESSAGE_CONFLICTINGMODIFIERKEY 137
|
||||
#define IDS_ERRORMESSAGE_SAMESHORTCUTPREVIOUSLYMAPPED 138
|
||||
#define IDS_ERRORMESSAGE_MAPTOSAMESHORTCUT 139
|
||||
#define IDS_ERRORMESSAGE_CONFLICTINGMODIFIERSHORTCUT 140
|
||||
#define IDS_ERRORMESSAGE_WINL 141
|
||||
#define IDS_ERRORMESSAGE_CTRLALTDEL 142
|
||||
#define IDS_ERRORMESSAGE_SAVEFAILED 143
|
||||
#define IDS_ERRORMESSAGE_SHORTCUTSTARTWITHMODIFIER 144
|
||||
#define IDS_ERRORMESSAGE_SHORTCUTNOREPEATEDMODIFIER 145
|
||||
#define IDS_ERRORMESSAGE_SHORTCUTATLEAST2KEYS 146
|
||||
#define IDS_ERRORMESSAGE_SHORTCUTONEACTIONKEY 147
|
||||
#define IDS_ERRORMESSAGE_SHORTCUTMAXONEACTIONKEY 148
|
||||
#define IDS_ERRORMESSAGE_MAXSHORTCUTSIZE 149
|
||||
#define IDS_ERRORMESSAGE_DEFAULT 150
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "Dialog.h"
|
||||
#include <set>
|
||||
#include "common/common.h"
|
||||
#include "keyboardmanager/dll/resource.h"
|
||||
#include "keyboardmanager/dll/Generated Files/resource.h"
|
||||
extern "C" IMAGE_DOS_HEADER __ImageBase;
|
||||
|
||||
using namespace winrt::Windows::Foundation;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <common/dpi_aware.h>
|
||||
#include "Styles.h"
|
||||
#include "Dialog.h"
|
||||
#include <keyboardmanager/dll/resource.h>
|
||||
#include <keyboardmanager/dll/Generated Files/resource.h>
|
||||
#include "../common/shared_constants.h"
|
||||
#include "keyboardmanager/common/KeyboardManagerState.h"
|
||||
#include "common/common.h"
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <common/dpi_aware.h>
|
||||
#include "Styles.h"
|
||||
#include "Dialog.h"
|
||||
#include <keyboardmanager/dll/resource.h>
|
||||
#include <keyboardmanager/dll/Generated Files/resource.h>
|
||||
#include <keyboardmanager/common/KeyboardManagerState.h>
|
||||
#include "common/common.h"
|
||||
#include "LoadingAndSavingRemappingHelper.h"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "keyboardmanager/common/KeyboardManagerState.h"
|
||||
#include "keyboardmanager/common/Helpers.h"
|
||||
#include "common/common.h"
|
||||
#include "keyboardmanager/dll/resource.h"
|
||||
#include "keyboardmanager/dll/Generated Files/resource.h"
|
||||
extern "C" IMAGE_DOS_HEADER __ImageBase;
|
||||
|
||||
//Both static members are initialized to null
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "keyboardmanager/common/KeyboardManagerState.h"
|
||||
#include "ShortcutControl.h"
|
||||
#include "common/common.h"
|
||||
#include "keyboardmanager/dll/resource.h"
|
||||
#include "keyboardmanager/dll/Generated Files/resource.h"
|
||||
extern "C" IMAGE_DOS_HEADER __ImageBase;
|
||||
|
||||
//Both static members are initialized to null
|
||||
|
||||
Reference in New Issue
Block a user