Version Description
- New update function (core)
- Added exceptions for which types of files will not trnasliterirovatsya zaglovki (functional)
- Always added the rules of the global localization (core)
Download this release
Release Info
Developer | YurchenkoEV |
Plugin | WP Translitera |
Version | 161011 |
Comparing to | |
See all releases |
Code changes from version 160819 to 161011
- languages/wp_translitera-ru_RU.mo +0 -0
- languages/wp_translitera-ru_RU.po +17 -9
- readme.txt +10 -2
- wp-translitera.php +49 -31
languages/wp_translitera-ru_RU.mo
CHANGED
Binary file
|
languages/wp_translitera-ru_RU.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: wp_translitera\n"
|
4 |
-
"POT-Creation-Date: 2016-
|
5 |
-
"PO-Revision-Date: 2016-
|
6 |
"Last-Translator: Evgenij Yurchenko <evgen@yur4enko.com>\n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: ru_RU\n"
|
@@ -17,34 +17,42 @@ msgstr ""
|
|
17 |
"X-Poedit-KeywordsList: __\n"
|
18 |
"X-Poedit-SearchPath-0: wp-translitera.php\n"
|
19 |
|
20 |
-
#: wp-translitera.php:
|
21 |
msgid "Convert existing"
|
22 |
msgstr "Преобразовать существующие"
|
23 |
|
24 |
-
#: wp-translitera.php:
|
25 |
msgid "Pages and posts"
|
26 |
msgstr "Страницы и посты"
|
27 |
|
28 |
-
#: wp-translitera.php:
|
29 |
msgid "Headings, tags etc..."
|
30 |
msgstr "Рубрики, теги и тд"
|
31 |
|
32 |
-
#: wp-translitera.php:
|
33 |
msgid "Transliterate"
|
34 |
msgstr "Транслитерировать"
|
35 |
|
36 |
-
#: wp-translitera.php:
|
37 |
msgid "Settings"
|
38 |
msgstr "Настройки"
|
39 |
|
40 |
-
#: wp-translitera.php:
|
41 |
msgid "Transliterate names of uploads files"
|
42 |
msgstr "Транслитерировать имена загружаемых файлов"
|
43 |
|
44 |
-
#: wp-translitera.php:
|
45 |
msgid "Transliterate 404 url"
|
46 |
msgstr "Транслитерация 404 ссылок"
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
#: wp-translitera.php:106
|
49 |
msgid "Apply"
|
50 |
msgstr "Применить"
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: wp_translitera\n"
|
4 |
+
"POT-Creation-Date: 2016-10-10 23:56+0300\n"
|
5 |
+
"PO-Revision-Date: 2016-10-10 23:57+0300\n"
|
6 |
"Last-Translator: Evgenij Yurchenko <evgen@yur4enko.com>\n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: ru_RU\n"
|
17 |
"X-Poedit-KeywordsList: __\n"
|
18 |
"X-Poedit-SearchPath-0: wp-translitera.php\n"
|
19 |
|
20 |
+
#: wp-translitera.php:95
|
21 |
msgid "Convert existing"
|
22 |
msgstr "Преобразовать существующие"
|
23 |
|
24 |
+
#: wp-translitera.php:97
|
25 |
msgid "Pages and posts"
|
26 |
msgstr "Страницы и посты"
|
27 |
|
28 |
+
#: wp-translitera.php:98
|
29 |
msgid "Headings, tags etc..."
|
30 |
msgstr "Рубрики, теги и тд"
|
31 |
|
32 |
+
#: wp-translitera.php:99
|
33 |
msgid "Transliterate"
|
34 |
msgstr "Транслитерировать"
|
35 |
|
36 |
+
#: wp-translitera.php:101
|
37 |
msgid "Settings"
|
38 |
msgstr "Настройки"
|
39 |
|
40 |
+
#: wp-translitera.php:103
|
41 |
msgid "Transliterate names of uploads files"
|
42 |
msgstr "Транслитерировать имена загружаемых файлов"
|
43 |
|
44 |
+
#: wp-translitera.php:104
|
45 |
msgid "Transliterate 404 url"
|
46 |
msgstr "Транслитерация 404 ссылок"
|
47 |
|
48 |
+
#: wp-translitera.php:105
|
49 |
+
msgid ""
|
50 |
+
"File extensions, separated by commas , titles that do not need to "
|
51 |
+
"transliterate"
|
52 |
+
msgstr ""
|
53 |
+
"Расширения файлов, разделенные запятой, заголвки которых не нужно "
|
54 |
+
"транслитерировать"
|
55 |
+
|
56 |
#: wp-translitera.php:106
|
57 |
msgid "Apply"
|
58 |
msgstr "Применить"
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Plugin Name ===
|
2 |
Contributors: YurchenkoEV
|
3 |
Donate link: http://yur4enko.com/
|
4 |
-
Tags: translate, rus-to-lat, Seo, tag, record, page, transliterate, transliteration
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.7
|
7 |
-
Stable tag:
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -24,6 +24,11 @@ Automatical from repository or unzip in plugins and activate in ACP.
|
|
24 |
|
25 |
== Changelog ==
|
26 |
|
|
|
|
|
|
|
|
|
|
|
27 |
= 160819 =
|
28 |
* Remove old functions (core)
|
29 |
* Added curent version (db)
|
@@ -61,5 +66,8 @@ Automatical from repository or unzip in plugins and activate in ACP.
|
|
61 |
* Added ACP menu
|
62 |
* Added the ability to rename the old labels
|
63 |
|
|
|
|
|
|
|
64 |
== Upgrade Notice ==
|
65 |
After update deactivate and activate plugin
|
1 |
=== Plugin Name ===
|
2 |
Contributors: YurchenkoEV
|
3 |
Donate link: http://yur4enko.com/
|
4 |
+
Tags: translate, rus-to-lat, cyr-to-lat, Seo, tag, record, page, transliterate, transliteration
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.7
|
7 |
+
Stable tag: 161011
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
24 |
|
25 |
== Changelog ==
|
26 |
|
27 |
+
= 161011 =
|
28 |
+
* New update function (core)
|
29 |
+
* Added exceptions for which types of files will not trnasliterirovatsya zaglovki (functional)
|
30 |
+
* Always added the rules of the global localization (core)
|
31 |
+
|
32 |
= 160819 =
|
33 |
* Remove old functions (core)
|
34 |
* Added curent version (db)
|
66 |
* Added ACP menu
|
67 |
* Added the ability to rename the old labels
|
68 |
|
69 |
+
= 15**** =
|
70 |
+
http://yur4enko.com/moi-proekty/wp-translitera/istorija-izmenenij-wp-translitera-15-versij
|
71 |
+
|
72 |
== Upgrade Notice ==
|
73 |
After update deactivate and activate plugin
|
wp-translitera.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WP Translitera
|
4 |
Plugin URI: http://yur4enko.com/category/moi-proekty/wp-translitera
|
5 |
Description: Plug-in for transliteration permanent permalink records , pages, and tag
|
6 |
-
Version:
|
7 |
Author: Evgen Yurchenko
|
8 |
Text Domain: wp_translitera
|
9 |
Domain Path: /languages/
|
@@ -58,32 +58,24 @@ class wp_translitera {//wp=>3.0 php=>5.2.4
|
|
58 |
'Ш'=>'Sh','ш'=>'sh','Щ'=>'Shch','щ'=>'shch','Ь'=>'','ь'=>'','Ю'=>'Iu',
|
59 |
'ю'=>'iu','Я'=>'Ia','я'=>'ia',"'"=>''
|
60 |
);
|
61 |
-
}
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
return $ret;
|
77 |
}
|
78 |
-
|
79 |
-
//Обработка обновления
|
80 |
-
protected static function do_update($from) {
|
81 |
-
if (empty($from)) {
|
82 |
-
wp_translitera::updset('version', 160819);
|
83 |
-
$from = 160819;
|
84 |
-
}
|
85 |
-
}
|
86 |
-
|
87 |
//Проставляем галочки в чебоксах
|
88 |
protected static function getchebox($name){//wp=>0.0.0 php=>5.2.4
|
89 |
$value = wp_translitera::getset($name);
|
@@ -92,16 +84,27 @@ class wp_translitera {//wp=>3.0 php=>5.2.4
|
|
92 |
|
93 |
//Форма админки
|
94 |
protected static function GetForm() {//wp=>0.0.0 php=>5.2.4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
$ret = '<h2>'.__('Convert existing','wp_translitera').':</h2></br>'
|
96 |
. '<form method=POST> '
|
97 |
. '<input type="checkbox" name="r1" value="1">'.__('Pages and posts','wp_translitera').'</br>'
|
98 |
. '<input type="checkbox" name="r2" value="1">'.__('Headings, tags etc...','wp_translitera').'</br>'
|
99 |
-
. '<input type="submit" value="'.__('Transliterate','wp_translitera').'" name="transliterate"
|
|
|
100 |
. '<p><h2>'.__('Settings','wp_translitera').':</h2></br>'
|
101 |
. '<form method=POST> '
|
102 |
. '<input type="checkbox" name="tranliterate_uploads_file" value="1"'.wp_translitera::getchebox("tranliterate_uploads_file").'>'.__('Transliterate names of uploads files','wp_translitera').'</br>'
|
103 |
. '<input type="checkbox" name="tranliterate_404" value="1"'.wp_translitera::getchebox("tranliterate_404").'>'.__('Transliterate 404 url','wp_translitera').'</br>'
|
104 |
-
. '
|
|
|
|
|
105 |
return $ret;
|
106 |
}
|
107 |
|
@@ -159,6 +162,7 @@ class wp_translitera {//wp=>3.0 php=>5.2.4
|
|
159 |
if (!empty($setupd)){
|
160 |
wp_translitera::updset('tranliterate_uploads_file', filter_input(INPUT_POST,'tranliterate_uploads_file'));
|
161 |
wp_translitera::updset('tranliterate_404', filter_input(INPUT_POST,'tranliterate_404'));
|
|
|
162 |
}
|
163 |
echo wp_translitera::GetForm();
|
164 |
}
|
@@ -166,6 +170,12 @@ class wp_translitera {//wp=>3.0 php=>5.2.4
|
|
166 |
//Вызываемые функции
|
167 |
//Процедура преобразования символов
|
168 |
public static function transliterate($title) {//wp=>0.0.0 php=>5.2.4
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
return strtr($title, wp_translitera::createlocale());
|
170 |
}
|
171 |
|
@@ -181,11 +191,19 @@ class wp_translitera {//wp=>3.0 php=>5.2.4
|
|
181 |
|
182 |
//Обновление системы
|
183 |
public static function needupd($param) {//wp=>3.0 php=>5.2.4
|
184 |
-
$
|
185 |
-
$
|
186 |
|
187 |
-
if ($
|
188 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
}
|
190 |
}
|
191 |
|
3 |
Plugin Name: WP Translitera
|
4 |
Plugin URI: http://yur4enko.com/category/moi-proekty/wp-translitera
|
5 |
Description: Plug-in for transliteration permanent permalink records , pages, and tag
|
6 |
+
Version: 161011
|
7 |
Author: Evgen Yurchenko
|
8 |
Text Domain: wp_translitera
|
9 |
Domain Path: /languages/
|
58 |
'Ш'=>'Sh','ш'=>'sh','Щ'=>'Shch','щ'=>'shch','Ь'=>'','ь'=>'','Ю'=>'Iu',
|
59 |
'ю'=>'iu','Я'=>'Ia','я'=>'ia',"'"=>''
|
60 |
);
|
61 |
+
}
|
62 |
+
//Глобальная локализация
|
63 |
+
$ret = $ret + array(
|
64 |
+
'А'=>'A','а'=>'a','Б'=>'B','б'=>'b','В'=>'V','в'=>'v','Г'=>'G',
|
65 |
+
'г'=>'g','Д'=>'D','д'=>'d','Е'=>'E','е'=>'e','Ё'=>'Jo','ё'=>'jo',
|
66 |
+
'Ж'=>'Zh','ж'=>'zh','З'=>'Z','з'=>'z','И'=>'I','и'=>'i','Й'=>'J',
|
67 |
+
'й'=>'j','К'=>'K','к'=>'k','Л'=>'L','л'=>'l','М'=>'M','м'=>'m',
|
68 |
+
'Н'=>'N','н'=>'n','О'=>'O','о'=>'o','П'=>'P','п'=>'p','Р'=>'R',
|
69 |
+
'р'=>'r','С'=>'S','с'=>'s','Т'=>'T','т'=>'t','У'=>'U','у'=>'u',
|
70 |
+
'Ф'=>'F','ф'=>'f','Х'=>'H','х'=>'h','Ц'=>'C','ц'=>'c','Ч'=>'Ch',
|
71 |
+
'ч'=>'ch','Ш'=>'Sh','ш'=>'sh','Щ'=>'Shh','щ'=>'shh','Ъ'=>'',
|
72 |
+
'ъ'=>'','Ы'=>'Y','ы'=>'y','Ь'=>'','ь'=>'','Э'=>'Je','э'=>'je',
|
73 |
+
'Ю'=>'Ju','ю'=>'ju','Я'=>'Ja','я'=>'ja','Ґ'=>'G','ґ'=>'g','Є'=>'Ie',
|
74 |
+
'є'=>'ie','І'=>'I','і'=>'i','Ї'=>'I','ї'=>'i',"'"=>''
|
75 |
+
);
|
76 |
return $ret;
|
77 |
}
|
78 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
//Проставляем галочки в чебоксах
|
80 |
protected static function getchebox($name){//wp=>0.0.0 php=>5.2.4
|
81 |
$value = wp_translitera::getset($name);
|
84 |
|
85 |
//Форма админки
|
86 |
protected static function GetForm() {//wp=>0.0.0 php=>5.2.4
|
87 |
+
$noparsevar = wp_translitera::getset('fileext');
|
88 |
+
$extforform = '';
|
89 |
+
foreach ($noparsevar as $value) {
|
90 |
+
$extforform = $extforform.$value.',';
|
91 |
+
}
|
92 |
+
if (!empty($extforform)){
|
93 |
+
$extforform = substr($extforform, 0, -1);
|
94 |
+
}
|
95 |
$ret = '<h2>'.__('Convert existing','wp_translitera').':</h2></br>'
|
96 |
. '<form method=POST> '
|
97 |
. '<input type="checkbox" name="r1" value="1">'.__('Pages and posts','wp_translitera').'</br>'
|
98 |
. '<input type="checkbox" name="r2" value="1">'.__('Headings, tags etc...','wp_translitera').'</br>'
|
99 |
+
. '<input type="submit" value="'.__('Transliterate','wp_translitera').'" name="transliterate">'
|
100 |
+
. '</form>'
|
101 |
. '<p><h2>'.__('Settings','wp_translitera').':</h2></br>'
|
102 |
. '<form method=POST> '
|
103 |
. '<input type="checkbox" name="tranliterate_uploads_file" value="1"'.wp_translitera::getchebox("tranliterate_uploads_file").'>'.__('Transliterate names of uploads files','wp_translitera').'</br>'
|
104 |
. '<input type="checkbox" name="tranliterate_404" value="1"'.wp_translitera::getchebox("tranliterate_404").'>'.__('Transliterate 404 url','wp_translitera').'</br>'
|
105 |
+
. __('File extensions, separated by commas , titles that do not need to transliterate','wp_translitera').'<input type="text" size="80" name="typefiles" value="'.$extforform.'"></br>'
|
106 |
+
. '<input type="submit" value="'.__('Apply','wp_translitera').'" name="apply">'
|
107 |
+
. '</form>';
|
108 |
return $ret;
|
109 |
}
|
110 |
|
162 |
if (!empty($setupd)){
|
163 |
wp_translitera::updset('tranliterate_uploads_file', filter_input(INPUT_POST,'tranliterate_uploads_file'));
|
164 |
wp_translitera::updset('tranliterate_404', filter_input(INPUT_POST,'tranliterate_404'));
|
165 |
+
wp_translitera::updset('fileext', explode(',', filter_input(INPUT_POST, 'typefiles')));
|
166 |
}
|
167 |
echo wp_translitera::GetForm();
|
168 |
}
|
170 |
//Вызываемые функции
|
171 |
//Процедура преобразования символов
|
172 |
public static function transliterate($title) {//wp=>0.0.0 php=>5.2.4
|
173 |
+
$type = substr(filter_input(INPUT_POST, 'name'),-3);
|
174 |
+
if (!empty($type)) {
|
175 |
+
if (in_array($type, wp_translitera::getset('fileext'))) {
|
176 |
+
return $title;
|
177 |
+
}
|
178 |
+
}
|
179 |
return strtr($title, wp_translitera::createlocale());
|
180 |
}
|
181 |
|
191 |
|
192 |
//Обновление системы
|
193 |
public static function needupd($param) {//wp=>3.0 php=>5.2.4
|
194 |
+
$from = wp_translitera::getset('version');
|
195 |
+
$startfrom = $from;
|
196 |
|
197 |
+
if (empty($from)) {
|
198 |
+
$from = 160819;
|
199 |
+
}
|
200 |
+
if ($from == 160819) {
|
201 |
+
wp_translitera::updset('fileext', array());
|
202 |
+
$from == 161011;
|
203 |
+
}
|
204 |
+
|
205 |
+
if ($startfrom != $from) {
|
206 |
+
wp_translitera::updset('version', $from);
|
207 |
}
|
208 |
}
|
209 |
|