Skip to content

Commit 24bd90f

Browse files
authored
Merge pull request magento#1273 from magento/1227_Create_an_entity_-_The_translation_function_is_not_call_on_the_buttons_label
1227: fix Create an entity - The translation function is not call on …
2 parents c3d701f + 2b08768 commit 24bd90f

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0).
99
### Fixed
1010

1111
- Throwable: Stub index points to a file without PSI [#1232](https://github.com/magento/magento2-phpstorm-plugin/pull/1232)
12-
- Create an entity - delete button is displayed in a new entity form [#1268](https://github.com/magento/magento2-phpstorm-plugin/pull/1268)
12+
- Create an entity - The delete button is displayed in a new entity form [#1268](https://github.com/magento/magento2-phpstorm-plugin/pull/1268)
13+
- Create an entity - The translation function is not call on the buttons label [#1273](https://github.com/magento/magento2-phpstorm-plugin/pull/1273)
1314
- Covered possible NullPointerException in InjectAViewModelDialog.java [#1213](https://github.com/magento/magento2-phpstorm-plugin/pull/1213)
1415
- AWT events are not allowed inside write action [#1271](https://github.com/magento/magento2-phpstorm-plugin/pull/1271)
1516
- MapReduceIndexMappingException: java.lang.NumberFormatException: For input string: "" [#1235](https://github.com/magento/magento2-phpstorm-plugin/pull/1235)

resources/fileTemplates/internal/Magento Form Button Block Class.php.ft

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class ${NAME} extends ${GENERIC_BUTTON} implements ${DATA_PROVIDER_TYPE}
2727

2828
#end
2929
return $this->wrapButtonSettings(
30-
'${LABEL}',
30+
__('${LABEL}'),
3131
'${CLASS}',
3232
${ON_CLICK},
3333
${DATA_ATTRS},

testData/actions/generation/generator/FormButtonBlockGenerator/generateBackButtonBlock/MyBackButton.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class MyBackButton extends GenericButton implements ButtonProviderInterface
1717
public function getButtonData(): array
1818
{
1919
return $this->wrapButtonSettings(
20-
'Back To Grid',
20+
__('Back To Grid'),
2121
'back',
2222
sprintf("location.href = '%s';", $this->getUrl('*/*/')),
2323
[],

testData/actions/generation/generator/FormButtonBlockGenerator/generateCustomButtonBlock/MyCustom.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class MyCustom extends GenericButton implements ButtonProviderInterface
1717
public function getButtonData(): array
1818
{
1919
return $this->wrapButtonSettings(
20-
'Custom Button',
20+
__('Custom Button'),
2121
'custom',
2222
'',
2323
[],

testData/actions/generation/generator/FormButtonBlockGenerator/generateDeleteButtonBlock/DeleteBlock.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function getButtonData(): array
2222
}
2323

2424
return $this->wrapButtonSettings(
25-
'Delete',
25+
__('Delete'),
2626
'delete',
2727
sprintf("deleteConfirm('%s', '%s')",
2828
__('Are you sure you want to delete this book?'),

testData/actions/generation/generator/FormButtonBlockGenerator/generateSaveButtonBlock/SaveBlock.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class SaveBlock extends GenericButton implements ButtonProviderInterface
1717
public function getButtonData(): array
1818
{
1919
return $this->wrapButtonSettings(
20-
'Save',
20+
__('Save'),
2121
'save primary',
2222
'',
2323
[

0 commit comments

Comments
 (0)