Skip to content

Commit 86c93a5

Browse files
author
gitlost
committed
Version 1.0.4.
1 parent 4bc596c commit 86c93a5

File tree

8 files changed

+75
-51
lines changed

8 files changed

+75
-51
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
**Contributors:** [gitlost](https://profiles.wordpress.org/gitlost), [zodiac1978](https://profiles.wordpress.org/zodiac1978)
44
**Tags:** Unicode, Normalization, Form C, Unicode Normalization Form C, Normalize, Normalizer, UTF-8, NFC
55
**Requires at least:** 3.9.13
6-
**Tested up to:** 4.6
7-
**Stable tag:** 1.0.3
6+
**Tested up to:** 4.6.1
7+
**Stable tag:** 1.0.4
88
**License:** GPLv2 or later
99
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
1010

@@ -40,7 +40,7 @@ data, and is fallible.
4040

4141
A google-cheating schoolboy French translation is supplied.
4242

43-
The plugin should run on PHP 5.2.17 to 7.0.10, and on WP 3.9.13 to 4.6.
43+
The plugin should run on PHP 5.2.17 to 7.0.10, and on WP 3.9.13 to 4.6.1.
4444

4545
The project is on [github](https://github.com/gitlost/unfc-normalize).
4646

@@ -74,6 +74,10 @@ global PHP variable `unfc_normalize`, but you should ensure that the `Normalizer
7474

7575
## Changelog ##
7676

77+
### 1.0.4 ###
78+
* Add _wp_old_slug on normalizing slugs.
79+
* Escape title in screen reader label in db check.
80+
7781
### 1.0.3 ###
7882
* For PHP 5 performance do preliminary preg_match on isNormalized.
7983
* Improve comments in Normalizer.php, tabs -> 4 spaces, UNFC_REGEX_IS_INVALID_UTF8_XXX invert & rename.
@@ -103,5 +107,8 @@ global PHP variable `unfc_normalize`, but you should ensure that the `Normalizer
103107

104108
## Upgrade Notice ##
105109

110+
### 1.0.4 ###
111+
Now adds _wp_old_slug on normalizing slugs so old links will work.
112+
106113
### 1.0.3 ###
107114
Improved PHP 5 performance on isNormalized() check.

includes/class-unfc-db_check-list-table.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,10 @@ protected function get_sortable_columns() {
471471
protected function column_cb( $item ) {
472472
$value = $item['id'] . ':' . $item['type'] . ':' . $item['idx'];
473473
?>
474-
<label class="screen-reader-text" for="cb-select-<?php echo $item['id']; ?>"><?php printf( __( 'Select %s', 'unfc-normalize' ), $item['title'] ); ?></label>
474+
<label class="screen-reader-text" for="cb-select-<?php echo $item['id']; ?>">
475+
<?php /* translators: %s: item title */ ?>
476+
<?php printf( __( 'Select %s', 'unfc-normalize' ), htmlspecialchars( $item['title'], ENT_NOQUOTES, $this->blog_charset ) ); ?>
477+
</label>
475478
<input id="cb-select-<?php echo $item['id']; ?>" type="checkbox" name="item[]" value="<?php echo esc_attr( $value ); ?>" />
476479
<?php
477480
}

languages/unfc-normalize-fr_FR.po

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# This file is distributed under the GPLv2.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: UNFC Nörmalize 1.0.3\n"
5+
"Project-Id-Version: UNFC Nörmalize 1.0.4\n"
66
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/unfc-normalize\n"
7-
"POT-Creation-Date: 2016-09-01 20:44+0100\n"
8-
"PO-Revision-Date: 2016-09-01 20:45+0100\n"
7+
"POT-Creation-Date: 2016-09-10 06:38+0100\n"
8+
"PO-Revision-Date: 2016-09-10 06:39+0100\n"
99
"Last-Translator: gitlost <gitlost@gitlostbonger.com>\n"
1010
"Language-Team: \n"
1111
"Language: fr_FR\n"
@@ -109,17 +109,18 @@ msgstr "Si normalisé"
109109
msgid "Normalized Decoded"
110110
msgstr "Normalisé décodé"
111111

112-
#: includes/class-unfc-db_check-list-table.php:474
112+
#. translators: %s: item title
113+
#: includes/class-unfc-db_check-list-table.php:476
113114
msgid "Select %s"
114115
msgstr "Selectionner %s"
115116

116-
#: includes/class-unfc-db_check-list-table.php:510
117-
#: includes/class-unfc-db_check-list-table.php:527
117+
#: includes/class-unfc-db_check-list-table.php:513
118+
#: includes/class-unfc-db_check-list-table.php:530
118119
msgid "Not normalizable!"
119120
msgstr "Non-normalisable&nbsp;!"
120121

121-
#: includes/class-unfc-db_check-list-table.php:515
122-
#: includes/class-unfc-db_check-list-table.php:532
122+
#: includes/class-unfc-db_check-list-table.php:518
123+
#: includes/class-unfc-db_check-list-table.php:535
123124
msgid "No difference!"
124125
msgstr "Aucune différence&nbsp;!"
125126

@@ -432,7 +433,7 @@ msgstr[0] "%s élément a normalisé."
432433
msgstr[1] "%s éléments ont normalisé."
433434

434435
#: includes/class-unfc-normalize.php:1805
435-
#: includes/class-unfc-normalize.php:2235
436+
#: includes/class-unfc-normalize.php:2249
436437
msgid "Nothing updated!"
437438
msgstr "Rien mis à jour&nbsp;!"
438439

@@ -468,14 +469,14 @@ msgstr ""
468469
"détecté&nbsp;!"
469470

470471
#. translators: %s: formatted number of slugs normalized.
471-
#: includes/class-unfc-normalize.php:2233
472+
#: includes/class-unfc-normalize.php:2247
472473
msgid "%s slug normalized."
473474
msgid_plural "%s slugs normalized."
474475
msgstr[0] "%s identifiant a normalisé."
475476
msgstr[1] "%s identifiants ont normalisé."
476477

477478
#. translators: %s: formatted number of items locked.
478-
#: includes/class-unfc-normalize.php:2240
479+
#: includes/class-unfc-normalize.php:2254
479480
msgid "%s slug not normalized, somebody is editing it."
480481
msgid_plural "%s slugs not normalized, somebody is editing them."
481482
msgstr[0] ""
@@ -486,26 +487,34 @@ msgstr[1] ""
486487
"de les modifier."
487488

488489
#. translators: %s: formatted number of slugs not found.
489-
#: includes/class-unfc-normalize.php:2246
490+
#: includes/class-unfc-normalize.php:2260
490491
msgid "%s slug not normalized, no longer exists."
491492
msgid_plural "%s slugs not normalized, no longer exist."
492493
msgstr[0] "%s identifiant n&rsquo;a pas normalisé, n&rsquo;existe plus."
493494
msgstr[1] "%s identifiants n&rsquo;ont pas normalisé, n&rsquo;existent plus."
494495

495496
#. translators: %s: formatted number of slugs not non-normalized.
496-
#: includes/class-unfc-normalize.php:2252
497+
#: includes/class-unfc-normalize.php:2266
497498
msgid "%s slug not normalized, no longer non-normalized."
498499
msgid_plural "%s slugs not normalized, no longer non-normalized."
499500
msgstr[0] "%s identifiant n&rsquo;a pas normalisé, plus non-normalisé."
500501
msgstr[1] "%s identifiants n&rsquo;ont pas normalisé, plus non-normalisé."
501502

502503
#. translators: %s: formatted number of slugs that failed to normalize.
503-
#: includes/class-unfc-normalize.php:2258
504+
#: includes/class-unfc-normalize.php:2272
504505
msgid "%s slug not normalized, failed to normalize."
505506
msgid_plural "%s slugs not normalized, failed to normalize."
506507
msgstr[0] "%s identifiant n&rsquo;a pas normalisé, échoué à normaliser."
507508
msgstr[1] "%s identifiants n&rsquo;ont pas normalisé, échoué à normaliser."
508509

510+
#. translators: %s: file name
511+
#: tools/gen_cat_regex_alts.php:50 tools/gen_mnme_regex.php:34
512+
#: tools/gen_script_regex_alts.php:50 tools/gen_trans_latin_ascii.php:59
513+
#: tools/gen_unidata.php:109
514+
msgid "Could not read unicode data file \"%s\""
515+
msgstr ""
516+
"Impossible de lire le fichier de données unicode &laquo;&nbsp;%s&nbsp;&raquo;"
517+
509518
#. translators: %s: file name
510519
#: tools/gen_combining_class.php:36 tools/gen_unfc_ins.php:132
511520
#: tools/gen_unfc_regex_alts.php:137
@@ -514,13 +523,6 @@ msgstr ""
514523
"Impossible de lire le fichier dérivé de classe combinante &laquo;&nbsp;"
515524
"%s&nbsp;&raquo;"
516525

517-
#. translators: %s: file name
518-
#: tools/gen_mn_regex.php:30 tools/gen_mnme_regex.php:31
519-
#: tools/gen_unidata.php:109
520-
msgid "Could not read unicode data file \"%s\""
521-
msgstr ""
522-
"Impossible de lire le fichier de données unicode &laquo;&nbsp;%s&nbsp;&raquo;"
523-
524526
#. translators: %s: file name
525527
#: tools/gen_unfc_ins.php:33 tools/gen_unfc_regex_alts.php:33
526528
msgid "Could not read UCD derived normalization properties file \"%s\""

languages/unfc-normalize.pot

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is distributed under the GPLv2.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: UNFC Nörmalize 1.0.3\n"
5+
"Project-Id-Version: UNFC Nörmalize 1.0.4\n"
66
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/unfc-normalize\n"
77
"POT-Creation-Date: 2016-07-30 18:01:12+00:00\n"
88
"MIME-Version: 1.0\n"
@@ -111,17 +111,18 @@ msgstr ""
111111
msgid "Normalized Decoded"
112112
msgstr ""
113113

114-
#: includes/class-unfc-db_check-list-table.php:474
114+
#: includes/class-unfc-db_check-list-table.php:476
115+
#. translators: %s: item title
115116
msgid "Select %s"
116117
msgstr ""
117118

118-
#: includes/class-unfc-db_check-list-table.php:510
119-
#: includes/class-unfc-db_check-list-table.php:527
119+
#: includes/class-unfc-db_check-list-table.php:513
120+
#: includes/class-unfc-db_check-list-table.php:530
120121
msgid "Not normalizable!"
121122
msgstr ""
122123

123-
#: includes/class-unfc-db_check-list-table.php:515
124-
#: includes/class-unfc-db_check-list-table.php:532
124+
#: includes/class-unfc-db_check-list-table.php:518
125+
#: includes/class-unfc-db_check-list-table.php:535
125126
msgid "No difference!"
126127
msgstr ""
127128

@@ -406,7 +407,7 @@ msgstr[0] ""
406407
msgstr[1] ""
407408

408409
#: includes/class-unfc-normalize.php:1805
409-
#: includes/class-unfc-normalize.php:2235
410+
#: includes/class-unfc-normalize.php:2249
410411
msgid "Nothing updated!"
411412
msgstr ""
412413

@@ -435,51 +436,52 @@ msgstr[1] ""
435436
msgid "<strong>No</strong> non-normalized percent-encoded slugs detected!"
436437
msgstr ""
437438

438-
#: includes/class-unfc-normalize.php:2233
439+
#: includes/class-unfc-normalize.php:2247
439440
#. translators: %s: formatted number of slugs normalized.
440441
msgid "%s slug normalized."
441442
msgid_plural "%s slugs normalized."
442443
msgstr[0] ""
443444
msgstr[1] ""
444445

445-
#: includes/class-unfc-normalize.php:2240
446+
#: includes/class-unfc-normalize.php:2254
446447
#. translators: %s: formatted number of items locked.
447448
msgid "%s slug not normalized, somebody is editing it."
448449
msgid_plural "%s slugs not normalized, somebody is editing them."
449450
msgstr[0] ""
450451
msgstr[1] ""
451452

452-
#: includes/class-unfc-normalize.php:2246
453+
#: includes/class-unfc-normalize.php:2260
453454
#. translators: %s: formatted number of slugs not found.
454455
msgid "%s slug not normalized, no longer exists."
455456
msgid_plural "%s slugs not normalized, no longer exist."
456457
msgstr[0] ""
457458
msgstr[1] ""
458459

459-
#: includes/class-unfc-normalize.php:2252
460+
#: includes/class-unfc-normalize.php:2266
460461
#. translators: %s: formatted number of slugs not non-normalized.
461462
msgid "%s slug not normalized, no longer non-normalized."
462463
msgid_plural "%s slugs not normalized, no longer non-normalized."
463464
msgstr[0] ""
464465
msgstr[1] ""
465466

466-
#: includes/class-unfc-normalize.php:2258
467+
#: includes/class-unfc-normalize.php:2272
467468
#. translators: %s: formatted number of slugs that failed to normalize.
468469
msgid "%s slug not normalized, failed to normalize."
469470
msgid_plural "%s slugs not normalized, failed to normalize."
470471
msgstr[0] ""
471472
msgstr[1] ""
472473

473-
#: tools/gen_combining_class.php:36 tools/gen_unfc_ins.php:132
474-
#: tools/gen_unfc_regex_alts.php:137
474+
#: tools/gen_cat_regex_alts.php:50 tools/gen_mnme_regex.php:34
475+
#: tools/gen_script_regex_alts.php:50 tools/gen_trans_latin_ascii.php:59
476+
#: tools/gen_unidata.php:109
475477
#. translators: %s: file name
476-
msgid "Could not read derived combining class file \"%s\""
478+
msgid "Could not read unicode data file \"%s\""
477479
msgstr ""
478480

479-
#: tools/gen_mn_regex.php:30 tools/gen_mnme_regex.php:31
480-
#: tools/gen_unidata.php:109
481+
#: tools/gen_combining_class.php:36 tools/gen_unfc_ins.php:132
482+
#: tools/gen_unfc_regex_alts.php:137
481483
#. translators: %s: file name
482-
msgid "Could not read unicode data file \"%s\""
484+
msgid "Could not read derived combining class file \"%s\""
483485
msgstr ""
484486

485487
#: tools/gen_unfc_ins.php:33 tools/gen_unfc_regex_alts.php:33

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "unfc-normalize",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "Normalizes UTF-8 input to Normalization Form C.",
55
"repository": {
66
"type": "git",

phpunit.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,13 @@
2626
<file>Symfony/NormalizerO.php</file>
2727
<file>Symfony/NormalizerS.php</file>
2828
<file>Symfony/unfc_ins.php</file>
29+
<file>tools/gen_cat_regex_alts.php</file>
2930
<file>tools/gen_combining_class.php</file>
3031
<file>tools/gen_mnme_regex.php</file>
31-
<file>tools/gen_unfc_regex_alts.php</file>
32+
<file>tools/gen_script_regex_alts.php</file>
33+
<file>tools/gen_trans_latin_ascii.php</file>
3234
<file>tools/gen_unfc_ins.php</file>
35+
<file>tools/gen_unfc_regex_alts.php</file>
3336
<file>tools/gen_unidata.php</file>
3437
<file>tools/list.php</file>
3538
</exclude>

readme.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Contributors: gitlost, zodiac1978
33
Tags: Unicode, Normalization, Form C, Unicode Normalization Form C, Normalize, Normalizer, UTF-8, NFC
44
Requires at least: 3.9.13
5-
Tested up to: 4.6
6-
Stable tag: 1.0.3
5+
Tested up to: 4.6.1
6+
Stable tag: 1.0.4
77
License: GPLv2 or later
88
License URI: http://www.gnu.org/licenses/gpl-2.0.html
99

@@ -39,7 +39,7 @@ data, and is fallible.
3939

4040
A google-cheating schoolboy French translation is supplied.
4141

42-
The plugin should run on PHP 5.2.17 to 7.0.10, and on WP 3.9.13 to 4.6.
42+
The plugin should run on PHP 5.2.17 to 7.0.10, and on WP 3.9.13 to 4.6.1.
4343

4444
The project is on [github](https://github.com/gitlost/unfc-normalize).
4545

@@ -73,6 +73,10 @@ global PHP variable `unfc_normalize`, but you should ensure that the `Normalizer
7373

7474
== Changelog ==
7575

76+
= 1.0.4 =
77+
* Add _wp_old_slug on normalizing slugs.
78+
* Escape title in screen reader label in db check.
79+
7680
= 1.0.3 =
7781
* For PHP 5 performance do preliminary preg_match on isNormalized.
7882
* Improve comments in Normalizer.php, tabs -> 4 spaces, UNFC_REGEX_IS_INVALID_UTF8_XXX invert & rename.
@@ -102,5 +106,8 @@ global PHP variable `unfc_normalize`, but you should ensure that the `Normalizer
102106

103107
== Upgrade Notice ==
104108

109+
= 1.0.4 =
110+
Now adds _wp_old_slug on normalizing slugs so old links will work.
111+
105112
= 1.0.3 =
106113
Improved PHP 5 performance on isNormalized() check.

unfc-normalize.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: UNFC Nörmalize
44
* Plugin URI: https://github.com/gitlost/unfc-normalize
55
* Description: Normalizes UTF-8 input to Normalization Form C.
6-
* Version: 1.0.3
6+
* Version: 1.0.4
77
* Author: gitlost
88
* Author URI: https://profiles.wordpress.org/gitlost
99
* License: GPLv2
@@ -21,9 +21,9 @@
2121

2222
if ( ! defined( 'UNFC_VERSION' ) ) {
2323
// These need to be synced with "readme.txt".
24-
define( 'UNFC_VERSION', '1.0.3' ); // Sync also "package.json" and "language/unfc-normalize.pot".
24+
define( 'UNFC_VERSION', '1.0.4' ); // Sync also "package.json" and "language/unfc-normalize.pot".
2525
define( 'UNFC_WP_AT_LEAST_VERSION', '3.9.13' );
26-
define( 'UNFC_WP_UP_TO_VERSION', '4.6' );
26+
define( 'UNFC_WP_UP_TO_VERSION', '4.6.1' );
2727

2828
// Handy now that other *.php stuff has been moved into subdir "includes".
2929
define( 'UNFC_FILE', __FILE__ );

0 commit comments

Comments
 (0)