Skip to content
Snippets Groups Projects
Commit 8d9ecf7a authored by Erick Hitter's avatar Erick Hitter
Browse files

Merge branch 'fix/i18n' into 'master'

Fix translation support

See merge request !12
parents c1c3f889 330466ba
No related branches found
No related tags found
1 merge request!12Fix translation support
Pipeline #4929 passed
......@@ -9,7 +9,7 @@ module.exports = function( grunt ) {
addtextdomain: {
options: {
textdomain: 'eth_simple_shortlinks',
textdomain: 'eth-simple-shortlinks',
},
update_all_domains: {
options: {
......
......@@ -4,11 +4,11 @@
**Tags:** seo, meta tags
**Requires at least:** 4.4
**Tested up to:** 6.0
**Stable tag:** 0.6
**Stable tag:** 0.6.1
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
Convert WordPress's query-based shortlinks to pretty permalinks that are cacheable. http://example.com/?p=123 becomes http://example.com/p/123/.
Convert WordPress's query-based shortlinks to pretty permalinks that are cacheable. https://example.com/?p=123 becomes https://example.com/p/123/.
## Description ##
......@@ -44,6 +44,9 @@ If, after upgrading, redirects stop working, use the `eth_simple_shortlinks_allo
## Changelog ##
### 0.6.1 ###
* Fix translation support.
### 0.6 ###
* Introduce filters in redirection handling.
* Apply supported post-type and post-status checks before redirecting.
......@@ -59,6 +62,8 @@ If, after upgrading, redirects stop working, use the `eth_simple_shortlinks_allo
## Upgrade Notice ##
### 0.6 ###
### 0.6.1 ###
Fixes translation support.
### 0.6 ###
Applies supported post-type and post-status checks before performing redirect. If, after upgrading, redirects stop working, see the "After upgrading to 0.6, redirects stopped working" section of the FAQ.
......@@ -10,9 +10,9 @@
* Plugin URI: https://ethitter.com/plugins/
* Description: Simple non-GET shortlinks using post IDs
* Author: Erick Hitter
* Version: 0.6
* Version: 0.6.1
* Author URI: https://ethitter.com/
* Text Domain: eth_simple_shortlinks
* Text Domain: eth-simple-shortlinks
* Domain Path: /languages/
*
* This program is free software; you can redistribute it and/or modify
......
......@@ -35,14 +35,14 @@ class ETH_Simple_Shortlinks {
* Dummy magic method
*/
public function __clone() {
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ uh?', 'eth_simple_shortlinks' ), '0.1' );
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ uh?', 'eth-simple-shortlinks' ), '0.1' );
}
/**
* Dummy magic method
*/
public function __wakeup() {
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ uh?', 'eth_simple_shortlinks' ), '0.1' );
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ uh?', 'eth-simple-shortlinks' ), '0.1' );
}
/**
......@@ -130,9 +130,9 @@ class ETH_Simple_Shortlinks {
*/
public function action_plugins_loaded() {
load_plugin_textdomain(
'eth_simple_shortlinks',
'eth-simple-shortlinks',
false,
dirname( plugin_basename( __FILE__ ) ) . '/languages/'
dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/'
);
}
......@@ -190,7 +190,7 @@ class ETH_Simple_Shortlinks {
/* translators: 1: URL of permalink options page. */
__(
'Please visit the <a href="%1$s">Permalinks</a> settings page to refresh your permalinks. Doing so will add the rules this plugin requires.',
'eth_simple_shortlinks'
'eth-simple-shortlinks'
),
admin_url( 'options-permalink.php' )
);
......@@ -200,7 +200,7 @@ class ETH_Simple_Shortlinks {
/* translators: 1: URL of permalink options page. */
__(
'Please enable <a href="%1$s">pretty permalinks</a>, otherwise disable this plugin as it is not compatible with "Plain" permalinks.',
'eth_simple_shortlinks'
'eth-simple-shortlinks'
),
admin_url( 'options-permalink.php' )
);
......@@ -212,7 +212,7 @@ class ETH_Simple_Shortlinks {
/* translators: 1: Plugin name, 2: Notice text. */
__(
'<strong>%1$s</strong>: %2$s',
'eth_simple_shortlinks'
'eth-simple-shortlinks'
),
$this->name,
$message
......@@ -419,7 +419,7 @@ class ETH_Simple_Shortlinks {
return $actions;
}
$actions['shortlink'] = '<a href="' . esc_js( $this->get_shortlink( $post->ID ) ) . '">' . __( 'Shortlink', 'eth_simple_shortlinks' ) . '</a>';
$actions['shortlink'] = '<a href="' . esc_js( $this->get_shortlink( $post->ID ) ) . '">' . __( 'Shortlink', 'eth-simple-shortlinks' ) . '</a>';
return $actions;
}
......@@ -478,7 +478,7 @@ function eth_simple_shortlinks_get( $post_id ) {
wp_kses_post(
__(
'Shortlinks cannot be generated until after <code>wp_loaded</code>; this ensures that all post types are registered.',
'eth_simple_shortlinks'
'eth-simple-shortlinks'
)
),
'0.3'
......
# Copyright (C) 2021 Erick Hitter
# Copyright (C) 2022 Erick Hitter
# This file is distributed under the same license as the ETH Simple Shortlinks package.
msgid ""
msgstr ""
"Project-Id-Version: ETH Simple Shortlinks 0.6\n"
"Project-Id-Version: ETH Simple Shortlinks 0.6.1\n"
"Report-Msgid-Bugs-To: "
"https://wordpress.org/support/plugin/eth-simple-shortlinks\n"
"POT-Creation-Date: 2021-03-27 20:20:14+00:00\n"
"POT-Creation-Date: 2022-06-25 23:01:41+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2021-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2022-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"X-Generator: grunt-wp-i18n 0.5.4\n"
"X-Poedit-KeywordsList: "
"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
"Language: en\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-Country: United States\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: "
"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
"X-Poedit-Basepath: ../\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-Bookmarks: \n"
"X-Textdomain-Support: yes\n"
"X-Generator: grunt-wp-i18n 1.0.3\n"
#: inc/class-eth-simple-shortlinks.php:38
#: inc/class-eth-simple-shortlinks.php:45
......
......@@ -39,7 +39,7 @@
<rule ref="WordPress.WP.I18n">
<properties>
<!-- Value: replace the text domain used. -->
<property name="text_domain" type="array" value="eth_simple_shortlinks"/>
<property name="text_domain" type="array" value="eth-simple-shortlinks"/>
</properties>
</rule>
<rule ref="WordPress.WhiteSpace.ControlStructureSpacing">
......
......@@ -4,11 +4,11 @@ Donate link: https://ethitter.com/donate/
Tags: seo, meta tags
Requires at least: 4.4
Tested up to: 6.0
Stable tag: 0.6
Stable tag: 0.6.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Convert WordPress's query-based shortlinks to pretty permalinks that are cacheable. http://example.com/?p=123 becomes http://example.com/p/123/.
Convert WordPress's query-based shortlinks to pretty permalinks that are cacheable. https://example.com/?p=123 becomes https://example.com/p/123/.
== Description ==
......@@ -44,6 +44,9 @@ If, after upgrading, redirects stop working, use the `eth_simple_shortlinks_allo
== Changelog ==
= 0.6.1 =
* Fix translation support.
= 0.6 =
* Introduce filters in redirection handling.
* Apply supported post-type and post-status checks before redirecting.
......@@ -59,6 +62,8 @@ If, after upgrading, redirects stop working, use the `eth_simple_shortlinks_allo
== Upgrade Notice ==
= 0.6 =
= 0.6.1 =
Fixes translation support.
= 0.6 =
Applies supported post-type and post-status checks before performing redirect. If, after upgrading, redirects stop working, see the "After upgrading to 0.6, redirects stopped working" section of the FAQ.
......@@ -26,8 +26,8 @@ class PluginTest extends WP_UnitTestCase {
/**
* Create a post to test with.
*/
public function setUp() {
parent::setUp();
public function set_up() {
parent::set_up();
static::$post_id_published = $this->factory->post->create();
static::$post_id_draft = $this->factory->post->create(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment