Update the year in the Copyright string (#320)

Templatize the copyright string and use a build variable to set the year for use across the entire app.

How changes were validated:
Tested with English and French and with different dates.
This commit is contained in:
Rudy Huyn
2019-03-25 11:11:24 -07:00
committed by Howard Wolosky
parent 4603d387ae
commit 65045e9375
67 changed files with 228 additions and 218 deletions

View File

@@ -8,6 +8,7 @@
#include "CalcViewModel/Common/LocalizationStringUtil.h"
#include "CalcViewModel/Common/TraceLogger.h"
using namespace std;
using namespace CalculatorApp;
using namespace CalculatorApp::Common;
using namespace Platform;
@@ -19,6 +20,10 @@ using namespace Windows::UI::Xaml::Controls;
using namespace Windows::UI::Xaml::Controls::Primitives;
using namespace Windows::UI::Xaml::Data;
#ifndef BUILD_YEAR
#define BUILD_YEAR 2019
#endif
AboutFlyout::AboutFlyout()
{
auto locService = LocalizationService::GetInstance();
@@ -31,6 +36,10 @@ AboutFlyout::AboutFlyout()
this->SetVersionString();
Header->Text = resourceLoader.GetResourceString("AboutButton/Content");
auto copyrightText = LocalizationStringUtil::GetLocalizedString(resourceLoader.GetResourceString("AboutControlCopyright")->Data(), to_wstring(BUILD_YEAR).c_str());
AboutControlCopyrightRun->Text = ref new String(copyrightText.c_str());
}
void AboutFlyout::FeedbackButton_Click(_In_ Object^ sender, _In_ RoutedEventArgs^ e)