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

[Localization] Migrate resources to resx for PowerRename #6112

Merged
merged 44 commits into from
Aug 25, 2020

Conversation

arjunbalgovind
Copy link
Contributor

@arjunbalgovind arjunbalgovind commented Aug 22, 2020

Summary of the Pull Request

What is this about?
This PR migrates the resources for FancyZones to resx as per the steps done in #6057. The PR is currently made towards that branch to minimize the diff.

  • For PowerRename, the strings for the controls in the dialog were added with the DIALOG syntax. This however does not allow loading strings from a string table, making these strings hard to localize this. To solve this, the strings were moved to a string table, and the control text is set at runtime in the _OnInitDlg method, similar to the procedure done for initializing the list view.
  • Since the PowerRename UWP UI project uses resources from two projects, an extra optional argument had to be added to the resx to rc conversion script to avoid resource ID collision.

PR Checklist

Info on Pull Request

  • Modified script to include an optional argument as the starting resource id for the header file.
  • Moved hardcoded strings in Dialog declaration in rc file to string table. Added _InitDlgText to method to set these values from the resource strings. This method is called in _OnInitDlg. Added the extern ImageBase declaration on the file since it would cause unexpected behavior when installing the MSI as compared to running the PowerRenameTest executable.
  • Added base rc and header files and moved resources.
  • For PowerRenameExt the localizable resources start from 101, and for PowerRenameUI it starts from 1001 to avoid collisions.
  • The script for PowerRenameExt is called in the UWP UI project as well since it references the PowerRenameExt.rc file without having a reference to the project, so we have to ensure the rc file is generated in the scenario where the UWP UI project gets built before PowerRenameExt.
  • Icon was set to 2001 since it had to be the same across both resource files.
  • Added LocProject.json files

What does this include?

Validation Steps Performed

How does someone test & validate?

  • Validated that all strings the load locally with PowerRenameTest project and MSI installation.
  • Validated on CDPX pipeline

@arjunbalgovind arjunbalgovind added Area-Localization issues regarding to Localization the application Product-PowerRename Refers to the PowerRename PowerToy labels Aug 22, 2020
@arjunbalgovind arjunbalgovind changed the base branch from master to user/arbalgov/resxRCConversion August 22, 2020 00:21
@arjunbalgovind arjunbalgovind marked this pull request as ready for review August 22, 2020 01:19
@arjunbalgovind arjunbalgovind requested review from enricogior and a team August 22, 2020 01:20
@arjunbalgovind arjunbalgovind marked this pull request as draft August 22, 2020 01:22
@arjunbalgovind arjunbalgovind marked this pull request as ready for review August 22, 2020 02:06
@enricogior
Copy link
Contributor

@muratakburak I tried to add you as a reviewer, but GitHub seems not to work for me at the moment.

Copy link
Contributor

@ryanbodrug-microsoft ryanbodrug-microsoft left a comment

Choose a reason for hiding this comment

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

LGTM

@arjunbalgovind arjunbalgovind changed the base branch from user/arbalgov/resxRCConversion to master August 24, 2020 23:13
Copy link
Contributor

@enricogior enricogior left a comment

Choose a reason for hiding this comment

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

Tested. LGTM.

@arjunbalgovind arjunbalgovind merged commit 3ede1a0 into master Aug 25, 2020
@arjunbalgovind arjunbalgovind deleted the user/arbalgov/resxPowerRename branch August 25, 2020 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Localization issues regarding to Localization the application Product-PowerRename Refers to the PowerRename PowerToy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants