Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 4 additions & 1 deletion src/CalcViewModel/DataLoaders/UnitConverterDataConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ namespace CalculatorApp
Energy_Kilowatthour = UnitStart + 166,
Data_Nibble = UnitStart + 167,
Length_Angstrom = UnitStart + 168,
UnitEnd = Length_Angstrom
Length_AstronomicalUnit = UnitStart + 169,
Length_LightYear = UnitStart + 170,
Length_Parsec = UnitStart + 171,
UnitEnd = Length_Parsec
};
}
}
9 changes: 9 additions & 0 deletions src/CalcViewModel/DataLoaders/UnitConverterDataLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,12 @@ void UnitConverterDataLoader::GetUnits(_In_ unordered_map<ViewMode, vector<Order
unitMap.emplace(ViewMode::Energy, energyUnits);

vector<OrderedUnit> lengthUnits;
lengthUnits.push_back(OrderedUnit{
UnitConverterUnits::Length_AstronomicalUnit, GetLocalizedStringName(L"UnitName_AstronomicalUnit"), GetLocalizedStringName(L"UnitAbbreviation_AstronomicalUnit"), 16 });
lengthUnits.push_back(OrderedUnit{
UnitConverterUnits::Length_LightYear, GetLocalizedStringName(L"UnitName_LightYear"), GetLocalizedStringName(L"UnitAbbreviation_LightYear"), 17 });
lengthUnits.push_back(OrderedUnit{
UnitConverterUnits::Length_Parsec, GetLocalizedStringName(L"UnitName_Parsec"), GetLocalizedStringName(L"UnitAbbreviation_Parsec"), 18 });
lengthUnits.push_back(OrderedUnit{
UnitConverterUnits::Length_Angstrom, GetLocalizedStringName(L"UnitName_Angstrom"), GetLocalizedStringName(L"UnitAbbreviation_Angstrom"), 1 });
lengthUnits.push_back(OrderedUnit{ UnitConverterUnits::Length_Centimeter,
Expand Down Expand Up @@ -858,6 +864,9 @@ void UnitConverterDataLoader::GetConversionData(_In_ unordered_map<ViewMode, uno
{ ViewMode::Length, UnitConverterUnits::Length_Millimeter, 0.001 },
{ ViewMode::Length, UnitConverterUnits::Length_Nanometer, 0.000000001 },
{ ViewMode::Length, UnitConverterUnits::Length_Angstrom, 0.0000000001 },
{ ViewMode::Length, UnitConverterUnits::Length_AstronomicalUnit, 149597870700 },
{ ViewMode::Length, UnitConverterUnits::Length_LightYear, 9460730472580800 },
{ ViewMode::Length, UnitConverterUnits::Length_Parsec, 30856775814913672.789139379577965 },
{ ViewMode::Length, UnitConverterUnits::Length_Centimeter, 0.01 },
{ ViewMode::Length, UnitConverterUnits::Length_Meter, 1 },
{ ViewMode::Length, UnitConverterUnits::Length_Kilometer, 1000 },
Expand Down
24 changes: 22 additions & 2 deletions src/Calculator/Resources/af-ZA/Resources.resw
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down Expand Up @@ -4198,4 +4198,24 @@
<value>Kon nie hierdie skermskoot teruglaai nie.</value>
<comment>The error message to notify user that restoring from snapshot has failed.</comment>
</data>
</root>
<data name="UnitAbbreviation_AstronomicalUnit" xml:space="preserve">
<value>AE</value>
<comment>An abbreviation for a measurement unit of length</comment>
</data>
<data name="UnitAbbreviation_Parsec" xml:space="preserve">
<value>pc</value>
<comment>An abbreviation for a measurement unit of length</comment>
</data>
<data name="UnitName_AstronomicalUnit" xml:space="preserve">
<value>Astronomiese eenheid</value>
</data>
<data name="UnitName_LightYear" xml:space="preserve">
<value>ligjaar</value>
</data>
<data name="UnitName_Parsec" xml:space="preserve">
<value>parsec</value>
</data>
<data name="UnitAbbreviation_LightYear" xml:space="preserve">
<value>lj</value>
</data>
</root>
24 changes: 22 additions & 2 deletions src/Calculator/Resources/am-ET/Resources.resw
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down Expand Up @@ -4198,4 +4198,24 @@
<value>ይህን ቅጽበታዊ ገጽ እይታ ወደነበረበት መመለስ አልተቻለም።</value>
<comment>The error message to notify user that restoring from snapshot has failed.</comment>
</data>
</root>
<data name="UnitAbbreviation_AstronomicalUnit" xml:space="preserve">
<value>AU</value>
<comment>An abbreviation for a measurement unit of length</comment>
</data>
<data name="UnitAbbreviation_Parsec" xml:space="preserve">
<value>ፓ</value>
<comment>An abbreviation for a measurement unit of length</comment>
</data>
<data name="UnitName_AstronomicalUnit" xml:space="preserve">
<value>የአስትሮኖሚያ አምድ</value>
</data>
<data name="UnitName_LightYear" xml:space="preserve">
<value>የብርሃን ዓመት</value>
</data>
<data name="UnitName_Parsec" xml:space="preserve">
<value>ፓርሴክ</value>
</data>
<data name="UnitAbbreviation_LightYear" xml:space="preserve">
<value>ዓ/ብ</value>
</data>
</root>
22 changes: 20 additions & 2 deletions src/Calculator/Resources/ar-SA/Resources.resw
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down Expand Up @@ -4198,4 +4198,22 @@
<value>تعذرت استعادة هذه اللقطة.</value>
<comment>The error message to notify user that restoring from snapshot has failed.</comment>
</data>
</root>
<data name="UnitAbbreviation_AstronomicalUnit" xml:space="preserve">
<value>وَ.ف</value>
</data>
<data name="UnitAbbreviation_Parsec" xml:space="preserve">
<value>فرسخ فلكي</value>
</data>
<data name="UnitName_AstronomicalUnit" xml:space="preserve">
<value>وحدة فلكية</value>
</data>
<data name="UnitName_LightYear" xml:space="preserve">
<value>سنة ضوئية</value>
</data>
<data name="UnitName_Parsec" xml:space="preserve">
<value>فرسخ فلكي</value>
</data>
<data name="UnitAbbreviation_LightYear" xml:space="preserve">
<value>س.ض</value>
</data>
</root>
20 changes: 19 additions & 1 deletion src/Calculator/Resources/az-Latn-AZ/Resources.resw
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down Expand Up @@ -4198,4 +4198,22 @@
<value>Bu ani görüntünü bərpa etmək mümkün olmadı.</value>
<comment>The error message to notify user that restoring from snapshot has failed.</comment>
</data>
<data name="UnitAbbreviation_AstronomicalUnit" xml:space="preserve">
<value>AV</value>
</data>
<data name="UnitAbbreviation_Parsec" xml:space="preserve">
<value>ps</value>
</data>
<data name="UnitName_AstronomicalUnit" xml:space="preserve">
<value>astronomik vahid</value>
</data>
<data name="UnitName_LightYear" xml:space="preserve">
<value>işıq ili</value>
</data>
<data name="UnitName_Parsec" xml:space="preserve">
<value>parsek</value>
</data>
<data name="UnitAbbreviation_LightYear" xml:space="preserve">
<value>İİ</value>
</data>
</root>
20 changes: 19 additions & 1 deletion src/Calculator/Resources/bg-BG/Resources.resw
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down Expand Up @@ -4198,4 +4198,22 @@
<value>Неуспешно възстановяване на тази моментна снимка.</value>
<comment>The error message to notify user that restoring from snapshot has failed.</comment>
</data>
<data name="UnitAbbreviation_AstronomicalUnit" xml:space="preserve">
<value>АЕ</value>
</data>
<data name="UnitAbbreviation_Parsec" xml:space="preserve">
<value>пк</value>
</data>
<data name="UnitName_AstronomicalUnit" xml:space="preserve">
<value>астрономическа единица</value>
</data>
<data name="UnitName_LightYear" xml:space="preserve">
<value>светлинна година</value>
</data>
<data name="UnitName_Parsec" xml:space="preserve">
<value>парсек</value>
</data>
<data name="UnitAbbreviation_LightYear" xml:space="preserve">
<value>св.г</value>
</data>
</root>
20 changes: 19 additions & 1 deletion src/Calculator/Resources/ca-ES/Resources.resw
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down Expand Up @@ -4198,4 +4198,22 @@
<value>No s'ha pogut restaurar aquesta instantània.</value>
<comment>The error message to notify user that restoring from snapshot has failed.</comment>
</data>
<data name="UnitAbbreviation_AstronomicalUnit" xml:space="preserve">
<value>UA</value>
</data>
<data name="UnitAbbreviation_Parsec" xml:space="preserve">
<value>pc</value>
</data>
<data name="UnitName_AstronomicalUnit" xml:space="preserve">
<value>unitat astronòmica</value>
</data>
<data name="UnitName_LightYear" xml:space="preserve">
<value>any llum</value>
</data>
<data name="UnitName_Parsec" xml:space="preserve">
<value>parsec</value>
</data>
<data name="UnitAbbreviation_LightYear" xml:space="preserve">
<value>al</value>
</data>
</root>
20 changes: 19 additions & 1 deletion src/Calculator/Resources/cs-CZ/Resources.resw
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down Expand Up @@ -4198,4 +4198,22 @@
<value>Tento snímek se nepovedlo obnovit.</value>
<comment>The error message to notify user that restoring from snapshot has failed.</comment>
</data>
<data name="UnitAbbreviation_AstronomicalUnit" xml:space="preserve">
<value>AJ</value>
</data>
<data name="UnitAbbreviation_Parsec" xml:space="preserve">
<value>pc</value>
</data>
<data name="UnitName_AstronomicalUnit" xml:space="preserve">
<value>astronomická jednotka</value>
</data>
<data name="UnitName_LightYear" xml:space="preserve">
<value>světelný rok</value>
</data>
<data name="UnitName_Parsec" xml:space="preserve">
<value>parsek</value>
</data>
<data name="UnitAbbreviation_LightYear" xml:space="preserve">
<value>sv. r.</value>
</data>
</root>
20 changes: 19 additions & 1 deletion src/Calculator/Resources/da-DK/Resources.resw
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down Expand Up @@ -4198,4 +4198,22 @@
<value>Kunne ikke gendanne dette snapshot.</value>
<comment>The error message to notify user that restoring from snapshot has failed.</comment>
</data>
<data name="UnitAbbreviation_AstronomicalUnit" xml:space="preserve">
<value>AE</value>
</data>
<data name="UnitAbbreviation_Parsec" xml:space="preserve">
<value>pc</value>
</data>
<data name="UnitName_AstronomicalUnit" xml:space="preserve">
<value> astronomisk enhed</value>
</data>
<data name="UnitName_LightYear" xml:space="preserve">
<value>lysår</value>
</data>
<data name="UnitName_Parsec" xml:space="preserve">
<value>parsec</value>
</data>
<data name="UnitAbbreviation_LightYear" xml:space="preserve">
<value>ly</value>
</data>
</root>
20 changes: 19 additions & 1 deletion src/Calculator/Resources/de-DE/Resources.resw
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down Expand Up @@ -4198,4 +4198,22 @@
<value>Diese Momentaufnahme konnte nicht wiederhergestellt werden.</value>
<comment>The error message to notify user that restoring from snapshot has failed.</comment>
</data>
<data name="UnitAbbreviation_AstronomicalUnit" xml:space="preserve">
<value>AE</value>
</data>
<data name="UnitAbbreviation_Parsec" xml:space="preserve">
<value>pc</value>
</data>
<data name="UnitName_AstronomicalUnit" xml:space="preserve">
<value>astronomische Einheit</value>
</data>
<data name="UnitName_LightYear" xml:space="preserve">
<value>Lichtjahr</value>
</data>
<data name="UnitName_Parsec" xml:space="preserve">
<value>Parsec</value>
</data>
<data name="UnitAbbreviation_LightYear" xml:space="preserve">
<value>Lj</value>
</data>
</root>
20 changes: 19 additions & 1 deletion src/Calculator/Resources/el-GR/Resources.resw
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down Expand Up @@ -4198,4 +4198,22 @@
<value>Δεν ήταν δυνατή η επαναφορά του παρόντος στιγμιότυπου.</value>
<comment>The error message to notify user that restoring from snapshot has failed.</comment>
</data>
<data name="UnitAbbreviation_AstronomicalUnit" xml:space="preserve">
<value>ΑΜ</value>
</data>
<data name="UnitAbbreviation_Parsec" xml:space="preserve">
<value>παρσ</value>
</data>
<data name="UnitName_AstronomicalUnit" xml:space="preserve">
<value>αστρονομική μονάδα</value>
</data>
<data name="UnitName_LightYear" xml:space="preserve">
<value>έτος φωτός</value>
</data>
<data name="UnitName_Parsec" xml:space="preserve">
<value>παράσεκ</value>
</data>
<data name="UnitAbbreviation_LightYear" xml:space="preserve">
<value>έφ</value>
</data>
</root>
20 changes: 19 additions & 1 deletion src/Calculator/Resources/en-GB/Resources.resw
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down Expand Up @@ -4198,4 +4198,22 @@
<value>Couldn't restore this snapshot.</value>
<comment>The error message to notify user that restoring from snapshot has failed.</comment>
</data>
<data name="UnitAbbreviation_AstronomicalUnit" xml:space="preserve">
<value>AU</value>
</data>
<data name="UnitAbbreviation_Parsec" xml:space="preserve">
<value>pc</value>
</data>
<data name="UnitName_AstronomicalUnit" xml:space="preserve">
<value> Astronomical unit</value>
</data>
<data name="UnitName_LightYear" xml:space="preserve">
<value>light‑year</value>
</data>
<data name="UnitName_Parsec" xml:space="preserve">
<value>parsec</value>
</data>
<data name="UnitAbbreviation_LightYear" xml:space="preserve">
<value>ly</value>
</data>
</root>
Loading