Skip to content

Commit ec11fa4

Browse files
Merge pull request #1 from javiercasares/translations
Translations
2 parents 76ae7d0 + d22eff3 commit ec11fa4

File tree

7 files changed

+123
-5
lines changed

7 files changed

+123
-5
lines changed

assets/icon-128x128.png

4.56 KB
Loading

assets/icon-256x256.png

9.13 KB
Loading

assets/icon.png

153 KB
Loading

assets/icon.svg

Lines changed: 24 additions & 0 deletions
Loading

languages/wp-mail-replyto.pot

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#, fuzzy
2+
msgid ""
3+
msgstr ""
4+
"Project-Id-Version: Reply-To for WP_Mail\n"
5+
"POT-Creation-Date: 2024-10-31 08:58+0100\n"
6+
"PO-Revision-Date: 2024-10-31 08:58+0100\n"
7+
"Last-Translator: \n"
8+
"Language-Team: \n"
9+
"MIME-Version: 1.0\n"
10+
"Content-Type: text/plain; charset=UTF-8\n"
11+
"Content-Transfer-Encoding: 8bit\n"
12+
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
13+
"X-Generator: Poedit 3.5\n"
14+
"X-Poedit-Basepath: ..\n"
15+
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
16+
"X-Poedit-WPHeader: replyto.php\n"
17+
"X-Poedit-SourceCharset: UTF-8\n"
18+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
19+
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
20+
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
21+
"X-Poedit-SearchPath-0: .\n"
22+
"X-Poedit-SearchPathExcluded-0: *.min.js\n"
23+
24+
#. translators: %s: email address
25+
#: replyto.php:36
26+
#, php-format
27+
msgid "Reply-To: <%s>"
28+
msgstr ""
29+
30+
#: replyto.php:90
31+
msgid "WP Mail Reply-To Settings"
32+
msgstr ""
33+
34+
#: replyto.php:91
35+
msgid "Reply-To"
36+
msgstr ""
37+
38+
#: replyto.php:115
39+
msgid "Reply-To Configuration"
40+
msgstr ""
41+
42+
#: replyto.php:122
43+
msgid "Reply-To Email Address"
44+
msgstr ""
45+
46+
#: replyto.php:134
47+
msgid ""
48+
"Set the email address to be used in the \"Reply-To\" header of outgoing "
49+
"emails."
50+
msgstr ""
51+
52+
#: replyto.php:143
53+
msgid "Enter the email address to be used as \"Reply-To\"."
54+
msgstr ""
55+
56+
#: replyto.php:163
57+
msgid "Save Settings"
58+
msgstr ""
59+
60+
#. Plugin Name of the plugin/theme
61+
msgid "Reply-To for WP_Mail"
62+
msgstr ""
63+
64+
#. Description of the plugin/theme
65+
msgid ""
66+
"Configure your \"Reply-To:\" for WP_Mail with validation and admin settings."
67+
msgstr ""
68+
69+
#. Author of the plugin/theme
70+
msgid "Javier Casares"
71+
msgstr ""
72+
73+
#. Author URI of the plugin/theme
74+
msgid "https://www.javiercasares.com/"
75+
msgstr ""

readme.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Contributors: javiercasares
33
Tags: email, reply-to
44
Requires at least: 4.1
55
Tested up to: 6.7
6-
Stable tag: 1.0.0
6+
Stable tag: 1.0.1
77
Requires PHP: 5.6
8-
Version: 1.0.0
8+
Version: 1.0.1
99
License: GPL-2.0-or-later
1010
License URI: https://spdx.org/licenses/GPL-2.0-or-later.html
1111

@@ -28,6 +28,12 @@ Extract the contents of the ZIP and upload the contents to the `/wp-content/plug
2828

2929
== Changelog ==
3030

31+
= [1.0.1] - 2024-10-31 =
32+
33+
**Added**
34+
35+
* Translation ready.
36+
3137
= [1.0.0] - 2024-10-22 =
3238

3339
**Added**

replyto.php

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
* Description: Configure your "Reply-To:" for WP_Mail with validation and admin settings.
55
* Requires at least: 4.1
66
* Requires PHP: 5.6
7-
* Version: 1.0.0
7+
* Version: 1.0.1
88
* Author: Javier Casares
99
* Author URI: https://www.javiercasares.com/
1010
* License: GPL-2.0-or-later
1111
* License URI: https://spdx.org/licenses/GPL-2.0-or-later.html
1212
* Text Domain: wp-mail-replyto
13+
* Domain Path: /languages
1314
*
1415
* @package wp-mail-replyto
1516
*
@@ -30,7 +31,11 @@ function wp_mail_replyto( $args ) {
3031

3132
// Define the new "Reply-To" if configured.
3233
if ( ! empty( $reply_to_email ) ) {
33-
$new_reply_to = 'Reply-To: <' . sanitize_email( $reply_to_email ) . '>';
34+
$new_reply_to = sprintf(
35+
/* translators: %s: email address */
36+
__( 'Reply-To: <%s>', 'wp-mail-replyto' ),
37+
sanitize_email( $reply_to_email )
38+
);
3439
}
3540

3641
// Initialize variables for "From" and existing "Reply-To".
@@ -152,7 +157,7 @@ function wp_mail_replyto_render_settings_page() {
152157
<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>
153158
<form action="options.php" method="post">
154159
<?php
155-
wp_nonce_field();
160+
wp_nonce_field( 'update-options' );
156161
settings_fields( 'wp_mail_replyto_settings_group' );
157162
do_settings_sections( 'wp-mail-replyto' );
158163
submit_button( esc_html__( 'Save Settings', 'wp-mail-replyto' ) );
@@ -161,3 +166,11 @@ function wp_mail_replyto_render_settings_page() {
161166
</div>
162167
<?php
163168
}
169+
170+
/**
171+
* Load plugin textdomain for translations.
172+
*/
173+
function wp_mail_replyto_load_textdomain() {
174+
load_plugin_textdomain( 'wp-mail-replyto', false, basename( __DIR__ ) . '/languages' );
175+
}
176+
add_action( 'plugins_loaded', 'wp_mail_replyto_load_textdomain' );

0 commit comments

Comments
 (0)