Skip to content

Commit c0eebc0

Browse files
authored
Merge pull request #212 from mitsuyapega/localize-casesummary-actionablebutton
Fix Localization issue on CaseSummary
2 parents cd82723 + 1ea2002 commit c0eebc0

File tree

1 file changed

+10
-2
lines changed
  • src/components/Pega_Extensions_ActionableButton

1 file changed

+10
-2
lines changed

src/components/Pega_Extensions_ActionableButton/index.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,15 @@ export const PegaExtensionsActionableButton = (props: ActionableButtonProps) =>
1414
const availableActions =
1515
getPConnect().getValue((window as any).PCore.getConstants().CASE_INFO.AVAILABLEACTIONS) || [];
1616
const targetAction = availableActions.find((action: { ID: string }) => action.ID === localAction);
17-
const actionName = targetAction?.name || label;
17+
const localizedLabel =
18+
getPConnect().getContainerName() === 'primary'
19+
? getPConnect().getLocalizedValue(
20+
label,
21+
undefined,
22+
`${getPConnect().getCaseInfo().getClassName().toUpperCase()}!VIEW!PYCASESUMMARY`,
23+
)
24+
: label;
25+
const actionName = targetAction?.name || localizedLabel;
1826
const LaunchLocalAction = async () => {
1927
const actionsAPI = getPConnect().getActionsApi();
2028
if (getPConnect().getContainerName() === 'workarea') {
@@ -29,7 +37,7 @@ export const PegaExtensionsActionableButton = (props: ActionableButtonProps) =>
2937
};
3038
return (
3139
<Flex container={{ direction: 'row' }}>
32-
<Button onClick={LaunchLocalAction}>{label}</Button>
40+
<Button onClick={LaunchLocalAction}>{localizedLabel}</Button>
3341
</Flex>
3442
);
3543
}

0 commit comments

Comments
 (0)