Skip to content

Commit

Permalink
Fix localized strings output (#3673)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdanish-kh authored Sep 26, 2023
1 parent c255b68 commit 646d879
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/AppInstallerCLICore/Workflows/DependencyNodeProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ namespace AppInstaller::CLI::Workflow

if (matches.empty())
{
error << Resource::String::DependenciesFlowNoMatches;
error << Resource::String::DependenciesFlowNoMatches << std::endl;
return DependencyNodeProcessorResult::Error;
}

if (matches.size() > 1)
{
auto dependencyNodeId = Utility::LocIndString{ Utility::Normalize(dependencyNode.Id()) };
error << Resource::String::DependenciesFlowSourceTooManyMatches(dependencyNodeId);
error << Resource::String::DependenciesFlowSourceTooManyMatches(dependencyNodeId) << std::endl;
AICLI_LOG(CLI, Error, << "Too many matches for package " << dependencyNode.Id());
return DependencyNodeProcessorResult::Error;
}
Expand Down Expand Up @@ -60,17 +60,17 @@ namespace AppInstaller::CLI::Workflow
// as we won't keep searching for dependencies for installed packages
return DependencyNodeProcessorResult::Skipped;
}

if (!m_nodePackageLatestVersion)
{
error << Resource::String::DependenciesFlowPackageVersionNotFound(Utility::LocIndView{ Utility::Normalize(packageId) });
error << Resource::String::DependenciesFlowPackageVersionNotFound(Utility::LocIndView{ Utility::Normalize(packageId) }) << std::endl;
AICLI_LOG(CLI, Error, << "Latest available version not found for package " << packageId);
return DependencyNodeProcessorResult::Error;
}

if (!dependencyNode.IsVersionOk(Utility::Version(m_nodePackageLatestVersion->GetProperty(PackageVersionProperty::Version))))
{
error << Resource::String::DependenciesFlowNoMinVersion(Utility::LocIndView{ Utility::Normalize(packageId) });
error << Resource::String::DependenciesFlowNoMinVersion(Utility::LocIndView{ Utility::Normalize(packageId) }) << std::endl;
AICLI_LOG(CLI, Error, << "No suitable min version found for package " << packageId);
return DependencyNodeProcessorResult::Error;
}
Expand All @@ -80,7 +80,7 @@ namespace AppInstaller::CLI::Workflow

if (m_nodeManifest.Installers.empty())
{
error << Resource::String::DependenciesFlowNoInstallerFound(Utility::LocIndView{ Utility::Normalize(m_nodeManifest.Id) });
error << Resource::String::DependenciesFlowNoInstallerFound(Utility::LocIndView{ Utility::Normalize(m_nodeManifest.Id) }) << std::endl;
AICLI_LOG(CLI, Error, << "Installer not found for manifest " << m_nodeManifest.Id << " with version" << m_nodeManifest.Version);
return DependencyNodeProcessorResult::Error;
}
Expand All @@ -98,7 +98,7 @@ namespace AppInstaller::CLI::Workflow
{
auto manifestId = Utility::LocIndString{ Utility::Normalize(m_nodeManifest.Id) };
auto manifestVersion = Utility::LocIndString{ m_nodeManifest.Version };
error << Resource::String::DependenciesFlowNoSuitableInstallerFound(manifestId, manifestVersion);
error << Resource::String::DependenciesFlowNoSuitableInstallerFound(manifestId, manifestVersion) << std::endl;
AICLI_LOG(CLI, Error, << "No suitable installer found for manifest " << m_nodeManifest.Id << " with version " << m_nodeManifest.Version);
return DependencyNodeProcessorResult::Error;
}
Expand Down
4 changes: 2 additions & 2 deletions src/AppInstallerCLIPackage/Shared/Strings/en-us/winget.resw
Original file line number Diff line number Diff line change
Expand Up @@ -1021,8 +1021,8 @@ Configuration is disabled due to Group Policy.</value>
<comment>Dependency graph has loop</comment>
</data>
<data name="DependenciesFlowNoSuitableInstallerFound" xml:space="preserve">
<value>No suitable installer found for manifest: {0} {1}</value>
<comment>{Locked="{0} {1}"} Error message displayed when an attempt to get a preferred installer for a manifest fails. {0} is a placeholder replaced by the manifest identifier. {1} is a placeholder replaced by the manifest version.</comment>
<value>No suitable installer found for manifest: {0} version {1}</value>
<comment>{Locked="{0}","{1}"} Error message displayed when an attempt to get a preferred installer for a manifest fails. {0} is a placeholder replaced by the manifest identifier. {1} is a placeholder replaced by the manifest version.</comment>
</data>
<data name="DependenciesManagementError" xml:space="preserve">
<value>Error processing package dependencies, do you wish to continue installation?</value>
Expand Down

0 comments on commit 646d879

Please sign in to comment.