Skip to content
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

[PTRun Unit Converter] Support for 'sq' prefixed units #37648

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replaced "^2" suffix for converted inputs with "²".
  • Loading branch information
OldUser101 committed Feb 26, 2025
commit 54ddde85855dbf2be9cdea80ad744d8578a808c3
Original file line number Diff line number Diff line change
@@ -266,75 +266,75 @@
{
switch (split[1].ToLower(culture))
{
case "sqcm":

Check warning on line 269 in src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/InputInterpreter.cs

GitHub Actions / Check Spelling

`sqcm` is not a recognized word. (unrecognized-spelling)
split[1] = "cm^2";
split[1] = "cm²";
break;
case "sqdm":

Check warning on line 272 in src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/InputInterpreter.cs

GitHub Actions / Check Spelling

`sqdm` is not a recognized word. (unrecognized-spelling)
split[1] = "dm^2";
split[1] = "dm²";
break;
case "sqft":

Check warning on line 275 in src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/InputInterpreter.cs

GitHub Actions / Check Spelling

`sqft` is not a recognized word. (unrecognized-spelling)
split[1] = "ft^2";
split[1] = "ft²";
break;
case "sqin":

Check warning on line 278 in src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/InputInterpreter.cs

GitHub Actions / Check Spelling

`sqin` is not a recognized word. (unrecognized-spelling)
split[1] = "in^2";
split[1] = "in²";
break;
case "sqkm":

Check warning on line 281 in src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/InputInterpreter.cs

GitHub Actions / Check Spelling

`sqkm` is not a recognized word. (unrecognized-spelling)
split[1] = "km^2";
split[1] = "km²";
break;
case "sqm":

Check warning on line 284 in src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/InputInterpreter.cs

GitHub Actions / Check Spelling

`sqm` is not a recognized word. (unrecognized-spelling)
split[1] = "m^2";
split[1] = "m²";
break;
case "sqmi":

Check warning on line 287 in src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/InputInterpreter.cs

GitHub Actions / Check Spelling

`sqmi` is not a recognized word. (unrecognized-spelling)
split[1] = "mi^2";
split[1] = "mi²";
break;
case "sqmm":

Check warning on line 290 in src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/InputInterpreter.cs

GitHub Actions / Check Spelling

`sqmm` is not a recognized word. (unrecognized-spelling)
split[1] = "mm^2";
split[1] = "mm²";
break;
case "sqnmi":

Check warning on line 293 in src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/InputInterpreter.cs

GitHub Actions / Check Spelling

`sqnmi` is not a recognized word. (unrecognized-spelling)
split[1] = "nmi^2";
split[1] = "nmi²";

Check warning on line 294 in src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/InputInterpreter.cs

GitHub Actions / Check Spelling

`nmi` is not a recognized word. (unrecognized-spelling)
break;
case "sqyd":
split[1] = "yd^2";
split[1] = "yd²";
break;
case "squm":
split[1] = "µm^2";
case "sqµm":
split[1] = "µm²";
break;
}

switch (split[3].ToLower(culture))
{
case "sqcm":
split[3] = "cm^2";
split[3] = "cm²";
break;
case "sqdm":
split[3] = "dm^2";
split[3] = "dm²";
break;
case "sqft":
split[3] = "ft^2";
split[3] = "ft²";
break;
case "sqin":
split[3] = "in^2";
split[3] = "in²";
break;
case "sqkm":
split[3] = "km^2";
split[3] = "km²";
break;
case "sqm":
split[3] = "m^2";
split[3] = "m²";
break;
case "sqmi":
split[3] = "mi^2";
split[3] = "mi²";
break;
case "sqmm":
split[3] = "mm^2";
split[3] = "mm²";
break;
case "sqnmi":
split[3] = "nmi^2";
split[3] = "nmi²";
break;
case "sqyd":
split[3] = "yd^2";
split[3] = "yd²";
break;
case "sqµm":
split[3] = "µm^2";
split[3] = "µm²";
break;
}
}
Loading
Oops, something went wrong.