Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect localization causing crashes in RegisterCommandHandler and KeyGestures #919

Merged
merged 10 commits into from Jun 12, 2019

Conversation

ryalanms
Copy link
Member

Reviewed key strings, updated strings.resx files, and updated xlf files.

Confirmed updates fix NuGet Package Explorer and loc test application provided by @Lakritzator. (Fixes #913.)

@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Jun 11, 2019
@ghost ghost requested review from rladuca, vatsan-madhavan and stevenbrix June 11, 2019 22:27
@ryalanms ryalanms requested a review from miguep June 11, 2019 22:54
@vatsan-madhavan vatsan-madhavan changed the title LOC CHECKIN | Fix incorrect localization causing crashes in RegisterCommandHandler and KeyGestures Fix incorrect localization causing crashes in RegisterCommandHandler and KeyGestures Jun 11, 2019
@vatsan-madhavan
Copy link
Member

Removing the "LOC CHECKIN" prefix from the title. This is not a conventional loc-checkin.

@vatsan-madhavan
Copy link
Member

Can you summarize (in a table, perhaps?) what strings are being removed from resx files?

@rladuca
Copy link
Member

rladuca commented Jun 11, 2019

It was hard to keep it all in my head to determine, so I'll ask, are there any duplicate strings being defined in multiple files that could be hoisted up into a common file? If so, please do so.

@rladuca
Copy link
Member

rladuca commented Jun 11, 2019

Removed string resources could have been used by others in the past. Are we worried about those no longer being accessible?

@vatsan-madhavan
Copy link
Member

Removed string resources could have been used by others in the past. Are we worried about those no longer being accessible?

What's a concrete scenario that might break?

@rladuca
Copy link
Member

rladuca commented Jun 11, 2019

Removed string resources could have been used by others in the past. Are we worried about those no longer being accessible?

What's a concrete scenario that might break?

Someone could be looking directly at the string resources and either displaying them or parsing them out for their own needs. I don't have a specific example for sure, but resources are publicly available at runtime and now these are not a part of that set.

@vatsan-madhavan
Copy link
Member

Someone could be looking directly at the string resources and either displaying them or parsing them out for their own needs.

Retaining the old strings seems like a costly (i.e, confusion and bug-prone) effort on our side. We'd end up with two sets of strings (resources and const strings) - which would require careful documentation to ensure that we only use the const-strings in code and never use the resource strings. Localization will continue happening (and we'd continue having to ensure that these strings remain locked, despite the fact that we don't them, nor are we sure anyone else uses them).

On balance, I think we should just take this change now as a clean-break. Anyone depending on these resources will just have to adapt a bit.

@rladuca
Copy link
Member

rladuca commented Jun 12, 2019

Someone could be looking directly at the string resources and either displaying them or parsing them out for their own needs.

Retaining the old strings seems like a costly (i.e, confusion and bug-prone) effort on our side. We'd end up with two sets of strings (resources and const strings) - which would require careful documentation to ensure that we only use the const-strings in code and never use the resource strings. Localization will continue happening (and we'd continue having to ensure that these strings remain locked, despite the fact that we don't them, nor are we sure anyone else uses them).

On balance, I think we should just take this change now as a clean-break. Anyone depending on these resources will just have to adapt a bit.

That's fair enough, anyone accessing these should really be going through the various RoutedUICommands anyway.

@ryalanms
Copy link
Member Author

ryalanms commented Jun 12, 2019

Resource IDs moved to const strings from strings.resx files

PresentationBuildTasks

ResourceID Value
FileClassifierTask "FileClassifier"
GetWinFXPathTask "GetWinFXPath"
MarkupCompilePass1Task "MarkupCompilePass1"
MarkupCompilePass2Task "MarkupCompilePass2"
MergeLocalizationDirectivesTask "MergeLocalizationDirectives"
ResourcesGeneratorTask "ResourcesGenerator"
UidManagerTask "UidManager"
UpdateManifestForBrowserApplicationTask "UpdateManifestForBrowserApplication"

PresentationCore

ResourceID Value
BrowseBackKey "Alt+Left;Backspace"
BrowseForwardKey "Alt+Right;Shift+Backspace"
BrowseHomeKey "Alt+Home;BrowserHome"
BrowseStopKey "Alt+Esc;BrowserStop"
ContextMenuKey "Shift+F10;Apps"
CopyKey "Ctrl+C;Ctrl+Insert"
CutKey "Ctrl+X;Shift+Delete"
DeleteKey "Del"
ExtendSelectionDownKey "Shift+Down"
ExtendSelectionLeftKey "Shift+Left"
ExtendSelectionRightKey "Shift+Right"
ExtendSelectionUpKey "Shift+Up"
FindKey "Ctrl+F"
HelpKey "F1"
HwndTarget_HardwareNotSupportDueToProtocolMismatch "Due to protocol mismatch hardware support is not available."
MoveDownKey "Down"
MoveFocusBackKey "Ctrl+Left"
MoveFocusDownKey "Ctrl+Down"
MoveFocusForwardKey "Ctrl+Right"
MoveFocusPageDownKey "Ctrl+PageDown"
MoveFocusPageUpKey "Ctrl+PageUp"
MoveFocusUpKey "Ctrl+Up"
MoveLeftKey "Left"
MoveRightKey "Right"
MoveToEndKey "End"
MoveToHomeKey "Home"
MoveToPageDownKey "PageDown"
MoveToPageUpKey "PageUp"
MoveUpKey "Up"
NewKey "Ctrl+N"
OpenKey "Ctrl+O"
PasteKey "Ctrl+V;Shift+Insert"
PrintKey "Ctrl+P"
PrintPreviewKey "Ctrl+F2"
PropertiesKey "F4"
RedoKey "Ctrl+Y"
ReplaceKey "Ctrl+H"
SaveKey "Ctrl+S"
ScrollPageDownKey "PageDown"
ScrollPageUpKey "PageUp"
SelectAllKey "Ctrl+A"
SelectToEndKey "Shift+End"
SelectToHomeKey "Shift+Home"
SelectToPageDownKey "Shift+PageDown"
SelectToPageUpKey "Shift+PageUp"
StopKey "Esc"
UndoKey "Ctrl+Z"

PresentationFramework

ResourceID Value
InkCanvasDeselectKey "Esc"
KeyAlignCenter "Ctrl+E"
KeyAlignLeft "Ctrl+L"
KeyAlignRight "Ctrl+R"
KeyAltUndo "Alt+Backspace"
KeyApplyDoubleSpace "Ctrl+2"
KeyApplyOneAndAHalfSpace "Ctrl+5"
KeyApplySingleSpace "Ctrl+1"
KeyBackspace "Backspace"
KeyCopy "Ctrl+C"
KeyCopyFormat "Ctrl+Shift+C"
KeyCtrlInsert "Ctrl+Insert"
KeyCut "Ctrl+X"
KeyDecreaseFontSize "Ctrl+OemOpenBrackets"
KeyDecreaseIndentation "Ctrl+Shift+T"
KeyDelete "Delete"
KeyDeleteColumns "Alt+Ctrl+Shift+D"
KeyDeleteNextWord "Ctrl+Delete"
KeyDeletePreviousWord "Ctrl+Backspace"
KeyEnterLineBreak "Shift+Enter"
KeyEnterParagraphBreak "Enter"
KeyIncreaseFontSize "Ctrl+OemCloseBrackets"
KeyInsertColumns "Alt+Ctrl+Shift+C"
KeyInsertRows "Alt+Ctrl+Shift+R"
KeyInsertTable "Alt+Ctrl+Shift+T"
KeyMergeCells "Alt+Ctrl+Shift+M"
KeyMoveDownByLine "Down"
KeyMoveDownByPage "PageDown"
KeyMoveDownByParagraph "Ctrl+Down"
KeyMoveLeftByCharacter "Left"
KeyMoveLeftByWord "Ctrl+Left"
KeyMoveRightByCharacter "Right"
KeyMoveRightByWord "Ctrl+Right"
KeyMoveToColumnEnd "Alt+PageDown"
KeyMoveToColumnStart "Alt+PageUp"
KeyMoveToDocumentEnd "Ctrl+End"
KeyMoveToDocumentStart "Ctrl+Home"
KeyMoveToLineEnd "End"
KeyMoveToLineStart "Home"
KeyMoveToWindowBottom "Alt+Ctrl+PageDown"
KeyMoveToWindowTop "Alt+Ctrl+PageUp"
KeyMoveUpByLine "Up"
KeyMoveUpByPage "PageUp"
KeyMoveUpByParagraph "Ctrl+Up"
KeyPasteFormat "Ctrl+Shift+V"
KeyRedo "Ctrl+Y"
KeyRemoveListMarkers "Ctrl+Shift+R"
KeyResetFormat "Ctrl+Space"
KeySelectDownByLine "Shift+Down"
KeySelectDownByPage "Shift+PageDown"
KeySelectDownByParagraph "Ctrl+Shift+Down"
KeySelectLeftByCharacter "Shift+Left"
KeySelectLeftByWord "Ctrl+Shift+Left"
KeySelectRightByCharacter "Shift+Right"
KeySelectRightByWord "Ctrl+Shift+Right"
KeySelectToColumnEnd "Alt+Shift+PageDown"
KeySelectToColumnStart "Alt+Shift+PageUp"
KeySelectToDocumentEnd "Ctrl+Shift+End"
KeySelectToDocumentStart "Ctrl+Shift+Home"
KeySelectToLineEnd "Shift+End"
KeySelectToLineStart "Shift+Home"
KeySelectToWindowBottom "Alt+Ctrl+Shift+PageDown"
KeySelectToWindowTop "Alt+Ctrl+Shift+PageUp"
KeySelectUpByLine "Shift+Up"
KeySelectUpByPage "Shift+PageUp"
KeySelectUpByParagraph "Ctrl+Shift+Up"
KeyShiftBackspace "Shift+Backspace"
KeyShiftDelete "Shift+Delete"
KeyShiftInsert "Shift+Insert"
KeyShiftSpace "Shift+Space"
KeySpace "Space"
KeySplitCell "Alt+Ctrl+Shift+S"
KeySwitchViewingMode "Ctrl+M"
KeyTabBackward "Shift+Tab"
KeyTabForward "Tab"
KeyToggleBullets "Ctrl+Shift+L"
KeyToggleInsert "Insert"
KeyToggleNumbering "Ctrl+Shift+N"
KeyToggleSubscript "Ctrl+OemPlus"
KeyToggleSuperscript "Ctrl+Shift+OemPlus"
KeyToggleUnderline "Ctrl+U"
KeyUndo "Ctrl+Z"
ListBoxSelectAllKey "Ctrl+A"
SwitchViewingMode "_Switch ViewingMode"
ToStringFormatString_Control "{0}: {1}"
ToStringFormatString_GridView "{0} Columns.Count:{1}"
ZoomPercentageConverterStringFormat "{0:0.##}%"

@vatsan-madhavan
Copy link
Member

In your tables, I can't tell whether the list consists of strings, or resource names. It would be best if the table were structured as a {resource name, string value} pair.

@ryalanms
Copy link
Member Author

Removing a string from .resx removes that string's corresponding generated SRID. The table contains resource IDs, which were used as const string names where possible.

Copy link
Member

@vatsan-madhavan vatsan-madhavan left a comment

Choose a reason for hiding this comment

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

Based on our conversation, you are going to change these to nameof(FileClassifier) etc., right?

Copy link
Member

@vatsan-madhavan vatsan-madhavan left a comment

Choose a reason for hiding this comment

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

Please add the table as a doc markdown file under documentation\ . lgtm.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
PR metadata: Label to tag PRs, to facilitate with triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Culture de-DE issue with DataGrid
3 participants