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:
committed by
Howard Wolosky
parent
4603d387ae
commit
65045e9375
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user