Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 14, 2026

Plan: Cleanup Unused Resources in CliCommandStrings

Analysis Complete

  • Identify unused resource strings in CliCommandStrings.resx
  • Found 17 potentially unused resources
  • Verified actual usage and found 2 are still used

Resources Removed (15 total)

  • Removed the following unused resources from CliCommandStrings.resx:
    • CmdPackageDescription
    • VerbRun
    • VerbTest
    • CouldNotConvertToBoolean
    • CouldNotConvertToString
    • FailedWithErrorsAndWarnings
    • FailedWithWarnings
    • InvalidSemVerVersionString
    • ProjectConvertWouldMoveFile
    • ProjectConvertWouldDeleteFile
    • ToolInstallPackageIdArgumentDescription
    • ToolInstallPackageIdArgumentName
    • ToolUpdatePackageIdArgumentDescription
    • ToolUpdatePackageIdArgumentName
    • ValueMustBeAnObject

Resources Restored (2 total)

  • Restored these resources as they are still in use:
    • InvalidVersionForWorkload (used in tests)
    • RunCommandExceptionCouldNotLocateALaunchSettingsFile (used in tests)

Localization Files

  • Updated corresponding .xlf files using MSBuild UpdateXlf target
  • Restored original translations that were lost during the process
    • InvalidVersionForWorkload: Restored to original location with translated text
    • RunCommandExceptionCouldNotLocateALaunchSettingsFile: Restored translated text
  • Build automatically removed translations for the 15 deleted resources (975 lines removed across 13 xlf files)

Code Review Feedback

  • Removed ALL blank lines that were introduced by resource removal
    • 5 single blank lines (between existing entries)
    • 6 double blank lines (extra spacing)
    • 6 blank lines at resource removal sites
  • Restored translations for resources that were re-added
  • Ran build to update XLF files and committed auto-generated changes

Verification

  • Built the project successfully with no compilation errors
  • Verified no references exist to removed resources in codebase
  • Code review completed
  • Security scan passed (no code changes to analyze)
  • No blank lines remain from resource removal
  • All translations preserved correctly
  • XLF files properly synchronized with .resx file
Original prompt

Cleanup unused resources in CliCommandStrings


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

<data name="CmdPackageDescription" xml:space="preserve">
<value>The package reference to add. This can be in the form of just the package identifier, for example 'Newtonsoft.Json', or a package identifier and version separated by '@', for example '[email protected]'</value>
</data>

Copy link
Member

Choose a reason for hiding this comment

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

@copilot Avoid adding those blank lines.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 5c16da6. Removed 5 blank lines that were introduced when deleting unused resources.

Copilot AI changed the title [WIP] Cleanup unused resources in CliCommandStrings Remove 15 unused resource strings from CliCommandStrings Jan 14, 2026
Copilot AI requested a review from Youssef1313 January 14, 2026 06:56
<data name="VerbTest" xml:space="preserve">
<value>test</value>
</data>

Copy link
Member

Choose a reason for hiding this comment

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

@copilot Remove all blank lines that are added in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 7600733. Removed 6 double blank lines that were introduced when deleting unused resources.

<source>Cannot use launch profile '{0}' because the launch settings file could not be located. Locations tried:
{1}</source>
<target state="translated">Nelze použít profil spouštění {0}, protože soubor nastavení spouštění nebyl nalezen. Vyzkoušená umístění:
<target state="new">Cannot use launch profile '{0}' because the launch settings file could not be located. Locations tried:
Copy link
Member

Choose a reason for hiding this comment

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

@copilot Restore the translation back.

Comment on lines 110 to 114
<trans-unit id="InvalidVersionForWorkload">
<source>Error parsing version '{1}' for workload manifest ID '{0}'</source>
<target state="new">Error parsing version '{1}' for workload manifest ID '{0}'</target>
<note />
</trans-unit>
Copy link
Member

Choose a reason for hiding this comment

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

@copilot Restore this in the original place it was in. This applies to all xlf files

…ptionCouldNotLocateALaunchSettingsFile in all xlf files

Co-authored-by: Youssef1313 <[email protected]>
@Youssef1313
Copy link
Member

@copilot Run a build so that XLF files get updated, and commit the changes that will be automatically produced by the build.

Copy link
Contributor Author

Copilot AI commented Jan 14, 2026

@copilot Run a build so that XLF files get updated, and commit the changes that will be automatically produced by the build.

Done in 7fdc9ef. Built the project and committed the automatically updated XLF files (removed 975 lines of translations for the 15 deleted resources across all 13 xlf files).

@Youssef1313 Youssef1313 marked this pull request as ready for review January 14, 2026 09:08
Copilot AI review requested due to automatic review settings January 14, 2026 09:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR performs a cleanup of unused resource strings in CliCommandStrings, removing 15 obsolete entries that are no longer referenced in the codebase. The cleanup reduces maintenance burden by eliminating dead code and simplifies the localization files.

Changes:

  • Removed 15 unused resource strings from CliCommandStrings.resx
  • Updated 13 .xlf localization files to remove corresponding translations

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Cli/dotnet/Commands/CliCommandStrings.resx Removed 15 unused resource entries including package descriptions, verb names, conversion error messages, project convert messages, and tool command arguments
src/Cli/dotnet/Commands/xlf/CliCommandStrings.cs.xlf Removed Czech translations for the 15 deleted resources
src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf Removed German translations for the 15 deleted resources
src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf Removed Spanish translations for the 15 deleted resources
src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf Removed French translations for the 15 deleted resources
src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf Removed Italian translations for the 15 deleted resources
src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf Removed Japanese translations for the 15 deleted resources
src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf Removed Korean translations for the 15 deleted resources
src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf Removed Polish translations for the 15 deleted resources
src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf Removed Brazilian Portuguese translations for the 15 deleted resources
src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf Removed Russian translations for the 15 deleted resources
src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf Removed Turkish translations for the 15 deleted resources
src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf Removed Simplified Chinese translations for the 15 deleted resources
src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf Removed Traditional Chinese translations for the 15 deleted resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants