Skip to content

Commit 58d8885

Browse files
committed
Add this point we shoud not use translation functions.
1 parent 5686138 commit 58d8885

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/Extension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class Extension extends AbstractPluginIntegration {
6060
public function __construct() {
6161
parent::__construct(
6262
[
63-
'name' => __( 'Gravity Forms', 'pronamic_ideal' ),
63+
'name' => 'Gravity Forms',
6464
'version' => '2.3.0',
6565
]
6666
);

src/PaymentAddOn.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,27 +101,37 @@ public function __construct() {
101101
* @var string Title of the plugin to be used on the settings page, form settings and plugins page. Example: 'Gravity Forms MailChimp Add-On'
102102
* @link https://github.com/wp-premium/gravityforms/blob/1.9.10.15/includes/addon/class-gf-addon.php#L40-L43
103103
*/
104-
$this->_title = __( 'Pronamic Pay Add-On', 'pronamic_ideal' );
104+
$this->_title = 'Pronamic Pay Add-On';
105105

106106
/*
107107
* Short title.
108108
*
109109
* @var string Short version of the plugin title to be used on menus and other places where a less verbose string is useful. Example: 'MailChimp'
110110
* @link https://github.com/wp-premium/gravityforms/blob/1.9.10.15/includes/addon/class-gf-addon.php#L44-L47
111111
*/
112-
$this->_short_title = __( 'Pay', 'pronamic_ideal' );
112+
$this->_short_title = 'Pay';
113113

114114
/*
115115
* Actions.
116116
*/
117117
add_action( 'admin_init', [ $this, 'pronamic_maybe_save_feed' ], 20 );
118+
add_action( 'init', $this->translate( ... ), 20 );
118119

119120
/*
120121
* Filters.
121122
*/
122123
add_filter( 'gform_admin_pre_render', [ $this, 'admin_pre_render' ], 10, 1 );
123124
}
124125

126+
/**
127+
* Translate.
128+
*/
129+
private function translate() {
130+
$this->_title = \__( 'Pronamic Pay Add-On', 'pronamic-ideal' );
131+
132+
$this->_short_title = \__( 'Pay', 'pronamic-ideal' );
133+
}
134+
125135
/**
126136
* Maybe save feed.
127137
*/

0 commit comments

Comments
 (0)