Skip to content

[Quick Accent] Add Maltese language #39473

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

rovercoder
Copy link
Contributor

@rovercoder rovercoder commented May 15, 2025

PR inspired by: #32862

Summary of the Pull Request

Adds Maltese latin alphabet symbols (ċ, ġ, ħ, ż) and the Euro (€) sign [Malta's currency] as a supported language into Quick Accent

2025-05-15 22_04_53-PowerToys Settings-Quick Accent-Maltese

PowerToys-PowerAccent-Maltese-Result

PR Checklist

Validation Steps Performed

Observing

@rovercoder
Copy link
Contributor Author

@microsoft-github-policy-service agree

@crutkas crutkas added Needs-Review This Pull Request awaits the review of a maintainer. Product-Quick Accent Refers to the Quick Accent PowerToy labels May 28, 2025
@yeelam-gordon yeelam-gordon requested a review from Copilot June 10, 2025 05:11
Copy link
Contributor

@Copilot 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

Adds support for the Maltese language in Quick Accent, enabling users to select Maltese and type its unique accented letters.

  • Registers "MT" in the view model so Maltese appears in the language dropdown
  • Provides a localized display string for Maltese in the English resource file
  • Extends the core Language enum and default letter mappings to include Maltese accents

Reviewed Changes

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

File Description
src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs Added Maltese (“MT”) to the list of supported languages
src/settings-ui/Settings.UI/Strings/en-us/Resources.resw Added the “Maltese” resource entry for UI localization
src/modules/poweraccent/PowerAccent.Core/Languages.cs Extended Language enum, included MT in mappings, and added GetDefaultLetterKeyMT
.github/actions/spell-check/expect.txt Added “MT” to spell-check exception list
Comments suppressed due to low confidence (3)

src/modules/poweraccent/PowerAccent.Core/Languages.cs:843

  • [nitpick] Consider adding a XML/doc comment above this method to explain its purpose and list the supported Maltese accents for better maintainability.
private static string[] GetDefaultLetterKeyMT(LetterKey letter)

src/modules/poweraccent/PowerAccent.Core/Languages.cs:843

  • Add unit tests for GetDefaultLetterKeyMT to verify that each LetterKey returns the correct accented characters and that non-mapped keys return an empty array.
private static string[] GetDefaultLetterKeyMT(LetterKey letter)

src/modules/poweraccent/PowerAccent.Core/Languages.cs:848

  • The mapping of VK_E to the euro symbol may be unintended for Maltese, since the PR only mentions adding alphabet accents. Remove or confirm this mapping if it’s not required.
LetterKey.VK_E => new[] { "€" },

@rovercoder
Copy link
Contributor Author

rovercoder commented Jun 10, 2025

An XML/doc comment above the private static string[] GetDefaultLetterKeyMT(LetterKey letter) method would break the convention in this particular file, therefore no XML/doc comment was added. Only a comment describing the language that is being handled was added above this method, as per convention.

Unit tests are not necessary in this case to test the private static string[] GetDefaultLetterKeyMT(LetterKey letter) method.

The mapping of VK_E to the Euro (€) symbol is intentional as Malta, being the only country having Maltese as its official language, uses Euro as its currency. In the other supported languages in Quick Access, currency symbols referring to the currencies in use in countries using each respective language are normally implemented.

This comment has been minimized.

Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

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

Just based off the code near it - this looks fine to me.

@DHowett who's the new Quick Accent owner? I bet we can get this in

@zadjii-msft
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Review This Pull Request awaits the review of a maintainer. Product-Quick Accent Refers to the Quick Accent PowerToy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants