Skip to content

Commit

Permalink
fix: add labels to edit buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
barmac committed Apr 24, 2024
1 parent b3fa347 commit 72e4691
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,20 @@ const KIND_MAP = {
'PMML': 'P'
};

function Kind({ kind, openEditor }) {
function Kind({ kind, openEditor }, context) {
const translate = context.injector.get('translate');

return (
<div className="function-definition-kind">
{ KIND_MAP[kind] }
<EditButton onClick={ openEditor } />
<EditButton label={ translate('Edit function kind') } onClick={ openEditor } />
</div>
);
}

function FormalParameters({ openEditor, parameters }) {
function FormalParameters({ openEditor, parameters }, context) {
const translate = context.injector.get('translate');

return (
<div className="function-definition-parameters">
<div>
Expand All @@ -82,7 +86,7 @@ function FormalParameters({ openEditor, parameters }) {
}
)
</div>
<EditButton onClick={ openEditor } />
<EditButton label={ translate('Edit formal parameters') } onClick={ openEditor } />
</div>
);
}
Expand Down

0 comments on commit 72e4691

Please sign in to comment.