Skip to content

Commit

Permalink
feat: i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
reinvanoyen committed Feb 24, 2024
1 parent 6b7fec0 commit 169ba1b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions resources/js/actions/select-one.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function SelectOne(props) {
// Redirect
redirect();
// Notify the user
ui.notify(i18n.get('snippets.singular_deleted', {singular: props.singular}));
ui.notify('Success');
}

const redirect = () => {
Expand Down Expand Up @@ -75,13 +75,13 @@ function SelectOne(props) {
<div className="select-one__confirm">
<Button
onClick={execute}
text={i18n.get('snippets.delete_singular_confirm', {singular: props.singular})}
text={i18n.get('snippets.select_singular_confirm', {singular: props.singular})}
/>
</div>
<div className="select-one__cancel">
<Button
onClick={redirect}
text={i18n.get('snippets.delete_singular_cancel')}
text={i18n.get('snippets.select_singular_cancel')}
style={'secondary'}
/>
</div>
Expand Down
3 changes: 3 additions & 0 deletions resources/lang/en/snippets.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@
'delete_singular_confirm' => 'Delete :singular',
'delete_singular_cancel' => 'Cancel',

'select_singular_confirm' => 'Select :singular',
'select_singular_cancel' => 'Cancel',

'singular_created' => ':singular was created',
'singular_updated' => ':singular was updated',
'singular_deleted' => ':singular was deleted',
Expand Down

0 comments on commit 169ba1b

Please sign in to comment.