Skip to content

Commit 9afa976

Browse files
authored
Fix incorrect localization causing crashes in RegisterCommandHandler and KeyGestures (dotnet#919)
Fix incorrect localization causing crashes in RegisterCommandHandler and KeyGestures (dotnet#919)
1 parent e9953ad commit 9afa976

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+131678
-141289
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
## Localization: Resource IDs moved to const strings from strings.resx files ##
2+
3+
### PresentationBuildTasks ###
4+
5+
| ResourceID | Value |
6+
| --------------|------------- |
7+
| FileClassifierTask | "FileClassifier" |
8+
| GetWinFXPathTask | "GetWinFXPath" |
9+
| MarkupCompilePass1Task | "MarkupCompilePass1" |
10+
| MarkupCompilePass2Task | "MarkupCompilePass2" |
11+
| MergeLocalizationDirectivesTask | "MergeLocalizationDirectives" |
12+
| ResourcesGeneratorTask | "ResourcesGenerator" |
13+
| UidManagerTask | "UidManager" |
14+
| UpdateManifestForBrowserApplicationTask | "UpdateManifestForBrowserApplication" |
15+
16+
### PresentationCore ###
17+
18+
| ResourceID | Value |
19+
| --------------|------------- |
20+
| BrowseBackKey | "Alt+Left;Backspace" |
21+
| BrowseForwardKey | "Alt+Right;Shift+Backspace" |
22+
| BrowseHomeKey | "Alt+Home;BrowserHome" |
23+
| BrowseStopKey | "Alt+Esc;BrowserStop" |
24+
| ContextMenuKey | "Shift+F10;Apps" |
25+
| CopyKey | "Ctrl+C;Ctrl+Insert" |
26+
| CutKey | "Ctrl+X;Shift+Delete" |
27+
| DeleteKey | "Del" |
28+
| ExtendSelectionDownKey | "Shift+Down" |
29+
| ExtendSelectionLeftKey | "Shift+Left" |
30+
| ExtendSelectionRightKey | "Shift+Right" |
31+
| ExtendSelectionUpKey | "Shift+Up" |
32+
| FindKey | "Ctrl+F" |
33+
| HelpKey | "F1" |
34+
| HwndTarget_HardwareNotSupportDueToProtocolMismatch | "Due to protocol mismatch hardware support is not available." |
35+
| MoveDownKey | "Down" |
36+
| MoveFocusBackKey | "Ctrl+Left" |
37+
| MoveFocusDownKey | "Ctrl+Down" |
38+
| MoveFocusForwardKey | "Ctrl+Right" |
39+
| MoveFocusPageDownKey | "Ctrl+PageDown" |
40+
| MoveFocusPageUpKey | "Ctrl+PageUp" |
41+
| MoveFocusUpKey | "Ctrl+Up" |
42+
| MoveLeftKey | "Left" |
43+
| MoveRightKey | "Right" |
44+
| MoveToEndKey | "End" |
45+
| MoveToHomeKey | "Home" |
46+
| MoveToPageDownKey | "PageDown" |
47+
| MoveToPageUpKey | "PageUp" |
48+
| MoveUpKey | "Up" |
49+
| NewKey | "Ctrl+N" |
50+
| OpenKey | "Ctrl+O" |
51+
| PasteKey | "Ctrl+V;Shift+Insert" |
52+
| PrintKey | "Ctrl+P" |
53+
| PrintPreviewKey | "Ctrl+F2" |
54+
| PropertiesKey | "F4" |
55+
| RedoKey | "Ctrl+Y" |
56+
| ReplaceKey | "Ctrl+H" |
57+
| SaveKey | "Ctrl+S" |
58+
| ScrollPageDownKey | "PageDown" |
59+
| ScrollPageUpKey | "PageUp" |
60+
| SelectAllKey | "Ctrl+A" |
61+
| SelectToEndKey | "Shift+End" |
62+
| SelectToHomeKey | "Shift+Home" |
63+
| SelectToPageDownKey | "Shift+PageDown" |
64+
| SelectToPageUpKey | "Shift+PageUp" |
65+
| StopKey | "Esc" |
66+
| UndoKey | "Ctrl+Z" |
67+
68+
### PresentationFramework ###
69+
70+
| ResourceID | Value |
71+
| --------------|------------- |
72+
| InkCanvasDeselectKey | "Esc" |
73+
| KeyAlignCenter | "Ctrl+E" |
74+
| KeyAlignLeft | "Ctrl+L" |
75+
| KeyAlignRight | "Ctrl+R" |
76+
| KeyAltUndo | "Alt+Backspace" |
77+
| KeyApplyDoubleSpace | "Ctrl+2" |
78+
| KeyApplyOneAndAHalfSpace | "Ctrl+5" |
79+
| KeyApplySingleSpace | "Ctrl+1" |
80+
| KeyBackspace | "Backspace" |
81+
| KeyCopy | "Ctrl+C" |
82+
| KeyCopyFormat | "Ctrl+Shift+C" |
83+
| KeyCtrlInsert | "Ctrl+Insert" |
84+
| KeyCut | "Ctrl+X" |
85+
| KeyDecreaseFontSize | "Ctrl+OemOpenBrackets" |
86+
| KeyDecreaseIndentation | "Ctrl+Shift+T" |
87+
| KeyDelete | "Delete" |
88+
| KeyDeleteColumns | "Alt+Ctrl+Shift+D" |
89+
| KeyDeleteNextWord | "Ctrl+Delete" |
90+
| KeyDeletePreviousWord | "Ctrl+Backspace" |
91+
| KeyEnterLineBreak | "Shift+Enter" |
92+
| KeyEnterParagraphBreak | "Enter" |
93+
| KeyIncreaseFontSize | "Ctrl+OemCloseBrackets" |
94+
| KeyInsertColumns | "Alt+Ctrl+Shift+C" |
95+
| KeyInsertRows | "Alt+Ctrl+Shift+R" |
96+
| KeyInsertTable | "Alt+Ctrl+Shift+T" |
97+
| KeyMergeCells | "Alt+Ctrl+Shift+M" |
98+
| KeyMoveDownByLine | "Down" |
99+
| KeyMoveDownByPage | "PageDown" |
100+
| KeyMoveDownByParagraph | "Ctrl+Down" |
101+
| KeyMoveLeftByCharacter | "Left" |
102+
| KeyMoveLeftByWord | "Ctrl+Left" |
103+
| KeyMoveRightByCharacter | "Right" |
104+
| KeyMoveRightByWord | "Ctrl+Right" |
105+
| KeyMoveToColumnEnd | "Alt+PageDown" |
106+
| KeyMoveToColumnStart | "Alt+PageUp" |
107+
| KeyMoveToDocumentEnd | "Ctrl+End" |
108+
| KeyMoveToDocumentStart | "Ctrl+Home" |
109+
| KeyMoveToLineEnd | "End" |
110+
| KeyMoveToLineStart | "Home" |
111+
| KeyMoveToWindowBottom | "Alt+Ctrl+PageDown" |
112+
| KeyMoveToWindowTop | "Alt+Ctrl+PageUp" |
113+
| KeyMoveUpByLine | "Up" |
114+
| KeyMoveUpByPage | "PageUp" |
115+
| KeyMoveUpByParagraph | "Ctrl+Up" |
116+
| KeyPasteFormat | "Ctrl+Shift+V" |
117+
| KeyRedo | "Ctrl+Y" |
118+
| KeyRemoveListMarkers | "Ctrl+Shift+R" |
119+
| KeyResetFormat | "Ctrl+Space" |
120+
| KeySelectDownByLine | "Shift+Down" |
121+
| KeySelectDownByPage | "Shift+PageDown" |
122+
| KeySelectDownByParagraph | "Ctrl+Shift+Down" |
123+
| KeySelectLeftByCharacter | "Shift+Left" |
124+
| KeySelectLeftByWord | "Ctrl+Shift+Left" |
125+
| KeySelectRightByCharacter | "Shift+Right" |
126+
| KeySelectRightByWord | "Ctrl+Shift+Right" |
127+
| KeySelectToColumnEnd | "Alt+Shift+PageDown" |
128+
| KeySelectToColumnStart | "Alt+Shift+PageUp" |
129+
| KeySelectToDocumentEnd | "Ctrl+Shift+End" |
130+
| KeySelectToDocumentStart | "Ctrl+Shift+Home" |
131+
| KeySelectToLineEnd | "Shift+End" |
132+
| KeySelectToLineStart | "Shift+Home" |
133+
| KeySelectToWindowBottom | "Alt+Ctrl+Shift+PageDown" |
134+
| KeySelectToWindowTop | "Alt+Ctrl+Shift+PageUp" |
135+
| KeySelectUpByLine | "Shift+Up" |
136+
| KeySelectUpByPage | "Shift+PageUp" |
137+
| KeySelectUpByParagraph | "Ctrl+Shift+Up" |
138+
| KeyShiftBackspace | "Shift+Backspace" |
139+
| KeyShiftDelete | "Shift+Delete" |
140+
| KeyShiftInsert | "Shift+Insert" |
141+
| KeyShiftSpace | "Shift+Space" |
142+
| KeySpace | "Space" |
143+
| KeySplitCell | "Alt+Ctrl+Shift+S" |
144+
| KeySwitchViewingMode | "Ctrl+M" |
145+
| KeyTabBackward | "Shift+Tab" |
146+
| KeyTabForward | "Tab" |
147+
| KeyToggleBullets | "Ctrl+Shift+L" |
148+
| KeyToggleInsert | "Insert" |
149+
| KeyToggleNumbering | "Ctrl+Shift+N" |
150+
| KeyToggleSubscript | "Ctrl+OemPlus" |
151+
| KeyToggleSuperscript | "Ctrl+Shift+OemPlus" |
152+
| KeyToggleUnderline | "Ctrl+U" |
153+
| KeyUndo | "Ctrl+Z" |
154+
| ListBoxSelectAllKey | "Ctrl+A" |
155+
| SwitchViewingMode | "_Switch ViewingMode" |
156+
| ToStringFormatString_Control | "{0}: {1}" |
157+
| ToStringFormatString_GridView | "{0} Columns.Count:{1}" |
158+
| ZoomPercentageConverterStringFormat | "{0:0.##}%" |
159+

src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/FileClassifier.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public override bool Execute()
8282

8383
try
8484
{
85-
TaskHelper.DisplayLogo(Log, SR.Get(SRID.FileClassifierTask));
85+
TaskHelper.DisplayLogo(Log, nameof(FileClassifier));
8686

8787
ret = VerifyTaskInputs();
8888

src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/MarkupCompilePass1.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public MarkupCompilePass1( ) : base(SR.SharedResourceManager)
102102
/// <returns></returns>
103103
public override bool Execute()
104104
{
105-
TaskHelper.DisplayLogo(Log, SR.Get(SRID.MarkupCompilePass1Task));
105+
TaskHelper.DisplayLogo(Log, nameof(MarkupCompilePass1));
106106

107107
bool bSuccess = true;
108108

src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/MarkupCompilePass2.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public MarkupCompilePass2( ) : base(SR.SharedResourceManager)
8383
/// <returns></returns>
8484
public override bool Execute()
8585
{
86-
TaskHelper.DisplayLogo(Log, SR.Get(SRID.MarkupCompilePass2Task));
86+
TaskHelper.DisplayLogo(Log, nameof(MarkupCompilePass2));
8787

8888
//
8989
// Create the TaskFileService instance here

src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/MergeLocalizationDirectives.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public MergeLocalizationDirectives() : base(SR.SharedResourceManager)
5454
/// </summary>
5555
public override bool Execute()
5656
{
57-
TaskHelper.DisplayLogo(Log, SR.Get(SRID.MergeLocalizationDirectivesTask));
57+
TaskHelper.DisplayLogo(Log, nameof(MergeLocalizationDirectives));
5858
if (GeneratedLocalizationFiles.Length > 0)
5959
{
6060
try {

src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/ResourcesGenerator.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public ResourcesGenerator ( )
151151

152152
public override bool Execute()
153153
{
154-
TaskHelper.DisplayLogo(Log, SR.Get(SRID.ResourcesGeneratorTask));
154+
TaskHelper.DisplayLogo(Log, nameof(ResourcesGenerator));
155155

156156
//
157157
// Validate the property settings

src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/UidManager.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public UidManager() : base(SR.SharedResourceManager)
7474
/// </summary>
7575
public override bool Execute()
7676
{
77-
TaskHelper.DisplayLogo(Log, SR.Get(SRID.UidManagerTask));
77+
TaskHelper.DisplayLogo(Log, nameof(UidManager));
7878

7979
if (MarkupFiles == null || MarkupFiles.Length == 0)
8080
{

src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/UpdateManifestForBrowserApplication.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public UpdateManifestForBrowserApplication()
7070
public override bool Execute()
7171
{
7272
bool successful = true;
73-
TaskHelper.DisplayLogo(Log, SR.Get(SRID.UpdateManifestForBrowserApplicationTask));
73+
TaskHelper.DisplayLogo(Log, nameof(UpdateManifestForBrowserApplication));
7474

7575
if (HostInBrowser != true)
7676
{

src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Resources/Strings.resx

+1-25
Original file line numberDiff line numberDiff line change
@@ -132,30 +132,6 @@
132132
<data name="FileResolved" xml:space="preserve">
133133
<value>Input file '{0}' is resolved to new relative path '{1}' at directory '{2}'.</value>
134134
</data>
135-
<data name="MarkupCompilePass1Task" xml:space="preserve">
136-
<value>MarkupCompilePass1</value>
137-
</data>
138-
<data name="FileClassifierTask" xml:space="preserve">
139-
<value>FileClassifier</value>
140-
</data>
141-
<data name="MarkupCompilePass2Task" xml:space="preserve">
142-
<value>MarkupCompilePass2</value>
143-
</data>
144-
<data name="UidManagerTask" xml:space="preserve">
145-
<value>UidManager</value>
146-
</data>
147-
<data name="ResourcesGeneratorTask" xml:space="preserve">
148-
<value>ResourcesGenerator</value>
149-
</data>
150-
<data name="MergeLocalizationDirectivesTask" xml:space="preserve">
151-
<value>MergeLocalizationDirectives</value>
152-
</data>
153-
<data name="UpdateManifestForBrowserApplicationTask" xml:space="preserve">
154-
<value>UpdateManifestForBrowserApplication</value>
155-
</data>
156-
<data name="GetWinFXPathTask" xml:space="preserve">
157-
<value>GetWinFXPath</value>
158-
</data>
159135
<data name="CompileSucceed_Pass1" xml:space="preserve">
160136
<value>MarkupCompilePass1 successfully generated BAML or source code files.</value>
161137
</data>
@@ -858,4 +834,4 @@
858834
<data name="ParserMarkupExtensionMalformedBracketCharacers" xml:space="preserve">
859835
<value>MC8002: BracketCharacter '{0}' at Line Number '{1}' and Line Position '{2}' does not have a corresponding opening/closing BracketCharacter.</value>
860836
</data>
861-
</root>
837+
</root>

src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Resources/xlf/Strings.cs.xlf

-40
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,6 @@
9797
<target state="translated">MC6021: {0}: Na tomto tagu nelze specifikovat třídu FieldModifier, protože buď nemá atribut {0}: Name nebo Name atribut není nastaven, nebo je tag lokálně definován a má parametr Name nastaven, což není povoleno.</target>
9898
<note />
9999
</trans-unit>
100-
<trans-unit id="FileClassifierTask">
101-
<source>FileClassifier</source>
102-
<target state="translated">FileClassifier</target>
103-
<note />
104-
</trans-unit>
105100
<trans-unit id="FileNotFound">
106101
<source>BG1002: File '{0}' cannot be found.</source>
107102
<target state="translated">BG1002: Soubor {0} nelze nalézt.</target>
@@ -142,11 +137,6 @@
142137
<target state="translated">Vygenerovaný soubor kódu: {0}.</target>
143138
<note />
144139
</trans-unit>
145-
<trans-unit id="GetWinFXPathTask">
146-
<source>GetWinFXPath</source>
147-
<target state="translated">GetWinFXPath</target>
148-
<note />
149-
</trans-unit>
150140
<trans-unit id="IllegalCDataTextScoping">
151141
<source>MC6003: '{0}:{1}' contains '{2}'. '{0}:{1}' cannot contain nested content.</source>
152142
<target state="translated">MC6003: Soubor {0}:{1} obsahuje obsah souboru {2}. Soubor {0}:{1} nemůže obsahovat vnořený obsah.</target>
@@ -252,26 +242,11 @@
252242
<target state="translated">Vstup: Místní referenční soubor označení Page: {0}.</target>
253243
<note />
254244
</trans-unit>
255-
<trans-unit id="MarkupCompilePass1Task">
256-
<source>MarkupCompilePass1</source>
257-
<target state="translated">MarkupCompilePass1</target>
258-
<note />
259-
</trans-unit>
260-
<trans-unit id="MarkupCompilePass2Task">
261-
<source>MarkupCompilePass2</source>
262-
<target state="translated">MarkupCompilePass2</target>
263-
<note />
264-
</trans-unit>
265245
<trans-unit id="MatchingTypeArgsNotFoundInRefType">
266246
<source>MC6012: '{0}' event has a generic event handler delegate type '{1}'. The type parameter '{2}' on '{1}' does not match any type parameters on the containing generic tag '{3}'.</source>
267247
<target state="translated">MC6012: Událost {0} má ovladač generických událostí typu {1}. Typový parametr {2} v souboru {1} neodpovídá žádným typovým parametrům generického tagu {3}, který jej obsahuje.</target>
268248
<note />
269249
</trans-unit>
270-
<trans-unit id="MergeLocalizationDirectivesTask">
271-
<source>MergeLocalizationDirectives</source>
272-
<target state="translated">MergeLocalizationDirectives</target>
273-
<note />
274-
</trans-unit>
275250
<trans-unit id="MissingClassDefinitionForCodeTag">
276251
<source>MC6026: '{0}' root element requires a {1}:Class attribute because '{2}' contains a {1}:Code tag. Either remove {1}:Code and its contents, or add a {1}:Class attribute to the root element.</source>
277252
<target state="translated">MC6026: Kořenový prvek{0} vyžaduje atribut {1}:Class, protože prvek {2} obsahuje tag {1}:Code. Buď odstraňte {1}:Code a jeho obsah, nebo přidejte atribut {1}:Class do kořenového prvku.</target>
@@ -872,11 +847,6 @@
872847
<target state="translated">Generuji soubor .resources: {0}...</target>
873848
<note />
874849
</trans-unit>
875-
<trans-unit id="ResourcesGeneratorTask">
876-
<source>ResourcesGenerator</source>
877-
<target state="translated">ResourcesGenerator</target>
878-
<note />
879-
</trans-unit>
880850
<trans-unit id="RoutedEventNotRegistered">
881851
<source>MC6006: {0}.{1}="{2}" is not valid. '{1}' must be a RoutedEvent registered with a name that ends with the keyword "Event".</source>
882852
<target state="translated">MC6006: Rovnice {0}.{1}={2} není platná. {1} musí být třída RoutedEvent registrovaná pro název, který končí klíčovým slovem Event.</target>
@@ -1032,11 +1002,6 @@
10321002
<target state="translated">MC7001: Program narazil na předčasné ukončení řetězce.</target>
10331003
<note />
10341004
</trans-unit>
1035-
<trans-unit id="UidManagerTask">
1036-
<source>UidManager</source>
1037-
<target state="translated">UidManager</target>
1038-
<note />
1039-
</trans-unit>
10401005
<trans-unit id="UidMissing">
10411006
<source>UM1003: Uid is missing for element '{0}'.</source>
10421007
<target state="translated">UM1003: Chybí identifikátor Uid pro prvek {0}.</target>
@@ -1087,11 +1052,6 @@
10871052
<target state="translated">LC1003: Lokalizační poznámka nemá nastavenu hodnotu pro cílovou vlastnost: {0}.</target>
10881053
<note />
10891054
</trans-unit>
1090-
<trans-unit id="UpdateManifestForBrowserApplicationTask">
1091-
<source>UpdateManifestForBrowserApplication</source>
1092-
<target state="translated">UpdateManifestForBrowserApplication</target>
1093-
<note />
1094-
</trans-unit>
10951055
<trans-unit id="VersionNumberComponentNegative">
10961056
<source>MC4501: Major and minor version number components cannot be negative.</source>
10971057
<target state="translated">MC4501: Komponenty čísla hlavní verze a podverze nemohou být záporné.</target>

0 commit comments

Comments
 (0)