Skip to content

Conversation

@csigs
Copy link
Member

@csigs csigs commented Nov 25, 2025

LEGO: Pull request from lego/hb_5378966c-b857-470a-8675-daebef4a6da1_20251125204230298 to main with localized lcls

Copilot AI review requested due to automatic review settings November 25, 2025 20:42
@github-project-automation github-project-automation bot moved this to Not started in PR Backlog Nov 25, 2025
@typescript-bot typescript-bot added For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Nov 25, 2025
Copilot finished reviewing on behalf of csigs November 25, 2025 20:46
Copy link

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 adds localized translations for two new TypeScript diagnostic error messages (error codes 1547 and 1548) related to using and await using declarations in switch statement cases. These messages inform developers that such declarations are not allowed in case or default clauses unless they are contained within a block.

  • Adds translations for diagnostic messages 1547 and 1548 across 7 languages
  • Messages follow the existing LCL (Localization Comment Language) XML structure
  • Translations are inserted in alphabetical order alongside existing error messages

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl Added Russian translations for the two new diagnostic messages
src/loc/lcl/ptb/diagnosticMessages/diagnosticMessages.generated.json.lcl Added Portuguese (Brazil) translations for the two new diagnostic messages
src/loc/lcl/kor/diagnosticMessages/diagnosticMessages.generated.json.lcl Added Korean translations for the two new diagnostic messages
src/loc/lcl/fra/diagnosticMessages/diagnosticMessages.generated.json.lcl Added French translations for the two new diagnostic messages (with quote mark inconsistencies)
src/loc/lcl/esn/diagnosticMessages/diagnosticMessages.generated.json.lcl Added Spanish translations for the two new diagnostic messages
src/loc/lcl/deu/diagnosticMessages/diagnosticMessages.generated.json.lcl Added German translations for the two new diagnostic messages
src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl Added Traditional Chinese translations for the two new diagnostic messages

Comment on lines +18632 to +18640
<Item ItemId=";await_using_declarations_are_not_allowed_in_case_or_default_clauses_unless_contained_within_a_block_1548" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['await using' declarations are not allowed in 'case' or 'default' clauses unless contained within a block.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Объявления "await using" не разрешены в предложениях "case" или "default", если они не находятся внутри блока.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

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

This PR only includes localizations for 7 out of 13 supported languages. The following language files are missing the new diagnostic messages for error codes 1547 and 1548:

  • src/loc/lcl/chs/diagnosticMessages/diagnosticMessages.generated.json.lcl (Chinese Simplified)
  • src/loc/lcl/csy/diagnosticMessages/diagnosticMessages.generated.json.lcl (Czech)
  • src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl (Italian)
  • src/loc/lcl/jpn/diagnosticMessages/diagnosticMessages.generated.json.lcl (Japanese)
  • src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl (Polish)
  • src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl (Turkish)

These files should be updated to include the same two new diagnostic messages:

  1. await_using_declarations_are_not_allowed_in_case_or_default_clauses_unless_contained_within_a_block_1548
  2. using_declarations_are_not_allowed_in_case_or_default_clauses_unless_contained_within_a_block_1547

The localized entries should follow the same XML structure and placement as seen in the already-updated language files.

Copilot uses AI. Check for mistakes.
<Str Cat="Text">
<Val><![CDATA['await using' declarations are not allowed in 'case' or 'default' clauses unless contained within a block.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Les déclarations 'await using' ne sont pas autorisées dans les clauses 'case' ou 'default', sauf si elles sont contenues dans un bloc.]]></Val>
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

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

The French translation is inconsistent with quote marks. The existing translation for error 1546 at line 18640 uses guillemet quotes (« await using »), but the new translation for error 1548 uses regular single quotes ('await using'). For consistency, line 18649 should use:

Les déclarations « await using » ne sont pas autorisées dans les clauses « case » ou « default », sauf si elles sont contenues dans un bloc.

This maintains consistency with the existing French localization style.

Copilot uses AI. Check for mistakes.
<Str Cat="Text">
<Val><![CDATA['using' declarations are not allowed in 'case' or 'default' clauses unless contained within a block.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Les déclarations 'using' ne sont pas autorisées dans les clauses 'case' ou 'default' sauf si elles sont incluses dans un bloc.]]></Val>
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

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

The French translation is inconsistent with quote marks. The existing translation for error 1545 at line 19513 uses guillemet quotes (« using »), but the new translation for error 1547 uses regular single quotes ('using'). For consistency, line 19522 should use:

Les déclarations « using » ne sont pas autorisées dans les clauses « case » ou « default » sauf si elles sont incluses dans un bloc.

This maintains consistency with the existing French localization style.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

3 participants