Skip to content

Commit

Permalink
Fix common template providers
Browse files Browse the repository at this point in the history
  • Loading branch information
rawagner committed Dec 3, 2020
1 parent 9b54737 commit dee3507
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Expand Up @@ -305,6 +305,7 @@
"Browse for charts that help manage complex installations and upgrades. Cluster administrators can customize the content made available in the catalog.": "Browse for charts that help manage complex installations and upgrades. Cluster administrators can customize the content made available in the catalog.",
"**Virtual Machines** are packages for deploying an application or components of a larger application.": "**Virtual Machines** are packages for deploying an application or components of a larger application.",
"Template Providers": "Template Providers",
"Provided by {{provider}}": "Provided by {{provider}}",
"Provided by {{provider}} (User)": "Provided by {{provider}} (User)",
"{{provider}} (User)": "{{provider}} (User)",
"Provided by User": "Provided by User",
Expand Down
Expand Up @@ -20,7 +20,7 @@ export const VMTemplateLabel: React.FC<VMTemplateLabelProps> = ({ template }) =>
return (
!!supportLevel && (
<Label color={isCommonTemplate(template) ? 'green' : 'blue'}>
{(t('kubevirt-plugin~{{provider}} supported'), { provider })}
{t('kubevirt-plugin~{{provider}} supported', { provider })}
</Label>
)
);
Expand Down
Expand Up @@ -39,6 +39,11 @@ export const getTemplateProvider = (
): string => {
const provider = getAnnotation(template, TEMPLATE_PROVIDER_ANNOTATION);
if (provider) {
if (isCommonTemplate(template)) {
return withProviderPrefix
? t('kubevirt-plugin~Provided by {{provider}}', { provider })
: t('kubevirt-plugin~{{provider}}', { provider });
}
return withProviderPrefix
? t('kubevirt-plugin~Provided by {{provider}} (User)', { provider })
: t('kubevirt-plugin~{{provider}} (User)', { provider });
Expand Down

0 comments on commit dee3507

Please sign in to comment.