Skip to content

Add support links for Ukraine in Russian language - #910

Merged
Raphire merged 2 commits into
masterfrom
add-ru-ukraine-support-links
Nov 15, 2026
Merged

Raphire merged 2 commits into
masterfrom
add-ru-ukraine-support-links

Conversation

@Raphire

@Raphire Raphire commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Replace the support links with links to support Ukraine when using Russian language.

Summary by CodeRabbit

  • Russian (ru-RU) users now see support-Ukraine text and links instead of the Ko-fi support text and link.
  • Get-SupportLinkUrl returns the Ukraine support URL when the active language is ru-RU. For other languages, it returns the Ko-fi URL.
  • Set-SupportLinkIcon draws a blue-and-yellow Ukrainian flag as the support-link icon for ru-RU. For other languages, it shows the support-heart glyph and clears the flag-specific size and background.
  • Update-WindowLanguageResources sets the support-link icon after it updates language resources.
  • The Ko-fi button in the main window, the About dialog, and the Apply modal use Get-SupportLinkUrl instead of a fixed Ko-fi URL. The Apply modal keeps its error-state behavior and still opens the GitHub issue form.
  • Config/Languages/ru-RU/Chrome.json changes the support-creator label and Ko-fi link text to "Support Ukraine." The donation message asks users to support Ukraine. The default and ready completion messages mention Russia's aggression against Ukraine and link to support Ukraine.
  • XAML updates:
    • Schemas/ApplyChangesWindow.xaml names the support-creator icon TextBlock ApplyKofiIcon. Its appearance does not change.
    • Schemas/MainWindow.xaml places the KofiBtn icon in a named TextBlock instead of the button Content. The tooltip, accessibility name, font size, style, and hit testing do not change.
  • ConvertTo-LocalizedXaml encodes carriage returns and line feeds as 
 and 
 after XML escaping.
  • Tests: a new ConvertTo-LocalizedXaml test checks that text with an ampersand and a blank-line paragraph break survives XML attribute parsing with LF and CRLF line endings.
  • New functions: Get-SupportLinkUrl() and Set-SupportLinkIcon(Icon), both in Scripts/GUI/MainWindow-Localization.ps1.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Russian Chrome resources now refer to supporting Ukraine. The main window, About dialog, and apply modal use language-dependent support icons and URLs. The localization converter encodes line breaks in translated values, with tests for LF and CRLF inputs.

Changes: Language-dependent support links

Layer / File(s) Summary
Select support icon and URL
Schemas/MainWindow.xaml, Schemas/ApplyChangesWindow.xaml, Scripts/GUI/MainWindow-Localization.ps1
The XAML names support icon elements. Localization helpers select the icon and support URL based on the active language.
Wire support links into UI surfaces
Scripts/GUI/Show-AboutDialog.ps1, Scripts/GUI/Show-ApplyModal.ps1, Scripts/GUI/Show-MainWindow.ps1, Config/Languages/ru-RU/Chrome.json
The main window, About dialog, and apply modal use the language-dependent support URL and icon. Russian resources update support labels and completion messages to refer to Ukraine.

Localized XAML line breaks

Layer / File(s) Summary
Encode and validate translated line breaks
Scripts/FileIO/Import-LanguageFile.ps1, Tests/Import-LanguageFile.Tests.ps1
The converter encodes carriage returns and line feeds after XML escaping. Tests check that LF and CRLF paragraph breaks parse back to the original text.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant SupportLinkHandler
  participant GetSupportLinkUrl
  participant Shell
  User->>SupportLinkHandler: Click support link
  SupportLinkHandler->>GetSupportLinkUrl: Request URL for active language
  GetSupportLinkUrl-->>SupportLinkHandler: Return Ukraine URL for ru-RU or Ko-fi URL otherwise
  SupportLinkHandler->>Shell: Open returned URL
Loading

Suggested reviewers: wang13zhe

Merge Risk: Minimal · up to 2451d

This change shows Ukraine support links and icons when Russian is selected, and keeps line breaks in translated text. No concrete merge-blocking risk was found in the changed code.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Add support links for Ukraine in Russian language" matches the main change. The PR replaces the Ko-fi support links shown under Russian with Ukraine support links. It covers the About dialo…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Powershell Docstrings Passed The PR adds two PowerShell functions and changes several others. Each added or changed function has a comment-based docstring, and the docstrings match the code. Added functions (Scripts/GUI/MainWindo…
Full details: Title check

Explanation

The title "Add support links for Ukraine in Russian language" matches the main change. The PR replaces the Ko-fi support links shown under Russian with Ukraine support links. It covers the About dialog, the apply modal, the main window button, and the Russian localization strings. The title is 49 characters, which fits the concise-title requirement.

Full details: Powershell Docstrings

Explanation

The PR adds two PowerShell functions and changes several others. Each added or changed function has a comment-based docstring, and the docstrings match the code. Added functions (Scripts/GUI/MainWindow-Localization.ps1): - Get-SupportLinkUrl has a .SYNOPSIS. It says the function returns the support destination for the active language. The code returns the Ukraine URL for ru-RU and the Ko-fi URL otherwise. This matches. - Set-SupportLinkIcon has a .SYNOPSIS and a .PARAMETER Icon. The code does nothing when Icon is null. It draws the flag for ru-RU and sets the heart glyph and clears the flag properties otherwise. The .PARAMETER text ("when present in the window") covers the null case. The synopsis matches the behaviour. Changed functions: - Update-WindowLanguageResources (MainWindow-Localization.ps1) now also calls Set-SupportLinkIcon. Its .DESCRIPTION still describes only text sync. This is a minor gap, not a contradiction. - ConvertTo-LocalizedXaml (Import-LanguageFile.ps1) now also encodes CR and LF as 
 and 
. Its docstring says the non-dynamic path "embeds XML-escaped translated text". That remains broadly true, but it does not mention the line-break encoding. This is a minor gap. - Show-AboutDialog, Show-ApplyModal, and Show-MainWindow changed only their wiring. Their docstrings (.SYNOPSIS and .PARAMETER) remain accurate. The check does not require every docstring section in the example. The docstrings present are accurate. The two minor gaps are documentation drift only, and they do not contradict current behaviour. Recommend adding the support-icon sync to the Update-WindowLanguageResources description and the CR/LF encoding to the ConvertTo-LocalizedXaml description.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 51dfa47e-d8e8-41b9-a614-538d4fef9141
Commits

Reviewing files that changed from the base of the PR and between 789a31a and 2451d6a.

Files selected for processing: 1

  • Config/Languages/ru-RU/Chrome.json
Files skipped from review as they are similar to previous changes: 1

  • Config/Languages/ru-RU/Chrome.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

@Raphire
Raphire merged commit 3d8feef into master Nov 15, 2026
4 checks passed
@Raphire
Raphire deleted the add-ru-ukraine-support-links branch November 15, 2026 16:27
zhaikong pushed a commit to zhaikong/win11debloat that referenced this pull request Nov 18, 2026
zhaikong pushed a commit to zhaikong/win11debloat that referenced this pull request Dec 3, 2026
zhaikong pushed a commit to zhaikong/win11debloat that referenced this pull request Dec 4, 2026
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.

1 participant