Skip to content

Commit dda2f9a

Browse files
authored
Merge pull request #13 from threadi/feature/removedLocalLanguageEmbedding
Feature/removed local language embedding
2 parents 9d5d2e7 + daf94a3 commit dda2f9a

10 files changed

+92
-35
lines changed

auto-category-for-posts.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,6 @@
2525
// set version of this plugin.
2626
const AUTOCATEGORY_VERSION = '@@VersionNumber@@';
2727

28-
/**
29-
* Initialize the plugin.
30-
*
31-
* @return void
32-
* @noinspection PhpUnused
33-
*/
34-
function auto_category_init(): void {
35-
load_plugin_textdomain( 'auto-category-for-posts', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
36-
}
37-
add_action( 'init', 'auto_category_init' );
38-
3928
/**
4029
* Check for necessary steps after plugin-updates.
4130
*

build/build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<delete file="${build.dir}/${plugin.slug}_${plugin.version}.zip"/>
4040
<zip destfile="${build.dir}/${plugin.slug}_${plugin.version}.zip">
4141
<zipfileset dir="${src.dir}/admin" prefix="${plugin.slug}/admin" />
42-
<zipfileset dir="${src.dir}/languages" prefix="${plugin.slug}/languages" />
42+
<zipfileset dir="${src.dir}/languages" includes="*.json" prefix="${plugin.slug}/languages" />
4343
<zipfileset dir="${src.dir}" includes="uninstall.php,readme.txt" prefix="${plugin.slug}" />
4444
<zipfileset dir="${src.dir}" includes="${plugin.slug}-release.php" fullpath="${plugin.slug}/${plugin.slug}.php" />
4545
</zip>

composer.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
{
22
"name": "threadi/auto-category-for-posts",
33
"require-dev": {
4-
"wp-coding-standards/wpcs": "^2.3"
4+
"wp-coding-standards/wpcs": "^3.0.0"
55
},
66
"scripts": {
77
"post-install-cmd": [
8-
"\"vendor/bin/phpcs\" --config-set installed_paths vendor/wp-coding-standards/wpcs"
8+
"\"vendor/bin/phpcs\" --config-set installed_paths vendor/wp-coding-standards/wpcs,vendor/phpcsstandards/phpcsutils,vendor/phpcsstandards/phpcsextra"
99
],
1010
"post-update-cmd": [
11-
"\"vendor/bin/phpcs\" --config-set installed_paths vendor/wp-coding-standards/wpcs"
11+
"\"vendor/bin/phpcs\" --config-set installed_paths vendor/wp-coding-standards/wpcs,vendor/phpcsstandards/phpcsutils,vendor/phpcsstandards/phpcsextra"
1212
]
13+
},
14+
"config": {
15+
"allow-plugins": {
16+
"dealerdirect/phpcodesniffer-composer-installer": true
17+
}
1318
}
1419
}
0 Bytes
Binary file not shown.

languages/auto-category-for-posts-de_DE.po

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ msgstr ""
55
"Project-Id-Version: Auto Category for Posts 1.0.2\n"
66
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/auto-category-for-"
77
"posts\n"
8-
"POT-Creation-Date: 2022-02-09T15:01:42+01:00\n"
9-
"PO-Revision-Date: 2022-02-09 15:03+0100\n"
8+
"POT-Creation-Date: 2023-10-21T16:20:48+02:00\n"
9+
"PO-Revision-Date: 2023-10-21 16:21+0200\n"
1010
"Last-Translator: Thomas Zwirner <[email protected]>\n"
1111
"Language-Team: \n"
1212
"Language: de\n"
@@ -37,22 +37,22 @@ msgstr "Thomas Zwirner"
3737
msgid "https://www.thomaszwirner.de"
3838
msgstr "https://www.thomaszwirner.de"
3939

40-
#: auto-category-for-posts.php:97 admin/js.js:24
40+
#: auto-category-for-posts.php:92 admin/js.js:24
4141
msgid "Set as default"
4242
msgstr "Setze als Standard-Kategorie"
4343

44-
#: auto-category-for-posts.php:100 admin/js.js:26
44+
#: auto-category-for-posts.php:95 admin/js.js:26
4545
msgid "Default category"
4646
msgstr "Standard-Kategorie"
4747

48-
#: auto-category-for-posts.php:153
48+
#: auto-category-for-posts.php:151
4949
msgid "Error on saving new settings for default category."
5050
msgstr "Fehler beim Speichern der neuen Einstellungen zur Standard-Kategorie."
5151

52-
#: auto-category-for-posts.php:184
52+
#: auto-category-for-posts.php:183
5353
msgid "Given category does not exists."
5454
msgstr "Die übergebene Kategorie existiert nicht."
5555

56-
#: auto-category-for-posts.php:188
56+
#: auto-category-for-posts.php:186
5757
msgid "No new category-id given."
5858
msgstr "Keine Kategorie übergeben."
1.32 KB
Binary file not shown.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Copyright (C) 2022 Thomas Zwirner
2+
# This file is distributed under the GPL-2.0-or-later.
3+
msgid ""
4+
msgstr ""
5+
"Project-Id-Version: Auto Category for Posts 1.0.2\n"
6+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/auto-category-for-"
7+
"posts\n"
8+
"POT-Creation-Date: 2023-10-21T16:20:48+02:00\n"
9+
"PO-Revision-Date: 2023-10-21 16:21+0200\n"
10+
"Last-Translator: Thomas Zwirner <[email protected]>\n"
11+
"Language-Team: \n"
12+
"Language: de\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: 8bit\n"
16+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
17+
"X-Generator: Poedit 3.0.1\n"
18+
"X-Domain: auto-category-for-posts\n"
19+
20+
#. Plugin Name of the plugin
21+
msgid "Auto Category for Posts"
22+
msgstr "Automatische Kategorie für Beiträge"
23+
24+
#. Description of the plugin
25+
msgid ""
26+
"Automatically add a default-category to each new post before it is first "
27+
"saved."
28+
msgstr ""
29+
"Setzt die Standard-Kategorie an neuen Beiträgen bereits bevor diese erstmals "
30+
"gespeichert werden."
31+
32+
#. Author of the plugin
33+
msgid "Thomas Zwirner"
34+
msgstr "Thomas Zwirner"
35+
36+
#. Author URI of the plugin
37+
msgid "https://www.thomaszwirner.de"
38+
msgstr "https://www.thomaszwirner.de"
39+
40+
#: auto-category-for-posts.php:92 admin/js.js:24
41+
msgid "Set as default"
42+
msgstr "Setze als Standard-Kategorie"
43+
44+
#: auto-category-for-posts.php:95 admin/js.js:26
45+
msgid "Default category"
46+
msgstr "Standard-Kategorie"
47+
48+
#: auto-category-for-posts.php:151
49+
msgid "Error on saving new settings for default category."
50+
msgstr "Fehler beim Speichern der neuen Einstellungen zur Standard-Kategorie."
51+
52+
#: auto-category-for-posts.php:183
53+
msgid "Given category does not exists."
54+
msgstr "Die übergebene Kategorie existiert nicht."
55+
56+
#: auto-category-for-posts.php:186
57+
msgid "No new category-id given."
58+
msgstr "Keine Kategorie übergeben."

languages/auto-category-for-posts.pot

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# Copyright (C) 2022 Thomas Zwirner
1+
# Copyright (C) 2023 Thomas Zwirner
22
# This file is distributed under the GPL-2.0-or-later.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: Auto Category for Posts 1.0.2\n"
5+
"Project-Id-Version: Auto Category for Posts @@VersionNumber@@\n"
66
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/auto-category-for-posts\n"
77
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
88
"Language-Team: LANGUAGE <[email protected]>\n"
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=UTF-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"
12-
"POT-Creation-Date: 2022-02-09T15:01:42+01:00\n"
12+
"POT-Creation-Date: 2023-10-21T16:20:48+02:00\n"
1313
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14-
"X-Generator: WP-CLI 2.6.0\n"
14+
"X-Generator: WP-CLI 2.8.1\n"
1515
"X-Domain: auto-category-for-posts\n"
1616

1717
#. Plugin Name of the plugin
@@ -30,24 +30,24 @@ msgstr ""
3030
msgid "https://www.thomaszwirner.de"
3131
msgstr ""
3232

33-
#: auto-category-for-posts.php:97
33+
#: auto-category-for-posts.php:92
3434
#: admin/js.js:24
3535
msgid "Set as default"
3636
msgstr ""
3737

38-
#: auto-category-for-posts.php:100
38+
#: auto-category-for-posts.php:95
3939
#: admin/js.js:26
4040
msgid "Default category"
4141
msgstr ""
4242

43-
#: auto-category-for-posts.php:153
43+
#: auto-category-for-posts.php:151
4444
msgid "Error on saving new settings for default category."
4545
msgstr ""
4646

47-
#: auto-category-for-posts.php:184
47+
#: auto-category-for-posts.php:183
4848
msgid "Given category does not exists."
4949
msgstr ""
5050

51-
#: auto-category-for-posts.php:188
51+
#: auto-category-for-posts.php:186
5252
msgid "No new category-id given."
5353
msgstr ""

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ I recommend to use [PoEdit](https://poedit.net/) to translate texts for this plu
2020

2121
Run in main directory:
2222

23-
`wp i18n make-pot . languages/auto-category-for-posts.pot`
23+
`wp i18n make-pot . languages/auto-category-for-posts.pot --exclude=svn`
2424

2525
### update translation-file
2626

readme.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
Contributors: threadi
33
Tags: category, auto category, posts
44
Requires at least: 5.8
5-
Tested up to: 6.3
5+
Tested up to: 6.4
66
Requires PHP: 7.4
77
License: GPL-2.0-or-later
88
License URI: https://www.gnu.org/licenses/gpl-2.0.html
9-
Stable tag: 1.0.6
9+
Stable tag: 1.0.7
1010

1111
== Description ==
1212

@@ -41,4 +41,9 @@ This plugin adds the possibility to set a default category for posts within the
4141

4242
= 1.0.6 =
4343
* Updated compatibility-flag for WordPress 6.3
44-
* Compatible with WordPress Coding Standards
44+
* Compatible with WordPress Coding Standards
45+
46+
= 1.0.7 =
47+
* Updated compatibility-flag for WordPress 6.4
48+
* Compatible with WordPress Coding Standards 3.0
49+
* Removed language-files from plugin (except the json-files for Block Editor)

0 commit comments

Comments
 (0)