Add a new IntelliSense translation string and normalize JSON trailing newlines.#14579
Open
sean-mcmanus wants to merge 1 commit into
Open
Add a new IntelliSense translation string and normalize JSON trailing newlines.#14579sean-mcmanus wants to merge 1 commit into
sean-mcmanus wants to merge 1 commit into
Conversation
Contributor
Author
|
These shouldn't get checked in until the corresponding cpptools side PR 757614 gets approved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a new IntelliSense translation string and normalize JSON trailing newlines.
Fixed by Copilot (Claude Opus 4.8) in VS Code.
Summary
The C++ IntelliSense language server can now emit an additional diagnostic
message. Its localized message tables under
Extension/bin/messages/<locale>/messages.jsonare positional arrays indexed by message ID, so every locale's array must be at
least as long as the highest message ID the server can produce. A locale whose
array was shorter than the new message's index would hit an out-of-range lookup
when that diagnostic was emitted, failing the language server for that locale.
This adds the new English string to every locale's table so all locales stay in
sync. The entry is intentionally left in English for now; localized translations
will arrive later through the normal translation-import pipeline.
While making that change, this PR also makes JSON trailing newlines consistent
across the extension and stops them from being silently stripped on save.
Message table update
Appended the new string to all 13 locale files in
Extension/bin/messages:It is added at the same positional index in every locale, matching the new
message ID, so lookups line up across all languages.
JSON trailing-newline consistency
Two settings in
.vscode/settings.jsondisagreed:[jsonc]inserted a finalnewline on save, but
[json]did not. Because[json]also formats on save,saving any
.jsonfile reformatted it and then dropped the trailing newline,producing spurious diffs whenever a JSON file was opened and saved. Several
files had already lost their final newline this way.
Changes:
.vscode/settings.json: setfiles.insertFinalNewlinetotruefor[json](it was
false), matching[jsonc]. Saving a JSON file no longer strips thetrailing newline.
.jsonfiles to end with a single trailing newline,including the generated
i18n/**/*.i18n.jsontranslation files.gulpfile.js(translations-import): append a trailing newline to eachgenerated
.i18n.jsonafter it is written, so future translation imports keepthe files consistent with the convention above. The existing generators for
bin/messagesandpackage.jsonalready write a trailing newline, so nochange was needed there.
Notes
described above; the remaining changes are whitespace-only and tooling.