Plugin Directory

Changeset 3156841


Ignore:
Timestamp:
09/24/2024 10:47:46 AM (18 months ago)
Author:
Bueltge
Message:

Release new version, tag

Location:
de_de/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • de_de/trunk/de_DE.php

    r3100950 r3156841  
    66 * It pre-selects also the German spell checker at TinyMCE and sets the Feed language key.
    77 *
    8  * @version  1.0.1
    9  * @date     2024-06-11
     8 * @version  1.0.2
     9 * @date     2024-09-24
    1010 * suggestion by Heiko Rabe (www.code-styling.de), Frank Bueltge (bueltge.de), Thomas Scholz (toscho.de)
    1111 *
     
    1616 *     set the RSS language key.
    1717 * Author:      Frank Bültge
    18  * Version:     1.0.1
     18 * Version:     1.0.2
    1919 * License:     GPLv2+
    2020 *
     
    211211            return $this->umlautCharsUtf8;
    212212        }
    213         $this->umlautCharsUtf8 = (array)apply_filters(
    214             'de_DE.utf8',
    215             [
     213
     214        // PHP 8.2: utf8_decode functions deprecated.
     215        // @see: https://php.watch/versions/8.2/utf8_encode-utf8_decode-deprecated
     216        if (version_compare(phpversion(), '8.2.0') >= 0) {
     217            $defaults = [
     218                mb_convert_encoding('Ä', 'UTF-8', 'ISO-8859-1'),
     219                mb_convert_encoding('ä', 'UTF-8', 'ISO-8859-1'),
     220                mb_convert_encoding('Ö', 'UTF-8', 'ISO-8859-1'),
     221                mb_convert_encoding('ö', 'UTF-8', 'ISO-8859-1'),
     222                mb_convert_encoding('Ü', 'UTF-8', 'ISO-8859-1'),
     223                mb_convert_encoding('ü', 'UTF-8', 'ISO-8859-1'),
     224                mb_convert_encoding('ß', 'UTF-8', 'ISO-8859-1'),
     225                mb_convert_encoding('€', 'UTF-8', 'ISO-8859-1'),
     226            ];
     227        } else {
     228            $defaults = [
    216229                utf8_encode('Ä'),
    217230                utf8_encode('ä'),
     
    222235                utf8_encode('ß'),
    223236                utf8_encode('€'),
    224             ]
     237            ];
     238        }
     239
     240        $this->umlautCharsUtf8 = (array)apply_filters(
     241            'de_DE.utf8',
     242            $defaults
    225243        );
    226244
     
    331349
    332350            // PHP 8.2: utf8_decode functions deprecated.
     351            // Will be replaced by: mb_convert_encoding( $utf_string, 'ISO-8859-1', 'UTF-8');
    333352            // @see: https://php.watch/versions/8.2/utf8_encode-utf8_decode-deprecated
    334353            if (version_compare(phpversion(), '8.2.0') >= 0) {
    335                 $title = mb_convert_encoding(strtr($title, $invalidLatinChars), 'UTF-8', 'ISO-8859-1');
     354                $title = mb_convert_encoding(strtr($title, $invalidLatinChars), 'ISO-8859-1', 'UTF-8'); // Returns ISO-8859-1
    336355            } else {
    337                 $title = utf8_decode(strtr($title, $invalidLatinChars));
     356                $title = utf8_decode(strtr($title, $invalidLatinChars)); // Returns ISO-8859-1
    338357            }
    339358        }
     
    449468                chr(226).chr(130).chr(172) => 'EUR',
    450469            ];
    451             $filename = utf8_decode(strtr($filename, $invalidLatinChars));
     470
     471            // PHP 8.2: utf8_decode functions deprecated.
     472            // @see: https://php.watch/versions/8.2/utf8_encode-utf8_decode-deprecated
     473            if (version_compare(phpversion(), '8.2.0') >= 0) {
     474                $filename = mb_convert_encoding(strtr($filename, $invalidLatinChars), 'ISO-8859-1', 'UTF-8' );
     475            } else {
     476                $filename = utf8_decode(strtr($filename, $invalidLatinChars));
     477            }
    452478        }
    453479
  • de_de/trunk/readme.txt

    r3100958 r3156841  
    44Tags: german, ascii, permalink, umlaut, upload
    55Requires at least: 3.5
    6 Tested up to: 6.5
     6Tested up to: 6.6
    77Requires PHP: 5.6
    8 Stable tag: 1.0.1
     8Stable tag: 1.0.2
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5454 
    5555== Changelog ==
     56= 1.0.2 (2024-09-24) =
     57* Updated encoding / decoding via mb_convert_encoding, [#20](https://github.com/bueltge/de-DE/pull/20)
     58
    5659= 1.0.1 (2024-06-11) =
    5760* Fix deprecated topic for PHP >=8.2
Note: See TracChangeset for help on using the changeset viewer.