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 4388293 commit c39242f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Expand Up @@ -275,6 +275,7 @@
"Pending changes": "Pending changes",
"No virtual machines found": "No virtual machines found",
"See the <2>templates tab</2> to quickly create a virtual machine from the available templates.": "See the <2>templates tab</2> to quickly create a virtual machine from the available templates.",
"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 c39242f

Please sign in to comment.