FileLocksmith: Fix context menu items are not localized (#49606)

<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request
Fixing the issue where Windows 11 context menu items are not localized.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] Closes: #37271 (Localized part ONLY)
<!-- - [ ] Closes: #yyy (add separate lines for additional resolved
issues) -->
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **Tests:** Added/updated and all pass
- [x] **Localization:** All end-user-facing strings can be localized
- [x] **Dev docs:** No documentation changes are required for project
configuration fixes
- [x] **New binaries:** No new binaries are added
- [x] **Documentation updated:** No user documentation changes are
required

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments
Reorganize resource items for the `FileLocksmithContextMenu` project
 - Mark `resource.base.h` as a non-compiled `None`
 - Add `Generated Files/resource.h` as a `ClInclude`
 - Mark `FileLocksmithContextMenu.base.rc`as a non-compiled `None`
- Add `Generated Files/FileLocksmithContextMenu.rc` as a
`ResourceCompile`

Update the `.vcxproj.filters` accordingly to reflect the new locations
and filters for header and resource files.

<img width="1920" height="1020" alt="before"
src="https://github.com/user-attachments/assets/db8732e5-408c-4ab9-8c42-2f4d3d31e00a"
/>
Before

<img width="1920" height="1020" alt="after"
src="https://github.com/user-attachments/assets/87d82eaa-4daf-4339-92c5-40bbe45f7170"
/>
After

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7b3fb20d-6e9d-4fef-a5cd-f8921d28c220
## Validation Steps Performed
This commit is contained in:
Makoto Sakaguchi
2026-08-11 15:00:24 +09:00
committed by Boliang Zhang (from Dev Box)
parent fddb0ed30c
commit 0407a5b4fe
2 changed files with 14 additions and 6 deletions

View File

@@ -86,7 +86,8 @@ MakeAppx.exe pack /d . /p $(OutDir)FileLocksmithContextMenuPackage.msix /nv</Com
<ItemGroup>
<ClInclude Include="framework.h" />
<ClInclude Include="pch.h" />
<ClInclude Include="resource.base.h" />
<None Include="resource.base.h" />
<ClInclude Include="Generated Files/resource.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp" />
@@ -98,6 +99,10 @@ MakeAppx.exe pack /d . /p $(OutDir)FileLocksmithContextMenuPackage.msix /nv</Com
<None Include="packages.config" />
<None Include="Resources.resx" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Generated Files/FileLocksmithContextMenu.rc" />
<None Include="FileLocksmithContextMenu.base.rc" />
</ItemGroup>
<ItemGroup>
<None Include="Assets\FileLocksmith\FileLocksmith.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@@ -138,9 +143,6 @@ MakeAppx.exe pack /d . /p $(OutDir)FileLocksmithContextMenuPackage.msix /nv</Com
<Project>{9d52fd25-ef90-4f9a-a015-91efc5daf54f}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="FileLocksmithContextMenu.base.rc" />
</ItemGroup>
<Import Project="$(RepoRoot)deps\spdlog.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@@ -22,7 +22,7 @@
<ClInclude Include="pch.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.base.h">
<ClInclude Include="Generated Files/resource.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
@@ -63,9 +63,15 @@
<Filter>Resource Files</Filter>
</None>
<None Include="packages.config" />
<None Include="resource.base.h">
<Filter>Header Files</Filter>
</None>
<None Include="FileLocksmithContextMenu.base.rc">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="FileLocksmithContextMenu.base.rc">
<ResourceCompile Include="Generated Files/FileLocksmithContextMenu.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>