Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions __mocks__/patternfly-react-core.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,27 @@ export const Popover: React.FC<any> = ({ headerContent, bodyContent, children })
</div>
);

export const MenuToggle = React.forwardRef<any, any>(({ children, variant, ...rest }, ref) => (
<button ref={ref} data-variant={variant} {...rest}>{children}</button>
));
export const MenuToggle = React.forwardRef<any, any>(
({ children, variant, isExpanded, ...rest }, ref) => (
<button ref={ref} data-variant={variant} data-expanded={isExpanded} {...rest}>
{children}
</button>
),
);
MenuToggle.displayName = 'MenuToggle';

export type MenuToggleElement = HTMLButtonElement;
export type MenuToggleProps = any;

export const Dropdown: React.FC<any> = ({ children, isOpen, toggle, ...props }) => (
export const Dropdown: React.FC<any> = ({
children,
isOpen,
toggle,
//patternfly-only props — keep off the dom to avoid react warnings in tests
popperProps: _popperProps,
onOpenChange: _onOpenChange,
...props
}) => (
<div data-testid="dropdown" data-open={isOpen} {...props}>
{typeof toggle === 'function' ? toggle(null) : toggle}
{isOpen && children}
Expand All @@ -30,7 +42,14 @@ export const Dropdown: React.FC<any> = ({ children, isOpen, toggle, ...props })
export const DropdownList: React.FC<any> = ({ children }) => <ul>{children}</ul>;

export const DropdownItem: React.FC<any> = ({ children, description, isDisabled, ...props }) => (
<li data-disabled={isDisabled} {...props}>{children}{description && <small>{description}</small>}</li>
<li data-disabled={isDisabled} {...props}>
{children}
{description && <small>{description}</small>}
</li>
);

export const Divider: React.FC<any> = ({ component: Component = 'hr', ...props }) => (
<Component data-testid="divider" {...props} />
);

export const Tooltip: React.FC<any> = ({ content, children }) => (
Expand Down
16 changes: 10 additions & 6 deletions locales/en/plugin__gitops-plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@
"Unable to load data": "Unable to load data",
"There was an error retrieving ImageUpdaters. Check your connection and reload the page.": "There was an error retrieving ImageUpdaters. Check your connection and reload the page.",
"ImageUpdaters": "ImageUpdaters",
"This list page is under tech preview, but not necessarily the resources it represents": "This list page is under tech preview, but not necessarily the resources it represents",
"Create ImageUpdater": "Create ImageUpdater",
"Apps": "Apps",
"Images": "Images",
"Last Checked": "Last Checked",
"Labels": "Labels",
"Has Apps": "Has Apps",
"No Apps": "No Apps",
"Not Ready": "Not Ready",
Expand Down Expand Up @@ -218,7 +218,6 @@
"There was an error retrieving App Projects. Check your connection and reload the page.": "There was an error retrieving App Projects. Check your connection and reload the page.",
"AppProjects": "AppProjects",
"Create AppProject": "Create AppProject",
"Labels": "Labels",
"Last Updated": "Last Updated",
"Has Description": "Has Description",
"No Description": "No Description",
Expand Down Expand Up @@ -343,18 +342,23 @@
"Created at": "Created at",
"Time is a wrapper around time. Time which supports correct marshaling to YAML and JSON.": "Time is a wrapper around time. Time which supports correct marshaling to YAML and JSON.",
"Owner references link this resource to its parent object. For example, Applications generated by an ApplicationSet will have that ApplicationSet as their owner. This relationship enables proper resource lifecycle management and garbage collection.": "Owner references link this resource to its parent object. For example, Applications generated by an ApplicationSet will have that ApplicationSet as their owner. This relationship enables proper resource lifecycle management and garbage collection.",
"This details page is under tech preview, but not necessarily the resource it represents": "This details page is under tech preview, but not necessarily the resource it represents",
"Pagination": "Pagination",
"Go to first page": "Go to first page",
"Go to previous page": "Go to previous page",
"Go to next page": "Go to next page",
"Go to last page": "Go to last page",
"Items per page": "Items per page",
"per page": "per page",
"of": "of",
"List view": "List view",
"Graph view": "Graph view",
"Sync": "Sync",
"Stop": "Stop",
"Refresh": "Refresh",
"Refresh (Hard)": "Refresh (Hard)",
"Rollouts in the Topology View is under tech preview": "Rollouts in the Topology View is under tech preview",
"Actions": "Actions",
"You don't have permission to perform this action": "You don't have permission to perform this action",
"annotations": "annotations",
"annotation": "annotation",
"No owner": "No owner",
"Tech preview": "Tech preview"
"No owner": "No owner"
}
1 change: 0 additions & 1 deletion locales/en/plugin__gitops-public.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"View logs": "View logs",
"Open URL": "Open URL",
"Edit": "Edit",
"Rollouts in the Topology View is under tech preview": "Rollouts in the Topology View is under tech preview",
"Rollout": "Rollout",
"Name": "Name",
"Namespace": "Namespace",
Expand Down
11 changes: 11 additions & 0 deletions locales/es/plugin__gitops-console-app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"Name is required.": "Se requiere el nombre.",
"Name can only contain letters, numbers, spaces, and hyphens.": "El nombre solo puede contener letras, números, espacios y guiones.",
"The name {{favoriteName}} already exists in your favorites. Choose a unique name to save to your favorites.": "El nombre {{favoriteName}} ya existe en sus favoritos. Elija un nombre único para guardarlo en sus favoritos.",
"Maximum number of favorites ({{maxCount}}) reached. To add another favorite, remove an existing page from your favorites.": "Se alcanzó la cantidad máxima de favoritos ({{maxCount}}). Para añadir otro favorito, elimine una página existente de sus favoritos.",
"Remove from favorites": "Eliminar de favoritos",
"Add to favorites": "Añadir a favoritos",
"Save": "Guardar",
"Cancel": "Cancelar",
"Name": "Nombre"
}
5 changes: 5 additions & 0 deletions locales/es/plugin__gitops-olm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"Show operands in:": "Mostrar operandos en:",
"All namespaces": "Todos los espacios de nombres",
"Current namespace only": "Solo espacio de nombres actual"
}
Loading
Loading