Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 2, 2026

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Undo newline-related changes from PR #64829

Description

PR #64829 added trailing newlines to auto-generated localization files and included them in newline validation tests. This PR reverts only those specific newline-related changes while preserving all other improvements from that PR.

Changes:

  • Updated NewlineEndingTest.cs to exclude .template.config/localize/ directory files from newline validation checks, as these are auto-generated localization files
  • Removed trailing newlines from all 350 templatestrings.*.json files in .template.config/localize/ directories across Web.ProjectTemplates, Web.ItemTemplates, and Web.Client.ItemTemplates

All changes from PR #64829 are preserved:

  • All 27 template.json files across Web.ProjectTemplates, Web.ItemTemplates, and Web.Client.ItemTemplates
  • UsingToolTemplateLocalizer configuration in all template project .csproj files
  • Shared/BlazorTemplateTest.cs and Shared/TestOutputLogger.cs test helper classes
  • All test infrastructure and test file changes

The changes restore the original state where auto-generated localization files are excluded from newline validation and do not have trailing newlines.


💡 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.

Copilot AI and others added 2 commits January 2, 2026 10:55
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
…te.json files

Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove changes to template.json files and adjust tests Revert template.json files and UsingToolTemplateLocalizer changes from PR #64829 Jan 2, 2026
Copilot AI requested a review from javiercn January 2, 2026 11:04
@javiercn
Copy link
Member

javiercn commented Jan 2, 2026

@copilot var filesWithoutNewlineEnding = new List();

    // Get all template source files (excluding third-party libraries and auto-generated localization files)
    // Get all template source files (excluding third-party libraries)
    var files = Directory.GetFiles(templateDirectoryPath, "*.cs", SearchOption.AllDirectories)
        .Concat(Directory.GetFiles(templateDirectoryPath, "*.fs", SearchOption.AllDirectories))
        .Concat(Directory.GetFiles(templateDirectoryPath, "*.razor", SearchOption.AllDirectories))
        .Concat(Directory.GetFiles(templateDirectoryPath, "*.xml", SearchOption.AllDirectories))
        .Concat(Directory.GetFiles(templateDirectoryPath, "*.csproj", SearchOption.AllDirectories))
        .Concat(Directory.GetFiles(templateDirectoryPath, "*.fsproj", SearchOption.AllDirectories))
        .Where(f => !f.Contains($"{Path.DirectorySeparatorChar}wwwroot{Path.DirectorySeparatorChar}lib{Path.DirectorySeparatorChar}")) // Exclude third-party libraries
        .Where(f => !f.Contains($"{Path.DirectorySeparatorChar}.template.config{Path.DirectorySeparatorChar}localize{Path.DirectorySeparatorChar}")); // Exclude auto-generated localization files in localize directory
        .Where(f => !f.Contains($"{Path.DirectorySeparatorChar}wwwroot{Path.DirectorySeparatorChar}lib{Path.DirectorySeparatorChar}")); // Exclude third-party libraries

    foreach (var file in files)
    {

This diff should be undone.

The changes for adding new lines to all the **/.template.config/localize/templatestrings.*.json files should be undone

…s from templatestrings.*.json files

Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 2, 2026

@copilot var filesWithoutNewlineEnding = new List();

    // Get all template source files (excluding third-party libraries and auto-generated localization files)...

Done in commits f7359d7 and 3d7e32e. Updated NewlineEndingTest.cs to exclude .template.config/localize/ files from the newline check, and removed trailing newlines from all 350 templatestrings.*.json files.

Copilot AI changed the title Revert template.json files and UsingToolTemplateLocalizer changes from PR #64829 Exclude localize files from newline check and remove trailing newlines from templatestrings.*.json Jan 2, 2026
Copy link
Member

@javiercn javiercn left a comment

Choose a reason for hiding this comment

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

undo the deletion of all the template.json files

Copy link
Member

Choose a reason for hiding this comment

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

@copilot Undo the delete of this file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Restored in commit b35f514.

Copy link
Member

Choose a reason for hiding this comment

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

@copilot Undo the delete of this file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Restored in commit b35f514.

Copy link
Member

Choose a reason for hiding this comment

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

@copilot Undo changes to this file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted to original state in commit b35f514.

Copy link
Member

Choose a reason for hiding this comment

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

@copilot Undo changes to this file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted to original state in commit b35f514.

Copy link
Member

Choose a reason for hiding this comment

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

@copilot Undo the delete of this file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Restored in commit b35f514.

Copy link
Member

Choose a reason for hiding this comment

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

Undo this change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted in commit b35f514.

…leted

Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 2, 2026

undo the deletion of all the template.json files

Restored all template.json files in commit b35f514.

Copilot AI requested a review from javiercn January 2, 2026 15:08
Copy link
Member

@javiercn javiercn left a comment

Choose a reason for hiding this comment

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

LGTM

@javiercn javiercn requested a review from ilonatommy January 2, 2026 15:41
@javiercn javiercn marked this pull request as ready for review January 5, 2026 10:30
@javiercn javiercn requested a review from a team as a code owner January 5, 2026 10:30
Copilot AI review requested due to automatic review settings January 5, 2026 10:30
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.

Copilot wasn't able to review any files in this pull request.

@ilonatommy
Copy link
Member

ilonatommy commented Jan 5, 2026

/ba-g GeneratorTests are broken across multiple PRs, it's not connected

@javiercn javiercn merged commit b12011f into main Jan 5, 2026
23 of 25 checks passed
@javiercn javiercn deleted the copilot/remove-template-json-changes branch January 5, 2026 12:41
@dotnet-policy-service dotnet-policy-service bot added this to the 11.0-preview1 milestone Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components Attention: Shared Code Modified

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants