LuckyWP Table of Contents - Version 1.7

Version Description

2019-07-18 = + Added option "Replace underscores (_) with dashes (-)" for hash. + Added option "Convert to lowercase" for hash. * Minor changes in strings. * Added tips for translators in code. * Fixed: in some cases, incorrectly worked skip headings.

Download this release

Release Info

Developer theluckywp
Plugin Icon 128x128 LuckyWP Table of Contents
Version 1.7
Comparing to
See all releases

Code changes from version 1.6.1 to 1.7

admin/Admin.php CHANGED
@@ -127,7 +127,7 @@ class Admin extends BaseObject
127
  $rows[] = [esc_html__('Position', 'luckywp-table-of-contents'), ArrayHelper::getValue(Core::$plugin->positionsList, $v)];
128
  }
129
  if (null !== $v = $getValue($source, 'min')) {
130
- $rows[] = [esc_html__('Minimal Count of Headers', 'luckywp-table-of-contents'), $v];
131
  }
132
  if (null !== $v = $getValue($source, 'depth')) {
133
  $rows[] = [esc_html__('Depth', 'luckywp-table-of-contents'), $v];
@@ -193,7 +193,14 @@ class Admin extends BaseObject
193
  }
194
  }
195
  if (null !== $v = $getValue($source, 'wrapNoindex')) {
196
- $rows[] = [esc_html__('Wrap table of contents with <!--noindex--> tag', 'luckywp-table-of-contents'), $v ? __('Enabled', 'luckywp-table-of-contents') : __('Disabled', 'luckywp-table-of-contents')];
 
 
 
 
 
 
 
197
  }
198
  if (null !== $v = $getValue($source, 'skipHeadingLevel')) {
199
  $rows[] = [esc_html__('Skip headings', 'luckywp-table-of-contents'), Core::$plugin->skipHeadingLevelToLabel($v)];
127
  $rows[] = [esc_html__('Position', 'luckywp-table-of-contents'), ArrayHelper::getValue(Core::$plugin->positionsList, $v)];
128
  }
129
  if (null !== $v = $getValue($source, 'min')) {
130
+ $rows[] = [esc_html__('Minimal Count of Headings', 'luckywp-table-of-contents'), $v];
131
  }
132
  if (null !== $v = $getValue($source, 'depth')) {
133
  $rows[] = [esc_html__('Depth', 'luckywp-table-of-contents'), $v];
193
  }
194
  }
195
  if (null !== $v = $getValue($source, 'wrapNoindex')) {
196
+ $rows[] = [
197
+ sprintf(
198
+ /* translators: %s: <!--noindex--> */
199
+ esc_html__('Wrap table of contents with %s tag', 'luckywp-table-of-contents'),
200
+ '&lt;!--noindex--&gt;'
201
+ ),
202
+ $v ? __('Enabled', 'luckywp-table-of-contents') : __('Disabled', 'luckywp-table-of-contents')
203
+ ];
204
  }
205
  if (null !== $v = $getValue($source, 'skipHeadingLevel')) {
206
  $rows[] = [esc_html__('Skip headings', 'luckywp-table-of-contents'), Core::$plugin->skipHeadingLevelToLabel($v)];
admin/views/rate/notice.php CHANGED
@@ -9,7 +9,8 @@ use luckywp\tableOfContents\core\admin\helpers\AdminHtml;
9
  <?= esc_html__('Hello!', 'luckywp-table-of-contents') ?>
10
  <br>
11
  <?= sprintf(
12
- esc_html__('We are very pleased that you are using the %s plugin within a few days.', 'luckywp-table-of-contents'),
 
13
  '<b>LuckyWP Table of Contents</b>'
14
  ) ?>
15
  <br>
9
  <?= esc_html__('Hello!', 'luckywp-table-of-contents') ?>
10
  <br>
11
  <?= sprintf(
12
+ /* translators: %s: LuckyWP Table of Contents */
13
+ esc_html__('We are very pleased that you by now have been using the %s plugin a few days.', 'luckywp-table-of-contents'),
14
  '<b>LuckyWP Table of Contents</b>'
15
  ) ?>
16
  <br>
admin/views/settings/index.php CHANGED
@@ -6,6 +6,7 @@ use luckywp\tableOfContents\core\Core;
6
  ?>
7
  <div class="wrap">
8
  <a href="<?= Rate::LINK ?>" target="_blank" class="lwptocSettingsRate"><?= sprintf(
 
9
  esc_html__('Leave a %s plugin review on WordPress.org', 'luckywp-table-of-contents'),
10
  '★★★★★'
11
  ) ?></a>
6
  ?>
7
  <div class="wrap">
8
  <a href="<?= Rate::LINK ?>" target="_blank" class="lwptocSettingsRate"><?= sprintf(
9
+ /* translators: %s: ★★★★★ */
10
  esc_html__('Leave a %s plugin review on WordPress.org', 'luckywp-table-of-contents'),
11
  '★★★★★'
12
  ) ?></a>
admin/widgets/customizeModal/views/modal.php CHANGED
@@ -15,6 +15,8 @@ use luckywp\tableOfContents\core\admin\helpers\AdminHtml;
15
  use luckywp\tableOfContents\core\Core;
16
  use luckywp\tableOfContents\core\helpers\Html;
17
 
 
 
18
  echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
19
  ?>
20
  <form
@@ -51,7 +53,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
51
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
52
  </div>
53
  <div class="lwptocCustomize_field_override">
54
- <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
55
  </div>
56
  <div class="lwptocCustomize_field_el">
57
  <?= Html::dropDownList(Html::getInputName($model, 'position'), $model->defaultPosition ? Core::$plugin->settings->autoInsertPosition : $model->position, Core::$plugin->positionsList, [
@@ -70,11 +72,11 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
70
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->min)) ? Core::$plugin->settings->generalMin : $model->postSettings->min ?>
71
  <div class="lwptocCustomize_field<?= $model->defaultMin ? ' lwptocCustomize_field-default' : '' ?>">
72
  <div class="lwptocCustomize_field_header">
73
- <span class="lwptocCustomize_field_label"><?= __('Minimal Count of Headers', 'luckywp-table-of-contents') ?></span>
74
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
75
  </div>
76
  <div class="lwptocCustomize_field_override">
77
- <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
78
  </div>
79
  <div class="lwptocCustomize_field_el">
80
  <?= Html::textInput(Html::getInputName($model, 'min'), $model->defaultMin ? $defaultValue : $model->min, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
@@ -83,7 +85,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
83
  ]) ?>
84
  </div>
85
  <div class="lwptocCustomize_field_desc">
86
- <?= __('If the count of headers in the post is less, then table of contents is not displayed.', 'luckywp-table-of-contents') ?>
87
  </div>
88
  <div class="lwptocCustomize_field_defaultValue">
89
  <?= $defaultValue ?>
@@ -97,7 +99,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
97
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
98
  </div>
99
  <div class="lwptocCustomize_field_override">
100
- <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
101
  </div>
102
  <div class="lwptocCustomize_field_el">
103
  <?= Html::dropDownList(Html::getInputName($model, 'depth'), $model->defaultDepth ? $defaultValue : $model->depth, Core::$plugin->depthsList, [
@@ -119,7 +121,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
119
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
120
  </div>
121
  <div class="lwptocCustomize_field_override">
122
- <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
123
  </div>
124
  <div class="lwptocCustomize_field_el">
125
  <label>
@@ -142,7 +144,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
142
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
143
  </div>
144
  <div class="lwptocCustomize_field_override">
145
- <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
146
  </div>
147
  <div class="lwptocCustomize_field_el">
148
  <?= Html::dropDownList(Html::getInputName($model, 'numeration'), $model->defaultNumeration ? $defaultValue : $model->numeration, Core::$plugin->numerationsList, [
@@ -164,7 +166,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
164
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
165
  </div>
166
  <div class="lwptocCustomize_field_override">
167
- <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
168
  </div>
169
  <div class="lwptocCustomize_field_el">
170
  <?= Html::dropDownList(Html::getInputName($model, 'numerationSuffix'), $model->defaultNumerationSuffix ? $defaultValue : $model->numerationSuffix, Core::$plugin->getNumerationSuffixsList(), [
@@ -186,7 +188,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
186
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
187
  </div>
188
  <div class="lwptocCustomize_field_override">
189
- <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
190
  </div>
191
  <div class="lwptocCustomize_field_el">
192
  <?= Html::textInput(Html::getInputName($model, 'title'), $model->defaultTitle ? $defaultValue : $model->title, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
@@ -212,7 +214,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
212
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
213
  </div>
214
  <div class="lwptocCustomize_field_override">
215
- <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
216
  </div>
217
  <div class="lwptocCustomize_field_el">
218
  <label>
@@ -235,7 +237,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
235
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
236
  </div>
237
  <div class="lwptocCustomize_field_override">
238
- <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
239
  </div>
240
  <div class="lwptocCustomize_field_el">
241
  <?= Html::textInput(Html::getInputName($model, 'labelShow'), $model->defaultLabelShow ? $defaultValue : $model->labelShow, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
@@ -255,7 +257,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
255
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
256
  </div>
257
  <div class="lwptocCustomize_field_override">
258
- <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
259
  </div>
260
  <div class="lwptocCustomize_field_el">
261
  <?= Html::textInput(Html::getInputName($model, 'labelHide'), $model->defaultLabelHide ? $defaultValue : $model->labelHide, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
@@ -275,7 +277,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
275
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
276
  </div>
277
  <div class="lwptocCustomize_field_override">
278
- <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
279
  </div>
280
  <div class="lwptocCustomize_field_el">
281
  <label>
@@ -298,7 +300,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
298
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
299
  </div>
300
  <div class="lwptocCustomize_field_override">
301
- <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
302
  </div>
303
  <div class="lwptocCustomize_field_el">
304
  <label>
@@ -321,7 +323,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
321
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
322
  </div>
323
  <div class="lwptocCustomize_field_override">
324
- <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
325
  </div>
326
  <div class="lwptocCustomize_field_el">
327
  <?= Html::textInput(Html::getInputName($model, 'smoothScrollOffset'), $model->defaultSmoothScrollOffset ? $defaultValue : $model->smoothScrollOffset, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
@@ -345,7 +347,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
345
  <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
346
  </div>
347
  <div class="lwptocCustomize_field_override">
348
- <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
349
  </div>
350
  <div class="lwptocCustomize_field_el">
351
  <?= WidthField::widget([
@@ -368,7 +370,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
368
  <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
369
  </div>
370
  <div class="lwptocCustomize_field_override">
371
- <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
372
  </div>
373
  <div class="lwptocCustomize_field_el">
374
  <?= Html::dropDownList(Html::getInputName($model, 'float'), $model->defaultFloat ? $defaultValue : $model->float, Core::$plugin->floatsList, [
@@ -390,7 +392,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
390
  <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
391
  </div>
392
  <div class="lwptocCustomize_field_override">
393
- <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
394
  </div>
395
  <div class="lwptocCustomize_field_el">
396
  <?= FontSizeField::widget([
@@ -414,7 +416,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
414
  <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
415
  </div>
416
  <div class="lwptocCustomize_field_override">
417
- <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
418
  </div>
419
  <div class="lwptocCustomize_field_el">
420
  <?= Html::dropDownList(Html::getInputName($model, 'titleFontWeight'), $model->defaultTitleFontWeight ? $defaultValue : $model->titleFontWeight, Core::$plugin->fontWeightsList, [
@@ -436,7 +438,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
436
  <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
437
  </div>
438
  <div class="lwptocCustomize_field_override">
439
- <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
440
  </div>
441
  <div class="lwptocCustomize_field_el">
442
  <?= FontSizeField::widget([
@@ -460,7 +462,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
460
  <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
461
  </div>
462
  <div class="lwptocCustomize_field_override">
463
- <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
464
  </div>
465
  <div class="lwptocCustomize_field_el">
466
  <?= Html::dropDownList(Html::getInputName($model, 'colorScheme'), $model->defaultColorScheme ? $defaultValue : $model->colorScheme, Core::$plugin->colorSchemesList, [
@@ -490,7 +492,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
490
  <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
491
  </div>
492
  <div class="lwptocCustomize_field_override">
493
- <?= esc_html__('Click for override default value', 'luckywp-table-of-contents') ?>
494
  </div>
495
  <div class="lwptocCustomize_field_defaultValue">
496
  <?= OverrideColorBadge::widget(['color' => $defaultValue]) ?>
@@ -511,11 +513,15 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
511
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->wrapNoindex)) ? Core::$plugin->settings->miscWrapNoindex : $model->postSettings->wrapNoindex ?>
512
  <div class="lwptocCustomize_field<?= $model->defaultWrapNoindex ? ' lwptocCustomize_field-default' : '' ?>">
513
  <div class="lwptocCustomize_field_header">
514
- <span class="lwptocCustomize_field_label"><?= esc_html__('Wrap table of contents with <!--noindex--> tag', 'luckywp-table-of-contents') ?></span>
 
 
 
 
515
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
516
  </div>
517
  <div class="lwptocCustomize_field_override">
518
- <?= __('Click for override default value', 'luckywp-table-of-contents') ?>
519
  </div>
520
  <div class="lwptocCustomize_field_el">
521
  <label>
@@ -538,7 +544,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
538
  <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
539
  </div>
540
  <div class="lwptocCustomize_field_override">
541
- <?= esc_html__('Click for override default value', 'luckywp-table-of-contents') ?>
542
  </div>
543
  <div class="lwptocCustomize_field_el">
544
  <?= SkipHeadingLevelField::widget([
@@ -561,7 +567,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
561
  <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
562
  </div>
563
  <div class="lwptocCustomize_field_override">
564
- <?= esc_html__('Click for override default value', 'luckywp-table-of-contents') ?>
565
  </div>
566
  <div class="lwptocCustomize_field_el">
567
  <?php
@@ -574,6 +580,7 @@ echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
574
  echo esc_html__('Specify headings (one per line) to be excluded from the table of contents.', 'luckywp-table-of-contents');
575
  echo '<br>';
576
  echo sprintf(
 
577
  esc_html__('Use an asterisk %s as a wildcard to match any text.', 'luckywp-table-of-contents'),
578
  '<code>*</code>'
579
  );
15
  use luckywp\tableOfContents\core\Core;
16
  use luckywp\tableOfContents\core\helpers\Html;
17
 
18
+ $clickToOverrideDefaultValue = esc_html__('Click to override default value', 'luckywp-table-of-contents');
19
+
20
  echo $onlyBody ? '' : '<div class="lwptocCustomize lwptocCustomize-metabox">';
21
  ?>
22
  <form
53
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
54
  </div>
55
  <div class="lwptocCustomize_field_override">
56
+ <?= $clickToOverrideDefaultValue ?>
57
  </div>
58
  <div class="lwptocCustomize_field_el">
59
  <?= Html::dropDownList(Html::getInputName($model, 'position'), $model->defaultPosition ? Core::$plugin->settings->autoInsertPosition : $model->position, Core::$plugin->positionsList, [
72
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->min)) ? Core::$plugin->settings->generalMin : $model->postSettings->min ?>
73
  <div class="lwptocCustomize_field<?= $model->defaultMin ? ' lwptocCustomize_field-default' : '' ?>">
74
  <div class="lwptocCustomize_field_header">
75
+ <span class="lwptocCustomize_field_label"><?= __('Minimal Count of Headings', 'luckywp-table-of-contents') ?></span>
76
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
77
  </div>
78
  <div class="lwptocCustomize_field_override">
79
+ <?= $clickToOverrideDefaultValue ?>
80
  </div>
81
  <div class="lwptocCustomize_field_el">
82
  <?= Html::textInput(Html::getInputName($model, 'min'), $model->defaultMin ? $defaultValue : $model->min, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
85
  ]) ?>
86
  </div>
87
  <div class="lwptocCustomize_field_desc">
88
+ <?= __('If the count of headings in the post is less, then table of contents is not displayed.', 'luckywp-table-of-contents') ?>
89
  </div>
90
  <div class="lwptocCustomize_field_defaultValue">
91
  <?= $defaultValue ?>
99
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
100
  </div>
101
  <div class="lwptocCustomize_field_override">
102
+ <?= $clickToOverrideDefaultValue ?>
103
  </div>
104
  <div class="lwptocCustomize_field_el">
105
  <?= Html::dropDownList(Html::getInputName($model, 'depth'), $model->defaultDepth ? $defaultValue : $model->depth, Core::$plugin->depthsList, [
121
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
122
  </div>
123
  <div class="lwptocCustomize_field_override">
124
+ <?= $clickToOverrideDefaultValue ?>
125
  </div>
126
  <div class="lwptocCustomize_field_el">
127
  <label>
144
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
145
  </div>
146
  <div class="lwptocCustomize_field_override">
147
+ <?= $clickToOverrideDefaultValue ?>
148
  </div>
149
  <div class="lwptocCustomize_field_el">
150
  <?= Html::dropDownList(Html::getInputName($model, 'numeration'), $model->defaultNumeration ? $defaultValue : $model->numeration, Core::$plugin->numerationsList, [
166
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
167
  </div>
168
  <div class="lwptocCustomize_field_override">
169
+ <?= $clickToOverrideDefaultValue ?>
170
  </div>
171
  <div class="lwptocCustomize_field_el">
172
  <?= Html::dropDownList(Html::getInputName($model, 'numerationSuffix'), $model->defaultNumerationSuffix ? $defaultValue : $model->numerationSuffix, Core::$plugin->getNumerationSuffixsList(), [
188
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
189
  </div>
190
  <div class="lwptocCustomize_field_override">
191
+ <?= $clickToOverrideDefaultValue ?>
192
  </div>
193
  <div class="lwptocCustomize_field_el">
194
  <?= Html::textInput(Html::getInputName($model, 'title'), $model->defaultTitle ? $defaultValue : $model->title, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
214
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
215
  </div>
216
  <div class="lwptocCustomize_field_override">
217
+ <?= $clickToOverrideDefaultValue ?>
218
  </div>
219
  <div class="lwptocCustomize_field_el">
220
  <label>
237
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
238
  </div>
239
  <div class="lwptocCustomize_field_override">
240
+ <?= $clickToOverrideDefaultValue ?>
241
  </div>
242
  <div class="lwptocCustomize_field_el">
243
  <?= Html::textInput(Html::getInputName($model, 'labelShow'), $model->defaultLabelShow ? $defaultValue : $model->labelShow, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
257
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
258
  </div>
259
  <div class="lwptocCustomize_field_override">
260
+ <?= $clickToOverrideDefaultValue ?>
261
  </div>
262
  <div class="lwptocCustomize_field_el">
263
  <?= Html::textInput(Html::getInputName($model, 'labelHide'), $model->defaultLabelHide ? $defaultValue : $model->labelHide, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
277
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
278
  </div>
279
  <div class="lwptocCustomize_field_override">
280
+ <?= $clickToOverrideDefaultValue ?>
281
  </div>
282
  <div class="lwptocCustomize_field_el">
283
  <label>
300
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
301
  </div>
302
  <div class="lwptocCustomize_field_override">
303
+ <?= $clickToOverrideDefaultValue ?>
304
  </div>
305
  <div class="lwptocCustomize_field_el">
306
  <label>
323
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
324
  </div>
325
  <div class="lwptocCustomize_field_override">
326
+ <?= $clickToOverrideDefaultValue ?>
327
  </div>
328
  <div class="lwptocCustomize_field_el">
329
  <?= Html::textInput(Html::getInputName($model, 'smoothScrollOffset'), $model->defaultSmoothScrollOffset ? $defaultValue : $model->smoothScrollOffset, ['class' => 'lwptocCustomize_field_el_textInput']) ?>
347
  <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
348
  </div>
349
  <div class="lwptocCustomize_field_override">
350
+ <?= $clickToOverrideDefaultValue ?>
351
  </div>
352
  <div class="lwptocCustomize_field_el">
353
  <?= WidthField::widget([
370
  <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
371
  </div>
372
  <div class="lwptocCustomize_field_override">
373
+ <?= $clickToOverrideDefaultValue ?>
374
  </div>
375
  <div class="lwptocCustomize_field_el">
376
  <?= Html::dropDownList(Html::getInputName($model, 'float'), $model->defaultFloat ? $defaultValue : $model->float, Core::$plugin->floatsList, [
392
  <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
393
  </div>
394
  <div class="lwptocCustomize_field_override">
395
+ <?= $clickToOverrideDefaultValue ?>
396
  </div>
397
  <div class="lwptocCustomize_field_el">
398
  <?= FontSizeField::widget([
416
  <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
417
  </div>
418
  <div class="lwptocCustomize_field_override">
419
+ <?= $clickToOverrideDefaultValue ?>
420
  </div>
421
  <div class="lwptocCustomize_field_el">
422
  <?= Html::dropDownList(Html::getInputName($model, 'titleFontWeight'), $model->defaultTitleFontWeight ? $defaultValue : $model->titleFontWeight, Core::$plugin->fontWeightsList, [
438
  <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
439
  </div>
440
  <div class="lwptocCustomize_field_override">
441
+ <?= $clickToOverrideDefaultValue ?>
442
  </div>
443
  <div class="lwptocCustomize_field_el">
444
  <?= FontSizeField::widget([
462
  <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
463
  </div>
464
  <div class="lwptocCustomize_field_override">
465
+ <?= $clickToOverrideDefaultValue ?>
466
  </div>
467
  <div class="lwptocCustomize_field_el">
468
  <?= Html::dropDownList(Html::getInputName($model, 'colorScheme'), $model->defaultColorScheme ? $defaultValue : $model->colorScheme, Core::$plugin->colorSchemesList, [
492
  <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
493
  </div>
494
  <div class="lwptocCustomize_field_override">
495
+ <?= $clickToOverrideDefaultValue ?>
496
  </div>
497
  <div class="lwptocCustomize_field_defaultValue">
498
  <?= OverrideColorBadge::widget(['color' => $defaultValue]) ?>
513
  <?php $defaultValue = ($model->isPostOrWidgetSettings || is_null($model->postSettings->wrapNoindex)) ? Core::$plugin->settings->miscWrapNoindex : $model->postSettings->wrapNoindex ?>
514
  <div class="lwptocCustomize_field<?= $model->defaultWrapNoindex ? ' lwptocCustomize_field-default' : '' ?>">
515
  <div class="lwptocCustomize_field_header">
516
+ <span class="lwptocCustomize_field_label"><?= sprintf(
517
+ /* translators: %s: <!--noindex--> */
518
+ esc_html__('Wrap table of contents with %s tag', 'luckywp-table-of-contents'),
519
+ '&lt;!--noindex--&gt;'
520
+ ) ?></span>
521
  <span class="lwptocCustomize_field_default"><?= __('default', 'luckywp-table-of-contents') ?></span>
522
  </div>
523
  <div class="lwptocCustomize_field_override">
524
+ <?= $clickToOverrideDefaultValue ?>
525
  </div>
526
  <div class="lwptocCustomize_field_el">
527
  <label>
544
  <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
545
  </div>
546
  <div class="lwptocCustomize_field_override">
547
+ <?= $clickToOverrideDefaultValue ?>
548
  </div>
549
  <div class="lwptocCustomize_field_el">
550
  <?= SkipHeadingLevelField::widget([
567
  <span class="lwptocCustomize_field_default"><?= esc_html__('default', 'luckywp-table-of-contents') ?></span>
568
  </div>
569
  <div class="lwptocCustomize_field_override">
570
+ <?= $clickToOverrideDefaultValue ?>
571
  </div>
572
  <div class="lwptocCustomize_field_el">
573
  <?php
580
  echo esc_html__('Specify headings (one per line) to be excluded from the table of contents.', 'luckywp-table-of-contents');
581
  echo '<br>';
582
  echo sprintf(
583
+ /* translators: %s: Asterisk symbol (*) */
584
  esc_html__('Use an asterisk %s as a wildcard to match any text.', 'luckywp-table-of-contents'),
585
  '<code>*</code>'
586
  );
config/settings.php CHANGED
@@ -19,7 +19,7 @@ return [
19
  'fields' => [
20
 
21
  'min' => [
22
- 'label' => esc_html__('Minimal Count of Headers', 'luckywp-table-of-contents'),
23
  'widget' => 'textInput',
24
  'params' => [
25
  'inputOptions' => [
@@ -27,7 +27,7 @@ return [
27
  ],
28
  ],
29
  'default' => 2,
30
- 'desc' => esc_html__('If the count of headers in the post is less, then table of contents is not displayed.', 'luckywp-table-of-contents'),
31
  ],
32
 
33
  'depth' => [
@@ -73,6 +73,7 @@ return [
73
  ],
74
  'default' => 'none',
75
  'desc' => sprintf(
 
76
  esc_html__('The symbol will be added after numeration. For example, %s', 'luckywp-table-of-contents'),
77
  '<code>1.3)</code>'
78
  ),
@@ -352,29 +353,6 @@ return [
352
  'misc' => [
353
  'label' => esc_html__('Misc.', 'luckywp-table-of-contents'),
354
  'sections' => [
355
- 'main' => [
356
- 'fields' => [
357
- 'hashFormat' => [
358
- 'label' => esc_html__('Hash Format', 'luckywp-table-of-contents'),
359
- 'widget' => 'select',
360
- 'params' => [
361
- 'items' => Core::$plugin->getHashFormatsList(),
362
- ],
363
- 'default' => 'asheading',
364
- ],
365
-
366
- 'wrapNoindex' => [
367
- 'label' => '',
368
- 'widget' => 'checkbox',
369
- 'params' => [
370
- 'checkboxOptions' => [
371
- 'label' => esc_html__('Wrap table of contents with <!--noindex--> tag', 'luckywp-table-of-contents'),
372
- ],
373
- ],
374
- 'default' => false,
375
- ],
376
- ],
377
- ],
378
  'skipHeading' => [
379
  'title' => esc_html__('Skip Headings', 'luckywp-table-of-contents'),
380
  'fields' => [
@@ -400,6 +378,7 @@ return [
400
  echo esc_html__('Specify headings (one per line) to be excluded from the table of contents.', 'luckywp-table-of-contents');
401
  echo '<br>';
402
  echo sprintf(
 
403
  esc_html__('Use an asterisk %s as a wildcard to match any text.', 'luckywp-table-of-contents'),
404
  '<code>*</code>'
405
  );
@@ -411,6 +390,67 @@ return [
411
  ],
412
  ],
413
  ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
414
  'postSettings' => [
415
  'title' => esc_html__('Post Settings', 'luckywp-table-of-contents'),
416
  'fields' => [
19
  'fields' => [
20
 
21
  'min' => [
22
+ 'label' => esc_html__('Minimal Count of Headings', 'luckywp-table-of-contents'),
23
  'widget' => 'textInput',
24
  'params' => [
25
  'inputOptions' => [
27
  ],
28
  ],
29
  'default' => 2,
30
+ 'desc' => esc_html__('If the count of headings in the post is less, then table of contents is not displayed.', 'luckywp-table-of-contents'),
31
  ],
32
 
33
  'depth' => [
73
  ],
74
  'default' => 'none',
75
  'desc' => sprintf(
76
+ /* translators: %s: 1.3) */
77
  esc_html__('The symbol will be added after numeration. For example, %s', 'luckywp-table-of-contents'),
78
  '<code>1.3)</code>'
79
  ),
353
  'misc' => [
354
  'label' => esc_html__('Misc.', 'luckywp-table-of-contents'),
355
  'sections' => [
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
356
  'skipHeading' => [
357
  'title' => esc_html__('Skip Headings', 'luckywp-table-of-contents'),
358
  'fields' => [
378
  echo esc_html__('Specify headings (one per line) to be excluded from the table of contents.', 'luckywp-table-of-contents');
379
  echo '<br>';
380
  echo sprintf(
381
+ /* translators: %s: Asterisk symbol (*) */
382
  esc_html__('Use an asterisk %s as a wildcard to match any text.', 'luckywp-table-of-contents'),
383
  '<code>*</code>'
384
  );
390
  ],
391
  ],
392
  ],
393
+ 'hash' => [
394
+ 'title' => esc_html__('Hash', 'luckywp-table-of-contents'),
395
+ 'fields' => [
396
+
397
+ 'hashFormat' => [
398
+ 'label' => esc_html__('Hash Format', 'luckywp-table-of-contents'),
399
+ 'widget' => 'select',
400
+ 'params' => [
401
+ 'items' => Core::$plugin->getHashFormatsList(),
402
+ ],
403
+ 'default' => 'asheading',
404
+ ],
405
+
406
+ 'hashConvertToLowercase' => [
407
+ 'label' => '',
408
+ 'widget' => 'checkbox',
409
+ 'params' => [
410
+ 'checkboxOptions' => [
411
+ 'label' => esc_html__('Convert to lowercase', 'luckywp-table-of-contents'),
412
+ ],
413
+ ],
414
+ 'default' => false,
415
+ ],
416
+
417
+ 'hashReplaceUnderlinesToDashes' => [
418
+ 'label' => '',
419
+ 'widget' => 'checkbox',
420
+ 'params' => [
421
+ 'checkboxOptions' => [
422
+ 'label' => sprintf(
423
+ /* translators: 1: _ 2: - */
424
+ esc_html__('Replace underscores %1$s with dashes %2$s', 'luckywp-table-of-contents'),
425
+ '<code>_</code>',
426
+ '<code>-</code>'
427
+ ),
428
+ ],
429
+ ],
430
+ 'default' => false,
431
+ ],
432
+ ],
433
+ ],
434
+ 'seo' => [
435
+ 'title' => esc_html__('SEO', 'luckywp-table-of-contents'),
436
+ 'fields' => [
437
+
438
+ 'wrapNoindex' => [
439
+ 'label' => '',
440
+ 'widget' => 'checkbox',
441
+ 'params' => [
442
+ 'checkboxOptions' => [
443
+ 'label' => sprintf(
444
+ /* translators: %s: <!--noindex--> */
445
+ esc_html__('Wrap table of contents with %s tag', 'luckywp-table-of-contents'),
446
+ '&lt;!--noindex--&gt;'
447
+ ),
448
+ ],
449
+ ],
450
+ 'default' => false,
451
+ ],
452
+ ],
453
+ ],
454
  'postSettings' => [
455
  'title' => esc_html__('Post Settings', 'luckywp-table-of-contents'),
456
  'fields' => [
core/validators/BooleanValidator.php CHANGED
@@ -24,7 +24,13 @@ class BooleanValidator extends Validator
24
  {
25
  parent::init();
26
  if ($this->message === null) {
27
- $this->message = __('{attribute} must be either "{true}" or "{false}".', 'luckywp-table-of-contents');
 
 
 
 
 
 
28
  }
29
  }
30
 
24
  {
25
  parent::init();
26
  if ($this->message === null) {
27
+ $this->message = sprintf(
28
+ /* translators: 1: Attribute name 2: True 3: False */
29
+ esc_html__('%1$s must be either "%2$s" or "%3$s".', 'luckywp-table-of-contents'),
30
+ '{attribute}',
31
+ '{true}',
32
+ '{false}'
33
+ );
34
  }
35
  }
36
 
core/validators/RangeValidator.php CHANGED
@@ -24,7 +24,11 @@ class RangeValidator extends Validator
24
  {
25
  parent::init();
26
  if ($this->message === null) {
27
- $this->message = __('{attribute} is invalid.', 'luckywp-table-of-contents');
 
 
 
 
28
  }
29
  }
30
 
24
  {
25
  parent::init();
26
  if ($this->message === null) {
27
+ $this->message = sprintf(
28
+ /* translators: %s: Attribute name */
29
+ esc_html__('%s is invalid.', 'luckywp-table-of-contents'),
30
+ '{attribute}'
31
+ );
32
  }
33
  }
34
 
core/validators/RequiredValidator.php CHANGED
@@ -13,7 +13,11 @@ class RequiredValidator extends Validator
13
  {
14
  parent::init();
15
  if ($this->message === null) {
16
- $this->message = __('{attribute} cannot be blank.', 'luckywp-table-of-contents');
 
 
 
 
17
  }
18
  }
19
 
13
  {
14
  parent::init();
15
  if ($this->message === null) {
16
+ $this->message = sprintf(
17
+ /* translators: %s: Attribute name */
18
+ esc_html__('%s cannot be blank.', 'luckywp-table-of-contents'),
19
+ '{attribute}'
20
+ );
21
  }
22
  }
23
 
languages/luckywp-table-of-contents-es_ES.mo CHANGED
Binary file
languages/luckywp-table-of-contents-he_IL.mo CHANGED
Binary file
languages/luckywp-table-of-contents-ru_RU.mo CHANGED
Binary file
languages/luckywp-table-of-contents.pot CHANGED
@@ -1,17 +1,18 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: \n"
4
- "POT-Creation-Date: 2019-07-14 12:55+0300\n"
5
- "PO-Revision-Date: 2019-07-14 12:56+0300\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
- "Language: es_ES\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "X-Generator: Poedit 2.2.3\n"
13
  "X-Poedit-Basepath: ..\n"
14
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
15
  "X-Poedit-KeywordsList: __;_;esc_html__\n"
16
  "X-Poedit-SearchPath-0: .\n"
17
  "X-Poedit-SearchPathExcluded-0: plugin/editorBlock/src\n"
@@ -31,72 +32,72 @@ msgid "Edit"
31
  msgstr ""
32
 
33
  #: admin/Admin.php:127 admin/forms/CustomizeForm.php:241
34
- #: admin/widgets/customizeModal/views/modal.php:50 config/settings.php:304
35
  msgid "Position"
36
  msgstr ""
37
 
38
- #: admin/Admin.php:130 admin/widgets/customizeModal/views/modal.php:73
39
  #: config/settings.php:22
40
- msgid "Minimal Count of Headers"
41
  msgstr ""
42
 
43
  #: admin/Admin.php:133 admin/forms/CustomizeForm.php:236
44
- #: admin/widgets/customizeModal/views/modal.php:96 config/settings.php:34
45
  msgid "Depth"
46
  msgstr ""
47
 
48
- #: admin/Admin.php:136 admin/widgets/customizeModal/views/modal.php:118
49
  #: config/settings.php:43
50
  msgid "Hierarchical View"
51
  msgstr ""
52
 
53
  #: admin/Admin.php:136 admin/Admin.php:148 admin/Admin.php:157
54
- #: admin/Admin.php:160 admin/Admin.php:196
55
- #: admin/widgets/customizeModal/views/modal.php:134
56
- #: admin/widgets/customizeModal/views/modal.php:227
57
- #: admin/widgets/customizeModal/views/modal.php:290
58
- #: admin/widgets/customizeModal/views/modal.php:313
59
- #: admin/widgets/customizeModal/views/modal.php:530
60
  msgid "Enabled"
61
  msgstr ""
62
 
63
  #: admin/Admin.php:136 admin/Admin.php:148 admin/Admin.php:157
64
- #: admin/Admin.php:160 admin/Admin.php:196
65
- #: admin/widgets/customizeModal/views/modal.php:134
66
- #: admin/widgets/customizeModal/views/modal.php:227
67
- #: admin/widgets/customizeModal/views/modal.php:290
68
- #: admin/widgets/customizeModal/views/modal.php:313
69
- #: admin/widgets/customizeModal/views/modal.php:530
70
  msgid "Disabled"
71
  msgstr ""
72
 
73
  #: admin/Admin.php:139 admin/forms/CustomizeForm.php:237
74
- #: admin/widgets/customizeModal/views/modal.php:141 config/settings.php:54
75
  msgid "Numeration"
76
  msgstr ""
77
 
78
  #: admin/Admin.php:142 admin/forms/CustomizeForm.php:238
79
- #: admin/widgets/customizeModal/views/modal.php:163 config/settings.php:66
80
  msgid "Numeration Suffix"
81
  msgstr ""
82
 
83
- #: admin/Admin.php:145 admin/widgets/customizeModal/views/modal.php:185
84
- #: config/settings.php:88
85
  msgid "Title"
86
  msgstr ""
87
 
88
- #: admin/Admin.php:148 admin/widgets/customizeModal/views/modal.php:211
89
- #: config/settings.php:94
90
  msgid "Toggle Show/Hide"
91
  msgstr ""
92
 
93
  #: admin/Admin.php:151 admin/forms/CustomizeForm.php:239
94
- #: admin/widgets/customizeModal/views/modal.php:234 config/settings.php:106
95
  msgid "Label Show"
96
  msgstr ""
97
 
98
  #: admin/Admin.php:154 admin/forms/CustomizeForm.php:240
99
- #: admin/widgets/customizeModal/views/modal.php:254 config/settings.php:117
100
  msgid "Label Hide"
101
  msgstr ""
102
 
@@ -104,57 +105,58 @@ msgstr ""
104
  msgid "Hide Items"
105
  msgstr ""
106
 
107
- #: admin/Admin.php:160 admin/widgets/customizeModal/views/modal.php:297
108
- #: config/settings.php:145
109
  msgid "Smooth Scroll"
110
  msgstr ""
111
 
112
- #: admin/Admin.php:163 admin/widgets/customizeModal/views/modal.php:320
113
  msgid "Smooth Scroll Offset Top"
114
  msgstr ""
115
 
116
- #: admin/Admin.php:166 admin/widgets/customizeModal/views/modal.php:344
117
- #: config/settings.php:181
118
  msgid "Width"
119
  msgstr ""
120
 
121
  #: admin/Admin.php:169 admin/forms/CustomizeForm.php:242
122
- #: admin/widgets/customizeModal/views/modal.php:367 config/settings.php:193
123
  msgid "Float"
124
  msgstr ""
125
 
126
- #: admin/Admin.php:172 admin/widgets/customizeModal/views/modal.php:389
127
- #: config/settings.php:202
128
  msgid "Title Font Size"
129
  msgstr ""
130
 
131
  #: admin/Admin.php:175 admin/forms/CustomizeForm.php:243
132
- #: admin/widgets/customizeModal/views/modal.php:413 config/settings.php:215
133
  msgid "Title Font Weight"
134
  msgstr ""
135
 
136
- #: admin/Admin.php:178 admin/widgets/customizeModal/views/modal.php:435
137
- #: config/settings.php:224
138
  msgid "Items Font Size"
139
  msgstr ""
140
 
141
  #: admin/Admin.php:181 admin/forms/CustomizeForm.php:244
142
- #: admin/widgets/customizeModal/views/modal.php:459 config/settings.php:237
143
  msgid "Color Scheme"
144
  msgstr ""
145
 
146
- #: admin/Admin.php:196 admin/widgets/customizeModal/views/modal.php:514
147
- #: config/settings.php:371
148
- msgid "Wrap table of contents with <!--noindex--> tag"
 
149
  msgstr ""
150
 
151
- #: admin/Admin.php:199 admin/Admin.php:202
152
  msgid "Skip headings"
153
  msgstr ""
154
 
155
  #: admin/controllers/EditorBlockController.php:71
156
  #: admin/controllers/ShortcodeController.php:74
157
- #: admin/widgets/customizeModal/views/modal.php:589
158
  #: admin/widgets/metabox/views/box.php:33
159
  #: admin/widgets/widget/views/_override.php:18
160
  msgid "empty"
@@ -164,37 +166,38 @@ msgstr ""
164
  msgid "Hello!"
165
  msgstr ""
166
 
167
- #: admin/views/rate/notice.php:12
168
  #, php-format
169
- msgid "We are very pleased that you are using the %s plugin within a few days."
 
170
  msgstr ""
171
 
172
- #: admin/views/rate/notice.php:16
173
  msgid "Please rate plugin. It will help us a lot."
174
  msgstr ""
175
 
176
- #: admin/views/rate/notice.php:19
177
  msgid "Rate the plugin"
178
  msgstr ""
179
 
180
- #: admin/views/rate/notice.php:26
181
  msgid "Remind later"
182
  msgstr ""
183
 
184
- #: admin/views/rate/notice.php:32
185
  msgid "I've already rated the plugin"
186
  msgstr ""
187
 
188
- #: admin/views/rate/notice.php:40
189
  msgid "Thank you very much!"
190
  msgstr ""
191
 
192
- #: admin/views/settings/index.php:9
193
  #, php-format
194
  msgid "Leave a %s plugin review on WordPress.org"
195
  msgstr ""
196
 
197
- #: admin/views/settings/index.php:12
198
  msgid "Table of Contents Settings"
199
  msgstr ""
200
 
@@ -202,121 +205,99 @@ msgstr ""
202
  msgid "from scheme"
203
  msgstr ""
204
 
205
- #: admin/widgets/customizeModal/views/modal.php:25
206
- #: admin/widgets/customizeModal/views/modal.php:602
 
 
 
 
207
  msgid "Cancel"
208
  msgstr ""
209
 
210
- #: admin/widgets/customizeModal/views/modal.php:26
211
  msgid "Customize Table of Contents"
212
  msgstr ""
213
 
214
- #: admin/widgets/customizeModal/views/modal.php:40 config/settings.php:16
215
  msgid "General"
216
  msgstr ""
217
 
218
- #: admin/widgets/customizeModal/views/modal.php:41 config/settings.php:175
219
  msgid "Appearance"
220
  msgstr ""
221
 
222
- #: admin/widgets/customizeModal/views/modal.php:42 config/settings.php:353
223
  msgid "Misc."
224
  msgstr ""
225
 
226
- #: admin/widgets/customizeModal/views/modal.php:51
227
- #: admin/widgets/customizeModal/views/modal.php:74
228
- #: admin/widgets/customizeModal/views/modal.php:97
229
- #: admin/widgets/customizeModal/views/modal.php:119
230
- #: admin/widgets/customizeModal/views/modal.php:142
231
- #: admin/widgets/customizeModal/views/modal.php:164
232
- #: admin/widgets/customizeModal/views/modal.php:186
233
- #: admin/widgets/customizeModal/views/modal.php:212
234
- #: admin/widgets/customizeModal/views/modal.php:235
235
- #: admin/widgets/customizeModal/views/modal.php:255
236
- #: admin/widgets/customizeModal/views/modal.php:275
237
- #: admin/widgets/customizeModal/views/modal.php:298
238
- #: admin/widgets/customizeModal/views/modal.php:321
239
- #: admin/widgets/customizeModal/views/modal.php:345
240
- #: admin/widgets/customizeModal/views/modal.php:368
241
- #: admin/widgets/customizeModal/views/modal.php:390
242
- #: admin/widgets/customizeModal/views/modal.php:414
243
- #: admin/widgets/customizeModal/views/modal.php:436
244
- #: admin/widgets/customizeModal/views/modal.php:460
245
- #: admin/widgets/customizeModal/views/modal.php:490
246
- #: admin/widgets/customizeModal/views/modal.php:515
247
- #: admin/widgets/customizeModal/views/modal.php:538
248
- #: admin/widgets/customizeModal/views/modal.php:561
249
  msgid "default"
250
  msgstr ""
251
 
252
- #: admin/widgets/customizeModal/views/modal.php:54
253
- #: admin/widgets/customizeModal/views/modal.php:77
254
- #: admin/widgets/customizeModal/views/modal.php:100
255
- #: admin/widgets/customizeModal/views/modal.php:122
256
- #: admin/widgets/customizeModal/views/modal.php:145
257
- #: admin/widgets/customizeModal/views/modal.php:167
258
- #: admin/widgets/customizeModal/views/modal.php:189
259
- #: admin/widgets/customizeModal/views/modal.php:215
260
- #: admin/widgets/customizeModal/views/modal.php:238
261
- #: admin/widgets/customizeModal/views/modal.php:258
262
- #: admin/widgets/customizeModal/views/modal.php:278
263
- #: admin/widgets/customizeModal/views/modal.php:301
264
- #: admin/widgets/customizeModal/views/modal.php:324
265
- #: admin/widgets/customizeModal/views/modal.php:348
266
- #: admin/widgets/customizeModal/views/modal.php:371
267
- #: admin/widgets/customizeModal/views/modal.php:393
268
- #: admin/widgets/customizeModal/views/modal.php:417
269
- #: admin/widgets/customizeModal/views/modal.php:439
270
- #: admin/widgets/customizeModal/views/modal.php:463
271
- #: admin/widgets/customizeModal/views/modal.php:493
272
- #: admin/widgets/customizeModal/views/modal.php:518
273
- #: admin/widgets/customizeModal/views/modal.php:541
274
- #: admin/widgets/customizeModal/views/modal.php:564
275
- msgid "Click for override default value"
276
- msgstr ""
277
-
278
- #: admin/widgets/customizeModal/views/modal.php:86 config/settings.php:30
279
  msgid ""
280
- "If the count of headers in the post is less, then table of contents is not "
281
  "displayed."
282
  msgstr ""
283
 
284
- #: admin/widgets/customizeModal/views/modal.php:127
285
- #: admin/widgets/customizeModal/views/modal.php:220
286
- #: admin/widgets/customizeModal/views/modal.php:283
287
- #: admin/widgets/customizeModal/views/modal.php:306
288
- #: admin/widgets/customizeModal/views/modal.php:523 config/settings.php:47
289
- #: config/settings.php:98 config/settings.php:149 config/settings.php:296
290
  msgid "Enable"
291
  msgstr ""
292
 
293
- #: admin/widgets/customizeModal/views/modal.php:200
294
  msgid "Without title"
295
  msgstr ""
296
 
297
- #: admin/widgets/customizeModal/views/modal.php:274 config/settings.php:132
298
  msgid "By default, items of contents will be hidden"
299
  msgstr ""
300
 
301
- #: admin/widgets/customizeModal/views/modal.php:537
302
  msgid "Skip heading by level"
303
  msgstr ""
304
 
305
- #: admin/widgets/customizeModal/views/modal.php:560
306
  msgid "Skip heading by text"
307
  msgstr ""
308
 
309
- #: admin/widgets/customizeModal/views/modal.php:574 config/settings.php:400
310
  msgid ""
311
  "Specify headings (one per line) to be excluded from the table of contents."
312
  msgstr ""
313
 
314
- #: admin/widgets/customizeModal/views/modal.php:577 config/settings.php:403
315
  #, php-format
316
  msgid "Use an asterisk %s as a wildcard to match any text."
317
  msgstr ""
318
 
319
- #: admin/widgets/customizeModal/views/modal.php:605
320
  msgid "Save"
321
  msgstr ""
322
 
@@ -324,11 +305,11 @@ msgstr ""
324
  msgid "Saved!"
325
  msgstr ""
326
 
327
- #: admin/widgets/fontSizeField/views/widget.php:16 plugin/Plugin.php:302
328
  msgid "Default"
329
  msgstr ""
330
 
331
- #: admin/widgets/fontSizeField/views/widget.php:17 plugin/Plugin.php:267
332
  msgid "Custom Value"
333
  msgstr ""
334
 
@@ -376,104 +357,121 @@ msgstr ""
376
  msgid "Enable TOC"
377
  msgstr ""
378
 
379
- #: config/settings.php:76
380
  #, php-format
381
  msgid "The symbol will be added after numeration. For example, %s"
382
  msgstr ""
383
 
384
- #: config/settings.php:84
385
  msgid "Header"
386
  msgstr ""
387
 
388
- #: config/settings.php:90 plugin/Settings.php:100
389
  msgid "Contents"
390
  msgstr ""
391
 
392
- #: config/settings.php:113 plugin/Settings.php:116
393
  msgid "show"
394
  msgstr ""
395
 
396
- #: config/settings.php:124 plugin/Settings.php:124
397
  msgid "hide"
398
  msgstr ""
399
 
400
- #: config/settings.php:141
401
  msgid "Behavior"
402
  msgstr ""
403
 
404
- #: config/settings.php:157
405
  msgid "Scroll Offset Top"
406
  msgstr ""
407
 
408
- #: config/settings.php:247
409
  msgid "Override Color Scheme Colors"
410
  msgstr ""
411
 
412
- #: config/settings.php:252
413
  msgid "Background Color"
414
  msgstr ""
415
 
416
- #: config/settings.php:257
417
  msgid "Border Color"
418
  msgstr ""
419
 
420
- #: config/settings.php:262
421
  msgid "Title Color"
422
  msgstr ""
423
 
424
- #: config/settings.php:267
425
  msgid "Link Color"
426
  msgstr ""
427
 
428
- #: config/settings.php:272
429
  msgid "Hover Link Color"
430
  msgstr ""
431
 
432
- #: config/settings.php:277
433
  msgid "Visited Link Color"
434
  msgstr ""
435
 
436
- #: config/settings.php:286
437
  msgid "Auto Insert"
438
  msgstr ""
439
 
440
- #: config/settings.php:292
441
  msgid "Auto Insert Table of Contents"
442
  msgstr ""
443
 
444
- #: config/settings.php:316
445
  msgid "Post Types"
446
  msgstr ""
447
 
448
- #: config/settings.php:334
449
  msgid "Processing Headings"
450
  msgstr ""
451
 
452
- #: config/settings.php:339
453
  msgid "Always for Post Types"
454
  msgstr ""
455
 
456
- #: config/settings.php:358
457
- msgid "Hash Format"
458
- msgstr ""
459
-
460
- #: config/settings.php:379
461
  msgid "Skip Headings"
462
  msgstr ""
463
 
464
- #: config/settings.php:382
465
  msgid "By Level"
466
  msgstr ""
467
 
468
- #: config/settings.php:392
469
  msgid "By Text"
470
  msgstr ""
471
 
472
- #: config/settings.php:415
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
473
  msgid "Post Settings"
474
  msgstr ""
475
 
476
- #: config/settings.php:418
477
  msgid "Show Panel \"Table of Contents\" in Post Types"
478
  msgstr ""
479
 
@@ -481,16 +479,19 @@ msgstr ""
481
  msgid "Sorry, you are not allowed to access this page."
482
  msgstr ""
483
 
484
- #: core/validators/BooleanValidator.php:27
485
- msgid "{attribute} must be either \"{true}\" or \"{false}\"."
 
486
  msgstr ""
487
 
488
- #: core/validators/RangeValidator.php:27
489
- msgid "{attribute} is invalid."
 
490
  msgstr ""
491
 
492
- #: core/validators/RequiredValidator.php:16
493
- msgid "{attribute} cannot be blank."
 
494
  msgstr ""
495
 
496
  #: plugin/Plugin.php:124
@@ -513,7 +514,7 @@ msgstr ""
513
  msgid "Roman numbers"
514
  msgstr ""
515
 
516
- #: plugin/Plugin.php:138 plugin/Plugin.php:225 plugin/Plugin.php:353
517
  msgid "None"
518
  msgstr ""
519
 
@@ -613,19 +614,20 @@ msgstr ""
613
  msgid "As heading w/o transliterate (#Example_Heading_Text)"
614
  msgstr ""
615
 
616
- #: plugin/Plugin.php:254
617
- msgid "Counter (#lwptoc1, #lwptoc2, …)"
 
618
  msgstr ""
619
 
620
- #: plugin/Plugin.php:265
621
  msgid "Auto"
622
  msgstr ""
623
 
624
- #: plugin/Plugin.php:266
625
  msgid "Full Width"
626
  msgstr ""
627
 
628
- #: plugin/Plugin.php:429
629
  msgid ""
630
  "Creates a table of contents for your posts/pages. Works automatically or "
631
  "manually (via shortcode, Gutenberg block or widget)."
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: \n"
4
+ "POT-Creation-Date: 2019-07-18 12:04+0300\n"
5
+ "PO-Revision-Date: 2019-07-18 12:06+0300\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
+ "Language: ru_RU\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "X-Generator: Poedit 2.2.3\n"
13
  "X-Poedit-Basepath: ..\n"
14
+ "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
15
+ "%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
16
  "X-Poedit-KeywordsList: __;_;esc_html__\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
  "X-Poedit-SearchPathExcluded-0: plugin/editorBlock/src\n"
32
  msgstr ""
33
 
34
  #: admin/Admin.php:127 admin/forms/CustomizeForm.php:241
35
+ #: admin/widgets/customizeModal/views/modal.php:52 config/settings.php:305
36
  msgid "Position"
37
  msgstr ""
38
 
39
+ #: admin/Admin.php:130 admin/widgets/customizeModal/views/modal.php:75
40
  #: config/settings.php:22
41
+ msgid "Minimal Count of Headings"
42
  msgstr ""
43
 
44
  #: admin/Admin.php:133 admin/forms/CustomizeForm.php:236
45
+ #: admin/widgets/customizeModal/views/modal.php:98 config/settings.php:34
46
  msgid "Depth"
47
  msgstr ""
48
 
49
+ #: admin/Admin.php:136 admin/widgets/customizeModal/views/modal.php:120
50
  #: config/settings.php:43
51
  msgid "Hierarchical View"
52
  msgstr ""
53
 
54
  #: admin/Admin.php:136 admin/Admin.php:148 admin/Admin.php:157
55
+ #: admin/Admin.php:160 admin/Admin.php:202
56
+ #: admin/widgets/customizeModal/views/modal.php:136
57
+ #: admin/widgets/customizeModal/views/modal.php:229
58
+ #: admin/widgets/customizeModal/views/modal.php:292
59
+ #: admin/widgets/customizeModal/views/modal.php:315
60
+ #: admin/widgets/customizeModal/views/modal.php:536
61
  msgid "Enabled"
62
  msgstr ""
63
 
64
  #: admin/Admin.php:136 admin/Admin.php:148 admin/Admin.php:157
65
+ #: admin/Admin.php:160 admin/Admin.php:202
66
+ #: admin/widgets/customizeModal/views/modal.php:136
67
+ #: admin/widgets/customizeModal/views/modal.php:229
68
+ #: admin/widgets/customizeModal/views/modal.php:292
69
+ #: admin/widgets/customizeModal/views/modal.php:315
70
+ #: admin/widgets/customizeModal/views/modal.php:536
71
  msgid "Disabled"
72
  msgstr ""
73
 
74
  #: admin/Admin.php:139 admin/forms/CustomizeForm.php:237
75
+ #: admin/widgets/customizeModal/views/modal.php:143 config/settings.php:54
76
  msgid "Numeration"
77
  msgstr ""
78
 
79
  #: admin/Admin.php:142 admin/forms/CustomizeForm.php:238
80
+ #: admin/widgets/customizeModal/views/modal.php:165 config/settings.php:66
81
  msgid "Numeration Suffix"
82
  msgstr ""
83
 
84
+ #: admin/Admin.php:145 admin/widgets/customizeModal/views/modal.php:187
85
+ #: config/settings.php:89
86
  msgid "Title"
87
  msgstr ""
88
 
89
+ #: admin/Admin.php:148 admin/widgets/customizeModal/views/modal.php:213
90
+ #: config/settings.php:95
91
  msgid "Toggle Show/Hide"
92
  msgstr ""
93
 
94
  #: admin/Admin.php:151 admin/forms/CustomizeForm.php:239
95
+ #: admin/widgets/customizeModal/views/modal.php:236 config/settings.php:107
96
  msgid "Label Show"
97
  msgstr ""
98
 
99
  #: admin/Admin.php:154 admin/forms/CustomizeForm.php:240
100
+ #: admin/widgets/customizeModal/views/modal.php:256 config/settings.php:118
101
  msgid "Label Hide"
102
  msgstr ""
103
 
105
  msgid "Hide Items"
106
  msgstr ""
107
 
108
+ #: admin/Admin.php:160 admin/widgets/customizeModal/views/modal.php:299
109
+ #: config/settings.php:146
110
  msgid "Smooth Scroll"
111
  msgstr ""
112
 
113
+ #: admin/Admin.php:163 admin/widgets/customizeModal/views/modal.php:322
114
  msgid "Smooth Scroll Offset Top"
115
  msgstr ""
116
 
117
+ #: admin/Admin.php:166 admin/widgets/customizeModal/views/modal.php:346
118
+ #: config/settings.php:182
119
  msgid "Width"
120
  msgstr ""
121
 
122
  #: admin/Admin.php:169 admin/forms/CustomizeForm.php:242
123
+ #: admin/widgets/customizeModal/views/modal.php:369 config/settings.php:194
124
  msgid "Float"
125
  msgstr ""
126
 
127
+ #: admin/Admin.php:172 admin/widgets/customizeModal/views/modal.php:391
128
+ #: config/settings.php:203
129
  msgid "Title Font Size"
130
  msgstr ""
131
 
132
  #: admin/Admin.php:175 admin/forms/CustomizeForm.php:243
133
+ #: admin/widgets/customizeModal/views/modal.php:415 config/settings.php:216
134
  msgid "Title Font Weight"
135
  msgstr ""
136
 
137
+ #: admin/Admin.php:178 admin/widgets/customizeModal/views/modal.php:437
138
+ #: config/settings.php:225
139
  msgid "Items Font Size"
140
  msgstr ""
141
 
142
  #: admin/Admin.php:181 admin/forms/CustomizeForm.php:244
143
+ #: admin/widgets/customizeModal/views/modal.php:461 config/settings.php:238
144
  msgid "Color Scheme"
145
  msgstr ""
146
 
147
+ #: admin/Admin.php:199 admin/widgets/customizeModal/views/modal.php:518
148
+ #: config/settings.php:445
149
+ #, php-format
150
+ msgid "Wrap table of contents with %s tag"
151
  msgstr ""
152
 
153
+ #: admin/Admin.php:206 admin/Admin.php:209
154
  msgid "Skip headings"
155
  msgstr ""
156
 
157
  #: admin/controllers/EditorBlockController.php:71
158
  #: admin/controllers/ShortcodeController.php:74
159
+ #: admin/widgets/customizeModal/views/modal.php:596
160
  #: admin/widgets/metabox/views/box.php:33
161
  #: admin/widgets/widget/views/_override.php:18
162
  msgid "empty"
166
  msgid "Hello!"
167
  msgstr ""
168
 
169
+ #: admin/views/rate/notice.php:13
170
  #, php-format
171
+ msgid ""
172
+ "We are very pleased that you by now have been using the %s plugin a few days."
173
  msgstr ""
174
 
175
+ #: admin/views/rate/notice.php:17
176
  msgid "Please rate plugin. It will help us a lot."
177
  msgstr ""
178
 
179
+ #: admin/views/rate/notice.php:20
180
  msgid "Rate the plugin"
181
  msgstr ""
182
 
183
+ #: admin/views/rate/notice.php:27
184
  msgid "Remind later"
185
  msgstr ""
186
 
187
+ #: admin/views/rate/notice.php:33
188
  msgid "I've already rated the plugin"
189
  msgstr ""
190
 
191
+ #: admin/views/rate/notice.php:41
192
  msgid "Thank you very much!"
193
  msgstr ""
194
 
195
+ #: admin/views/settings/index.php:10
196
  #, php-format
197
  msgid "Leave a %s plugin review on WordPress.org"
198
  msgstr ""
199
 
200
+ #: admin/views/settings/index.php:13
201
  msgid "Table of Contents Settings"
202
  msgstr ""
203
 
205
  msgid "from scheme"
206
  msgstr ""
207
 
208
+ #: admin/widgets/customizeModal/views/modal.php:18
209
+ msgid "Click to override default value"
210
+ msgstr ""
211
+
212
+ #: admin/widgets/customizeModal/views/modal.php:27
213
+ #: admin/widgets/customizeModal/views/modal.php:609
214
  msgid "Cancel"
215
  msgstr ""
216
 
217
+ #: admin/widgets/customizeModal/views/modal.php:28
218
  msgid "Customize Table of Contents"
219
  msgstr ""
220
 
221
+ #: admin/widgets/customizeModal/views/modal.php:42 config/settings.php:16
222
  msgid "General"
223
  msgstr ""
224
 
225
+ #: admin/widgets/customizeModal/views/modal.php:43 config/settings.php:176
226
  msgid "Appearance"
227
  msgstr ""
228
 
229
+ #: admin/widgets/customizeModal/views/modal.php:44 config/settings.php:354
230
  msgid "Misc."
231
  msgstr ""
232
 
233
+ #: admin/widgets/customizeModal/views/modal.php:53
234
+ #: admin/widgets/customizeModal/views/modal.php:76
235
+ #: admin/widgets/customizeModal/views/modal.php:99
236
+ #: admin/widgets/customizeModal/views/modal.php:121
237
+ #: admin/widgets/customizeModal/views/modal.php:144
238
+ #: admin/widgets/customizeModal/views/modal.php:166
239
+ #: admin/widgets/customizeModal/views/modal.php:188
240
+ #: admin/widgets/customizeModal/views/modal.php:214
241
+ #: admin/widgets/customizeModal/views/modal.php:237
242
+ #: admin/widgets/customizeModal/views/modal.php:257
243
+ #: admin/widgets/customizeModal/views/modal.php:277
244
+ #: admin/widgets/customizeModal/views/modal.php:300
245
+ #: admin/widgets/customizeModal/views/modal.php:323
246
+ #: admin/widgets/customizeModal/views/modal.php:347
247
+ #: admin/widgets/customizeModal/views/modal.php:370
248
+ #: admin/widgets/customizeModal/views/modal.php:392
249
+ #: admin/widgets/customizeModal/views/modal.php:416
250
+ #: admin/widgets/customizeModal/views/modal.php:438
251
+ #: admin/widgets/customizeModal/views/modal.php:462
252
+ #: admin/widgets/customizeModal/views/modal.php:492
253
+ #: admin/widgets/customizeModal/views/modal.php:521
254
+ #: admin/widgets/customizeModal/views/modal.php:544
255
+ #: admin/widgets/customizeModal/views/modal.php:567
256
  msgid "default"
257
  msgstr ""
258
 
259
+ #: admin/widgets/customizeModal/views/modal.php:88 config/settings.php:30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
  msgid ""
261
+ "If the count of headings in the post is less, then table of contents is not "
262
  "displayed."
263
  msgstr ""
264
 
265
+ #: admin/widgets/customizeModal/views/modal.php:129
266
+ #: admin/widgets/customizeModal/views/modal.php:222
267
+ #: admin/widgets/customizeModal/views/modal.php:285
268
+ #: admin/widgets/customizeModal/views/modal.php:308
269
+ #: admin/widgets/customizeModal/views/modal.php:529 config/settings.php:47
270
+ #: config/settings.php:99 config/settings.php:150 config/settings.php:297
271
  msgid "Enable"
272
  msgstr ""
273
 
274
+ #: admin/widgets/customizeModal/views/modal.php:202
275
  msgid "Without title"
276
  msgstr ""
277
 
278
+ #: admin/widgets/customizeModal/views/modal.php:276 config/settings.php:133
279
  msgid "By default, items of contents will be hidden"
280
  msgstr ""
281
 
282
+ #: admin/widgets/customizeModal/views/modal.php:543
283
  msgid "Skip heading by level"
284
  msgstr ""
285
 
286
+ #: admin/widgets/customizeModal/views/modal.php:566
287
  msgid "Skip heading by text"
288
  msgstr ""
289
 
290
+ #: admin/widgets/customizeModal/views/modal.php:580 config/settings.php:378
291
  msgid ""
292
  "Specify headings (one per line) to be excluded from the table of contents."
293
  msgstr ""
294
 
295
+ #: admin/widgets/customizeModal/views/modal.php:584 config/settings.php:382
296
  #, php-format
297
  msgid "Use an asterisk %s as a wildcard to match any text."
298
  msgstr ""
299
 
300
+ #: admin/widgets/customizeModal/views/modal.php:612
301
  msgid "Save"
302
  msgstr ""
303
 
305
  msgid "Saved!"
306
  msgstr ""
307
 
308
+ #: admin/widgets/fontSizeField/views/widget.php:16 plugin/Plugin.php:306
309
  msgid "Default"
310
  msgstr ""
311
 
312
+ #: admin/widgets/fontSizeField/views/widget.php:17 plugin/Plugin.php:271
313
  msgid "Custom Value"
314
  msgstr ""
315
 
357
  msgid "Enable TOC"
358
  msgstr ""
359
 
360
+ #: config/settings.php:77
361
  #, php-format
362
  msgid "The symbol will be added after numeration. For example, %s"
363
  msgstr ""
364
 
365
+ #: config/settings.php:85
366
  msgid "Header"
367
  msgstr ""
368
 
369
+ #: config/settings.php:91 plugin/Settings.php:100
370
  msgid "Contents"
371
  msgstr ""
372
 
373
+ #: config/settings.php:114 plugin/Settings.php:116
374
  msgid "show"
375
  msgstr ""
376
 
377
+ #: config/settings.php:125 plugin/Settings.php:124
378
  msgid "hide"
379
  msgstr ""
380
 
381
+ #: config/settings.php:142
382
  msgid "Behavior"
383
  msgstr ""
384
 
385
+ #: config/settings.php:158
386
  msgid "Scroll Offset Top"
387
  msgstr ""
388
 
389
+ #: config/settings.php:248
390
  msgid "Override Color Scheme Colors"
391
  msgstr ""
392
 
393
+ #: config/settings.php:253
394
  msgid "Background Color"
395
  msgstr ""
396
 
397
+ #: config/settings.php:258
398
  msgid "Border Color"
399
  msgstr ""
400
 
401
+ #: config/settings.php:263
402
  msgid "Title Color"
403
  msgstr ""
404
 
405
+ #: config/settings.php:268
406
  msgid "Link Color"
407
  msgstr ""
408
 
409
+ #: config/settings.php:273
410
  msgid "Hover Link Color"
411
  msgstr ""
412
 
413
+ #: config/settings.php:278
414
  msgid "Visited Link Color"
415
  msgstr ""
416
 
417
+ #: config/settings.php:287
418
  msgid "Auto Insert"
419
  msgstr ""
420
 
421
+ #: config/settings.php:293
422
  msgid "Auto Insert Table of Contents"
423
  msgstr ""
424
 
425
+ #: config/settings.php:317
426
  msgid "Post Types"
427
  msgstr ""
428
 
429
+ #: config/settings.php:335
430
  msgid "Processing Headings"
431
  msgstr ""
432
 
433
+ #: config/settings.php:340
434
  msgid "Always for Post Types"
435
  msgstr ""
436
 
437
+ #: config/settings.php:357
 
 
 
 
438
  msgid "Skip Headings"
439
  msgstr ""
440
 
441
+ #: config/settings.php:360
442
  msgid "By Level"
443
  msgstr ""
444
 
445
+ #: config/settings.php:370
446
  msgid "By Text"
447
  msgstr ""
448
 
449
+ #: config/settings.php:394
450
+ msgid "Hash"
451
+ msgstr ""
452
+
453
+ #: config/settings.php:398
454
+ msgid "Hash Format"
455
+ msgstr ""
456
+
457
+ #: config/settings.php:411
458
+ msgid "Convert to lowercase"
459
+ msgstr ""
460
+
461
+ #: config/settings.php:424
462
+ #, php-format
463
+ msgid "Replace underscores %1$s with dashes %2$s"
464
+ msgstr ""
465
+
466
+ #: config/settings.php:435
467
+ msgid "SEO"
468
+ msgstr ""
469
+
470
+ #: config/settings.php:455
471
  msgid "Post Settings"
472
  msgstr ""
473
 
474
+ #: config/settings.php:458
475
  msgid "Show Panel \"Table of Contents\" in Post Types"
476
  msgstr ""
477
 
479
  msgid "Sorry, you are not allowed to access this page."
480
  msgstr ""
481
 
482
+ #: core/validators/BooleanValidator.php:29
483
+ #, php-format
484
+ msgid "%1$s must be either \"%2$s\" or \"%3$s\"."
485
  msgstr ""
486
 
487
+ #: core/validators/RangeValidator.php:29
488
+ #, php-format
489
+ msgid "%s is invalid."
490
  msgstr ""
491
 
492
+ #: core/validators/RequiredValidator.php:18
493
+ #, php-format
494
+ msgid "%s cannot be blank."
495
  msgstr ""
496
 
497
  #: plugin/Plugin.php:124
514
  msgid "Roman numbers"
515
  msgstr ""
516
 
517
+ #: plugin/Plugin.php:138 plugin/Plugin.php:225 plugin/Plugin.php:357
518
  msgid "None"
519
  msgstr ""
520
 
614
  msgid "As heading w/o transliterate (#Example_Heading_Text)"
615
  msgstr ""
616
 
617
+ #: plugin/Plugin.php:256
618
+ #, php-format
619
+ msgid "Counter %s"
620
  msgstr ""
621
 
622
+ #: plugin/Plugin.php:269
623
  msgid "Auto"
624
  msgstr ""
625
 
626
+ #: plugin/Plugin.php:270
627
  msgid "Full Width"
628
  msgstr ""
629
 
630
+ #: plugin/Plugin.php:433
631
  msgid ""
632
  "Creates a table of contents for your posts/pages. Works automatically or "
633
  "manually (via shortcode, Gutenberg block or widget)."
luckywp-table-of-contents.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: LuckyWP Table of Contents
4
  Plugin URI: https://theluckywp.com/product/table-of-contents/
5
  Description: Creates a table of contents for your posts/pages. Works automatically or manually (via shortcode, Gutenberg block or widget).
6
- Version: 1.6.1
7
  Author: LuckyWP
8
  Author URI: https://theluckywp.com/
9
  Text Domain: luckywp-table-of-contents
@@ -29,6 +29,6 @@ $lwptocAutoloader->register();
29
  $lwptocAutoloader->addNamespace('luckywp\tableOfContents', __DIR__);
30
 
31
  $config = require(__DIR__ . '/config/plugin.php');
32
- (new \luckywp\tableOfContents\plugin\Plugin($config))->run('1.6.1', __FILE__, 'lwptoc_');
33
 
34
  require_once __DIR__ . '/functions.php';
3
  Plugin Name: LuckyWP Table of Contents
4
  Plugin URI: https://theluckywp.com/product/table-of-contents/
5
  Description: Creates a table of contents for your posts/pages. Works automatically or manually (via shortcode, Gutenberg block or widget).
6
+ Version: 1.7
7
  Author: LuckyWP
8
  Author URI: https://theluckywp.com/
9
  Text Domain: luckywp-table-of-contents
29
  $lwptocAutoloader->addNamespace('luckywp\tableOfContents', __DIR__);
30
 
31
  $config = require(__DIR__ . '/config/plugin.php');
32
+ (new \luckywp\tableOfContents\plugin\Plugin($config))->run('1.7', __FILE__, 'lwptoc_');
33
 
34
  require_once __DIR__ . '/functions.php';
plugin/Plugin.php CHANGED
@@ -251,7 +251,11 @@ class Plugin extends BasePlugin
251
  return [
252
  'asheading' => esc_html__('As heading (#Example_Heading_Text)', 'luckywp-table-of-contents'),
253
  'asheadingwotransliterate' => esc_html__('As heading w/o transliterate (#Example_Heading_Text)', 'luckywp-table-of-contents'),
254
- 'counter' => esc_html__('Counter (#lwptoc1, #lwptoc2, …)', 'luckywp-table-of-contents'),
 
 
 
 
255
  ];
256
  }
257
 
251
  return [
252
  'asheading' => esc_html__('As heading (#Example_Heading_Text)', 'luckywp-table-of-contents'),
253
  'asheadingwotransliterate' => esc_html__('As heading w/o transliterate (#Example_Heading_Text)', 'luckywp-table-of-contents'),
254
+ 'counter' => sprintf(
255
+ /* translators: %s: (#lwptoc1, #lwptoc2, …) */
256
+ esc_html__('Counter %s', 'luckywp-table-of-contents'),
257
+ '(#lwptoc1, #lwptoc2, …)'
258
+ ),
259
  ];
260
  }
261
 
plugin/Settings.php CHANGED
@@ -306,6 +306,22 @@ class Settings extends \luckywp\tableOfContents\core\wp\Settings
306
  return $hashFormat;
307
  }
308
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309
  /**
310
  * @return bool
311
  */
306
  return $hashFormat;
307
  }
308
 
309
+ /**
310
+ * @return bool
311
+ */
312
+ public function getMiscHashConvertToLowercase()
313
+ {
314
+ return (bool)$this->getValue('misc', 'hashConvertToLowercase', false);
315
+ }
316
+
317
+ /**
318
+ * @return bool
319
+ */
320
+ public function getMiscHashReplaceUnderlinesToDashes()
321
+ {
322
+ return (bool)$this->getValue('misc', 'hashReplaceUnderlinesToDashes', false);
323
+ }
324
+
325
  /**
326
  * @return bool
327
  */
plugin/Shortcode.php CHANGED
@@ -117,7 +117,7 @@ class Shortcode extends BaseObject
117
  }
118
 
119
  if ($this->headingsCache === null) {
120
- $dto = new ContentHandlingDto();
121
  $dto->modify = false;
122
 
123
  $this->isTheContentEmulate = true;
@@ -140,10 +140,9 @@ class Shortcode extends BaseObject
140
  return $content;
141
  }
142
 
143
- $dto = new ContentHandlingDto();
144
  $dto->content = $content;
145
  $dto->modify = true;
146
- $dto->hashFormat = Core::$plugin->settings->getMiscHashFormat();
147
 
148
  $shortcodesAttrs = [];
149
  preg_match_all($this->getShortcodeRegex(), $content, $matches);
@@ -195,6 +194,18 @@ class Shortcode extends BaseObject
195
  }, $result->content);
196
  }
197
 
 
 
 
 
 
 
 
 
 
 
 
 
198
  /**
199
  * @param string $content
200
  * @return bool
117
  }
118
 
119
  if ($this->headingsCache === null) {
120
+ $dto = $this->makeContentHandlingDto();
121
  $dto->modify = false;
122
 
123
  $this->isTheContentEmulate = true;
140
  return $content;
141
  }
142
 
143
+ $dto = $this->makeContentHandlingDto();
144
  $dto->content = $content;
145
  $dto->modify = true;
 
146
 
147
  $shortcodesAttrs = [];
148
  preg_match_all($this->getShortcodeRegex(), $content, $matches);
194
  }, $result->content);
195
  }
196
 
197
+ /**
198
+ * @return ContentHandlingDto
199
+ */
200
+ protected function makeContentHandlingDto()
201
+ {
202
+ $dto = new ContentHandlingDto();
203
+ $dto->hashFormat = Core::$plugin->settings->getMiscHashFormat();
204
+ $dto->hashConvertToLowercase = Core::$plugin->settings->getMiscHashConvertToLowercase();
205
+ $dto->hashReplaceUnderlinesToDashes = Core::$plugin->settings->getMiscHashReplaceUnderlinesToDashes();
206
+ return $dto;
207
+ }
208
+
209
  /**
210
  * @param string $content
211
  * @return bool
plugin/contentHandling/ContentHandling.php CHANGED
@@ -23,7 +23,7 @@ class ContentHandling
23
  static::$headingIds = [];
24
  $result->content = preg_replace_callback('#<h([1-6])(.*?)>(.*?)</h\d>#imsu', function ($m) use ($dto, $result, $skipRegex) {
25
  $label = trim(strip_tags($m[3]));
26
- $headingId = static::makeHeadingId($label, $dto->hashFormat);
27
  $headingIndex = (int)$m[1];
28
 
29
  $result->headings[] = [
@@ -57,12 +57,12 @@ class ContentHandling
57
 
58
  /**
59
  * @param string $label
60
- * @param string $hashFormat
61
  * @return string
62
  */
63
- protected static function makeHeadingId($label, $hashFormat)
64
  {
65
- switch ($hashFormat) {
66
  case 'counter':
67
  $id = 'lwptoc' . ++static::$headingIdCounter;
68
  break;
@@ -71,7 +71,7 @@ class ContentHandling
71
  case 'asheadingwotransliterate':
72
  default:
73
  $id = html_entity_decode($label, ENT_QUOTES, get_option('blog_charset'));
74
- if ($hashFormat == 'asheadingwotransliterate') {
75
  $id = htmlentities2($id);
76
  $id = str_replace(['&amp;', '&nbsp;', '#', "\n\r", "\r\n", "\r", "\n"], '_', $id);
77
  } else {
@@ -86,7 +86,16 @@ class ContentHandling
86
  $id = trim($id);
87
  $id = str_replace(' ', '_', $id);
88
  $id = preg_replace('/__+/', '_', $id);
89
- $id = trim($id, '_');
 
 
 
 
 
 
 
 
 
90
  if (!$id) {
91
  $id = 'lwptoc';
92
  }
23
  static::$headingIds = [];
24
  $result->content = preg_replace_callback('#<h([1-6])(.*?)>(.*?)</h\d>#imsu', function ($m) use ($dto, $result, $skipRegex) {
25
  $label = trim(strip_tags($m[3]));
26
+ $headingId = static::makeHeadingId($label, $dto);
27
  $headingIndex = (int)$m[1];
28
 
29
  $result->headings[] = [
57
 
58
  /**
59
  * @param string $label
60
+ * @param ContentHandlingDto $dto
61
  * @return string
62
  */
63
+ protected static function makeHeadingId($label, $dto)
64
  {
65
+ switch ($dto->hashFormat) {
66
  case 'counter':
67
  $id = 'lwptoc' . ++static::$headingIdCounter;
68
  break;
71
  case 'asheadingwotransliterate':
72
  default:
73
  $id = html_entity_decode($label, ENT_QUOTES, get_option('blog_charset'));
74
+ if ($dto->hashFormat == 'asheadingwotransliterate') {
75
  $id = htmlentities2($id);
76
  $id = str_replace(['&amp;', '&nbsp;', '#', "\n\r", "\r\n", "\r", "\n"], '_', $id);
77
  } else {
86
  $id = trim($id);
87
  $id = str_replace(' ', '_', $id);
88
  $id = preg_replace('/__+/', '_', $id);
89
+ $id = trim($id, '-_');
90
+
91
+ if ($dto->hashConvertToLowercase) {
92
+ $id = function_exists('mb_strtolower') ? mb_strtolower($id) : strtolower($id);
93
+ }
94
+
95
+ if ($dto->hashReplaceUnderlinesToDashes) {
96
+ $id = str_replace('_', '-', $id);
97
+ }
98
+
99
  if (!$id) {
100
  $id = 'lwptoc';
101
  }
plugin/contentHandling/ContentHandlingDto.php CHANGED
@@ -29,4 +29,14 @@ class ContentHandlingDto
29
  * @var string
30
  */
31
  public $hashFormat = 'asheading';
 
 
 
 
 
 
 
 
 
 
32
  }
29
  * @var string
30
  */
31
  public $hashFormat = 'asheading';
32
+
33
+ /**
34
+ * @var bool
35
+ */
36
+ public $hashConvertToLowercase = false;
37
+
38
+ /**
39
+ * @var bool
40
+ */
41
+ public $hashReplaceUnderlinesToDashes = false;
42
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://theluckywp.com/product/table-of-contents/
4
  Tags: table of contents, toc, navigation, links, seo
5
  Requires at least: 4.7
6
  Tested up to: 5.2.2
7
- Stable tag: 1.6.1
8
  Requires PHP: 5.6.20
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -139,6 +139,13 @@ For non-English websites it is recommended to enable the `Intl` PHP extension.
139
 
140
  == Changelog ==
141
 
 
 
 
 
 
 
 
142
  = 1.6.1 — 2019-07-14 =
143
  + For hash format added option "As heading w/o transliterate".
144
  + Added hebrew translate, thanks to @cdk-comp and @0enaro.
4
  Tags: table of contents, toc, navigation, links, seo
5
  Requires at least: 4.7
6
  Tested up to: 5.2.2
7
+ Stable tag: 1.7
8
  Requires PHP: 5.6.20
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
139
 
140
  == Changelog ==
141
 
142
+ = 1.7 — 2019-07-18 =
143
+ + Added option "Replace underscores (_) with dashes (-)" for hash.
144
+ + Added option "Convert to lowercase" for hash.
145
+ * Minor changes in strings.
146
+ * Added tips for translators in code.
147
+ * Fixed: in some cases, incorrectly worked skip headings.
148
+
149
  = 1.6.1 — 2019-07-14 =
150
  + For hash format added option "As heading w/o transliterate".
151
  + Added hebrew translate, thanks to @cdk-comp and @0enaro.