forked from microsoft/winget-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResources.cpp
More file actions
28 lines (23 loc) · 730 Bytes
/
Copy pathResources.cpp
File metadata and controls
28 lines (23 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#pragma once
#include "pch.h"
#include "Resources.h"
namespace AppInstaller::CLI::Resource
{
LocString::LocString(StringId id) : Utility::LocIndString(Loader::Instance().ResolveString(id)) {}
const Loader& Loader::Instance()
{
static Loader instance;
return instance;
}
Loader::Loader()
{
m_wingetLoader = winrt::Windows::ApplicationModel::Resources::ResourceLoader::GetForViewIndependentUse(L"winget");
}
std::string Loader::ResolveString(
std::wstring_view resKey) const
{
return Utility::ConvertToUTF8(m_wingetLoader.GetString(resKey));
}
}