Version Description
- Added PO file upload feature
- Added download button to file info page
- Fix for extracting plurals also used as singulars
- Updating API keys no longer require editor page reload
- Catching fatal startup errors in loco.php
- Supporting max_php_size=0 to mean no size restriction
- Auto-update detection now checks new site options
- Bumped WordPress version to 5.5.1
Download this release
Release Info
Developer | timwhitlock |
Plugin | Loco Translate |
Version | 2.4.4 |
Comparing to | |
See all releases |
Code changes from version 2.4.3 to 2.4.4
- languages/loco-translate.pot +113 -90
- lib/compiled/gettext.php +4 -4
- lib/data/locales.php +1 -1
- loco.php +49 -16
- pub/css/admin.css +1 -1
- pub/css/editor.css +1 -1
- pub/css/fileinfo.css +1 -1
- pub/css/podiff.css +1 -1
- pub/css/poview.css +1 -1
- pub/css/skins/blue.css +1 -1
- pub/css/skins/coffee.css +1 -1
- pub/css/skins/ectoplasm.css +1 -1
- pub/css/skins/light.css +1 -1
- pub/css/skins/midnight.css +1 -1
- pub/css/skins/modern.css +1 -1
- pub/css/skins/ocean.css +1 -1
- pub/css/skins/sunrise.css +1 -1
- pub/js/min/admin.js +194 -194
- pub/js/min/editor.js +1 -1
- pub/js/min/move.js +1 -1
- pub/js/min/poinit.js +1 -1
- pub/js/min/upload.js +1 -0
- readme.txt +13 -3
- src/admin/bundle/ViewController.php +7 -0
- src/admin/config/DebugController.php +2 -1
- src/admin/file/BaseController.php +0 -2
- src/admin/file/EditController.php +2 -36
- src/admin/file/InfoController.php +12 -3
- src/admin/file/MoveController.php +3 -2
- src/admin/init/BaseController.php +0 -0
- src/admin/init/InitPoController.php +9 -10
- src/admin/init/UploadController.php +88 -0
- src/ajax/ApisController.php +29 -1
- src/ajax/DownloadController.php +7 -9
- src/ajax/FsConnectController.php +20 -4
- src/ajax/SaveController.php +8 -19
- src/ajax/UploadController.php +105 -0
- src/api/Providers.php +34 -2
- src/api/WordPressFileSystem.php +26 -8
- src/compat/Failure.php +1 -1
- src/compat/PosixExtension.php +2 -2
- src/data/Upload.php +25 -6
- src/fs/DummyFile.php +15 -7
- src/fs/File.php +17 -2
- src/fs/Locations.php +1 -0
- src/fs/Revisions.php +22 -21
- src/gettext/Data.php +2 -1
- src/gettext/Extraction.php +9 -7
- src/mvc/AdminRouter.php +3 -2
- src/mvc/HiddenFields.php +21 -1
- src/package/Bundle.php +41 -16
- src/package/Plugin.php +28 -1
- src/package/Project.php +22 -6
- src/package/Theme.php +24 -5
- src/test/WordPressTestCase.php +34 -1
- tpl/admin/config/debug.php +5 -1
- tpl/admin/file/edit-po.php +0 -61
- tpl/admin/file/editor.php +3 -2
- tpl/admin/file/info-po.php +4 -0
- tpl/admin/file/info-pot.php +6 -1
- tpl/admin/file/info.php +1 -1
- tpl/admin/file/move-po.php +1 -1
- tpl/admin/file/move.php +1 -1
- tpl/admin/help/side-bar.php +4 -1
- tpl/admin/init/upload.php +58 -0
- tpl/ajax/modal-apis-batch.php +48 -0
- tpl/ajax/modal-apis-empty.php +24 -0
- tpl/debug/dump.php +5 -3
languages/loco-translate.pot
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
#, fuzzy
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
-
"Project-Id-Version: Loco Translate 2.4.
|
5 |
"Report-Msgid-Bugs-To: \n"
|
6 |
-
"POT-Creation-Date: 2020-
|
7 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
8 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
9 |
"Language-Team: \n"
|
@@ -13,7 +13,7 @@ msgstr ""
|
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
"X-Generator: Loco https://localise.biz/\n"
|
16 |
-
"X-Loco-Version: 2.4.
|
17 |
|
18 |
#: src/fs/FileWriter.php:214
|
19 |
#, php-format
|
@@ -101,7 +101,7 @@ msgid_plural "%s obsolete strings removed"
|
|
101 |
msgstr[0] ""
|
102 |
msgstr[1] ""
|
103 |
|
104 |
-
#: src/admin/init/InitPoController.php:
|
105 |
#, php-format
|
106 |
msgid "1 source file will be scanned for translatable strings"
|
107 |
msgid_plural "%s source files will be scanned for translatable strings"
|
@@ -124,7 +124,7 @@ msgid_plural "%s strings marked Fuzzy"
|
|
124 |
msgstr[0] ""
|
125 |
msgstr[1] ""
|
126 |
|
127 |
-
#: tpl/admin/file/info-pot.php:
|
128 |
#, php-format
|
129 |
msgid "1 word"
|
130 |
msgid_plural "%s words"
|
@@ -151,7 +151,7 @@ msgstr ""
|
|
151 |
msgid "Active theme:"
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: tpl/
|
155 |
msgid "Add automatic translation services in the plugin settings."
|
156 |
msgstr ""
|
157 |
|
@@ -228,7 +228,7 @@ msgid ""
|
|
228 |
"file?"
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: src/admin/init/InitPoController.php:
|
232 |
msgid "Assign template"
|
233 |
msgstr ""
|
234 |
|
@@ -236,7 +236,7 @@ msgstr ""
|
|
236 |
msgid "Author details"
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: tpl/
|
240 |
msgid "Auto-translate this file"
|
241 |
msgstr ""
|
242 |
|
@@ -250,7 +250,7 @@ msgid ""
|
|
250 |
"editor"
|
251 |
msgstr ""
|
252 |
|
253 |
-
#: tpl/admin/file/info-po.php:
|
254 |
msgid "Binary file missing"
|
255 |
msgstr ""
|
256 |
|
@@ -278,7 +278,7 @@ msgstr ""
|
|
278 |
msgid "Bundle setup"
|
279 |
msgstr ""
|
280 |
|
281 |
-
#: src/ajax/FsConnectController.php:
|
282 |
msgid ""
|
283 |
"Changes to this file may be overwritten or deleted when you update WordPress"
|
284 |
msgstr ""
|
@@ -299,7 +299,7 @@ msgstr ""
|
|
299 |
msgid "Choose a language"
|
300 |
msgstr ""
|
301 |
|
302 |
-
#: tpl/admin/init/init-po.php:93
|
303 |
msgid "Choose a location"
|
304 |
msgstr ""
|
305 |
|
@@ -363,7 +363,7 @@ msgstr ""
|
|
363 |
msgid "Connect"
|
364 |
msgstr ""
|
365 |
|
366 |
-
#: src/ajax/FsConnectController.php:
|
367 |
msgid "Connected to remote file system"
|
368 |
msgstr ""
|
369 |
|
@@ -381,8 +381,8 @@ msgstr ""
|
|
381 |
msgid "Core translations ‹ Loco"
|
382 |
msgstr ""
|
383 |
|
384 |
-
#: src/admin/init/InitPoController.php:
|
385 |
-
#: src/admin/bundle/ViewController.php:
|
386 |
msgid "Create template"
|
387 |
msgstr ""
|
388 |
|
@@ -390,7 +390,7 @@ msgstr ""
|
|
390 |
msgid "Create template instead"
|
391 |
msgstr ""
|
392 |
|
393 |
-
#: src/ajax/FsConnectController.php:
|
394 |
msgid "Creating this file requires permission"
|
395 |
msgstr ""
|
396 |
|
@@ -404,7 +404,7 @@ msgstr ""
|
|
404 |
msgid "Debug"
|
405 |
msgstr ""
|
406 |
|
407 |
-
#: src/admin/file/BaseController.php:
|
408 |
#: tpl/admin/bundle/inc-po-table.php:63 tpl/admin/bundle/locale.php:75
|
409 |
msgid "Delete"
|
410 |
msgstr ""
|
@@ -415,7 +415,7 @@ msgstr ""
|
|
415 |
msgid "Delete %s"
|
416 |
msgstr ""
|
417 |
|
418 |
-
#: src/ajax/FsConnectController.php:
|
419 |
msgid "Deleting this file requires permission"
|
420 |
msgstr ""
|
421 |
|
@@ -436,7 +436,7 @@ msgstr ""
|
|
436 |
msgid "Disallow"
|
437 |
msgstr ""
|
438 |
|
439 |
-
#: src/data/Settings.php:171 src/admin/file/EditController.php:
|
440 |
#: src/admin/bundle/LocaleController.php:130 tpl/admin/config/settings.php:177
|
441 |
#: tpl/admin/config/apis.php:122 tpl/admin/config/prefs.php:45
|
442 |
#: tpl/admin/common/inc-fsconn.php:16 tpl/admin/common/inc-fsconn.php:41
|
@@ -464,7 +464,7 @@ msgstr ""
|
|
464 |
msgid "Edit config"
|
465 |
msgstr ""
|
466 |
|
467 |
-
#: src/admin/bundle/ViewController.php:
|
468 |
msgid "Edit template"
|
469 |
msgstr ""
|
470 |
|
@@ -478,7 +478,7 @@ msgstr ""
|
|
478 |
msgid "Editing of POT (template) files"
|
479 |
msgstr ""
|
480 |
|
481 |
-
#: src/admin/file/BaseController.php:
|
482 |
msgid "Editor"
|
483 |
msgstr ""
|
484 |
|
@@ -490,13 +490,13 @@ msgid "%s translation"
|
|
490 |
msgstr ""
|
491 |
|
492 |
#. button for adding a new string when manually editing a POT file
|
493 |
-
#: src/admin/file/EditController.php:
|
494 |
msgctxt "Editor"
|
495 |
msgid "Add"
|
496 |
msgstr ""
|
497 |
|
498 |
#. Button that opens window for auto-translating
|
499 |
-
#: src/admin/file/EditController.php:
|
500 |
msgctxt "Editor"
|
501 |
msgid "Auto"
|
502 |
msgstr ""
|
@@ -520,7 +520,7 @@ msgid "Context not loaded"
|
|
520 |
msgstr ""
|
521 |
|
522 |
#. Button for downloading a PO, MO or POT file
|
523 |
-
#: src/admin/file/EditController.php:
|
524 |
msgctxt "Editor"
|
525 |
msgid "Download"
|
526 |
msgstr ""
|
@@ -532,19 +532,19 @@ msgid "Plural"
|
|
532 |
msgstr ""
|
533 |
|
534 |
#. button for removing a string when manually editing a POT file
|
535 |
-
#: src/admin/file/EditController.php:
|
536 |
msgctxt "Editor"
|
537 |
msgid "Remove"
|
538 |
msgstr ""
|
539 |
|
540 |
#. Button that reloads current screen
|
541 |
-
#: src/admin/file/EditController.php:
|
542 |
msgctxt "Editor"
|
543 |
msgid "Revert"
|
544 |
msgstr ""
|
545 |
|
546 |
#. Button that saves translations to disk
|
547 |
-
#: src/admin/file/EditController.php:
|
548 |
msgctxt "Editor"
|
549 |
msgid "Save"
|
550 |
msgstr ""
|
@@ -557,7 +557,7 @@ msgstr ""
|
|
557 |
|
558 |
#. Label for the window pane holding the original English text
|
559 |
#. List heading showing preview of English text for each item
|
560 |
-
#: src/js/Strings.php:123 tpl/admin/file/info-pot.php:
|
561 |
msgctxt "Editor"
|
562 |
msgid "Source text"
|
563 |
msgstr ""
|
@@ -574,13 +574,13 @@ msgid "Suggest translation"
|
|
574 |
msgstr ""
|
575 |
|
576 |
#. Button that runs in-editor sync/operation
|
577 |
-
#: src/admin/file/EditController.php:
|
578 |
msgctxt "Editor"
|
579 |
msgid "Sync"
|
580 |
msgstr ""
|
581 |
|
582 |
#. Button that toggles between "code" and regular text editing modes
|
583 |
-
#: src/admin/file/EditController.php:
|
584 |
msgctxt "Editor"
|
585 |
msgid "Toggle code view"
|
586 |
msgstr ""
|
@@ -591,7 +591,7 @@ msgid "Toggle Fuzzy"
|
|
591 |
msgstr ""
|
592 |
|
593 |
#. Button that toggles invisible characters
|
594 |
-
#: src/admin/file/EditController.php:
|
595 |
msgctxt "Editor"
|
596 |
msgid "Toggle invisibles"
|
597 |
msgstr ""
|
@@ -670,7 +670,7 @@ msgstr ""
|
|
670 |
msgid "Failed to copy %s to %s"
|
671 |
msgstr ""
|
672 |
|
673 |
-
#: src/
|
674 |
#, php-format
|
675 |
msgid ""
|
676 |
"Failed to create backup file in \"%s\". Check file permissions or disable "
|
@@ -711,7 +711,7 @@ msgid_plural "%u files deleted"
|
|
711 |
msgstr[0] ""
|
712 |
msgstr[1] ""
|
713 |
|
714 |
-
#: src/admin/file/InfoController.php:
|
715 |
msgid "File does not have a valid header"
|
716 |
msgstr ""
|
717 |
|
@@ -719,7 +719,7 @@ msgstr ""
|
|
719 |
msgid "File doesn't exist"
|
720 |
msgstr ""
|
721 |
|
722 |
-
#: src/admin/file/BaseController.php:
|
723 |
#: tpl/admin/bundle/locale.php:43
|
724 |
msgid "File info"
|
725 |
msgstr ""
|
@@ -764,12 +764,12 @@ msgstr ""
|
|
764 |
msgid "File modification is disallowed by your WordPress config"
|
765 |
msgstr ""
|
766 |
|
767 |
-
#: tpl/admin/file/info-mo.php:21 tpl/admin/file/info-pot.php:
|
768 |
-
#: tpl/admin/file/info-po.php:
|
769 |
msgid "File modified"
|
770 |
msgstr ""
|
771 |
|
772 |
-
#: src/admin/file/MoveController.php:
|
773 |
#, php-format
|
774 |
msgid "File moved"
|
775 |
msgid_plural "%u files moved"
|
@@ -788,8 +788,8 @@ msgstr ""
|
|
788 |
msgid "File restored"
|
789 |
msgstr ""
|
790 |
|
791 |
-
#: tpl/admin/file/info-mo.php:18 tpl/admin/file/info-pot.php:
|
792 |
-
#: tpl/admin/file/info-po.php:
|
793 |
msgid "File size"
|
794 |
msgstr ""
|
795 |
|
@@ -813,7 +813,7 @@ msgid ""
|
|
813 |
msgstr ""
|
814 |
|
815 |
#. Placeholder text for text filter above editor
|
816 |
-
#: src/admin/file/EditController.php:
|
817 |
msgid "Filter translations"
|
818 |
msgstr ""
|
819 |
|
@@ -864,8 +864,7 @@ msgstr ""
|
|
864 |
msgid "Grant access to roles"
|
865 |
msgstr ""
|
866 |
|
867 |
-
#: src/
|
868 |
-
#: tpl/admin/file/edit-po.php:65
|
869 |
msgid "Help"
|
870 |
msgstr ""
|
871 |
|
@@ -873,10 +872,6 @@ msgstr ""
|
|
873 |
msgid "Help & support"
|
874 |
msgstr ""
|
875 |
|
876 |
-
#: tpl/admin/help/side-bar.php:12
|
877 |
-
msgid "Help and tutorials"
|
878 |
-
msgstr ""
|
879 |
-
|
880 |
#: src/mvc/AdminRouter.php:42
|
881 |
msgid "Home"
|
882 |
msgstr ""
|
@@ -909,7 +904,7 @@ msgstr ""
|
|
909 |
msgid "Important"
|
910 |
msgstr ""
|
911 |
|
912 |
-
#: tpl/admin/file/info-po.php:
|
913 |
msgid "In sync with template"
|
914 |
msgstr ""
|
915 |
|
@@ -925,12 +920,16 @@ msgstr ""
|
|
925 |
msgid "Info"
|
926 |
msgstr ""
|
927 |
|
928 |
-
#:
|
|
|
|
|
|
|
|
|
929 |
#, php-format
|
930 |
msgid "Initializing new translations in \"%s\""
|
931 |
msgstr ""
|
932 |
|
933 |
-
#: src/admin/init/InitPoController.php:
|
934 |
msgid "Initializing new translations in unknown set"
|
935 |
msgstr ""
|
936 |
|
@@ -964,7 +963,7 @@ msgstr ""
|
|
964 |
msgid "Language"
|
965 |
msgstr ""
|
966 |
|
967 |
-
#: src/admin/file/InfoController.php:
|
968 |
#, php-format
|
969 |
msgid "Language header is \"%s\" but file name contains \"%s\""
|
970 |
msgstr ""
|
@@ -984,7 +983,7 @@ msgstr ""
|
|
984 |
msgid "largest is %s"
|
985 |
msgstr ""
|
986 |
|
987 |
-
#: tpl/admin/file/info-pot.php:
|
988 |
msgid "Last extracted"
|
989 |
msgstr ""
|
990 |
|
@@ -993,7 +992,7 @@ msgstr ""
|
|
993 |
msgid "Last modified"
|
994 |
msgstr ""
|
995 |
|
996 |
-
#: tpl/admin/file/info-mo.php:24 tpl/admin/file/info-po.php:
|
997 |
msgid "Last translation"
|
998 |
msgstr ""
|
999 |
|
@@ -1022,7 +1021,7 @@ msgstr ""
|
|
1022 |
msgid "Loco interrupted by output from %s:%u"
|
1023 |
msgstr ""
|
1024 |
|
1025 |
-
#: loco.php:
|
1026 |
#, php-format
|
1027 |
msgid ""
|
1028 |
"Loco requires the \"%s\" PHP extension. Ask your hosting provider to install "
|
@@ -1063,7 +1062,7 @@ msgstr ""
|
|
1063 |
msgid "Loco, Translation Management"
|
1064 |
msgstr ""
|
1065 |
|
1066 |
-
#: tpl/
|
1067 |
msgid "Mark new translations as Fuzzy"
|
1068 |
msgstr ""
|
1069 |
|
@@ -1082,7 +1081,7 @@ msgstr ""
|
|
1082 |
msgid "Merged from source code"
|
1083 |
msgstr ""
|
1084 |
|
1085 |
-
#: tpl/admin/file/info-po.php:
|
1086 |
msgid "Missing template"
|
1087 |
msgstr ""
|
1088 |
|
@@ -1114,7 +1113,7 @@ msgstr ""
|
|
1114 |
msgid "Move"
|
1115 |
msgstr ""
|
1116 |
|
1117 |
-
#: src/admin/file/MoveController.php:
|
1118 |
#, php-format
|
1119 |
msgid "Move %s"
|
1120 |
msgstr ""
|
@@ -1123,9 +1122,13 @@ msgstr ""
|
|
1123 |
msgid "Move files"
|
1124 |
msgstr ""
|
1125 |
|
|
|
|
|
|
|
|
|
1126 |
#: src/admin/init/InitPoController.php:16
|
1127 |
-
#: src/admin/init/InitPoController.php:
|
1128 |
-
#: src/admin/file/BaseController.php:
|
1129 |
msgid "New language"
|
1130 |
msgstr ""
|
1131 |
|
@@ -1158,7 +1161,7 @@ msgstr ""
|
|
1158 |
msgid "No previous file revisions"
|
1159 |
msgstr ""
|
1160 |
|
1161 |
-
#: tpl/
|
1162 |
msgid "No translation APIs configured"
|
1163 |
msgstr ""
|
1164 |
|
@@ -1230,7 +1233,7 @@ msgid_plural "%s files can't be matched to a known set of strings"
|
|
1230 |
msgstr[0] ""
|
1231 |
msgstr[1] ""
|
1232 |
|
1233 |
-
#: src/admin/file/MoveController.php:
|
1234 |
#, php-format
|
1235 |
msgid "One file could not be moved"
|
1236 |
msgid_plural "%u files could not be moved"
|
@@ -1256,14 +1259,14 @@ msgid_plural "%s strings extracted from source code for \"%s\""
|
|
1256 |
msgstr[0] ""
|
1257 |
msgstr[1] ""
|
1258 |
|
1259 |
-
#: src/admin/init/InitPoController.php:
|
1260 |
#, php-format
|
1261 |
msgid "One string found in %2$s"
|
1262 |
msgid_plural "%s strings found in %s"
|
1263 |
msgstr[0] ""
|
1264 |
msgstr[1] ""
|
1265 |
|
1266 |
-
#: tpl/admin/file/info-po.php:
|
1267 |
msgid "Out of sync with template"
|
1268 |
msgstr ""
|
1269 |
|
@@ -1271,11 +1274,11 @@ msgstr ""
|
|
1271 |
msgid "Overview"
|
1272 |
msgstr ""
|
1273 |
|
1274 |
-
#: tpl/
|
1275 |
msgid "Overwrite existing translations"
|
1276 |
msgstr ""
|
1277 |
|
1278 |
-
#: src/mvc/AdminRouter.php:
|
1279 |
msgid "Page not found"
|
1280 |
msgstr ""
|
1281 |
|
@@ -1368,7 +1371,7 @@ msgid "Zero"
|
|
1368 |
msgstr ""
|
1369 |
|
1370 |
#. Where %s is the name of a template file
|
1371 |
-
#: tpl/admin/file/info-po.php:
|
1372 |
#, php-format
|
1373 |
msgid ""
|
1374 |
"PO file has different source strings to \"%s\". Try running Sync before "
|
@@ -1376,7 +1379,7 @@ msgid ""
|
|
1376 |
msgstr ""
|
1377 |
|
1378 |
#. Where %s is the name of a template file
|
1379 |
-
#: tpl/admin/file/info-po.php:
|
1380 |
#, php-format
|
1381 |
msgid "PO file has the same source strings as \"%s\""
|
1382 |
msgstr ""
|
@@ -1385,15 +1388,15 @@ msgstr ""
|
|
1385 |
msgid "PO file missing"
|
1386 |
msgstr ""
|
1387 |
|
1388 |
-
#: src/ajax/SaveController.php:
|
1389 |
msgid "PO file saved and MO file compiled"
|
1390 |
msgstr ""
|
1391 |
|
1392 |
-
#: src/ajax/SaveController.php:
|
1393 |
msgid "PO file saved, but MO file compilation failed"
|
1394 |
msgstr ""
|
1395 |
|
1396 |
-
#: src/ajax/SaveController.php:
|
1397 |
msgid "POT file saved"
|
1398 |
msgstr ""
|
1399 |
|
@@ -1430,7 +1433,7 @@ msgstr ""
|
|
1430 |
msgid "Relative path from bundle root to the official POT file"
|
1431 |
msgstr ""
|
1432 |
|
1433 |
-
#: src/admin/file/BaseController.php:
|
1434 |
msgid "Relocate"
|
1435 |
msgstr ""
|
1436 |
|
@@ -1438,7 +1441,7 @@ msgstr ""
|
|
1438 |
msgid "Reset config"
|
1439 |
msgstr ""
|
1440 |
|
1441 |
-
#: src/admin/file/BaseController.php:
|
1442 |
msgid "Restore"
|
1443 |
msgstr ""
|
1444 |
|
@@ -1478,7 +1481,7 @@ msgstr ""
|
|
1478 |
msgid "Saving PO/POT files"
|
1479 |
msgstr ""
|
1480 |
|
1481 |
-
#: src/ajax/FsConnectController.php:
|
1482 |
msgid "Saving this file requires permission"
|
1483 |
msgstr ""
|
1484 |
|
@@ -1526,8 +1529,8 @@ msgid "Sets"
|
|
1526 |
msgstr ""
|
1527 |
|
1528 |
#: src/mvc/AdminRouter.php:67 src/mvc/AdminRouter.php:72
|
1529 |
-
#: src/data/Settings.php:170
|
1530 |
-
#:
|
1531 |
#: tpl/admin/common/inc-fsconn.php:43 tpl/admin/errors/no-backups.php:24
|
1532 |
msgid "Settings"
|
1533 |
msgstr ""
|
@@ -1563,11 +1566,11 @@ msgstr ""
|
|
1563 |
msgid "Skip PHP files larger than:"
|
1564 |
msgstr ""
|
1565 |
|
1566 |
-
#: src/admin/init/InitPoController.php:
|
1567 |
msgid "Skip template"
|
1568 |
msgstr ""
|
1569 |
|
1570 |
-
#: src/admin/file/BaseController.php:
|
1571 |
msgid "Source"
|
1572 |
msgstr ""
|
1573 |
|
@@ -1606,12 +1609,16 @@ msgstr ""
|
|
1606 |
msgid "Suggestion"
|
1607 |
msgstr ""
|
1608 |
|
|
|
|
|
|
|
|
|
1609 |
#: src/admin/config/DebugController.php:47
|
1610 |
msgid "System diagnostics"
|
1611 |
msgstr ""
|
1612 |
|
1613 |
#: tpl/admin/file/view-pot.php:9 tpl/admin/file/edit-pot.php:10
|
1614 |
-
#: tpl/admin/file/info-pot.php:
|
1615 |
#: tpl/admin/bundle/conf.php:65
|
1616 |
msgid "Template file"
|
1617 |
msgstr ""
|
@@ -1689,7 +1696,7 @@ msgid ""
|
|
1689 |
"These plugins have recently loaded translation files into the admin area"
|
1690 |
msgstr ""
|
1691 |
|
1692 |
-
#: tpl/admin/file/info-po.php:
|
1693 |
msgid ""
|
1694 |
"These translations are not linked to a POT file. Sync operations will "
|
1695 |
"extract strings directly from source code."
|
@@ -1755,11 +1762,11 @@ msgstr ""
|
|
1755 |
msgid "This directory can't be written to directly by the web server"
|
1756 |
msgstr ""
|
1757 |
|
1758 |
-
#: src/ajax/FsConnectController.php:
|
1759 |
msgid "This directory is managed by WordPress, be careful what you delete"
|
1760 |
msgstr ""
|
1761 |
|
1762 |
-
#: src/ajax/FsConnectController.php:
|
1763 |
msgid ""
|
1764 |
"This directory is managed by WordPress. Removed files may be restored during "
|
1765 |
"updates"
|
@@ -1769,7 +1776,7 @@ msgstr ""
|
|
1769 |
msgid "This file can't be updated directly by the web server"
|
1770 |
msgstr ""
|
1771 |
|
1772 |
-
#: src/ajax/FsConnectController.php:
|
1773 |
msgid "This file may be overwritten or deleted when you update WordPress"
|
1774 |
msgstr ""
|
1775 |
|
@@ -1778,13 +1785,13 @@ msgid "This information is for developers to find problems in the bundle setup"
|
|
1778 |
msgstr ""
|
1779 |
|
1780 |
#. Warning when POT file is opened in the file editor. It can be disabled in settings.
|
1781 |
-
#: src/admin/file/EditController.php:
|
1782 |
msgid ""
|
1783 |
"This is NOT a translation file. Manual editing of source strings is not "
|
1784 |
"recommended."
|
1785 |
msgstr ""
|
1786 |
|
1787 |
-
#: src/ajax/FsConnectController.php:
|
1788 |
msgid "This move operation requires permission"
|
1789 |
msgstr ""
|
1790 |
|
@@ -1822,7 +1829,7 @@ msgid ""
|
|
1822 |
"the file writeable by %s"
|
1823 |
msgstr ""
|
1824 |
|
1825 |
-
#: src/hooks/AdminHooks.php:103 tpl/
|
1826 |
msgid "Translate"
|
1827 |
msgstr ""
|
1828 |
|
@@ -1845,7 +1852,7 @@ msgid_plural "Translation job aborted with %s strings remaining"
|
|
1845 |
msgstr[0] ""
|
1846 |
msgstr[1] ""
|
1847 |
|
1848 |
-
#: tpl/admin/file/info-po.php:
|
1849 |
#: tpl/admin/bundle/locale.php:36
|
1850 |
msgid "Translation progress"
|
1851 |
msgstr ""
|
@@ -1857,12 +1864,12 @@ msgid "Translation progress %s%%"
|
|
1857 |
msgstr ""
|
1858 |
|
1859 |
#. Where %s is the name of the invalid POT file
|
1860 |
-
#: src/ajax/SyncController.php:54 src/admin/file/EditController.php:
|
1861 |
#, php-format
|
1862 |
msgid "Translation template is invalid (%s)"
|
1863 |
msgstr ""
|
1864 |
|
1865 |
-
#: src/admin/file/EditController.php:
|
1866 |
#, php-format
|
1867 |
msgid "Translations don't match template. Run sync to update from %s"
|
1868 |
msgstr ""
|
@@ -1887,7 +1894,7 @@ msgstr ""
|
|
1887 |
msgid "Unexpected file type"
|
1888 |
msgstr ""
|
1889 |
|
1890 |
-
#: src/package/Header.php:77 src/admin/file/InfoController.php:
|
1891 |
msgid "Unknown author"
|
1892 |
msgstr ""
|
1893 |
|
@@ -1900,6 +1907,18 @@ msgstr ""
|
|
1900 |
msgid "Upgrade to %s"
|
1901 |
msgstr ""
|
1902 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1903 |
#: tpl/admin/init/init-po.php:163
|
1904 |
msgid "Use this file as template when running Sync"
|
1905 |
msgstr ""
|
@@ -1943,7 +1962,7 @@ msgstr ""
|
|
1943 |
msgid "View"
|
1944 |
msgstr ""
|
1945 |
|
1946 |
-
#: src/admin/bundle/ViewController.php:
|
1947 |
msgid "View template"
|
1948 |
msgstr ""
|
1949 |
|
@@ -1955,7 +1974,7 @@ msgstr ""
|
|
1955 |
msgid "Warning"
|
1956 |
msgstr ""
|
1957 |
|
1958 |
-
#: tpl/admin/file/info-po.php:
|
1959 |
msgid "We can't find the binary MO file that belongs with these translations"
|
1960 |
msgstr ""
|
1961 |
|
@@ -1973,7 +1992,7 @@ msgstr ""
|
|
1973 |
msgid "Welcome to Loco Translate"
|
1974 |
msgstr ""
|
1975 |
|
1976 |
-
#: src/admin/init/InitPoController.php:
|
1977 |
msgid "What's this?"
|
1978 |
msgstr ""
|
1979 |
|
@@ -2064,3 +2083,7 @@ msgstr ""
|
|
2064 |
#: src/js/Strings.php:79
|
2065 |
msgid "Your changes will be lost if you continue without saving"
|
2066 |
msgstr ""
|
|
|
|
|
|
|
|
1 |
#, fuzzy
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
+
"Project-Id-Version: Loco Translate 2.4.4-dev\n"
|
5 |
"Report-Msgid-Bugs-To: \n"
|
6 |
+
"POT-Creation-Date: 2020-10-26 17:18+0000\n"
|
7 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
8 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
9 |
"Language-Team: \n"
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
"X-Generator: Loco https://localise.biz/\n"
|
16 |
+
"X-Loco-Version: 2.4.4-dev; wp-5.5.1"
|
17 |
|
18 |
#: src/fs/FileWriter.php:214
|
19 |
#, php-format
|
101 |
msgstr[0] ""
|
102 |
msgstr[1] ""
|
103 |
|
104 |
+
#: src/admin/init/InitPoController.php:224
|
105 |
#, php-format
|
106 |
msgid "1 source file will be scanned for translatable strings"
|
107 |
msgid_plural "%s source files will be scanned for translatable strings"
|
124 |
msgstr[0] ""
|
125 |
msgstr[1] ""
|
126 |
|
127 |
+
#: tpl/admin/file/info-pot.php:29
|
128 |
#, php-format
|
129 |
msgid "1 word"
|
130 |
msgid_plural "%s words"
|
151 |
msgid "Active theme:"
|
152 |
msgstr ""
|
153 |
|
154 |
+
#: tpl/ajax/modal-apis-empty.php:11
|
155 |
msgid "Add automatic translation services in the plugin settings."
|
156 |
msgstr ""
|
157 |
|
228 |
"file?"
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: src/admin/init/InitPoController.php:240
|
232 |
msgid "Assign template"
|
233 |
msgstr ""
|
234 |
|
236 |
msgid "Author details"
|
237 |
msgstr ""
|
238 |
|
239 |
+
#: tpl/ajax/modal-apis-batch.php:10
|
240 |
msgid "Auto-translate this file"
|
241 |
msgstr ""
|
242 |
|
250 |
"editor"
|
251 |
msgstr ""
|
252 |
|
253 |
+
#: tpl/admin/file/info-po.php:46
|
254 |
msgid "Binary file missing"
|
255 |
msgstr ""
|
256 |
|
278 |
msgid "Bundle setup"
|
279 |
msgstr ""
|
280 |
|
281 |
+
#: src/ajax/FsConnectController.php:130
|
282 |
msgid ""
|
283 |
"Changes to this file may be overwritten or deleted when you update WordPress"
|
284 |
msgstr ""
|
299 |
msgid "Choose a language"
|
300 |
msgstr ""
|
301 |
|
302 |
+
#: tpl/admin/init/upload.php:15 tpl/admin/init/init-po.php:93
|
303 |
msgid "Choose a location"
|
304 |
msgstr ""
|
305 |
|
363 |
msgid "Connect"
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: src/ajax/FsConnectController.php:117
|
367 |
msgid "Connected to remote file system"
|
368 |
msgstr ""
|
369 |
|
381 |
msgid "Core translations ‹ Loco"
|
382 |
msgstr ""
|
383 |
|
384 |
+
#: src/admin/init/InitPoController.php:215
|
385 |
+
#: src/admin/bundle/ViewController.php:134 tpl/admin/init/init-pot.php:40
|
386 |
msgid "Create template"
|
387 |
msgstr ""
|
388 |
|
390 |
msgid "Create template instead"
|
391 |
msgstr ""
|
392 |
|
393 |
+
#: src/ajax/FsConnectController.php:154
|
394 |
msgid "Creating this file requires permission"
|
395 |
msgstr ""
|
396 |
|
404 |
msgid "Debug"
|
405 |
msgstr ""
|
406 |
|
407 |
+
#: src/admin/file/BaseController.php:108 tpl/admin/file/diff.php:31
|
408 |
#: tpl/admin/bundle/inc-po-table.php:63 tpl/admin/bundle/locale.php:75
|
409 |
msgid "Delete"
|
410 |
msgstr ""
|
415 |
msgid "Delete %s"
|
416 |
msgstr ""
|
417 |
|
418 |
+
#: src/ajax/FsConnectController.php:157
|
419 |
msgid "Deleting this file requires permission"
|
420 |
msgstr ""
|
421 |
|
436 |
msgid "Disallow"
|
437 |
msgstr ""
|
438 |
|
439 |
+
#: src/data/Settings.php:171 src/admin/file/EditController.php:162
|
440 |
#: src/admin/bundle/LocaleController.php:130 tpl/admin/config/settings.php:177
|
441 |
#: tpl/admin/config/apis.php:122 tpl/admin/config/prefs.php:45
|
442 |
#: tpl/admin/common/inc-fsconn.php:16 tpl/admin/common/inc-fsconn.php:41
|
464 |
msgid "Edit config"
|
465 |
msgstr ""
|
466 |
|
467 |
+
#: src/admin/bundle/ViewController.php:126
|
468 |
msgid "Edit template"
|
469 |
msgstr ""
|
470 |
|
478 |
msgid "Editing of POT (template) files"
|
479 |
msgstr ""
|
480 |
|
481 |
+
#: src/admin/file/BaseController.php:103
|
482 |
msgid "Editor"
|
483 |
msgstr ""
|
484 |
|
490 |
msgstr ""
|
491 |
|
492 |
#. button for adding a new string when manually editing a POT file
|
493 |
+
#: src/admin/file/EditController.php:187
|
494 |
msgctxt "Editor"
|
495 |
msgid "Add"
|
496 |
msgstr ""
|
497 |
|
498 |
#. Button that opens window for auto-translating
|
499 |
+
#: src/admin/file/EditController.php:198
|
500 |
msgctxt "Editor"
|
501 |
msgid "Auto"
|
502 |
msgstr ""
|
520 |
msgstr ""
|
521 |
|
522 |
#. Button for downloading a PO, MO or POT file
|
523 |
+
#: src/admin/file/EditController.php:200
|
524 |
msgctxt "Editor"
|
525 |
msgid "Download"
|
526 |
msgstr ""
|
532 |
msgstr ""
|
533 |
|
534 |
#. button for removing a string when manually editing a POT file
|
535 |
+
#: src/admin/file/EditController.php:189
|
536 |
msgctxt "Editor"
|
537 |
msgid "Remove"
|
538 |
msgstr ""
|
539 |
|
540 |
#. Button that reloads current screen
|
541 |
+
#: src/admin/file/EditController.php:196
|
542 |
msgctxt "Editor"
|
543 |
msgid "Revert"
|
544 |
msgstr ""
|
545 |
|
546 |
#. Button that saves translations to disk
|
547 |
+
#: src/admin/file/EditController.php:192
|
548 |
msgctxt "Editor"
|
549 |
msgid "Save"
|
550 |
msgstr ""
|
557 |
|
558 |
#. Label for the window pane holding the original English text
|
559 |
#. List heading showing preview of English text for each item
|
560 |
+
#: src/js/Strings.php:123 tpl/admin/file/info-pot.php:28
|
561 |
msgctxt "Editor"
|
562 |
msgid "Source text"
|
563 |
msgstr ""
|
574 |
msgstr ""
|
575 |
|
576 |
#. Button that runs in-editor sync/operation
|
577 |
+
#: src/admin/file/EditController.php:194
|
578 |
msgctxt "Editor"
|
579 |
msgid "Sync"
|
580 |
msgstr ""
|
581 |
|
582 |
#. Button that toggles between "code" and regular text editing modes
|
583 |
+
#: src/admin/file/EditController.php:206
|
584 |
msgctxt "Editor"
|
585 |
msgid "Toggle code view"
|
586 |
msgstr ""
|
591 |
msgstr ""
|
592 |
|
593 |
#. Button that toggles invisible characters
|
594 |
+
#: src/admin/file/EditController.php:204
|
595 |
msgctxt "Editor"
|
596 |
msgid "Toggle invisibles"
|
597 |
msgstr ""
|
670 |
msgid "Failed to copy %s to %s"
|
671 |
msgstr ""
|
672 |
|
673 |
+
#: src/fs/Revisions.php:221
|
674 |
#, php-format
|
675 |
msgid ""
|
676 |
"Failed to create backup file in \"%s\". Check file permissions or disable "
|
711 |
msgstr[0] ""
|
712 |
msgstr[1] ""
|
713 |
|
714 |
+
#: src/admin/file/InfoController.php:167
|
715 |
msgid "File does not have a valid header"
|
716 |
msgstr ""
|
717 |
|
719 |
msgid "File doesn't exist"
|
720 |
msgstr ""
|
721 |
|
722 |
+
#: src/admin/file/BaseController.php:105 tpl/admin/bundle/inc-po-table.php:22
|
723 |
#: tpl/admin/bundle/locale.php:43
|
724 |
msgid "File info"
|
725 |
msgstr ""
|
764 |
msgid "File modification is disallowed by your WordPress config"
|
765 |
msgstr ""
|
766 |
|
767 |
+
#: tpl/admin/file/info-mo.php:21 tpl/admin/file/info-pot.php:22
|
768 |
+
#: tpl/admin/file/info-po.php:26
|
769 |
msgid "File modified"
|
770 |
msgstr ""
|
771 |
|
772 |
+
#: src/admin/file/MoveController.php:80
|
773 |
#, php-format
|
774 |
msgid "File moved"
|
775 |
msgid_plural "%u files moved"
|
788 |
msgid "File restored"
|
789 |
msgstr ""
|
790 |
|
791 |
+
#: tpl/admin/file/info-mo.php:18 tpl/admin/file/info-pot.php:19
|
792 |
+
#: tpl/admin/file/info-po.php:23
|
793 |
msgid "File size"
|
794 |
msgstr ""
|
795 |
|
813 |
msgstr ""
|
814 |
|
815 |
#. Placeholder text for text filter above editor
|
816 |
+
#: src/admin/file/EditController.php:202
|
817 |
msgid "Filter translations"
|
818 |
msgstr ""
|
819 |
|
864 |
msgid "Grant access to roles"
|
865 |
msgstr ""
|
866 |
|
867 |
+
#: src/ajax/ApisController.php:26 src/admin/file/EditController.php:190
|
|
|
868 |
msgid "Help"
|
869 |
msgstr ""
|
870 |
|
872 |
msgid "Help & support"
|
873 |
msgstr ""
|
874 |
|
|
|
|
|
|
|
|
|
875 |
#: src/mvc/AdminRouter.php:42
|
876 |
msgid "Home"
|
877 |
msgstr ""
|
904 |
msgid "Important"
|
905 |
msgstr ""
|
906 |
|
907 |
+
#: tpl/admin/file/info-po.php:59
|
908 |
msgid "In sync with template"
|
909 |
msgstr ""
|
910 |
|
920 |
msgid "Info"
|
921 |
msgstr ""
|
922 |
|
923 |
+
#: tpl/admin/help/side-bar.php:15
|
924 |
+
msgid "Info and tutorials"
|
925 |
+
msgstr ""
|
926 |
+
|
927 |
+
#: src/admin/init/InitPoController.php:107
|
928 |
#, php-format
|
929 |
msgid "Initializing new translations in \"%s\""
|
930 |
msgstr ""
|
931 |
|
932 |
+
#: src/admin/init/InitPoController.php:111
|
933 |
msgid "Initializing new translations in unknown set"
|
934 |
msgstr ""
|
935 |
|
963 |
msgid "Language"
|
964 |
msgstr ""
|
965 |
|
966 |
+
#: src/admin/file/InfoController.php:174
|
967 |
#, php-format
|
968 |
msgid "Language header is \"%s\" but file name contains \"%s\""
|
969 |
msgstr ""
|
983 |
msgid "largest is %s"
|
984 |
msgstr ""
|
985 |
|
986 |
+
#: tpl/admin/file/info-pot.php:25
|
987 |
msgid "Last extracted"
|
988 |
msgstr ""
|
989 |
|
992 |
msgid "Last modified"
|
993 |
msgstr ""
|
994 |
|
995 |
+
#: tpl/admin/file/info-mo.php:24 tpl/admin/file/info-po.php:29
|
996 |
msgid "Last translation"
|
997 |
msgstr ""
|
998 |
|
1021 |
msgid "Loco interrupted by output from %s:%u"
|
1022 |
msgstr ""
|
1023 |
|
1024 |
+
#: loco.php:140
|
1025 |
#, php-format
|
1026 |
msgid ""
|
1027 |
"Loco requires the \"%s\" PHP extension. Ask your hosting provider to install "
|
1062 |
msgid "Loco, Translation Management"
|
1063 |
msgstr ""
|
1064 |
|
1065 |
+
#: tpl/ajax/modal-apis-batch.php:29
|
1066 |
msgid "Mark new translations as Fuzzy"
|
1067 |
msgstr ""
|
1068 |
|
1081 |
msgid "Merged from source code"
|
1082 |
msgstr ""
|
1083 |
|
1084 |
+
#: tpl/admin/file/info-po.php:83
|
1085 |
msgid "Missing template"
|
1086 |
msgstr ""
|
1087 |
|
1113 |
msgid "Move"
|
1114 |
msgstr ""
|
1115 |
|
1116 |
+
#: src/admin/file/MoveController.php:101 src/admin/file/MoveController.php:128
|
1117 |
#, php-format
|
1118 |
msgid "Move %s"
|
1119 |
msgstr ""
|
1122 |
msgid "Move files"
|
1123 |
msgstr ""
|
1124 |
|
1125 |
+
#: src/ajax/ApisController.php:30
|
1126 |
+
msgid "Need a human?"
|
1127 |
+
msgstr ""
|
1128 |
+
|
1129 |
#: src/admin/init/InitPoController.php:16
|
1130 |
+
#: src/admin/init/InitPoController.php:114
|
1131 |
+
#: src/admin/file/BaseController.php:127 src/admin/bundle/ViewController.php:96
|
1132 |
msgid "New language"
|
1133 |
msgstr ""
|
1134 |
|
1161 |
msgid "No previous file revisions"
|
1162 |
msgstr ""
|
1163 |
|
1164 |
+
#: tpl/ajax/modal-apis-empty.php:9
|
1165 |
msgid "No translation APIs configured"
|
1166 |
msgstr ""
|
1167 |
|
1233 |
msgstr[0] ""
|
1234 |
msgstr[1] ""
|
1235 |
|
1236 |
+
#: src/admin/file/MoveController.php:84
|
1237 |
#, php-format
|
1238 |
msgid "One file could not be moved"
|
1239 |
msgid_plural "%u files could not be moved"
|
1259 |
msgstr[0] ""
|
1260 |
msgstr[1] ""
|
1261 |
|
1262 |
+
#: src/admin/init/InitPoController.php:196
|
1263 |
#, php-format
|
1264 |
msgid "One string found in %2$s"
|
1265 |
msgid_plural "%s strings found in %s"
|
1266 |
msgstr[0] ""
|
1267 |
msgstr[1] ""
|
1268 |
|
1269 |
+
#: tpl/admin/file/info-po.php:70
|
1270 |
msgid "Out of sync with template"
|
1271 |
msgstr ""
|
1272 |
|
1274 |
msgid "Overview"
|
1275 |
msgstr ""
|
1276 |
|
1277 |
+
#: tpl/ajax/modal-apis-batch.php:23
|
1278 |
msgid "Overwrite existing translations"
|
1279 |
msgstr ""
|
1280 |
|
1281 |
+
#: src/mvc/AdminRouter.php:238
|
1282 |
msgid "Page not found"
|
1283 |
msgstr ""
|
1284 |
|
1371 |
msgstr ""
|
1372 |
|
1373 |
#. Where %s is the name of a template file
|
1374 |
+
#: tpl/admin/file/info-po.php:74
|
1375 |
#, php-format
|
1376 |
msgid ""
|
1377 |
"PO file has different source strings to \"%s\". Try running Sync before "
|
1379 |
msgstr ""
|
1380 |
|
1381 |
#. Where %s is the name of a template file
|
1382 |
+
#: tpl/admin/file/info-po.php:63
|
1383 |
#, php-format
|
1384 |
msgid "PO file has the same source strings as \"%s\""
|
1385 |
msgstr ""
|
1388 |
msgid "PO file missing"
|
1389 |
msgstr ""
|
1390 |
|
1391 |
+
#: src/ajax/SaveController.php:96
|
1392 |
msgid "PO file saved and MO file compiled"
|
1393 |
msgstr ""
|
1394 |
|
1395 |
+
#: src/ajax/SaveController.php:100
|
1396 |
msgid "PO file saved, but MO file compilation failed"
|
1397 |
msgstr ""
|
1398 |
|
1399 |
+
#: src/ajax/SaveController.php:107
|
1400 |
msgid "POT file saved"
|
1401 |
msgstr ""
|
1402 |
|
1433 |
msgid "Relative path from bundle root to the official POT file"
|
1434 |
msgstr ""
|
1435 |
|
1436 |
+
#: src/admin/file/BaseController.php:107
|
1437 |
msgid "Relocate"
|
1438 |
msgstr ""
|
1439 |
|
1441 |
msgid "Reset config"
|
1442 |
msgstr ""
|
1443 |
|
1444 |
+
#: src/admin/file/BaseController.php:106 tpl/admin/file/diff.php:30
|
1445 |
msgid "Restore"
|
1446 |
msgstr ""
|
1447 |
|
1481 |
msgid "Saving PO/POT files"
|
1482 |
msgstr ""
|
1483 |
|
1484 |
+
#: src/ajax/FsConnectController.php:163
|
1485 |
msgid "Saving this file requires permission"
|
1486 |
msgstr ""
|
1487 |
|
1529 |
msgstr ""
|
1530 |
|
1531 |
#: src/mvc/AdminRouter.php:67 src/mvc/AdminRouter.php:72
|
1532 |
+
#: src/data/Settings.php:170 tpl/ajax/modal-apis-empty.php:15
|
1533 |
+
#: src/admin/file/EditController.php:161 tpl/admin/common/inc-fsconn.php:18
|
1534 |
#: tpl/admin/common/inc-fsconn.php:43 tpl/admin/errors/no-backups.php:24
|
1535 |
msgid "Settings"
|
1536 |
msgstr ""
|
1566 |
msgid "Skip PHP files larger than:"
|
1567 |
msgstr ""
|
1568 |
|
1569 |
+
#: src/admin/init/InitPoController.php:230
|
1570 |
msgid "Skip template"
|
1571 |
msgstr ""
|
1572 |
|
1573 |
+
#: src/admin/file/BaseController.php:104
|
1574 |
msgid "Source"
|
1575 |
msgstr ""
|
1576 |
|
1609 |
msgid "Suggestion"
|
1610 |
msgstr ""
|
1611 |
|
1612 |
+
#: tpl/admin/help/side-bar.php:12
|
1613 |
+
msgid "Support forum"
|
1614 |
+
msgstr ""
|
1615 |
+
|
1616 |
#: src/admin/config/DebugController.php:47
|
1617 |
msgid "System diagnostics"
|
1618 |
msgstr ""
|
1619 |
|
1620 |
#: tpl/admin/file/view-pot.php:9 tpl/admin/file/edit-pot.php:10
|
1621 |
+
#: tpl/admin/file/info-pot.php:16 tpl/admin/bundle/inc-po-table.php:42
|
1622 |
#: tpl/admin/bundle/conf.php:65
|
1623 |
msgid "Template file"
|
1624 |
msgstr ""
|
1696 |
"These plugins have recently loaded translation files into the admin area"
|
1697 |
msgstr ""
|
1698 |
|
1699 |
+
#: tpl/admin/file/info-po.php:87
|
1700 |
msgid ""
|
1701 |
"These translations are not linked to a POT file. Sync operations will "
|
1702 |
"extract strings directly from source code."
|
1762 |
msgid "This directory can't be written to directly by the web server"
|
1763 |
msgstr ""
|
1764 |
|
1765 |
+
#: src/ajax/FsConnectController.php:124
|
1766 |
msgid "This directory is managed by WordPress, be careful what you delete"
|
1767 |
msgstr ""
|
1768 |
|
1769 |
+
#: src/ajax/FsConnectController.php:127
|
1770 |
msgid ""
|
1771 |
"This directory is managed by WordPress. Removed files may be restored during "
|
1772 |
"updates"
|
1776 |
msgid "This file can't be updated directly by the web server"
|
1777 |
msgstr ""
|
1778 |
|
1779 |
+
#: src/ajax/FsConnectController.php:121
|
1780 |
msgid "This file may be overwritten or deleted when you update WordPress"
|
1781 |
msgstr ""
|
1782 |
|
1785 |
msgstr ""
|
1786 |
|
1787 |
#. Warning when POT file is opened in the file editor. It can be disabled in settings.
|
1788 |
+
#: src/admin/file/EditController.php:160
|
1789 |
msgid ""
|
1790 |
"This is NOT a translation file. Manual editing of source strings is not "
|
1791 |
"recommended."
|
1792 |
msgstr ""
|
1793 |
|
1794 |
+
#: src/ajax/FsConnectController.php:160
|
1795 |
msgid "This move operation requires permission"
|
1796 |
msgstr ""
|
1797 |
|
1829 |
"the file writeable by %s"
|
1830 |
msgstr ""
|
1831 |
|
1832 |
+
#: src/hooks/AdminHooks.php:103 tpl/ajax/modal-apis-batch.php:37
|
1833 |
msgid "Translate"
|
1834 |
msgstr ""
|
1835 |
|
1852 |
msgstr[0] ""
|
1853 |
msgstr[1] ""
|
1854 |
|
1855 |
+
#: tpl/admin/file/info-po.php:32 tpl/admin/bundle/inc-po-table.php:16
|
1856 |
#: tpl/admin/bundle/locale.php:36
|
1857 |
msgid "Translation progress"
|
1858 |
msgstr ""
|
1864 |
msgstr ""
|
1865 |
|
1866 |
#. Where %s is the name of the invalid POT file
|
1867 |
+
#: src/ajax/SyncController.php:54 src/admin/file/EditController.php:122
|
1868 |
#, php-format
|
1869 |
msgid "Translation template is invalid (%s)"
|
1870 |
msgstr ""
|
1871 |
|
1872 |
+
#: src/admin/file/EditController.php:117
|
1873 |
#, php-format
|
1874 |
msgid "Translations don't match template. Run sync to update from %s"
|
1875 |
msgstr ""
|
1894 |
msgid "Unexpected file type"
|
1895 |
msgstr ""
|
1896 |
|
1897 |
+
#: src/package/Header.php:77 src/admin/file/InfoController.php:136
|
1898 |
msgid "Unknown author"
|
1899 |
msgstr ""
|
1900 |
|
1907 |
msgid "Upgrade to %s"
|
1908 |
msgstr ""
|
1909 |
|
1910 |
+
#: src/admin/init/UploadController.php:29 tpl/admin/init/upload.php:54
|
1911 |
+
msgid "Upload"
|
1912 |
+
msgstr ""
|
1913 |
+
|
1914 |
+
#: src/admin/init/UploadController.php:52
|
1915 |
+
msgid "Upload a translation file"
|
1916 |
+
msgstr ""
|
1917 |
+
|
1918 |
+
#: src/admin/bundle/ViewController.php:103
|
1919 |
+
msgid "Upload PO"
|
1920 |
+
msgstr ""
|
1921 |
+
|
1922 |
#: tpl/admin/init/init-po.php:163
|
1923 |
msgid "Use this file as template when running Sync"
|
1924 |
msgstr ""
|
1962 |
msgid "View"
|
1963 |
msgstr ""
|
1964 |
|
1965 |
+
#: src/admin/bundle/ViewController.php:115
|
1966 |
msgid "View template"
|
1967 |
msgstr ""
|
1968 |
|
1974 |
msgid "Warning"
|
1975 |
msgstr ""
|
1976 |
|
1977 |
+
#: tpl/admin/file/info-po.php:49
|
1978 |
msgid "We can't find the binary MO file that belongs with these translations"
|
1979 |
msgstr ""
|
1980 |
|
1992 |
msgid "Welcome to Loco Translate"
|
1993 |
msgstr ""
|
1994 |
|
1995 |
+
#: src/admin/init/InitPoController.php:315 tpl/admin/file/info.php:113
|
1996 |
msgid "What's this?"
|
1997 |
msgstr ""
|
1998 |
|
2083 |
#: src/js/Strings.php:79
|
2084 |
msgid "Your changes will be lost if you continue without saving"
|
2085 |
msgstr ""
|
2086 |
+
|
2087 |
+
#: src/ajax/UploadController.php:72
|
2088 |
+
msgid "Your file is identical to the existing one"
|
2089 |
+
msgstr ""
|
lib/compiled/gettext.php
CHANGED
@@ -15,9 +15,9 @@ class LocoMoParser extends LocoGettextParser { private $bin; private $be; privat
|
|
15 |
abstract class LocoPo { public static function pair( $key, $text, $width = 79, $eol = "\n", $esc = '\\n' ){ if( '' === $text ){ return $key.' ""'; } $text = addcslashes( $text, "\t\x0B\x0C\x07\x08\\\"" ); if( $esc ) { $text = preg_replace('/(?:\\r\\n?|\\n)/', $esc.$eol, $text, -1, $nbr ); } else { $eol = "\n"; $text = preg_replace_callback('/(?:\\r\\n?|\\n)/',array(__CLASS__,'replace_br'), $text, -1, $nbr ); } if( $nbr ){ } else if( $width && $width < mb_strlen($text,'UTF-8') + strlen($key) + 3 ){ } else { return $key.' "'.$text.'"'; } $lines = array( $key.' "' ); if( $width ){ $width -= 2; $a = '/^.{0,'.($width-1).'}[-– \\.,:;\\?!\\)\\]\\}\\>]/u'; $b = '/^[^-– \\.,:;\\?!\\)\\]\\}\\>]+/u'; foreach( explode($eol,$text) as $unwrapped ){ $length = mb_strlen( $unwrapped, 'UTF-8' ); while( $length > $width ){ if( preg_match( $a, $unwrapped, $r ) ){ $line = $r[0]; } else if( preg_match( $b, $unwrapped, $r ) ){ $line = $r[0]; } else { throw new Exception('Wrapping error'); } $lines[] = $line; $trunc = mb_strlen($line,'UTF-8'); $length -= $trunc; $unwrapped = (string) substr( $unwrapped, strlen($line) ); if( ( '' === $unwrapped && 0 !== $length ) || ( 0 === $length && '' !== $unwrapped ) ){ throw new Exception('Truncation error'); } } if( 0 !== $length ){ $lines[] = $unwrapped; } } } else { foreach( explode($eol,$text) as $unwrapped ){ $lines[] = $unwrapped; } } return implode('"'.$eol.'"',$lines).'"'; } private static function replace_br( array $r ){ return addcslashes($r[0],"\r\n")."\n"; } public static function refs( $text, $width = 76, $eol = "\n" ){ $text = preg_replace('/\\s+/u', ' ', $text ); if( $width ){ $text = wordwrap( $text, $width, $eol.'#: ', false ); } return '#: '.$text; } public static function prefix( $text, $prefix, $eol = "\n" ){ $lines = preg_split('/\\R/u', $text, -1 ); return $prefix.implode( $eol.$prefix, $lines ); } }
|
16 |
class LocoPoIndex extends ArrayIterator { public function compare( LocoPoMessage $a, LocoPoMessage $b ){ $h = $a->getHash(); if( ! isset($this[$h]) ){ return 1; } $j = $b->getHash(); if( ! isset($this[$j]) ){ return -1; } return $this[$h] > $this[$j] ? 1 : -1; } }
|
17 |
class LocoPoMessage extends ArrayObject { public function __construct( array $r ){ $r['key'] = $r['source']; parent::__construct($r); } public function __get( $prop ){ return isset($this[$prop]) ? $this[$prop] : null; } private function _getFlags(){ $flags = array(); $plurals = $this->__get('plurals'); if( 4 === $this->__get('flag') ){ $flags[] = 'fuzzy'; } else if( $plurals ){ foreach( $plurals as $child ){ if( 4 === $child->__get('flag') ){ $flags[] = 'fuzzy'; break; } } } if( $f = $this->__get('format') ){ $flags[] = $f.'-format'; } else if( isset($plurals[0]) && ( $f = $plurals[0]->format ) ){ $flags[] = $f.'-format'; } return $flags; } public function getHash(){ $hash = $this->getKey(); if( isset($this['plurals']) ){ foreach( $this['plurals'] as $p ){ $hash .= "\0".$p->getHash(); break; } } return $hash; } public function getKey(){ $msgid = (string) $this['source']; $msgctxt = (string) $this->__get('context'); if( '' !== $msgctxt ){ if( '' === $msgid ){ $msgid = '('.$msgctxt.')'; } $msgid = $msgctxt."\4".$msgid; } return $msgid; } public function __toString(){ return $this->render( 79, 76 ); } public function render( $width, $ref_width ){ $s = array(); try { if( $text = $this->__get('comment') ) { $s[] = LocoPo::prefix( $text, '# '); } if( $text = $this->__get('notes') ) { $s[] = LocoPo::prefix( $text, '#. '); } if( $text = $this->__get('refs') ){ $s[] = LocoPo::refs( $text, $ref_width ); } if( $texts = $this->_getFlags() ){ $s[] = '#, '.implode(', ',$texts); } $plurals = $this->__get('plurals'); $prev = $this->__get('prev'); if( is_array($prev) && $prev ){ foreach( new LocoPoIterator($prev) as $p ){ $text = $p->render( max(0,$width-3), 0 ); $text = preg_replace('/^msg[_a-z]+(\\[\\d+])? ""\\n/m','',$text); $s[] = LocoPo::prefix( rtrim($text,"\n"),'#| '); break; } } $text = $this->__get('context'); if( is_string($text) && '' !== $text ){ $s[] = LocoPo::pair('msgctxt', $text, $width ); } $s[] = LocoPo::pair( 'msgid', $this['key'], $width ); $target = $this['target']; if( is_array($plurals) ){ if( $plurals ){ foreach( $plurals as $i => $p ){ if( 0 === $i ){ $s[] = LocoPo::pair('msgid_plural', $p['key'], $width ); $s[] = LocoPo::pair('msgstr[0]', $target, $width ); } $s[] = LocoPo::pair('msgstr['.(++$i).']', $p['target'], $width ); } } else if( isset($this['plural_key']) ){ $s[] = LocoPo::pair('msgid_plural', $this['plural_key'], $width ); $s[] = LocoPo::pair('msgstr[0]', $target, $width ); } else { trigger_error('Missing plural_key in zero plural export'); $s[] = LocoPo::pair('msgstr', $target, $width ); } } else { $s[] = LocoPo::pair('msgstr', $target, $width ); } } catch( Exception $e ){ trigger_error( $e->getMessage(), E_USER_WARNING ); } return implode("\n",$s)."\n"; } }
|
18 |
-
class LocoPoIterator implements Iterator, Countable { private $po; private $headers; private $i; private $t; private $j; private $z; private $w = 79; public function __construct( $po ){ $this->po = $po; $this->t = count( $po ); if( ! isset($po[0]) ){ throw new InvalidArgumentException('Empty PO data'); } $h = $po[0]; if( '' === $h['source'] && empty($h['context']) ){ $this->z = 0; } else { $this->z = -1; } } public function count(){ return $this->t - ( $this->z + 1 ); } public function at( $index ){ return $this->po[ $this->z + $index ]; } public function wrap( $width ){ $width = (int) $width; if( $width > 0 ){ $this->w = max( 15, $width ); } else { $this->w = 0; } return $this; } public function rewind(){ $this->i = $this->z; $this->j = -1; $this->next(); } public function key(){ return $this->j; } public function valid(){ return is_int($this->i); } public function next(){ $i = $this->i; while( ++$i < $this->t ){ $this->j++; $this->i = $i; return; } $this->i = null; $this->j = null; } public function current(){ $i = $this->i; $po = $this->po; $parent = new LocoPoMessage( $po[$i] ); $plurals = array(); while( isset($po[
|
19 |
class LocoMoTable { private $size = 0; private $bin = ''; private $map; public function __construct( $data = null ){ if( is_array($data) ){ $this->compile( $data ); } else if( $data ){ $this->parse( $data ); } } public function count(){ if( ! isset($this->size) ){ if( $this->bin ){ $this->size = (int) ( strlen( $this->bin ) / 4 ); } else if( is_array($this->map) ){ $this->size = count($this->map); } else { return 0; } if( ! self::is_prime($this->size) || $this->size < 3 ){ throw new Exception('Size expected to be prime number above 2, got '.$this->size); } } return $this->size; } public function bytes(){ return $this->count() * 4; } public function __toString(){ return $this->bin; } public function export(){ if( ! is_array($this->map) ){ $this->parse( $this->bin ); } return $this->map; } private function reset( $length ){ $this->size = max( 3, self::next_prime ( $length * 4 / 3 ) ); $this->bin = null; $this->map = array(); return $this->size; } public function compile( array $msgids ){ $hash_tab_size = $this->reset( count($msgids) ); $packed = array_fill( 0, $hash_tab_size, "\0\0\0\0" ); $j = 0; foreach( $msgids as $msgid ){ $hash_val = self::hashpjw( $msgid ); $idx = $hash_val % $hash_tab_size; if( array_key_exists($idx, $this->map) ){ $incr = 1 + ( $hash_val % ( $hash_tab_size - 2 ) ); do { $idx += $incr; if( $hash_val === $idx ){ throw new Exception('Unable to find empty slot in hash table'); } $idx %= $hash_tab_size; } while( array_key_exists($idx, $this->map ) ); } $this->map[$idx] = $j; $packed[$idx] = pack('V', ++$j ); } return $this->bin = implode('',$packed); } public function lookup( $msgid, array $msgids ){ $hash_val = self::hashpjw( $msgid ); $idx = $hash_val % $this->size; $incr = 1 + ( $hash_val % ( $this->size - 2 ) ); while( true ){ if( ! array_key_exists($idx, $this->map) ){ break; } $j = $this->map[$idx]; if( isset($msgids[$j]) && $msgid === $msgids[$j] ){ return $j; } $idx += $incr; if( $idx === $hash_val ){ break; } $idx %= $this->size; } return -1; } public function parse( $bin ){ $this->bin = (string) $bin; $this->size = null; $hash_tab_size = $this->count(); $this->map = array(); $idx = -1; $byte = 0; while( ++$idx < $hash_tab_size ){ $word = substr( $this->bin, $byte, 4 ); if( "\0\0\0\0" !== $word ){ list(,$j) = unpack('V', $word ); $this->map[$idx] = $j - 1; } $byte += 4; } return $this->map; } public static function hashpjw( $str ){ $i = -1; $hval = 0; $len = strlen($str); while( ++$i < $len ){ $ord = ord( substr($str,$i,1) ); $hval = ( $hval << 4 ) + $ord; $g = $hval & 0xf0000000; if( $g !== 0 ){ $hval ^= $g >> 24; $hval ^= $g; } } return $hval; } private static function next_prime( $seed ){ $seed |= 1; while ( ! self::is_prime($seed) ){ $seed += 2; } return $seed; } private static function is_prime( $num ) { if ($num === 1 ){ return false; } if( $num === 2 ){ return true; } if( $num % 2 == 0 ) { return false; } for( $i = 3; $i <= ceil(sqrt($num)); $i = $i + 2) { if($num % $i == 0 ){ return false; } } return true; } }
|
20 |
-
class LocoMo { private $bin; private $msgs; private $head; private $hash; private $use_fuzzy = false; private $cs; public function __construct( Iterator $export, LocoPoHeaders $head = null ){ if( $head ){ $this->head = $head; } else { $this->head = new LocoPoHeaders(
|
21 |
interface LocoTokensInterface extends Iterator { public function advance(); public function ignore( array $a ); }
|
22 |
class LocoTokenizer implements LocoTokensInterface { const T_LITERAL = 0; const T_UNKNOWN = -1; private $src; private $pos; private $line; private $col; private $max; private $rules = array(); private $skip = array(); private $tok; private $len; public function __construct( $src = '' ){ $this->init($src); } public function parse( $src ){ $tokens = array(); $this->init($src); while( $tok = $this->advance() ){ $tokens[] = $tok; } return $tokens; } public function init( $src ){ $this->src = $src; $this->rewind(); return $this; } public function define( $grep, $t = 0 ){ if('^' !== $grep[1] ){ throw new InvalidArgumentException('Expression '.$grep.' isn\'t anchored'); } if( ! is_int($t) && ! is_callable($t) ){ throw new InvalidArgumentException('Non-integer token must be valid callback'); } $sniff = $grep[2]; if( $sniff === preg_quote($sniff,$grep[0]) ){ $this->rules[$sniff][] = array( $grep, $t ); } else { $this->rules[''][] = array( $grep, $t ); } return $this; } public function ignore( array $a ){ foreach( $a as $t ){ $this->skip[$t] = true; } return $this; } public function current(){ return $this->tok; } public function advance(){ $tok = $this->current(); $this->next(); return $tok; } public function next(){ $tok = null; $offset = $this->pos; $column = $this->col; $line = $this->line; while( $offset <= $this->max ){ $t = null; $s = ''; $text = substr($this->src,$offset); foreach( array($text[0],'') as $k ){ if( isset($this->rules[$k]) ) { foreach( $this->rules[$k] as $rule) { if( preg_match($rule[0], $text, $match ) ) { $s = $match[0]; $t = $rule[1]; if( ! is_int($t) ) { $t = call_user_func( $t, $s, $match ); } break 2; } } } } if( is_null($t) ){ $n = preg_match('/^./u',$text,$match); if( false === $n ){ $s = $text[0]; $match = array( mb_convert_encoding($s,'UTF-8','cp1252') ); } $s = (string) $match[0]; $t = self::T_UNKNOWN; } $length = strlen($s); if( 0 === $length ){ throw new Loco_error_ParseException('Failed to match anything'); } $offset += $length; $lines = preg_split('/\\r?\\n/',$s); $nlines = count($lines); if( $nlines > 1 ){ $next_line = $line + ( $nlines - 1 ); $next_column = strlen( end($lines) ); } else { $next_line = $line; $next_column = $column + $length; } if( array_key_exists($t,$this->skip) ){ $line = $next_line; $column = $next_column; continue; } $tok = self::T_LITERAL === $t ? $s : array( $t, $s, $line, $column ); $line = $next_line; $column = $next_column; $this->len++; break; } $this->tok = $tok; $this->pos = $offset; $this->col = $column; $this->line = $line; } public function key(){ return $this->len ? $this->len-1 : null; } public function valid(){ return null !== $this->tok; } public function rewind(){ $this->len = 0; $this->pos = 0; $this->col = 0; $this->line = 1; $this->max = strlen($this->src) - 1; $this->next(); } }
|
23 |
function loco_utf8_chr( $u ){ if( $u < 0x80 ){ if( $u < 0 ){ throw new RangeException( sprintf('%d is out of Unicode range', $u ) ); } return chr($u); } if( $u < 0x800 ) { return chr( ($u>>6) & 0x1F | 0xC0 ).chr( $u & 0x3F | 0x80 ); } if( $u < 0x10000 ) { return chr( $u>>12 & 15 | 0xE0 ).chr( $u>>6 & 0x3F | 0x80 ).chr( $u & 0x3F | 0x80 ); } if( $u < 0x110000 ) { return chr( $u>>18 & 7 | 0xF0 ).chr( $u>>12 & 0x3F | 0x80 ).chr( $u>>6 & 0x3F | 0x80 ).chr( $u & 0x3F | 0x80 ); } throw new RangeException( sprintf('\\x%X is out of Unicode range', $u ) ); }
|
@@ -25,7 +25,7 @@ function loco_resolve_surrogates( $s ){ return preg_replace_callback('/\\xED([\
|
|
25 |
function _loco_resolve_surrogates( array $r ){ return loco_utf8_chr ( ( ( ( ( 832 | ( ord($r[1]) & 0x3F ) ) << 6 ) | ( ord($r[2]) & 0x3F ) ) - 0xD800 ) * 0x400 + ( ( ( ( 832 | ( ord($r[3]) & 0x3F ) ) << 6 ) | ( ord($r[4]) & 0x3F ) ) - 0xDC00 ) + 0x10000 ); }
|
26 |
class LocoEscapeParser { private $map; private $grep; public function __construct( array $map = array() ){ $this->map = $map; $rules = array('\\\\'); if( $map ){ $rules[] = '['.implode(array_keys($map)).']'; } if( ! isset($map['U']) ) { $rules[] = 'U[0-9A-Fa-f]{5,8}'; } if( ! isset($map['u']) ) { $rules[] = 'u(?:\\{[0-9A-Fa-f]+\\}|[0-9A-Fa-f]{1,4})(?:\\\\u(?:\\{[0-9A-Fa-f]+\\}|[0-9A-Fa-f]{1,4}))*'; } $this->grep = '/\\\\('.implode('|',$rules).')/'; } public function unescape( $s ){ if( '' !== $s ) { return $this->stripSlashes( preg_replace_callback($this->grep, array($this, 'unescapeMatch'), $s) ); } return ''; } public function unescapeMatch( array $r ){ $s = $r[0]; $c = $s[1]; if( isset($this->map[$c]) ){ return $this->map[$c]; } if( 'u' === $c ){ $str = ''; $surrogates = false; foreach( explode('\\u',$s) as $i => $h ){ if( '' !== $h ){ $h = ltrim( trim($h,'{}'),'0'); $u = intval($h,16); $str.= loco_utf8_chr($u); if( ! $surrogates ){ $surrogates = $u >= 0xD800 && $u <= 0xDBFF; } } } if( $surrogates ){ $str = loco_resolve_surrogates($str); } return $str; } if( 'U' === $c ){ return loco_utf8_chr( intval(substr($s,2),16) ); } if( 'x' === $c ){ return chr( intval(substr($s,2),16) ); } if( ctype_digit($c) ){ return chr( intval(substr($s,1),8) ); } return $s; } protected function stripSlashes( $s ){ return stripcslashes($s); } }
|
27 |
class LocoJsTokens extends LocoTokenizer { const T_KWORD = 1; const T_REGEX = 2; private static $lex; protected static $words = array( 'true' => 1, 'false' => 1, 'null' => 1, 'break' => T_BREAK, 'else' => T_ELSE, 'new' => T_NEW, 'var' => 1, 'case' => T_CASE, 'finally' => T_FINALLY, 'return' => T_RETURN, 'void' => 1, 'catch' => T_CATCH, 'for' => T_FOR, 'switch' => T_SWITCH, 'while' => T_WHILE, 'continue' => T_CONTINUE, 'function' => T_FUNCTION, 'this' => T_STRING, 'with' => 1, 'default' => T_DEFAULT, 'if' => T_IF, 'throw' => T_THROW, 'delete' => 1, 'in' => 1, 'try' => T_TRY, 'do' => T_DO, 'instanceof' => 1, 'typeof' => 1, ); public static function decapse( $encapsed ){ $s = substr($encapsed,1,-1); $l = self::$lex; if( is_null($l) ){ $l = new LocoEscapeParser( array( 'U' => 'U', 'a' => 'a', ) ); self::$lex = $l; } return $l->unescape($s); } public function __construct( $src = '' ){ $this->define('/^(?:\\\\u[0-9A-F]{4,4}|[$_\\pL\\p{Nl}])(?:\\\\u[0-9A-F]{4}|[$_\\pL\\pN\\p{Mn}\\p{Mc}\\p{Pc}])*/ui', array($this,'matchWord') ); $this->define('/^\\s+/u', T_WHITESPACE ); $this->define('!^//.*!', T_COMMENT ); $this->define('!^/\\*.*\\*/!Us', array($this,'matchComment') ); $this->define('/^"(?:\\\\.|[^\\r\\n\\p{Zl}\\p{Zp}"\\\\])*"/u', T_CONSTANT_ENCAPSED_STRING ); $this->define('/^\'(?:\\\\.|[^\\r\\n\\p{Zl}\\p{Zp}\'\\\\])*\'/u', T_CONSTANT_ENCAPSED_STRING ); $this->define('/^[-+;,<>.=:|&^!?*%~(){}[\\]]/'); parent::__construct($src); } public function matchWord( $s ){ if( array_key_exists($s,self::$words) ){ return self::$words[$s]; } return T_STRING; } public function matchComment( $s ){ if( '/**' === substr($s,0,3) ){ return T_DOC_COMMENT; } return T_COMMENT; } }
|
28 |
-
class LocoExtracted implements Countable { private $exp = array(); private $reg = array(); private $dom = array(); private $dflt = ''; public function extractSource( LocoExtractor $ext, $src, $fileref = '' ){ $ext->extract( $this, $ext->tokenize($src), $fileref ); return $this; } public function export(){ return $this->exp; } public function count(){ return count( $this->exp ); } public function getDomainCounts(){ return $this->dom; } public function setDomain( $default ){ $this->dflt = (string) $default; return $this; } public function getDomain(){ return $this->dflt; } public function pushMeta( $source, $notes = '', $domain = null ){ if( ! $domain || '*' === $domain ){ $domain = $this->dflt; } $entry = array( 'id' => '', 'source' => $source, 'target' => '', 'notes' => $notes, ); if( $domain ){ $entry['domain'] = $domain; $key = $source."\1".$domain; } else { $key = $source; } return $this->pushMsgid( $key, $entry, $domain ); } public function pushMsgid( $key, array $entry, $domain ){ if( isset($this->reg[$key]) ){ $index = $this->reg[$key]; $clash = $this->exp[$index]; if( $value = $this->mergeField( $clash, $entry, 'refs', ' ') ){ $this->exp[$index]['refs'] = $value; } if( $value = $this->mergeField( $clash, $entry, 'notes', "\n") ){ $this->exp[$index]['notes'] = $value; } } else { $index = count($this->exp); $this->reg[$key] = $index; $this->exp[$index] = $entry; if( isset($this->dom[$domain]) ){ $this->dom[$domain]++; } else { $this->dom[$domain] = 1; } } return $index; } public function pushMsgidPlural( $
|
29 |
abstract class LocoExtractor { private $rules; private $wp = array(); private $domain; abstract public function tokenize( $src ); abstract public function extract( LocoExtracted $strings, LocoTokensInterface $tokens, $fileref = '' ); abstract protected function fsniff( $str ); abstract protected function decapse( $raw ); abstract protected function comment( $comment ); public function __construct( array $rules ){ $this->rules = $rules; } public function setDomain( $default ){ $this->domain = $default; return $this; } public function headerize( array $tags, $domain = '' ){ if( isset($this->wp[$domain]) ){ $this->wp[$domain] += $tags; } else { $this->wp[$domain] = $tags; } return $this; } protected function getHeaders(){ return $this->wp; } final public function extractSource( $src, $fileref ){ $strings = new LocoExtracted; $this->extract( $strings, $this->tokenize($src), $fileref ); return $strings; } public function rule( $s ){ return isset($this->rules[$s]) ? $this->rules[$s] : ''; } protected function push( LocoExtracted $strings, $rule, array $args, $comment = '', $ref = '' ){ $s = strpos( $rule, 's'); $p = strpos( $rule, 'p'); $c = strpos( $rule, 'c'); $d = strpos( $rule, 'd'); if( false === $s || ! isset($args[$s]) ){ return null; } $key = $args[$s]; if( ! is_string($key) ){ return null; } $msgid = $key; $entry = array( 'id' => '', 'source' => $msgid, 'target' => '', ); if( is_int($c) && isset($args[$c]) ){ $entry['context'] = $context = $args[$c]; $key .= "\0". $context; } else if( '' === $msgid ){ return null; } else { $context = null; } if( $ref ){ $entry['refs'] = $ref; } if( is_int($d) && array_key_exists($d,$args) ){ $domain = $args[$d]; if( is_null($domain) ){ $domain = ''; } } else { $domain = $this->domain or $domain = $strings->getDomain(); } if( is_string($domain) && '' !== $domain ){ $entry['domain'] = $domain; $key .= "\1".$domain; } $parse_printf = true; if( $comment = $this->comment($comment) ){ if( preg_match('/^xgettext:\\s*([-a-z]+)-format\\s*/mi', $comment, $r, PREG_OFFSET_CAPTURE ) ){ $entry['format'] = $r[1][0]; $comment = trim( substr_replace( $comment,'', $r[0][1], strlen($r[0][0]) ) ); $parse_printf = ( 'no-' === substr($entry['format'],0,3) ) ? false : null; } if( preg_match('/^references?:( *.+:\\d+)*\\s*/mi', $comment, $r, PREG_OFFSET_CAPTURE ) ){ $entry['refs'] = trim($r[1][0],' '); $comment = trim( substr_replace( $comment, '', $r[0][1], strlen($r[0][0]) ) ); } $entry['notes'] = $comment; } if( $parse_printf && ( $format = $this->fsniff($msgid) ) ){ $entry['format'] = $format; } $index = $strings->pushMsgid( $key, $entry, $domain ); if( is_int($p) && isset($args[$p]) ){ $msgid_plural = $args[$p]; $entry = array( 'id' => '', 'source' => $msgid_plural, 'target' => '', 'plural' => 1, 'parent' => $index, ); if( false !== $parse_printf && ( $format = $this->fsniff($msgid_plural) ) ){ $entry['format'] = $format; } $strings->pushMsgidPlural( $key, $entry ); } return $index; } }
|
30 |
class LocoPHPTokens implements LocoTokensInterface, Countable { private $i; private $tokens; private $skip_tokens = array(); private $literal_tokens = array(); public function __construct( array $tokens ){ $this->tokens = $tokens; $this->rewind(); } public function literal( array $a ){ foreach( $a as $t ){ $this->literal_tokens[ $t ] = 1; } return $this; } public function ignore( array $a ){ foreach( $a as $t ){ $this->skip_tokens[$t] = true; } return $this; } public function export(){ $arr = array(); $this->rewind(); while( $tok = $this->advance() ){ $arr[] = $tok; } return $arr; } public function advance(){ $tok = $this->current(); $this->next(); return $tok; } public function rewind(){ $this->i = ( false === reset($this->tokens) ? null : key($this->tokens) ); } public function valid(){ while( isset($this->i) ){ $tok = $this->tokens[$this->i]; if( array_key_exists( is_array($tok) ? $tok[0] : $tok, $this->skip_tokens ) ){ $this->next(); } else { return true; } } return false; } public function key(){ return $this->i; } public function next(){ $this->i = ( false === next($this->tokens) ? null : key($this->tokens) ); } public function current(){ if( ! $this->valid() ){ return false; } $tok = $this->tokens[$this->i]; if( is_array($tok) && isset($this->literal_tokens[$tok[0]]) ){ return $tok[1]; } return $tok; } public function __toString(){ $s = array(); foreach( $this as $token ){ $s[] = is_array($token) ? $token[1] : $token; } return implode('',$s); } public function count(){ return count($this->tokens); } }
|
31 |
class LocoPHPEscapeParser extends LocoEscapeParser { public function __construct(){ parent::__construct( array( 'n' => "\n", 'r' => "\r", 't' => "\t", 'v' => "\x0B", 'f' => "\x0C", 'e' => "\x1B", '$' => '$', '\\' => '\\', '"' => '"', ) ); } protected function stripSlashes( $s ){ return preg_replace_callback('/\\\\(x[0-9A-Fa-f]{1,2}|[0-3]?[0-7]{1,2})/', array($this,'unescapeMatch'), $s, -1, $n ); } }
|
@@ -38,7 +38,7 @@ function loco_sniff_php_printf( $s, $limit = 0 ){ return loco_sniff_printf( $s
|
|
38 |
class LocoPHPExtractor extends LocoExtractor { private $defs = array(); public function tokenize( $src ){ return new LocoPHPTokens( token_get_all($src) ); } public function decapse( $raw ){ return loco_decapse_php_string( $raw ); } public function fsniff( $str ){ return loco_sniff_php_printf($str) ? 'php' : ''; } protected function comment( $comment ){ $comment = loco_parse_php_comment($comment); $comment = preg_replace('/^translators:\\s+/mi', '', $comment ); return $comment; } public function define( $name, $value ){ if( is_string($value) ){ $this->defs[$name] = $value; } return $this; } public function extract( LocoExtracted $strings, LocoTokensInterface $tokens, $fileref = '' ){ $tokens->ignore( array(T_WHITESPACE) ); $n = 0; $depth = 0; $comment = ''; $narg = 0; $args = array(); $ref = ''; $rule = ''; $wp = $this->getHeaders(); $tokens->rewind(); while( $tok = $tokens->advance() ){ if( is_string($tok) ){ $s = $tok; $t = null; } else { $t = $tok[0]; $s = $tok[1]; } if( $depth ){ if( ')' === $s || ']' === $s ){ if( 0 === --$depth ){ if( $this->push( $strings, $rule, $args, $comment, $ref ) ){ $n++; } $comment = ''; } } else if( '(' === $s || '[' === $s ){ $depth++; $args[$narg] = null; } else if( 1 === $depth ){ if( ',' === $s ){ $narg++; } else if( T_CONSTANT_ENCAPSED_STRING === $t ){ $args[$narg] = $this->decapse($s); } else if( T_STRING === $t && array_key_exists($s,$this->defs) ){ $args[$narg] = $this->defs[$s]; } else { $args[$narg] = null; } } } else if( T_COMMENT === $t || T_DOC_COMMENT === $t ){ $was_header = false; if( 0 === $n ){ if( false !== strpos($s,'* @package') ){ $was_header = true; } if( $wp && ( $header = loco_parse_wp_comment($s) ) ){ foreach( $wp as $domain => $tags ){ foreach( array_intersect_key($header,$tags) as $tag => $source ){ $strings->pushMeta( $source, $tags[$tag], $domain ); $was_header = true; } } } } if( ! $was_header ) { $comment = $s; } } else if( T_STRING === $t && '(' === $tokens->advance() && ( $rule = $this->rule($s) ) ){ $ref = $fileref ? $fileref.':'.$tok[2]: ''; $depth = 1; $args = array(); $narg = 0; } else if( $comment ){ if( false === stripos($comment, 'translators:') && false === strpos($comment, 'xgettext:') ){ $comment = ''; } } } return $this; } }
|
39 |
function loco_sniff_js_printf( $s, $limit = 0 ){ return loco_sniff_printf( $s, '/^%(?:[1-9]\\d*\\$)?\\+?(?:0|\'[^$])?-?\\d*(?:\\.\\d+)?[b-gijostTuvxX%]/', $limit ); }
|
40 |
class LocoJsExtractor extends LocoPHPExtractor { public function tokenize( $src ){ return new LocoJsTokens($src); } public function fsniff( $str ){ return loco_sniff_js_printf($str) ? 'javascript' : ''; } public function decapse( $encapsed ){ return LocoJsTokens::decapse($encapsed); } }
|
41 |
-
class LocoTwigExtractor extends LocoPHPExtractor { public function tokenize( $src ){ $src = '<?php '.preg_replace('
|
42 |
function loco_wp_extractor( $type = 'php' ){ static $rules = array( '__' => 'sd', '_e' => 'sd', '_c' => 'sd', '_n' => 'sp_d', '_n_noop' => 'spd', '_nc' => 'sp_d', '__ngettext' => 'spd', '__ngettext_noop' => 'spd', '_x' => 'scd', '_ex' => 'scd', '_nx' => 'sp_cd', '_nx_noop' => 'spcd', 'esc_attr__' => 'sd', 'esc_html__' => 'sd', 'esc_attr_e' => 'sd', 'esc_html_e' => 'sd', 'esc_attr_x' => 'scd', 'esc_html_x' => 'scd', ); if( 'php' === $type ){ $extr = new LocoPHPExtractor($rules); } else if( 'twig' === $type ){ $extr = new LocoTwigExtractor($rules); } else if( 'js' === $type ){ $extr = new LocoJsExtractor($rules); } else { throw new InvalidArgumentException('No string extractor for '.$type); } return $extr; }
|
43 |
function loco_print_percent( $n, $t ){ $s = loco_string_percent( (int) $n, (int) $t ); echo $s,'%'; return ''; }
|
44 |
function loco_print_progress( $translated, $untranslated, $flagged ){ $total = $translated + $untranslated; $complete = loco_string_percent( $translated - $flagged, $total ); $class = 'progress'; if( ! $translated && ! $flagged ){ $class .= ' empty'; } else if( '100' === $complete ){ $class .= ' done'; } echo '<div class="',$class,'"><div class="t">'; if( $flagged ){ $s = loco_string_percent( $flagged, $total ); echo '<div class="bar f" style="width:',$s,'%"> </div>'; } if( '0' === $complete ){ echo ' '; } else { $class = 'bar p'; $p = (int) $complete; $class .= sprintf(' p-%u', 10*floor($p/10) ); $style = 'width:'.$complete.'%'; if( $flagged ){ $remain = 100.0 - (float) $s; $style .= '; max-width: '.sprintf('%s',$remain).'%'; } echo '<div class="',$class,'" style="'.$style.'"> </div>'; } echo '</div><div class="l">',$complete,'%</div></div>'; return ''; }
|
15 |
abstract class LocoPo { public static function pair( $key, $text, $width = 79, $eol = "\n", $esc = '\\n' ){ if( '' === $text ){ return $key.' ""'; } $text = addcslashes( $text, "\t\x0B\x0C\x07\x08\\\"" ); if( $esc ) { $text = preg_replace('/(?:\\r\\n?|\\n)/', $esc.$eol, $text, -1, $nbr ); } else { $eol = "\n"; $text = preg_replace_callback('/(?:\\r\\n?|\\n)/',array(__CLASS__,'replace_br'), $text, -1, $nbr ); } if( $nbr ){ } else if( $width && $width < mb_strlen($text,'UTF-8') + strlen($key) + 3 ){ } else { return $key.' "'.$text.'"'; } $lines = array( $key.' "' ); if( $width ){ $width -= 2; $a = '/^.{0,'.($width-1).'}[-– \\.,:;\\?!\\)\\]\\}\\>]/u'; $b = '/^[^-– \\.,:;\\?!\\)\\]\\}\\>]+/u'; foreach( explode($eol,$text) as $unwrapped ){ $length = mb_strlen( $unwrapped, 'UTF-8' ); while( $length > $width ){ if( preg_match( $a, $unwrapped, $r ) ){ $line = $r[0]; } else if( preg_match( $b, $unwrapped, $r ) ){ $line = $r[0]; } else { throw new Exception('Wrapping error'); } $lines[] = $line; $trunc = mb_strlen($line,'UTF-8'); $length -= $trunc; $unwrapped = (string) substr( $unwrapped, strlen($line) ); if( ( '' === $unwrapped && 0 !== $length ) || ( 0 === $length && '' !== $unwrapped ) ){ throw new Exception('Truncation error'); } } if( 0 !== $length ){ $lines[] = $unwrapped; } } } else { foreach( explode($eol,$text) as $unwrapped ){ $lines[] = $unwrapped; } } return implode('"'.$eol.'"',$lines).'"'; } private static function replace_br( array $r ){ return addcslashes($r[0],"\r\n")."\n"; } public static function refs( $text, $width = 76, $eol = "\n" ){ $text = preg_replace('/\\s+/u', ' ', $text ); if( $width ){ $text = wordwrap( $text, $width, $eol.'#: ', false ); } return '#: '.$text; } public static function prefix( $text, $prefix, $eol = "\n" ){ $lines = preg_split('/\\R/u', $text, -1 ); return $prefix.implode( $eol.$prefix, $lines ); } }
|
16 |
class LocoPoIndex extends ArrayIterator { public function compare( LocoPoMessage $a, LocoPoMessage $b ){ $h = $a->getHash(); if( ! isset($this[$h]) ){ return 1; } $j = $b->getHash(); if( ! isset($this[$j]) ){ return -1; } return $this[$h] > $this[$j] ? 1 : -1; } }
|
17 |
class LocoPoMessage extends ArrayObject { public function __construct( array $r ){ $r['key'] = $r['source']; parent::__construct($r); } public function __get( $prop ){ return isset($this[$prop]) ? $this[$prop] : null; } private function _getFlags(){ $flags = array(); $plurals = $this->__get('plurals'); if( 4 === $this->__get('flag') ){ $flags[] = 'fuzzy'; } else if( $plurals ){ foreach( $plurals as $child ){ if( 4 === $child->__get('flag') ){ $flags[] = 'fuzzy'; break; } } } if( $f = $this->__get('format') ){ $flags[] = $f.'-format'; } else if( isset($plurals[0]) && ( $f = $plurals[0]->format ) ){ $flags[] = $f.'-format'; } return $flags; } public function getHash(){ $hash = $this->getKey(); if( isset($this['plurals']) ){ foreach( $this['plurals'] as $p ){ $hash .= "\0".$p->getHash(); break; } } return $hash; } public function getKey(){ $msgid = (string) $this['source']; $msgctxt = (string) $this->__get('context'); if( '' !== $msgctxt ){ if( '' === $msgid ){ $msgid = '('.$msgctxt.')'; } $msgid = $msgctxt."\4".$msgid; } return $msgid; } public function __toString(){ return $this->render( 79, 76 ); } public function render( $width, $ref_width ){ $s = array(); try { if( $text = $this->__get('comment') ) { $s[] = LocoPo::prefix( $text, '# '); } if( $text = $this->__get('notes') ) { $s[] = LocoPo::prefix( $text, '#. '); } if( $text = $this->__get('refs') ){ $s[] = LocoPo::refs( $text, $ref_width ); } if( $texts = $this->_getFlags() ){ $s[] = '#, '.implode(', ',$texts); } $plurals = $this->__get('plurals'); $prev = $this->__get('prev'); if( is_array($prev) && $prev ){ foreach( new LocoPoIterator($prev) as $p ){ $text = $p->render( max(0,$width-3), 0 ); $text = preg_replace('/^msg[_a-z]+(\\[\\d+])? ""\\n/m','',$text); $s[] = LocoPo::prefix( rtrim($text,"\n"),'#| '); break; } } $text = $this->__get('context'); if( is_string($text) && '' !== $text ){ $s[] = LocoPo::pair('msgctxt', $text, $width ); } $s[] = LocoPo::pair( 'msgid', $this['key'], $width ); $target = $this['target']; if( is_array($plurals) ){ if( $plurals ){ foreach( $plurals as $i => $p ){ if( 0 === $i ){ $s[] = LocoPo::pair('msgid_plural', $p['key'], $width ); $s[] = LocoPo::pair('msgstr[0]', $target, $width ); } $s[] = LocoPo::pair('msgstr['.(++$i).']', $p['target'], $width ); } } else if( isset($this['plural_key']) ){ $s[] = LocoPo::pair('msgid_plural', $this['plural_key'], $width ); $s[] = LocoPo::pair('msgstr[0]', $target, $width ); } else { trigger_error('Missing plural_key in zero plural export'); $s[] = LocoPo::pair('msgstr', $target, $width ); } } else { $s[] = LocoPo::pair('msgstr', $target, $width ); } } catch( Exception $e ){ trigger_error( $e->getMessage(), E_USER_WARNING ); } return implode("\n",$s)."\n"; } }
|
18 |
+
class LocoPoIterator implements Iterator, Countable { private $po; private $headers; private $i; private $t; private $j; private $z; private $w = 79; public function __construct( $po ){ $this->po = $po; $this->t = count( $po ); if( ! isset($po[0]) ){ throw new InvalidArgumentException('Empty PO data'); } $h = $po[0]; if( '' === $h['source'] && empty($h['context']) ){ $this->z = 0; } else { $this->z = -1; } } public function count(){ return $this->t - ( $this->z + 1 ); } public function at( $index ){ return $this->po[ $this->z + $index ]; } public function wrap( $width ){ $width = (int) $width; if( $width > 0 ){ $this->w = max( 15, $width ); } else { $this->w = 0; } return $this; } public function rewind(){ $this->i = $this->z; $this->j = -1; $this->next(); } public function key(){ return $this->j; } public function valid(){ return is_int($this->i); } public function next(){ $i = $this->i; while( ++$i < $this->t ){ if( array_key_exists('parent',$this->po[$i]) ){ continue; } $this->j++; $this->i = $i; return; } $this->i = null; $this->j = null; } public function current(){ $i = $this->i; $po = $this->po; $parent = new LocoPoMessage( $po[$i] ); $plurals = array(); $nonseq = $parent->offsetExists('child'); $j = $nonseq ? $parent['child'] : $i+1; while( isset($po[$j]['parent']) && $i === $po[$j]['parent'] ){ $plurals[] = new LocoPoMessage($po[$j++]); } if( $plurals ){ $parent['plurals'] = $plurals; } return $parent; } public function getArrayCopy(){ $po = $this->po; if( 0 === $this->z ){ $po[0]['target'] = (string) $this->getHeaders(); } return $po; } public function getHeaders(){ if( ! $this->headers ){ $header = $this->po[0]; if( 0 === $this->z ){ $this->headers = LocoPoHeaders::fromMsgstr( $header['target'] ); } else { $this->headers = new LocoPoHeaders; } } return $this->headers; } public function initPo(){ if( 0 === $this->z ){ unset( $this->po[0]['flag'] ); } return $this; } public function initPot(){ if( 0 === $this->z ){ $this->po[0]['flag'] = 4; } return $this; } public function strip(){ $po = $this->po; $i = count($po); $z = $this->z; while( --$i > $z ){ $po[$i]['target'] = ''; } $this->po = $po; return $this; } public function __toString(){ try { return $this->render(); } catch( Exception $e ){ trigger_error( $e->getMessage(), E_USER_WARNING ); return ''; } } public function render( $sorter = null ){ $width = $this->w; $ref_width = max( 0, $width - 3 ); if( 0 === $this->z ){ $h = $this->po[0]; } else { $h = array( 'source' => '' ); } $h['target'] = (string) $this->getHeaders(); $msg = new LocoPoMessage( $h ); $s = $msg->render( $width, $ref_width ); if( $sorter ){ if( ! is_callable($sorter) ){ throw new InvalidArgumentException('Bad callback'); } $msgs = array(); foreach( $this as $msg ){ $msgs[] = $msg; } usort( $msgs, $sorter ); } else { $msgs = $this; } foreach( $msgs as $msg ){ $s .= "\n".$msg->render( $width, $ref_width ); } return $s; } public function exportRefs( $grep = '' ){ $a = array(); if( '' === $grep ) { $grep = '/(\\S+):\\d+/'; } else { $grep = '/(\\S*'.$grep.'):\\d+/'; } foreach( $this as $message ){ if( preg_match_all( $grep, (string) $message->refs, $r ) ){ foreach( $r[1] as $ref ) { $a[$ref][] = $message; } } } return $a; } public function splitRefs( array $map = null ){ $a = array(); foreach( $this as $message ){ $refs = ltrim( (string) $message->refs ); if( '' !== $refs ){ if( preg_match_all('/\\S+\\.([a-z]+):\\d+/', $refs, $r, PREG_SET_ORDER ) ){ $tmp = array(); foreach( $r as $rr ) { list( $ref, $ext ) = $rr; $tmp[$ext][$ref] = true; } foreach( $tmp as $ext => $refs ){ if( is_array($map) ){ if( isset($map[$ext]) ){ $ext = $map[$ext]; } else { continue; } } $message = clone $message; $message['refs'] = implode(' ',array_keys($refs) ); $a[$ext][] = $message; } } } } return $a; } public function getHashes(){ $a = array(); foreach( $this as $msg ){ $a[] = $msg->getHash(); } sort( $a, SORT_STRING ); return $a; } public function equalSource( LocoPoIterator $that ){ $a = $this->getHashes(); $b = $that->getHashes(); if( count($a) !== count($b) ){ return false; } foreach( $a as $i => $hash ){ if( $hash !== $b[$i] ){ return false; } } return true; } public function sort( $func = null ){ $order = array(); foreach( $this as $msg ){ $order[] = $msg; } if( is_null($func) ){ $func = array( __CLASS__, 'compare' ); } else if( ! is_callable($func) ){ throw new InvalidArgumentException('Bad callback'); } usort( $order, $func ); $po = array(); if( 0 === $this->z ){ $po[] = $this->po[0]; } foreach( $order as $msg ){ $po[] = $msg->getArrayCopy(); if( is_array( $plurals = $msg->plurals ) ){ $index = count($po) - 1; unset( $po[$index]['plurals'] ); foreach( $plurals as $p ){ $a = $p->getArrayCopy(); $a['parent'] = $index; $po[] = $a; } } } $this->po = $po; return $this; } public static function compare( LocoPoMessage $a, LocoPoMessage $b ){ $h = $a->getHash(); $j = $b->getHash(); $n = strcasecmp( $h, $j ); if( 0 === $n ){ $n = strcmp( $h, $j ); if( 0 === $n ){ return 0; } } return $n > 0 ? 1 : -1; } public function createSorter(){ $index = array(); foreach( $this as $i => $msg ){ $index[ $msg->getHash() ] = $i; } $obj = new LocoPoIndex( $index ); return array( $obj, 'compare' ); } }
|
19 |
class LocoMoTable { private $size = 0; private $bin = ''; private $map; public function __construct( $data = null ){ if( is_array($data) ){ $this->compile( $data ); } else if( $data ){ $this->parse( $data ); } } public function count(){ if( ! isset($this->size) ){ if( $this->bin ){ $this->size = (int) ( strlen( $this->bin ) / 4 ); } else if( is_array($this->map) ){ $this->size = count($this->map); } else { return 0; } if( ! self::is_prime($this->size) || $this->size < 3 ){ throw new Exception('Size expected to be prime number above 2, got '.$this->size); } } return $this->size; } public function bytes(){ return $this->count() * 4; } public function __toString(){ return $this->bin; } public function export(){ if( ! is_array($this->map) ){ $this->parse( $this->bin ); } return $this->map; } private function reset( $length ){ $this->size = max( 3, self::next_prime ( $length * 4 / 3 ) ); $this->bin = null; $this->map = array(); return $this->size; } public function compile( array $msgids ){ $hash_tab_size = $this->reset( count($msgids) ); $packed = array_fill( 0, $hash_tab_size, "\0\0\0\0" ); $j = 0; foreach( $msgids as $msgid ){ $hash_val = self::hashpjw( $msgid ); $idx = $hash_val % $hash_tab_size; if( array_key_exists($idx, $this->map) ){ $incr = 1 + ( $hash_val % ( $hash_tab_size - 2 ) ); do { $idx += $incr; if( $hash_val === $idx ){ throw new Exception('Unable to find empty slot in hash table'); } $idx %= $hash_tab_size; } while( array_key_exists($idx, $this->map ) ); } $this->map[$idx] = $j; $packed[$idx] = pack('V', ++$j ); } return $this->bin = implode('',$packed); } public function lookup( $msgid, array $msgids ){ $hash_val = self::hashpjw( $msgid ); $idx = $hash_val % $this->size; $incr = 1 + ( $hash_val % ( $this->size - 2 ) ); while( true ){ if( ! array_key_exists($idx, $this->map) ){ break; } $j = $this->map[$idx]; if( isset($msgids[$j]) && $msgid === $msgids[$j] ){ return $j; } $idx += $incr; if( $idx === $hash_val ){ break; } $idx %= $this->size; } return -1; } public function parse( $bin ){ $this->bin = (string) $bin; $this->size = null; $hash_tab_size = $this->count(); $this->map = array(); $idx = -1; $byte = 0; while( ++$idx < $hash_tab_size ){ $word = substr( $this->bin, $byte, 4 ); if( "\0\0\0\0" !== $word ){ list(,$j) = unpack('V', $word ); $this->map[$idx] = $j - 1; } $byte += 4; } return $this->map; } public static function hashpjw( $str ){ $i = -1; $hval = 0; $len = strlen($str); while( ++$i < $len ){ $ord = ord( substr($str,$i,1) ); $hval = ( $hval << 4 ) + $ord; $g = $hval & 0xf0000000; if( $g !== 0 ){ $hval ^= $g >> 24; $hval ^= $g; } } return $hval; } private static function next_prime( $seed ){ $seed |= 1; while ( ! self::is_prime($seed) ){ $seed += 2; } return $seed; } private static function is_prime( $num ) { if ($num === 1 ){ return false; } if( $num === 2 ){ return true; } if( $num % 2 == 0 ) { return false; } for( $i = 3; $i <= ceil(sqrt($num)); $i = $i + 2) { if($num % $i == 0 ){ return false; } } return true; } }
|
20 |
+
class LocoMo { private $bin; private $msgs; private $head; private $hash; private $use_fuzzy = false; private $cs; public function __construct( Iterator $export, LocoPoHeaders $head = null ){ if( $head ){ $this->head = $head; } else { $this->head = new LocoPoHeaders; $this->setHeader('Project-Id-Version','Loco'); } $this->msgs = $export; $this->bin = ''; } public function setCharset( $cs ){ $cs = $this->head->setCharset($cs); $this->cs = 'UTF-8' === $cs ? null : $cs; } public function enableHash(){ return $this->hash = new LocoMoTable; } public function useFuzzy(){ $this->use_fuzzy = true; } public function setHeader( $key, $val ){ $this->head->add($key, $val); return $this; } private function str( $s ){ $s = (string) $s; if( $cs = $this->cs ){ $s = mb_convert_encoding($s,$cs,array('UTF-8')); } return $s; } public function compile(){ $table = array(''); $sources = array(''); $targets = array( (string) $this->head ); $fuzzy_flag = 4; $skip_fuzzy = ! $this->use_fuzzy; foreach( $this->msgs as $r ){ if( $skip_fuzzy && isset($r['flag']) && $fuzzy_flag === $r['flag'] ){ continue; } $msgid = $this->str( $r['key'] ); if( isset($r['context']) ){ $msgctxt = $this->str( $r['context'] ); if( '' !== $msgctxt ){ if( '' === $msgid ){ $msgid = '('.$msgctxt.')'; } $msgid = $msgctxt."\x04".$msgid; } } if( '' === $msgid ){ continue; } $msgstr = $this->str( $r['target'] ); if( '' === $msgstr ){ continue; } $table[] = $msgid; if( isset($r['plurals']) ){ foreach( $r['plurals'] as $i => $p ){ if( $i === 0 ){ $msgid .= "\0".$p['key']; } $msgstr .= "\0".$p['target']; } } $sources[] = $msgid; $targets[] = $msgstr; } asort( $sources, SORT_STRING ); $this->bin = "\xDE\x12\x04\x95\x00\x00\x00\x00"; $n = count($sources); $this->writeInteger( $n ); $offset = 28; $this->writeInteger( $offset ); $offset += $n * 8; $this->writeInteger( $offset ); if( $this->hash ){ sort( $table, SORT_STRING ); $this->hash->compile( $table ); $s = $this->hash->count(); } else { $s = 0; } $this->writeInteger( $s ); $offset += $n * 8; $this->writeInteger( $offset ); if( $s ){ $offset += $s * 4; } $source = ''; foreach( $sources as $i => $str ){ $source .= $str."\0"; $this->writeInteger( $strlen = strlen($str) ); $this->writeInteger( $offset ); $offset += $strlen + 1; } $target = ''; foreach( array_keys($sources) as $i ){ $str = $targets[$i]; $target .= $str."\0"; $this->writeInteger( $strlen = strlen($str) ); $this->writeInteger( $offset ); $offset += $strlen + 1; } if( $this->hash ){ $this->bin .= $this->hash->__toString(); } $this->bin .= $source; $this->bin .= $target; return $this->bin; } private function writeInteger( $num ){ $this->bin .= pack( 'V', $num ); return $this; } }
|
21 |
interface LocoTokensInterface extends Iterator { public function advance(); public function ignore( array $a ); }
|
22 |
class LocoTokenizer implements LocoTokensInterface { const T_LITERAL = 0; const T_UNKNOWN = -1; private $src; private $pos; private $line; private $col; private $max; private $rules = array(); private $skip = array(); private $tok; private $len; public function __construct( $src = '' ){ $this->init($src); } public function parse( $src ){ $tokens = array(); $this->init($src); while( $tok = $this->advance() ){ $tokens[] = $tok; } return $tokens; } public function init( $src ){ $this->src = $src; $this->rewind(); return $this; } public function define( $grep, $t = 0 ){ if('^' !== $grep[1] ){ throw new InvalidArgumentException('Expression '.$grep.' isn\'t anchored'); } if( ! is_int($t) && ! is_callable($t) ){ throw new InvalidArgumentException('Non-integer token must be valid callback'); } $sniff = $grep[2]; if( $sniff === preg_quote($sniff,$grep[0]) ){ $this->rules[$sniff][] = array( $grep, $t ); } else { $this->rules[''][] = array( $grep, $t ); } return $this; } public function ignore( array $a ){ foreach( $a as $t ){ $this->skip[$t] = true; } return $this; } public function current(){ return $this->tok; } public function advance(){ $tok = $this->current(); $this->next(); return $tok; } public function next(){ $tok = null; $offset = $this->pos; $column = $this->col; $line = $this->line; while( $offset <= $this->max ){ $t = null; $s = ''; $text = substr($this->src,$offset); foreach( array($text[0],'') as $k ){ if( isset($this->rules[$k]) ) { foreach( $this->rules[$k] as $rule) { if( preg_match($rule[0], $text, $match ) ) { $s = $match[0]; $t = $rule[1]; if( ! is_int($t) ) { $t = call_user_func( $t, $s, $match ); } break 2; } } } } if( is_null($t) ){ $n = preg_match('/^./u',$text,$match); if( false === $n ){ $s = $text[0]; $match = array( mb_convert_encoding($s,'UTF-8','cp1252') ); } $s = (string) $match[0]; $t = self::T_UNKNOWN; } $length = strlen($s); if( 0 === $length ){ throw new Loco_error_ParseException('Failed to match anything'); } $offset += $length; $lines = preg_split('/\\r?\\n/',$s); $nlines = count($lines); if( $nlines > 1 ){ $next_line = $line + ( $nlines - 1 ); $next_column = strlen( end($lines) ); } else { $next_line = $line; $next_column = $column + $length; } if( array_key_exists($t,$this->skip) ){ $line = $next_line; $column = $next_column; continue; } $tok = self::T_LITERAL === $t ? $s : array( $t, $s, $line, $column ); $line = $next_line; $column = $next_column; $this->len++; break; } $this->tok = $tok; $this->pos = $offset; $this->col = $column; $this->line = $line; } public function key(){ return $this->len ? $this->len-1 : null; } public function valid(){ return null !== $this->tok; } public function rewind(){ $this->len = 0; $this->pos = 0; $this->col = 0; $this->line = 1; $this->max = strlen($this->src) - 1; $this->next(); } }
|
23 |
function loco_utf8_chr( $u ){ if( $u < 0x80 ){ if( $u < 0 ){ throw new RangeException( sprintf('%d is out of Unicode range', $u ) ); } return chr($u); } if( $u < 0x800 ) { return chr( ($u>>6) & 0x1F | 0xC0 ).chr( $u & 0x3F | 0x80 ); } if( $u < 0x10000 ) { return chr( $u>>12 & 15 | 0xE0 ).chr( $u>>6 & 0x3F | 0x80 ).chr( $u & 0x3F | 0x80 ); } if( $u < 0x110000 ) { return chr( $u>>18 & 7 | 0xF0 ).chr( $u>>12 & 0x3F | 0x80 ).chr( $u>>6 & 0x3F | 0x80 ).chr( $u & 0x3F | 0x80 ); } throw new RangeException( sprintf('\\x%X is out of Unicode range', $u ) ); }
|
25 |
function _loco_resolve_surrogates( array $r ){ return loco_utf8_chr ( ( ( ( ( 832 | ( ord($r[1]) & 0x3F ) ) << 6 ) | ( ord($r[2]) & 0x3F ) ) - 0xD800 ) * 0x400 + ( ( ( ( 832 | ( ord($r[3]) & 0x3F ) ) << 6 ) | ( ord($r[4]) & 0x3F ) ) - 0xDC00 ) + 0x10000 ); }
|
26 |
class LocoEscapeParser { private $map; private $grep; public function __construct( array $map = array() ){ $this->map = $map; $rules = array('\\\\'); if( $map ){ $rules[] = '['.implode(array_keys($map)).']'; } if( ! isset($map['U']) ) { $rules[] = 'U[0-9A-Fa-f]{5,8}'; } if( ! isset($map['u']) ) { $rules[] = 'u(?:\\{[0-9A-Fa-f]+\\}|[0-9A-Fa-f]{1,4})(?:\\\\u(?:\\{[0-9A-Fa-f]+\\}|[0-9A-Fa-f]{1,4}))*'; } $this->grep = '/\\\\('.implode('|',$rules).')/'; } public function unescape( $s ){ if( '' !== $s ) { return $this->stripSlashes( preg_replace_callback($this->grep, array($this, 'unescapeMatch'), $s) ); } return ''; } public function unescapeMatch( array $r ){ $s = $r[0]; $c = $s[1]; if( isset($this->map[$c]) ){ return $this->map[$c]; } if( 'u' === $c ){ $str = ''; $surrogates = false; foreach( explode('\\u',$s) as $i => $h ){ if( '' !== $h ){ $h = ltrim( trim($h,'{}'),'0'); $u = intval($h,16); $str.= loco_utf8_chr($u); if( ! $surrogates ){ $surrogates = $u >= 0xD800 && $u <= 0xDBFF; } } } if( $surrogates ){ $str = loco_resolve_surrogates($str); } return $str; } if( 'U' === $c ){ return loco_utf8_chr( intval(substr($s,2),16) ); } if( 'x' === $c ){ return chr( intval(substr($s,2),16) ); } if( ctype_digit($c) ){ return chr( intval(substr($s,1),8) ); } return $s; } protected function stripSlashes( $s ){ return stripcslashes($s); } }
|
27 |
class LocoJsTokens extends LocoTokenizer { const T_KWORD = 1; const T_REGEX = 2; private static $lex; protected static $words = array( 'true' => 1, 'false' => 1, 'null' => 1, 'break' => T_BREAK, 'else' => T_ELSE, 'new' => T_NEW, 'var' => 1, 'case' => T_CASE, 'finally' => T_FINALLY, 'return' => T_RETURN, 'void' => 1, 'catch' => T_CATCH, 'for' => T_FOR, 'switch' => T_SWITCH, 'while' => T_WHILE, 'continue' => T_CONTINUE, 'function' => T_FUNCTION, 'this' => T_STRING, 'with' => 1, 'default' => T_DEFAULT, 'if' => T_IF, 'throw' => T_THROW, 'delete' => 1, 'in' => 1, 'try' => T_TRY, 'do' => T_DO, 'instanceof' => 1, 'typeof' => 1, ); public static function decapse( $encapsed ){ $s = substr($encapsed,1,-1); $l = self::$lex; if( is_null($l) ){ $l = new LocoEscapeParser( array( 'U' => 'U', 'a' => 'a', ) ); self::$lex = $l; } return $l->unescape($s); } public function __construct( $src = '' ){ $this->define('/^(?:\\\\u[0-9A-F]{4,4}|[$_\\pL\\p{Nl}])(?:\\\\u[0-9A-F]{4}|[$_\\pL\\pN\\p{Mn}\\p{Mc}\\p{Pc}])*/ui', array($this,'matchWord') ); $this->define('/^\\s+/u', T_WHITESPACE ); $this->define('!^//.*!', T_COMMENT ); $this->define('!^/\\*.*\\*/!Us', array($this,'matchComment') ); $this->define('/^"(?:\\\\.|[^\\r\\n\\p{Zl}\\p{Zp}"\\\\])*"/u', T_CONSTANT_ENCAPSED_STRING ); $this->define('/^\'(?:\\\\.|[^\\r\\n\\p{Zl}\\p{Zp}\'\\\\])*\'/u', T_CONSTANT_ENCAPSED_STRING ); $this->define('/^[-+;,<>.=:|&^!?*%~(){}[\\]]/'); parent::__construct($src); } public function matchWord( $s ){ if( array_key_exists($s,self::$words) ){ return self::$words[$s]; } return T_STRING; } public function matchComment( $s ){ if( '/**' === substr($s,0,3) ){ return T_DOC_COMMENT; } return T_COMMENT; } }
|
28 |
+
class LocoExtracted implements Countable { private $exp = array(); private $reg = array(); private $dom = array(); private $dflt = ''; public function extractSource( LocoExtractor $ext, $src, $fileref = '' ){ $ext->extract( $this, $ext->tokenize($src), $fileref ); return $this; } public function export(){ return $this->exp; } public function count(){ return count( $this->exp ); } public function getDomainCounts(){ return $this->dom; } public function setDomain( $default ){ $this->dflt = (string) $default; return $this; } public function getDomain(){ return $this->dflt; } public function pushMeta( $source, $notes = '', $domain = null ){ if( ! $domain || '*' === $domain ){ $domain = $this->dflt; } $entry = array( 'id' => '', 'source' => $source, 'target' => '', 'notes' => $notes, ); if( $domain ){ $entry['domain'] = $domain; $key = $source."\1".$domain; } else { $key = $source; } return $this->pushMsgid( $key, $entry, $domain ); } public function pushMsgid( $key, array $entry, $domain ){ if( isset($this->reg[$key]) ){ $index = $this->reg[$key]; $clash = $this->exp[$index]; if( $value = $this->mergeField( $clash, $entry, 'refs', ' ') ){ $this->exp[$index]['refs'] = $value; } if( $value = $this->mergeField( $clash, $entry, 'notes', "\n") ){ $this->exp[$index]['notes'] = $value; } } else { $index = count($this->exp); $this->reg[$key] = $index; $this->exp[$index] = $entry; if( isset($this->dom[$domain]) ){ $this->dom[$domain]++; } else { $this->dom[$domain] = 1; } } return $index; } public function pushMsgidPlural( $skey, array $entry ){ $sindex = $entry['parent']; $pkey = $skey."\2"; if( ! array_key_exists($pkey,$this->reg) ){ $pindex = count($this->exp); $this->reg[$pkey] = $pindex; $this->exp[$pindex] = $entry; if( isset($entry['format']) && ! isset( $this->exp[$sindex]['format']) ) { $this->exp[$sindex]['format'] = $entry['format']; } if( $pindex !== $sindex + $entry['plural']) { $this->exp[$sindex]['child'] = $pindex; } } } public function mergeField( array $old, array $new, $field, $glue ){ $prev = isset($old[$field]) ? $old[$field] : ''; if( isset($new[$field]) ){ $text = $new[$field]; if( '' !== $prev && $prev !== $text ){ if( 'notes' === $field && preg_match( '/^'.preg_quote( rtrim($text,'. '),'/').'[. ]*$/mu', $prev ) ) { $text = $prev; } else { $text = $prev.$glue.$text; } } return $text; } return $prev; } public function filter( $domain ){ $map = array(); $newOffset = 1; $matchAll = '*' === $domain; $raw = array( array( 'id' => '', 'source' => '', 'target' => '', 'domain' => $matchAll ? '' : $domain, ) ); foreach( $this->exp as $oldOffset => $r ){ if( isset($r['parent']) ){ if( isset($map[$r['parent']]) ){ $r['parent'] = $map[ $r['parent'] ]; $raw[ $newOffset++ ] = $r; } } else { if( $matchAll ){ $match = true; } else if( isset($r['domain']) ){ $match = $domain === $r['domain']; } else { $match = $domain === ''; } if( $match ){ $map[ $oldOffset ] = $newOffset; $raw[ $newOffset++ ] = $r; } } } return $raw; } }
|
29 |
abstract class LocoExtractor { private $rules; private $wp = array(); private $domain; abstract public function tokenize( $src ); abstract public function extract( LocoExtracted $strings, LocoTokensInterface $tokens, $fileref = '' ); abstract protected function fsniff( $str ); abstract protected function decapse( $raw ); abstract protected function comment( $comment ); public function __construct( array $rules ){ $this->rules = $rules; } public function setDomain( $default ){ $this->domain = $default; return $this; } public function headerize( array $tags, $domain = '' ){ if( isset($this->wp[$domain]) ){ $this->wp[$domain] += $tags; } else { $this->wp[$domain] = $tags; } return $this; } protected function getHeaders(){ return $this->wp; } final public function extractSource( $src, $fileref ){ $strings = new LocoExtracted; $this->extract( $strings, $this->tokenize($src), $fileref ); return $strings; } public function rule( $s ){ return isset($this->rules[$s]) ? $this->rules[$s] : ''; } protected function push( LocoExtracted $strings, $rule, array $args, $comment = '', $ref = '' ){ $s = strpos( $rule, 's'); $p = strpos( $rule, 'p'); $c = strpos( $rule, 'c'); $d = strpos( $rule, 'd'); if( false === $s || ! isset($args[$s]) ){ return null; } $key = $args[$s]; if( ! is_string($key) ){ return null; } $msgid = $key; $entry = array( 'id' => '', 'source' => $msgid, 'target' => '', ); if( is_int($c) && isset($args[$c]) ){ $entry['context'] = $context = $args[$c]; $key .= "\0". $context; } else if( '' === $msgid ){ return null; } else { $context = null; } if( $ref ){ $entry['refs'] = $ref; } if( is_int($d) && array_key_exists($d,$args) ){ $domain = $args[$d]; if( is_null($domain) ){ $domain = ''; } } else { $domain = $this->domain or $domain = $strings->getDomain(); } if( is_string($domain) && '' !== $domain ){ $entry['domain'] = $domain; $key .= "\1".$domain; } $parse_printf = true; if( $comment = $this->comment($comment) ){ if( preg_match('/^xgettext:\\s*([-a-z]+)-format\\s*/mi', $comment, $r, PREG_OFFSET_CAPTURE ) ){ $entry['format'] = $r[1][0]; $comment = trim( substr_replace( $comment,'', $r[0][1], strlen($r[0][0]) ) ); $parse_printf = ( 'no-' === substr($entry['format'],0,3) ) ? false : null; } if( preg_match('/^references?:( *.+:\\d+)*\\s*/mi', $comment, $r, PREG_OFFSET_CAPTURE ) ){ $entry['refs'] = trim($r[1][0],' '); $comment = trim( substr_replace( $comment, '', $r[0][1], strlen($r[0][0]) ) ); } $entry['notes'] = $comment; } if( $parse_printf && ( $format = $this->fsniff($msgid) ) ){ $entry['format'] = $format; } $index = $strings->pushMsgid( $key, $entry, $domain ); if( is_int($p) && isset($args[$p]) ){ $msgid_plural = $args[$p]; $entry = array( 'id' => '', 'source' => $msgid_plural, 'target' => '', 'plural' => 1, 'parent' => $index, ); if( false !== $parse_printf && ( $format = $this->fsniff($msgid_plural) ) ){ $entry['format'] = $format; } $strings->pushMsgidPlural( $key, $entry ); } return $index; } }
|
30 |
class LocoPHPTokens implements LocoTokensInterface, Countable { private $i; private $tokens; private $skip_tokens = array(); private $literal_tokens = array(); public function __construct( array $tokens ){ $this->tokens = $tokens; $this->rewind(); } public function literal( array $a ){ foreach( $a as $t ){ $this->literal_tokens[ $t ] = 1; } return $this; } public function ignore( array $a ){ foreach( $a as $t ){ $this->skip_tokens[$t] = true; } return $this; } public function export(){ $arr = array(); $this->rewind(); while( $tok = $this->advance() ){ $arr[] = $tok; } return $arr; } public function advance(){ $tok = $this->current(); $this->next(); return $tok; } public function rewind(){ $this->i = ( false === reset($this->tokens) ? null : key($this->tokens) ); } public function valid(){ while( isset($this->i) ){ $tok = $this->tokens[$this->i]; if( array_key_exists( is_array($tok) ? $tok[0] : $tok, $this->skip_tokens ) ){ $this->next(); } else { return true; } } return false; } public function key(){ return $this->i; } public function next(){ $this->i = ( false === next($this->tokens) ? null : key($this->tokens) ); } public function current(){ if( ! $this->valid() ){ return false; } $tok = $this->tokens[$this->i]; if( is_array($tok) && isset($this->literal_tokens[$tok[0]]) ){ return $tok[1]; } return $tok; } public function __toString(){ $s = array(); foreach( $this as $token ){ $s[] = is_array($token) ? $token[1] : $token; } return implode('',$s); } public function count(){ return count($this->tokens); } }
|
31 |
class LocoPHPEscapeParser extends LocoEscapeParser { public function __construct(){ parent::__construct( array( 'n' => "\n", 'r' => "\r", 't' => "\t", 'v' => "\x0B", 'f' => "\x0C", 'e' => "\x1B", '$' => '$', '\\' => '\\', '"' => '"', ) ); } protected function stripSlashes( $s ){ return preg_replace_callback('/\\\\(x[0-9A-Fa-f]{1,2}|[0-3]?[0-7]{1,2})/', array($this,'unescapeMatch'), $s, -1, $n ); } }
|
38 |
class LocoPHPExtractor extends LocoExtractor { private $defs = array(); public function tokenize( $src ){ return new LocoPHPTokens( token_get_all($src) ); } public function decapse( $raw ){ return loco_decapse_php_string( $raw ); } public function fsniff( $str ){ return loco_sniff_php_printf($str) ? 'php' : ''; } protected function comment( $comment ){ $comment = loco_parse_php_comment($comment); $comment = preg_replace('/^translators:\\s+/mi', '', $comment ); return $comment; } public function define( $name, $value ){ if( is_string($value) ){ $this->defs[$name] = $value; } return $this; } public function extract( LocoExtracted $strings, LocoTokensInterface $tokens, $fileref = '' ){ $tokens->ignore( array(T_WHITESPACE) ); $n = 0; $depth = 0; $comment = ''; $narg = 0; $args = array(); $ref = ''; $rule = ''; $wp = $this->getHeaders(); $tokens->rewind(); while( $tok = $tokens->advance() ){ if( is_string($tok) ){ $s = $tok; $t = null; } else { $t = $tok[0]; $s = $tok[1]; } if( $depth ){ if( ')' === $s || ']' === $s ){ if( 0 === --$depth ){ if( $this->push( $strings, $rule, $args, $comment, $ref ) ){ $n++; } $comment = ''; } } else if( '(' === $s || '[' === $s ){ $depth++; $args[$narg] = null; } else if( 1 === $depth ){ if( ',' === $s ){ $narg++; } else if( T_CONSTANT_ENCAPSED_STRING === $t ){ $args[$narg] = $this->decapse($s); } else if( T_STRING === $t && array_key_exists($s,$this->defs) ){ $args[$narg] = $this->defs[$s]; } else { $args[$narg] = null; } } } else if( T_COMMENT === $t || T_DOC_COMMENT === $t ){ $was_header = false; if( 0 === $n ){ if( false !== strpos($s,'* @package') ){ $was_header = true; } if( $wp && ( $header = loco_parse_wp_comment($s) ) ){ foreach( $wp as $domain => $tags ){ foreach( array_intersect_key($header,$tags) as $tag => $source ){ $strings->pushMeta( $source, $tags[$tag], $domain ); $was_header = true; } } } } if( ! $was_header ) { $comment = $s; } } else if( T_STRING === $t && '(' === $tokens->advance() && ( $rule = $this->rule($s) ) ){ $ref = $fileref ? $fileref.':'.$tok[2]: ''; $depth = 1; $args = array(); $narg = 0; } else if( $comment ){ if( false === stripos($comment, 'translators:') && false === strpos($comment, 'xgettext:') ){ $comment = ''; } } } return $this; } }
|
39 |
function loco_sniff_js_printf( $s, $limit = 0 ){ return loco_sniff_printf( $s, '/^%(?:[1-9]\\d*\\$)?\\+?(?:0|\'[^$])?-?\\d*(?:\\.\\d+)?[b-gijostTuvxX%]/', $limit ); }
|
40 |
class LocoJsExtractor extends LocoPHPExtractor { public function tokenize( $src ){ return new LocoJsTokens($src); } public function fsniff( $str ){ return loco_sniff_js_printf($str) ? 'javascript' : ''; } public function decapse( $encapsed ){ return LocoJsTokens::decapse($encapsed); } }
|
41 |
+
class LocoTwigExtractor extends LocoPHPExtractor { public function tokenize( $src ){ $src = '<?php '.preg_replace('/{#([^#]+)#}/su','/*\\1*/',$src); return parent::tokenize($src); } }
|
42 |
function loco_wp_extractor( $type = 'php' ){ static $rules = array( '__' => 'sd', '_e' => 'sd', '_c' => 'sd', '_n' => 'sp_d', '_n_noop' => 'spd', '_nc' => 'sp_d', '__ngettext' => 'spd', '__ngettext_noop' => 'spd', '_x' => 'scd', '_ex' => 'scd', '_nx' => 'sp_cd', '_nx_noop' => 'spcd', 'esc_attr__' => 'sd', 'esc_html__' => 'sd', 'esc_attr_e' => 'sd', 'esc_html_e' => 'sd', 'esc_attr_x' => 'scd', 'esc_html_x' => 'scd', ); if( 'php' === $type ){ $extr = new LocoPHPExtractor($rules); } else if( 'twig' === $type ){ $extr = new LocoTwigExtractor($rules); } else if( 'js' === $type ){ $extr = new LocoJsExtractor($rules); } else { throw new InvalidArgumentException('No string extractor for '.$type); } return $extr; }
|
43 |
function loco_print_percent( $n, $t ){ $s = loco_string_percent( (int) $n, (int) $t ); echo $s,'%'; return ''; }
|
44 |
function loco_print_progress( $translated, $untranslated, $flagged ){ $total = $translated + $untranslated; $complete = loco_string_percent( $translated - $flagged, $total ); $class = 'progress'; if( ! $translated && ! $flagged ){ $class .= ' empty'; } else if( '100' === $complete ){ $class .= ' done'; } echo '<div class="',$class,'"><div class="t">'; if( $flagged ){ $s = loco_string_percent( $flagged, $total ); echo '<div class="bar f" style="width:',$s,'%"> </div>'; } if( '0' === $complete ){ echo ' '; } else { $class = 'bar p'; $p = (int) $complete; $class .= sprintf(' p-%u', 10*floor($p/10) ); $style = 'width:'.$complete.'%'; if( $flagged ){ $remain = 100.0 - (float) $s; $style .= '; max-width: '.sprintf('%s',$remain).'%'; } echo '<div class="',$class,'" style="'.$style.'"> </div>'; } echo '</div><div class="l">',$complete,'%</div></div>'; return ''; }
|
lib/data/locales.php
CHANGED
@@ -2,4 +2,4 @@
|
|
2 |
/**
|
3 |
* Compiled data. Do not edit.
|
4 |
*/
|
5 |
-
return array('af'=>array(0=>'Afrikaans',1=>'Afrikaans'),'ar'=>array(0=>'Arabic',1=>'العربية'),'ary'=>array(0=>'Moroccan Arabic',1=>'العربية المغربية'),'as'=>array(0=>'Assamese',1=>'অসমীয়া'),'
|
2 |
/**
|
3 |
* Compiled data. Do not edit.
|
4 |
*/
|
5 |
+
return array('af'=>array(0=>'Afrikaans',1=>'Afrikaans'),'ar'=>array(0=>'Arabic',1=>'العربية'),'ary'=>array(0=>'Moroccan Arabic',1=>'العربية المغربية'),'as'=>array(0=>'Assamese',1=>'অসমীয়া'),'az'=>array(0=>'Azerbaijani',1=>'Azərbaycan dili'),'azb'=>array(0=>'South Azerbaijani',1=>'گؤنئی آذربایجان'),'bel'=>array(0=>'Belarusian',1=>'Беларуская мова'),'bg_BG'=>array(0=>'Bulgarian',1=>'Български'),'bn_BD'=>array(0=>'Bengali (Bangladesh)',1=>'বাংলা'),'bo'=>array(0=>'Tibetan',1=>'བོད་ཡིག'),'bs_BA'=>array(0=>'Bosnian',1=>'Bosanski'),'ca'=>array(0=>'Catalan',1=>'Català'),'ceb'=>array(0=>'Cebuano',1=>'Cebuano'),'cs_CZ'=>array(0=>'Czech',1=>'Čeština'),'cy'=>array(0=>'Welsh',1=>'Cymraeg'),'da_DK'=>array(0=>'Danish',1=>'Dansk'),'de_DE_formal'=>array(0=>'German (Formal)',1=>'Deutsch (Sie)'),'de_CH_informal'=>array(0=>'German (Switzerland, Informal)',1=>'Deutsch (Schweiz, Du)'),'de_DE'=>array(0=>'German',1=>'Deutsch'),'de_CH'=>array(0=>'German (Switzerland)',1=>'Deutsch (Schweiz)'),'dzo'=>array(0=>'Dzongkha',1=>'རྫོང་ཁ'),'el'=>array(0=>'Greek',1=>'Ελληνικά'),'en_GB'=>array(0=>'English (UK)',1=>'English (UK)'),'en_CA'=>array(0=>'English (Canada)',1=>'English (Canada)'),'en_NZ'=>array(0=>'English (New Zealand)',1=>'English (New Zealand)'),'en_ZA'=>array(0=>'English (South Africa)',1=>'English (South Africa)'),'en_AU'=>array(0=>'English (Australia)',1=>'English (Australia)'),'eo'=>array(0=>'Esperanto',1=>'Esperanto'),'es_GT'=>array(0=>'Spanish (Guatemala)',1=>'Español de Guatemala'),'es_AR'=>array(0=>'Spanish (Argentina)',1=>'Español de Argentina'),'es_CL'=>array(0=>'Spanish (Chile)',1=>'Español de Chile'),'es_VE'=>array(0=>'Spanish (Venezuela)',1=>'Español de Venezuela'),'es_CO'=>array(0=>'Spanish (Colombia)',1=>'Español de Colombia'),'es_MX'=>array(0=>'Spanish (Mexico)',1=>'Español de México'),'es_CR'=>array(0=>'Spanish (Costa Rica)',1=>'Español de Costa Rica'),'es_PE'=>array(0=>'Spanish (Peru)',1=>'Español de Perú'),'es_ES'=>array(0=>'Spanish (Spain)',1=>'Español'),'et'=>array(0=>'Estonian',1=>'Eesti'),'eu'=>array(0=>'Basque',1=>'Euskara'),'fa_IR'=>array(0=>'Persian',1=>'فارسی'),'fi'=>array(0=>'Finnish',1=>'Suomi'),'fr_BE'=>array(0=>'French (Belgium)',1=>'Français de Belgique'),'fr_CA'=>array(0=>'French (Canada)',1=>'Français du Canada'),'fr_FR'=>array(0=>'French (France)',1=>'Français'),'fur'=>array(0=>'Friulian',1=>'Friulian'),'gd'=>array(0=>'Scottish Gaelic',1=>'Gàidhlig'),'gl_ES'=>array(0=>'Galician',1=>'Galego'),'gu'=>array(0=>'Gujarati',1=>'ગુજરાતી'),'haz'=>array(0=>'Hazaragi',1=>'هزاره گی'),'he_IL'=>array(0=>'Hebrew',1=>'עִבְרִית'),'hi_IN'=>array(0=>'Hindi',1=>'हिन्दी'),'hr'=>array(0=>'Croatian',1=>'Hrvatski'),'hu_HU'=>array(0=>'Hungarian',1=>'Magyar'),'hy'=>array(0=>'Armenian',1=>'Հայերեն'),'id_ID'=>array(0=>'Indonesian',1=>'Bahasa Indonesia'),'is_IS'=>array(0=>'Icelandic',1=>'Íslenska'),'it_IT'=>array(0=>'Italian',1=>'Italiano'),'ja'=>array(0=>'Japanese',1=>'日本語'),'jv_ID'=>array(0=>'Javanese',1=>'Basa Jawa'),'ka_GE'=>array(0=>'Georgian',1=>'ქართული'),'kab'=>array(0=>'Kabyle',1=>'Taqbaylit'),'kk'=>array(0=>'Kazakh',1=>'Қазақ тілі'),'km'=>array(0=>'Khmer',1=>'ភាសាខ្មែរ'),'ko_KR'=>array(0=>'Korean',1=>'한국어'),'ckb'=>array(0=>'Kurdish (Sorani)',1=>'كوردی'),'lo'=>array(0=>'Lao',1=>'ພາສາລາວ'),'lt_LT'=>array(0=>'Lithuanian',1=>'Lietuvių kalba'),'lv'=>array(0=>'Latvian',1=>'Latviešu valoda'),'mk_MK'=>array(0=>'Macedonian',1=>'Македонски јазик'),'ml_IN'=>array(0=>'Malayalam',1=>'മലയാളം'),'mn'=>array(0=>'Mongolian',1=>'Монгол'),'mr'=>array(0=>'Marathi',1=>'मराठी'),'ms_MY'=>array(0=>'Malay',1=>'Bahasa Melayu'),'my_MM'=>array(0=>'Myanmar (Burmese)',1=>'ဗမာစာ'),'nb_NO'=>array(0=>'Norwegian (Bokmål)',1=>'Norsk bokmål'),'ne_NP'=>array(0=>'Nepali',1=>'नेपाली'),'nl_NL_formal'=>array(0=>'Dutch (Formal)',1=>'Nederlands (Formeel)'),'nl_NL'=>array(0=>'Dutch',1=>'Nederlands'),'nl_BE'=>array(0=>'Dutch (Belgium)',1=>'Nederlands (België)'),'nn_NO'=>array(0=>'Norwegian (Nynorsk)',1=>'Norsk nynorsk'),'oci'=>array(0=>'Occitan',1=>'Occitan'),'pa_IN'=>array(0=>'Punjabi',1=>'ਪੰਜਾਬੀ'),'pl_PL'=>array(0=>'Polish',1=>'Polski'),'ps'=>array(0=>'Pashto',1=>'پښتو'),'pt_BR'=>array(0=>'Portuguese (Brazil)',1=>'Português do Brasil'),'pt_PT'=>array(0=>'Portuguese (Portugal)',1=>'Português'),'pt_PT_ao90'=>array(0=>'Portuguese (Portugal, AO90)',1=>'Português (AO90)'),'rhg'=>array(0=>'Rohingya',1=>'Ruáinga'),'ro_RO'=>array(0=>'Romanian',1=>'Română'),'ru_RU'=>array(0=>'Russian',1=>'Русский'),'sah'=>array(0=>'Sakha',1=>'Сахалыы'),'si_LK'=>array(0=>'Sinhala',1=>'සිංහල'),'sk_SK'=>array(0=>'Slovak',1=>'Slovenčina'),'sl_SI'=>array(0=>'Slovenian',1=>'Slovenščina'),'sq'=>array(0=>'Albanian',1=>'Shqip'),'sr_RS'=>array(0=>'Serbian',1=>'Српски језик'),'sv_SE'=>array(0=>'Swedish',1=>'Svenska'),'szl'=>array(0=>'Silesian',1=>'Ślōnskŏ gŏdka'),'ta_IN'=>array(0=>'Tamil',1=>'தமிழ்'),'te'=>array(0=>'Telugu',1=>'తెలుగు'),'th'=>array(0=>'Thai',1=>'ไทย'),'tl'=>array(0=>'Tagalog',1=>'Tagalog'),'tr_TR'=>array(0=>'Turkish',1=>'Türkçe'),'tt_RU'=>array(0=>'Tatar',1=>'Татар теле'),'tah'=>array(0=>'Tahitian',1=>'Reo Tahiti'),'ug_CN'=>array(0=>'Uighur',1=>'ئۇيغۇرچە'),'uk'=>array(0=>'Ukrainian',1=>'Українська'),'ur'=>array(0=>'Urdu',1=>'اردو'),'uz_UZ'=>array(0=>'Uzbek',1=>'O‘zbekcha'),'vi'=>array(0=>'Vietnamese',1=>'Tiếng Việt'),'zh_CN'=>array(0=>'Chinese (China)',1=>'简体中文'),'zh_TW'=>array(0=>'Chinese (Taiwan)',1=>'繁體中文'),'zh_HK'=>array(0=>'Chinese (Hong Kong)',1=>'香港中文版 '));
|
loco.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Loco Translate
|
|
4 |
Plugin URI: https://wordpress.org/plugins/loco-translate/
|
5 |
Description: Translate themes and plugins directly in WordPress
|
6 |
Author: Tim Whitlock
|
7 |
-
Version: 2.4.
|
8 |
Author URI: https://localise.biz/wordpress/plugin
|
9 |
Text Domain: loco-translate
|
10 |
Domain Path: /languages/
|
@@ -30,7 +30,7 @@ function loco_plugin_file(){
|
|
30 |
* @return string
|
31 |
*/
|
32 |
function loco_plugin_version(){
|
33 |
-
return '2.4.
|
34 |
}
|
35 |
|
36 |
|
@@ -98,7 +98,18 @@ function loco_constant( $name ){
|
|
98 |
function loco_include( $relpath ){
|
99 |
$path = loco_plugin_root().'/'.$relpath;
|
100 |
if( ! file_exists($path) ){
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
}
|
103 |
return include $path;
|
104 |
}
|
@@ -137,7 +148,7 @@ function loco_check_extension( $name ) {
|
|
137 |
|
138 |
/**
|
139 |
* Class autoloader for Loco classes under src directory.
|
140 |
-
* e.g. class "
|
141 |
* Also does autoload for polyfills under "src/compat" if $name < 20 chars
|
142 |
*
|
143 |
* @internal
|
@@ -156,22 +167,44 @@ function loco_autoload( $name ){
|
|
156 |
}
|
157 |
}
|
158 |
|
159 |
-
spl_autoload_register( 'loco_autoload', false );
|
160 |
-
|
161 |
|
162 |
-
|
163 |
-
|
164 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
}
|
166 |
|
167 |
|
168 |
-
//
|
169 |
-
|
170 |
-
|
171 |
-
|
|
|
|
|
|
|
|
|
172 |
|
|
|
|
|
|
|
|
|
173 |
|
174 |
-
// initialize hooks for admin screens
|
175 |
-
if( is_admin() ){
|
176 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
}
|
4 |
Plugin URI: https://wordpress.org/plugins/loco-translate/
|
5 |
Description: Translate themes and plugins directly in WordPress
|
6 |
Author: Tim Whitlock
|
7 |
+
Version: 2.4.4
|
8 |
Author URI: https://localise.biz/wordpress/plugin
|
9 |
Text Domain: loco-translate
|
10 |
Domain Path: /languages/
|
30 |
* @return string
|
31 |
*/
|
32 |
function loco_plugin_version(){
|
33 |
+
return '2.4.4';
|
34 |
}
|
35 |
|
36 |
|
98 |
function loco_include( $relpath ){
|
99 |
$path = loco_plugin_root().'/'.$relpath;
|
100 |
if( ! file_exists($path) ){
|
101 |
+
$message = 'File not found: '.$path;
|
102 |
+
// debug specifics to error log in case full call stack not visible
|
103 |
+
if( 'cli' !== PHP_SAPI ) {
|
104 |
+
error_log( sprintf( '[Loco.debug] Failed on loco_include(%s). !file_exists(%s)', var_export($relpath,true), var_export($path,true) ), 0 );
|
105 |
+
}
|
106 |
+
// handle circular file inclusion error if error class not found
|
107 |
+
if( loco_class_exists('Loco_error_Exception') ){
|
108 |
+
throw new Loco_error_Exception($message);
|
109 |
+
}
|
110 |
+
else {
|
111 |
+
throw new Exception($message.'; additionally src/error/Exception.php not loadable');
|
112 |
+
}
|
113 |
}
|
114 |
return include $path;
|
115 |
}
|
148 |
|
149 |
/**
|
150 |
* Class autoloader for Loco classes under src directory.
|
151 |
+
* e.g. class "Loco_foo_Bar" wil be found in "src/foo/Bar.php"
|
152 |
* Also does autoload for polyfills under "src/compat" if $name < 20 chars
|
153 |
*
|
154 |
* @internal
|
167 |
}
|
168 |
}
|
169 |
|
|
|
|
|
170 |
|
171 |
+
/**
|
172 |
+
* class_exists wrapper that fails silently.
|
173 |
+
* @param string class name
|
174 |
+
* @return bool
|
175 |
+
*/
|
176 |
+
function loco_class_exists( $class ){
|
177 |
+
try {
|
178 |
+
return class_exists($class,true);
|
179 |
+
}
|
180 |
+
catch( Exception $e ){
|
181 |
+
return false;
|
182 |
+
}
|
183 |
}
|
184 |
|
185 |
|
186 |
+
// Startup errors will raise notices. Check your error logs if error reporting is quiet
|
187 |
+
try {
|
188 |
+
spl_autoload_register( 'loco_autoload', false );
|
189 |
+
|
190 |
+
// provide safe directory for custom translations that won't be deleted during auto-updates
|
191 |
+
if ( ! defined( 'LOCO_LANG_DIR' ) ) {
|
192 |
+
define( 'LOCO_LANG_DIR', trailingslashit( loco_constant('WP_LANG_DIR') ) . 'loco' );
|
193 |
+
}
|
194 |
|
195 |
+
// text domain loading helper for custom file locations. Set constant empty to disable
|
196 |
+
if ( LOCO_LANG_DIR ) {
|
197 |
+
new Loco_hooks_LoadHelper;
|
198 |
+
}
|
199 |
|
200 |
+
// initialize hooks for admin screens
|
201 |
+
if ( is_admin() ) {
|
202 |
+
new Loco_hooks_AdminHooks;
|
203 |
+
}
|
204 |
+
}
|
205 |
+
catch( Exception $e ){ // PHP5+
|
206 |
+
trigger_error(sprintf('[Loco.fatal] %s in %s:%u',$e->getMessage(), $e->getFile(), $e->getLine() ),E_USER_NOTICE);
|
207 |
+
}
|
208 |
+
catch( Throwable $e ){ // PHP7+
|
209 |
+
trigger_error(sprintf('[Loco.fatal] %s in %s:%u',$e->getMessage(), $e->getFile(), $e->getLine() ),E_USER_NOTICE);
|
210 |
}
|
pub/css/admin.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.4.1);background-repeat:no-repeat;min-height:16px}._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.4.1) 0 0 no-repeat;min-height:75px}._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.4.1);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.4.1);background-size:16px}._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.4.1);background-size:16px}}._green_glow_inner{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}.loco-font,#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco-admin.wrap .icon,#loco-admin.wrap .has-icon:before{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@font-face{font-family:"loco";src:url("../font/loco.eot?v=2.4.1");src:url("../font/loco.eot?v=2.4.1?#iefix") format("embedded-opentype"),url("../font/loco.woff?v=2.4.1") format("woff"),url("../font/loco.ttf?v=2.4.1") format("truetype"),url("../font/loco.svg?v=2.4.1#loco") format("svg");font-weight:normal;font-style:normal}.tipsy{font-size:11px;position:absolute;padding:5px;z-index:500001;opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.tipsy.in{opacity:1}.tipsy-inner{background-color:#000;color:#fff;white-space:nowrap;padding:6px 8px;line-height:1.3em;text-align:center;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-webkit-font-smoothing:subpixel-antialiased}.tipsy-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.tipsy-n .tipsy-arrow{top:0px;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-nw .tipsy-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-ne .tipsy-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-s .tipsy-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-sw .tipsy-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-se .tipsy-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-e .tipsy-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.tipsy-w .tipsy-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}#loco-admin.wrap .selector li,#loco-admin.wrap .selector .handle,#loco-admin.wrap .selectoradd a,#loco-admin.wrap .selectorsep:before,#loco-admin.wrap .selectorsep span{padding:.3em .75em}#loco-admin.wrap .selector{text-align:left;display:inline-block;white-space:nowrap}#loco-admin.wrap .selectoradd a,#loco-admin.wrap .selector .handle{cursor:default;display:block;position:relative;border-top:solid 1px #fff;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd;border-left:solid 1px #fff;color:#666;height:1.3em;overflow:hidden;white-space:normal}#loco-admin.wrap .selectorsep{display:inline-block;border:solid 1px transparent}#loco-admin.wrap .selectorsep:before{display:block;position:relative;color:#999;height:1.3em;overflow:hidden}#loco-admin.wrap .selectorsep>*{display:block;line-height:1em;color:#666;height:1.3em;overflow:hidden}#loco-admin.wrap .selector .handle{outline:none;white-space:nowrap;padding-right:2.3em;max-width:250px;text-overflow:ellipsis}#loco-admin.wrap .selector .handle .prefix{padding-right:.6ex}#loco-admin.wrap .selector .handle:after{font-family:loco;font-size:1.3em;color:#ccc;display:block;position:absolute;top:.25em;right:.6em;content:"▼"}#loco-admin.wrap .selector .handle:focus:after,#loco-admin.wrap .selector .handle:hover:after{color:#666}#loco-admin.wrap .selector.no-caret .handle{padding-right:.75em}#loco-admin.wrap .selector.no-caret .handle:after{display:none}#loco-admin.wrap .selector.no-title .handle{padding-left:.5em;padding-right:.5em}#loco-admin.wrap .selector.no-title .handle .label{display:none}#loco-admin.wrap .selector.no-title .handle .icon{margin-right:0px}#loco-admin.wrap .selector.dummy .handle{border-color:transparent}#loco-admin.wrap .selector.dummy .handle:after{display:none}#loco-admin.wrap .selectoradd{position:relative}#loco-admin.wrap .selectoradd>*{display:block;float:left;clear:none}#loco-admin.wrap .selectoradd>a.has-icon{width:1.3em}#loco-admin.wrap .selectoradd>a.has-icon:before{color:#999;display:inline;padding-left:0;padding-right:0;line-height:1.4em}#loco-admin.wrap .selectoradd>a.has-icon:hover:after{color:#2e892e}#loco-admin.wrap .selectorsep{display:inline-block}#loco-admin.wrap .selectorsep span{color:#666;height:1.3em}#loco-admin.wrap .selector ul{padding:0}#loco-admin.wrap .selector ul,#loco-admin.wrap .selector li{display:block;position:relative;cursor:default;margin:0}#loco-admin.wrap .selector ul{z-index:5;position:absolute;left:0;top:0;background:#f5f5f5;box-shadow:0 10px 5px rgba(0,0,0,.2);border:solid 1px #ccc;overflow:auto}#loco-admin.wrap .selector.up ul{margin-top:0}#loco-admin.wrap .selector.multi li input{display:none}#loco-admin.wrap .selector.multi li.checked{background:#e5e5e5}#loco-admin.wrap .selector li.active{background:#e5e5e5 !important}#loco-admin.wrap .selector li.over{background:#ccc !important;color:#fff;text-shadow:1px 1px #aaa}#loco-admin.wrap .selector li.over .label{color:#fff}#loco-admin.wrap .selector .label{font:inherit;color:inherit}#loco-admin.wrap .selector .icon{display:inline-block;min-width:1.2em;text-align:center;font-size:14px}#loco-admin.wrap .selector .icon.no-icon{display:none}#loco-admin.wrap .selector .icon:before{color:#666}#loco-admin.wrap .selector .avtr{width:18px;height:18px;background-size:18px;background-repeat:no-repeat}#loco-admin.wrap .selector .label{line-height:1}#loco-admin.wrap .selector .icon,#loco-admin.wrap .selector .icon-16{vertical-align:bottom}#loco-admin.wrap .selector .icon,#loco-admin.wrap .selector .lang,#loco-admin.wrap .selector .icon-16{margin-right:5px}#loco-admin.wrap .selector .region,#loco-admin.wrap .selector .variant-wales,#loco-admin.wrap .selector .region-gb.lang-cy,#loco-admin.wrap .selector .variant-scotland,#loco-admin.wrap .selector .region-gb.lang-gd,#loco-admin.wrap .selector .variant-valencia,#loco-admin.wrap .selector .region-es.variant-valencia,#loco-admin.wrap .selector .lang-ca,#loco-admin.wrap .selector .region-es.lang-ca,#loco-admin.wrap .selector .lang-eo,#loco-admin.wrap .selector .lang-eu{margin-left:2px;margin-right:7px}#loco-admin.wrap .selector.ticked .icon.no-icon{font-size:12px;display:inline-block}#loco-admin.wrap .selector.ticked .active .icon.no-icon:before{content:"✓"}#loco-admin.wrap .selectoradd a:hover,#loco-admin.wrap .selector a.handle:focus,#loco-admin.wrap .selector a.handle:hover{color:#000;border-color:#999}#loco-admin.wrap .selector.active .handle{border-color:#999;background-color:#eee;color:#999}#loco-admin.wrap .selector.active .handle:after{color:#999;content:"▲"}#loco-admin.wrap .selector.disabled{cursor:default;cursor:no-drop;cursor:not-allowed}#loco-admin.wrap .selector.disabled .handle{pointer-events:none;border-top:solid 1px #fff;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd;border-left:solid 1px #fff;color:#999;padding-right:1em}#loco-admin.wrap .selector.disabled .handle:after{display:none}#loco-admin.wrap .selector.disabled .handle span.icon{color:#999 !important}#loco-admin.wrap .selector li.disabled,#loco-admin.wrap .selector li.disabled.over{color:#aaa;text-shadow:1px 1px #fff;pointer-events:none}#loco-admin.wrap .selector li.disabled *{cursor:text}#loco-admin.wrap .selector li.disabled .icon:before{color:#aaa}#loco-admin.wrap .selector li.disabled .flag,#loco-admin.wrap .selector li.disabled .icon-16{opacity:.4}#loco-admin.wrap .selector.lefty ul{left:auto;right:0}#loco-admin.wrap .selector.lefty ul .icon,#loco-admin.wrap .selector.lefty ul .icon-32{display:block;float:right;clear:none}#loco-admin.wrap .selector.lefty ul .label{padding-right:32px;padding-left:0}#loco-admin.wrap .selector ul>form{margin:0;display:block}#loco-admin.wrap .selector ul>form input{margin:0;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}#loco-admin.wrap .selector ul>form input:focus{-webkit-box-shadow:inset 0 0 5px 0 #3db63d;-moz-box-shadow:inset 0 0 5px 0 #3db63d;box-shadow:inset 0 0 5px 0 #3db63d}#loco-admin.wrap .selector ul>form input.error{border-color:#c00;-webkit-box-shadow:inset 0 0 5px 0 rgba(153,0,0,.5);-moz-box-shadow:inset 0 0 5px 0 rgba(153,0,0,.5);box-shadow:inset 0 0 5px 0 rgba(153,0,0,.5)}#loco-admin.wrap .selector ul>form a.clear{margin:0;border:none}#loco-admin.wrap .selector ul>form ::placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco-admin.wrap .selector ul>form ::-webkit-input-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco-admin.wrap .selector ul>form :-moz-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block;opacity:1}#loco-admin.wrap .selector ul>form ::-moz-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block;opacity:1}#loco-admin.wrap .selector ul>form :-ms-input-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco-admin.wrap .selector ul>form .ielt10 .placeheld{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco-admin.wrap div.auto-comp-wrap{width:100%}#loco-admin.wrap div.auto-comp-wrap input{display:inline-block}#loco-admin.wrap div.auto-comp-wrap.loading input{background:transparent url(../img/ajax-loader.gif?v=2.4.1) right 2px no-repeat}#loco-admin.wrap div.auto-comp-drop{color:#333;background:#fff;border-top:none;position:absolute;width:auto;top:0;left:0;z-index:99;-webkit-box-shadow:0 5px 5px rgba(0,0,0,.4);-moz-box-shadow:0 5px 5px rgba(0,0,0,.4);box-shadow:0 5px 5px rgba(0,0,0,.4)}#loco-admin.wrap div.auto-comp-result{padding:5px 10px;cursor:pointer;background:#f0f0f0;border-top:solid 1px #fff;border-bottom:solid 1px #ddd;white-space:nowrap}#loco-admin.wrap div.auto-comp-result:first-child{border-top:solid 1px #ddd}#loco-admin.wrap div.auto-comp-result>*{display:inline-block;vertical-align:middle;line-height:normal}#loco-admin.wrap div.auto-comp-result .icon:before{padding-right:5px}#loco-admin.wrap div.auto-comp-result:hover{background:#a8a8a8;color:#fff;border-top-color:#a8a8a8;border-bottom-color:#999}#loco-admin.wrap div.auto-comp-result.selected{background:#666 !important;color:#fff;border-top-color:#666;border-bottom-color:#666}#loco-admin.wrap div.auto-comp-result .lang,#loco-admin.wrap div.auto-comp-result .region,#loco-admin.wrap div.auto-comp-result .variant-wales,#loco-admin.wrap div.auto-comp-result .region-gb.lang-cy,#loco-admin.wrap div.auto-comp-result .variant-scotland,#loco-admin.wrap div.auto-comp-result .region-gb.lang-gd,#loco-admin.wrap div.auto-comp-result .variant-valencia,#loco-admin.wrap div.auto-comp-result .region-es.variant-valencia,#loco-admin.wrap div.auto-comp-result .lang-ca,#loco-admin.wrap div.auto-comp-result .region-es.lang-ca,#loco-admin.wrap div.auto-comp-result .lang-eo,#loco-admin.wrap div.auto-comp-result .lang-eu,#loco-admin.wrap div.auto-comp-result .avtr{margin-right:5px}#loco-admin.wrap div.auto-comp-wrap.error a.icon.clear:before{color:#c00;opacity:1}#loco-admin.wrap div.auto-comp-wrap.error input[type=text]{border-color:#c00;color:#c00}#loco-admin.wrap div.auto-comp-wrap.error input[type=text]:focus{-webkit-box-shadow:0 0 .5em 0 rgba(153,0,0,.5);-moz-box-shadow:0 0 .5em 0 rgba(153,0,0,.5);box-shadow:0 0 .5em 0 rgba(153,0,0,.5)}#loco-admin.wrap ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.4.1);background-repeat:no-repeat;min-height:16px}#loco-admin.wrap ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.4.1) 0 0 no-repeat;min-height:75px}#loco-admin.wrap ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.4.1);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){#loco-admin.wrap ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.4.1);background-size:16px}#loco-admin.wrap ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.4.1);background-size:16px}}#loco-admin.wrap ._green_glow_inner{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}#loco-admin.wrap ._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}#loco-admin.wrap .loco-font,#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco-admin.wrap .icon,#loco-admin.wrap .has-icon:before{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco-admin.wrap .has-icon:before{display:inline-block;padding-right:.3em}#loco-admin.wrap a.icon-help{cursor:help}#loco-admin.wrap a.icon-help span{display:none}#loco-admin.wrap .icon-notag:before{content:""}#loco-admin.wrap .icon-python:before{content:"🐍"}#loco-admin.wrap .icon-unicode:before{content:"u"}#loco-admin.wrap .icon-json:before{content:"{"}#loco-admin.wrap .icon-bullist:before{content:""}#loco-admin.wrap .icon-numlist:before{content:""}#loco-admin.wrap .icon-indent:before{content:""}#loco-admin.wrap .icon-outdent:before{content:""}#loco-admin.wrap .icon-link:before{content:""}#loco-admin.wrap .icon-unlink:before{content:""}#loco-admin.wrap .icon-bold:before{content:"B"}#loco-admin.wrap .icon-italic:before{content:"I"}#loco-admin.wrap .icon-translate:before{content:""}#loco-admin.wrap .icon-proj:before{content:""}#loco-admin.wrap .icon-plural:before{content:"᛬"}#loco-admin.wrap .icon-max:before,#loco-admin.wrap .icon-full-screen:before{content:""}#loco-admin.wrap .icon-min:before{content:""}#loco-admin.wrap .icon-sort:before{content:""}#loco-admin.wrap .icon-ok:before,#loco-admin.wrap .notice-success>.has-icon:before,#loco-admin.wrap .notice-success p>strong.has-icon:before{content:"✓"}#loco-admin.wrap .icon-ok-empty:before{content:"🗌"}#loco-admin.wrap .icon-checkbox-checked:before,#loco-admin.wrap .selector.multi li.checked .icon-checkbox:before{content:"☑"}#loco-admin.wrap .icon-checkbox-unchecked:before{content:"☐"}#loco-admin.wrap .icon-checkbox-partial:before{content:"☉"}#loco-admin.wrap .icon-radio-checked:before{content:"⚫"}#loco-admin.wrap .icon-radio-unchecked:before{content:"⚪"}#loco-admin.wrap .icon-ext:before{content:"⬈"}#loco-admin.wrap .icon-share:before{content:""}#loco-admin.wrap .icon-star:before{content:""}#loco-admin.wrap .icon-user:before{content:""}#loco-admin.wrap .icon-remove:before{content:"×"}#loco-admin.wrap .icon-cog:before{content:""}#loco-admin.wrap .icon-trash:before{content:""}#loco-admin.wrap .icon-time:before,#loco-admin.wrap .icon-history:before{content:""}#loco-admin.wrap .icon-download:before{content:""}#loco-admin.wrap .icon-revert:before{content:""}#loco-admin.wrap .icon-sync:before{content:""}#loco-admin.wrap .icon-lock:before,#loco-admin.wrap .notice-locked>.has-icon:before,#loco-admin.wrap .notice-locked p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-flag:before{content:""}#loco-admin.wrap .icon-tag:before{content:""}#loco-admin.wrap .icon-tags:before{content:""}#loco-admin.wrap .icon-print:before{content:""}#loco-admin.wrap .icon-camera:before{content:""}#loco-admin.wrap .icon-pencil:before{content:""}#loco-admin.wrap .icon-add:before{content:""}#loco-admin.wrap .icon-del:before{content:""}#loco-admin.wrap .icon-clear:before,#loco-admin.wrap a.icon.clear:before{content:""}#loco-admin.wrap .icon-ok-sign:before{content:"✔"}#loco-admin.wrap .icon-help:before{content:"?"}#loco-admin.wrap .icon-info:before,#loco-admin.wrap .notice-info>.has-icon:before,#loco-admin.wrap .notice-info p>strong.has-icon:before{content:"ℹ"}#loco-admin.wrap .icon-cancel:before{content:""}#loco-admin.wrap .icon-warn:before,#loco-admin.wrap .notice-error>.has-icon:before,#loco-admin.wrap .notice-error p>strong.has-icon:before,#loco-admin.wrap .notice-warning>.has-icon:before,#loco-admin.wrap .notice-warning p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-comment:before{content:""}#loco-admin.wrap .icon-bar-chart:before{content:""}#loco-admin.wrap .icon-key:before{content:""}#loco-admin.wrap .icon-cogs:before{content:""}#loco-admin.wrap .icon-comments:before{content:""}#loco-admin.wrap .icon-signout:before{content:""}#loco-admin.wrap .icon-signin:before{content:""}#loco-admin.wrap .icon-upload:before{content:""}#loco-admin.wrap .icon-twitter:before{content:"🐦"}#loco-admin.wrap .icon-facebook:before{content:""}#loco-admin.wrap .icon-github:before{content:""}#loco-admin.wrap .icon-feed:before{content:""}#loco-admin.wrap .icon-globe:before{content:""}#loco-admin.wrap .icon-wrench:before,#loco-admin.wrap .notice-debug>.has-icon:before,#loco-admin.wrap .notice-debug p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-group:before{content:""}#loco-admin.wrap .icon-cloud:before{content:""}#loco-admin.wrap .icon-copy:before{content:""}#loco-admin.wrap .icon-save:before{content:""}#loco-admin.wrap .icon-menu:before{content:""}#loco-admin.wrap .icon-table:before{content:""}#loco-admin.wrap .icon-caret-down:before{content:"▼"}#loco-admin.wrap .icon-caret-up:before{content:"▲"}#loco-admin.wrap .icon-caret-right:before{content:"▶"}#loco-admin.wrap .icon-mail:before{content:""}#loco-admin.wrap .icon-cloud-upload:before{content:""}#loco-admin.wrap .icon-file:before{content:""}#loco-admin.wrap .icon-circle-white:before{content:"⚬"}#loco-admin.wrap .icon-circle-black:before{content:"●"}#loco-admin.wrap .icon-eraser:before{content:""}#loco-admin.wrap .icon-unlock:before{content:""}#loco-admin.wrap .icon-apple:before{content:""}#loco-admin.wrap .icon-android:before{content:""}#loco-admin.wrap .icon-robot:before{content:"🤖"}#loco-admin.wrap .icon-back:before{content:"⬅"}#loco-admin.wrap .icon-next:before{content:"➔"}#loco-admin.wrap .icon-arrow-up:before{content:""}#loco-admin.wrap .icon-ccard:before{content:""}#loco-admin.wrap .icon-caret-left:before{content:"◀"}#loco-admin.wrap .icon-pro:before{content:"⚡"}#loco-admin.wrap .icon-bell:before{content:""}#loco-admin.wrap .icon-code:before{content:""}#loco-admin.wrap .icon-privacy:before{content:"🛡"}#loco-admin.wrap .icon-hellip:before{content:"…"}#loco-admin.wrap .icon-vellip:before{content:"⁞"}#loco-admin.wrap .icon-collapse:before{content:""}#loco-admin.wrap .icon-expand:before{content:""}#loco-admin.wrap .icon-wordpress:before{content:""}#loco-admin.wrap .icon-database:before{content:""}#loco-admin.wrap .icon-restore:before{content:""}#loco-admin.wrap .icon-pilcrow:before{content:"¶"}#loco-admin.wrap .icon-status.is-translated:before,#loco-admin.wrap .is-translated>header>.icon-status:before{color:#2e892e;content:"✓";text-align:center}#loco-admin.wrap .icon-status.is-untranslated:before,#loco-admin.wrap .is-untranslated>header>.icon-status:before{color:#aaa;content:"×";text-align:center;font-size:1.1em}#loco-admin.wrap .icon-status.is-flagged:before,#loco-admin.wrap .is-flagged>header>.icon-status:before{color:#bd2c00;content:"";text-align:center}#loco-admin.wrap .icon-status.is-translated.is-blank:before,#loco-admin.wrap .icon-status.is-translated.is-inherit:before,#loco-admin.wrap .is-translated.is-blank>header>.icon-status:before,#loco-admin.wrap .is-translated.is-inherit>header>.icon-status:before{content:"🗌"}#loco-admin.wrap .icon-status.is-fuzzy:before,#loco-admin.wrap .is-fuzzy>header>.icon-status:before{color:#666;content:""}#loco-admin.wrap .lang,#loco-admin.wrap .region,#loco-admin.wrap .variant-wales,#loco-admin.wrap .region-gb.lang-cy,#loco-admin.wrap .variant-scotland,#loco-admin.wrap .region-gb.lang-gd,#loco-admin.wrap .variant-valencia,#loco-admin.wrap .region-es.variant-valencia,#loco-admin.wrap .lang-ca,#loco-admin.wrap .region-es.lang-ca,#loco-admin.wrap .lang-eo,#loco-admin.wrap .lang-eu{color:#fff;background:#2e892e;display:inline-block;text-transform:uppercase;overflow:hidden;font-family:Verdana,Arial,sans-serif;font-size:9px;font-weight:normal;font-style:normal;line-height:12px;text-align:center;white-space:normal;text-shadow:none}#loco-admin.wrap .lang{width:20px;height:12px;line-height:12px;vertical-align:middle}#loco-admin.wrap .lang:before{content:attr(lang);vertical-align:baseline}#loco-admin.wrap .no-lang{width:18px;height:10px;border:solid 1px #2e892e;background:transparent}#loco-admin.wrap .lang-el{background-color:#1d48a3}#loco-admin.wrap .lang-el:before{content:"Ελ"}#loco-admin.wrap .region,#loco-admin.wrap .variant-wales,#loco-admin.wrap .region-gb.lang-cy,#loco-admin.wrap .variant-scotland,#loco-admin.wrap .region-gb.lang-gd,#loco-admin.wrap .variant-valencia,#loco-admin.wrap .region-es.variant-valencia,#loco-admin.wrap .lang-ca,#loco-admin.wrap .region-es.lang-ca,#loco-admin.wrap .lang-eo,#loco-admin.wrap .lang-eu{width:16px;height:12px;margin:0 2px;background-image:url(../img/flags.png?v=2.4.1);background-repeat:no-repeat;background-color:transparent}#loco-admin.wrap .region:before,#loco-admin.wrap .variant-wales:before,#loco-admin.wrap .region-gb.lang-cy:before,#loco-admin.wrap .variant-scotland:before,#loco-admin.wrap .region-gb.lang-gd:before,#loco-admin.wrap .variant-valencia:before,#loco-admin.wrap .region-es.variant-valencia:before,#loco-admin.wrap .lang-ca:before,#loco-admin.wrap .region-es.lang-ca:before,#loco-admin.wrap .lang-eo:before,#loco-admin.wrap .lang-eu:before{visibility:hidden}#loco-admin.wrap .lang-zh{background-color:#b90000}#loco-admin.wrap .lang-zh.script-hans:before{content:"中国"}#loco-admin.wrap .lang-zh.script-hant:before{content:"中國"}#loco-admin.wrap .__{background-position:0 0}#loco-admin.wrap .lang-eo{background-position:0 -12px}#loco-admin.wrap .lang-eu{background-position:0 -24px}#loco-admin.wrap .lang-ca,#loco-admin.wrap .region-es.lang-ca{background-position:0 -36px}#loco-admin.wrap .region-tg{background-position:0 -48px}#loco-admin.wrap .region-me{background-position:0 -60px}#loco-admin.wrap .region-la{background-position:0 -73px}#loco-admin.wrap .region-mr{background-position:0 -85px}#loco-admin.wrap .region-ni{background-position:0 -97px}#loco-admin.wrap .region-lv{background-position:0 -109px}#loco-admin.wrap .region-om{background-position:0 -121px}#loco-admin.wrap .region-af{background-position:0 -133px}#loco-admin.wrap .region-cy{background-position:0 -145px}#loco-admin.wrap .region-bj{background-position:0 -157px}#loco-admin.wrap .region-aq{background-position:0 -169px}#loco-admin.wrap .region-cn{background-position:0 -186px}#loco-admin.wrap .region-co{background-position:0 -198px}#loco-admin.wrap .region-cx{background-position:0 -210px}#loco-admin.wrap .region-ag{background-position:0 -222px}#loco-admin.wrap .region-ms{background-position:0 -234px}#loco-admin.wrap .region-md{background-position:0 -246px}#loco-admin.wrap .region-zm{background-position:0 -258px}#loco-admin.wrap .region-vn{background-position:0 -270px}#loco-admin.wrap .region-tf{background-position:0 -282px}#loco-admin.wrap .region-td{background-position:0 -294px}#loco-admin.wrap .region-yt{background-position:0 -306px}#loco-admin.wrap .region-lb{background-position:0 -318px}#loco-admin.wrap .region-mf{background-position:0 -330px}#loco-admin.wrap .region-lu{background-position:0 -347px}#loco-admin.wrap .region-mq{background-position:0 -359px}#loco-admin.wrap .region-cz{background-position:0 -371px}#loco-admin.wrap .region-ae{background-position:0 -383px}#loco-admin.wrap .region-cm{background-position:0 -395px}#loco-admin.wrap .region-bi{background-position:0 -407px}#loco-admin.wrap .region-ar{background-position:0 -419px}#loco-admin.wrap .region-as{background-position:0 -431px}#loco-admin.wrap .region-bh{background-position:0 -443px}#loco-admin.wrap .region-cl{background-position:0 -455px}#loco-admin.wrap .region-ad{background-position:0 -467px}#loco-admin.wrap .region-mp{background-position:0 -479px}#loco-admin.wrap .region-lt{background-position:0 -491px}#loco-admin.wrap .region-mg{background-position:0 -503px}#loco-admin.wrap .region-lc{background-position:0 -515px}#loco-admin.wrap .region-tr{background-position:0 -527px}#loco-admin.wrap .region-ua{background-position:0 -539px}#loco-admin.wrap .region-tv{background-position:0 -551px}#loco-admin.wrap .region-vi{background-position:0 -563px}#loco-admin.wrap .region-mt{background-position:0 -575px}#loco-admin.wrap .region-no{background-position:0 -587px}#loco-admin.wrap .region-mc{background-position:0 -599px}#loco-admin.wrap .region-ch{background-position:0 -611px}#loco-admin.wrap .region-bl{background-position:0 -623px}#loco-admin.wrap .region-aw{background-position:0 -640px}#loco-admin.wrap .region-bz{background-position:0 -652px}#loco-admin.wrap .region-bm{background-position:0 -664px}#loco-admin.wrap .region-ci{background-position:0 -676px}#loco-admin.wrap .region-mu{background-position:0 -688px}#loco-admin.wrap .region-us{background-position:0 -700px}#loco-admin.wrap .region-tw{background-position:0 -712px}#loco-admin.wrap .region-ye{background-position:0 -724px}#loco-admin.wrap .region-mw{background-position:0 -736px}#loco-admin.wrap .region-nl{background-position:0 -748px}#loco-admin.wrap .region-ls{background-position:0 -760px}#loco-admin.wrap .region-bo{background-position:0 -772px}#loco-admin.wrap .region-at{background-position:0 -784px}#loco-admin.wrap .region-ck{background-position:0 -796px}#loco-admin.wrap .region-by{background-position:0 -808px}#loco-admin.wrap .region-au{background-position:0 -820px}#loco-admin.wrap .region-bn{background-position:0 -832px}#loco-admin.wrap .region-ma{background-position:0 -844px}#loco-admin.wrap .region-nz{background-position:0 -856px}#loco-admin.wrap .region-lr{background-position:0 -868px}#loco-admin.wrap .region-mv{background-position:0 -880px}#loco-admin.wrap .region-tc{background-position:0 -892px}#loco-admin.wrap .region-ug{background-position:0 -904px}#loco-admin.wrap .region-tt{background-position:0 -916px}#loco-admin.wrap .region-pl{background-position:0 -928px}#loco-admin.wrap .region-rs{background-position:0 -940px}#loco-admin.wrap .region-in{background-position:0 -952px}#loco-admin.wrap .region-ge{background-position:0 -964px}#loco-admin.wrap .region-gr{background-position:0 -976px}#loco-admin.wrap .region-gs{background-position:0 -988px}#loco-admin.wrap .region-gd{background-position:0 -1000px}#loco-admin.wrap .region-io{background-position:0 -1012px}#loco-admin.wrap .region-hk{background-position:0 -1024px}#loco-admin.wrap .region-kp{background-position:0 -1036px}#loco-admin.wrap .region-kg{background-position:0 -1048px}#loco-admin.wrap .region-pm{background-position:0 -1060px}#loco-admin.wrap .region-sv{background-position:0 -1072px}#loco-admin.wrap .region-re{background-position:0 -1084px}#loco-admin.wrap .region-sa{background-position:0 -1096px}#loco-admin.wrap .region-sc{background-position:0 -1108px}#loco-admin.wrap .region-st{background-position:0 -1120px}#loco-admin.wrap .region-ke{background-position:0 -1132px}#loco-admin.wrap .region-im{background-position:0 -1144px}#loco-admin.wrap .region-kr{background-position:0 -1161px}#loco-admin.wrap .region-gf{background-position:0 -1173px}#loco-admin.wrap .region-dj{background-position:0 -1185px}#loco-admin.wrap .region-gq{background-position:0 -1197px}#loco-admin.wrap .region-gp{background-position:0 -1209px}#loco-admin.wrap .region-dk{background-position:0 -1221px}#loco-admin.wrap .region-gg{background-position:0 -1233px}#loco-admin.wrap .region-il{background-position:0 -1250px}#loco-admin.wrap .region-pn{background-position:0 -1262px}#loco-admin.wrap .region-sb{background-position:0 -1274px}#loco-admin.wrap .region-py{background-position:0 -1286px}#loco-admin.wrap .region-ru{background-position:0 -1298px}#loco-admin.wrap .region-kw{background-position:0 -1310px}#loco-admin.wrap .region-do{background-position:0 -1322px}#loco-admin.wrap .region-gt{background-position:0 -1334px}#loco-admin.wrap .region-gb{background-position:0 -1346px}#loco-admin.wrap .region-gu{background-position:0 -1358px}#loco-admin.wrap .region-je{background-position:0 -1370px}#loco-admin.wrap .region-hm{background-position:0 -1387px}#loco-admin.wrap .region-sg{background-position:0 -1399px}#loco-admin.wrap .region-pk{background-position:0 -1411px}#loco-admin.wrap .region-sr{background-position:0 -1423px}#loco-admin.wrap .region-se{background-position:0 -1435px}#loco-admin.wrap .region-jp{background-position:0 -1447px}#loco-admin.wrap .region-gw{background-position:0 -1459px}#loco-admin.wrap .region-eh{background-position:0 -1471px}#loco-admin.wrap .region-dz{background-position:0 -1483px}#loco-admin.wrap .region-ga{background-position:0 -1495px}#loco-admin.wrap .region-fr{background-position:0 -1507px}#loco-admin.wrap .region-dm{background-position:0 -1519px}#loco-admin.wrap .region-hn{background-position:0 -1531px}#loco-admin.wrap .region-sd{background-position:0 -1543px}#loco-admin.wrap .region-rw{background-position:0 -1555px}#loco-admin.wrap .region-ph{background-position:0 -1567px}#loco-admin.wrap .region-ss{background-position:0 -1579px}#loco-admin.wrap .region-qa{background-position:0 -1596px}#loco-admin.wrap .region-pe{background-position:0 -1608px}#loco-admin.wrap .region-pr{background-position:0 -1620px}#loco-admin.wrap .region-si{background-position:0 -1632px}#loco-admin.wrap .region-ht{background-position:0 -1644px}#loco-admin.wrap .region-es{background-position:0 -1656px}#loco-admin.wrap .region-gl{background-position:0 -1668px}#loco-admin.wrap .region-gm{background-position:0 -1680px}#loco-admin.wrap .region-er{background-position:0 -1692px}#loco-admin.wrap .region-fi{background-position:0 -1704px}#loco-admin.wrap .region-ee{background-position:0 -1716px}#loco-admin.wrap .region-kn{background-position:0 -1728px}#loco-admin.wrap .region-hu{background-position:0 -1740px}#loco-admin.wrap .region-iq{background-position:0 -1752px}#loco-admin.wrap .region-ky{background-position:0 -1764px}#loco-admin.wrap .region-sh{background-position:0 -1776px}#loco-admin.wrap .region-ps{background-position:0 -1788px}#loco-admin.wrap .region-pf{background-position:0 -1800px}#loco-admin.wrap .region-sj{background-position:0 -1812px}#loco-admin.wrap .region-id{background-position:0 -1824px}#loco-admin.wrap .region-is{background-position:0 -1836px}#loco-admin.wrap .region-eg{background-position:0 -1848px}#loco-admin.wrap .region-fk{background-position:0 -1860px}#loco-admin.wrap .region-fj{background-position:0 -1872px}#loco-admin.wrap .region-gn{background-position:0 -1884px}#loco-admin.wrap .region-gy{background-position:0 -1896px}#loco-admin.wrap .region-ir{background-position:0 -1908px}#loco-admin.wrap .region-km{background-position:0 -1920px}#loco-admin.wrap .region-ie{background-position:0 -1932px}#loco-admin.wrap .region-kz{background-position:0 -1944px}#loco-admin.wrap .region-ro{background-position:0 -1956px}#loco-admin.wrap .region-sk{background-position:0 -1968px}#loco-admin.wrap .region-pg{background-position:0 -1980px}#loco-admin.wrap .region-pt{background-position:0 -1992px}#loco-admin.wrap .region-so{background-position:0 -2004px}#loco-admin.wrap .region-sx{background-position:0 -2016px}#loco-admin.wrap .region-hr{background-position:0 -2033px}#loco-admin.wrap .region-ki{background-position:0 -2045px}#loco-admin.wrap .region-jm{background-position:0 -2057px}#loco-admin.wrap .region-ec{background-position:0 -2069px}#loco-admin.wrap .region-et{background-position:0 -2081px}#loco-admin.wrap .region-fo{background-position:0 -2093px}#loco-admin.wrap .region-kh{background-position:0 -2105px}#loco-admin.wrap .region-sy{background-position:0 -2117px}#loco-admin.wrap .region-sn{background-position:0 -2129px}#loco-admin.wrap .region-pw{background-position:0 -2141px}#loco-admin.wrap .region-sl{background-position:0 -2153px}#loco-admin.wrap .region-fm{background-position:0 -2165px}#loco-admin.wrap .region-gi{background-position:0 -2177px}#loco-admin.wrap .region-de{background-position:0 -2189px}#loco-admin.wrap .region-gh{background-position:0 -2201px}#loco-admin.wrap .region-jo{background-position:0 -2213px}#loco-admin.wrap .region-it{background-position:0 -2225px}#loco-admin.wrap .region-pa{background-position:0 -2237px}#loco-admin.wrap .region-sz{background-position:0 -2249px}#loco-admin.wrap .region-sm{background-position:0 -2261px}#loco-admin.wrap .region-tn{background-position:0 -2273px}#loco-admin.wrap .region-ml{background-position:0 -2285px}#loco-admin.wrap .region-cg{background-position:0 -2297px}#loco-admin.wrap .region-ax{background-position:0 -2309px}#loco-admin.wrap .region-ao{background-position:0 -2321px}#loco-admin.wrap .region-bt{background-position:0 -2333px}#loco-admin.wrap .region-an{background-position:0 -2345px}#loco-admin.wrap .region-bb{background-position:0 -2357px}#loco-admin.wrap .region-cf{background-position:0 -2369px}#loco-admin.wrap .region-mm{background-position:0 -2381px}#loco-admin.wrap .region-li{background-position:0 -2393px}#loco-admin.wrap .region-na{background-position:0 -2405px}#loco-admin.wrap .region-mz{background-position:0 -2417px}#loco-admin.wrap .region-to{background-position:0 -2429px}#loco-admin.wrap .region-vg{background-position:0 -2441px}#loco-admin.wrap .region-ve{background-position:0 -2453px}#loco-admin.wrap .region-tz{background-position:0 -2465px}#loco-admin.wrap .region-tm{background-position:0 -2477px}#loco-admin.wrap .region-mx{background-position:0 -2489px}#loco-admin.wrap .region-nc{background-position:0 -2501px}#loco-admin.wrap .region-mo{background-position:0 -2513px}#loco-admin.wrap .region-lk{background-position:0 -2525px}#loco-admin.wrap .region-cd{background-position:0 -2537px}#loco-admin.wrap .region-al{background-position:0 -2549px}#loco-admin.wrap .region-bw{background-position:0 -2561px}#loco-admin.wrap .region-cs{background-position:0 -2573px}#loco-admin.wrap .region-cr{background-position:0 -2585px}#loco-admin.wrap .region-bv{background-position:0 -2597px}#loco-admin.wrap .region-am{background-position:0 -2609px}#loco-admin.wrap .region-az{background-position:0 -2621px}#loco-admin.wrap .region-ba{background-position:0 -2633px}#loco-admin.wrap .region-mn{background-position:0 -2645px}#loco-admin.wrap .region-nu{background-position:0 -2657px}#loco-admin.wrap .region-my{background-position:0 -2669px}#loco-admin.wrap .region-tl{background-position:0 -2681px}#loco-admin.wrap .region-ws{background-position:0 -2693px}#loco-admin.wrap .region-th{background-position:0 -2705px}#loco-admin.wrap .region-nf{background-position:0 -2717px}#loco-admin.wrap .region-ly{background-position:0 -2729px}#loco-admin.wrap .region-ai{background-position:0 -2741px}#loco-admin.wrap .region-br{background-position:0 -2753px}#loco-admin.wrap .region-cv{background-position:0 -2765px}#loco-admin.wrap .region-be{background-position:0 -2777px}#loco-admin.wrap .region-ca{background-position:0 -2789px}#loco-admin.wrap .region-bd{background-position:0 -2801px}#loco-admin.wrap .region-cw{background-position:0 -2813px}#loco-admin.wrap .region-bs{background-position:0 -2830px}#loco-admin.wrap .region-ng{background-position:0 -2842px}#loco-admin.wrap .region-mk{background-position:0 -2854px}#loco-admin.wrap .region-np{background-position:0 -2866px}#loco-admin.wrap .region-va{background-position:0 -2878px}#loco-admin.wrap .region-uz{background-position:0 -2890px}#loco-admin.wrap .region-um{background-position:0 -2902px}#loco-admin.wrap .region-tk{background-position:0 -2914px}#loco-admin.wrap .region-vc{background-position:0 -2926px}#loco-admin.wrap .region-zw{background-position:0 -2938px}#loco-admin.wrap .region-nr{background-position:0 -2950px}#loco-admin.wrap .region-ne{background-position:0 -2962px}#loco-admin.wrap .region-cu{background-position:0 -2974px}#loco-admin.wrap .region-bq{background-position:0 -2986px}#loco-admin.wrap .region-bf{background-position:0 -2998px}#loco-admin.wrap .region-bg{background-position:0 -3010px}#loco-admin.wrap .region-cc{background-position:0 -3022px}#loco-admin.wrap .region-mh{background-position:0 -3034px}#loco-admin.wrap .region-za{background-position:0 -3046px}#loco-admin.wrap .region-uy{background-position:0 -3058px}#loco-admin.wrap .region-wf{background-position:0 -3070px}#loco-admin.wrap .region-vu{background-position:0 -3082px}#loco-admin.wrap .region-tj{background-position:0 -3094px}#loco-admin.wrap .variant-scotland,#loco-admin.wrap .region-gb.lang-gd{background-position:0 -3106px}#loco-admin.wrap .variant-valencia,#loco-admin.wrap .region-es.variant-valencia{background-position:0 -3118px}#loco-admin.wrap .variant-wales,#loco-admin.wrap .region-gb.lang-cy{background-position:0 -3130px}#loco-admin.wrap .x-eu{background-position:0 -3142px}#loco-admin.wrap span.lang code{display:none}#loco-admin.wrap .icon-notag:before{content:""}#loco-admin.wrap .icon-python:before{content:"🐍"}#loco-admin.wrap .icon-unicode:before{content:"u"}#loco-admin.wrap .icon-json:before{content:"{"}#loco-admin.wrap .icon-bullist:before{content:""}#loco-admin.wrap .icon-numlist:before{content:""}#loco-admin.wrap .icon-indent:before{content:""}#loco-admin.wrap .icon-outdent:before{content:""}#loco-admin.wrap .icon-link:before{content:""}#loco-admin.wrap .icon-unlink:before{content:""}#loco-admin.wrap .icon-bold:before{content:"B"}#loco-admin.wrap .icon-italic:before{content:"I"}#loco-admin.wrap .icon-translate:before{content:""}#loco-admin.wrap .icon-proj:before{content:""}#loco-admin.wrap .icon-plural:before{content:"᛬"}#loco-admin.wrap .icon-max:before,#loco-admin.wrap .icon-full-screen:before{content:""}#loco-admin.wrap .icon-min:before{content:""}#loco-admin.wrap .icon-sort:before{content:""}#loco-admin.wrap .icon-ok:before,#loco-admin.wrap .notice-success>.has-icon:before,#loco-admin.wrap .notice-success p>strong.has-icon:before{content:"✓"}#loco-admin.wrap .icon-ok-empty:before{content:"🗌"}#loco-admin.wrap .icon-checkbox-checked:before,#loco-admin.wrap .selector.multi li.checked .icon-checkbox:before{content:"☑"}#loco-admin.wrap .icon-checkbox-unchecked:before{content:"☐"}#loco-admin.wrap .icon-checkbox-partial:before{content:"☉"}#loco-admin.wrap .icon-radio-checked:before{content:"⚫"}#loco-admin.wrap .icon-radio-unchecked:before{content:"⚪"}#loco-admin.wrap .icon-ext:before{content:"⬈"}#loco-admin.wrap .icon-share:before{content:""}#loco-admin.wrap .icon-star:before{content:""}#loco-admin.wrap .icon-user:before{content:""}#loco-admin.wrap .icon-remove:before{content:"×"}#loco-admin.wrap .icon-cog:before{content:""}#loco-admin.wrap .icon-trash:before{content:""}#loco-admin.wrap .icon-time:before,#loco-admin.wrap .icon-history:before{content:""}#loco-admin.wrap .icon-download:before{content:""}#loco-admin.wrap .icon-revert:before{content:""}#loco-admin.wrap .icon-sync:before{content:""}#loco-admin.wrap .icon-lock:before,#loco-admin.wrap .notice-locked>.has-icon:before,#loco-admin.wrap .notice-locked p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-flag:before{content:""}#loco-admin.wrap .icon-tag:before{content:""}#loco-admin.wrap .icon-tags:before{content:""}#loco-admin.wrap .icon-print:before{content:""}#loco-admin.wrap .icon-camera:before{content:""}#loco-admin.wrap .icon-pencil:before{content:""}#loco-admin.wrap .icon-add:before{content:""}#loco-admin.wrap .icon-del:before{content:""}#loco-admin.wrap .icon-clear:before,#loco-admin.wrap a.icon.clear:before{content:""}#loco-admin.wrap .icon-ok-sign:before{content:"✔"}#loco-admin.wrap .icon-help:before{content:"?"}#loco-admin.wrap .icon-info:before,#loco-admin.wrap .notice-info>.has-icon:before,#loco-admin.wrap .notice-info p>strong.has-icon:before{content:"ℹ"}#loco-admin.wrap .icon-cancel:before{content:""}#loco-admin.wrap .icon-warn:before,#loco-admin.wrap .notice-error>.has-icon:before,#loco-admin.wrap .notice-error p>strong.has-icon:before,#loco-admin.wrap .notice-warning>.has-icon:before,#loco-admin.wrap .notice-warning p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-comment:before{content:""}#loco-admin.wrap .icon-bar-chart:before{content:""}#loco-admin.wrap .icon-key:before{content:""}#loco-admin.wrap .icon-cogs:before{content:""}#loco-admin.wrap .icon-comments:before{content:""}#loco-admin.wrap .icon-signout:before{content:""}#loco-admin.wrap .icon-signin:before{content:""}#loco-admin.wrap .icon-upload:before{content:""}#loco-admin.wrap .icon-twitter:before{content:"🐦"}#loco-admin.wrap .icon-facebook:before{content:""}#loco-admin.wrap .icon-github:before{content:""}#loco-admin.wrap .icon-feed:before{content:""}#loco-admin.wrap .icon-globe:before{content:""}#loco-admin.wrap .icon-wrench:before,#loco-admin.wrap .notice-debug>.has-icon:before,#loco-admin.wrap .notice-debug p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-group:before{content:""}#loco-admin.wrap .icon-cloud:before{content:""}#loco-admin.wrap .icon-copy:before{content:""}#loco-admin.wrap .icon-save:before{content:""}#loco-admin.wrap .icon-menu:before{content:""}#loco-admin.wrap .icon-table:before{content:""}#loco-admin.wrap .icon-caret-down:before{content:"▼"}#loco-admin.wrap .icon-caret-up:before{content:"▲"}#loco-admin.wrap .icon-caret-right:before{content:"▶"}#loco-admin.wrap .icon-mail:before{content:""}#loco-admin.wrap .icon-cloud-upload:before{content:""}#loco-admin.wrap .icon-file:before{content:""}#loco-admin.wrap .icon-circle-white:before{content:"⚬"}#loco-admin.wrap .icon-circle-black:before{content:"●"}#loco-admin.wrap .icon-eraser:before{content:""}#loco-admin.wrap .icon-unlock:before{content:""}#loco-admin.wrap .icon-apple:before{content:""}#loco-admin.wrap .icon-android:before{content:""}#loco-admin.wrap .icon-robot:before{content:"🤖"}#loco-admin.wrap .icon-back:before{content:"⬅"}#loco-admin.wrap .icon-next:before{content:"➔"}#loco-admin.wrap .icon-arrow-up:before{content:""}#loco-admin.wrap .icon-ccard:before{content:""}#loco-admin.wrap .icon-caret-left:before{content:"◀"}#loco-admin.wrap .icon-pro:before{content:"⚡"}#loco-admin.wrap .icon-bell:before{content:""}#loco-admin.wrap .icon-code:before{content:""}#loco-admin.wrap .icon-privacy:before{content:"🛡"}#loco-admin.wrap .icon-hellip:before{content:"…"}#loco-admin.wrap .icon-vellip:before{content:"⁞"}#loco-admin.wrap .icon-collapse:before{content:""}#loco-admin.wrap .icon-expand:before{content:""}#loco-admin.wrap .icon-wordpress:before{content:""}#loco-admin.wrap .icon-database:before{content:""}#loco-admin.wrap .icon-restore:before{content:""}#loco-admin.wrap .icon-pilcrow:before{content:"¶"}#loco-admin.wrap .icon,#loco-admin.wrap .has-icon:before,#loco-admin.wrap .has-dashicon:before{speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco-admin.wrap .icon,#loco-admin.wrap .has-icon:before{font-family:"loco"}#loco-admin.wrap .has-dashicon:before{font-family:"dashicons";font-size:1.4em}#loco-admin.wrap .has-icon:before,#loco-admin.wrap .has-dashicon:before,#loco-admin.wrap .has-icon>span{display:inline-block;vertical-align:middle}#loco-admin.wrap .only-icon{text-align:center}#loco-admin.wrap .only-icon:before{text-align:center;padding:0}#loco-admin.wrap .only-icon span{display:none}#loco-admin.wrap a,#loco-admin.wrap .wp-core-ui .button-link{text-decoration:none}#loco-admin.wrap h3:hover>a.loco-anchor{color:#ccc}#loco-admin.wrap h3:hover>a.loco-anchor:before{content:"¶"}#loco-admin.wrap .has-lang>span{display:inline-block;vertical-align:middle}#loco-admin.wrap a.has-lang:hover>span:last-child{text-decoration:underline}#loco-admin.wrap h1 ul,#loco-admin.wrap h1 li{margin:0;padding:0}#loco-admin.wrap h1 li{display:inline-block}#loco-admin.wrap h1 li:after{content:"/";color:#999;text-shadow:none;display:inline-block}#loco-admin.wrap h1 li:last-child:after{content:""}#loco-admin.wrap h1 li:last-child a{color:inherit;pointer-events:none;cursor:auto}#loco-admin.wrap h2 span{color:#999;font-weight:normal}#loco-admin.wrap h2 .loco-meta,#loco-admin.wrap h3 .loco-meta{color:inherit;font-size:14px;font-weight:normal;vertical-align:middle}#loco-admin.wrap .wp-list-table td:first-child .icon{width:16px;display:inline-block;text-align:center}#loco-admin.wrap .wp-list-table td{white-space:nowrap}#loco-admin.wrap .wp-list-table td>a,#loco-admin.wrap .wp-list-table td>time{display:inline-block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis;-ms-text-overflow:ellipsis}#loco-admin.wrap .wp-list-table th.loco-sort{cursor:pointer}#loco-admin.wrap .wp-list-table th.loco-sort:hover{color:#000}#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after{padding:0 0 0 4px;color:#999}#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after{content:"▼"}#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after{content:"▲"}#loco-admin.wrap .wp-list-table td.has-row-actions{overflow:visible}#loco-admin.wrap form.loco-filter{display:block;margin-bottom:5px}#loco-admin.wrap form.loco-filter .icon-filter{color:#999}#loco-admin.wrap nav.above-list-table{margin-bottom:1em}#loco-admin.wrap nav.above-list-table a{display:inline-block;margin-right:1em}#loco-admin.wrap .wp-core-ui button.inverted,#loco-admin.wrap .wp-core-ui button.inverted:hover,#loco-admin.wrap .po-fuzzy button.icon-cloud{background:-moz-linear-gradient(top, #cccccc 0%, #e0e0e0 30%, #fefefe 100%);background:-webkit-linear-gradient(top, #cccccc 0%, #e0e0e0 30%, #fefefe 100%);background:linear-gradient(to bottom, #cccccc 0%, #e0e0e0 30%, #fefefe 100%);-webkit-box-shadow:0 1px 0 #fff;-moz-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff;border-color:gray}#loco-admin.wrap .wp-core-ui button:active,#loco-admin.wrap .wp-core-ui button.inverted:active{border-color:#5b9dd9}#loco-admin.wrap .loco-clearable{display:inline-block;vertical-align:middle;position:relative}#loco-admin.wrap .loco-clearable a.clear,#loco-admin.wrap .auto-comp-wrap a.clear{top:0;right:0;outline:none;margin:0;border:solid 1px transparent;padding:5px 5px;position:absolute;font-size:1em;line-height:normal}#loco-admin.wrap .loco-clearable a.clear:before,#loco-admin.wrap .auto-comp-wrap a.clear:before{vertical-align:middle;padding:0;color:#999}#loco-admin.wrap .loco-clearable a.clear:hover:before,#loco-admin.wrap .auto-comp-wrap a.clear:hover:before{color:#333}#loco-admin.wrap .loco-clearable a.clear span,#loco-admin.wrap .auto-comp-wrap a.clear span{display:none}#loco-admin.wrap .loco-clearable ::-ms-clear,#loco-admin.wrap .auto-comp-wrap ::-ms-clear{display:none}#loco-admin.wrap div.progress{color:#000;background:transparent !important}#loco-admin.wrap div.progress *{height:100%;overflow:hidden;white-space:nowrap}#loco-admin.wrap div.progress .t{background-color:#ddd;border:1px solid #ccc}#loco-admin.wrap div.progress .t .bar{float:left;clear:none;background-color:#3db63d}#loco-admin.wrap div.progress .t .bar.f{background-color:#bd2c00}#loco-admin.wrap div.progress .l{display:block}#loco-admin.wrap td div.progress .t{border:none}#loco-admin.wrap td div.progress .l{display:none}#loco-admin.wrap code.path{color:#333;margin:0;padding:0;display:inline;background:transparent}#loco-admin.wrap .loco-danger{color:#d54e21}#loco-admin.wrap .notice,#loco-admin.wrap .panel{background:#fff;position:relative;margin:1em 0;padding:1px 12px}#loco-admin.wrap .notice-generic{border-color:#ddd}#loco-admin.wrap .notice-success>.has-icon,#loco-admin.wrap .notice-success p>strong.has-icon{color:#000}#loco-admin.wrap .notice-warning{border-color:orange}#loco-admin.wrap .notice-error{border-color:#dc3232}#loco-admin.wrap .notice-debug{border-color:#00a0d2}#loco-admin.wrap .notice-danger{border-color:#dc3232}#loco-admin.wrap .notice-locked{border-color:orange}#loco-admin.wrap .notice>.has-icon:before,#loco-admin.wrap .notice p>strong.has-icon:before{padding-right:6px}#loco-admin.wrap .notice>p>a.button.has-icon:before{width:1.2em}#loco-admin.wrap .notice>p>em{color:#d54e21;font-style:normal}#loco-admin.wrap .notice>p>em a{color:inherit}#loco-admin.wrap .notice>p a:hover,#loco-admin.wrap .notice>nav a:hover{text-decoration:underline}#loco-admin.wrap .notice>p a.button,#loco-admin.wrap .notice>nav a.button{text-decoration:inherit}#loco-admin.wrap .notice.has-nav{display:flex;flex-direction:row}#loco-admin.wrap .notice.has-nav p,#loco-admin.wrap .notice.has-nav nav{line-height:22px;flex-grow:1}#loco-admin.wrap .notice.has-nav nav{text-align:right;padding:2px;margin:.5em 0}#loco-admin.wrap .notice.has-nav.is-dismissible{padding-right:38px}#loco-admin.wrap .notice.has-nav a{white-space:nowrap}#loco-admin.wrap .notice.has-nav nav>span{color:#666}#loco-admin.wrap .notice>h3>span{display:inline-block;vertical-align:middle}#loco-admin.wrap ul.problems li{font-style:italic}#loco-admin.wrap label{position:relative}#loco-admin.wrap label.for-disabled,#loco-admin.wrap label.for-disabled>input{cursor:default !important}#loco-admin.wrap input.regular-text,#loco-admin.wrap textarea.regular-text{width:25em}#loco-admin.wrap .button-link{padding:0 10px 1px}#loco-admin.wrap .button-danger{background:#ba0000;border-color:#900 #600 #600;-webkit-box-shadow:0 1px 0 #600;-moz-box-shadow:0 1px 0 #600;box-shadow:0 1px 0 #600;color:#fff;text-shadow:0 -1px 1px #600,1px 0 1px #600,0 1px 1px #600,-1px 0 1px #600}#loco-admin.wrap .button-success{background:#00b500;border-color:#090 #2e892e #2e892e;-webkit-box-shadow:0 1px 0 #2e892e;-moz-box-shadow:0 1px 0 #2e892e;box-shadow:0 1px 0 #2e892e;color:#fff;text-shadow:0 -1px 1px #2e892e,1px 0 1px #2e892e,0 1px 1px #2e892e,-1px 0 1px #2e892e}#loco-admin.wrap .button-success:hover{background:#3db63d}#loco-admin.wrap .button-danger[disabled],#loco-admin.wrap .button-success[disabled]{text-shadow:none !important}#loco-admin.wrap form button.loco-loading.button-large{padding-left:0}#loco-admin.wrap form button.loco-loading.button-large:before{width:16px;height:16px;margin:0 4px;content:" ";font-size:16px;line-height:1;display:inline-block;vertical-align:sub}#loco-admin.wrap ::placeholder{color:#ccc}#loco-admin.wrap ::-webkit-input-placeholder{color:#ccc}#loco-admin.wrap :-moz-placeholder{color:#ccc;opacity:1}#loco-admin.wrap ::-moz-placeholder{color:#ccc;opacity:1}#loco-admin.wrap :-ms-input-placeholder{color:#ccc}#loco-admin.wrap .ielt10 .placeheld{color:#ccc}#loco-admin.wrap a.has-raquo:after{content:" »"}#loco-admin.wrap a.has-laquo:before{content:"« "}#loco-admin.wrap span.inline-spinner{display:inline-block;min-width:16px;min-height:16px;background:transparent url(../img/spin-modal.gif?v=2.4.1) 0 0 no-repeat}.js #wpbody-content>.notice{display:none}.js #wpbody-content>.notice.inline{display:block}.js #loco-admin.wrap .jshide,.no-js #loco-admin.wrap .jsonly{display:none !important}#loco-admin.wrap .invis{visibility:hidden}.form-table tr{vertical-align:top}.form-table tr.compact td{padding-top:0}.loco-modal{min-width:50%;min-height:100px}.loco-modal-wide{min-width:90% !important}.loco-modal.request-filesystem-credentials-dialog{top:15% !important;max-height:85% !important}.loco-modal.request-filesystem-credentials-dialog>.ui-dialog-content{background:inherit}.loco-modal.request-filesystem-credentials-dialog .ftp-password>label>em:last-child{display:none}.ui-dialog-content>div.loco-loading{height:100%;background:transparent url(../img/spin-modal.gif?v=2.4.1) center 20px no-repeat}#loco-po-ref ol li{color:#aaa;margin:0;white-space:pre;padding:0 0 0 1em;font:normal 12px/17px Consolas,Monaco,monospace;background:transparent;border-left:1px solid #eee}#loco-po-ref ol li code{margin:0;padding:0;display:inline;background:inherit}#loco-po-ref ol li.highlighted{color:#666;background-color:#f8eec7}#loco-po-ref ol li.highlighted code.T_CONSTANT_ENCAPSED_STRING{color:#c931c7}#loco-credit>*{vertical-align:middle}#loco-credit>a{display:inline-block;position:relative;overflow:hidden;background:transparent url(../img/logo-foot.gif?v=2.4.1) 0 0 no-repeat;height:30px;width:100px;text-indent:200px;-webkit-transition-duration:0s;transition-duration:0s}#loco-credit>a:hover{background-position:0 -35px}#loco-content{position:relative}#footer-upgrade span:before{color:#ccc;content:" | ";display:inline;padding-left:.5em;padding-right:.5em}#footer-upgrade span:first-child:before{content:"";display:none}.loco-clearfix:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}dl.debug dt{font-weight:bold}dl.debug dt,dl.debug dd{white-space:pre}.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(0,115,170,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#0073aa;foo:#0073aa}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#66c6e4 !important;background:#008ec2 !important;border-color:#008ec2 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../img/skins/fresh/spin-primary-button.gif?v=2.4.1) 0 0 no-repeat !important}
|
1 |
+
._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.4.4);background-repeat:no-repeat;min-height:16px}._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.4.4) 0 0 no-repeat;min-height:75px}._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.4.4);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.4.4);background-size:16px}._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.4.4);background-size:16px}}._green_glow_inner{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}.loco-font,#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco-admin.wrap .icon,#loco-admin.wrap .has-icon:before{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@font-face{font-family:"loco";src:url("../font/loco.eot?v=2.4.4");src:url("../font/loco.eot?v=2.4.4?#iefix") format("embedded-opentype"),url("../font/loco.woff?v=2.4.4") format("woff"),url("../font/loco.ttf?v=2.4.4") format("truetype"),url("../font/loco.svg?v=2.4.4#loco") format("svg");font-weight:normal;font-style:normal}.tipsy{font-size:11px;position:absolute;padding:5px;z-index:500001;opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.tipsy.in{opacity:1}.tipsy-inner{background-color:#000;color:#fff;white-space:nowrap;padding:6px 8px;line-height:1.3em;text-align:center;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-webkit-font-smoothing:subpixel-antialiased}.tipsy-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.tipsy-n .tipsy-arrow{top:0px;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-nw .tipsy-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-ne .tipsy-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-s .tipsy-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-sw .tipsy-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-se .tipsy-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-e .tipsy-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.tipsy-w .tipsy-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}#loco-admin.wrap .selector li,#loco-admin.wrap .selector .handle,#loco-admin.wrap .selectoradd a,#loco-admin.wrap .selectorsep:before,#loco-admin.wrap .selectorsep span{padding:.3em .75em}#loco-admin.wrap .selector{text-align:left;display:inline-block;white-space:nowrap}#loco-admin.wrap .selectoradd a,#loco-admin.wrap .selector .handle{cursor:default;display:block;position:relative;border-top:solid 1px #fff;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd;border-left:solid 1px #fff;color:#666;height:1.3em;overflow:hidden;white-space:normal}#loco-admin.wrap .selectorsep{display:inline-block;border:solid 1px transparent}#loco-admin.wrap .selectorsep:before{display:block;position:relative;color:#999;height:1.3em;overflow:hidden}#loco-admin.wrap .selectorsep>*{display:block;line-height:1em;color:#666;height:1.3em;overflow:hidden}#loco-admin.wrap .selector .handle{outline:none;white-space:nowrap;padding-right:2.3em;max-width:250px;text-overflow:ellipsis}#loco-admin.wrap .selector .handle .prefix{padding-right:.6ex}#loco-admin.wrap .selector .handle:after{font-family:loco;font-size:1.3em;color:#ccc;display:block;position:absolute;top:.25em;right:.6em;content:"▼"}#loco-admin.wrap .selector .handle:focus:after,#loco-admin.wrap .selector .handle:hover:after{color:#666}#loco-admin.wrap .selector.no-caret .handle{padding-right:.75em}#loco-admin.wrap .selector.no-caret .handle:after{display:none}#loco-admin.wrap .selector.no-title .handle{padding-left:.5em;padding-right:.5em}#loco-admin.wrap .selector.no-title .handle .label{display:none}#loco-admin.wrap .selector.no-title .handle .icon{margin-right:0px}#loco-admin.wrap .selector.dummy .handle{border-color:transparent}#loco-admin.wrap .selector.dummy .handle:after{display:none}#loco-admin.wrap .selectoradd{position:relative}#loco-admin.wrap .selectoradd>*{display:block;float:left;clear:none}#loco-admin.wrap .selectoradd>a.has-icon{width:1.3em}#loco-admin.wrap .selectoradd>a.has-icon:before{color:#999;display:inline;padding-left:0;padding-right:0;line-height:1.4em}#loco-admin.wrap .selectoradd>a.has-icon:hover:after{color:#2e892e}#loco-admin.wrap .selectorsep{display:inline-block}#loco-admin.wrap .selectorsep span{color:#666;height:1.3em}#loco-admin.wrap .selector ul{padding:0}#loco-admin.wrap .selector ul,#loco-admin.wrap .selector li{display:block;position:relative;cursor:default;margin:0}#loco-admin.wrap .selector ul{z-index:5;position:absolute;left:0;top:0;background:#f5f5f5;box-shadow:0 10px 5px rgba(0,0,0,.2);border:solid 1px #ccc;overflow:auto}#loco-admin.wrap .selector.up ul{margin-top:0}#loco-admin.wrap .selector.multi li input{display:none}#loco-admin.wrap .selector.multi li.checked{background:#e5e5e5}#loco-admin.wrap .selector li.active{background:#e5e5e5 !important}#loco-admin.wrap .selector li.over{background:#ccc !important;color:#fff;text-shadow:1px 1px #aaa}#loco-admin.wrap .selector li.over .label{color:#fff}#loco-admin.wrap .selector .label{font:inherit;color:inherit}#loco-admin.wrap .selector .icon{display:inline-block;min-width:1.2em;text-align:center;font-size:14px}#loco-admin.wrap .selector .icon.no-icon{display:none}#loco-admin.wrap .selector .icon:before{color:#666}#loco-admin.wrap .selector .avtr{width:18px;height:18px;background-size:18px;background-repeat:no-repeat}#loco-admin.wrap .selector .label{line-height:1}#loco-admin.wrap .selector .icon,#loco-admin.wrap .selector .icon-16{vertical-align:bottom}#loco-admin.wrap .selector .icon,#loco-admin.wrap .selector .lang,#loco-admin.wrap .selector .icon-16{margin-right:5px}#loco-admin.wrap .selector .region,#loco-admin.wrap .selector .variant-wales,#loco-admin.wrap .selector .region-gb.lang-cy,#loco-admin.wrap .selector .variant-scotland,#loco-admin.wrap .selector .region-gb.lang-gd,#loco-admin.wrap .selector .variant-valencia,#loco-admin.wrap .selector .region-es.variant-valencia,#loco-admin.wrap .selector .lang-ca,#loco-admin.wrap .selector .region-es.lang-ca,#loco-admin.wrap .selector .lang-eo,#loco-admin.wrap .selector .lang-eu{margin-left:2px;margin-right:7px}#loco-admin.wrap .selector.ticked .icon.no-icon{font-size:12px;display:inline-block}#loco-admin.wrap .selector.ticked .active .icon.no-icon:before{content:"✓"}#loco-admin.wrap .selectoradd a:hover,#loco-admin.wrap .selector a.handle:focus,#loco-admin.wrap .selector a.handle:hover{color:#000;border-color:#999}#loco-admin.wrap .selector.active .handle{border-color:#999;background-color:#eee;color:#999}#loco-admin.wrap .selector.active .handle:after{color:#999;content:"▲"}#loco-admin.wrap .selector.disabled{cursor:default;cursor:no-drop;cursor:not-allowed}#loco-admin.wrap .selector.disabled .handle{pointer-events:none;border-top:solid 1px #fff;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd;border-left:solid 1px #fff;color:#999;padding-right:1em}#loco-admin.wrap .selector.disabled .handle:after{display:none}#loco-admin.wrap .selector.disabled .handle span.icon{color:#999 !important}#loco-admin.wrap .selector li.disabled,#loco-admin.wrap .selector li.disabled.over{color:#aaa;text-shadow:1px 1px #fff;pointer-events:none}#loco-admin.wrap .selector li.disabled *{cursor:text}#loco-admin.wrap .selector li.disabled .icon:before{color:#aaa}#loco-admin.wrap .selector li.disabled .flag,#loco-admin.wrap .selector li.disabled .icon-16{opacity:.4}#loco-admin.wrap .selector.lefty ul{left:auto;right:0}#loco-admin.wrap .selector.lefty ul .icon,#loco-admin.wrap .selector.lefty ul .icon-32{display:block;float:right;clear:none}#loco-admin.wrap .selector.lefty ul .label{padding-right:32px;padding-left:0}#loco-admin.wrap .selector ul>form{margin:0;display:block}#loco-admin.wrap .selector ul>form input{margin:0;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}#loco-admin.wrap .selector ul>form input:focus{-webkit-box-shadow:inset 0 0 5px 0 #3db63d;-moz-box-shadow:inset 0 0 5px 0 #3db63d;box-shadow:inset 0 0 5px 0 #3db63d}#loco-admin.wrap .selector ul>form input.error{border-color:#c00;-webkit-box-shadow:inset 0 0 5px 0 rgba(153,0,0,.5);-moz-box-shadow:inset 0 0 5px 0 rgba(153,0,0,.5);box-shadow:inset 0 0 5px 0 rgba(153,0,0,.5)}#loco-admin.wrap .selector ul>form a.clear{margin:0;border:none}#loco-admin.wrap .selector ul>form ::placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco-admin.wrap .selector ul>form ::-webkit-input-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco-admin.wrap .selector ul>form :-moz-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block;opacity:1}#loco-admin.wrap .selector ul>form ::-moz-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block;opacity:1}#loco-admin.wrap .selector ul>form :-ms-input-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco-admin.wrap .selector ul>form .ielt10 .placeheld{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco-admin.wrap div.auto-comp-wrap{width:100%}#loco-admin.wrap div.auto-comp-wrap input{display:inline-block}#loco-admin.wrap div.auto-comp-wrap.loading input{background:transparent url(../img/ajax-loader.gif?v=2.4.4) right 2px no-repeat}#loco-admin.wrap div.auto-comp-drop{color:#333;background:#fff;border-top:none;position:absolute;width:auto;top:0;left:0;z-index:99;-webkit-box-shadow:0 5px 5px rgba(0,0,0,.4);-moz-box-shadow:0 5px 5px rgba(0,0,0,.4);box-shadow:0 5px 5px rgba(0,0,0,.4)}#loco-admin.wrap div.auto-comp-result{padding:5px 10px;cursor:pointer;background:#f0f0f0;border-top:solid 1px #fff;border-bottom:solid 1px #ddd;white-space:nowrap}#loco-admin.wrap div.auto-comp-result:first-child{border-top:solid 1px #ddd}#loco-admin.wrap div.auto-comp-result>*{display:inline-block;vertical-align:middle;line-height:normal}#loco-admin.wrap div.auto-comp-result .icon:before{padding-right:5px}#loco-admin.wrap div.auto-comp-result:hover{background:#a8a8a8;color:#fff;border-top-color:#a8a8a8;border-bottom-color:#999}#loco-admin.wrap div.auto-comp-result.selected{background:#666 !important;color:#fff;border-top-color:#666;border-bottom-color:#666}#loco-admin.wrap div.auto-comp-result .lang,#loco-admin.wrap div.auto-comp-result .region,#loco-admin.wrap div.auto-comp-result .variant-wales,#loco-admin.wrap div.auto-comp-result .region-gb.lang-cy,#loco-admin.wrap div.auto-comp-result .variant-scotland,#loco-admin.wrap div.auto-comp-result .region-gb.lang-gd,#loco-admin.wrap div.auto-comp-result .variant-valencia,#loco-admin.wrap div.auto-comp-result .region-es.variant-valencia,#loco-admin.wrap div.auto-comp-result .lang-ca,#loco-admin.wrap div.auto-comp-result .region-es.lang-ca,#loco-admin.wrap div.auto-comp-result .lang-eo,#loco-admin.wrap div.auto-comp-result .lang-eu,#loco-admin.wrap div.auto-comp-result .avtr{margin-right:5px}#loco-admin.wrap div.auto-comp-wrap.error a.icon.clear:before{color:#c00;opacity:1}#loco-admin.wrap div.auto-comp-wrap.error input[type=text]{border-color:#c00;color:#c00}#loco-admin.wrap div.auto-comp-wrap.error input[type=text]:focus{-webkit-box-shadow:0 0 .5em 0 rgba(153,0,0,.5);-moz-box-shadow:0 0 .5em 0 rgba(153,0,0,.5);box-shadow:0 0 .5em 0 rgba(153,0,0,.5)}#loco-admin.wrap ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.4.4);background-repeat:no-repeat;min-height:16px}#loco-admin.wrap ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.4.4) 0 0 no-repeat;min-height:75px}#loco-admin.wrap ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.4.4);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){#loco-admin.wrap ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.4.4);background-size:16px}#loco-admin.wrap ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.4.4);background-size:16px}}#loco-admin.wrap ._green_glow_inner{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}#loco-admin.wrap ._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}#loco-admin.wrap .loco-font,#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco-admin.wrap .icon,#loco-admin.wrap .has-icon:before{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco-admin.wrap .has-icon:before{display:inline-block;padding-right:.3em}#loco-admin.wrap a.icon-help{cursor:help}#loco-admin.wrap a.icon-help span{display:none}#loco-admin.wrap .icon-notag:before{content:""}#loco-admin.wrap .icon-python:before{content:"🐍"}#loco-admin.wrap .icon-unicode:before{content:"u"}#loco-admin.wrap .icon-json:before{content:"{"}#loco-admin.wrap .icon-bullist:before{content:""}#loco-admin.wrap .icon-numlist:before{content:""}#loco-admin.wrap .icon-indent:before{content:""}#loco-admin.wrap .icon-outdent:before{content:""}#loco-admin.wrap .icon-link:before{content:""}#loco-admin.wrap .icon-unlink:before{content:""}#loco-admin.wrap .icon-bold:before{content:"B"}#loco-admin.wrap .icon-italic:before{content:"I"}#loco-admin.wrap .icon-translate:before{content:""}#loco-admin.wrap .icon-proj:before{content:""}#loco-admin.wrap .icon-plural:before{content:"᛬"}#loco-admin.wrap .icon-max:before,#loco-admin.wrap .icon-full-screen:before{content:""}#loco-admin.wrap .icon-min:before{content:""}#loco-admin.wrap .icon-sort:before{content:""}#loco-admin.wrap .icon-ok:before,#loco-admin.wrap .notice-success>.has-icon:before,#loco-admin.wrap .notice-success p>strong.has-icon:before{content:"✓"}#loco-admin.wrap .icon-ok-empty:before{content:"🗌"}#loco-admin.wrap .icon-checkbox-checked:before,#loco-admin.wrap .selector.multi li.checked .icon-checkbox:before{content:"☑"}#loco-admin.wrap .icon-checkbox-unchecked:before{content:"☐"}#loco-admin.wrap .icon-checkbox-partial:before{content:"☉"}#loco-admin.wrap .icon-radio-checked:before{content:"⚫"}#loco-admin.wrap .icon-radio-unchecked:before{content:"⚪"}#loco-admin.wrap .icon-ext:before{content:"⬈"}#loco-admin.wrap .icon-share:before{content:""}#loco-admin.wrap .icon-star:before{content:""}#loco-admin.wrap .icon-user:before{content:""}#loco-admin.wrap .icon-remove:before,#loco-admin.wrap a.icon.close:before{content:"×"}#loco-admin.wrap .icon-cog:before{content:""}#loco-admin.wrap .icon-trash:before{content:""}#loco-admin.wrap .icon-time:before,#loco-admin.wrap .icon-history:before{content:""}#loco-admin.wrap .icon-download:before{content:""}#loco-admin.wrap .icon-revert:before{content:""}#loco-admin.wrap .icon-sync:before{content:""}#loco-admin.wrap .icon-lock:before,#loco-admin.wrap .notice-locked>.has-icon:before,#loco-admin.wrap .notice-locked p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-flag:before{content:""}#loco-admin.wrap .icon-tag:before{content:""}#loco-admin.wrap .icon-tags:before{content:""}#loco-admin.wrap .icon-print:before{content:""}#loco-admin.wrap .icon-camera:before{content:""}#loco-admin.wrap .icon-pencil:before{content:""}#loco-admin.wrap .icon-add:before{content:""}#loco-admin.wrap .icon-del:before{content:""}#loco-admin.wrap .icon-clear:before,#loco-admin.wrap a.icon.clear:before{content:""}#loco-admin.wrap .icon-ok-sign:before{content:"✔"}#loco-admin.wrap .icon-help:before{content:"?"}#loco-admin.wrap .icon-info:before,#loco-admin.wrap .notice-info>.has-icon:before,#loco-admin.wrap .notice-info p>strong.has-icon:before{content:"ℹ"}#loco-admin.wrap .icon-cancel:before{content:""}#loco-admin.wrap .icon-warn:before,#loco-admin.wrap .notice-error>.has-icon:before,#loco-admin.wrap .notice-error p>strong.has-icon:before,#loco-admin.wrap .notice-warning>.has-icon:before,#loco-admin.wrap .notice-warning p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-comment:before{content:""}#loco-admin.wrap .icon-bar-chart:before{content:""}#loco-admin.wrap .icon-key:before{content:""}#loco-admin.wrap .icon-cogs:before{content:""}#loco-admin.wrap .icon-comments:before{content:""}#loco-admin.wrap .icon-signout:before{content:""}#loco-admin.wrap .icon-signin:before{content:""}#loco-admin.wrap .icon-upload:before{content:""}#loco-admin.wrap .icon-twitter:before{content:"🐦"}#loco-admin.wrap .icon-facebook:before{content:""}#loco-admin.wrap .icon-github:before{content:""}#loco-admin.wrap .icon-feed:before{content:""}#loco-admin.wrap .icon-globe:before{content:""}#loco-admin.wrap .icon-wrench:before,#loco-admin.wrap .notice-debug>.has-icon:before,#loco-admin.wrap .notice-debug p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-group:before{content:""}#loco-admin.wrap .icon-cloud:before{content:""}#loco-admin.wrap .icon-copy:before{content:""}#loco-admin.wrap .icon-save:before{content:""}#loco-admin.wrap .icon-menu:before{content:""}#loco-admin.wrap .icon-table:before{content:""}#loco-admin.wrap .icon-caret-down:before{content:"▼"}#loco-admin.wrap .icon-caret-up:before{content:"▲"}#loco-admin.wrap .icon-caret-right:before{content:"▶"}#loco-admin.wrap .icon-mail:before{content:""}#loco-admin.wrap .icon-cloud-upload:before{content:""}#loco-admin.wrap .icon-file:before{content:""}#loco-admin.wrap .icon-circle-white:before{content:"⚬"}#loco-admin.wrap .icon-circle-black:before{content:"●"}#loco-admin.wrap .icon-eraser:before{content:""}#loco-admin.wrap .icon-unlock:before{content:""}#loco-admin.wrap .icon-apple:before{content:""}#loco-admin.wrap .icon-android:before{content:""}#loco-admin.wrap .icon-robot:before{content:"🤖"}#loco-admin.wrap .icon-back:before{content:"⬅"}#loco-admin.wrap .icon-next:before{content:"➔"}#loco-admin.wrap .icon-arrow-up:before{content:""}#loco-admin.wrap .icon-ccard:before{content:""}#loco-admin.wrap .icon-caret-left:before{content:"◀"}#loco-admin.wrap .icon-pro:before{content:"⚡"}#loco-admin.wrap .icon-bell:before{content:""}#loco-admin.wrap .icon-code:before{content:""}#loco-admin.wrap .icon-privacy:before{content:"🛡"}#loco-admin.wrap .icon-hellip:before{content:"…"}#loco-admin.wrap .icon-vellip:before{content:"⁞"}#loco-admin.wrap .icon-collapse:before{content:""}#loco-admin.wrap .icon-expand:before{content:""}#loco-admin.wrap .icon-wordpress:before{content:""}#loco-admin.wrap .icon-database:before{content:""}#loco-admin.wrap .icon-restore:before{content:""}#loco-admin.wrap .icon-pilcrow:before{content:"¶"}#loco-admin.wrap .icon-status.is-translated:before,#loco-admin.wrap .is-translated>header>.icon-status:before{color:#2e892e;content:"✓";text-align:center}#loco-admin.wrap .icon-status.is-untranslated:before,#loco-admin.wrap .is-untranslated>header>.icon-status:before{color:#aaa;content:"×";text-align:center;font-size:1.1em}#loco-admin.wrap .icon-status.is-flagged:before,#loco-admin.wrap .is-flagged>header>.icon-status:before{color:#bd2c00;content:"";text-align:center}#loco-admin.wrap .icon-status.is-translated.is-blank:before,#loco-admin.wrap .icon-status.is-translated.is-inherit:before,#loco-admin.wrap .is-translated.is-blank>header>.icon-status:before,#loco-admin.wrap .is-translated.is-inherit>header>.icon-status:before{content:"🗌"}#loco-admin.wrap .icon-status.is-fuzzy:before,#loco-admin.wrap .is-fuzzy>header>.icon-status:before{color:#666;content:""}#loco-admin.wrap .lang,#loco-admin.wrap .region,#loco-admin.wrap .variant-wales,#loco-admin.wrap .region-gb.lang-cy,#loco-admin.wrap .variant-scotland,#loco-admin.wrap .region-gb.lang-gd,#loco-admin.wrap .variant-valencia,#loco-admin.wrap .region-es.variant-valencia,#loco-admin.wrap .lang-ca,#loco-admin.wrap .region-es.lang-ca,#loco-admin.wrap .lang-eo,#loco-admin.wrap .lang-eu{color:#fff;background:#2e892e;display:inline-block;text-transform:uppercase;overflow:hidden;font-family:Verdana,Arial,sans-serif;font-size:9px;font-weight:normal;font-style:normal;line-height:12px;text-align:center;white-space:normal;text-shadow:none}#loco-admin.wrap .lang{width:20px;height:12px;line-height:12px;vertical-align:middle}#loco-admin.wrap .lang:before{content:attr(lang);vertical-align:baseline}#loco-admin.wrap .no-lang{width:18px;height:10px;border:solid 1px #2e892e;background:transparent}#loco-admin.wrap .lang-el{background-color:#1d48a3}#loco-admin.wrap .lang-el:before{content:"Ελ"}#loco-admin.wrap .region,#loco-admin.wrap .variant-wales,#loco-admin.wrap .region-gb.lang-cy,#loco-admin.wrap .variant-scotland,#loco-admin.wrap .region-gb.lang-gd,#loco-admin.wrap .variant-valencia,#loco-admin.wrap .region-es.variant-valencia,#loco-admin.wrap .lang-ca,#loco-admin.wrap .region-es.lang-ca,#loco-admin.wrap .lang-eo,#loco-admin.wrap .lang-eu{width:16px;height:12px;margin:0 2px;background-image:url(../img/flags.png?v=2.4.4);background-repeat:no-repeat;background-color:transparent}#loco-admin.wrap .region:before,#loco-admin.wrap .variant-wales:before,#loco-admin.wrap .region-gb.lang-cy:before,#loco-admin.wrap .variant-scotland:before,#loco-admin.wrap .region-gb.lang-gd:before,#loco-admin.wrap .variant-valencia:before,#loco-admin.wrap .region-es.variant-valencia:before,#loco-admin.wrap .lang-ca:before,#loco-admin.wrap .region-es.lang-ca:before,#loco-admin.wrap .lang-eo:before,#loco-admin.wrap .lang-eu:before{visibility:hidden}#loco-admin.wrap .lang-zh{background-color:#b90000}#loco-admin.wrap .lang-zh.script-hans:before{content:"中国"}#loco-admin.wrap .lang-zh.script-hant:before{content:"中國"}#loco-admin.wrap .__{background-position:0 0}#loco-admin.wrap .lang-eo{background-position:0 -12px}#loco-admin.wrap .lang-eu{background-position:0 -24px}#loco-admin.wrap .lang-ca,#loco-admin.wrap .region-es.lang-ca{background-position:0 -36px}#loco-admin.wrap .region-tg{background-position:0 -48px}#loco-admin.wrap .region-me{background-position:0 -60px}#loco-admin.wrap .region-la{background-position:0 -73px}#loco-admin.wrap .region-mr{background-position:0 -85px}#loco-admin.wrap .region-ni{background-position:0 -97px}#loco-admin.wrap .region-lv{background-position:0 -109px}#loco-admin.wrap .region-om{background-position:0 -121px}#loco-admin.wrap .region-af{background-position:0 -133px}#loco-admin.wrap .region-cy{background-position:0 -145px}#loco-admin.wrap .region-bj{background-position:0 -157px}#loco-admin.wrap .region-aq{background-position:0 -169px}#loco-admin.wrap .region-cn{background-position:0 -186px}#loco-admin.wrap .region-co{background-position:0 -198px}#loco-admin.wrap .region-cx{background-position:0 -210px}#loco-admin.wrap .region-ag{background-position:0 -222px}#loco-admin.wrap .region-ms{background-position:0 -234px}#loco-admin.wrap .region-md{background-position:0 -246px}#loco-admin.wrap .region-zm{background-position:0 -258px}#loco-admin.wrap .region-vn{background-position:0 -270px}#loco-admin.wrap .region-tf{background-position:0 -282px}#loco-admin.wrap .region-td{background-position:0 -294px}#loco-admin.wrap .region-yt{background-position:0 -306px}#loco-admin.wrap .region-lb{background-position:0 -318px}#loco-admin.wrap .region-mf{background-position:0 -330px}#loco-admin.wrap .region-lu{background-position:0 -347px}#loco-admin.wrap .region-mq{background-position:0 -359px}#loco-admin.wrap .region-cz{background-position:0 -371px}#loco-admin.wrap .region-ae{background-position:0 -383px}#loco-admin.wrap .region-cm{background-position:0 -395px}#loco-admin.wrap .region-bi{background-position:0 -407px}#loco-admin.wrap .region-ar{background-position:0 -419px}#loco-admin.wrap .region-as{background-position:0 -431px}#loco-admin.wrap .region-bh{background-position:0 -443px}#loco-admin.wrap .region-cl{background-position:0 -455px}#loco-admin.wrap .region-ad{background-position:0 -467px}#loco-admin.wrap .region-mp{background-position:0 -479px}#loco-admin.wrap .region-lt{background-position:0 -491px}#loco-admin.wrap .region-mg{background-position:0 -503px}#loco-admin.wrap .region-lc{background-position:0 -515px}#loco-admin.wrap .region-tr{background-position:0 -527px}#loco-admin.wrap .region-ua{background-position:0 -539px}#loco-admin.wrap .region-tv{background-position:0 -551px}#loco-admin.wrap .region-vi{background-position:0 -563px}#loco-admin.wrap .region-mt{background-position:0 -575px}#loco-admin.wrap .region-no{background-position:0 -587px}#loco-admin.wrap .region-mc{background-position:0 -599px}#loco-admin.wrap .region-ch{background-position:0 -611px}#loco-admin.wrap .region-bl{background-position:0 -623px}#loco-admin.wrap .region-aw{background-position:0 -640px}#loco-admin.wrap .region-bz{background-position:0 -652px}#loco-admin.wrap .region-bm{background-position:0 -664px}#loco-admin.wrap .region-ci{background-position:0 -676px}#loco-admin.wrap .region-mu{background-position:0 -688px}#loco-admin.wrap .region-us{background-position:0 -700px}#loco-admin.wrap .region-tw{background-position:0 -712px}#loco-admin.wrap .region-ye{background-position:0 -724px}#loco-admin.wrap .region-mw{background-position:0 -736px}#loco-admin.wrap .region-nl{background-position:0 -748px}#loco-admin.wrap .region-ls{background-position:0 -760px}#loco-admin.wrap .region-bo{background-position:0 -772px}#loco-admin.wrap .region-at{background-position:0 -784px}#loco-admin.wrap .region-ck{background-position:0 -796px}#loco-admin.wrap .region-by{background-position:0 -808px}#loco-admin.wrap .region-au{background-position:0 -820px}#loco-admin.wrap .region-bn{background-position:0 -832px}#loco-admin.wrap .region-ma{background-position:0 -844px}#loco-admin.wrap .region-nz{background-position:0 -856px}#loco-admin.wrap .region-lr{background-position:0 -868px}#loco-admin.wrap .region-mv{background-position:0 -880px}#loco-admin.wrap .region-tc{background-position:0 -892px}#loco-admin.wrap .region-ug{background-position:0 -904px}#loco-admin.wrap .region-tt{background-position:0 -916px}#loco-admin.wrap .region-pl{background-position:0 -928px}#loco-admin.wrap .region-rs{background-position:0 -940px}#loco-admin.wrap .region-in{background-position:0 -952px}#loco-admin.wrap .region-ge{background-position:0 -964px}#loco-admin.wrap .region-gr{background-position:0 -976px}#loco-admin.wrap .region-gs{background-position:0 -988px}#loco-admin.wrap .region-gd{background-position:0 -1000px}#loco-admin.wrap .region-io{background-position:0 -1012px}#loco-admin.wrap .region-hk{background-position:0 -1024px}#loco-admin.wrap .region-kp{background-position:0 -1036px}#loco-admin.wrap .region-kg{background-position:0 -1048px}#loco-admin.wrap .region-pm{background-position:0 -1060px}#loco-admin.wrap .region-sv{background-position:0 -1072px}#loco-admin.wrap .region-re{background-position:0 -1084px}#loco-admin.wrap .region-sa{background-position:0 -1096px}#loco-admin.wrap .region-sc{background-position:0 -1108px}#loco-admin.wrap .region-st{background-position:0 -1120px}#loco-admin.wrap .region-ke{background-position:0 -1132px}#loco-admin.wrap .region-im{background-position:0 -1144px}#loco-admin.wrap .region-kr{background-position:0 -1161px}#loco-admin.wrap .region-gf{background-position:0 -1173px}#loco-admin.wrap .region-dj{background-position:0 -1185px}#loco-admin.wrap .region-gq{background-position:0 -1197px}#loco-admin.wrap .region-gp{background-position:0 -1209px}#loco-admin.wrap .region-dk{background-position:0 -1221px}#loco-admin.wrap .region-gg{background-position:0 -1233px}#loco-admin.wrap .region-il{background-position:0 -1250px}#loco-admin.wrap .region-pn{background-position:0 -1262px}#loco-admin.wrap .region-sb{background-position:0 -1274px}#loco-admin.wrap .region-py{background-position:0 -1286px}#loco-admin.wrap .region-ru{background-position:0 -1298px}#loco-admin.wrap .region-kw{background-position:0 -1310px}#loco-admin.wrap .region-do{background-position:0 -1322px}#loco-admin.wrap .region-gt{background-position:0 -1334px}#loco-admin.wrap .region-gb{background-position:0 -1346px}#loco-admin.wrap .region-gu{background-position:0 -1358px}#loco-admin.wrap .region-je{background-position:0 -1370px}#loco-admin.wrap .region-hm{background-position:0 -1387px}#loco-admin.wrap .region-sg{background-position:0 -1399px}#loco-admin.wrap .region-pk{background-position:0 -1411px}#loco-admin.wrap .region-sr{background-position:0 -1423px}#loco-admin.wrap .region-se{background-position:0 -1435px}#loco-admin.wrap .region-jp{background-position:0 -1447px}#loco-admin.wrap .region-gw{background-position:0 -1459px}#loco-admin.wrap .region-eh{background-position:0 -1471px}#loco-admin.wrap .region-dz{background-position:0 -1483px}#loco-admin.wrap .region-ga{background-position:0 -1495px}#loco-admin.wrap .region-fr{background-position:0 -1507px}#loco-admin.wrap .region-dm{background-position:0 -1519px}#loco-admin.wrap .region-hn{background-position:0 -1531px}#loco-admin.wrap .region-sd{background-position:0 -1543px}#loco-admin.wrap .region-rw{background-position:0 -1555px}#loco-admin.wrap .region-ph{background-position:0 -1567px}#loco-admin.wrap .region-ss{background-position:0 -1579px}#loco-admin.wrap .region-qa{background-position:0 -1596px}#loco-admin.wrap .region-pe{background-position:0 -1608px}#loco-admin.wrap .region-pr{background-position:0 -1620px}#loco-admin.wrap .region-si{background-position:0 -1632px}#loco-admin.wrap .region-ht{background-position:0 -1644px}#loco-admin.wrap .region-es{background-position:0 -1656px}#loco-admin.wrap .region-gl{background-position:0 -1668px}#loco-admin.wrap .region-gm{background-position:0 -1680px}#loco-admin.wrap .region-er{background-position:0 -1692px}#loco-admin.wrap .region-fi{background-position:0 -1704px}#loco-admin.wrap .region-ee{background-position:0 -1716px}#loco-admin.wrap .region-kn{background-position:0 -1728px}#loco-admin.wrap .region-hu{background-position:0 -1740px}#loco-admin.wrap .region-iq{background-position:0 -1752px}#loco-admin.wrap .region-ky{background-position:0 -1764px}#loco-admin.wrap .region-sh{background-position:0 -1776px}#loco-admin.wrap .region-ps{background-position:0 -1788px}#loco-admin.wrap .region-pf{background-position:0 -1800px}#loco-admin.wrap .region-sj{background-position:0 -1812px}#loco-admin.wrap .region-id{background-position:0 -1824px}#loco-admin.wrap .region-is{background-position:0 -1836px}#loco-admin.wrap .region-eg{background-position:0 -1848px}#loco-admin.wrap .region-fk{background-position:0 -1860px}#loco-admin.wrap .region-fj{background-position:0 -1872px}#loco-admin.wrap .region-gn{background-position:0 -1884px}#loco-admin.wrap .region-gy{background-position:0 -1896px}#loco-admin.wrap .region-ir{background-position:0 -1908px}#loco-admin.wrap .region-km{background-position:0 -1920px}#loco-admin.wrap .region-ie{background-position:0 -1932px}#loco-admin.wrap .region-kz{background-position:0 -1944px}#loco-admin.wrap .region-ro{background-position:0 -1956px}#loco-admin.wrap .region-sk{background-position:0 -1968px}#loco-admin.wrap .region-pg{background-position:0 -1980px}#loco-admin.wrap .region-pt{background-position:0 -1992px}#loco-admin.wrap .region-so{background-position:0 -2004px}#loco-admin.wrap .region-sx{background-position:0 -2016px}#loco-admin.wrap .region-hr{background-position:0 -2033px}#loco-admin.wrap .region-ki{background-position:0 -2045px}#loco-admin.wrap .region-jm{background-position:0 -2057px}#loco-admin.wrap .region-ec{background-position:0 -2069px}#loco-admin.wrap .region-et{background-position:0 -2081px}#loco-admin.wrap .region-fo{background-position:0 -2093px}#loco-admin.wrap .region-kh{background-position:0 -2105px}#loco-admin.wrap .region-sy{background-position:0 -2117px}#loco-admin.wrap .region-sn{background-position:0 -2129px}#loco-admin.wrap .region-pw{background-position:0 -2141px}#loco-admin.wrap .region-sl{background-position:0 -2153px}#loco-admin.wrap .region-fm{background-position:0 -2165px}#loco-admin.wrap .region-gi{background-position:0 -2177px}#loco-admin.wrap .region-de{background-position:0 -2189px}#loco-admin.wrap .region-gh{background-position:0 -2201px}#loco-admin.wrap .region-jo{background-position:0 -2213px}#loco-admin.wrap .region-it{background-position:0 -2225px}#loco-admin.wrap .region-pa{background-position:0 -2237px}#loco-admin.wrap .region-sz{background-position:0 -2249px}#loco-admin.wrap .region-sm{background-position:0 -2261px}#loco-admin.wrap .region-tn{background-position:0 -2273px}#loco-admin.wrap .region-ml{background-position:0 -2285px}#loco-admin.wrap .region-cg{background-position:0 -2297px}#loco-admin.wrap .region-ax{background-position:0 -2309px}#loco-admin.wrap .region-ao{background-position:0 -2321px}#loco-admin.wrap .region-bt{background-position:0 -2333px}#loco-admin.wrap .region-an{background-position:0 -2345px}#loco-admin.wrap .region-bb{background-position:0 -2357px}#loco-admin.wrap .region-cf{background-position:0 -2369px}#loco-admin.wrap .region-mm{background-position:0 -2381px}#loco-admin.wrap .region-li{background-position:0 -2393px}#loco-admin.wrap .region-na{background-position:0 -2405px}#loco-admin.wrap .region-mz{background-position:0 -2417px}#loco-admin.wrap .region-to{background-position:0 -2429px}#loco-admin.wrap .region-vg{background-position:0 -2441px}#loco-admin.wrap .region-ve{background-position:0 -2453px}#loco-admin.wrap .region-tz{background-position:0 -2465px}#loco-admin.wrap .region-tm{background-position:0 -2477px}#loco-admin.wrap .region-mx{background-position:0 -2489px}#loco-admin.wrap .region-nc{background-position:0 -2501px}#loco-admin.wrap .region-mo{background-position:0 -2513px}#loco-admin.wrap .region-lk{background-position:0 -2525px}#loco-admin.wrap .region-cd{background-position:0 -2537px}#loco-admin.wrap .region-al{background-position:0 -2549px}#loco-admin.wrap .region-bw{background-position:0 -2561px}#loco-admin.wrap .region-cs{background-position:0 -2573px}#loco-admin.wrap .region-cr{background-position:0 -2585px}#loco-admin.wrap .region-bv{background-position:0 -2597px}#loco-admin.wrap .region-am{background-position:0 -2609px}#loco-admin.wrap .region-az{background-position:0 -2621px}#loco-admin.wrap .region-ba{background-position:0 -2633px}#loco-admin.wrap .region-mn{background-position:0 -2645px}#loco-admin.wrap .region-nu{background-position:0 -2657px}#loco-admin.wrap .region-my{background-position:0 -2669px}#loco-admin.wrap .region-tl{background-position:0 -2681px}#loco-admin.wrap .region-ws{background-position:0 -2693px}#loco-admin.wrap .region-th{background-position:0 -2705px}#loco-admin.wrap .region-nf{background-position:0 -2717px}#loco-admin.wrap .region-ly{background-position:0 -2729px}#loco-admin.wrap .region-ai{background-position:0 -2741px}#loco-admin.wrap .region-br{background-position:0 -2753px}#loco-admin.wrap .region-cv{background-position:0 -2765px}#loco-admin.wrap .region-be{background-position:0 -2777px}#loco-admin.wrap .region-ca{background-position:0 -2789px}#loco-admin.wrap .region-bd{background-position:0 -2801px}#loco-admin.wrap .region-cw{background-position:0 -2813px}#loco-admin.wrap .region-bs{background-position:0 -2830px}#loco-admin.wrap .region-ng{background-position:0 -2842px}#loco-admin.wrap .region-mk{background-position:0 -2854px}#loco-admin.wrap .region-np{background-position:0 -2866px}#loco-admin.wrap .region-va{background-position:0 -2878px}#loco-admin.wrap .region-uz{background-position:0 -2890px}#loco-admin.wrap .region-um{background-position:0 -2902px}#loco-admin.wrap .region-tk{background-position:0 -2914px}#loco-admin.wrap .region-vc{background-position:0 -2926px}#loco-admin.wrap .region-zw{background-position:0 -2938px}#loco-admin.wrap .region-nr{background-position:0 -2950px}#loco-admin.wrap .region-ne{background-position:0 -2962px}#loco-admin.wrap .region-cu{background-position:0 -2974px}#loco-admin.wrap .region-bq{background-position:0 -2986px}#loco-admin.wrap .region-bf{background-position:0 -2998px}#loco-admin.wrap .region-bg{background-position:0 -3010px}#loco-admin.wrap .region-cc{background-position:0 -3022px}#loco-admin.wrap .region-mh{background-position:0 -3034px}#loco-admin.wrap .region-za{background-position:0 -3046px}#loco-admin.wrap .region-uy{background-position:0 -3058px}#loco-admin.wrap .region-wf{background-position:0 -3070px}#loco-admin.wrap .region-vu{background-position:0 -3082px}#loco-admin.wrap .region-tj{background-position:0 -3094px}#loco-admin.wrap .variant-scotland,#loco-admin.wrap .region-gb.lang-gd{background-position:0 -3106px}#loco-admin.wrap .variant-valencia,#loco-admin.wrap .region-es.variant-valencia{background-position:0 -3118px}#loco-admin.wrap .variant-wales,#loco-admin.wrap .region-gb.lang-cy{background-position:0 -3130px}#loco-admin.wrap .x-eu{background-position:0 -3142px}#loco-admin.wrap span.lang code{display:none}#loco-admin.wrap .icon-notag:before{content:""}#loco-admin.wrap .icon-python:before{content:"🐍"}#loco-admin.wrap .icon-unicode:before{content:"u"}#loco-admin.wrap .icon-json:before{content:"{"}#loco-admin.wrap .icon-bullist:before{content:""}#loco-admin.wrap .icon-numlist:before{content:""}#loco-admin.wrap .icon-indent:before{content:""}#loco-admin.wrap .icon-outdent:before{content:""}#loco-admin.wrap .icon-link:before{content:""}#loco-admin.wrap .icon-unlink:before{content:""}#loco-admin.wrap .icon-bold:before{content:"B"}#loco-admin.wrap .icon-italic:before{content:"I"}#loco-admin.wrap .icon-translate:before{content:""}#loco-admin.wrap .icon-proj:before{content:""}#loco-admin.wrap .icon-plural:before{content:"᛬"}#loco-admin.wrap .icon-max:before,#loco-admin.wrap .icon-full-screen:before{content:""}#loco-admin.wrap .icon-min:before{content:""}#loco-admin.wrap .icon-sort:before{content:""}#loco-admin.wrap .icon-ok:before,#loco-admin.wrap .notice-success>.has-icon:before,#loco-admin.wrap .notice-success p>strong.has-icon:before{content:"✓"}#loco-admin.wrap .icon-ok-empty:before{content:"🗌"}#loco-admin.wrap .icon-checkbox-checked:before,#loco-admin.wrap .selector.multi li.checked .icon-checkbox:before{content:"☑"}#loco-admin.wrap .icon-checkbox-unchecked:before{content:"☐"}#loco-admin.wrap .icon-checkbox-partial:before{content:"☉"}#loco-admin.wrap .icon-radio-checked:before{content:"⚫"}#loco-admin.wrap .icon-radio-unchecked:before{content:"⚪"}#loco-admin.wrap .icon-ext:before{content:"⬈"}#loco-admin.wrap .icon-share:before{content:""}#loco-admin.wrap .icon-star:before{content:""}#loco-admin.wrap .icon-user:before{content:""}#loco-admin.wrap .icon-remove:before,#loco-admin.wrap a.icon.close:before{content:"×"}#loco-admin.wrap .icon-cog:before{content:""}#loco-admin.wrap .icon-trash:before{content:""}#loco-admin.wrap .icon-time:before,#loco-admin.wrap .icon-history:before{content:""}#loco-admin.wrap .icon-download:before{content:""}#loco-admin.wrap .icon-revert:before{content:""}#loco-admin.wrap .icon-sync:before{content:""}#loco-admin.wrap .icon-lock:before,#loco-admin.wrap .notice-locked>.has-icon:before,#loco-admin.wrap .notice-locked p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-flag:before{content:""}#loco-admin.wrap .icon-tag:before{content:""}#loco-admin.wrap .icon-tags:before{content:""}#loco-admin.wrap .icon-print:before{content:""}#loco-admin.wrap .icon-camera:before{content:""}#loco-admin.wrap .icon-pencil:before{content:""}#loco-admin.wrap .icon-add:before{content:""}#loco-admin.wrap .icon-del:before{content:""}#loco-admin.wrap .icon-clear:before,#loco-admin.wrap a.icon.clear:before{content:""}#loco-admin.wrap .icon-ok-sign:before{content:"✔"}#loco-admin.wrap .icon-help:before{content:"?"}#loco-admin.wrap .icon-info:before,#loco-admin.wrap .notice-info>.has-icon:before,#loco-admin.wrap .notice-info p>strong.has-icon:before{content:"ℹ"}#loco-admin.wrap .icon-cancel:before{content:""}#loco-admin.wrap .icon-warn:before,#loco-admin.wrap .notice-error>.has-icon:before,#loco-admin.wrap .notice-error p>strong.has-icon:before,#loco-admin.wrap .notice-warning>.has-icon:before,#loco-admin.wrap .notice-warning p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-comment:before{content:""}#loco-admin.wrap .icon-bar-chart:before{content:""}#loco-admin.wrap .icon-key:before{content:""}#loco-admin.wrap .icon-cogs:before{content:""}#loco-admin.wrap .icon-comments:before{content:""}#loco-admin.wrap .icon-signout:before{content:""}#loco-admin.wrap .icon-signin:before{content:""}#loco-admin.wrap .icon-upload:before{content:""}#loco-admin.wrap .icon-twitter:before{content:"🐦"}#loco-admin.wrap .icon-facebook:before{content:""}#loco-admin.wrap .icon-github:before{content:""}#loco-admin.wrap .icon-feed:before{content:""}#loco-admin.wrap .icon-globe:before{content:""}#loco-admin.wrap .icon-wrench:before,#loco-admin.wrap .notice-debug>.has-icon:before,#loco-admin.wrap .notice-debug p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-group:before{content:""}#loco-admin.wrap .icon-cloud:before{content:""}#loco-admin.wrap .icon-copy:before{content:""}#loco-admin.wrap .icon-save:before{content:""}#loco-admin.wrap .icon-menu:before{content:""}#loco-admin.wrap .icon-table:before{content:""}#loco-admin.wrap .icon-caret-down:before{content:"▼"}#loco-admin.wrap .icon-caret-up:before{content:"▲"}#loco-admin.wrap .icon-caret-right:before{content:"▶"}#loco-admin.wrap .icon-mail:before{content:""}#loco-admin.wrap .icon-cloud-upload:before{content:""}#loco-admin.wrap .icon-file:before{content:""}#loco-admin.wrap .icon-circle-white:before{content:"⚬"}#loco-admin.wrap .icon-circle-black:before{content:"●"}#loco-admin.wrap .icon-eraser:before{content:""}#loco-admin.wrap .icon-unlock:before{content:""}#loco-admin.wrap .icon-apple:before{content:""}#loco-admin.wrap .icon-android:before{content:""}#loco-admin.wrap .icon-robot:before{content:"🤖"}#loco-admin.wrap .icon-back:before{content:"⬅"}#loco-admin.wrap .icon-next:before{content:"➔"}#loco-admin.wrap .icon-arrow-up:before{content:""}#loco-admin.wrap .icon-ccard:before{content:""}#loco-admin.wrap .icon-caret-left:before{content:"◀"}#loco-admin.wrap .icon-pro:before{content:"⚡"}#loco-admin.wrap .icon-bell:before{content:""}#loco-admin.wrap .icon-code:before{content:""}#loco-admin.wrap .icon-privacy:before{content:"🛡"}#loco-admin.wrap .icon-hellip:before{content:"…"}#loco-admin.wrap .icon-vellip:before{content:"⁞"}#loco-admin.wrap .icon-collapse:before{content:""}#loco-admin.wrap .icon-expand:before{content:""}#loco-admin.wrap .icon-wordpress:before{content:""}#loco-admin.wrap .icon-database:before{content:""}#loco-admin.wrap .icon-restore:before{content:""}#loco-admin.wrap .icon-pilcrow:before{content:"¶"}#loco-admin.wrap .icon,#loco-admin.wrap .has-icon:before,#loco-admin.wrap .has-dashicon:before{speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco-admin.wrap .icon,#loco-admin.wrap .has-icon:before{font-family:"loco"}#loco-admin.wrap .has-dashicon:before{font-family:"dashicons";font-size:1.4em}#loco-admin.wrap .has-icon:before,#loco-admin.wrap .has-dashicon:before,#loco-admin.wrap .has-icon>span{display:inline-block;vertical-align:middle}#loco-admin.wrap .only-icon{text-align:center}#loco-admin.wrap .only-icon:before{text-align:center;padding:0}#loco-admin.wrap .only-icon span{display:none}#loco-admin.wrap a,#loco-admin.wrap .wp-core-ui .button-link{text-decoration:none}#loco-admin.wrap h3:hover>a.loco-anchor{color:#ccc}#loco-admin.wrap h3:hover>a.loco-anchor:before{content:"¶"}#loco-admin.wrap .has-lang>span{display:inline-block;vertical-align:middle}#loco-admin.wrap a.has-lang:hover>span:last-child{text-decoration:underline}#loco-admin.wrap h1 ul,#loco-admin.wrap h1 li{margin:0;padding:0}#loco-admin.wrap h1 li{display:inline-block}#loco-admin.wrap h1 li:after{content:"/";color:#999;text-shadow:none;display:inline-block}#loco-admin.wrap h1 li:last-child:after{content:""}#loco-admin.wrap h1 li:last-child a{color:inherit;pointer-events:none;cursor:auto}#loco-admin.wrap h2 span{color:#999;font-weight:normal}#loco-admin.wrap h2 .loco-meta,#loco-admin.wrap h3 .loco-meta{color:inherit;font-size:14px;font-weight:normal;vertical-align:middle}#loco-admin.wrap .wp-list-table td:first-child .icon{width:16px;display:inline-block;text-align:center}#loco-admin.wrap .wp-list-table td{white-space:nowrap}#loco-admin.wrap .wp-list-table td>a,#loco-admin.wrap .wp-list-table td>time{display:inline-block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis;-ms-text-overflow:ellipsis}#loco-admin.wrap .wp-list-table th.loco-sort{cursor:pointer}#loco-admin.wrap .wp-list-table th.loco-sort:hover{color:#000}#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after{padding:0 0 0 4px;color:#999}#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after{content:"▼"}#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after{content:"▲"}#loco-admin.wrap .wp-list-table td.has-row-actions{overflow:visible}#loco-admin.wrap form.loco-filter{display:block;margin-bottom:5px}#loco-admin.wrap form.loco-filter .icon-filter{color:#999}#loco-admin.wrap nav.above-list-table{margin-bottom:1em}#loco-admin.wrap nav.above-list-table a{display:inline-block;margin-right:1em}#loco-admin.wrap .wp-core-ui button.inverted,#loco-admin.wrap .wp-core-ui button.inverted:hover,#loco-admin.wrap .po-fuzzy button.icon-cloud{background:-moz-linear-gradient(top, #cccccc 0%, #e0e0e0 30%, #fefefe 100%);background:-webkit-linear-gradient(top, #cccccc 0%, #e0e0e0 30%, #fefefe 100%);background:linear-gradient(to bottom, #cccccc 0%, #e0e0e0 30%, #fefefe 100%);-webkit-box-shadow:0 1px 0 #fff;-moz-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff;border-color:gray}#loco-admin.wrap .wp-core-ui button:active,#loco-admin.wrap .wp-core-ui button.inverted:active{border-color:#5b9dd9}#loco-admin.wrap .loco-clearable{display:inline-block;vertical-align:middle;position:relative}#loco-admin.wrap .loco-clearable a.clear,#loco-admin.wrap .auto-comp-wrap a.clear{top:0;right:0;outline:none;margin:0;border:solid 1px transparent;padding:5px 5px;position:absolute;font-size:1em;line-height:normal}#loco-admin.wrap .loco-clearable a.clear:before,#loco-admin.wrap .auto-comp-wrap a.clear:before{vertical-align:middle;padding:0;color:#999}#loco-admin.wrap .loco-clearable a.clear:hover:before,#loco-admin.wrap .auto-comp-wrap a.clear:hover:before{color:#333}#loco-admin.wrap .loco-clearable a.clear span,#loco-admin.wrap .auto-comp-wrap a.clear span{display:none}#loco-admin.wrap .loco-clearable ::-ms-clear,#loco-admin.wrap .auto-comp-wrap ::-ms-clear{display:none}#loco-admin.wrap div.progress{color:#000;background:transparent !important}#loco-admin.wrap div.progress *{height:100%;overflow:hidden;white-space:nowrap}#loco-admin.wrap div.progress .t{background-color:#ddd;border:1px solid #ccc}#loco-admin.wrap div.progress .t .bar{float:left;clear:none;background-color:#3db63d}#loco-admin.wrap div.progress .t .bar.f{background-color:#bd2c00}#loco-admin.wrap div.progress .l{display:block}#loco-admin.wrap td div.progress .t{border:none}#loco-admin.wrap td div.progress .l{display:none}#loco-admin.wrap code.path{color:#333;margin:0;padding:0;display:inline;background:transparent}#loco-admin.wrap .loco-danger{color:#d54e21}#loco-admin.wrap .notice,#loco-admin.wrap .panel{background:#fff;position:relative;margin:1em 0;padding:1px 12px}#loco-admin.wrap .notice-generic{border-color:#ddd}#loco-admin.wrap .notice-success>.has-icon,#loco-admin.wrap .notice-success p>strong.has-icon{color:#000}#loco-admin.wrap .notice-warning{border-color:orange}#loco-admin.wrap .notice-error{border-color:#dc3232}#loco-admin.wrap .notice-debug{border-color:#00a0d2}#loco-admin.wrap .notice-danger{border-color:#dc3232}#loco-admin.wrap .notice-locked{border-color:orange}#loco-admin.wrap .notice>.has-icon:before,#loco-admin.wrap .notice p>strong.has-icon:before{padding-right:6px}#loco-admin.wrap .notice>p>a.button.has-icon:before{width:1.2em}#loco-admin.wrap .notice>p>em{color:#d54e21;font-style:normal}#loco-admin.wrap .notice>p>em a{color:inherit}#loco-admin.wrap .notice>p a:hover,#loco-admin.wrap .notice>nav a:hover{text-decoration:underline}#loco-admin.wrap .notice>p a.button,#loco-admin.wrap .notice>nav a.button{text-decoration:inherit}#loco-admin.wrap .notice.has-nav{display:flex;flex-direction:row}#loco-admin.wrap .notice.has-nav p,#loco-admin.wrap .notice.has-nav nav{line-height:22px;flex-grow:1}#loco-admin.wrap .notice.has-nav nav{text-align:right;padding:2px;margin:.5em 0}#loco-admin.wrap .notice.has-nav.is-dismissible{padding-right:38px}#loco-admin.wrap .notice.has-nav a{white-space:nowrap}#loco-admin.wrap .notice.has-nav nav>span{color:#666}#loco-admin.wrap .notice>h3>span{display:inline-block;vertical-align:middle}#loco-admin.wrap ul.problems li{font-style:italic}#loco-admin.wrap label{position:relative}#loco-admin.wrap label.for-disabled,#loco-admin.wrap label.for-disabled>input{cursor:default !important}#loco-admin.wrap input.regular-text,#loco-admin.wrap textarea.regular-text{width:25em}#loco-admin.wrap .button-link{padding:0 10px 1px}#loco-admin.wrap .button-danger{background:#ba0000;border-color:#900 #600 #600;-webkit-box-shadow:0 1px 0 #600;-moz-box-shadow:0 1px 0 #600;box-shadow:0 1px 0 #600;color:#fff;text-shadow:0 -1px 1px #600,1px 0 1px #600,0 1px 1px #600,-1px 0 1px #600}#loco-admin.wrap .button-success{background:#00b500;border-color:#090 #2e892e #2e892e;-webkit-box-shadow:0 1px 0 #2e892e;-moz-box-shadow:0 1px 0 #2e892e;box-shadow:0 1px 0 #2e892e;color:#fff;text-shadow:0 -1px 1px #2e892e,1px 0 1px #2e892e,0 1px 1px #2e892e,-1px 0 1px #2e892e}#loco-admin.wrap .button-success:hover{background:#3db63d}#loco-admin.wrap .button-danger[disabled],#loco-admin.wrap .button-success[disabled]{text-shadow:none !important}#loco-admin.wrap form button.loco-loading.button-large{padding-left:0}#loco-admin.wrap form button.loco-loading.button-large:before{width:16px;height:16px;margin:0 4px;content:" ";font-size:16px;line-height:1;display:inline-block;vertical-align:sub}#loco-admin.wrap ::placeholder{color:#ccc}#loco-admin.wrap ::-webkit-input-placeholder{color:#ccc}#loco-admin.wrap :-moz-placeholder{color:#ccc;opacity:1}#loco-admin.wrap ::-moz-placeholder{color:#ccc;opacity:1}#loco-admin.wrap :-ms-input-placeholder{color:#ccc}#loco-admin.wrap .ielt10 .placeheld{color:#ccc}#loco-admin.wrap a.has-raquo:after{content:" »"}#loco-admin.wrap a.has-laquo:before{content:"« "}#loco-admin.wrap span.inline-spinner{display:inline-block;min-width:16px;min-height:16px;background:transparent url(../img/spin-modal.gif?v=2.4.4) 0 0 no-repeat}.js #wpbody-content>.notice{display:none}.js #wpbody-content>.notice.inline{display:block}.js #loco-admin.wrap .jshide,.no-js #loco-admin.wrap .jsonly{display:none !important}#loco-admin.wrap .invis{visibility:hidden}.form-table tr{vertical-align:top}.form-table tr.compact td{padding-top:0}.loco-modal{min-width:50%;min-height:100px}.loco-modal-wide{min-width:90% !important}.loco-modal-no-close .ui-dialog-titlebar-close{display:none}.loco-modal.request-filesystem-credentials-dialog{top:15% !important;max-height:85% !important}.loco-modal.request-filesystem-credentials-dialog>.ui-dialog-content{background:inherit}.loco-modal.request-filesystem-credentials-dialog .ftp-password>label>em:last-child{display:none}.ui-dialog-content>div.loco-loading{height:100%;background:transparent url(../img/spin-modal.gif?v=2.4.4) center 20px no-repeat}#loco-po-ref ol li{color:#aaa;margin:0;white-space:pre;padding:0 0 0 1em;font:normal 12px/17px Consolas,Monaco,monospace;background:transparent;border-left:1px solid #eee}#loco-po-ref ol li code{margin:0;padding:0;display:inline;background:inherit}#loco-po-ref ol li.highlighted{color:#666;background-color:#f8eec7}#loco-po-ref ol li.highlighted code.T_CONSTANT_ENCAPSED_STRING{color:#c931c7}#loco-credit>*{vertical-align:middle}#loco-credit>a{display:inline-block;position:relative;overflow:hidden;background:transparent url(../img/logo-foot.gif?v=2.4.4) 0 0 no-repeat;height:30px;width:100px;text-indent:200px;-webkit-transition-duration:0s;transition-duration:0s}#loco-credit>a:hover{background-position:0 -35px}#loco-content{position:relative}#footer-upgrade span:before{color:#ccc;content:" | ";display:inline;padding-left:.5em;padding-right:.5em}#footer-upgrade span:first-child:before{content:"";display:none}.loco-clearfix:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}dl.debug dt{font-weight:bold}dl.debug dt,dl.debug dd{white-space:pre}.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(0,115,170,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#0073aa;foo:#0073aa}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#66c6e4 !important;background:#008ec2 !important;border-color:#008ec2 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../img/skins/fresh/spin-primary-button.gif?v=2.4.4) 0 0 no-repeat !important}
|
pub/css/editor.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#loco-editor{border:solid 1px #ccc}#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.4.1);background-repeat:no-repeat;min-height:16px}#loco-editor ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.4.1) 0 0 no-repeat;min-height:75px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.4.1);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.4.1);background-size:16px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.4.1);background-size:16px}}#loco-editor ._green_glow_inner,#loco-editor .is-editable>.wg-content>textarea:focus,#loco-editor .is-editable>.wg-content.has-focus .ace_scroller,#loco-editor .is-editable>.wg-content.has-focus .wysihtml-editor,#loco-editor .is-editable>.wg-content.has-focus .mce-content-body{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}#loco-editor ._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}#loco-editor .loco-font,#loco-editor .is-table .wg-thead .wg-sortable>header:after{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco-editor div.ta-mirror{position:absolute;top:0;border:solid 1px transparent;color:transparent;padding:.4em .6em;pointer-events:none}#loco-editor div.ta-mirror span{position:relative}#loco-editor div.ta-mirror span:after{color:#ccc;white-space:pre;display:inline-block;position:absolute;top:0;line-height:normal}#loco-editor div.ta-mirror .crlf:after{content:"¬"}#loco-editor div.ta-mirror .eof:after{content:"¶"}#loco-editor div.ta-mirror .x20:after{content:"·";color:#aaa}#loco-editor div.ta-mirror .x9:after{content:"⟶"}#loco-editor div.ta-mirror,#loco-editor .has-mirror textarea{white-space:pre-wrap;word-wrap:break-word;word-spacing:0px}#loco-editor .has-mirror ::placeholder{color:transparent}#loco-editor .has-mirror ::-webkit-input-placeholder{color:transparent}#loco-editor .has-mirror :-moz-placeholder{color:transparent;opacity:1}#loco-editor .has-mirror ::-moz-placeholder{color:transparent;opacity:1}#loco-editor .has-mirror :-ms-input-placeholder{color:transparent}#loco-editor .has-mirror .ielt10 .placeheld{color:transparent}#loco-editor div.ta-mirror{left:0;text-align:left}#loco-editor div.ta-mirror span:after{left:0}#loco-editor div.ta-mirror .eol:after{padding-left:.2em}#loco-editor [dir=RTL] div.ta-mirror{left:auto;right:0;text-align:right}#loco-editor [dir=RTL] div.ta-mirror span:after{right:0}#loco-editor [dir=RTL] div.ta-mirror .eol:after{padding-left:0;padding-right:.2em}#loco-editor .has-proxy>textarea{display:none !important}#loco-editor .has-proxy .ace_editor{height:100%;font-size:13px !important;line-height:1.4 !important}#loco-editor .has-proxy .ace_editor .ace_marker-layer .ace_bracket{display:none}#loco-editor .has-proxy .ace_print-margin{display:none}#loco-editor .ace_printf{color:#b90690;background-color:#edf1be}#loco-editor .ace_locked{color:gray}#loco-editor .ace_icu-quoted{color:gray}#loco-editor .ace_icu{color:#697eb9}#loco-editor .ace_icu.ace_name{color:#b90600}#loco-editor .resizer{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0 0 6px 0;background:#f0f0f0 url(../img/wg/splity.png?v=2.4.1) center bottom no-repeat;border:1px solid #ddd;overflow:hidden;cursor:move;cursor:row-resize;cursor:s-resize}#loco-editor .resizer>*{height:100%;border:none}#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.4.1);background-repeat:no-repeat;min-height:16px}#loco-editor ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.4.1) 0 0 no-repeat;min-height:75px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.4.1);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.4.1);background-size:16px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.4.1);background-size:16px}}#loco-editor ._green_glow_inner,#loco-editor .is-editable>.wg-content>textarea:focus,#loco-editor .is-editable>.wg-content.has-focus .ace_scroller,#loco-editor .is-editable>.wg-content.has-focus .wysihtml-editor,#loco-editor .is-editable>.wg-content.has-focus .mce-content-body{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}#loco-editor ._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}#loco-editor .loco-font,#loco-editor .is-table .wg-thead .wg-sortable>header:after{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco-editor .wg-cell,#loco-editor .wg-cell>div{clear:both;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;outline:none}#loco-editor .wg-cell{left:0;top:0;padding:0;margin:0;overflow:hidden}#loco-editor .wg-split{background:#eee}#loco-editor .wg-body:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}#loco-editor .wg-split-x>div>.not-first>*{margin-left:6px}#loco-editor .wg-split-y>div>.not-first>*{margin-top:6px}#loco-editor .wg-split>div>.has-title .wg-content{margin-top:0}#loco-editor .wg-split-x>div>.wg-cell{float:left;clear:none;height:100%}#loco-editor .wg-split-x>div{cursor:move;cursor:ew-resize;cursor:col-resize}#loco-editor .wg-split>div>.not-first:before{display:block;position:absolute;overflow:hidden;content:" "}#loco-editor .wg-split-x>div>.not-first:before{width:6px;height:100%;background:transparent url(../img/wg/splitx.png?v=2.4.1) center center no-repeat}#loco-editor .wg-split-y>div{cursor:move;cursor:ns-resize;cursor:row-resize}#loco-editor .wg-split-y>div>.not-first:before{height:6px;width:100%;background:transparent url(../img/wg/splity.png?v=2.4.1) center center no-repeat}#loco-editor .wg-split>div.locked{cursor:default}#loco-editor .wg-split-x>div.locked>.not-first>*{margin-left:0px}#loco-editor .wg-split-y>div.locked>.not-first>*{margin-top:0px}#loco-editor .wg-split>div.locked>.not-first:before{display:none}#loco-editor .has-title>header{background:#e2e2e2;cursor:default !important;margin:0;white-space:nowrap}#loco-editor .wg-content{background:#fff;cursor:default;padding:4px 6px;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#loco-editor .wg-toolbar{top:0;right:0;margin-top:6px;position:absolute}#loco-editor .wg-toolbar>span{color:#fff;background:#000;display:block;padding:0 6px;cursor:default !important}#loco-editor .wg-toolbar>span:active{color:#000;background-color:#fff}#loco-editor .wg-content,#loco-editor .wg-tbody>div{overflow:scroll;overflow-x:hidden;overflow-y:auto}#loco-editor .is-table{background-color:#fff}#loco-editor .is-table .wg-thead .has-title>header{font-weight:normal;background:transparent;padding:4px 0;margin:0 0 0 10px}#loco-editor .is-table .wg-thead>div>.not-first:before{background-position:center center}#loco-editor .is-table .wg-thead{background:#e2e2e2;border-bottom:solid 1px #ccc}#loco-editor .is-table .wg-tbody{background-image:url(data:image/gif;base64,R0lGODlhAQAsAIABAPz8/P///yH5BAEAAAEALAAAAAABACwAAAIIjI+pAe0PIygAOw==);position:relative}#loco-editor .is-table .wg-cols>div{float:left;clear:none}#loco-editor .is-table .wg-cols>div>div{white-space:nowrap;line-height:1.7em;padding-left:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis;-ms-text-overflow:ellipsis;background-color:#fff}#loco-editor .is-table .wg-cols>div>div:nth-child(even){background-color:#f7f7f7}#loco-editor .is-table .wg-cols>div>div.selected{background-color:#3db63d;color:#fff}#loco-editor .is-table .wg-cols>div>div.selected::selection{background-color:#fff;color:#000}#loco-editor .is-table .wg-cols>div:first-child>div{padding-left:4px}#loco-editor .is-table .wg-dead{clear:both}#loco-editor .is-table .wg-thead .wg-sortable>header{cursor:pointer !important}#loco-editor .is-table .wg-thead .wg-sortable>header:after{padding:0 0 0 5px;color:#999}#loco-editor .is-table .wg-thead .wg-sortable.wg-asc>header:after{content:"▲"}#loco-editor .is-table .wg-thead .wg-sortable.wg-desc>header:after{content:"▼"}#loco-editor .is-table .wg-thead .wg-sortable:hover>header:after{color:#000}#loco-editor .is-field>.wg-content{cursor:text;padding:0;line-height:normal;overflow:hidden;overflow-y:hidden}#loco-editor .is-field>.wg-content>div,#loco-editor .is-field>.wg-content>textarea{font-size:14px;line-height:1.4;border:1px solid #ddd;width:100%;height:100%;padding:8px 10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}#loco-editor .is-field>.wg-content textarea{resize:none;overflow:auto;display:block}#loco-editor .is-field>.wg-content>.ace_editor{padding:0;border-width:0}#loco-editor .is-field>.wg-content>div[contenteditable]{overflow:scroll;overflow-x:hidden;overflow-y:auto}#loco-editor .is-readonly>.wg-content{cursor:default}#loco-editor .is-readonly>.wg-content>div,#loco-editor .is-readonly>.wg-content>textarea,#loco-editor .is-readonly>.wg-content>textarea[readonly]{background:#f8f8f8;text-shadow:0 1px #fff;color:inherit}#loco-editor .is-readonly>.wg-content .ace_scroller{cursor:default;background:#f8f8f8}#loco-editor .is-readonly>.wg-content .ace_cursor-layer{display:none}#loco-editor .is-readonly>.wg-content>textarea[readonly]{cursor:default}#loco-editor .is-editable>.wg-content[dir=RTL] .ace_editor .ace_line{direction:ltr;unicode-bidi:bidi-override}#loco-editor .wg-split-x>nav.wg-tabs{white-space:nowrap;text-align:center;cursor:default}#loco-editor .wg-split-x>nav.wg-tabs>a{display:inline-block;padding:.5em 1em;margin-top:.2em;color:#000;text-decoration:none;-webkit-border-radius:.2em .2em 0 0;-moz-border-radius:.2em .2em 0 0;-ms-border-radius:.2em .2em 0 0;-o-border-radius:.2em .2em 0 0;border-radius:.2em .2em 0 0;background-color:#f3f7fd}#loco-editor .wg-split-x>nav.wg-tabs>a:hover{background-color:#fff}#loco-editor .wg-split-x>nav.wg-tabs>a.active{background-color:#3db63d;color:#fff}#loco-editor .wg-split>div>.has-nav>.wg-body{margin-top:0px}#loco-editor .wg-dead{visibility:hidden}@media all and (max-width: 768px){#loco-editor .wg-split-x>div>.not-first>*{margin-left:20px}#loco-editor .wg-split-y>div>.not-first>*{margin-top:20px}#loco-editor .wg-split-x>div>.not-first:before{width:20px}#loco-editor .wg-split-y>div>.not-first:before{height:20px}#loco-editor .is-table .wg-thead header{padding-left:20px}}#loco-editor .is-table .po-fuzzy{color:#b59829;font-weight:bold}#loco-editor .is-table .po-empty{color:#1f507a;font-weight:bold}#loco-editor .is-table .po-flagged{color:#bd2c00}#loco-editor .is-table .wg-cols>div:first-child>div:before{font-family:loco;vertical-align:inherit;display:inline-block;content:" ";width:1.3em;line-height:1}#loco-editor .is-table .wg-cols>div:first-child>div.po-fuzzy:before{content:""}#loco-editor .is-table .wg-cols>div:first-child>div.po-flagged:before{content:""}#loco-editor .is-table .wg-cols>div:first-child>div.po-comment:before{content:"";color:#999}#loco-editor .is-table .wg-cols>div:first-child>div.po-unsaved:before{content:"";color:#f1d040}#loco-editor .is-table .wg-cols>div:first-child>div.selected:before{color:#fff !important}#loco-editor .wg-cell>.meta{color:#333;margin:0 !important;padding:6px 10px;font-weight:normal;font-size:13px;line-height:1.4em;cursor:default !important}#loco-editor .wg-cell>.meta>*{display:inline-block;margin-top:3px;margin-bottom:3px}#loco-editor .wg-cell>.meta>span{border:1px solid transparent;border-left:none}#loco-editor .wg-cell>.meta>mark{color:#fff;border-radius:2px;background-color:silver;border:1px solid silver;padding:0 .3em}#loco-editor .wg-cell>.meta>mark.tag{color:#999;background-color:#eee}#loco-editor .wg-cell>.meta>p{display:block;white-space:pre-line}#loco-editor .wg-cell>.meta .icon-warn{color:#c00}#loco-editor .wg-cell>.meta .has-icon:before{padding-right:0;width:17px}#loco-editor .wg-cell>.meta code{font-size:12px}#loco-editor .is-table .wg-cols>div>div>mark{display:inline-block;vertical-align:text-bottom;font:inherit;font-weight:normal;color:#fff;border-radius:2px;font-size:90%;line-height:1;padding:.2em .3em;background-color:rgba(0,0,0,.25)}#loco-editor .is-table .wg-cols>div>div.selected.po-flagged{background-color:#bd2c00}#loco-editor .is-table .wg-cols>div>div.selected.po-fuzzy{background-color:#b59829}#loco-editor .is-table .wg-cols>div>div.selected.po-empty{background-color:#999}#loco-editor #po-target header nav{display:block;position:absolute;right:0px;top:0px;padding:2px}#loco-editor #po-target header nav button{margin-left:5px}#loco-editor #po-target header nav.po-empty .icon-cloud{display:none !important}#loco-editor #po-list .wg-content{padding:0}#loco-editor #po-source>.wg-body>.has-title>header{background:transparent;font-weight:normal;float:left;clear:none;min-width:3.4em}#loco-editor #po-source>.wg-body>.has-title>.wg-content{clear:none}#loco-editor .has-title>header{line-height:normal;padding:6px}#loco-editor .has-title>header .lang{margin-right:6px;margin-bottom:1px}#loco-editor .trg-rtl #po-list-tbody .wg-cols>div[for=po-list-col-target]>div,#loco-editor .src-rtl #po-list-tbody .wg-cols>div[for=po-list-col-source]>div{direction:rtl;padding-left:0;padding-right:10px;text-align:right}#loco-editor #po-source>.wg-body>.has-title>h2{min-width:4.5em}#loco-editor .is-table .wg-td{font-size:13px}#loco-editor header,#loco-editor nav{display:block;position:relative}#loco-editor-inner{min-height:600px;font-size:14px;clear:both}#loco-editor-inner>div.loco-loading{height:100px;background:transparent url(../img/spin-editor-button.gif?v=2.4.1) center 20px no-repeat}#loco-editor-inner h2{color:#000;line-height:1}#loco-editor-inner .wg-cell>.meta code{padding:0;color:#0073aa;background:inherit;cursor:pointer}#loco-editor-inner .wg-cell>.meta code:hover{text-decoration:underline}#loco-admin.wrap #loco-toolbar{font-size:14px;height:50px}#loco-admin.wrap #loco-toolbar form{display:block;float:left;clear:none;padding:0;margin:0}#loco-admin.wrap #loco-toolbar form.aux{float:right;margin-right:5px}#loco-admin.wrap #loco-toolbar fieldset{display:block;position:relative;float:left;clear:none}#loco-admin.wrap #loco-toolbar button,#loco-admin.wrap #loco-toolbar input[type=text]{display:block;position:relative;float:left;clear:none;margin:5px 0 0 5px;height:36px;text-align:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#loco-admin.wrap #loco-toolbar input[type=text]{padding:0 10px;font-size:14px;line-height:normal}#loco-admin.wrap #loco-toolbar .invalid input[type=text]:focus{border-color:#c00;-webkit-box-shadow:0 0 2px rgba(153,0,0,.5);-moz-box-shadow:0 0 2px rgba(153,0,0,.5);box-shadow:0 0 2px rgba(153,0,0,.5)}#loco-admin.wrap #loco-toolbar .loco-clearable{padding:0 20px}#loco-admin.wrap #loco-toolbar .loco-clearable.invalid a.clear:before{color:#c00}#loco-admin.wrap #loco-toolbar .loco-clearable a.clear{right:25px;line-height:2}#loco-admin.wrap #loco-toolbar .loco-clearable a.clear:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#loco-admin.wrap #loco-toolbar .loco-clearable a.clear:hover:before{color:#c00}#loco-admin.wrap #loco-toolbar .loco-clearable a.clear:active:before{color:#000}#loco-admin.wrap #loco-toolbar button.only-icon{width:40px}#loco-admin.wrap button.has-icon:before{width:16px;padding:0}#loco-admin.wrap button.has-icon.loco-loading:before{content:" ";height:16px;background:transparent url(../img/spin-editor-button.gif?v=2.4.1) 0 0 no-repeat}#loco-admin.wrap .button,#loco-admin.wrap .button-link,#loco-admin.wrap input[type=text]{border-color:#aaa;color:#444}#loco-admin.wrap .button-primary{color:#fff}#loco-admin.wrap button.icon-translate:before{font-size:16px}.loco-modal .loco-api{position:relative;padding:10px;background:#f7f7f7;border:solid 1px #eee;font-size:14px;margin-bottom:16px}.loco-modal .loco-api p{padding:0;margin:0;font-size:inherit}.loco-modal .loco-api blockquote{font-weight:bold;margin:0;padding:10px 0}.loco-modal .loco-api a.loco-api-credit{padding:0;display:block;position:absolute;right:10px;bottom:10px;text-decoration:none;white-space:nowrap;overflow:hidden;font-size:12px}.loco-modal .loco-api a.loco-api-credit:hover{text-decoration:underline}.loco-modal .loco-api-loading{text-indent:20px;background:transparent url(../img/spin-modal.gif?v=2.4.1) 10px center no-repeat}.loco-modal .loco-alert p{margin-bottom:2em;font-size:14px}.loco-modal .loco-alert nav{display:block;position:relative;margin:1em 0}.loco-modal .loco-alert nav a{display:inline-block;margin-right:1em;padding:10px}#loco-auto{display:none;min-width:50%;min-height:300px;position:relative}#loco-auto form blockquote{margin:0;padding:1em 0;font-size:14px}.loco-api a.loco-api-credit{color:inherit}.loco-api-yandex a.loco-api-credit:before{content:"Powered by "}.loco-api-google a.loco-api-credit{text-indent:200px;width:122px;height:16px;background:transparent url(../img/api/google.png?v=2.4.1) 0 0 no-repeat}.loco-api-microsoft a.loco-api-credit{text-indent:200px;width:152px;height:16px;background:transparent url(../img/api/microsoft.png?v=2.4.1) 0 0 no-repeat}.loco-api-deepl a.loco-api-credit{text-indent:200px;width:122px;height:16px;background:transparent url(../img/api/deepl.png?v=2.4.1) 0 0 no-repeat}
|
1 |
+
#loco-editor{border:solid 1px #ccc}#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.4.4);background-repeat:no-repeat;min-height:16px}#loco-editor ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.4.4) 0 0 no-repeat;min-height:75px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.4.4);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.4.4);background-size:16px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.4.4);background-size:16px}}#loco-editor ._green_glow_inner,#loco-editor .is-editable>.wg-content>textarea:focus,#loco-editor .is-editable>.wg-content.has-focus .ace_scroller,#loco-editor .is-editable>.wg-content.has-focus .wysihtml-editor,#loco-editor .is-editable>.wg-content.has-focus .mce-content-body{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}#loco-editor ._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}#loco-editor .loco-font,#loco-editor .is-table .wg-thead .wg-sortable>header:after{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco-editor div.ta-mirror{position:absolute;top:0;border:solid 1px transparent;color:transparent;padding:.4em .6em;pointer-events:none}#loco-editor div.ta-mirror span{position:relative}#loco-editor div.ta-mirror span:after{color:#ccc;white-space:pre;display:inline-block;position:absolute;top:0;line-height:normal}#loco-editor div.ta-mirror .crlf:after{content:"¬"}#loco-editor div.ta-mirror .eof:after{content:"¶"}#loco-editor div.ta-mirror .x20:after{content:"·";color:#aaa}#loco-editor div.ta-mirror .x9:after{content:"⟶"}#loco-editor div.ta-mirror,#loco-editor .has-mirror textarea{white-space:pre-wrap;word-wrap:break-word;word-spacing:0px}#loco-editor .has-mirror ::placeholder{color:transparent}#loco-editor .has-mirror ::-webkit-input-placeholder{color:transparent}#loco-editor .has-mirror :-moz-placeholder{color:transparent;opacity:1}#loco-editor .has-mirror ::-moz-placeholder{color:transparent;opacity:1}#loco-editor .has-mirror :-ms-input-placeholder{color:transparent}#loco-editor .has-mirror .ielt10 .placeheld{color:transparent}#loco-editor div.ta-mirror{left:0;text-align:left}#loco-editor div.ta-mirror span:after{left:0}#loco-editor div.ta-mirror .eol:after{padding-left:.2em}#loco-editor [dir=RTL] div.ta-mirror{left:auto;right:0;text-align:right}#loco-editor [dir=RTL] div.ta-mirror span:after{right:0}#loco-editor [dir=RTL] div.ta-mirror .eol:after{padding-left:0;padding-right:.2em}#loco-editor .has-proxy>textarea{display:none !important}#loco-editor .has-proxy .ace_editor{height:100%;font-size:13px !important;line-height:1.4 !important}#loco-editor .has-proxy .ace_editor .ace_marker-layer .ace_bracket{display:none}#loco-editor .has-proxy .ace_print-margin{display:none}#loco-editor .ace_printf{color:#b90690;background-color:#edf1be}#loco-editor .ace_locked{color:gray}#loco-editor .ace_icu-quoted{color:gray}#loco-editor .ace_icu{color:#697eb9}#loco-editor .ace_icu.ace_name{color:#b90600}#loco-editor .resizer{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0 0 6px 0;background:#f0f0f0 url(../img/wg/splity.png?v=2.4.4) center bottom no-repeat;border:1px solid #ddd;overflow:hidden;cursor:move;cursor:row-resize;cursor:s-resize}#loco-editor .resizer>*{height:100%;border:none}#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.4.4);background-repeat:no-repeat;min-height:16px}#loco-editor ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.4.4) 0 0 no-repeat;min-height:75px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.4.4);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.4.4);background-size:16px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.4.4);background-size:16px}}#loco-editor ._green_glow_inner,#loco-editor .is-editable>.wg-content>textarea:focus,#loco-editor .is-editable>.wg-content.has-focus .ace_scroller,#loco-editor .is-editable>.wg-content.has-focus .wysihtml-editor,#loco-editor .is-editable>.wg-content.has-focus .mce-content-body{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}#loco-editor ._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}#loco-editor .loco-font,#loco-editor .is-table .wg-thead .wg-sortable>header:after{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco-editor .wg-cell,#loco-editor .wg-cell>div{clear:both;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;outline:none}#loco-editor .wg-cell{left:0;top:0;padding:0;margin:0;overflow:hidden}#loco-editor .wg-split{background:#eee}#loco-editor .wg-body:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}#loco-editor .wg-split-x>div>.not-first>*{margin-left:6px}#loco-editor .wg-split-y>div>.not-first>*{margin-top:6px}#loco-editor .wg-split>div>.has-title .wg-content{margin-top:0}#loco-editor .wg-split-x>div>.wg-cell{float:left;clear:none;height:100%}#loco-editor .wg-split-x>div{cursor:move;cursor:ew-resize;cursor:col-resize}#loco-editor .wg-split>div>.not-first:before{display:block;position:absolute;overflow:hidden;content:" "}#loco-editor .wg-split-x>div>.not-first:before{width:6px;height:100%;background:transparent url(../img/wg/splitx.png?v=2.4.4) center center no-repeat}#loco-editor .wg-split-y>div{cursor:move;cursor:ns-resize;cursor:row-resize}#loco-editor .wg-split-y>div>.not-first:before{height:6px;width:100%;background:transparent url(../img/wg/splity.png?v=2.4.4) center center no-repeat}#loco-editor .wg-split>div.locked{cursor:default}#loco-editor .wg-split-x>div.locked>.not-first>*{margin-left:0px}#loco-editor .wg-split-y>div.locked>.not-first>*{margin-top:0px}#loco-editor .wg-split>div.locked>.not-first:before{display:none}#loco-editor .has-title>header{background:#e2e2e2;cursor:default !important;margin:0;white-space:nowrap}#loco-editor .wg-content{background:#fff;cursor:default;padding:4px 6px;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#loco-editor .wg-toolbar{top:0;right:0;margin-top:6px;position:absolute}#loco-editor .wg-toolbar>span{color:#fff;background:#000;display:block;padding:0 6px;cursor:default !important}#loco-editor .wg-toolbar>span:active{color:#000;background-color:#fff}#loco-editor .wg-content,#loco-editor .wg-tbody>div{overflow:scroll;overflow-x:hidden;overflow-y:auto}#loco-editor .is-table{background-color:#fff}#loco-editor .is-table .wg-thead .has-title>header{font-weight:normal;background:transparent;padding:4px 0;margin:0 0 0 10px}#loco-editor .is-table .wg-thead>div>.not-first:before{background-position:center center}#loco-editor .is-table .wg-thead{background:#e2e2e2;border-bottom:solid 1px #ccc}#loco-editor .is-table .wg-tbody{background-image:url(data:image/gif;base64,R0lGODlhAQAsAIABAPz8/P///yH5BAEAAAEALAAAAAABACwAAAIIjI+pAe0PIygAOw==);position:relative}#loco-editor .is-table .wg-cols>div{float:left;clear:none}#loco-editor .is-table .wg-cols>div>div{white-space:nowrap;line-height:1.7em;padding-left:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis;-ms-text-overflow:ellipsis;background-color:#fff}#loco-editor .is-table .wg-cols>div>div:nth-child(even){background-color:#f7f7f7}#loco-editor .is-table .wg-cols>div>div.selected{background-color:#3db63d;color:#fff}#loco-editor .is-table .wg-cols>div>div.selected::selection{background-color:#fff;color:#000}#loco-editor .is-table .wg-cols>div:first-child>div{padding-left:4px}#loco-editor .is-table .wg-dead{clear:both}#loco-editor .is-table .wg-thead .wg-sortable>header{cursor:pointer !important}#loco-editor .is-table .wg-thead .wg-sortable>header:after{padding:0 0 0 5px;color:#999}#loco-editor .is-table .wg-thead .wg-sortable.wg-asc>header:after{content:"▲"}#loco-editor .is-table .wg-thead .wg-sortable.wg-desc>header:after{content:"▼"}#loco-editor .is-table .wg-thead .wg-sortable:hover>header:after{color:#000}#loco-editor .is-field>.wg-content{cursor:text;padding:0;line-height:normal;overflow:hidden;overflow-y:hidden}#loco-editor .is-field>.wg-content>div,#loco-editor .is-field>.wg-content>textarea{font-size:14px;line-height:1.4;border:1px solid #ddd;width:100%;height:100%;padding:8px 10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}#loco-editor .is-field>.wg-content textarea{resize:none;overflow:auto;display:block}#loco-editor .is-field>.wg-content>.ace_editor{padding:0;border-width:0}#loco-editor .is-field>.wg-content>div[contenteditable]{overflow:scroll;overflow-x:hidden;overflow-y:auto}#loco-editor .is-readonly>.wg-content{cursor:default}#loco-editor .is-readonly>.wg-content>div,#loco-editor .is-readonly>.wg-content>textarea,#loco-editor .is-readonly>.wg-content>textarea[readonly]{background:#f8f8f8;text-shadow:0 1px #fff;color:inherit}#loco-editor .is-readonly>.wg-content .ace_scroller{cursor:default;background:#f8f8f8}#loco-editor .is-readonly>.wg-content .ace_cursor-layer{display:none}#loco-editor .is-readonly>.wg-content>textarea[readonly]{cursor:default}#loco-editor .is-editable>.wg-content[dir=RTL] .ace_editor .ace_line{direction:ltr;unicode-bidi:bidi-override}#loco-editor .wg-split-x>nav.wg-tabs{white-space:nowrap;text-align:center;cursor:default}#loco-editor .wg-split-x>nav.wg-tabs>a{display:inline-block;padding:.5em 1em;margin-top:.2em;color:#000;text-decoration:none;-webkit-border-radius:.2em .2em 0 0;-moz-border-radius:.2em .2em 0 0;-ms-border-radius:.2em .2em 0 0;-o-border-radius:.2em .2em 0 0;border-radius:.2em .2em 0 0;background-color:#f3f7fd}#loco-editor .wg-split-x>nav.wg-tabs>a:hover{background-color:#fff}#loco-editor .wg-split-x>nav.wg-tabs>a.active{background-color:#3db63d;color:#fff}#loco-editor .wg-split>div>.has-nav>.wg-body{margin-top:0px}#loco-editor .wg-dead{visibility:hidden}@media all and (max-width: 768px){#loco-editor .wg-split-x>div>.not-first>*{margin-left:20px}#loco-editor .wg-split-y>div>.not-first>*{margin-top:20px}#loco-editor .wg-split-x>div>.not-first:before{width:20px}#loco-editor .wg-split-y>div>.not-first:before{height:20px}#loco-editor .is-table .wg-thead header{padding-left:20px}}#loco-editor .is-table .po-fuzzy{color:#b59829;font-weight:bold}#loco-editor .is-table .po-empty{color:#1f507a;font-weight:bold}#loco-editor .is-table .po-flagged{color:#bd2c00}#loco-editor .is-table .wg-cols>div:first-child>div:before{font-family:loco;vertical-align:inherit;display:inline-block;content:" ";width:1.3em;line-height:1}#loco-editor .is-table .wg-cols>div:first-child>div.po-fuzzy:before{content:""}#loco-editor .is-table .wg-cols>div:first-child>div.po-flagged:before{content:""}#loco-editor .is-table .wg-cols>div:first-child>div.po-comment:before{content:"";color:#999}#loco-editor .is-table .wg-cols>div:first-child>div.po-unsaved:before{content:"";color:#f1d040}#loco-editor .is-table .wg-cols>div:first-child>div.selected:before{color:#fff !important}#loco-editor .wg-cell>.meta{color:#333;margin:0 !important;padding:6px 10px;font-weight:normal;font-size:13px;line-height:1.4em;cursor:default !important}#loco-editor .wg-cell>.meta>*{display:inline-block;margin-top:3px;margin-bottom:3px}#loco-editor .wg-cell>.meta>span{border:1px solid transparent;border-left:none}#loco-editor .wg-cell>.meta>mark{color:#fff;border-radius:2px;background-color:silver;border:1px solid silver;padding:0 .3em}#loco-editor .wg-cell>.meta>mark.tag{color:#999;background-color:#eee}#loco-editor .wg-cell>.meta>p{display:block;white-space:pre-line}#loco-editor .wg-cell>.meta .icon-warn{color:#c00}#loco-editor .wg-cell>.meta .has-icon:before{padding-right:0;width:17px}#loco-editor .wg-cell>.meta code{font-size:12px}#loco-editor .is-table .wg-cols>div>div>mark{display:inline-block;vertical-align:text-bottom;font:inherit;font-weight:normal;color:#fff;border-radius:2px;font-size:90%;line-height:1;padding:.2em .3em;background-color:rgba(0,0,0,.25)}#loco-editor .is-table .wg-cols>div>div.selected.po-flagged{background-color:#bd2c00}#loco-editor .is-table .wg-cols>div>div.selected.po-fuzzy{background-color:#b59829}#loco-editor .is-table .wg-cols>div>div.selected.po-empty{background-color:#999}#loco-editor #po-target header nav{display:block;position:absolute;right:0px;top:0px;padding:2px}#loco-editor #po-target header nav button{margin-left:5px}#loco-editor #po-target header nav.po-empty .icon-cloud{display:none !important}#loco-editor #po-list .wg-content{padding:0}#loco-editor #po-source>.wg-body>.has-title>header{background:transparent;font-weight:normal;float:left;clear:none;min-width:3.4em}#loco-editor #po-source>.wg-body>.has-title>.wg-content{clear:none}#loco-editor .has-title>header{line-height:normal;padding:6px}#loco-editor .has-title>header .lang{margin-right:6px;margin-bottom:1px}#loco-editor .trg-rtl #po-list-tbody .wg-cols>div[for=po-list-col-target]>div,#loco-editor .src-rtl #po-list-tbody .wg-cols>div[for=po-list-col-source]>div{direction:rtl;padding-left:0;padding-right:10px;text-align:right}#loco-editor #po-source>.wg-body>.has-title>h2{min-width:4.5em}#loco-editor .is-table .wg-td{font-size:13px}#loco-editor header,#loco-editor nav{display:block;position:relative}#loco-editor-inner{min-height:600px;font-size:14px;clear:both}#loco-editor-inner>div.loco-loading{height:100px;background:transparent url(../img/spin-editor-button.gif?v=2.4.4) center 20px no-repeat}#loco-editor-inner h2{color:#000;line-height:1}#loco-editor-inner .wg-cell>.meta code{padding:0;color:#0073aa;background:inherit;cursor:pointer}#loco-editor-inner .wg-cell>.meta code:hover{text-decoration:underline}#loco-admin.wrap #loco-editor>nav{font-size:14px;height:50px}#loco-admin.wrap #loco-editor>nav form{display:block;float:left;clear:none;padding:0;margin:0}#loco-admin.wrap #loco-editor>nav form.aux{float:right;margin-right:5px}#loco-admin.wrap #loco-editor>nav fieldset{display:block;position:relative;float:left;clear:none}#loco-admin.wrap #loco-editor>nav button,#loco-admin.wrap #loco-editor>nav input[type=text]{display:block;position:relative;float:left;clear:none;margin:5px 0 0 5px;height:36px;text-align:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#loco-admin.wrap #loco-editor>nav input[type=text]{padding:0 10px;font-size:14px;line-height:normal}#loco-admin.wrap #loco-editor>nav .invalid input[type=text]:focus{border-color:#c00;-webkit-box-shadow:0 0 2px rgba(153,0,0,.5);-moz-box-shadow:0 0 2px rgba(153,0,0,.5);box-shadow:0 0 2px rgba(153,0,0,.5)}#loco-admin.wrap #loco-editor>nav .loco-clearable{padding:0 20px}#loco-admin.wrap #loco-editor>nav .loco-clearable.invalid a.clear:before{color:#c00}#loco-admin.wrap #loco-editor>nav .loco-clearable a.clear{right:25px;line-height:2}#loco-admin.wrap #loco-editor>nav .loco-clearable a.clear:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#loco-admin.wrap #loco-editor>nav .loco-clearable a.clear:hover:before{color:#c00}#loco-admin.wrap #loco-editor>nav .loco-clearable a.clear:active:before{color:#000}#loco-admin.wrap #loco-editor>nav button.only-icon{width:40px}#loco-admin.wrap button.has-icon:before{width:16px;padding:0}#loco-admin.wrap button.has-icon.loco-loading:before{content:" ";height:16px;background:transparent url(../img/spin-editor-button.gif?v=2.4.4) 0 0 no-repeat}#loco-admin.wrap .button,#loco-admin.wrap .button-link,#loco-admin.wrap input[type=text]{border-color:#aaa;color:#444}#loco-admin.wrap .button:hover,#loco-admin.wrap .button-link:hover{color:#000}#loco-admin.wrap .button-primary,#loco-admin.wrap .button-primary:hover{color:#fff}#loco-admin.wrap button.icon-translate:before{font-size:16px}.loco-modal .loco-api{position:relative;padding:10px;background:#f7f7f7;border:solid 1px #eee;font-size:14px;margin-bottom:16px}.loco-modal .loco-api p{padding:0;margin:0;font-size:inherit}.loco-modal .loco-api blockquote{font-weight:bold;margin:0;padding:10px 0}.loco-modal .loco-api a.loco-api-credit{padding:0;display:block;position:absolute;right:10px;bottom:10px;text-decoration:none;white-space:nowrap;overflow:hidden;font-size:12px}.loco-modal .loco-api a.loco-api-credit:hover{text-decoration:underline}.loco-modal .loco-api-loading{text-indent:20px;background:transparent url(../img/spin-modal.gif?v=2.4.4) 10px center no-repeat}.loco-modal .loco-alert p{margin-bottom:2em;font-size:14px}.loco-modal .loco-alert nav{display:block;position:relative;margin:1em 0}.loco-modal .loco-alert nav a{display:inline-block;margin-right:1em;padding:10px}#loco-auto{display:none;min-width:50%;min-height:300px;position:relative}#loco-auto form blockquote{margin:0;padding:1em 0;font-size:14px}.loco-api a.loco-api-credit{color:inherit}.loco-api-yandex a.loco-api-credit:before{content:"Powered by "}.loco-api-google a.loco-api-credit{text-indent:200px;width:122px;height:16px;background:transparent url(../img/api/google.png?v=2.4.4) 0 0 no-repeat}.loco-api-microsoft a.loco-api-credit{text-indent:200px;width:152px;height:16px;background:transparent url(../img/api/microsoft.png?v=2.4.4) 0 0 no-repeat}.loco-api-deepl a.loco-api-credit{text-indent:200px;width:122px;height:16px;background:transparent url(../img/api/deepl.png?v=2.4.4) 0 0 no-repeat}
|
pub/css/fileinfo.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#loco-admin.wrap .notice-info dl{margin-top:0;display:inline-block}#loco-admin.wrap .notice-info dl dt,#loco-admin.wrap .notice-info dl dd{line-height:1.4em}#loco-admin.wrap .notice-info dl dt{font-weight:bold;color:#555}#loco-admin.wrap .notice-info dl dd{margin-left:0;margin-bottom:.8em}#loco-admin.wrap .notice-info dl div.progress .l{display:none}
|
1 |
+
#loco-admin.wrap .notice-info nav{display:block;position:absolute;right:0;top:0;font-size:1.3em;padding:1em}#loco-admin.wrap .notice-info nav a{color:#666}#loco-admin.wrap .notice-info nav a:hover{color:#000;text-decoration:none}#loco-admin.wrap .notice-info dl{margin-top:0;display:inline-block}#loco-admin.wrap .notice-info dl dt,#loco-admin.wrap .notice-info dl dd{line-height:1.4em}#loco-admin.wrap .notice-info dl dt{font-weight:bold;color:#555}#loco-admin.wrap .notice-info dl dd{margin-left:0;margin-bottom:.8em}#loco-admin.wrap .notice-info dl div.progress .l{display:none}
|
pub/css/podiff.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#loco-admin.wrap .revisions-diff{padding:10px;min-height:20px}#loco-admin.wrap table.diff{border-collapse:collapse}#loco-admin.wrap table.diff td{white-space:nowrap;overflow:hidden;font:normal 12px/17px "Monaco","Menlo","Ubuntu Mono","Consolas","source-code-pro",monospace;padding:2px}#loco-admin.wrap table.diff td>span{color:#aaa}#loco-admin.wrap table.diff td>span:after{content:". "}#loco-admin.wrap table.diff tbody{border-top:1px dashed #ccc}#loco-admin.wrap table.diff tbody:first-child{border-top:none}#loco-admin.wrap .revisions.loading .diff-meta{color:#eee}#loco-admin.wrap .revisions.loading .loading-indicator span.spinner{visibility:visible;background:#fff url(../img/spin-modal.gif?v=2.4.
|
1 |
+
#loco-admin.wrap .revisions-diff{padding:10px;min-height:20px}#loco-admin.wrap table.diff{border-collapse:collapse}#loco-admin.wrap table.diff td{white-space:nowrap;overflow:hidden;font:normal 12px/17px "Monaco","Menlo","Ubuntu Mono","Consolas","source-code-pro",monospace;padding:2px}#loco-admin.wrap table.diff td>span{color:#aaa}#loco-admin.wrap table.diff td>span:after{content:". "}#loco-admin.wrap table.diff tbody{border-top:1px dashed #ccc}#loco-admin.wrap table.diff tbody:first-child{border-top:none}#loco-admin.wrap .revisions.loading .diff-meta{color:#eee}#loco-admin.wrap .revisions.loading .loading-indicator span.spinner{visibility:visible;background:#fff url(../img/spin-modal.gif?v=2.4.4) center center no-repeat}#loco-admin.wrap .revisions-meta{clear:both;padding:10px 12px;margin:0;position:relative;top:10px}#loco-admin.wrap .revisions-meta .diff-meta{clear:none;float:left;width:50%;padding:0;min-height:auto}#loco-admin.wrap .revisions-meta .diff-meta button{margin-top:5px}#loco-admin.wrap .revisions-meta .diff-meta-current{float:right;text-align:right}#loco-admin.wrap .revisions-meta time{color:#72777c}#loco-admin.wrap .revisions-control-frame{margin:10px 0}#loco-admin.wrap .revisions-diff-frame{margin-top:20px}
|
pub/css/poview.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.js #loco-admin.wrap .loco-loading{min-height:100px;background:#fff url(../img/spin-modal.gif?v=2.4.
|
1 |
+
.js #loco-admin.wrap .loco-loading{min-height:100px;background:#fff url(../img/spin-modal.gif?v=2.4.4) center center no-repeat}.js #loco-admin.wrap .loco-loading ol.msgcat{display:none}#loco-admin.wrap #loco-po{padding-right:0;overflow:auto}#loco-admin.wrap ol.msgcat{margin-left:3em;padding-top:1em;border-top:1px dashed #ccc}#loco-admin.wrap ol.msgcat:first-child{padding-top:0;border-top:none}#loco-admin.wrap ol.msgcat li{color:#aaa;margin:0;padding:0 0 0 1em;font:normal 12px/17px "Monaco","Menlo","Ubuntu Mono","Consolas","source-code-pro",monospace;border-left:1px solid #eee}#loco-admin.wrap ol.msgcat li>*{color:#333;white-space:pre}#loco-admin.wrap ol.msgcat li>.po-comment{color:#3cc200}#loco-admin.wrap ol.msgcat li>.po-refs{color:#0073aa}#loco-admin.wrap ol.msgcat li>.po-refs a{color:inherit;text-decoration:none}#loco-admin.wrap ol.msgcat li>.po-refs a:hover{text-decoration:underline}#loco-admin.wrap ol.msgcat li>.po-flags{color:#77904a}#loco-admin.wrap ol.msgcat li>.po-flags em{font-style:normal}#loco-admin.wrap ol.msgcat li>.po-word{color:#000}#loco-admin.wrap ol.msgcat li>.po-junk{font-style:italic;color:#ccc}#loco-admin.wrap ol.msgcat li>.po-string>span{color:#c931c7}#loco-admin.wrap form.loco-filter{top:0;right:0;position:absolute}#loco-admin.wrap .loco-invalid form.loco-filter input[type=text]:focus{border-color:#c00;-webkit-box-shadow:0 0 2px rgba(153,0,0,.5);-moz-box-shadow:0 0 2px rgba(153,0,0,.5);box-shadow:0 0 2px rgba(153,0,0,.5)}#loco-admin.wrap .loco-invalid ol.msgcat{list-style-type:none}#loco-admin.wrap .loco-invalid ol.msgcat li{color:#000}
|
pub/css/skins/blue.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(9,100,132,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#096484;foo:#096484}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1cdc7 !important;background:#db9925 !important;border-color:#db9925 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/blue/spin-primary-button.gif?v=2.4.
|
1 |
+
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(9,100,132,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#096484;foo:#096484}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1cdc7 !important;background:#db9925 !important;border-color:#db9925 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/blue/spin-primary-button.gif?v=2.4.4) 0 0 no-repeat !important}
|
pub/css/skins/coffee.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(199,165,137,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#c7a589;foo:#c7a589}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1ccc7 !important;background:#ba906d !important;border-color:#ba906d !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/coffee/spin-primary-button.gif?v=2.4.
|
1 |
+
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(199,165,137,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#c7a589;foo:#c7a589}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1ccc7 !important;background:#ba906d !important;border-color:#ba906d !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/coffee/spin-primary-button.gif?v=2.4.4) 0 0 no-repeat !important}
|
pub/css/skins/ectoplasm.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(163,183,69,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#a3b745;foo:#a3b745}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#cfd1c7 !important;background:#89993a !important;border-color:#89993a !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/ectoplasm/spin-primary-button.gif?v=2.4.
|
1 |
+
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(163,183,69,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#a3b745;foo:#a3b745}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#cfd1c7 !important;background:#89993a !important;border-color:#89993a !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/ectoplasm/spin-primary-button.gif?v=2.4.4) 0 0 no-repeat !important}
|
pub/css/skins/light.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(136,136,136,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#888;foo:#04a4cc}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7cfd1 !important;background:#0384a4 !important;border-color:#0384a4 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/light/spin-primary-button.gif?v=2.4.
|
1 |
+
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(136,136,136,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#888;foo:#04a4cc}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7cfd1 !important;background:#0384a4 !important;border-color:#0384a4 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/light/spin-primary-button.gif?v=2.4.4) 0 0 no-repeat !important}
|
pub/css/skins/midnight.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(225,77,67,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#e14d43;foo:#e14d43}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1c8c7 !important;background:#d92e23 !important;border-color:#d92e23 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/midnight/spin-primary-button.gif?v=2.4.
|
1 |
+
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(225,77,67,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#e14d43;foo:#e14d43}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1c8c7 !important;background:#d92e23 !important;border-color:#d92e23 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/midnight/spin-primary-button.gif?v=2.4.4) 0 0 no-repeat !important}
|
pub/css/skins/modern.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(56,88,233,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#3858e9;foo:#3858e9}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7c9d1 !important;background:#193ddf !important;border-color:#193ddf !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/modern/spin-primary-button.gif?v=2.4.
|
1 |
+
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(56,88,233,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#3858e9;foo:#3858e9}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7c9d1 !important;background:#193ddf !important;border-color:#193ddf !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/modern/spin-primary-button.gif?v=2.4.4) 0 0 no-repeat !important}
|
pub/css/skins/ocean.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(158,186,160,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#9ebaa0;foo:#9ebaa0}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7d1c8 !important;background:#86a989 !important;border-color:#86a989 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/ocean/spin-primary-button.gif?v=2.4.
|
1 |
+
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(158,186,160,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#9ebaa0;foo:#9ebaa0}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7d1c8 !important;background:#86a989 !important;border-color:#86a989 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/ocean/spin-primary-button.gif?v=2.4.4) 0 0 no-repeat !important}
|
pub/css/skins/sunrise.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(221,130,59,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#dd823b;foo:#dd823b}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1cbc7 !important;background:#cc6d23 !important;border-color:#cc6d23 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/sunrise/spin-primary-button.gif?v=2.4.
|
1 |
+
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(221,130,59,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#dd823b;foo:#dd823b}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1cbc7 !important;background:#cc6d23 !important;border-color:#cc6d23 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/sunrise/spin-primary-button.gif?v=2.4.4) 0 0 no-repeat !important}
|
pub/js/min/admin.js
CHANGED
@@ -1,199 +1,199 @@
|
|
1 |
-
(function(
|
2 |
-
l,c){return(a=b[a])&&a[c]?a[c]:l||""}d=
|
3 |
-
g.init=function(){return g};return g}({},
|
4 |
-
if(99<c)c=Math.min(c,99.9),
|
5 |
-
for(d=0<=d?d:Math.max(b-Math.abs(d),0);d<b;d++)if(d in c&&c[d]===
|
6 |
-
l){if("%"===l)return"%";c=b[d++];return String(c)||""})};return g}({},
|
7 |
-
clearTimeout(z);z=null}var z;
|
8 |
-
r.off("click").click(c);k(
|
9 |
-
a+' loco-notice inline"></div>').prependTo(k("#loco-notices"));var
|
10 |
-
|
11 |
-
g.error).call(g,a.message)};g.convert=c;g.init=function(a){
|
12 |
-
"")):t._("Server returned invalid data")}function c(a,b,l){a[b]=l}function
|
13 |
-
error:c,message:
|
14 |
-
var
|
15 |
-
a.removeClass("disabled loading")}var
|
16 |
-
|
17 |
-
lydi:1,ar:1,ary:1,ckb:1,dv:1,fa:1,he:1,nqo:1,ps:1,ur:1,yi:1});
|
18 |
-
b.toUpperCase();if(b=RegExp.$3)a.variant=b.toLowerCase();return a};
|
19 |
-
|
20 |
-
"\
|
21 |
-
"\
|
22 |
-
"\
|
23 |
-
"\
|
24 |
-
"\
|
25 |
-
"\
|
26 |
-
"\
|
27 |
-
"\
|
28 |
-
"\
|
29 |
-
"\
|
30 |
-
"\
|
31 |
-
|
32 |
-
(p=g.length)){z=0;b:for(;z<
|
33 |
-
[]},remove:function(a){l[a]=null}}};return g}({},
|
34 |
-
"";l();return!1});b(g.value);k(g).on("input blur focus",function(){l();return!0}).after(r);c();return{delay:function(a){
|
35 |
-
g.init=function(b,a){var l={fade:!0,offset:5,delayIn:d,delayOut:c,anchor:b.attr("data-anchor"),gravity:b.attr("data-gravity")||"s"};a&&(l=k.extend({},l,a));b.tipsy(l)};g.delays=function(b,a){d=b||150;c=a||100};g.kill=
|
36 |
-
"html":"text"](b);a[0].className="tipsy";a.remove().css({top:0,left:0}).prependTo(
|
37 |
-
|
38 |
-
this.options.className);a.addClass("in")}},hide:function(){this.tip().remove()},fixTitle:function(){var b=this.$element,a=b.attr("title")||"";(a||"string"!==typeof b.attr("original-title"))&&
|
39 |
-
this.$element;a.attr("default-title")||a.attr("default-title",this.getTitle());null==b&&(b=a.attr("default-title")||this.getTitle());a.attr("original-title",b);if(this.$tip)this.$tip.find(".tipsy-inner")[this.options.html?
|
40 |
-
this.options=this.$element=null)},enable:function(){this.enabled=!0},disable:function(){this.hide();this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled}};k.fn.tipsy=function(b){function a(a){var c=
|
41 |
-
"out";0==l?c.hide():(c.tip().removeClass("in"),setTimeout(function(){"out"==c.hoverState&&c.hide()},l))}b=k.extend({},k.fn.tipsy.defaults,b);b.live||this.each(function(){a(this)});if("manual"!=b.trigger){var
|
42 |
-
k.fn.tipsy.elementOptions=function(b,a){return k.metadata?k.extend({},a,k(b).metadata()):a};k.fn.tipsy.autoNS=function(){return k(this).offset().top>k(
|
43 |
-
|
44 |
-
b){return'<a href="'+a+'" target="'+(b.indexOf(
|
45 |
-
(c=/[-_+]/,d=/^([a-z]{2,3})(?:-([a-z]{4}))?(?:-([a-z]{2}|[0-9]{3}))?(?:-([0-9][a-z0-9]{3,8}|[a-z0-9]{5,8}))?(?:-([a-z]-[-a-z]+))?$/i);a=String(a).split(c).join("-");if(!d.exec(a))return null;var b=new
|
46 |
-
this.lang;return!(!a||"zxx"===a)};
|
47 |
-
e=null;return g}({},
|
48 |
-
l.length;0!==
|
49 |
-
timerId=
|
50 |
-
|
51 |
-
|
52 |
-
c
|
53 |
-
|
54 |
-
"
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
a.on("change",function(a,c){return b.val(c.getValue())});a.on("focus",function(){return b.focus()});a.on("blur",function(){return b.blur()})}function d(a){a.off("change");a.off("focus");a.off("blur")}
|
59 |
-
function a(a){return function(){var b={start:[{token:"empty_line",regex:/^$/},{token:"constant.language",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},{token:"constant.language",
|
60 |
-
regex:/'([{}][^']*)?'/},{token:"printf",regex:"{[^!-/:-@\\[-^{-~\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a9\u00ab\u00ac\u00ae\u00b0\u00b1\u00b6\u00bb\u00bf\u00d7\u00f7\\u2010-\\u2027\\u2030-\\u203E\\u2041-\\u2053\\u2055-\\u205E\\u2190-\\u245F\\u2500-\\u2775\\u2794-\\u2BFF\\u2E00-\\u2E7F\\u3001-\\u3003\\u3008-\\u3020\\u3030\\uFD3E\\uFD3F\\uFE45\\uFE46]+(,[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]*(?:number|date|time|spellout|ordinal|duration)[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]*(,[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]*[^{}]+)?)?}"},
|
61 |
{token:"icu",regex:/{/,next:"icuName"},{token:"icu",regex:/}/,next:"icuType"}]),icuName:[{token:"icu",regex:"[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]+"},{token:"icu.name",regex:"[^\\s\\u0085\\u200E\\u200F\\u2028\\u2029!-/:-@\\[-^{-~\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a9\u00ab\u00ac\u00ae\u00b0\u00b1\u00b6\u00bb\u00bf\u00d7\u00f7\\u2010-\\u2027\\u2030-\\u203E\\u2041-\\u2053\\u2055-\\u205E\\u2190-\\u245F\\u2500-\\u2775\\u2794-\\u2BFF\\u2E00-\\u2E7F\\u3001-\\u3003\\u3008-\\u3020\\u3030\\uFD3E\\uFD3F\\uFE45\\uFE46]+",
|
62 |
next:"icuType"},{defaultToken:"icu",next:"icuType"}],icuType:[{token:"icu",regex:/[{}]/,next:"start"},{defaultToken:"icu"}]}:c&&b.start.push({token:"printf",regex:c});this.$rules=b}}function l(a){switch(a){case "objc":return/%(?:\d+\$)?[-+'0# ]*\d*(?:\.\d+|\.\*(?:\d+\$)?)?(?:hh?|ll?|[qjzTL])?[sScCdDioOuUxXfFeEgGaAp%@]/;case "java":return/%(?:\d+\$)?[-+,(0# ]*\d*(?:\.\d+)?(?:[bBhHsScCdoxXeEfgGaA%n]|[tT][HIklMSLNpzZsQBbhAaCYyjmdeRTrDFc])/;case "php":return/%(?:\d+\$)?(?:'.|[-+0 ])*\d*(?:\.\d+)?[suxXbcdeEfFgGo%]/;
|
63 |
-
case "python":return/%(?:\([a-z]+\))?[-+0# ]*(?:\d+|\*)?(?:\.\d+|\.\*)?(?:[hlL])?[sdiouxXeEfFgGcra%]/;case "javascript":return/%(?:[1-9]\d*\$)?\+?(?:0|'[^$])?-?\d*(?:\.\d+)?[b-gijostTuvxX%]/;case "auto":return/%(?:\d+\$|\([a-z]+\))?(?:[-+0]?\d*(\.\d+)?[duxoefgaDUXOEFGA]|[@scSC%])/;case
|
64 |
-
function(
|
65 |
-
|
66 |
-
|
67 |
-
"</p>"===a.substr(-4);return a.replace(/(<\/?)script/ig,"$1loco:script")}function
|
68 |
-
|
69 |
block_formats:"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h4;Heading 4=h4;Heading 5=h5;Heading 6=h6;",forced_root_block:"p",relative_urls:!1,convert_urls:!1,remove_script_host:!1,document_base_url:"",allow_script_urls:!1,formats:{alignleft:{classes:"alignleft"},alignright:{selector:"p,h1,h2,h3,h4,span,strong,em,a",classes:"alignright"},aligncenter:{selector:"p,h1,h2,h3,h4,span,strong,em,a",classes:"aligncenter"},strikethrough:{inline:"del"}},fix_list_elements:!0,extended_valid_elements:"span,b,i,u,loco:script",
|
70 |
-
entities:"38,amp,60,lt,62,gt,160,nbsp",entity_encoding:"named",keep_styles:!1,init_instance_callback:
|
71 |
-
focus:function(){
|
72 |
-
|
73 |
-
b.readOnly?a.disable():a.enable();return a};TextAreaPrototype=d.prototype;TextAreaPrototype.destroy=function(){this.unlisten();var b=this.p;b&&(b.kill(),this.p=null);this.e=null};TextAreaPrototype.reload=function(b,a){var c=this.l;c&&!a&&(this.disable(),c=null);this.val(b||"");a&&!c&&this.enable();return this};TextAreaPrototype.val=function(b){var a=this.e;if(null==b)return a.value;var c=this.l,
|
74 |
TextAreaPrototype.fire=function(){this.l&&this.l.fire();return this};TextAreaPrototype.ping=function(){this.l&&this.l.ping();return this};TextAreaPrototype.focus=function(){var b=this.p;b?b.focus():k(this.e).focus()};TextAreaPrototype.focused=function(){return c&&c===this.el};TextAreaPrototype.parent=function(){return this.e.parentNode};TextAreaPrototype.attr=function(b,a){var c=this.e;if(1===arguments.length)return c.getAttribute(b);null==a?c.removeAttribute(b):c.setAttribute(b,a);return this};TextAreaPrototype.editable=
|
75 |
-
function(){return!!this.l};TextAreaPrototype.enable=function(){var b=this.p;this.e.removeAttribute("readonly");this.listen();b&&b.enable&&b.enable(this.l);return this};TextAreaPrototype.disable=function(){var b=this.p;this.e.setAttribute("readonly",!0);this.unlisten();b&&b.disable&&b.disable();return this};TextAreaPrototype.listen=function(){var b=this.l;b&&b.kill();this.l=
|
76 |
-
function(b,a){var c=this.i||!1;if(a||c!==b)this._i&&(this._i.kill(),delete this._i),(c=this.p)?c.invs&&c.invs(b):b&&(this._i=
|
77 |
-
!0),c&&this.focus());return this};TextAreaPrototype.setStrf=function(b){this["%"]=b;"code"===this.m&&this.p.strf(b);return this};TextAreaPrototype.name=function(b){this.e.setAttribute("name",b);return this};TextAreaPrototype.placeholder=function(b){this.e.setAttribute("placeholder",b);return this};TextAreaPrototype.redraw=function(){var b=this.p;b&&b.resize&&b.resize()};TextAreaPrototype=null;return g}({},
|
78 |
-
function d(a){var b=
|
79 |
-
b.ctrlKey||b.metaKey||b.altKey)return!0;a.selectNext(c);b.stopPropagation();b.preventDefault();return!1}}function
|
80 |
-
a||0;this.length=b.length}function
|
81 |
-
|
82 |
-
[],b=a.length;0!==b--;)a[b].destroy();this.pages=[];this.sy=this.mx=this.mn=this.vh=null;void 0;return this};r.render=function(){for(var a,b,c=[],
|
83 |
-
this.redrawDirty();this.redraw();null==
|
84 |
-
b.scrollTop,b=b.clientHeight;this.sy!==c&&(a=!0,this.sy=c);this.vh!==b&&(a=!0,this.vh=b);return a};r.redraw=function(){for(var a=0,b=-1,c=null,
|
85 |
-
|
86 |
-
(
|
87 |
-
this.w.cells[1];
|
88 |
-
function(a){this._idxs||(this._idxs=this.idxs);this.idxs=this._sort(a);return this.clear().render()};r.each=function(a){for(var b,c=-1,
|
89 |
-
function(a,b){b?(this.s=b,b(a)):(b=this.s)&&b(a);return a};r.sort=function(a,b){this._sort(this.idxs,
|
90 |
-
return this};r.activate=function(a,b){var c,
|
91 |
-
this.rendered=!0;return this};r.update=function(a,b){var c=b||this.c[a]||{},
|
92 |
-
r.insert=function(a){var b=this.h,c=d("wg-dead");c.style.height=String(b)+"px";a.appendChild(c);return this.dead=c};r.top=function(){return(this.rendered?this.live:this.dead).offsetTop};r.height=function(){var a=this.h;null==a&&(this.h=a=this.rendered?this.live.firstChild.offsetHeight:this.dead.offsetHight);a||
|
93 |
-
d;c++)z[c].style.width=a[c];h.parentNode.replaceChild(
|
94 |
-
r.destroy=function(){var a=this.rendered?this.live:this.dead,b=this.rows,c=b.length;for(a.parentNode.removeChild(a);0!==c--;)b[c].destroy()};r=null;return g}({},
|
95 |
-
|
96 |
-
k(c).on("editFocus",function(){
|
97 |
-
return b};
|
98 |
-
return this};
|
99 |
-
this.rtl);d.pos=
|
100 |
-
(
|
101 |
-
function(a){for(var b=-1,c=0,
|
102 |
-
this.field.editable()?a.push("is-editable"):a.push("is-readonly"));a=a.join(" ");a!==this._css&&(this._css=a,this.el.className=a);return this};
|
103 |
-
(
|
104 |
-
b);
|
105 |
-
b,
|
106 |
-
this.body;if(a.nodeType){var c=b.firstChild;
|
107 |
-
a||"",b;this.header(a);return this.t};
|
108 |
-
|
109 |
-
|
110 |
-
b.push("po-empty"),a.comment()&&b.push("po-comment"));return b.join(" ")}function d(a,b,c){b=k(a.title(b).parentNode);var
|
111 |
-
"number.js");var a="poUpdate",l="changing",
|
112 |
-
|
113 |
-
a._x("Suggest translation","Editor");this.labels=b;this.t=a;return this};
|
114 |
-
return!0}).on("wgRowDeselect",function(a,c,
|
115 |
-
return this};
|
116 |
-
this.getContextEditable()};
|
117 |
-
this.po.length;c?
|
118 |
-
this.po;if(this.dirty||a)b.each(function(a,b){b.save()}),this.listCell.find("div.po-unsaved").removeClass("po-unsaved"),this.dirty=0,this.fire("poSave");return b};
|
119 |
-
|
120 |
-
b&&
|
121 |
-
this.updateListCell(a,"source");this.updateListCell(a,"target");return this};
|
122 |
-
|
123 |
-
c(this,
|
124 |
-
function(b){function c(a,b){var
|
125 |
-
c(
|
126 |
-
a.eachTextarea(function(a){a.ping()});a.off();var e
|
127 |
-
|
128 |
-
(
|
129 |
-
|
130 |
-
B.focus());E!==
|
131 |
-
a.textarea("",!1);if(a=this.sourceCell)a.textarea("",!1).setStrf(d).setMode(c).setInvs(
|
132 |
-
|
133 |
-
[b,d,c,
|
134 |
-
this.rebuildSearch(),this.active&&this.active.equals(b)&&this.unloadActive(),this.po.length&&(c&&this.filter(c),this.active||(
|
135 |
-
|
136 |
-
this.sourceLocale={lang:"en",label:"English",plurals:["One","Other"]}}function d(a){a=k('<button type="button" class="button button-small icon icon-'+a+' hastip"></button>');
|
137 |
-
"base.js");g.init=function(a){var b=new
|
138 |
-
b=[a._x("Source text","Editor")];this.targetLocale&&(b[1]=a._x("Translation","Editor"));return b};
|
139 |
-
function(){var a=this.po,b=a.length,c=0,d=0,
|
140 |
-
a&&(this.targetLocale=a,delete this._unlocked,this.po&&this.po.lock(a),this.editable={source:!1,context:!1,target:!0},this.targetCell=this.contextCell,delete this.contextCell,this.reload(),this.fire("poLock",[!0,a]),this.active&&this.loadMessage(this.active))};
|
141 |
-
[];a.translated()?a.fuzzy()&&
|
142 |
-
40:!0,73:!0},c={66:function(b,a){var c=a.current();c&&(c.normalize(),a.focus().pasteMessage(c))},75:function(b,a){var c=a.current();c&&(c.untranslate(),a.focus().pasteMessage(c))},85:function(b,a){a.focus().fuzzy(!a.fuzzy())},13:function(b,a){a.getFirstEditable()&&a.next(1,!0,!0)},40:function(b,a){var c=b.shiftKey;a.next(1,c,c)},38:function(b,a){var c=b.shiftKey;a.next(-1,c,c)},73:function(b,a){if(!b.shiftKey)return!1;a.setInvs(!a.getInvs())}};g.init=function(b,a){function
|
143 |
-
!a.metaKey&&!a.ctrlKey)return!0;var
|
144 |
-
g.init=function(){return new
|
145 |
-
this.length++);this[b]=c;return b};
|
146 |
-
b){return d(a[0],b[0])});for(c=0;c<b;c++)a=g[c],this[c]=a[0],a=a[1],
|
147 |
-
a,
|
148 |
-
return k.join('"\n"')+'"'},prefix:function(a,b){var c=a.split(
|
149 |
-
|
150 |
-
|
151 |
-
b?b:-1!==
|
152 |
-
"%s")}function b(a){return a.replace(/[^\sa-z0-9]+/ig," ")}function a(a){return a.trim().replace(/\s+/g," ")}function e
|
153 |
-
if(
|
154 |
-
b.get(a),
|
155 |
-
|
156 |
-
d--;)if(a[d]===c)return!0;return!1};
|
157 |
-
|
158 |
-
b.length;for(c=0;c<a;c++)if(!b[c])return!1;return!0};
|
159 |
-
this.ctx).join(" ")};
|
160 |
-
c--;)if(b[c])return!1;return!0};
|
161 |
-
"","Last-Translator":"","Language-Team":"",Language:"","Plural-Forms":"","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit"}}function d(a,b){var c=a||"";b&&(c+="\x00"+b);return c}function c(a){var b=
|
162 |
-
k=
|
163 |
-
k.headers=function(a){var b,c=this.now(),d=this.head||(this.head=
|
164 |
-
a["X-Generator"]="Loco https://localise.biz/";return a};k.get=function(a,b){var c=d(a,b);return this.rows.get(c)};k.add=function(a,b){a instanceof l||(a=new l(a));b&&a.context(b);var
|
165 |
-
|
166 |
-
|
167 |
-
k,
|
168 |
-
g),"#| "));if(g=this._src)g[0]&&
|
169 |
d)return 1;if(c<d)return-1;if(b){c=this.hash().toLowerCase();d=a.hash().toLowerCase();if(c<d)return 1;if(c>d)return-1}return 0};k.merge=function(a){var b=!1;this.rf=a.rf;this.fmt=a.fmt;this.cmt=a.cmt;this.xcmt=a.xcmt;a.src.join("\x00")!==this.src.join("\x00")&&(this._src=this.src,this.src=a.src.concat(),this.msg=(this.msg||["",""]).slice(0,this.src.length),b=!0);a.ctx!==this.ctx&&(this._ctx=this.ctx,this.ctx=a.ctx,b=!0);b&&this.translated()&&this.fuzzy(0,!0)};k.copy=function(){var a=new l,b,c;for(b in this)this.hasOwnProperty(b)&&
|
170 |
-
((c=this[b])&&c.concat&&(c=c.concat()),a[b]=c);return a};k=k=null;return g}({},
|
171 |
-
|
172 |
-
g);
|
173 |
-
|
174 |
-
n[a]||[],
|
175 |
-
|
176 |
-
d.getUrl=function(){return"https://translate.yandex.com/"};d.parseError=function(c){return c&&c.code&&200!==c.code&&c.message?"Error "+c.code+": "+c.message:""};d.batch=function(c,b,a,d){function f(a){for(var
|
177 |
-
b,c){a&&200===a.code?f(a.text||[]):(
|
178 |
-
[],d=a.length,f=-1;++f<d;)b.push(a[f].message||"");return"Error "+c.error.code+": "+b.join(";")}return""};d.batch=function(c,b,a,d){function f(a){for(var
|
179 |
-
f(a.data.translations||[]):(
|
180 |
-
d.getId=function(){return"microsoft"};d.getUrl=function(){return"https://aka.ms/MicrosoftTranslatorAttribution"};d.parseError=function(c){return c&&c.error?c.error.message:""};d.batch=function(c,b,a,d){function f(a){for(var
|
181 |
-
r+"&textType="+a,method:"POST",data:JSON.stringify(
|
182 |
-
function(){return"DeepL Translator"};d.getId=function(){return"deepl"};d.getUrl=function(){return"https://www.deepl.com/translator"};d.parseError=function(c){return c.message};d.batch=function(c,b,a,d){function f(a){for(var
|
183 |
-
auth_key:
|
184 |
-
a,function(a){
|
185 |
-
""};c.key=function(){return this.param("key")};c.getId=function(){return this.param("id")||"none"};c.getUrl=function(){return this.param("url")||"#"};c.toString=function(){return this.param("name")||this.getId()};c.stderr=function(a){var b=(
|
186 |
-
"_"),d=a.lang,e=b[c]||b[d]||[],
|
187 |
-
b.httpError(a))};return b.abortable(k.ajax(a))};c.abortable=function(a){var b=this;a.always(function(){b.$r===a&&(b.$r=null)});return b.$r=a};c.abort=function(){var a=this.$r;a&&a.abort()};c.isHtml=function(a){return(b||(b=d())).sniff(a)};c.createJob=function(){return
|
188 |
-
b?
|
189 |
-
k("#ssh-keys").toggleClass("hidden","ssh"!==k(this).val())}));return
|
190 |
-
|
191 |
-
function
|
192 |
-
a();k(
|
193 |
-
z&&F&&r({path:z,auth:F});a();return{applyCreds:function(a){if(a.nodeType)l(a);else{var b,c=
|
194 |
-
b);return c}}function c(a){return function(b,c){var d=b&&b[a]||0,
|
195 |
-
B=
|
196 |
-
b){var c,
|
197 |
-
|
198 |
-
|
199 |
-
g[0]||"")&&RegExp.lastMatch)?(
|
1 |
+
(function(v,u,k,J){var n=function(){function g(f){throw Error("Failed to require "+f);}var f={};return{register:function(g,m){f[g]=m},require:function(k,m){return f[k]||g(m)},include:function(k,m,d){return f[k]||(d?g(m):null)}}}();n.register("$1",function(g,f,k){function m(d){var c=typeof d;if("string"===c)if(/[^ <>!=()%^&|?:n0-9]/.test(d))console.error("Invalid plural: "+d);else return new Function("n","return "+d);"function"!==c&&(d=function(b){return 1!=b});return d}g.init=function(d){function c(a,
|
2 |
+
l,c){return(a=b[a])&&a[c]?a[c]:l||""}d=m(d);var b={};return{_:function(a){return c(a,a,0)},_x:function(a,b){return c(b+"\u0004"+a,a,0)},_n:function(a,b,h){h=Number(d(h));isNaN(h)&&(h=0);return c(a,h?b:a,h)},load:function(a){b=a||{};return this},pluraleq:function(a){d=m(a);return this}}};return g}({},v,u));n.register("$2",function(g,f,k){g.ie=function(){var m=!1,d=0;f.attachEvent&&f.navigator&&/MSIE (\d+)\./.exec(String(navigator.appVersion))&&(d=Number(RegExp.$1),m=11>d);return function(){return m}}();
|
3 |
+
g.init=function(){return g};return g}({},v,u));n.register("$3",function(g,f,k){Number.prototype.format=function(f){f=Math.pow(10,f||0);var d=Math.round(f*this)/f;f=[];var d=String(d),c=d.split("."),d=c[0],c=c[1],b=d.length;do f.unshift(d.substring(b-3,b));while(0<(b-=3));d=f.join(",");if(f=c){f=c;for(var a,c=f.length;"0"===f.charAt(--c);)a=c;a&&(f=f.substring(0,a));f=c=f}f&&(d+="."+c);return d};Number.prototype.percent=function(f){var d=0,c=this&&f?100*(this/f):0;if(0===c)return"0";if(100===c)return"100";
|
4 |
+
if(99<c)c=Math.min(c,99.9),f=c.format(++d);else if(0.5>c){c=Math.max(c,1E-4);do f=c.format(++d);while("0"===f&&4>d);f=f.substr(1)}else f=c.format(0);return f};return g}({},v,u));n.register("$4",function(g,f,k){Array.prototype.indexOf||(Array.prototype.indexOf=function(f){if(null==this)throw new TypeError;var d,c=Object(this),b=c.length>>>0;if(0===b)return-1;d=0;1<arguments.length&&(d=Number(arguments[1]),d!=d?d=0:0!=d&&Infinity!=d&&-Infinity!=d&&(d=(0<d||-1)*Math.floor(Math.abs(d))));if(d>=b)return-1;
|
5 |
+
for(d=0<=d?d:Math.max(b-Math.abs(d),0);d<b;d++)if(d in c&&c[d]===f)return d;return-1});return g}({},v,u));n.register("$5",function(g,f,n){f.JSON||(f.JSON={parse:k.parseJSON,stringify:null});return g=f.JSON}({},v,u));n.register("$6",function(g,f,k){g.trim=function(f,d){for(d||(d=" \n");f&&-1!==d.indexOf(f.substr(0,1));)f=f.substr(1);for(;f&&-1!==d.indexOf(f.substr(-1));)f=f.substr(0,f.length-1);return f};g.sprintf=function(f){var d=0,c,b=[].slice.call(arguments,1);return f.replace(/%([sud%])/g,function(a,
|
6 |
+
l){if("%"===l)return"%";c=b[d++];return String(c)||""})};return g}({},v,u));n.register("$21",function(g,f,k){function m(d){return function(c,b){for(var a=c[d]||0;(c=c.offsetParent)&&c!==(b||k.body);)a+=c[d]||0;return a}}g.top=m("offsetTop");g.left=m("offsetLeft");g.el=function(d,c){var b=k.createElement(d||"div");c&&(b.className=c);return b};g.txt=function(d){return k.createTextNode(d||"")};return g}({},v,u));n.register("$7",function(g,f,B){function m(a,b,s){function c(){l();z=setTimeout(b,s)}function l(){z&&
|
7 |
+
clearTimeout(z);z=null}var z;c();k(a).mouseenter(l).mouseleave(c);return{die:function(){l();k(a).off("mouseenter mouseleave")}}}function d(a,b){a.fadeTo(b,0,function(){a.slideUp(b,function(){a.remove();k(f).triggerHandler("resize")})});return a}function c(a,b){function c(b){p[z]=null;d(k(a),250);l&&l.die();var s;if(s=b)b.stopPropagation(),b.preventDefault(),s=!1;return s}function s(b){l&&l.die();return l=m(a,c,b)}var l,z,h,e=k(a),r=e.find("button");0===r.length&&(e.addClass("is-dismissible"),r=k('<button type="button" class="notice-dismiss"> </a>').appendTo(e));
|
8 |
+
r.off("click").click(c);k(f).triggerHandler("resize");x();z=p.length;p.push(c);b&&(l=s(b));return{link:function(b,z){var s=z||b,l=k(a).find("nav"),s=k("<nav></nav>").append(k("<a></a>").attr("href",b).text(s));h?(h.push(s.html()),l.html(h.join("<span> | </span>"))):(h=[s.html()],k(a).addClass("has-nav").append(s));return this},stick:function(){l&&l.die();l=null;p[z]=null;return this},slow:function(a){s(a||1E4);return this}}}function b(a,b,s){var l=n.require("$21","dom.js").el;a=k('<div class="notice notice-'+
|
9 |
+
a+' loco-notice inline"></div>').prependTo(k("#loco-notices"));var c=k(l("p"));s=k(l("span")).text(s);b=k(l("strong","has-icon")).text(b+": ");c.append(b).append(s).appendTo(a);return a}function a(a,s,l,h){a=b(l,s,a).css("opacity","0").fadeTo(500,1);k(f).triggerHandler("resize");return c(a,h)}function l(b){return a(b,r,"warning")}function h(){k("#loco-notices").find("div.notice").each(function(a,b){if(-1===b.className.indexOf("jshide")){var s=-1===b.className.indexOf("notice-success")?null:5E3;c(b,
|
10 |
+
s)}})}var p=[],e=f.console||{log:function(){}},x=Date.now||function(){return(new Date).getTime()},y,r,s,D;g.error=function(b){return a(b,y,"error")};g.warn=l;g.info=function(b){return a(b,s,"info")};g.success=function(b){return a(b,D,"success",5E3)};g.warning=l;g.log=function(){e.log.apply(e,arguments)};g.debug=function(a,b){(e.error||e.log)("Loco: "+a);b&&e.log(b)};g.clear=function(){for(var a=-1,b,s=p,l=s.length;++a<l;)(b=s[a])&&b.call&&b();p=[];return g};g.create=b;g.raise=function(a){(g[a.type]||
|
11 |
+
g.error).call(g,a.message)};g.convert=c;g.init=function(a){y=a._("Error");r=a._("Warning");s=a._("Notice");D=a._("OK");setTimeout(h,1E3);return g};return g}({},v,u));n.register("$8",function(g,f,B){function m(a){var b=k("<pre>"+a+"</pre>").text();b&&(b=b.replace(/[\r\n]+/g,"\n").replace(/(^|\n)\s+/g,"$1").replace(/\s+$/,""));b||(b=a)||(b="Blank response from server");return b}function d(a){return(a=a.split(/[\r\n]/)[0])?(a=a.replace(/ +in +\S+ on line \d+/,""),a=a.replace(/^[()! ]+Fatal error:\s*/,
|
12 |
+
"")):t._("Server returned invalid data")}function c(a){f.console&&console.error&&console.error('No nonce for "'+a+'"');return""}function b(a,b,l){a[b]=l}function a(a,b,l){a.push({name:b,value:l})}function l(a,b,l){a.append(b,l)}function h(a,b,l,c){function h(b,c,z){if("abort"!==c){var s=e||{_:function(a){return a}},A=b.status,f=b.responseText,w=m(f),y=b.getResponseHeader("Content-Type")||"text/html",g=b.getResponseHeader("Content-Length")||f.length;"success"===c&&z?p.error(z):(p.error(d(w)+".\n"+
|
13 |
+
s._("Check console output for debugging information")),p.debug("Ajax failure for "+a,{status:A,error:c,message:z,output:f}),"parsererror"===c&&(z="Response not JSON"),p.log([s._("Provide the following text when reporting a problem")+":","----","Status "+A+' "'+(z||s._("Unknown error"))+'" ('+y+" "+g+" bytes)",w,"===="].join("\n")));l&&l.call&&l(b,c,z);x=b}}c.url=y;c.dataType="json";var p=n.require("$7","notices.js").clear();x=null;return k.ajax(c).fail(h).done(function(a,l,c){var e=a&&a.data,x=a&&
|
14 |
+
a.notices,d=x&&x.length;for(!e||a.error?h(c,l,a&&a.error&&a.error.message):b&&b(e,l,c);d--;)p.raise(x[d])})}var p={},e,x,y=f.ajaxurl||"/wp-admin/admin-ajax.php";g.init=function(a){p=a.nonces||p;return g};g.localise=function(a){e=a;return g};g.xhr=function(){return x};g.strip=m;g.parse=d;g.submit=function(a,b,l){function c(a,b){b.disabled?b.setAttribute("data-was-disabled","true"):b.disabled=!0}function e(a,b){b.getAttribute("data-was-disabled")||(b.disabled=!1)}function p(a){a.find(".button-primary").removeClass("loading");
|
15 |
+
a.find("button").each(e);a.find("input").each(e);a.find("select").each(e);a.find("textarea").each(e);a.removeClass("disabled loading")}var x=k(a),d=x.serialize();(function(a){a.find(".button-primary").addClass("loading");a.find("button").each(c);a.find("input").each(c);a.find("select").each(c);a.find("textarea").each(c);a.addClass("disabled loading")})(x);return h(a.route.value,function(a,l,c){p(x);b&&b(a,l,c)},function(a,b,c){p(x);l&&l(a,b,c)},{type:a.method,data:d})};g.post=function(e,s,x,d){var A=
|
16 |
+
!0,G=s||{},y=p[e]||c(e);f.FormData&&G instanceof FormData?(A=!1,s=l):s=Array.isArray(G)?a:b;s(G,"action","loco_json");s(G,"route",e);s(G,"loco-nonce",y);return h(e,x,d,{type:"post",data:G,processData:A,contentType:A?"application/x-www-form-urlencoded; charset=UTF-8":!1})};g.get=function(a,b,l,e){b=b||{};var x=p[a]||c(a);b.action="loco_json";b.route=a;b["loco-nonce"]=x;return h(a,l,e,{type:"get",data:b})};g.setNonce=function(a,b){p[a]=b;return g};return g}({},v,u));n.register("$22",{arab:1,aran:1,
|
17 |
+
hebr:1,nkoo:1,syrc:1,syrn:1,syrj:1,syre:1,samr:1,mand:1,mend:1,thaa:1,adlm:1,cprt:1,phnx:1,armi:1,prti:1,phli:1,phlp:1,phlv:1,avst:1,mani:1,khar:1,orkh:1,ital:1,lydi:1,ar:1,ary:1,ckb:1,dv:1,fa:1,he:1,nqo:1,ps:1,ur:1,yi:1});n.register("$9",function(g,f,k){function m(){}var d,c=n.require("$22","rtl.json");g.init=function(){return new m};g.cast=function(b){return b instanceof m?b:"string"===typeof b?g.parse(b):g.clone(b)};g.clone=function(b){var a,l=new m;for(a in b)l[a]=b[a];return l};g.parse=function(b){if(!(d||
|
18 |
+
(d=/^([a-z]{2,3})(?:[-_]([a-z]{2}))?(?:[-_]([a-z0-9]{3,8}))?$/i)).exec(b))return null;var a=new m;a.lang=RegExp.$1.toLowerCase();if(b=RegExp.$2)a.region=b.toUpperCase();if(b=RegExp.$3)a.variant=b.toLowerCase();return a};f=m.prototype;f.isValid=function(){return!!this.lang};f.isKnown=function(){var b=this.lang;return!(!b||"zxx"===b)};f.toString=function(b){b=b||"_";var a,l=this.lang||"zxx";if(a=this.region)l+=b+a;if(a=this.variant)l+=b+a;return l};f.getIcon=function(){for(var b=3,a,l,c=["variant",
|
19 |
+
"region","lang"],p=[];0!==b--;)if(a=c[b],l=this[a])p.push(a),p.push(a+"-"+l.toLowerCase());return p.join(" ")};f.isRTL=function(){return!!c[String(this.lang).toLowerCase()]};f=null;return g}({},v,u));n.register("$23",{"\u00e1":"a","\u00e0":"a","\u0103":"a","\u1eaf":"a","\u1eb1":"a","\u1eb5":"a","\u1eb3":"a","\u00e2":"a","\u1ea5":"a","\u1ea7":"a","\u1eab":"a","\u1ea9":"a","\u01ce":"a","\u00e5":"a","\u01fb":"a","\u00e4":"a","\u01df":"a","\u00e3":"a","\u0227":"a","\u01e1":"a","\u0105":"a","\u0101":"a",
|
20 |
+
"\u1ea3":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1eb7":"a","\u1ead":"a","\u1e01":"a","\u01fd":"\u00e6","\u01e3":"\u00e6","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0107":"c","\u0109":"c","\u010d":"c","\u010b":"c","\u00e7":"c","\u1e09":"c","\u010f":"d","\u1e0b":"d","\u1e11":"d","\u0111":"d","\u1e0d":"d","\u1e13":"d","\u1e0f":"d","\u00f0":"d","\ua77a":"d","\u01c6":"\u01f3","\u00e9":"e","\u00e8":"e","\u0115":"e","\u00ea":"e","\u1ebf":"e","\u1ec1":"e","\u1ec5":"e","\u1ec3":"e","\u011b":"e","\u00eb":"e",
|
21 |
+
"\u1ebd":"e","\u0117":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u0113":"e","\u1e17":"e","\u1e15":"e","\u1ebb":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u1e19":"e","\u1e1b":"e","\u1e1f":"f","\ua77c":"f","\u01f5":"g","\u011f":"g","\u011d":"g","\u01e7":"g","\u0121":"g","\u0123":"g","\u1e21":"g","\ua7a1":"g","\u1d79":"g","\u0125":"h","\u021f":"h","\u1e27":"h","\u1e23":"h","\u1e29":"h","\u0127":"h","\u210f":"h","\u1e25":"h","\u1e2b":"h","\u1e96":"h","\u00ed":"i","\u00ec":"i","\u012d":"i",
|
22 |
+
"\u00ee":"i","\u01d0":"i","\u00ef":"i","\u1e2f":"i","\u0129":"i","\u012f":"i","\u012b":"i","\u1ec9":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u1e2d":"i","\u0135":"j","\u01f0":"j","\u1e31":"k","\u01e9":"k","\u0137":"k","\ua7a3":"k","\u1e33":"k","\u1e35":"k","\u013a":"l","\u013e":"l","\u013c":"l","\u0142":"l","\u1e37":"l","\u1e39":"l","\u1e3d":"l","\u1e3b":"l","\u0140":"l","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0144":"n","\u01f9":"n","\u0148":"n","\u00f1":"n","\u1e45":"n","\u0146":"n","\ua7a5":"n",
|
23 |
+
"\u1e47":"n","\u1e4b":"n","\u1e49":"n","\u00f3":"o","\u00f2":"o","\u014f":"o","\u00f4":"o","\u1ed1":"o","\u1ed3":"o","\u1ed7":"o","\u1ed5":"o","\u01d2":"o","\u00f6":"o","\u022b":"o","\u0151":"o","\u00f5":"o","\u1e4d":"o","\u1e4f":"o","\u022d":"o","\u022f":"o","\u0231":"o","\u00f8":"o","\u01ff":"o","\u01eb":"o","\u01ed":"o","\u014d":"o","\u1e53":"o","\u1e51":"o","\u1ecf":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edb":"o","\u1edd":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o",
|
24 |
+
"\u1e55":"p","\u1e57":"p","\u0155":"r","\u0159":"r","\u1e59":"r","\u0157":"r","\ua7a7":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u1e5f":"r","\ua783":"r","\u015b":"s","\u1e65":"s","\u015d":"s","\u0161":"s","\u1e67":"s","\u1e61":"s","\u015f":"s","\ua7a9":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u017f":"s","\ua785":"s","\u1e9b":"s","\u0165":"t","\u1e97":"t","\u1e6b":"t","\u0163":"t","\u1e6d":"t","\u021b":"t","\u1e71":"t","\u1e6f":"t","\ua787":"t","\u00fa":"u","\u00f9":"u","\u016d":"u",
|
25 |
+
"\u00fb":"u","\u01d4":"u","\u016f":"u","\u00fc":"u","\u01d8":"u","\u01dc":"u","\u01da":"u","\u01d6":"u","\u0171":"u","\u0169":"u","\u1e79":"u","\u0173":"u","\u016b":"u","\u1e7b":"u","\u1ee7":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1ee9":"u","\u1eeb":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u1e77":"u","\u1e75":"u","\u1e7d":"v","\u1e7f":"v","\u1e83":"w","\u1e81":"w","\u0175":"w","\u1e98":"w","\u1e85":"w","\u1e87":"w","\u1e89":"w","\u1e8d":"x","\u1e8b":"x","\u00fd":"y",
|
26 |
+
"\u1ef3":"y","\u0177":"y","\u1e99":"y","\u00ff":"y","\u1ef9":"y","\u1e8f":"y","\u0233":"y","\u1ef7":"y","\u1ef5":"y","\u017a":"z","\u1e91":"z","\u017e":"z","\u017c":"z","\u1e93":"z","\u1e95":"z","\u01ef":"\u0292","\u1f00":"\u03b1","\u1f04":"\u03b1","\u1f84":"\u03b1","\u1f02":"\u03b1","\u1f82":"\u03b1","\u1f06":"\u03b1","\u1f86":"\u03b1","\u1f80":"\u03b1","\u1f01":"\u03b1","\u1f05":"\u03b1","\u1f85":"\u03b1","\u1f03":"\u03b1","\u1f83":"\u03b1","\u1f07":"\u03b1","\u1f87":"\u03b1","\u1f81":"\u03b1",
|
27 |
+
"\u03ac":"\u03b1","\u1f71":"\u03b1","\u1fb4":"\u03b1","\u1f70":"\u03b1","\u1fb2":"\u03b1","\u1fb0":"\u03b1","\u1fb6":"\u03b1","\u1fb7":"\u03b1","\u1fb1":"\u03b1","\u1fb3":"\u03b1","\u1f10":"\u03b5","\u1f14":"\u03b5","\u1f12":"\u03b5","\u1f11":"\u03b5","\u1f15":"\u03b5","\u1f13":"\u03b5","\u03ad":"\u03b5","\u1f73":"\u03b5","\u1f72":"\u03b5","\u1f20":"\u03b7","\u1f24":"\u03b7","\u1f94":"\u03b7","\u1f22":"\u03b7","\u1f92":"\u03b7","\u1f26":"\u03b7","\u1f96":"\u03b7","\u1f90":"\u03b7","\u1f21":"\u03b7",
|
28 |
+
"\u1f25":"\u03b7","\u1f95":"\u03b7","\u1f23":"\u03b7","\u1f93":"\u03b7","\u1f27":"\u03b7","\u1f97":"\u03b7","\u1f91":"\u03b7","\u03ae":"\u03b7","\u1f75":"\u03b7","\u1fc4":"\u03b7","\u1f74":"\u03b7","\u1fc2":"\u03b7","\u1fc6":"\u03b7","\u1fc7":"\u03b7","\u1fc3":"\u03b7","\u1f30":"\u03b9","\u1f34":"\u03b9","\u1f32":"\u03b9","\u1f36":"\u03b9","\u1f31":"\u03b9","\u1f35":"\u03b9","\u1f33":"\u03b9","\u1f37":"\u03b9","\u03af":"\u03b9","\u1f77":"\u03b9","\u1f76":"\u03b9","\u1fd0":"\u03b9","\u1fd6":"\u03b9",
|
29 |
+
"\u03ca":"\u03b9","\u0390":"\u03b9","\u1fd3":"\u03b9","\u1fd2":"\u03b9","\u1fd7":"\u03b9","\u1fd1":"\u03b9","\u1f40":"\u03bf","\u1f44":"\u03bf","\u1f42":"\u03bf","\u1f41":"\u03bf","\u1f45":"\u03bf","\u1f43":"\u03bf","\u03cc":"\u03bf","\u1f79":"\u03bf","\u1f78":"\u03bf","\u1fe4":"\u03c1","\u1fe5":"\u03c1","\u1f50":"\u03c5","\u1f54":"\u03c5","\u1f52":"\u03c5","\u1f56":"\u03c5","\u1f51":"\u03c5","\u1f55":"\u03c5","\u1f53":"\u03c5","\u1f57":"\u03c5","\u03cd":"\u03c5","\u1f7b":"\u03c5","\u1f7a":"\u03c5",
|
30 |
+
"\u1fe0":"\u03c5","\u1fe6":"\u03c5","\u03cb":"\u03c5","\u03b0":"\u03c5","\u1fe3":"\u03c5","\u1fe2":"\u03c5","\u1fe7":"\u03c5","\u1fe1":"\u03c5","\u1f60":"\u03c9","\u1f64":"\u03c9","\u1fa4":"\u03c9","\u1f62":"\u03c9","\u1fa2":"\u03c9","\u1f66":"\u03c9","\u1fa6":"\u03c9","\u1fa0":"\u03c9","\u1f61":"\u03c9","\u1f65":"\u03c9","\u1fa5":"\u03c9","\u1f63":"\u03c9","\u1fa3":"\u03c9","\u1f67":"\u03c9","\u1fa7":"\u03c9","\u1fa1":"\u03c9","\u03ce":"\u03c9","\u1f7d":"\u03c9","\u1ff4":"\u03c9","\u1f7c":"\u03c9",
|
31 |
+
"\u1ff2":"\u03c9","\u1ff6":"\u03c9","\u1ff7":"\u03c9","\u1ff3":"\u03c9","\u0491":"\u0433","\u0450":"\u0435","\u0451":"\u0435","\u04c2":"\u0436","\u045d":"\u0438","\u04e3":"\u0438","\u04ef":"\u0443"});n.register("$10",function(g,f,k){g.init=function(){function f(a){return e[a]||a}function d(a,b,l,c){b=a.split(b);for(var e=b.length;0!==e--;)(a=b[e])&&null==c[a]&&(l.push(a),c[a]=!0);return l}function c(a){return d(String(a||"").toLowerCase().replace(h,f),p,[],{})}function b(a,b){for(var c=[],s={},e,
|
32 |
+
w=b.length,A=p;0!==w--;)(e=b[w])&&d(String(e||"").toLowerCase().replace(h,f),A,c,s);l[a]=c}function a(a,b){var c=[],e=-1,h=l,p=h.length,d,f,g,q,z,F,m=a.length,k=b?!0:!1;a:for(;++e<p;)if(g=h[e],null!=g&&(q=g.length)){z=0;b:for(;z<m;z++){F=a[z];for(d=0;d<q;d++)if(f=g[d],0===f.indexOf(F))continue b;continue a}c.push(k?b[e]:e)}return c}var l=[],h=/[^a-z0-9]/g,p=/[\-_\s.?!;:,*^+=~`"(){}<>\[\]\/\\\u00a0\u1680\u180e\u2000-\u206f\u2e00-\u2e7f\u3000-\u303f]+/,e=n.require("$23","flatten.json");return{split:c,
|
33 |
+
pull:function(b,c){return a(b,c)},find:function(b,l){return a(c(b),l)},add:function(a,b){l[a]=c(b)},push:function(a){b(l.length,a)},index:function(a,c){b(a,c)},size:function(){return l.length},clear:function(){l=[]},remove:function(a){l[a]=null}}};return g}({},v,u));n.register("$11",function(g,f,n){g.listen=function(g,d){function c(){r[h?"show":"hide"]()}function b(a){y&&g.setAttribute("size",2+a.length);h=a;c();return a}function a(){p=null;d(h)}function l(){var c=g.value;x&&c===x&&(c="");c!==h&&
|
34 |
+
(p&&clearTimeout(p),b(c),e?p=setTimeout(a,e):a())}g instanceof jQuery&&(g=g[0]);var h,p,e=150,x=f.attachEvent&&g.getAttribute("placeholder"),y=1===Number(g.size),r=k('<a href="#clear" tabindex="-1" class="icon clear"><span>clear</span></a>').click(function(){g.value="";l();return!1});b(g.value);k(g).on("input blur focus",function(){l();return!0}).after(r);c();return{delay:function(a){e=a},ping:function(c){c?(p&&clearTimeout(p),c=g.value,x&&c===x&&(c=""),b(c),a(),c=void 0):c=l();return c},val:function(a){if(null==
|
35 |
+
a)return h;p&&clearTimeout(p);g.value=b(a);c()},el:function(){return g},blur:function(a){return k(g).on("blur",a)},destroy:function(){p&&clearTimeout(p)}}};return g}({},v,u));n.register("$12",function(g,f,n){function m(b,a){this.$element=k(b);this.options=a;this.enabled=!0;this.fixTitle()}g.init=function(b,a){var l={fade:!0,offset:5,delayIn:d,delayOut:c,anchor:b.attr("data-anchor"),gravity:b.attr("data-gravity")||"s"};a&&(l=k.extend({},l,a));b.tipsy(l)};g.delays=function(b,a){d=b||150;c=a||100};g.kill=
|
36 |
+
function(){k("div.tipsy").remove()};g.text=function(b,a){a.data("tipsy").setTitle(b)};var d,c;g.delays();k(n.body).on("overlayOpened overlayClosing",function(b){g.kill();return!0});m.prototype={show:function(){var b=this.getTitle();if(b&&this.enabled){var a=this.tip();a.find(".tipsy-inner")[this.options.html?"html":"text"](b);a[0].className="tipsy";a.remove().css({top:0,left:0}).prependTo(n.body);var b=(b=this.options.anchor)?this.$element.find(b):this.$element,b=k.extend({},b.offset(),{width:b[0].offsetWidth,
|
37 |
+
height:b[0].offsetHeight}),c=a[0].offsetWidth,h=a[0].offsetHeight,p="function"==typeof this.options.gravity?this.options.gravity.call(this.$element[0]):this.options.gravity,e;switch(p.charAt(0)){case "n":e={top:b.top+b.height+this.options.offset,left:b.left+b.width/2-c/2};break;case "s":e={top:b.top-h-this.options.offset,left:b.left+b.width/2-c/2};break;case "e":e={top:b.top+b.height/2-h/2,left:b.left-c-this.options.offset};break;case "w":e={top:b.top+b.height/2-h/2,left:b.left+b.width+this.options.offset}}2==
|
38 |
+
p.length&&("w"==p.charAt(1)?e.left=b.left+b.width/2-15:e.left=b.left+b.width/2-c+15);a.css(e).addClass("tipsy-"+p);a.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+p.charAt(0);this.options.className&&a.addClass("function"==typeof this.options.className?this.options.className.call(this.$element[0]):this.options.className);a.addClass("in")}},hide:function(){this.tip().remove()},fixTitle:function(){var b=this.$element,a=b.attr("title")||"";(a||"string"!==typeof b.attr("original-title"))&&
|
39 |
+
b.attr("original-title",a).removeAttr("title")},getTitle:function(){var b,a=this.$element,c=this.options;this.fixTitle();"string"==typeof c.title?b=a.attr("title"==c.title?"original-title":c.title):"function"==typeof c.title&&(b=c.title.call(a[0]));return(b=(""+b).replace(/(^\s*|\s*$)/,""))||c.fallback},setTitle:function(b){var a=this.$element;a.attr("default-title")||a.attr("default-title",this.getTitle());null==b&&(b=a.attr("default-title")||this.getTitle());a.attr("original-title",b);if(this.$tip)this.$tip.find(".tipsy-inner")[this.options.html?
|
40 |
+
"html":"text"](b)},tip:function(){this.$tip||(this.$tip=k('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>'),this.$tip.data("tipsy-pointee",this.$element[0]));return this.$tip},validate:function(){this.$element[0].parentNode||(this.hide(),this.options=this.$element=null)},enable:function(){this.enabled=!0},disable:function(){this.hide();this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled}};k.fn.tipsy=function(b){function a(a){var c=
|
41 |
+
k.data(a,"tipsy");c||(c=new m(a,k.fn.tipsy.elementOptions(a,b)),k.data(a,"tipsy",c));return c}function c(){var l=a(this),e=b.delayIn;l.hoverState="in";0==e?l.show():(l.fixTitle(),setTimeout(function(){"in"==l.hoverState&&l.show()},e))}function h(){var c=a(this),l=b.delayOut;c.hoverState="out";0==l?c.hide():(c.tip().removeClass("in"),setTimeout(function(){"out"==c.hoverState&&c.hide()},l))}b=k.extend({},k.fn.tipsy.defaults,b);b.live||this.each(function(){a(this)});if("manual"!=b.trigger){var p=b.live?
|
42 |
+
"live":"bind",e="hover"==b.trigger?"mouseleave":"blur";this[p]("hover"==b.trigger?"mouseenter":"focus",c)[p](e,h)}return this};k.fn.tipsy.defaults={className:null,delayIn:0,delayOut:0,fade:!1,fallback:"",gravity:"n",html:!1,live:!1,offset:0,opacity:0.8,title:"title",trigger:"hover",anchor:null};k.fn.tipsy.elementOptions=function(b,a){return k.metadata?k.extend({},a,k(b).metadata()):a};k.fn.tipsy.autoNS=function(){return k(this).offset().top>k(n).scrollTop()+k(f).height()/2?"s":"n"};k.fn.tipsy.autoWE=
|
43 |
+
function(){return k(this).offset().left>k(n).scrollLeft()+k(f).width()/2?"e":"w"};k.fn.tipsy.autoBounds=function(b,a){return function(){var c=a[0],h=1<a.length?a[1]:!1,p=k(n).scrollTop()+b,e=k(n).scrollLeft()+b,d=k(this);d.offset().top<p&&(c="n");d.offset().left<e&&(h="w");k(f).width()+k(n).scrollLeft()-d.offset().left<b&&(h="e");k(f).height()+k(n).scrollTop()-d.offset().top<b&&(c="s");return c+(h?h:"")}};return g}({},v,u));n.register("$37",function(g,f,k){"".localeCompare||(String.prototype.localeCompare=
|
44 |
+
function(){return 0});"".trim||(String.prototype.trim=function(){return n.require("$6","string.js").trim(this," \n\r\t")});g.html=function(){function f(){b=/[<>&]/g;a=/(\r\n|\n|\r)/g;l=/(?:https?):\/\/(\S+)/ig;h=location.hostname;f=null}function d(a){return"&#"+a.charCodeAt(0)+";"}function c(a,b){return'<a href="'+a+'" target="'+(b.indexOf(h)?"_blank":"_top")+'">'+b+"</a>"}var b,a,l,h;return function(h,e){f&&f();var x=h.replace(b,d);e&&(x=x.replace(l,c).replace(a,"<br />"));return x}}();return g}({},
|
45 |
+
v,u));n.register("$38",function(g,f,k){function m(){}var d,c,b=n.require("$22","rtl.json");g.init=function(){return new m};g.cast=function(a){return a instanceof m?a:"string"===typeof a?g.parse(a):g.clone(a)};g.clone=function(a){var b,c=new m;for(b in a)c[b]=a[b];return c};g.parse=function(a){d||(c=/[-_+]/,d=/^([a-z]{2,3})(?:-([a-z]{4}))?(?:-([a-z]{2}|[0-9]{3}))?(?:-([0-9][a-z0-9]{3,8}|[a-z0-9]{5,8}))?(?:-([a-z]-[-a-z]+))?$/i);a=String(a).split(c).join("-");if(!d.exec(a))return null;var b=new m;b.lang=
|
46 |
+
RegExp.$1.toLowerCase();if(a=RegExp.$2)b.script=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase();if(a=RegExp.$3)b.region=a.toUpperCase();if(a=RegExp.$4)b.variant=a.toLowerCase();if(a=RegExp.$5)b.extension=a;return b};f=m.prototype;f.isValid=function(){return!!this.lang};f.isKnown=function(){var a=this.lang;return!(!a||"zxx"===a)};f.toString=function(a){a=a||"-";var b,c=this.lang||"zxx";if(b=this.script)c+=a+b;if(b=this.region)c+=a+b;if(b=this.variant)c+=a+b;if(b=this.extension)c+=a+b;return c};
|
47 |
+
f.getIcon=function(){for(var a=4,b,c,d=["variant","region","script","lang"],e=[];0!==a--;)if(b=d[a],c=this[b])c.join&&(c=c.join("-")),1===a&&3===c.length?e.push("region-m49"):e=e.concat([b,b+"-"+c.toLowerCase()]);return e.join(" ")};f.isRTL=function(){return!!b[String(this.script||this.lang).toLowerCase()]};f=null;return g}({},v,u));n.register("$39",function(g,f,k){function m(a){f.console&&console.error&&console.error(a)}function d(){m("Method not implemented")}function c(){}function b(a){}c.prototype.toString=
|
48 |
+
function(){return"[Undefined]"};b.prototype._validate=function(a){var b,h,p=!0;for(b in this)h=this[b],h===d?(m(a+"."+b+"() must be implemented"),p=!1):h instanceof c&&(m(a+"."+b+" must be defined"),p=!1);return p};g.init=function(a,l){var h,p=new b;if(a)for(h=a.length;0!==h--;)p[a[h]]=d;if(l)for(h=l.length;0!==h--;)p[l[h]]=new c;return p};g.validate=function(a){var b=/function (\w+)\(/.exec(a.toString())?RegExp.$1:"";a.prototype._validate(b||"Object")};return g}({},v,u));n.register("$50",function(g,
|
49 |
+
f,k){var m=f.requestAnimationFrame,d=f.cancelAnimationFrame,c=0;if(!m||!d)for(var b in{ms:1,moz:1,webkit:1,o:1})if(m=f[b+"RequestAnimationFrame"])if(d=f[b+"CancelAnimationFrame"]||f[b+"CancelRequestAnimationFrame"])break;m&&d||(m=function(b){var h=a();timeToCall=Math.max(0,16-(h-c));nextTime=h+timeToCall;timerId=f.setTimeout(function(){b(nextTime)},timeToCall);c=nextTime;return timerId},d=function(a){clearTimeout(a)});var a=Date.now||function(){return(new Date).getTime()};g.loop=function(a,b){function c(){f=
|
50 |
+
m(c,b);a(e++)}var e=0,f;c();return{stop:function(){f&&d(f);f=null}}};return g}({},v,u));n.register("$47",function(g,f,k){function m(a,c,e,l){if(b){var h=e;e=function(a){if((a.MSPOINTER_TYPE_TOUCH||"touch")===a.pointerType)return h(a)}}a.addEventListener(c,e,l);return{unbind:function(){a.removeEventListener(c,e,l)}}}function d(a){a.preventDefault();a.stopPropagation();return!1}var c,b=!!f.navigator.msPointerEnabled,a=b?"MSPointerDown":"touchstart",l=b?"MSPointerMove":"touchmove",h=b?"MSPointerUp":
|
51 |
+
"touchend";g.ok=function(a){null==c&&(c="function"===typeof k.body.addEventListener);c&&a&&a(g);return c};g.ms=function(){return b};g.dragger=function(b,c){function e(a){b.addEventListener(a,f[a],!1)}function s(a){b.removeEventListener(a,f[a],!1)}var f={};f[a]=function(b){p(b,function(e,l){l.type=a;c(b,l,g)});e(l);e(h);return!0};f[h]=function(a){s(l);s(h);p(a,function(b,e){e.type=h;c(a,e,g)});return!0};f[l]=function(a){p(a,function(b,e){e.type=l;c(a,e,g)});return d(a)};e(a);var g={kill:function(){s(a);
|
52 |
+
s(l);s(h);b=g=c=null}};return g};g.swiper=function(c,f,g){function s(a){c.addEventListener(a,q[a],!1)}function D(a){c.removeEventListener(a,q[a],!1)}function w(){A&&A.stop();A=null}var A,G,E,q={},z=[],F=[],k=[];q[a]=function(a){G=!1;w();var b=e();p(a,function(a,c){z[a]=b;F[a]=c.clientX;k[a]=c.clientY});E=c.scrollLeft;return!0};q[h]=function(a){p(a,function(a,b){var c=e()-z[a],l=F[a]-b.clientX,c=Math.abs(l)/c;f(c,l?0>l?-1:1:0)});E=null;return!0};q[l]=function(a){var b,e;null==E||p(a,function(a,c){b=
|
53 |
+
F[a]-c.clientX;e=k[a]-c.clientY});if(e&&Math.abs(e)>Math.abs(b))return G=!0;b&&(G=!0,c.scrollLeft=Math.max(0,E+b));return d(a)};if(!b||g)s(a),s(l),s(h),b&&(c.className+=" mstouch");return{kill:function(){D(a);D(l);D(h);w()},swiped:function(){return G},ms:function(){return b},snap:function(a){b&&!g&&(c.style["-ms-scroll-snap-points-x"]="snapInterval(0px,"+a+"px)",c.style["-ms-scroll-snap-type"]="mandatory",c.style["-ms-scroll-chaining"]="none")},scroll:function(a,b,e){w();var l=c.scrollLeft,z=a>l?
|
54 |
+
1:-1,h=Math[1===z?"min":"max"],d=Math.round(16*b*z);return A=n.require("$50","fps.js").loop(function(b){b&&(l=Math.max(0,h(a,l+d)),c.scrollLeft=l,a===l&&(w(),e&&e(l)))},c)}}};g.start=function(b,c){return m(b,a,c,!1)};g.move=function(a,b){return m(a,l,b,!1)};g.end=function(a,b){return m(a,h,b,!1)};var p=g.each=function(a,c){if(b)(a.MSPOINTER_TYPE_TOUCH||"touch")===a.pointerType&&c(0,a);else for(var e=-1,l=(a.originalEvent||a).changedTouches||[];++e<l.length;)c(e,l[e])},e=Date.now||function(){return(new Date).getTime()};
|
55 |
+
return g}({},v,u));n.register("$51",function(g,f,n){g.init=function(f){function d(){l.style.top=String(-f.scrollTop)+"px";return!0}function c(){var a=l;a.textContent=f.value;a.innerHTML=a.innerHTML.replace(/[ \t]/g,b).split(/(?:\n|\r\n?)/).join('<span class="eol crlf"></span>\r\n')+'<span class="eol eof"></span>';return!0}function b(a){return'<span class="x'+a.charCodeAt(0).toString(16)+'">'+a+"</span>"}var a=f.parentNode,l=a.insertBefore(n.createElement("div"),f);k(f).on("input",c).on("scroll",d);
|
56 |
+
k(a).addClass("has-mirror");l.className="ta-mirror";var h=f.offsetWidth-f.clientWidth;2<h&&(l.style.marginRight=String(h-2)+"px");c();d();return{kill:function(){k(f).off("input",c).off("scroll",d);a.removeChild(l);l=null;k(a).removeClass("has-mirror")}}};return g}({},v,u));n.register("$30",function(g,f,k){function m(b,a){for(var c=0,h=-1,p=a&&f[a],e=d[b]||[],g=e.length;++h<g;)callback=e[h],"function"===typeof callback&&(callback(p),c++);return c}var d={},c;g.load=function(b,a,c){function h(){g&&(clearTimeout(g),
|
57 |
+
g=null);y&&(y.onreadystatechange=null,y=y=y.onload=null);b&&(delete d[b],b=null)}function p(a,e){var d=y&&y.readyState;if(e||!d||"loaded"===d||"complete"===d)e||m(b,c),h()}function e(){if(0===m(b))throw Error('Failed to load "'+(c||b)+'"');h()}if(c&&f[c])"function"===typeof a&&a(f[c]);else if(null!=d[b])d[b].push(a);else{d[b]=[a];var g=setTimeout(e,4E3),y=k.createElement("script");y.setAttribute("src",b);y.setAttribute("async","true");y.onreadystatechange=p;y.onload=p;y.onerror=e;y.onabort=h;k.getElementsByTagName("head")[0].appendChild(y)}};
|
58 |
+
g.stat=function(b){var a;if(!(a=c)){for(var l,h,d=k.getElementsByTagName("script"),e=-1,f=d.length;++e<f;)if(a=d[e].getAttribute("src"))if(l=a.indexOf("/lib/vendor"),-1!==l){h=a.substr(0,l);break}a=c=h||"/static"}return a+b};return g}({},v,u));n.register("$16",function(g,f,B){function m(a,b){a.setReadOnly(!1);a.on("change",function(a,c){return b.val(c.getValue())});a.on("focus",function(){return b.focus()});a.on("blur",function(){return b.blur()})}function d(a){a.off("change");a.off("focus");a.off("blur")}
|
59 |
+
function c(a){d(a);a.setReadOnly(!0);a.setHighlightGutterLine(!1);a.setHighlightActiveLine(!1)}function b(b,c){function l(){this.HighlightRules=h}var h=a(c),d=b.require,f=d("ace/lib/oop");f.inherits(h,d("ace/mode/text_highlight_rules").TextHighlightRules);f.inherits(l,d("ace/mode/text").Mode);return new l}function a(a){return function(){var b={start:[{token:"empty_line",regex:/^$/},{token:"constant.language",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},{token:"constant.language",
|
60 |
+
regex:/<!\[CDATA\[/},{token:"constant.language",regex:/\]\]>/},{token:"locked",regex:/<(?:xliff:)?(?:g|ph)[^>]*>[^<]*<\/(?:xliff:)?(?:g|ph)>/},{token:"locked",regex:/<(?:xliff:)?(bx|ex|x)[^\/>]*\/>/},{token:"constant.language",regex:/<\/?[:a-z]+[^>]*>/}]},c=l(a);"icu"===a?b={start:b.start.concat([{token:"icu-quoted",regex:/'([{}][^']*)?'/},{token:"printf",regex:"{[^!-/:-@\\[-^{-~\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a9\u00ab\u00ac\u00ae\u00b0\u00b1\u00b6\u00bb\u00bf\u00d7\u00f7\\u2010-\\u2027\\u2030-\\u203E\\u2041-\\u2053\\u2055-\\u205E\\u2190-\\u245F\\u2500-\\u2775\\u2794-\\u2BFF\\u2E00-\\u2E7F\\u3001-\\u3003\\u3008-\\u3020\\u3030\\uFD3E\\uFD3F\\uFE45\\uFE46]+(,[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]*(?:number|date|time|spellout|ordinal|duration)[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]*(,[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]*[^{}]+)?)?}"},
|
61 |
{token:"icu",regex:/{/,next:"icuName"},{token:"icu",regex:/}/,next:"icuType"}]),icuName:[{token:"icu",regex:"[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]+"},{token:"icu.name",regex:"[^\\s\\u0085\\u200E\\u200F\\u2028\\u2029!-/:-@\\[-^{-~\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a9\u00ab\u00ac\u00ae\u00b0\u00b1\u00b6\u00bb\u00bf\u00d7\u00f7\\u2010-\\u2027\\u2030-\\u203E\\u2041-\\u2053\\u2055-\\u205E\\u2190-\\u245F\\u2500-\\u2775\\u2794-\\u2BFF\\u2E00-\\u2E7F\\u3001-\\u3003\\u3008-\\u3020\\u3030\\uFD3E\\uFD3F\\uFE45\\uFE46]+",
|
62 |
next:"icuType"},{defaultToken:"icu",next:"icuType"}],icuType:[{token:"icu",regex:/[{}]/,next:"start"},{defaultToken:"icu"}]}:c&&b.start.push({token:"printf",regex:c});this.$rules=b}}function l(a){switch(a){case "objc":return/%(?:\d+\$)?[-+'0# ]*\d*(?:\.\d+|\.\*(?:\d+\$)?)?(?:hh?|ll?|[qjzTL])?[sScCdDioOuUxXfFeEgGaAp%@]/;case "java":return/%(?:\d+\$)?[-+,(0# ]*\d*(?:\.\d+)?(?:[bBhHsScCdoxXeEfgGaA%n]|[tT][HIklMSLNpzZsQBbhAaCYyjmdeRTrDFc])/;case "php":return/%(?:\d+\$)?(?:'.|[-+0 ])*\d*(?:\.\d+)?[suxXbcdeEfFgGo%]/;
|
63 |
+
case "python":return/%(?:\([a-z]+\))?[-+0# ]*(?:\d+|\*)?(?:\.\d+|\.\*)?(?:[hlL])?[sdiouxXeEfFgGcra%]/;case "javascript":return/%(?:[1-9]\d*\$)?\+?(?:0|'[^$])?-?\d*(?:\.\d+)?[b-gijostTuvxX%]/;case "auto":return/%(?:\d+\$|\([a-z]+\))?(?:[-+0]?\d*(\.\d+)?[duxoefgaDUXOEFGA]|[@scSC%])/;case p:return h||"%%"}}var h,p="auto";g.init=function(a,l,h){var g,s=!1,D=h||p,w=a.parentNode,A=w.appendChild(B.createElement("div"));k(w).addClass("has-proxy has-ace");n.require("$30","remote.js").load("https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.1/ace.js",
|
64 |
+
function(h){if(A){if(!h)throw Error("Failed to load code editor");g=h.edit(A);var d=g.session,f=g.renderer;g.$blockScrolling=Infinity;g.setShowInvisibles(s);g.setWrapBehavioursEnabled(!1);g.setBehavioursEnabled(!1);g.setHighlightActiveLine(!1);d.setUseSoftTabs(!1);f.setShowGutter(!0);f.setPadding(10);f.setScrollMargin(8);d.setMode(b(h,D));g.setValue(a.value,-1);d.setUseWrapMode(!0);l?m(g,l):c(g)}},"ace");return{kill:function(){g&&(d(g),g.destroy(),g=null);A&&(w.removeChild(A),k(w).removeClass("has-proxy has-ace"),
|
65 |
+
A=null);return this},disable:function(){g&&c(g);l=null;return this},enable:function(a){l=a;g&&m(g,a);return this},resize:function(){g&&g.resize();return this},val:function(a){g&&a!==g.getValue()&&g.setValue(a,-1);return this},invs:function(a){a=a||!1;s!==a&&(s=a,g&&g.setShowInvisibles(a));return this},strf:function(a){a=a||p;a!==D&&(D=a,g&&g.session.setMode(b(f.ace,a)));return this},focus:function(){return this}}};g.strf=function(a,b){p=a;h=b;return g};return g}({},v,u));n.register("$52",function(g,
|
66 |
+
f,B){function m(a,b){function c(){return b.val(a.getContent())}a.on("input",c);a.on("change",c);a.on("focus",function(){return b.focus()});a.on("blur",function(){return b.blur()});a.setMode("design")}function d(a){a.off("input");a.off("change");a.off("focus");a.off("blur")}function c(a){d(a);a.setMode("readonly")}var b=0;g.load=function(a){var b=n.require("$30","remote.js");b.load(b.stat("/lib/tinymce.min.js"),a,"tinymce");return g};g.init=function(a,l){function h(a){y=a;r="<p>"===a.substr(0,3)&&
|
67 |
+
"</p>"===a.substr(-4);return a.replace(/(<\/?)script/ig,"$1loco:script")}function f(a){e=a;a._getContent=a.getContent;a.getContent=function(a){a=this._getContent(a);a=a.replace(/(<\/?)loco:script/ig,"$1script");if(!r&&"<p>"===a.substr(0,3)&&"</p>"===a.substr(-4)){var b=a.substr(3,a.length-7);if(b===y||-1===b.indexOf("</p>"))a=b}return a};a._setContent=a.setContent;a.setContent=function(a,b){return this._setContent(h(a),b)};l?(m(a,l),l.reset()):c(a);k(w).removeClass("loading")}var e,x=!1,y="",r=!1,
|
68 |
+
s=a.parentNode,D=s.parentNode,w=s.appendChild(B.createElement("div")),A=D.insertBefore(B.createElement("nav"),s);A.id="_tb"+String(++b);k(s).addClass("has-proxy has-mce");k(w).addClass("mce-content-body loading").html(h(a.value));g.load(function(a){if(!a)throw Error("Failed to load HTML editor");w&&a.init({inline:!0,target:w,hidden_input:!1,theme:"modern",skin:!1,plugins:"link lists",browser_spellcheck:!0,menubar:!1,fixed_toolbar_container:"#"+A.id,toolbar:"formatselect | bold italic link unlink | bullist numlist outdent indent",
|
69 |
block_formats:"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h4;Heading 4=h4;Heading 5=h5;Heading 6=h6;",forced_root_block:"p",relative_urls:!1,convert_urls:!1,remove_script_host:!1,document_base_url:"",allow_script_urls:!1,formats:{alignleft:{classes:"alignleft"},alignright:{selector:"p,h1,h2,h3,h4,span,strong,em,a",classes:"alignright"},aligncenter:{selector:"p,h1,h2,h3,h4,span,strong,em,a",classes:"aligncenter"},strikethrough:{inline:"del"}},fix_list_elements:!0,extended_valid_elements:"span,b,i,u,loco:script",
|
70 |
+
entities:"38,amp,60,lt,62,gt,160,nbsp",entity_encoding:"named",keep_styles:!1,init_instance_callback:f})});return{val:function(b){b=h(b);null==e?(a.value=b,k(w).html(b)):e.getContent()!==b&&e.setContent(b);l&&l.val(b);return this},kill:function(){e&&(l&&l.val(e.getContent()),d(e),e.destroy(),e=null);w&&(s.removeChild(w),k(s).removeClass("has-proxy has-mce"),w=null);A&&(D.removeChild(A),A=null);return this},enable:function(a){l=a;e&&m(e,a);return this},disable:function(){e&&c(e);l=null;return this},
|
71 |
+
focus:function(){e&&l&&e.focus();return this},invs:function(a){a=a||!1;x!==a&&(x=a,k(s)[a?"addClass":"removeClass"]("show-invs"));return this}}};return g}({},v,u));n.register("$48",function(g,f,B){function m(b){function a(){g&&(y.off("input",l),g=!1)}function l(){var a=b.value;a!==s&&(y.trigger("changing",[a,s]),s=a)}function d(){l();g&&D!==s&&y.trigger("changed",[s])}function f(){c=b;D=s;g||(y.on("input",l),g=!0);y.trigger("editFocus");r.addClass("has-focus");return!0}function e(){c===b&&(c=null);
|
72 |
+
y.trigger("editBlur");r.removeClass("has-focus");g&&(d(),a());return!0}var g=!1,y=k(b),r=k(b.parentNode),s=b.value,D;y.blur(e).focus(f);return{val:function(a){s!==a&&(b.value=a,y.triggerHandler("input"),s=a);return!0},kill:function(){a();y.off("blur",e).off("focus",f)},fire:function(){s=null;l()},ping:d,blur:e,focus:f,reset:function(){D=s=b.value}}}function d(b){this.e=b}var c;g._new=function(b){return new d(b)};g.init=function(b){var a=new d(b);b.disabled?(b.removeAttribute("disabled"),a.disable()):
|
73 |
+
b.readOnly?a.disable():a.enable();return a};TextAreaPrototype=d.prototype;TextAreaPrototype.destroy=function(){this.unlisten();var b=this.p;b&&(b.kill(),this.p=null);this.e=null};TextAreaPrototype.reload=function(b,a){var c=this.l;c&&!a&&(this.disable(),c=null);this.val(b||"");a&&!c&&this.enable();return this};TextAreaPrototype.val=function(b){var a=this.e;if(null==b)return a.value;var c=this.l,d=this.p;d&&d.val(b);c&&c.val(b);c||a.value===b||(a.value=b,k(a).triggerHandler("input"));return this};
|
74 |
TextAreaPrototype.fire=function(){this.l&&this.l.fire();return this};TextAreaPrototype.ping=function(){this.l&&this.l.ping();return this};TextAreaPrototype.focus=function(){var b=this.p;b?b.focus():k(this.e).focus()};TextAreaPrototype.focused=function(){return c&&c===this.el};TextAreaPrototype.parent=function(){return this.e.parentNode};TextAreaPrototype.attr=function(b,a){var c=this.e;if(1===arguments.length)return c.getAttribute(b);null==a?c.removeAttribute(b):c.setAttribute(b,a);return this};TextAreaPrototype.editable=
|
75 |
+
function(){return!!this.l};TextAreaPrototype.enable=function(){var b=this.p;this.e.removeAttribute("readonly");this.listen();b&&b.enable&&b.enable(this.l);return this};TextAreaPrototype.disable=function(){var b=this.p;this.e.setAttribute("readonly",!0);this.unlisten();b&&b.disable&&b.disable();return this};TextAreaPrototype.listen=function(){var b=this.l;b&&b.kill();this.l=m(this.e);return this};TextAreaPrototype.unlisten=function(){var b=this.l;b&&(b.kill(),this.l=null);return this};TextAreaPrototype.setInvs=
|
76 |
+
function(b,a){var c=this.i||!1;if(a||c!==b)this._i&&(this._i.kill(),delete this._i),(c=this.p)?c.invs&&c.invs(b):b&&(this._i=n.require("$51","mirror.js").init(this.e)),this.i=b;return this};TextAreaPrototype.getInvs=function(){return this.i||!1};TextAreaPrototype.setMode=function(b){var a=this.p,d=this.i||!1;b!==(this.m||"")&&(this.m=b,a&&a.kill(),this.p=a="code"===b?n.require("$16","ace.js").init(this.e,this.l,this["%"]):"html"===b?n.require("$52","mce.js").init(this.e,this.l):null,this.setInvs(d,
|
77 |
+
!0),c&&this.focus());return this};TextAreaPrototype.setStrf=function(b){this["%"]=b;"code"===this.m&&this.p.strf(b);return this};TextAreaPrototype.name=function(b){this.e.setAttribute("name",b);return this};TextAreaPrototype.placeholder=function(b){this.e.setAttribute("placeholder",b);return this};TextAreaPrototype.redraw=function(){var b=this.p;b&&b.resize&&b.resize()};TextAreaPrototype=null;return g}({},v,u));n.register("$49",function(g,f,n){function m(a){var b=f.console;b&&b.error&&b.error(a)}
|
78 |
+
function d(a){var b=n.createElement("div");a&&b.setAttribute("class",a);return b}function c(a){return function(){a.resize();return this}}function b(a){return function(b){for(var c=b.target,e=c.$index;null==e&&"DIV"!==c.nodeName&&(c=c.parentElement);)e=c.$index;null!=e&&(b.stopImmediatePropagation(),a.select(e));return!0}}function a(a){return function(){a.redrawDirty()&&a.redraw();return!0}}function l(a){return function(b){var c;c=b.keyCode;if(40===c)c=1;else if(38===c)c=-1;else return!0;if(b.shiftKey||
|
79 |
+
b.ctrlKey||b.metaKey||b.altKey)return!0;a.selectNext(c);b.stopPropagation();b.preventDefault();return!1}}function h(a,b,c){function e(a){m("row["+a+"] disappeared");return{cellVal:function(){return""}}}return function(d){var l=b||0,h=c?-1:1,z=a.rows||[];d.sort(function(a,b){return h*(z[a]||e(a)).cellVal(l).localeCompare((z[b]||e(b)).cellVal(l))})}}function p(a){this.w=a}function e(a){this.t=a;this.length=0}function x(a,b,c){var e=n.createElement("div");e.className=c||"";this._=e;this.d=b||[];this.i=
|
80 |
+
a||0;this.length=b.length}function y(a){this.live=a;this.rows=[]}g.create=function(a){return new p(a)};var r=p.prototype;r.init=function(e){var h=this.w,f=h.id,p=h.splity(f+"-thead",f+"-tbody"),g=p[0],p=p[1],E=[],q=[],z=[],F=[];if(e)this.ds=e,this.idxs=q,this._idxs=null;else if(!(e=this.ds))throw Error("No datasource");g.css.push("wg-thead");p.css.push("wg-tbody");e.eachCol(function(a,b,c){z[a]=f+"-col-"+b;F[a]=c||b});for(var r=d(),y=-1,m=z.length,n=d("wg-cols"),B=g.splitx.apply(g,z);++y<m;)B[y].header(F[y]),
|
81 |
+
n.appendChild(r.cloneNode(!1)).setAttribute("for",z[y]);e.eachRow(function(a,b,c){E[a]=new x(a,b,c);q[a]=a});this.rows=E;this.cols=n;this.ww=null;this.root=r=p.body;this.head=g;g.redraw=c(this);g=p.fixed=B[0].bodyY()||20;h.lock().resize(g,p);h.css.push("is-table");h.restyle();this.sc?this._re_sort(m):e.sort&&e.sort(q);this.redrawDirty();this.render();k(r).attr("tabindex","-1").on("keydown",l(this)).on("mousedown",b(this)).on("scroll",a(this));return this};r.clear=function(){for(var a=this.pages||
|
82 |
+
[],b=a.length;0!==b--;)a[b].destroy();this.pages=[];this.sy=this.mx=this.mn=this.vh=null;void 0;return this};r.render=function(){for(var a,b,c=[],e=this.rows||[],d=-1,l,h=this.idxs,z=h.length,f=this.idxr={},p=this.r,g=this._r,x=this.root,k=this.cols;++d<z;){0===d%100&&(a=k.cloneNode(!0),b=new y(a),b.h=2200,b.insert(x),c.push(b));l=h[d];f[l]=d;a=e[l];if(null==a)throw Error("Render error, no data at ["+l+"]");a.page=b;b.rows.push(a)}b&&100!==b.size()&&b.sleepH(22);this.pages=c;this.mx=this.mn=null;
|
83 |
+
this.redrawDirty();this.redraw();null==p?null!=g&&(a=e[g])&&a.page&&(delete this._r,this.select(g,!0)):(a=e[p])&&a.page?this.select(p,!0):(this.deselect(),this._r=p);return this};r.resize=function(){var a=-1,b=this.ww||(this.ww=[]),c=this.w,e=c.cells[0],d=e.body.childNodes,l=d.length,h=this.pages||[],z=h.length;for(c.redraw.call(e);++a<l;)b[a]=d[a].style.width;if(z){c=this.mx;for(a=this.mn;a<=c;a++)h[a].widths(b);this.redrawDirty()&&this.redraw()}};r.redrawDirty=function(){var a=!1,b=this.root,c=
|
84 |
+
b.scrollTop,b=b.clientHeight;this.sy!==c&&(a=!0,this.sy=c);this.vh!==b&&(a=!0,this.vh=b);return a};r.redraw=function(){for(var a=0,b=-1,c=null,e=null,d=this.ww,l=this.sy,h=this.vh,z=this.mn,f=this.mx,p=Math.max(0,l-100),l=h+l+100,g=this.pages||[],x=g.length;++b<x&&!(a>l);)h=g[b],a+=h.height(),a<p||(null===c&&(c=b),e=b,h.rendered||h.render(d));if(z!==c){if(null!==z&&c>z)for(b=z;b<c;b++){h=g[b];if(!h)throw Error("Shit!");h.rendered&&h.sleep()}this.mn=c}if(f!==e){if(null!==f&&e<f)for(b=f;b>e;b--)h=g[b],
|
85 |
+
h.rendered&&h.sleep();this.mx=e}};r.selected=function(){return this.r};r.thead=function(){return this.w.cells[0]};r.tbody=function(){return this.w.cells[1]};r.tr=function(a){return(a=this.row(a))?a.cells():[]};r.row=function(a){return this.rows[a]};r.td=function(a,b){return this.tr(a)[b]};r.next=function(a,b,c){null==c&&(c=this.r||0);var e=this.idxs,h=e.length,d=(this.idxr||{})[c];for(c=d;c!==(d+=a)&&!(0<=d&&h>d);)if(b&&h)d=1===a?-1:h,b=!1;else return null;c=e[d];return null==c||null==this.rows[c]?
|
86 |
+
(m("Bad next: ["+d+"] does not map to data row"),null):c};r.selectNext=function(a,b,c){a=this.next(a,b);null!=a&&this.r!==a&&this.select(a,c);return this};r.deselect=function(a){var b=this.r;null!=b&&(this.r=null,k(this.tr(b)).removeClass("selected"),this.w.fire("wgRowDeselect",[b,a]));return this};r.selectRow=function(a,b){return this.select(this.idxs[a])};r.select=function(a,b){var c=this.rows[a],e=c&&c.page;if(!e)return this.deselect(!1),m("Row is filtered out"),this;this.deselect(!0);var d,h=
|
87 |
+
this.w.cells[1];e.rendered||(d=e.top(),h.scrollY(d),this.redrawDirty()&&this.redraw());if(!c.rendered)return e.rendered||m("Failed to render page"),m("Row ["+c.i+"] not rendered"),this;e=c.cells();k(e).addClass("selected");this.r=a;b||(d=h.scrollY(),k(this.root).focus(),d!==h.scrollY()&&h.scrollY(d));h.scrollTo(e[0],!0);this.w.fire("wgRowSelect",[a,c.data()]);return this};r.unfilter=function(){this._idxs&&(this.idxs=this._sort(this._idxs),this._idxs=null,this.clear().render());return this};r.filter=
|
88 |
+
function(a){this._idxs||(this._idxs=this.idxs);this.idxs=this._sort(a);return this.clear().render()};r.each=function(a){for(var b,c=-1,e=this.rows||[],d=this.idxs||[],h=d.length;++c<h;)b=d[c],a(e[b],c,b);return this};r.sortable=function(a){var b=this.sc||(this.sc=new e(this));b.has(a)||b.add(a);return this};r._re_sort=function(a){var b=-1,c=this.sc,d=c.active;for(this.sc=c=new e(this);++b<a;)c.add(b);d&&(b=this.head.indexOf(d.id),-1===b&&(b=Math.min(d.idx,a-1)),this.sort(b,d.desc));return this};r._sort=
|
89 |
+
function(a,b){b?(this.s=b,b(a)):(b=this.s)&&b(a);return a};r.sort=function(a,b){this._sort(this.idxs,h(this,a,b));this.sc.activate(a,b);return this};r=null;r=e.prototype;r.has=function(a){return null!=this[a]};r.add=function(a){var b=this,c=b.t.head.cells[a];b[a]={desc:null,idx:a,id:c.id};b.length++;c.addClass("wg-sortable").on("click",function(c){if("header"===c.target.nodeName.toLowerCase())return c.stopImmediatePropagation(),b.toggle(a),!1});return b};r.toggle=function(a){this.t.sort(a,!this[a].desc).clear().render();
|
90 |
+
return this};r.activate=function(a,b){var c,e;c=this.active;var d=this[a],h=this.t.head.cells;c&&(e=h[c.idx])&&(e.removeClass(c.css),c!==d&&e.restyle());(e=h[a])?(d.desc=b,this.active=d,c="wg-"+(b?"desc":"asc"),e.addClass(c).restyle(),d.css=c):this.active=null;return this};r=null;r=x.prototype;r.render=function(a){var b,c=[],e=this._,d=this.length;if(e){for(this.c=c;0!==d--;)b=e.cloneNode(!1),c[d]=this.update(d,b),b.$index=this.i,a[d].appendChild(b);this._=null}else for(c=this.c;0!==d--;)a[d].appendChild(c[d]);
|
91 |
+
this.rendered=!0;return this};r.update=function(a,b){var c=b||this.c[a]||{},e=(this.d[a]||function(){})()||"\u00a0";null==e.innerHTML?c.textContent=e:c.innerHTML=e.innerHTML;return c};r.cells=function(){return this.c||[this._]};r.data=function(){for(var a=-1,b=[],c=this.length;++a<c;)b[a]=this.cellVal(a);return b};r.destroy=function(){this.page=null;this.rendered=!1};r.cellVal=function(a){a=this.d[a]()||"";return String(a.textContent||a)};r=null;r=y.prototype;r.size=function(){return this.rows.length};
|
92 |
+
r.insert=function(a){var b=this.h,c=d("wg-dead");c.style.height=String(b)+"px";a.appendChild(c);return this.dead=c};r.top=function(){return(this.rendered?this.live:this.dead).offsetTop};r.height=function(){var a=this.h;null==a&&(this.h=a=this.rendered?this.live.firstChild.offsetHeight:this.dead.offsetHight);a||m("row has zero height");return a};r.render=function(a){for(var b,c=-1,e=this.rows,d=e.length,h=this.dead,l=this.live,z=l.childNodes;++c<d;)b=e[c],b.rendered||b.render(z);d=a.length;for(c=0;c<
|
93 |
+
d;c++)z[c].style.width=a[c];h.parentNode.replaceChild(l,h);this.rendered=!0;this.h=null;return this};r.sleep=function(){var a=this.height(),b=this.live,c=this.dead;c.style.height=String(a)+"px";b.parentNode.replaceChild(c,b);this.rendered=!1;this.h=a;return this};r.sleepH=function(a){a*=this.rows.length;var b=this.dead;b&&(b.style.height=String(a)+"px");this.rendered||(this.h=a);return this};r.widths=function(a){for(var b=this.live.childNodes,c=a.length;0!==c--;)b[c].style.width=a[c];return this};
|
94 |
+
r.destroy=function(){var a=this.rendered?this.live:this.dead,b=this.rows,c=b.length;for(a.parentNode.removeChild(a);0!==c--;)b[c].destroy()};r=null;return g}({},v,u));n.register("$40",function(g,f,B){function m(a,b){var c=a.id,e=c&&s[c],d=e&&e.parent();if(!e||!d)return null;var h=d.dir===r,c=h?"X":"Y",l="page"+c,h=h?y:x,f=h(d.el),c=b["offset"+c],p=d.el,g=p.className;null==c&&(c=b[l]-h(a));c&&(f+=c);p.className=g+" is-resizing";return{done:function(){p.className=g},move:function(a){d.resize(a[l]-f,
|
95 |
+
e);return!0}}}function d(a,c){function e(){k(B).off("mousemove",d);w&&(w.done(),w=null);return!0}function d(a){w?w.move(a):e();return!0}if(w)return!0;w=m(a.target,a);if(!w)return!0;k(B).one("mouseup",e).on("mousemove",d);return b(a)}function c(a,b){var c=b.type;"touchmove"===c?w&&w.move(b):"touchstart"===c?w=m(a.target,b):"touchend"===c&&w&&(w.done(),w=null)}function b(a){a.stopPropagation();a.preventDefault();return!1}function a(a){var b=D;b&&b.redraw();a&&a.redraw();return D=a}function l(b,c){var e=
|
96 |
+
k(c).on("editFocus",function(){e.trigger("wgFocus",[a(b)])}).on("editBlur",function(){e.trigger("wgBlur",[a(null)])})}function h(a){var b=a.id,c=a.className;this.id=b;this.el=a;this.pos=this.index=0;this.css=[c||"wg-root","wg-cell"];this._cn=c;s[b]=this;this.clear()}var p=n.include("$46","html.js")||n.include("$2","html.js",!0),e=n.require("$21","dom.js"),x=e.top,y=e.left,r=1,s={},D,w=!1;g.init=function(a){var b=new h(a);b.redraw();n.require("$47","touch.js").ok(function(b){b.dragger(a,c)});k(a).mousedown(d);
|
97 |
+
return b};f=h.prototype;f.fire=function(a,b){var c=k.Event(a);c.cell=this;k(this.el).trigger(c,b);return this};f.each=function(a){for(var b=-1,c=this.cells,e=c.length;++b<e;)a(c[b],b);return this};f.indexOf=function(a){return(a=s[a.id||String(a)])&&a.pid===this.id?a.index:-1};f.on=function(){return this.$("on",arguments)};f.off=function(){return this.$("off",arguments)};f.find=function(a){return k(this.el).find(a)};f.$=function(a,b){k.fn[a].apply(k(this.el),b);return this};f.addClass=function(a){this.css.push(a);
|
98 |
+
return this};f.removeClass=function(a){a=this.css.indexOf(a);-1!==a&&this.css.splice(a,1);return this};f.parent=function(){return this.pid&&s[this.pid]};f.splitx=function(){return this._split(r,arguments)};f.splity=function(){return this._split(2,arguments)};f._split=function(a,b){(this.length||this.field)&&this.clear();for(var c=-1,d,l=b.length,f=1/l,p=0;++c<l;){d=e.el();this.body.appendChild(d);for(var g=d,x=b[c],k=x,r=1;s[x];)x=k+"-"+ ++r;g.id=x;d=new h(d);d.index=c;d.pid=this.id;d._locale(this.lang,
|
99 |
+
this.rtl);d.pos=p;p+=f;this.cells.push(d);this.length++}this.dir=a;this.redraw();return this.cells};f.destroy=function(){this.clear();delete s[this.id];var a=this.el;a.innerHTML="";this.body=null;a.className=this._cn||"";k(a).off();return this};f.exists=function(){return this===s[this.id]};f.clear=function(){for(var a=this.el,b=this.cells,c=this.field,d=this.body,h=this.nav,l=this.length||0;0!==l--;)delete s[b[l].destroy().id];this.cells=[];this.length=0;h&&(a.removeChild(h),this.nav=null);d&&(c&&
|
100 |
+
(p.ie()&&k(d).triggerHandler("blur"),c.destroy(),this.field=null),this.table&&(this.table=null),a===d.parentNode&&a.removeChild(d));this.body=a.appendChild(e.el("","wg-body"));this._h=null;return this};f.resize=function(a,b){if(!b&&(b=this.cells[1],!b))return;var c=b.index,e=this.cells,d=k(this.el)[this.dir===r?"width":"height"](),h=e[c+1],c=e[c-1];pad=(b.body||b.el.firstChild).offsetTop||0;max=(h?h.pos*d:d)-pad;min=c?c.pos*d:0;b.pos=Math.min(max,Math.max(min,a))/d;this.redraw();return this};f.distribute=
|
101 |
+
function(a){for(var b=-1,c=0,e,d=this.cells,h=a.length;++b<h&&(e=d[++c]);)e.pos=Math.max(0,Math.min(1,a[b]));this.redraw();return this};f.distribution=function(){for(var a=[],b=0,c=this.cells,e=c.length-1;b<e;)a[b]=c[++b].pos;return a};f.restyle=function(){var a=this.css.concat();0===this.index?a.push("first"):a.push("not-first");this.dir&&(a.push("wg-split"),2===this.dir?a.push("wg-split-y"):a.push("wg-split-x"));this.t&&a.push("has-title");this.nav&&a.push("has-nav");this.field&&(a.push("is-field"),
|
102 |
+
this.field.editable()?a.push("is-editable"):a.push("is-readonly"));a=a.join(" ");a!==this._css&&(this._css=a,this.el.className=a);return this};f.redraw=function(a){this.restyle();var b=this.el,c=this.body,e=this.field;if(c){var d,h=b.clientWidth||0,l=b.clientHeight||0,f=c.offsetTop||0,l=f>l?0:l-f;this._h!==l&&(this._h=l,c.style.height=String(l)+"px",d=e);this._w!==h&&(this._w=h,d=e);d&&d.redraw()}c=this.length;h=1;l=this.nav;for(f=2===this.dir?"height":"width";0!==c--;)e=this.cells[c],l?d=1:(e.fixed&&
|
103 |
+
(e.pos=e.fixed/k(b)[f]()),d=h-e.pos,h=e.pos),e.el.style[f]=String(100*d)+"%",e.redraw(a);return this};f.contents=function(a,b){var c=this.el,d=this.body;if(null==a)return d.innerHTML;this.length?this.clear():d&&(c.removeChild(d),d=null);d||(this.body=d=c.appendChild(e.el("",b||"wg-content")),this._h=null,(c=this.lang)&&this._locale(c,this.rtl,!0));"string"===typeof a?k(d)._html(a):a&&this.append(a);this.redraw();return this};f.textarea=function(a,b){var c=this.field;if(c){var d=c.editable();c.reload(a,
|
104 |
+
b);d!==b&&this.restyle()}else this.length&&this.clear(),d=e.el("textarea"),d.setAttribute("wrap","virtual"),d.value=a,this.contents(d),c=n.require("$48","field.js")._new(d)[b?"enable":"disable"](),l(this,d),this.field=c,this.restyle();this.lang||this.locale("en");return c};f.locale=function(a){a=n.require("$38","locale.js").cast(a);return this._locale(String(a),a.isRTL())};f._locale=function(a,b,c){var e=this.body;if(c||a!==this.lang)this.lang=a,e&&e.setAttribute("lang",a);if(c||b!==this.rtl)this.rtl=
|
105 |
+
b,e&&e.setAttribute("dir",b?"RTL":"LTR");return this};f.editable=function(){var a=this.field;if(a)return a.editable()?a:null;var b=this.cells,c=b.length,e=this.navigated();if(null!=e)return b[e].editable();for(;++e<c;){for(e=0;e<c;c++);if(a=b[e].editable())return a}};f.eachTextarea=function(a){var b=this.field;b?a(b):this.each(function(b){b.eachTextarea(a)});return this};f.append=function(a){a&&(a.nodeType?p.init(this.body.appendChild(a)):p.init(k(a).appendTo(this.body)));return this};f.prepend=function(a){var b=
|
106 |
+
this.body;if(a.nodeType){var c=b.firstChild;p.init(c?b.insertBefore(a,c):b.appendChild(a))}else p.init(k(a).prependTo(b));return this};f.before=function(a){var b=this.body;a.nodeType?p.init(this.el.insertBefore(a,b)):p.init(k(a).insertBefore(b));return this};f.header=function(a,b){if(null==a&&null==b)return this.el.getElementsByTagName("header")[0];this.t=e.txt(a||"");this.el.insertBefore(e.el("header",b),this.body).appendChild(this.t);this.redraw();return this};f.title=function(a){var b=this.t;if(b)return b.nodeValue=
|
107 |
+
a||"",b;this.header(a);return this.t};f.titled=function(){var a=this.t;return a&&a.nodeValue};f.bodyY=function(){return x(this.body,this.el)};f.scrollY=function(a){if(J===a)return this.body.scrollTop;this.body.scrollTop=a};f.tabulate=function(a){var b=this.table;b?b.clear():b=n.require("$49","wgtable.js").create(this);b.init(a);return this.table=b};f.lock=function(){this.body.className+=" locked";return this};f.scrollTo=function(a,b){var c,e=this.body;c=e.scrollTop;var d=x(a,e);if(c>d)c=d;else{var h=
|
108 |
+
e.clientHeight,d=d+k(a).outerHeight();if(h+c<d)c=d-h;else return}b?e.scrollTop=c:k(e).stop(!0).animate({scrollTop:c},250)};f.navigize=function(a,c){function d(a){var b=l[a],c=g[a],e=k(b.el).show();c.addClass("active");p=a;x.data("idx",a);b.fire("wgTabSelect",[a]);return e}var h=this,l=h.cells,f=h.nav,p,g=[];f&&h.el.removeChild(f);var f=h.nav=h.el.insertBefore(e.el("nav","wg-tabs"),h.body),x=k(f).on("click",function(a){var c=k(a.target).data("idx");if(null==c)return!0;if(null!=p){var e=g[p];k(l[p].el).hide();
|
109 |
+
e.removeClass("active")}d(c);h.redraw();return b(a)});null==c&&(c=x.data("idx")||0);h.each(function(b,c){g[c]=k('<a href="#'+b.id+'"></a>').data("idx",c).text(a[c]).appendTo(x);b.pos=0;k(b.el).hide()});d(l[c]?c:0);h.lock();h.redraw();return h};f.navigated=function(){var a=this.nav;if(a)return k(a).data("idx")};f=null;return g}({},v,u));n.register("$24",function(g,f,B){function m(a){var b=[];a&&(a.saved()||b.push("po-unsaved"),a.fuzzy()?b.push("po-fuzzy"):a.flagged()&&b.push("po-flagged"),a.translation()||
|
110 |
+
b.push("po-empty"),a.comment()&&b.push("po-comment"));return b.join(" ")}function d(a,b,c){b=k(a.title(b).parentNode);var e=b.find("span.lang");c?(c=n.require("$38","locale.js").cast(c),e.length||(e=k("<span></span>").prependTo(b)),e.attr("lang",c.lang).attr("class",c.getIcon()||"lang region region-"+(c.region||"zz").toLowerCase())):(e.remove(),c="en");a.locale(c);return b}function c(a,b,c){b.click(function(b){var e=a.fire(c,[b.target]);e||b.preventDefault();return e})}function b(){this.dirty=0}n.require("$3",
|
111 |
+
"number.js");var a="poUpdate",l="changing",h="changed",p=0,e=1,x=2,y=3,r=4,s=5,D,w,A=n.require("$37","string.js").html,v=n.require("$6","string.js").sprintf;g.extend=function(a){return a.prototype=new b};g.localise=function(a){w=a;return g};var u=function(){var a=B.createElement("p");return function(b){a.innerHTML=b.replace("src=","x=");return a.textContent.trim()||b.trim()}}(),q=b.prototype=n.require("$39","abstract.js").init(["getListColumns","getListHeadings","getListEntry"],["editable","t"]);
|
112 |
+
q.init=function(){this.localise();this.editable={source:!0,target:!0};this.mode="";this.html=!1;return this};q.localise=function(a){a||(a=w||n.require("$1","t.js").init());var b=[];b[p]=a._x("Source text","Editor")+":";b[y]=a._x("%s translation","Editor")+":";b[r]=a._x("Context","Editor")+":";b[s]=a._x("Comments","Editor")+":";b[e]=a._x("Single","Editor")+":";b[x]=a._x("Plural","Editor")+":";b[6]=a._x("Untranslated","Editor");b[7]=a._x("Translated","Editor");b[8]=a._x("Toggle Fuzzy","Editor");b[9]=
|
113 |
+
a._x("Suggest translation","Editor");this.labels=b;this.t=a;return this};q.setRootCell=function(a){function b(a){c.redraw(!0,a);return!0}var c=n.require("$40","wingrid.js").init(a);k(f).on("resize",b);this.redraw=b;k(a).on("wgFocus wgBlur",function(a,b){a.stopPropagation();D=b});this.destroy=function(){c.destroy();k(f).off("resize",b)};this.rootDiv=a;return c};q.$=function(){return k(this.rootDiv)};q.setListCell=function(a){var b=this;b.listCell=a;a.on("wgRowSelect",function(a,c){b.loadMessage(b.po.row(c));
|
114 |
+
return!0}).on("wgRowDeselect",function(a,c,e){e||b.loadNothing();return!0})};q.setSourceCell=function(a){this.sourceCell=a};q.setTargetCell=function(a){this.targetCell=a};q.next=function(a,b,c){for(var e=this.listTable,d=e.selected(),h=d,l,f=this.po;null!=(d=e.next(a,c,d));){if(h===d){d=null;break}if(b&&(l=f.row(d),l.translated(0)))continue;break}null!=d&&e.select(d,!0);return d};q.current=function(a){var b=this.active;if(null==a)return b;a?a.is(b)?this.reloadMessage(a):this.loadMessage(a):this.unloadActive();
|
115 |
+
return this};q.getTargetOffset=function(){if(this.active)return this.targetCell&&this.targetCell.navigated()||0};q.getTargetEditable=function(){return this.editable.target&&this.targetCell&&this.targetCell.editable()};q.getSourceEditable=function(){return this.editable.source&&this.sourceCell&&this.sourceCell.editable()};q.getContextEditable=function(){return this.editable.context&&this.contextCell&&this.contextCell.editable()};q.getFirstEditable=function(){return this.getTargetEditable()||this.getSourceEditable()||
|
116 |
+
this.getContextEditable()};q.searchable=function(a){a&&(this.dict=a,this.po&&this.rebuildSearch());return this.dict&&!0};q.rebuildSearch=function(){var a=-1,b=this.po.rows,c=b.length,e=this.dict;for(e.clear();++a<c;)e.add(a,b[a].toText())};q.filtered=function(){return this.lastSearch||""};q.filter=function(a,b){var c,e=this.listTable,d=this.lastFound,h=this.lastSearch;if(a){if(h===a)return d||0;if(h&&!d&&0===a.indexOf(h))return 0;c=this.dict.find(a)}this.lastSearch=h=a;this.lastFound=d=c?c.length:
|
117 |
+
this.po.length;c?e.filter(c):e.unfilter();b||this.fire("poFilter",[h,d]);return d};q.countFiltered=function(){return this.lastSearch?this.lastFound:this.po.length};q.unsave=function(a,b){var c=!1;if(a){if(c=a.saved(b))this.dirty++,a.unsave(b),this.fire("poUnsaved",[a,b]);this.markUnsaved(a)}return c};q.markUnsaved=function(a){var b=this.po.indexOf(a);if((b=this.listTable.tr(b))&&b.length){var c=b[0].className;a=c.replace(/(?:^| +)po-[a-z]+/g,"")+" "+m(a);a!==c&&k(b).attr("class",a)}};q.save=function(a){var b=
|
118 |
+
this.po;if(this.dirty||a)b.each(function(a,b){b.save()}),this.listCell.find("div.po-unsaved").removeClass("po-unsaved"),this.dirty=0,this.fire("poSave");return b};q.fire=function(a,b){var c=this.handle;if(c&&c[a]&&(c=c[a].apply(this,b||[]),!1===c))return!1;c=k.Event(a);this.$().trigger(c,b);return!c.isDefaultPrevented()};q.on=function(a,b){this.$().on(a,b);return this};q.getSorter=function(){return null};q.reload=function(){var a=this,b,c=a.listCell,e=a.listTable,d=a.po,h=d&&d.locale(),l=h&&h.isRTL(),
|
119 |
+
f=d&&d.length||0;if(!d||!d.row)return c&&c.clear().header("Error").contents("Invalid messages list"),!1;a.targetLocale=h;a.lastSearch&&(a.lastSearch="",a.lastFound=f,a.fire("poFilter",["",f]));e&&(b=e.thead().distribution());a.listTable=e=c.tabulate({eachCol:function(b){var c,e,d=a.getListColumns(),h=a.getListHeadings();for(e in d)c=d[e],b(c,e,h[c])},eachRow:function(b){d.each(function(c,e){b(e.idx,a.getListEntry(e),m(e))})},sort:a.getSorter()});var p,c=a.getListColumns();for(p in c)e.sortable(c[p]);
|
120 |
+
b&&e.thead().distribute(b);e.tbody().$(l?"addClass":"removeClass",["is-rtl"]);a.fire("poLoad");return!!f};q.load=function(a,b){this.po=a;this.dict&&this.rebuildSearch();this.reload()&&(-1!==b?this.listTable.selectRow(b||0):this.active&&this.unloadActive())};q.pasteMessage=function(a){var b,c=0;this.active===a&&((b=this.sourceCell)&&b.eachTextarea(function(b){b.val(a.source(null,c++))}),(b=this.contextCell)&&b.eachTextarea(function(b){b.val(a.context())}),b=this.targetCell)&&(c=0,b.eachTextarea(function(b){b.val(a.translation(c++))}));
|
121 |
+
this.updateListCell(a,"source");this.updateListCell(a,"target");return this};q.reloadMessage=function(a){var b=this.sourceCell,c=this.targetCell,e;this.pasteMessage(a);b&&this.setSrcMeta(a,b)&&b.redraw();c&&(e=c.navigated()||0,e=this.setTrgMeta(a,e,c),!b&&this.setSrcMeta(a,c)&&(e=!0),e&&c.redraw());return this};q.setStatus=function(){return null};q.setSrcMeta=function(a,b){var e=[],d,h=!1,l=this.$smeta,f=this.labels,p=[],g=a.tags(),x=g&&g.length;if(d=a.context())p.push("<span>"+A(f[r])+"</span>"),
|
122 |
+
p.push("<mark>"+A(d)+"</mark>");if(x&&this.getTag)for(p.push("<span>Tagged:</span>");0<=--x;)(d=this.getTag(g[x]))&&p.push('<mark class="tag">'+A(d.mod_name)+"</mark>");p.length&&e.push(p.join(" "));if(this.getMono()&&(d=a.refs())&&(g=d.split(/\s/),x=g.length)){for(p=[];0<=--x;)d=g[x],p.push("<code>"+A(d)+"</code>");e.push('<p class="has-icon icon-file">'+p.join(" ")+"</p>")}(d=a.notes())&&e.push('<p class="has-icon icon-info">'+A(d,!0)+"</p>");e.length?(l||(l=b.find("div.meta"),l.length||(l=k('<div class="meta"></div>').insertAfter(b.header())),
|
123 |
+
c(this,l,"poMeta"),this.$smeta=l),l.html(e.join("\n")).show(),h=!0):l&&l.text()&&(l.text("").hide(),h=!0);return h};q.setTrgMeta=function(a,b,c){var e=[],d=!1,h=this.$tmeta;b=(a=a.errors(b))&&a.length;var l;if(b)for(l=0;l<b;l++)e.push('<p class="has-icon icon-warn">'+A(a[l],!0)+".</p>");e.length?(h||(h=c.find("div.meta"),h.length||(h=k('<div class="meta"></div>').insertAfter(c.header())),this.$tmeta=h),h.html(e.join("\n")).show(),d=!0):h&&h.text()&&(h.text("").hide(),d=!0);return d};q.loadMessage=
|
124 |
+
function(b){function c(a,b){var e=b?a.split(" "):a.split(" ",1);a=e[0];"="===a.charAt(0)&&(a=a.substr(1),a=["zero","one","two"][Number(a)]||a);e[0]=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase();return e.join(" ")}function f(a,h){var l=J,k=L[p];a.off();a.titled()!==k&&d(a,k,h||"en");k=!1;q.setSrcMeta(b,a)&&(k=!0);if(b.plural()){var k=-1,r=[],y=[],m=a.id+"-",s=b.sourceForms()||h&&h.plurals||["One","Other"],n=s.length;if(2!==n||"="===s[0].charAt(0)&&"=1"!==s[0])for(;++k<n;)r[k]=m+String(k),y[k]=
|
125 |
+
c(s[k])+":";else r=[m+"-0",m+"-1"],y=[L[e],L[x]];a.splity.apply(a,r);a.each(function(a,c){a.header(y[c]).textarea(b.source(null,c),l).setStrf(C).setMode(A).setInvs(u)});a.lock();l&&a.each(function(a,b){g(a,b)})}else k&&a.redraw(),a.textarea(b.source(),l).setStrf(C).setMode(A).setInvs(u),l&&g(a,0)}function g(c,e){c.on(l,function(a,c){b.source(c,e);0===e&&q.updateListCell(b,"source");q.unsave(b,e)}).on(h,function(){0===e&&q.po.reIndex(b);q.dict&&q.rebuildSearch();q.fire(a,[b])})}function k(a,e,h){M&&
|
126 |
+
a.eachTextarea(function(a){a.ping()});a.off();var l=e.isKnown()&&e.label||"Target",l=v(L[y],l);a.titled()!==l&&d(a,l,e);l=!1;!this.sourceCell&&q.setSrcMeta(b,a)&&(l=!0);q.setTrgMeta(b,h,a)&&(l=!0);q.setStatus(b,h);if(b.pluralized()){var f=[],p=[],g=a.id+"-",x=b.targetForms()||e.plurals||["One","Other"],l=x.length,r=function(a){var b=x[a];p.push(b?c(b,!0):"Form "+a);f.push(g+String(a))};for(b.each(r);(e=f.length)<l;)r(e);a.splitx.apply(a,f);a.each(function(a,c){var e=M&&!b.disabled(c);a.textarea(b.translation(c),
|
127 |
+
e).setStrf(C).setMode(A).setInvs(u);M&&m(a,c)});a.navigize(p,h||null).on("wgTabSelect",function(c,e){var d=M&&c.cell.editable();d&&d.focus();q.setTrgMeta(b,e,a);q.setStatus(b,e);q.fire("poTab",[e])})}else l&&a.redraw(),a.textarea(b.translation(),M&&!b.disabled(0)).setStrf(C).setMode(A).setInvs(u),M&&m(a,0)}function m(c,e){c.on(l,function(a,c,d){b.translate(c,e);0===e&&q.updateListCell(b,"target");b.fuzzy(e)?q.fuzzy(!1,b,e):q.unsave(b,e);""===c?(q.fire("poEmpty",[!0,b,e]),q.setStatus(b,e)):""===d&&
|
128 |
+
(q.fire("poEmpty",[!1,b,e]),q.setStatus(b,e))}).on(h,function(){q.dict&&q.rebuildSearch();q.fire(a,[b])})}function n(c){c.off();var e=L[r];c.titled()!==e&&(d(c,e),q.setStatus(null));c.textarea(b.context(),!0).setMode(A).setInvs(u);X&&c.on(l,function(a,c){b.context(c);q.updateListCell(b,"source");q.unsave(b,N)}).on(h,function(){q.po.reIndex(b);q.dict&&q.rebuildSearch();q.fire(a,[b])})}function w(a){var c=L[s];a.titled()!==c&&d(a,c);a.off().on(l,function(a,c){b.comment(c);q.fire("poComment",[b,c]);
|
129 |
+
q.unsave(b,N)}).textarea(b.comment(),!0)}var q=this,A=q.mode,B=b.isHTML(),u=q.inv||!1,E=this.fmt||null,C=b.format()||null,I=b.is(q.active),N=0,S=q.sourceCell,R=q.targetCell,T=q.contextCell,U=q.commentCell,M=q.editable.target,J=q.editable.source,X=q.editable.context,O=D,Y=q.sourceLocale,V=q.targetLocale,L=q.labels;q.html!==B&&(q.html=B,"code"!==q.mode&&(A=B?"html":"",q.setMode(A)));q.active=b;S&&f(S,Y);T&&n(T);R&&V&&(N=R.navigated()||0,k(R,V,N));U&&w(U);O&&(O.exists()||(O=O.parent()),(B=O.editable())&&
|
130 |
+
B.focus());E!==C&&(this.fmt=C);I||q.fire("poSelected",[b,N])};q.unloadActive=function(){function a(b){b&&b.text("").hide()}function b(a){a&&a.off().clear()}a(this.$smeta);a(this.$tmeta);b(this.sourceCell);b(this.contextCell);b(this.targetCell);this.commentCell&&this.commentCell.off();this.active&&(this.fire("poDeselected",[this.active]),this.active=null);return this};q.loadNothing=function(){var a,b=this.t,c=this.mode||"",e=this.inv||!1,d=this.fmt;this.unloadActive();this.setStatus(null);(a=this.commentCell)&&
|
131 |
+
a.textarea("",!1);if(a=this.sourceCell)a.textarea("",!1).setStrf(d).setMode(c).setInvs(e),a.title(b._x("Source text not loaded","Editor")+":");if(a=this.contextCell)a.textarea("",!1).setMode(c).setInvs(e),a.title(b._x("Context not loaded","Editor")+":");if(a=this.targetCell)a.textarea("",!1).setStrf(d).setMode(c).setInvs(e),a.title(b._x("Translation not loaded","Editor")+":");this.fire("poSelected",[null])};q.updateListCell=function(a,b){var c=this.getListColumns()[b],e=this.po.indexOf(a);(e=this.listTable.row(e))&&
|
132 |
+
e.rendered&&e.update(c)};q.cellText=function(a){return(a=-1!==a.indexOf("<")||-1!==a.indexOf("&")?u(a):a.trim())||"\u00a0"};q.fuzzy=function(a,b,c){b=b||this.active;var e=b.fuzzy(c);!0!==a||e?!1===a&&e&&this.flag(0,b,c)&&this.fire("poFuzzy",[b,!1,c]):this.flag(4,b,c)&&this.fire("poFuzzy",[b,!0,c]);return e};q.flag=function(b,c,e){if(!c){c=this.active;e=this.getTargetOffset();if(null==e)return null;e&&c.targetForms()&&(e=0)}var d=c.flagged(e);if(null==b)return d;if(d===b||b&&!c.translated(e)||!this.fire("poFlag",
|
133 |
+
[b,d,c,e]))return!1;c.flag(b,e);this.fire(a,[c])&&this.unsave(c,e);this.setStatus(c,e);return!0};q.add=function(b,c){var e,d=this.po.get(b,c);d?e=this.po.indexOf(d):(e=this.po.length,d=this.po.add(b,c),this.load(this.po,-1),this.fire("poAdd",[d]),this.fire(a,[d]));this.lastSearch&&this.filter("");this.listTable.select(e);return d};q.del=function(b){if(b=b||this.active){var c=this.lastSearch,e=this.po.del(b);null!=e&&(this.unsave(b),this.fire("poDel",[b]),this.fire(a,[b]),this.reload(),this.dict&&
|
134 |
+
this.rebuildSearch(),this.active&&this.active.equals(b)&&this.unloadActive(),this.po.length&&(c&&this.filter(c),this.active||(e=Math.min(e,this.po.length-1),this.listTable.select(e))))}};q.setMono=function(a){return this.setMode(a?"code":this.html?"html":"")};q.setMode=function(a){if(this.mode!==a){this.mode=a;this.callTextareas(function(b){b.setMode(a)});var b=this.active,c=this.sourceCell;b&&b.refs()&&c&&this.setSrcMeta(b,c)&&c.redraw()}return this};q.getMono=function(){return"code"===this.mode};
|
135 |
+
q.setInvs=function(a){(this.inv||!1)!==a&&(this.inv=a,this.callTextareas(function(b){b.setInvs(a)}),this.fire("poInvs",[a]));return this};q.getInvs=function(){return this.inv||!1};q.callTextareas=function(a){var b=this.targetCell;b&&b.eachTextarea(a);(b=this.contextCell)&&b.eachTextarea(a);(b=this.sourceCell)&&b.eachTextarea(a);return this};q.focus=function(){var a=this.getTargetEditable();a&&a.focus();return this};q=null;return g}({},v,u));n.register("$13",function(g,f,B){function m(){this.init()._validate();
|
136 |
+
this.sourceLocale={lang:"en",label:"English",plurals:["One","Other"]}}function d(a){a=k('<button type="button" class="button button-small icon icon-'+a+' hastip"></button>');n.require("$12","tooltip.js").init(a);return a}function c(a){return d("cloud").attr("title",a.labels[8]+" (Ctrl-U)").click(function(b){b.preventDefault();a.focus().fuzzy(!a.fuzzy())})}function b(a){return d("robot").attr("title",a.labels[9]+" (Ctrl-J)").click(function(b){b.preventDefault();a.fire("poHint")})}f=n.require("$24",
|
137 |
+
"base.js");g.init=function(a){var b=new m;a=b.setRootCell(a);var c=a.splity("po-list","po-edit"),d=c[0],e=c[1],c=e.splitx("po-trans","po-comment"),f=c[0],g=c[1].header("Loading.."),c=f.splity("po-source","po-target"),f=c[0].header("Loading.."),c=c[1].header("Loading..");a.distribute([0.34]);e.distribute([0.8]);b.setListCell(d);b.setSourceCell(f);b.setTargetCell(c);b.commentCell=g;b.editable.source=!1;return b};f=m.prototype=f.extend(m);f.getListHeadings=function(){var a=this.t||{_x:function(a){return a}},
|
138 |
+
b=[a._x("Source text","Editor")];this.targetLocale&&(b[1]=a._x("Translation","Editor"));return b};f.getListColumns=function(){var a={source:0};this.targetLocale&&(a.target=1);return a};f.getListEntry=function(a){var b=this.cellText,c=[function(){var c,e=b(a.source()||""),d=a.context();return d?(c=B.createElement("p"),c.appendChild(B.createElement("mark")).innerText=d,c.appendChild(B.createTextNode("\u00a0"+e)),c):e}];this.targetLocale&&(c[1]=function(){return b(a.translation()||"")});return c};f.stats=
|
139 |
+
function(){var a=this.po,b=a.length,c=0,d=0,e=0;a.each(function(a,b){b.fuzzy()?e++:b.translated()?c++:d++});return{t:b,p:c.percent(b)+"%",f:e,u:d}};f.unlock=function(){var a=this.targetLocale;this._unlocked||(this.editable={source:!0,context:!0,target:!1},this.po&&this.po.unlock(),this.contextCell=this.targetCell,delete this.targetCell,a&&(this._unlocked=a,delete this.targetLocale,this.reload(),this.fire("poLock",[!1])),this.active&&this.loadMessage(this.active))};f.lock=function(){var a=this._unlocked;
|
140 |
+
a&&(this.targetLocale=a,delete this._unlocked,this.po&&this.po.lock(a),this.editable={source:!1,context:!1,target:!0},this.targetCell=this.contextCell,delete this.contextCell,this.reload(),this.fire("poLock",[!0,a]),this.active&&this.loadMessage(this.active))};f.locked=function(){return!this._unlocked};f.setStatus=function(a){var d=this.$tnav;if(null==a)d&&(d.remove(),this.$tnav=null);else{d||(this.$tnav=d=k("<nav></nav>").append(c(this)).append(b(this)).appendTo(this.targetCell.header()));var h=
|
141 |
+
[];a.translated()?a.fuzzy()&&h.push("po-fuzzy"):h.push("po-empty");d.attr("class",h.join(" "))}};f.getSorter=function(){function a(a,c){var d=a.weight(),h=c.weight();return d===h?b(a,c):d>h?-1:1}function b(a,c){return a.hash().localeCompare(c.hash())}var c=this;return function(d){var e=c.po,f=c.locked()?a:b;d.sort(function(a,b){return f(e.row(a),e.row(b))})}};return g}({},v,u));n.register("$14",function(g,f,n){var m={copy:66,clear:75,save:83,fuzzy:85,next:40,prev:38,enter:13,invis:73,hint:74},d={38:!0,
|
142 |
+
40:!0,73:!0},c={66:function(b,a){var c=a.current();c&&(c.normalize(),a.focus().pasteMessage(c))},75:function(b,a){var c=a.current();c&&(c.untranslate(),a.focus().pasteMessage(c))},85:function(b,a){a.focus().fuzzy(!a.fuzzy())},13:function(b,a){a.getFirstEditable()&&a.next(1,!0,!0)},40:function(b,a){var c=b.shiftKey;a.next(1,c,c)},38:function(b,a){var c=b.shiftKey;a.next(-1,c,c)},73:function(b,a){if(!b.shiftKey)return!1;a.setInvs(!a.getInvs())}};g.init=function(b,a){function l(a){if(a.isDefaultPrevented()||
|
143 |
+
!a.metaKey&&!a.ctrlKey)return!0;var e=a.which;if(!h[e])return!0;var f=c[e];if(!f)throw Error("command undefined #"+e);if(a.altKey||a.shiftKey&&!d[e]||!1===f(a,b))return!0;a.stopPropagation();a.preventDefault();return!1}var h={};k(a||f).on("keydown",l);return{add:function(a,b){c[m[a]]=b;return this},enable:function(){var a,b;for(b in arguments)a=m[arguments[b]],h[a]=!0;return this},disable:function(){k(a||f).off("keydown",l);b=a=h=null}}};return g}({},v,u));n.register("$25",function(g,f,k){function m(){this.reIndex([])}
|
144 |
+
g.init=function(){return new m};f=m.prototype;f.reIndex=function(d){for(var c={},b=-1,a=d.length;++b<a;)c[d[b]]=b;this.keys=d;this.length=b;this.ords=c};f.key=function(d,c){if(null==c)return this.keys[d];var b=this.keys[d],a=this.ords[c];if(c!==b){if(null!=a)throw Error("Clash with item at ["+a+"]");this.keys[d]=c;delete this.ords[b];this.ords[c]=d}return d};f.indexOf=function(d){d=this.ords[d];return null==d?-1:d};f.add=function(d,c){var b=this.ords[d];null==b&&(this.keys[this.length]=d,b=this.ords[d]=
|
145 |
+
this.length++);this[b]=c;return b};f.get=function(d){return this[this.ords[d]]};f.has=function(d){return null!=this.ords[d]};f.del=function(d){this.cut(this.ords[d],1)};f.cut=function(d,c){c=c||1;var b=[].splice.call(this,d,c);this.keys.splice(d,c);this.reIndex(this.keys);return b};f.each=function(d){for(var c=-1,b=this.keys,a=this.length;++c<a;)d(b[c],this[c],c);return this};f.sort=function(d){for(var c=-1,b=this.length,a,f=this.keys,h=this.ords,g=[];++c<b;)g[c]=[this[c],f[c]];g.sort(function(a,
|
146 |
+
b){return d(a[0],b[0])});for(c=0;c<b;c++)a=g[c],this[c]=a[0],a=a[1],f[c]=a,h[a]=c;return this};f.join=function(d){return[].join.call(this,d)};f=null;return g}({},v,u));n.register("$26",function(g,f,k){function m(d,c){var b=RegExp("^.{0,"+(d-1)+"}["+c+"]"),a=RegExp("^[^"+c+"]+");return function(c,h){for(var f=c.length,e;f>d;){e=b.exec(c)||a.exec(c);if(null==e)break;e=e[0];h.push(e);e=e.length;f-=e;c=c.substr(e)}0!==f&&h.push(c);return h}}g.create=function(d){function c(a){return e[a]||"\\"+a}var b,
|
147 |
+
a,f=/(?:\r\n|[\r\n\v\f\u2028\u2029])/g,h=/[ \r\n]+/g,g=/[\t\v\f\x07\x08\\\"]/g,e={"\t":"\\t","\v":"\\v","\f":"\\f","\u0007":"\\a","\b":"\\b"};if(null==d||isNaN(d=Number(d)))d=79;0<d&&(b=m(d-3," "),a=m(d-2,"-\u2013 \\.,:;\\?!\\)\\]\\}\\>"));return{pair:function(b,e){if(!e)return b+' ""';e=e.replace(g,c);var h=0;e=e.replace(f,function(){h++;return"\\n\n"});if(!(h||d&&d<e.length+b.length+3))return b+' "'+e+'"';var k=[b+' "'],m=e.split("\n");if(a)for(var n=-1,A=m.length;++n<A;)a(m[n],k);else k=k.concat(m);
|
148 |
+
return k.join('"\n"')+'"'},prefix:function(a,b){var c=a.split(f);return b+c.join("\n"+b)},refs:function(a){a=a.replace(h," ",a);b&&(a=b(a,[]).join("\n#: "));return"#: "+a}}};return g}({},v,u));n.register("$41",function(g,f,k){function m(){this.length=0}g.init=function(){return new m};f=m.prototype;f.push=function(d){this[this.length++]=d;return this};f.sort=function(d){[].sort.call(this,d);return this};f.each=function(d){for(var c=-1,b=this.length;++c<b;)d(c,this[c]);return this};return g}({},v,u));
|
149 |
+
n.register("$27",function(g,f,k){function m(){}g.extend=function(d){return d.prototype=new m};f=m.prototype=n.require("$39","abstract.js").init(["add","load"]);f.row=function(d){return this.rows[d]};f.lock=function(d){return this.locale(d||{lang:"zxx",label:"Unknown",nplurals:1,pluraleq:"n!=1"})};f.unlock=function(){var d=this.loc;this.loc=null;return d};f.locale=function(d){null==d?d=this.loc:this.loc=d=n.require("$38","locale.js").cast(d);return d};f.each=function(d){this.rows.each(d);return this};
|
150 |
+
f.indexOf=function(d){"object"!==typeof d&&(d=this.get(d));if(!d)return-1;null==d.idx&&(d.idx=this.rows.indexOf(d.hash()));return d.idx};f.get=function(d){return this.rows&&this.rows.get(d)};f.has=function(d){return this.rows&&this.rows.has(d)};f.del=function(d){d=this.indexOf(d);if(-1!==d){var c=this.rows.cut(d,1);if(c&&c.length)return this.length=this.rows.length,this.rows.each(function(b,a,c){a.idx=c}),d}};f.reIndex=function(d,c){var b=this.indexOf(d),a=d.hash(),f=this.rows.indexOf(a);return f===
|
151 |
+
b?b:-1!==f?(c=(c||0)+1,d.source("Error, duplicate "+String(c)+": "+d.source()),this.reIndex(d,c)):this.rows.key(b,a)};f.sort=function(d){this.rows.sort(d);return this};f["export"]=function(){for(var d=-1,c=this.rows,b=c.length,a=n.require("$41","list.js").init();++d<b;)a.push(c[d]);return a};f=null;return g}({},v,u));n.register("$28",function(g,f,n){function m(){function d(a){return/<[a-z]+[^>]*>/i.test(a)||/&(#\d+|#x[0-9a-f]|[a-z]+);/i.test(a)?k("<p></p>").html(a).text():a}function c(a){return a.replace(/%(?:\d+\$)?(?:'.|[-+0 ])*\d*(?:\.\d+)?[suxXbcdeEfFgGo]/g,
|
152 |
+
"%s")}function b(a){return a.replace(/[^\sa-z0-9]+/ig," ")}function a(a){return a.trim().replace(/\s+/g," ")}function f(e){return a(b(d(c(e).toLowerCase())))}var h={},g={};return{add:function(a){var b=f(a.source());(h[b]||(h[b]=[])).push(a);g[a.hash()]=a},match:function(e){var k=f(e.source()),k=h[k],m;if(m=k){m=k.length;var r=k[0];if(1!==m)for(var s=7,n,w=e.source(),A=e.context(),B;0<=--m;)if(e=0,n=k[m],!(n.context()!==A&&++e>=s)){B=n.source();if(w!==B){if(++e>=s)continue;w=w.toLowerCase();B=B.toLowerCase();
|
153 |
+
if(w!==B){if(++e>=s)continue;w=c(w);B=c(B);if(w!==B){if(++e>=s)continue;w=d(w);B=d(B);if(w!==B){if(++e>=s)continue;w=b(w);B=b(B);if(w!==B){if(++e>=s)continue;w=a(w);B=a(B);if(w!==B&&++e>=s)continue}}}}}s=e;r=n;if(0===e)break}delete g[r.hash()];m=r.copy()}return m},unmatched:function(){var a,b,c=[];for(a in g)b=g[a],c.push(b);return c}}}g.merge=function(d,c){var b=d.rows,a=c.rows,l=[],h=[],g=[],e=m();b.each(function(b,c){a.has(b)||(c.translated()?e.add(c):g.push(c))});d.clear();a.each(function(a,c){try{var g=
|
154 |
+
b.get(a),p;g?(p=g.flagged(0),g.merge(c),g.flagged(0)!==p&&h.push(g)):(g=e.match(c))?(g.merge(c),h.push(g)):(g=c.copy(),l.push(g));d.add(g,"")}catch(k){f.console&&console.error(String(k))}});d.header("POT-Creation-Date",c.header("POT-Creation-Date")||d.now());return{add:l,fuz:h,del:g.concat(e.unmatched())}};return g}({},v,u));n.register("$29",function(g,f,k){function m(c,b,a){if(null==a)return c[b]||"";c[b]=a||"";return c}function d(){this._id=this.id=""}g.extend=function(c){return c.prototype=new d};
|
155 |
+
f=d.prototype;f.flag=function(c,b){var a=this.flg||(this.flg=[]);if(null!=b)a[b]=c;else for(var d=Math.max(a.length,this.src.length,this.msg.length);0!==d--;)a[d]=c;return this};f.flagged=function(c){var b=this.flg||[];if(null!=c)return b[c]||0;for(c=b.length;0!==c--;)if(b[c])return!0;return!1};f.flags=function(){for(var c,b={},a=[],d=this.flg||[],h=d.length;0!==h--;)c=d[h],b[c]||(b[c]=!0,a.push(c));return a};f.flaggedAs=function(c,b){var a=this.flg||[];if(null!=b)return c===a[b]||0;for(var d=a.length;0!==
|
156 |
+
d--;)if(a[d]===c)return!0;return!1};f.fuzzy=function(c,b){var a=this.flaggedAs(4,c);null!=b&&this.flag(b?4:0,c);return a};f.source=function(c,b){if(null==c)return this.src[b||0]||"";this.src[b||0]=c;return this};f.plural=function(c,b){if(null==c)return this.src[b||1]||"";this.src[b||1]=c||"";return this};f.sourceForms=function(){return this.srcF};f.targetForms=function(){return this.msgF};f.each=function(c){for(var b=-1,a=this.src,d=this.msg,h=Math.max(a.length,d.length);++b<h;)c(b,a[b],d[b]);return this};
|
157 |
+
f.count=function(){return Math.max(this.src.length,this.msg.length)};f.pluralized=function(){return 1<this.src.length||1<this.msg.length};f.translate=function(c,b){this.msg[b||0]=c||"";return this};f.untranslate=function(c){if(null!=c)this.msg[c]="";else{var b=this.msg,a=b.length;for(c=0;c<a;c++)b[c]=""}return this};f.translation=function(c){return this.msg[c||0]||""};f.errors=function(c){return this.err&&this.err[c||0]||[]};f.translated=function(c){if(null!=c)return!!this.msg[c];var b=this.msg,a=
|
158 |
+
b.length;for(c=0;c<a;c++)if(!b[c])return!1;return!0};f.untranslated=function(c){if(null!=c)return!this.msg[c];var b=this.msg,a=b.length;for(c=0;c<a;c++)if(b[c])return!1;return!0};f.comment=function(c){return m(this,"cmt",c)};f.notes=function(c){return m(this,"xcmt",c)};f.refs=function(c){return m(this,"rf",c)};f.format=function(c){return m(this,"fmt",c)};f.context=function(c){return m(this,"ctx",c)};f.tags=function(){return this.tg};f.toString=f.toText=function(){return this.src.concat(this.msg,this.id,
|
159 |
+
this.ctx).join(" ")};f.weight=function(){var c=0;this.translation()||(c+=2);this.fuzzy()&&(c+=1);return c};f.equals=function(c){return this===c||this.hash()===c.hash()};f.hash=function(){return this.id};f.normalize=function(){for(var c=this.msg.length;0!==c--;)this.msg[c]=this.src[c]||""};f.disabled=function(c){return!!(this.lck||[])[c||0]};f.disable=function(c){(this.lck||(this.lck=[]))[c||0]=!0;return this};f.saved=function(c){var b=this.drt;if(null==b)return!0;if(null!=c)return!b[c];for(c=b.length;0!==
|
160 |
+
c--;)if(b[c])return!1;return!0};f.unsave=function(c){(this.drt||(this.drt=[]))[c||0]=!0;return this};f.save=function(c){null==c?this.drt=null:(this.drt||(this.drt=[]))[c]=!1;return this};f.is=function(c){return c&&(c===this||c.idx===this.idx)};f.isHTML=function(c){if(null==c)return this.htm||!1;this.htm=c};f=null;return g}({},v,u));n.register("$15",function(g,f,k){function m(a){return{"Project-Id-Version":"PACKAGE VERSION","Report-Msgid-Bugs-To":"","POT-Creation-Date":a||"","PO-Revision-Date":a||
|
161 |
+
"","Last-Translator":"","Language-Team":"",Language:"","Plural-Forms":"","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit"}}function d(a,b){var c=a||"";b&&(c+="\x00"+b);return c}function c(a){var b=f.console;b&&b.error&&b.error(a.message||String(a))}function b(a){return n.require("$26","format.js").create(a)}function a(a){this.locale(a);this.clear();this.head=m(this.now())}function l(a,b){this.src=[a||""];this.msg=[b||""]}g.create=function(b){return new a(b)};
|
162 |
+
k=n.require("$27","messages.js").extend(a);k.clear=function(){this.rows=n.require("$25","collection.js").init();this.length=0};k.now=function(){function a(b,c){for(var e=String(b);e.length<c;)e="0"+e;return e}var b=new Date,c=b.getUTCFullYear(),d=b.getUTCMonth()+1,f=b.getUTCDate(),g=b.getUTCHours(),b=b.getUTCMinutes();return a(c,4)+"-"+a(d,2)+"-"+a(f,2)+" "+a(g,2)+":"+a(b,2)+"+0000"};k.header=function(a,b){var c=this.head||(this.head={});if(null==b)return this.headers()[a]||"";c[a]=b||"";return this};
|
163 |
+
k.headers=function(a){var b,c=this.now(),d=this.head||(this.head=m(c));if(null!=a){for(b in a)d[b]=a[b];return this}var f=this.locale();a={};for(b in d)a[b]=String(d[b]);f?(a.Language=String(f)||"zxx",a["Language-Team"]=f.label||a.Language,a["Plural-Forms"]="nplurals="+(f.nplurals||"2")+"; plural="+(f.pluraleq||"n!=1")+";",b="PO-Revision-Date"):(a.Language="",a["Plural-Forms"]="nplurals=INTEGER; plural=EXPRESSION;",a["PO-Revision-Date"]="YEAR-MO-DA HO:MI+ZONE",b="POT-Creation-Date");a[b]||(a[b]=c);
|
164 |
+
a["X-Generator"]="Loco https://localise.biz/";return a};k.get=function(a,b){var c=d(a,b);return this.rows.get(c)};k.add=function(a,b){a instanceof l||(a=new l(a));b&&a.context(b);var e=a.hash();this.rows.get(e)?c("Duplicate message at index "+this.indexOf(a)):(a.idx=this.rows.add(e,a),this.length=this.rows.length);return a};k.load=function(a){for(var b=-1,e,d,f,g,k,m,n=(f=this.locale())&&f.nplurals||2,A=[];++b<a.length;)e=a[b],null==e.parent?(d=e.source||e.id,f=e.target||"",g=e.context,d||g?(k=new l(d,
|
165 |
+
f),k._id=e._id,g&&k.context(g),e.flag&&k.flag(e.flag,0),e.comment&&k.comment(e.comment),e.notes&&k.notes(e.notes),e.refs&&k.refs(e.refs),k.format(e.format),e.message=k,this.add(k)):0===b&&"object"===typeof f&&(this.head=f,this.headcmt=e.comment)):A.push(e);for(b=-1;++b<A.length;)try{e=A[b];d=e.source||e.id;k=a[e.parent]&&a[e.parent].message;if(!k)throw Error("parent missing for plural "+d);m=e.plural;1===m&&k.plural(d);m>=n||(e.flag&&k.flag(e.flag,m),k.translate(e.target||"",m),e.format&&!k.format()&&
|
166 |
+
k.format(e.format))}catch(u){c(u)}return this};k.merge=function(a){return n.require("$28","merge.js").merge(this,a)};k.wrap=function(a){this.fmtr=b(a);return this};k.toString=function(){var a,c=this.locale(),d=[],f=[],g=this.headers(),k=!c,m=c&&c.nplurals||2,n=this.fmtr||b();g[c?"PO-Revision-Date":"POT-Creation-Date"]=this.now();for(a in g)f.push(a+": "+g[a]);f=new l("",f.join("\n"));f.comment(this.headcmt||"");k&&f.fuzzy(0,!0);d.push(f.toString());d.push("");this.rows.each(function(a,b){a&&(d.push(b.cat(n,
|
167 |
+
k,m)),d.push(""))});return d.join("\n")};k=n.require("$29","message.js").extend(l);k.hash=function(){return d(this.source(),this.context())};k.toString=function(){return this.cat(b())};k.cat=function(a,b,c){var d,f=[],g;(g=this.cmt)&&f.push(a.prefix(g,"# "));(g=this.xcmt)&&f.push(a.prefix(g,"#. "));d=this.rf;if(g=this._id)d+=(d?" ":"")+"loco:"+g;d&&/\S/.test(d)&&f.push(a.refs(d));!b&&this.fuzzy()&&f.push("#, fuzzy");(g=this.fmt)&&f.push("#, "+g+"-format");(g=this._ctx)&&f.push(a.prefix(a.pair("msgctxt",
|
168 |
+
g),"#| "));if(g=this._src)g[0]&&f.push(a.prefix(a.pair("msgid",g[0]),"#| ")),g[1]&&f.push(a.prefix(a.pair("msgid_plural",g[1]),"#| "));(g=this.ctx)&&f.push(a.pair("msgctxt",g));f.push(a.pair("msgid",this.src[0]));if(null==this.src[1])f.push(a.pair("msgstr",b?"":this.msg[0]));else for(d=-1,f.push(a.pair("msgid_plural",this.src[1])),g=this.msg||["",""],c=c||g.length;++d<c;)f.push(a.pair("msgstr["+d+"]",b?"":g[d]||""));return f.join("\n")};k.compare=function(a,b){var c=this.weight(),d=a.weight();if(c>
|
169 |
d)return 1;if(c<d)return-1;if(b){c=this.hash().toLowerCase();d=a.hash().toLowerCase();if(c<d)return 1;if(c>d)return-1}return 0};k.merge=function(a){var b=!1;this.rf=a.rf;this.fmt=a.fmt;this.cmt=a.cmt;this.xcmt=a.xcmt;a.src.join("\x00")!==this.src.join("\x00")&&(this._src=this.src,this.src=a.src.concat(),this.msg=(this.msg||["",""]).slice(0,this.src.length),b=!0);a.ctx!==this.ctx&&(this._ctx=this.ctx,this.ctx=a.ctx,b=!0);b&&this.translated()&&this.fuzzy(0,!0)};k.copy=function(){var a=new l,b,c;for(b in this)this.hasOwnProperty(b)&&
|
170 |
+
((c=this[b])&&c.concat&&(c=c.concat()),a[b]=c);return a};k=k=null;return g}({},v,u));n.register("$17",function(g,f,n){g.init=function(f,d){function c(){return h||(h=k('<div id="loco-po-ref"></div>').dialog({dialogClass:"loco-modal loco-modal-wide",modal:!0,autoOpen:!1,closeOnEscape:!0,resizable:!1,height:500}))}function b(a,b,d){a=k("<p></p>").text(d);c().dialog("close").html("").dialog("option","title","Error").append(a).dialog("open")}function a(a){var b=a&&a.code;if(b){for(var d=-1,f=b.length,
|
171 |
+
g=k("<ol></ol>").attr("class",a.type);++d<f;)k("<li></li>").html(b[d]).appendTo(g);g.find("li").eq(a.line-1).attr("class","highlighted");c().dialog("close").html("").dialog("option","title",a.path+":"+a.line).append(g).dialog("open")}}function g(a){a=a.target;var b=k(a).find("li.highlighted")[0],b=Math.max(0,(b&&b.offsetTop||0)-Math.floor(a.clientHeight/2));a.scrollTop=b}var h;return{load:function(h){c().html('<div class="loco-loading"></div>').dialog("option","title","Loading..").off("dialogopen").dialog("open").on("dialogopen",
|
172 |
+
g);h=k.extend({ref:h,path:d.popath},d.project||{});f.ajax.post("fsReference",h,a,b)}}};return g}({},v,u));n.register("$31",function(g,f,k){function m(d){this.api=d;this.chars=0}g.create=function(d){return new m(d)};f=m.prototype;f.init=function(d,c){function b(a){var b={length:0,html:a.html,sources:[]};r.push(b);return s[a.html?1:0]=b}function a(a,d){var r=a.source(null,d);if(r&&(a.untranslated(d)||c)){var u=n[r];if(u)u.push(a);else{var u=r.length,v=f.isHtml(r),v=s[v?1:0],q=v.sources;if(v.length+
|
173 |
+
u>m||q.length===e)v=b(v),q=v.sources;q.push(r);n[r]=[a];v.length+=u;g+=u;k+=1}}}var f=this.api,g=0,k=0,e=50,m=5E3,n={},r=[],s=[];b({html:!1});b({html:!0});d.each(function(b,c){a(c,0);a(c,1)});s=null;this.map=n;this.chars=g;this.length=k;this.batches=r;this.locale=d.locale()};f.abort=function(){this.state="abort";return this};f.dispatch=function(){function d(a,b){function d(c,f,g){b!==g&&(a===f||1<c&&e.source(null,1)===a)&&(e.translate(b,c),h++,v++);return h}if(!c())return!1;if(!b)return!0;var e,f=
|
174 |
+
n[a]||[],g=f.length,l=-1,h;for(u++;++l<g;)if(e=f[l])h=0,e.each(d),h&&k("each",[e]);return!0}function c(){return"abort"===e.state?(m&&(m.abort(),g()),!1):!0}function b(){var b=r.shift(),c;b?(c=b.sources)&&c.length?m.batch(c,s,b.html,d).fail(a).always(f):f():g()}function a(){e.abort();g()}function f(){w++;k("prog",[w,E]);c()&&b()}function g(){m=r=null;k("done")}function k(a,b){for(var c=q[a]||[],d=c.length;0<=--d;)c[d].apply(null,b)}var e=this,m=e.api,n=e.map,r=e.batches||[],s=e.locale,u=0,w=0,v=0,
|
175 |
+
B=e.length,E=r.length,q={done:[],each:[],prog:[]};e.state="";b();return{done:function(a){q.done.push(a);return this},each:function(a){q.each.push(a);return this},prog:function(a){q.prog.push(a);return this},stat:function(){return{todo:function(){return Math.max(B-u,0)},did:function(){return u}}}}};return g}({},v,u));n.register("$42",{nn:["no"]});n.register("$32",function(g,f,k){function m(){}g.create=function(d){d=m.prototype=new d;d.toString=function(){return"Yandex.Translate"};d.getId=function(){return"yandex"};
|
176 |
+
d.getUrl=function(){return"https://translate.yandex.com/"};d.parseError=function(c){return c&&c.code&&200!==c.code&&c.message?"Error "+c.code+": "+c.message:""};d.batch=function(c,b,a,d){function f(a){for(var e=c.length,g=-1;++g<e&&!1!==d(c[g],a[g]||"",b););}var g=this;a=a?"html":"plain";var e=this.mapLang(b,n.require("$42","yandex.json"));return g._call({url:"https://translate.yandex.net/api/v1.5/tr.json/translate?format="+a+"&lang=en-"+e,method:"POST",traditional:!0,data:{key:g.key(),text:c}}).done(function(a,
|
177 |
+
b,c){a&&200===a.code?f(a.text||[]):(g.stderr(g.parseError(a)||g.httpError(c)),f([]))}).fail(function(){f([])})};return new m};return g}({},v,u));n.register("$43",{zh:["zh","zh-CN","zh-TW"],he:["iw"],jv:["jw"]});n.register("$33",function(g,f,k){function m(){}g.create=function(d){d=m.prototype=new d;d.toString=function(){return"Google Translate"};d.getId=function(){return"google"};d.getUrl=function(){return"https://translate.google.com/"};d.parseError=function(c){if(c.error){for(var b=[],a=c.error.errors||
|
178 |
+
[],d=a.length,f=-1;++f<d;)b.push(a[f].message||"");return"Error "+c.error.code+": "+b.join(";")}return""};d.batch=function(c,b,a,d){function f(a){for(var e=c.length,g=-1,h;++g<e&&(h=a[g]||{},!1!==d(c[g],h.translatedText||"",b)););}var g=this;a=a?"html":"text";var e=g.mapLang(b,n.require("$43","google.json"));return g._call({url:"https://translation.googleapis.com/language/translate/v2?source=en&target="+e+"&format="+a,method:"POST",traditional:!0,data:{key:g.key(),q:c}}).done(function(a,b,c){a.data?
|
179 |
+
f(a.data.translations||[]):(g.stderr(g.parseError(a)||g.httpError(c)),f([]))}).fail(function(){f([])})};return new m};return g}({},v,u));n.register("$44",{nn:["no"],pt:["pt","pt-pt"],sr:["sr-Cyrl","sr-Latn"],sr_RS:["sr-Cyrl"],tlh:["tlh-Latn","tlh-Piqd"],zh:["zh-Hans","zh-Hant"],zh_CN:["zh-Hans"],zh_HK:["zh-Hans"],zh_SG:["zh-Hans"],zh_TW:["zh-Hant"]});n.register("$34",function(g,f,k){function m(){}g.create=function(d){d=m.prototype=new d;d.toString=function(){return"Microsoft Translator text API"};
|
180 |
+
d.getId=function(){return"microsoft"};d.getUrl=function(){return"https://aka.ms/MicrosoftTranslatorAttribution"};d.parseError=function(c){return c&&c.error?c.error.message:""};d.batch=function(c,b,a,d){function f(a){for(var e=-1,g;++e<k&&(g=a[e]||{},g=g.translations||[],g=g[0]||{},!1!==d(c[e],g.text||"",b)););}var g=this,e=[],k=c.length,m=-1;a=a?"html":"plain";for(var r=g.mapLang(b,n.require("$44","ms.json"));++m<k;)e.push({text:c[m]});return g._call({url:"https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&from=en&to="+
|
181 |
+
r+"&textType="+a,method:"POST",data:JSON.stringify(e),headers:{"Content-Type":"application/json; charset=UTF-8","Ocp-Apim-Subscription-Key":this.key(),"Ocp-Apim-Subscription-Region":g.param("region")||"global"}}).done(function(a,b,c){a&&a.length?f(a):(g.stderr(g.parseError(a)||g.httpError(c)),f([]))}).fail(function(){f([])})};return new m};return g}({},v,u));n.register("$45",{pt:["pt-PT","pt-BR"]});n.register("$35",function(g,f,k){function m(){}g.create=function(d){d=m.prototype=new d;d.toString=
|
182 |
+
function(){return"DeepL Translator"};d.getId=function(){return"deepl"};d.getUrl=function(){return"https://www.deepl.com/translator"};d.parseError=function(c){return c.message};d.batch=function(c,b,a,d){function f(a){for(var g=c.length,h=-1,k;++h<g&&(k=a[h]||{},!1!==d(c[h],k.text||"",b)););}var g=this;a=g.mapLang(b,n.require("$45","deepl.json"));return g._call({url:"https://api.deepl.com/v2/translate",method:"POST",traditional:!0,data:{source_lang:"EN",target_lang:a.toUpperCase(),preserve_formatting:"1",
|
183 |
+
auth_key:g.key(),text:c}}).done(function(a,b,c){a.translations?f(a.translations):(g.stderr(g.parseError(a)||g.httpError(c)),f([]))}).fail(function(){f([])})};return new m};return g}({},v,u));n.register("$36",function(g,f,n){function m(){}g.create=function(d){(m.prototype=new d).batch=function(c,b,a,d){function g(a){for(var e=c.length,f=-1;++f<e&&!1!==d(c[f],a[f],b););}var m=f.loco.ajax;a={hook:this.getId(),type:a?"html":"text",locale:String(b),sources:c};var e=k.Deferred();this.abortable(m.post("apis",
|
184 |
+
a,function(a){g(a&&a.targets||[]);e.resolve()},function(){g([]);e.reject()}));return e.promise()};return new m};return g}({},v,u));n.register("$18",function(g,f,u){function m(){this.inf={}}function d(){var a=u.createElement("p"),b=/&(#\d+|#x[0-9a-f]|[a-z]+);/i,c=/<[a-z]+\s/i,d,e;return{sniff:function(f){if(f===d)return e;d=f;if(b.test(f)||c.test(f))if(a.innerHTML=f,a.textContent!==f)return e=!0;return e=!1}}}var c=m.prototype;c.init=function(a){this.inf=a||{}};c.param=function(a){return this.inf[a]||
|
185 |
+
""};c.key=function(){return this.param("key")};c.getId=function(){return this.param("id")||"none"};c.getUrl=function(){return this.param("url")||"#"};c.toString=function(){return this.param("name")||this.getId()};c.stderr=function(a){var b=(f.loco||{}).notices||f.console;b&&b.error&&b.error(String(this)+": "+String(a))};c.httpError=function(a){return(a=a&&a.status)&&200!==a?"Responded status "+a:"Unknown error"};c.parseError=function(){return""};c.mapLang=function(a,b){var c=String(a).replace("-",
|
186 |
+
"_"),d=a.lang,e=b[c]||b[d]||[],f=e.length;if(0===f)return d;if(1<f)for(var c=c.toLowerCase(),d=-1,g;++d<f;)if(g=e[d],g.toLowerCase().replace("-","_")===c)return g;return e[0]};c.translate=function(a,b,c){return this.batch([a],b,this.isHtml(a),c)};c.batch=function(){return{always:function(a){a()}}};c._call=function(a){var b=this;b.state=null;a.cache=!0;a.dataType="json";a.error=function(a,c,d){try{var f=a.responseText,g=f&&n.require("$5","json.js").parse(f);d=g&&b.parseError(g)||d}catch(k){}b.stderr(d||
|
187 |
+
b.httpError(a))};return b.abortable(k.ajax(a))};c.abortable=function(a){var b=this;a.always(function(){b.$r===a&&(b.$r=null)});return b.$r=a};c.abort=function(){var a=this.$r;a&&a.abort()};c.isHtml=function(a){return(b||(b=d())).sniff(a)};c.createJob=function(){return n.require("$31","job.js").create(this)};g.create=function(a){var b;b=a.id;b="yandex"===b?n.require("$32","yandex.js").create(m):"google"===b?n.require("$33","google.js").create(m):"microsoft"===b?n.require("$34","ms.js").create(m):"deepl"===
|
188 |
+
b?n.require("$35","deepl.js").create(m):n.require("$36","custom.js").create(m);b.init(a);return b};g.suggest=function(a,b,c,d){var e,f,g=a.length;for(e=0;e<g;e++)f=a[e],f.translate(b,c,d)};var b;return g}({},v,u));n.register("$19",function(g,f,n){g.init=function(g){function d(){H||(I.click(e),H=k('<div id="loco-fs-creds"></div>').dialog({dialogClass:"request-filesystem-credentials-dialog loco-modal",minWidth:580,modal:!0,autoOpen:!1,closeOnEscape:!0}).on("change",'input[name="connection_type"]',function(){this.checked&&
|
189 |
+
k("#ssh-keys").toggleClass("hidden","ssh"!==k(this).val())}));return H}function c(){Q&&(b(k(w)),Q=!1);if(E&&J){var a=J,c=k(P);c.find("span.loco-msg").text(a);K||(c.removeClass("jshide").hide().fadeIn(500),K=!0)}else K&&(b(k(P)),K=!1)}function b(a){a.slideUp(250).fadeOut(250,function(){k(this).addClass("jshide")})}function a(){if(E)return H&&H.dialog("close"),c(),k(g).find('button[type="submit"]').attr("disabled",!1),k(f).triggerHandler("resize"),v&&v(!0),!0;z&&H?(Q||(k(w).removeClass("jshide").hide().fadeIn(500),
|
190 |
+
Q=!0),K&&(b(k(P)),K=!1)):c();k(g).find('input[type="submit"]').attr("disabled",!0);v&&v(!1);return!1}function l(a){var b,c,d=s||{};for(b in d)d.hasOwnProperty(b)&&(c=d[b],a[b]?a[b].value=c:k('<input type="hidden" />').attr("name",b).appendTo(a).val(c))}function h(a){a.preventDefault();a=k(a.target).serializeArray();r(a);C=!0;return!1}function p(a){a.preventDefault();H.dialog("close");return!1}function e(a){a.preventDefault();H.dialog("open").find('input[name="connection_type"]').change();return!1}
|
191 |
+
function x(b){E=b.authed;A=b.method;k(w).find("span.loco-msg").text(b.message||"Something went wrong.");J=b.warning||"";b.notice&&q.notices.info(b.notice);if(E)"direct"!==A&&(s=b.creds,l(g),C&&b.success&&q.notices.success(b.success)),a();else if(b.reason)q.notices.info(b.reason);else if(b=b.prompt){var c=d();c.html(b).find("form").submit(h);c.dialog("option","title",c.find("h2").remove().text());c.find("button.cancel-button").show().click(p);c.find('input[type="submit"]').addClass("button-primary");
|
192 |
+
a();k(f).triggerHandler("resize")}else q.notices.error("Server didn't return credentials, nor a prompt for credentials")}function u(){a()}function r(a){C=!1;q.ajax.setNonce("fsConnect",W).post("fsConnect",a,x,u);return a}var s,v,w=g,A=null,C=!1,E=!1,q=f.loco,z=g.path.value,F=g.auth.value,W=g["loco-nonce"].value,I=k(w).find("button.button-primary"),P=n.getElementById(w.id+"-warn"),Q=!1,K=!1,J="",H;q.notices.convert(P).stick();g.connection_type?(s={},s.connection_type=g.connection_type.value,E=!0):
|
193 |
+
z&&F&&r({path:z,auth:F});a();return{applyCreds:function(a){if(a.nodeType)l(a);else{var b,c=s||{};for(b in c)c.hasOwnProperty(b)&&(a[b]=c[b])}return this},setForm:function(b){g=b;a();l(b);return this},connect:function(){z=g.path.value;F=g.auth.value;r(k(g).serializeArray());return this},listen:function(a){v=a;E&&a(!0);return this},authed:function(){return E}}};return g}({},v,u));n.register("$20",function(g,f,u){function m(f,g,k,e){g="n"===k?c(g):b(g);e&&(g=a(g));return d([].sort,[g])(f)}function d(a,
|
194 |
+
b){return function(c){a.apply(c,b);return c}}function c(a){return function(b,c){var d=b&&b[a]||0,f=c&&c[a]||0;return d===f?0:d>f?1:-1}}function b(a){return function(b,c){return(b&&b[a]||"").localeCompare(c&&c[a]||"")}}function a(a){return function(b,c){return-1*a(b,c)}}g.init=function(a){function b(a){var c=-1,d=a.length;for(k("tr",w).remove();++c<d;)w.appendChild(a[c].$)}function c(a){r=a?B.find(a,d):d.slice(0);u&&(a=f[u],r=m(r,u,a.type,a.desc));b(r)}var d=[],f=[],g=0,r,s,u,w=a.getElementsByTagName("tbody")[0],
|
195 |
+
v=a.getElementsByTagName("thead")[0],B=n.require("$10","fulltext.js").init();v&&w&&(k("th",v).each(function(a,c){var l=c.getAttribute("data-sort-type");l&&(a=g,k(c).addClass("loco-sort").click(function(c){c.preventDefault();c=a;var g=f[c],l=g.type,n=!(g.desc=!g.desc);r=m(r||d.slice(0),c,l,n);b(r);s&&s.removeClass("loco-desc loco-asc");s=k(g.$).addClass(n?"loco-desc":"loco-asc").removeClass(n?"loco-asc":"loco-desc");u=c;return!1}),f[g]={$:c,type:l});c.hasAttribute("colspan")?g+=Number(c.getAttribute("colspan")):
|
196 |
+
g++}),k("tr",w).each(function(a,b){var c,g,h,k=[],l={_:a,$:b},m=b.getElementsByTagName("td");for(g in f){c=m[g];(h=c.textContent.replace(/(^\s+|\s+$)/g,""))&&k.push(h);c.hasAttribute("data-sort-value")&&(h=c.getAttribute("data-sort-value"));switch(f[g].type){case "n":h=Number(h)}l[g]=h}d[a]=l;B.index(a,k)}),a=k('form.loco-filter input[type="text"]',a.parentNode),a.length&&(a=a[0],v=k(a.form),1<d.length?n.require("$11","LocoTextListener.js").listen(a,c):v.hide(),v.on("submit",function(a){a.preventDefault();
|
197 |
+
return!1})))};return g}({},v,u));var C=v.loco||{},I=C.conf||{$v:[0,0]};v=n.require("$1","t.js").init();u=I.wplang;C.version=function(g){return I.$v[g||0]};n.require("$2","html.js");n.require("$3","number.js");n.require("$4","array.js");n.require("$5","json.js");C.l10n=v;v.load(I.wpl10n);u&&v.pluraleq(u.pluraleq);C.string=n.require("$6","string.js");C.notices=n.require("$7","notices.js").init(v);C.ajax=n.require("$8","ajax.js").init(I).localise(v);C.locale=n.require("$9","wplocale.js");C.fulltext=
|
198 |
+
n.require("$10","fulltext.js");C.watchtext=n.require("$11","LocoTextListener.js").listen;C.tooltip=n.require("$12","tooltip.js");C.po={ed:n.require("$13","poedit.js"),kbd:n.require("$14","hotkeys.js"),init:n.require("$15","po.js").create,ace:n.require("$16","ace.js").strf("php"),ref:n.require("$17","refs.js")};C.apis=n.require("$18","apis.js");C.fs=n.require("$19","fsconn.js");k("#loco-admin.wrap table.wp-list-table").each(function(g,f){n.require("$20","tables.js").init(f)});C.validate=function(g){return"2.4.4"!==
|
199 |
+
(/^\d+\.\d+\.\d+/.exec(g&&g[0]||"")&&RegExp.lastMatch)?(C.notices.warn("admin.js is the wrong version (2.4.4). Please empty all relevant caches and reload this page."),!1):!0}})(window,document,window.jQuery);
|
pub/js/min/editor.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(S,C){var _=S.loco,i=_&&_.conf,p=document.getElementById("loco-editor-inner");if(_&&i&&p){var D,t,z,n,f=!!i.WP_DEBUG,r=_.po.ref&&_.po.ref.init(_,i),l=null,a=null,o=i.multipart,T=_.l10n,b=_.string.sprintf,I=i.locale,m=_.po.init(I).wrap(i.powrap),s=!I,e=document.getElementById("loco-actions"),c=i.popath,u=i.potpath,d=document.getElementById("loco-fs"),g=d&&_.fs.init(d),v=!i.readonly,h=i.apis||[],j={};!o||S.FormData&&S.Blob||(o=!1,_.notices.warn("Your browser doesn't support Ajax file uploads. Falling back to standard postdata")),r||_.notices.warn("admin.js is out of date. Please empty your browser cache and reload the page.");var y,w,x=(w=parseInt(C(p).css("min-height")||0),function(){var t=function(t,n){for(var o=t.offsetTop||0;(t=t.offsetParent)&&t!==n;)o+=t.offsetTop||0;return o}(p,document.body),n=S.innerHeight,o=Math.max(w,n-t-20);y!==o&&(p.style.height=String(o)+"px",y=o)});x(),C(S).resize(x),p.innerHTML="",D=_.po.ed.init(p).localise(T),_.po.kbd.init(D).add("save",v?function(){D.dirty&&F()}:P).add("hint",I&&v&&U||P).enable("copy","clear","enter","next","prev","fuzzy","save","invis","hint");var k={save:v&&function(n){function o(){n.disabled=!0}function t(){n.disabled=!1}function e(){t(),C(n).removeClass("loco-loading")}return n,D.on("poUnsaved",function(){t(),C(n).addClass("button-primary")}).on("poSave",function(){o(),C(n).removeClass("button-primary")}),a=C.extend({path:c},i.project||{}),C(n).click(function(t){return t.preventDefault(),o(),C(n).addClass("loco-loading"),F(e),!1}),!0},sync:v&&function(n){var t=i.project;if(t){function o(){n.disabled=!0}function e(){n.disabled=!1}function a(){e(),C(n).removeClass("loco-loading")}D.on("poUnsaved",function(){o()}).on("poSave",function(){e()}),l={bundle:t.bundle,domain:t.domain,type:s?"pot":"po",sync:u||"",strip:"pot"===String(i.syncmode).toLowerCase()?"1":""},C(n).click(function(t){return t.preventDefault(),o(),C(n).addClass("loco-loading"),M(a),!1}),e()}return!0},revert:function(t){return D.on("poUnsaved",function(){t.disabled=!1}).on("poSave",function(){t.disabled=!0}),C(t).click(function(t){return t.preventDefault(),location.reload(),!1}),!0},invs:function(t){var o=C(t);return t.disabled=!1,D.on("poInvs",function(t,n){o[n?"addClass":"removeClass"]("inverted")}),o.click(function(t){return t.preventDefault(),D.setInvs(!D.getInvs()),!1}),_.tooltip.init(o),!0},code:function(t){var o=C(t);return t.disabled=!1,o.click(function(t){t.preventDefault();var n=!D.getMono();return o[n?"addClass":"removeClass"]("inverted"),D.setMono(n),!1}),_.tooltip.init(o),!0},source:O,binary:s?null:O};s?(k.add=v&&function(t){return t.disabled=!1,C(t).click(function(t){t.preventDefault();var n,o=1,e=/(\d+)$/;for(n="New message";m.get(n);)o=e.exec(n)?Math.max(o,RegExp.$1):o,n="New message "+ ++o;return D.add(n),!1}),!0},k.del=v&&function(t){return t.disabled=!1,C(t).click(function(t){return t.preventDefault(),D.del(),!1}),!0}):k.auto=function(t){function n(){t.disabled=!1}return D.on("poUnsaved",function(){t.disabled=!0}).on("poSave poAuto",function(){n()}),C(t).click(L),n(),!0},C("#loco-toolbar").find("button").each(function(t,n){var o=n.getAttribute("data-loco"),e=k[o];e&&e(n,o)||C(n).addClass("loco-noop")}),C(e).submit(P),function(n){function e(t){C(n.parentNode)[t||null==t?"removeClass":"addClass"]("invalid")}D.searchable(_.fulltext.init()),n.disabled=!1,n.value="";var a=_.watchtext(n,function(t){e(D.filter(t,!0))});D.on("poFilter",function(t,n,o){a.val(n||""),e(o)}).on("poMerge",function(t,n){var o=a.val();o&&D.filter(o)})}(document.getElementById("loco-search")),D.on("poUnsaved",function(){S.onbeforeunload=N}).on("poSave",function(){A(),S.onbeforeunload=null}).on("poHint",U).on("poUpdate",A).on("poMeta",function(t,n){var o,e,a=(e="CODE",(o=n).tagName===e?o:o.getElementsByTagName(e)[0]);return!a||!r||(r.load(a.textContent),t.preventDefault(),!1)}),m.load(i.podata),D.load(m),(I=D.targetLocale)?I.isRTL()&&C(p).addClass("trg-rtl"):D.unlock(),A(),delete _.conf,i=k=null}function M(d){_.ajax.post("sync",l,function(t){var n=[],o=m,e=t.po,a=t.pot,i=_.po.init().load(e),r=o.merge(i),l=r.add.length,s=r.del.length,c=r.fuz.length,u=T;D.load(o),l||s||c?(a?n.push(b(u._("Merged from %s"),a)):n.push(u._("Merged from source code")),l&&n.push(b(u._n("1 new string added","%s new strings added",l),l)),s&&n.push(b(u._n("1 obsolete string removed","%s obsolete strings removed",s),s)),c&&n.push(b(u._n("1 string marked Fuzzy","%s strings marked Fuzzy",c),c)),C(p).trigger("poUnsaved",[]),A(),f&&S.console&&function(t,n){function o(t){var n=t.source(),o=t.context();return o?"["+o+"] "+n:n}var e=-1,a=n.add.length;for(;++e<a;)t.log(" + "+o(n.add[e]));for(a=n.del.length,e=0;e<a;e++)t.log(" - "+o(n.del[e]));for(a=n.fuz.length,e=0;e<a;e++)t.log(" ~ "+o(n.fuz[e]))}(console,r)):a?n.push(b(u._("Strings up to date with %s"),a)):n.push(u._("Strings up to date with source code")),_.notices.success(n.join(". ")),C(p).trigger("poMerge",[t]),d&&d()},d)}function E(){return t=t||function(){for(var t,n=-1,o=[],e=h,a=e.length;++n<a;)try{t=e[n],o.push(_.apis.create(t))}catch(t){_.notices.error(String(t))}return o}()}function U(){h.length?function(){var p=T,t=D.current(),n=D.getTargetOffset(),o=t&&t.source(null,n),f='lang="'+String(I)+'" dir="'+(I.isRTL()?"RTL":"LTR")+'"',g=99;if(!o)return;function e(t){return!t.isDefaultPrevented()&&(!(0<=(n=t.which-49)&&n<10&&(o=h&&h.find("button.button-primary").eq(n))&&1===o.length)||(t.preventDefault(),t.stopPropagation(),o.click(),!1));var n,o}function a(t,n,o,e){var a=e.getId(),i=x[a],r=String(i+1),l=e.getUrl(),s=p._("Use this translation"),c=String(e),u=y&&y[a],d=C('<button class="button button-primary"></button>').attr("tabindex",String(1+g+i)).on("click",function(e,a){return function(t){t.preventDefault(),t.stopPropagation(),v();var n=D.current(),o=D.getTargetOffset();n&&n.source(null,o)===e?(n.translate(a,o),D.focus().reloadMessage(n)):_.notices.warn("Source changed since suggestion")}}(t,n));d.attr("accesskey",r),1<b.length&&(s+=" ("+r+")"),d.text(s),u&&u.replaceWith(C('<div class="loco-api loco-api-'+a+'"></div>').append(C('<a class="loco-api-credit" target="_blank" tabindex="-1"></a>').attr("href",l).text(c)).append(C("<blockquote "+f+"></blockquote>").text(n||"FAILED")).append(d)),h.dialog("option","position",{my:"center",at:"center",of:S}),++w===m&&(h&&h.dialog("option","title",p._("Suggested translations")+" — "+o.label),g+=w),0===i&&d.focus()}function v(t){h&&null==t&&h.dialog("close"),y=h=null,C(S).off("keydown",e)}function i(e){return function(t,n,o){a(t,u[e.getId()]=n,o,e)}}var h=(z=z||C('<div id="loco-hint"></div>').dialog({dialogClass:"loco-modal",modal:!0,autoOpen:!1,closeOnEscape:!0,resizable:!1,minHeight:400})).html("").append(C('<div class="loco-api"><p>Source text:</p></div>').append(C('<blockquote lang="en"></blockquote>').text(o))).dialog("option","title",p._("Loading suggestions")+"...").off("dialogclose").on("dialogclose",v).dialog("open"),r=t.translation(n);r&&C('<div class="loco-api"><p>Current translation:</p></div>').append(C("<blockquote "+f+"></blockquote>").text(r)).append(C('<button class="button"></button>').attr("tabindex",String(++g)).text(p._("Keep this translation")).on("click",function(t){t.preventDefault(),v()})).appendTo(h);var l,s,b=E(),m=b.length,c=-1,u=j[o]||(j[o]={}),y={},w=0,x={};for(;++c<m;)l=b[c],h.append((d=l,void 0,k=C('<div class="loco-api loco-api-loading"></div>').text("Calling "+d+" ..."),y[d.getId()]=k)),s=l.getId(),x[s]=c,u[s]?a(o,u[s],I,l):l.translate(o,I,i(l));var d,k;C(S).on("keydown",e)}():B()}function L(t){return t.preventDefault(),h.length?function(){var e,a,i,r=0,l=T,n=!1,s=q().dialog("open"),t=s.find("form"),c=t.find("button.button-primary"),o=C("#loco-job-progress");function u(){c[0].disabled=!0}function d(){c.removeClass("loco-loading")}function p(t){o.text(t)}function f(t){var n=function(t){for(var n,o=E(),e=o.length,a=-1;++a<e;)if((n=o[a]).getId()===t)return n;_.notices.error("No "+t+" client")}(C(t.api).val()),o=t.existing.checked;p("Calculating...."),(e=n.createJob()).init(m,o),a=n.toString(),p(b(l._("%s unique source strings."),e.length.format(0))+" "+b(l._("%s characters will be sent for translation."),e.chars.format(0))),e.length?c[0].disabled=!1:u(),i=null}function g(t){e&&(n&&t.fuzzy(0,!0),D.pasteMessage(t),t===D.active&&D.setStatus(t),D.unsave(t,0),r++)}function v(t,n){var o=n?100*t/n:0;p(b(l._("Translation progress %s%%"),o.format(0)))}function h(){if(d(),e&&i){var t=i.todo();t&&_.notices.warn(b(l._n("Translation job aborted with one string remaining","Translation job aborted with %s strings remaining",t),t.format(0))).slow();var n=[],o=i.did();o&&n.push(b(l._n("%s string translated via %s","%s strings translated via %s",o),o.format(0),a)),r?n.push(b(l._n("%s string updated","%s strings updated",r),r.format(0))):n.push(l._("Nothing needed updating")),_.notices.success(n.join(". ")).slow(),i=e=null}r&&(A(),D.rebuildSearch()),s&&(s.off("dialogclose").dialog("close"),s=null),D.fire("poAuto")}d(),u(),_.notices.clear(),t.off("submit change"),f(t[0]),t.on("change",function(t){var n=t.target,o=n.name;return"api"!==o&&"existing"!==o||f(n.form),!0}).on("submit",function(t){t.preventDefault(),c.addClass("loco-loading"),u(),v(r=0),n=t.target.fuzzy.checked,i=e.dispatch().done(h).each(g).prog(v).stat()}),s.off("dialogclose").on("dialogclose",function(){e.abort(),s=null,h()})}():B(),!1}function q(){return n||(n=C("#loco-auto")).dialog({dialogClass:"loco-modal",appendTo:"#loco-admin.wrap",title:n.attr("title"),modal:!0,closeOnEscape:!0,resizable:!1,position:{my:"top",at:"top",of:"#loco-content"}}),n}function B(){q().dialog("open")}function F(n){var t=C.extend({locale:String(m.locale()||"")},a||{});g&&g.applyCreds(t),o?(t=function(t){var n,o=new FormData;for(n in t)t.hasOwnProperty(n)&&o.append(n,t[n]);return o}(t)).append("po",new Blob([String(m)],{type:"application/x-gettext"}),String(t.path).split("/").pop()||"untitled.po"):t.data=String(m),_.ajax.post("save",t,function(t){n&&n(),D.save(!0),C("#loco-po-modified").text(t.datetime||"[datetime error]")},n)}function N(){return T._("Your changes will be lost if you continue without saving")}function O(e,a){return e.disabled=!1,C(e).click(function(t){var n=e.form,o=c;return"binary"===a&&(o=o.replace(/\.po$/,".mo")),n.path.value=o,n.source.value=m.toString(),!0}),!0}function P(t){return t.preventDefault(),!1}function A(){var t=T,n=D.stats(),o=n.t,e=n.f,a=n.u,i=b(t._n("1 string","%s strings",o),o.format(0)),r=[];I&&(i=b(t._("%s%% translated"),n.p.replace("%",""))+", "+i,e&&r.push(b(t._("%s fuzzy"),e.format(0))),a&&r.push(b(t._("%s untranslated"),a.format(0))),r.length&&(i+=" ("+r.join(", ")+")")),C("#loco-po-status").text(i)}}(window,window.jQuery);
|
1 |
+
!function(S,C){var _=S.loco,i=_&&_.conf,p=document.getElementById("loco-editor-inner");if(_&&i&&p){var D,r,t,z,h,l,f=!!i.WP_DEBUG,s=_.po.ref&&_.po.ref.init(_,i),c=null,a=null,o=i.multipart,T=_.l10n,b=_.string.sprintf,I=i.locale,y=_.po.init(I).wrap(i.powrap),u=!I,n=document.getElementById("loco-actions"),d=i.popath,g=i.potpath,e=document.getElementById("loco-fs"),v=e&&_.fs.init(e),m=i.readonly,w=!m,j={},x=0,k={my:"top",at:"top",of:"#loco-content"};!o||S.FormData&&S.Blob||(o=!1,_.notices.warn("Your browser doesn't support Ajax file uploads. Falling back to standard postdata")),s||_.notices.warn("admin.js is out of date. Please empty your browser cache and reload the page.");var M,L,E=(L=parseInt(C(p).css("min-height")||0),function(){var t=function(t,n){for(var o=t.offsetTop||0;(t=t.offsetParent)&&t!==n;)o+=t.offsetTop||0;return o}(p,document.body),n=S.innerHeight,o=Math.max(L,n-t-20);M!==o&&(p.style.height=String(o)+"px",M=o)});E(),C(S).resize(E),p.innerHTML="",D=_.po.ed.init(p).localise(T),_.po.kbd.init(D).add("save",w?function(){D.dirty&&R()}:W).add("hint",I&&w&&A||W).enable("copy","clear","enter","next","prev","fuzzy","save","invis","hint");var U={save:w&&function(n){function o(){n.disabled=!0}function t(){n.disabled=!1}function e(){t(),C(n).removeClass("loco-loading")}return n,D.on("poUnsaved",function(){t(),C(n).addClass("button-primary")}).on("poSave",function(){o(),C(n).removeClass("button-primary")}),a=C.extend({path:d},i.project||{}),C(n).click(function(t){return t.preventDefault(),o(),C(n).addClass("loco-loading"),R(e),!1}),!0},sync:w&&function(n){var t=i.project;if(t){function o(){n.disabled=!0}function e(){n.disabled=!1}function a(){e(),C(n).removeClass("loco-loading")}D.on("poUnsaved",function(){o()}).on("poSave",function(){e()}),c={bundle:t.bundle,domain:t.domain,type:u?"pot":"po",sync:g||"",strip:"pot"===String(i.syncmode).toLowerCase()?"1":""},C(n).click(function(t){return t.preventDefault(),o(),C(n).addClass("loco-loading"),P(a),!1}),e()}return!0},revert:function(t){return D.on("poUnsaved",function(){t.disabled=!1}).on("poSave",function(){t.disabled=!0}),C(t).click(function(t){return t.preventDefault(),location.reload(),!1}),!0},invs:function(t){var o=C(t);return t.disabled=!1,D.on("poInvs",function(t,n){o[n?"addClass":"removeClass"]("inverted")}),o.click(function(t){return t.preventDefault(),D.setInvs(!D.getInvs()),!1}),_.tooltip.init(o),!0},code:function(t){var o=C(t);return t.disabled=!1,o.click(function(t){t.preventDefault();var n=!D.getMono();return o[n?"addClass":"removeClass"]("inverted"),D.setMono(n),!1}),_.tooltip.init(o),!0},source:$,binary:u?null:$};u?(U.add=w&&function(t){return t.disabled=!1,C(t).click(function(t){t.preventDefault();var n,o=1,e=/(\d+)$/;for(n="New message";y.get(n);)o=e.exec(n)?Math.max(o,RegExp.$1):o,n="New message "+ ++o;return D.add(n),!1}),!0},U.del=w&&function(t){return t.disabled=!1,C(t).click(function(t){return t.preventDefault(),D.del(),!1}),!0}):U.auto=function(t){function n(){t.disabled=!1}return D.on("poUnsaved",function(){t.disabled=!0}).on("poSave poAuto",function(){n()}),C(t).click(F),n(),!0},C("#loco-editor > nav .button").each(function(t,n){var o=n.getAttribute("data-loco"),e=U[o];e&&e(n,o)||C(n).addClass("loco-noop")}),C(n).submit(W),function(n){function e(t){C(n.parentNode)[t||null==t?"removeClass":"addClass"]("invalid")}D.searchable(_.fulltext.init()),n.disabled=!1,n.value="";var a=_.watchtext(n,function(t){e(D.filter(t,!0))});D.on("poFilter",function(t,n,o){a.val(n||""),e(o)}).on("poMerge",function(t,n){var o=a.val();o&&D.filter(o)})}(document.getElementById("loco-search")),D.on("poUnsaved",function(){S.onbeforeunload=H}).on("poSave",function(){Y(),S.onbeforeunload=null}).on("poHint",A).on("poUpdate",Y).on("poMeta",function(t,n){var o,e,a=(e="CODE",(o=n).tagName===e?o:o.getElementsByTagName(e)[0]);return!a||!s||(s.load(a.textContent),t.preventDefault(),!1)}),y.load(i.podata),D.load(y),(I=D.targetLocale)?I.isRTL()&&C(p).addClass("trg-rtl"):D.unlock(),Y(),delete _.conf,i=U=null}function P(d){_.ajax.post("sync",c,function(t){var n=[],o=y,e=t.po,a=t.pot,i=_.po.init().load(e),r=o.merge(i),l=r.add.length,s=r.del.length,c=r.fuz.length,u=T;D.load(o),l||s||c?(a?n.push(b(u._("Merged from %s"),a)):n.push(u._("Merged from source code")),l&&n.push(b(u._n("1 new string added","%s new strings added",l),l)),s&&n.push(b(u._n("1 obsolete string removed","%s obsolete strings removed",s),s)),c&&n.push(b(u._n("1 string marked Fuzzy","%s strings marked Fuzzy",c),c)),C(p).trigger("poUnsaved",[]),Y(),f&&S.console&&function(t,n){function o(t){var n=t.source(),o=t.context();return o?"["+o+"] "+n:n}var e=-1,a=n.add.length;for(;++e<a;)t.log(" + "+o(n.add[e]));for(a=n.del.length,e=0;e<a;e++)t.log(" - "+o(n.del[e]));for(a=n.fuz.length,e=0;e<a;e++)t.log(" ~ "+o(n.fuz[e]))}(console,r)):a?n.push(b(u._("Strings up to date with %s"),a)):n.push(u._("Strings up to date with source code")),_.notices.success(n.join(". ")),C(p).trigger("poMerge",[t]),d&&d()},d)}function q(){return t=t||function(){for(var t,n=-1,o=[],e=r,a=e.length;++n<a;)try{t=e[n],o.push(_.apis.create(t))}catch(t){_.notices.error(String(t))}return o}()}function B(e){var a;function i(){return(new Date).getTime()}u||m?_.notices.error("Logic error. APIs not available in current mode"):null==r||0===r.length||10<Math.round((i()-x)/1e3)?(l&&l.remove(),l=null,h&&h.remove(),h=null,z&&z.remove(),r=z=null,a=C('<div><div class="loco-loading"></div></div>').dialog({dialogClass:"loco-modal loco-modal-no-close",appendTo:"#loco-admin.wrap",title:"Loading..",modal:!0,autoOpen:!0,closeOnEscape:!1,resizable:!1,draggable:!1,position:k,height:200}),_.ajax.get("apis",{locale:String(I)},function(t,n,o){x=i(),0===(r=t&&t.apis||[]).length?l=O("loco-apis-empty",t.html):h=O("loco-apis-batch",t.html),a.remove(),e(r)})):(x=i(),e(r))}function O(t,n){var o=C(n);return o.attr("id",t),o.dialog({dialogClass:"loco-modal",appendTo:"#loco-admin.wrap",title:o.attr("title"),modal:!0,autoOpen:!1,closeOnEscape:!0,resizable:!1,draggable:!1,position:k}),o}function A(){B(function(t){t.length?function(){var p=T,t=D.current(),n=D.getTargetOffset(),o=t&&t.source(null,n),f='lang="'+String(I)+'" dir="'+(I.isRTL()?"RTL":"LTR")+'"',g=99;if(!o)return;function e(t){return!t.isDefaultPrevented()&&(!(0<=(n=t.which-49)&&n<10&&(o=m&&m.find("button.button-primary").eq(n))&&1===o.length)||(t.preventDefault(),t.stopPropagation(),o.click(),!1));var n,o}function a(t,n,o,e){var a=e.getId(),i=x[a],r=String(i+1),l=e.getUrl(),s=p._("Use this translation"),c=String(e),u=y&&y[a],d=C('<button class="button button-primary"></button>').attr("tabindex",String(1+g+i)).on("click",function(e,a){return function(t){t.preventDefault(),t.stopPropagation(),v();var n=D.current(),o=D.getTargetOffset();n&&n.source(null,o)===e?(n.translate(a,o),D.focus().reloadMessage(n)):_.notices.warn("Source changed since suggestion")}}(t,n));d.attr("accesskey",r),1<h.length&&(s+=" ("+r+")"),d.text(s),u&&u.replaceWith(C('<div class="loco-api loco-api-'+a+'"></div>').append(C('<a class="loco-api-credit" target="_blank" tabindex="-1"></a>').attr("href",l).text(c)).append(C("<blockquote "+f+"></blockquote>").text(n||"FAILED")).append(d)),++w===b&&(m&&m.dialog("option","title",p._("Suggested translations")+" — "+o.label),g+=w),0===i&&d.focus()}function v(t){m&&null==t&&m.dialog("close"),y=m=null,C(S).off("keydown",e)}function i(e){return function(t,n,o){a(t,u[e.getId()]=n,o,e)}}var m=(z=z||O("loco-apis-hint","<div></div>")).html("").append(C('<div class="loco-api"><p>Source text:</p></div>').append(C('<blockquote lang="en"></blockquote>').text(o))).dialog("option","title",p._("Loading suggestions")+"...").off("dialogclose").on("dialogclose",v).dialog("open"),r=t.translation(n);r&&C('<div class="loco-api"><p>Current translation:</p></div>').append(C("<blockquote "+f+"></blockquote>").text(r)).append(C('<button class="button"></button>').attr("tabindex",String(++g)).text(p._("Keep this translation")).on("click",function(t){t.preventDefault(),v()})).appendTo(m);var l,s,h=q(),b=h.length,c=-1,u=j[o]||(j[o]={}),y={},w=0,x={};for(;++c<b;)l=h[c],m.append((d=l,void 0,k=C('<div class="loco-api loco-api-loading"></div>').text("Calling "+d+" ..."),y[d.getId()]=k)),s=l.getId(),x[s]=c,u[s]?a(o,u[s],I,l):l.translate(o,I,i(l));var d,k;C(S).on("keydown",e)}():N()})}function F(t){return t.preventDefault(),B(function(t){t.length?function(){var e,a,i,r=0,l=T,n=!1,s=h.dialog("open"),t=s.find("form"),c=t.find("button.button-primary"),o=C("#loco-job-progress");function u(){c[0].disabled=!0}function d(){c.removeClass("loco-loading")}function p(t){o.text(t)}function f(t){var n=function(t){for(var n,o=q(),e=o.length,a=-1;++a<e;)if((n=o[a]).getId()===t)return n;_.notices.error("No "+t+" client")}(C(t.api).val()),o=t.existing.checked;p("Calculating...."),(e=n.createJob()).init(y,o),a=n.toString(),p(b(l._("%s unique source strings."),e.length.format(0))+" "+b(l._("%s characters will be sent for translation."),e.chars.format(0))),e.length?c[0].disabled=!1:u(),i=null}function g(t){e&&(n&&t.fuzzy(0,!0),D.pasteMessage(t),t===D.active&&D.setStatus(t),D.unsave(t,0),r++)}function v(t,n){var o=n?100*t/n:0;p(b(l._("Translation progress %s%%"),o.format(0)))}function m(){if(d(),e&&i){var t=i.todo();t&&_.notices.warn(b(l._n("Translation job aborted with one string remaining","Translation job aborted with %s strings remaining",t),t.format(0))).slow();var n=[],o=i.did();o&&n.push(b(l._n("%s string translated via %s","%s strings translated via %s",o),o.format(0),a)),r?n.push(b(l._n("%s string updated","%s strings updated",r),r.format(0))):n.push(l._("Nothing needed updating")),_.notices.success(n.join(". ")).slow(),i=e=null}r&&(Y(),D.rebuildSearch()),s&&(s.off("dialogclose").dialog("close"),s=null),D.fire("poAuto")}d(),u(),_.notices.clear(),t.off("submit change"),f(t[0]),t.on("change",function(t){var n=t.target,o=n.name;return"api"!==o&&"existing"!==o||f(n.form),!0}).on("submit",function(t){t.preventDefault(),c.addClass("loco-loading"),u(),v(r=0),n=t.target.fuzzy.checked,i=e.dispatch().done(m).each(g).prog(v).stat()}),s.off("dialogclose").on("dialogclose",function(){e.abort(),s=null,m()})}():N()}),!1}function N(){l?l.dialog("open"):_.notices.error("Logic error. Unconfigured API modal missing")}function R(n){var t=C.extend({locale:String(y.locale()||"")},a||{});v&&v.applyCreds(t),o?(t=function(t){var n,o=new FormData;for(n in t)t.hasOwnProperty(n)&&o.append(n,t[n]);return o}(t)).append("po",new Blob([String(y)],{type:"application/x-gettext"}),String(t.path).split("/").pop()||"untitled.po"):t.data=String(y),_.ajax.post("save",t,function(t){n&&n(),D.save(!0),C("#loco-po-modified").text(t.datetime||"[datetime error]")},n)}function H(){return T._("Your changes will be lost if you continue without saving")}function $(e,a){return e.disabled=!1,C(e).click(function(t){var n=e.form,o=d;return"binary"===a&&(o=o.replace(/\.po$/,".mo")),n.path.value=o,n.source.value=y.toString(),!0}),!0}function W(t){return t.preventDefault(),!1}function Y(){var t=T,n=D.stats(),o=n.t,e=n.f,a=n.u,i=b(t._n("1 string","%s strings",o),o.format(0)),r=[];I&&(i=b(t._("%s%% translated"),n.p.replace("%",""))+", "+i,e&&r.push(b(t._("%s fuzzy"),e.format(0))),a&&r.push(b(t._("%s untranslated"),a.format(0))),r.length&&(i+=" ("+r.join(", ")+")")),C("#loco-po-status").text(i)}}(window,window.jQuery);
|
pub/js/min/move.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t,e,o){var c,u
|
1 |
+
!function(t,e,o){var c,i,u=e.getElementById("loco-fs"),a=e.getElementById("loco-main"),d=a.path.value;function l(n){o(a).find("button.button-primary").each(function(t,e){e.disabled=n})}u&&a&&(c=t.loco.fs.init(u).setForm(a).listen(function(t){l(!(t&&i))}),o(a).change(function(t){var e,n=t.target||{};"dest"!==n.name||!n.checked&&"text"!==n.type||(e=n.value)&&e!==i&&(i=e,l(!0),d!==e&&(u.dest.value=e,c.connect()))}).submit(function(t){return!!i||(t.preventDefault(),!1)}))}(window,document,window.jQuery);
|
pub/js/min/poinit.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t,n,c){var i,e,a,l,o,r,u,s=t.loco,f=n.getElementById("loco-fs"),d=n.getElementById("loco-poinit"),v=f&&s.fs.init(f),g=(a=(e=d)["select-locale"],l=e["custom-locale"],o=e["use-selector"],r=c(a).focus(p).closest("fieldset").click(p)[0],u=c(l).focus(x).closest("fieldset").click(x)[0],c(o).change(m),m(),s.watchtext(l,function(t){c(l.form).triggerHandler("change")}),{val:function(){var t=b();return t?s.locale.parse(t):s.locale.clone({lang:"zxx"})}});function h(){return o[0].checked}function p(){y(o[0].checked=!0)}function x(){l.value||(l.value=b()),y(!(o[1].checked=!0))}function b(){var t=c(h()?a:l).serializeArray();return t[0]&&t[0].value||""}function m(){return y(h()),!0}function y(t){l.disabled=t,a.disabled=!t,u.className=t?"disabled":"active",r.className=t?"active":"disabled",I()}var z,A=(z=d["select-path"],{val:function(){var t=k("path");return t&&t.value},txt:function(){var t=k("path");return t&&c(t.parentNode).find("code.path").text()}});function k(t){var n=function(){var t=c(z).serializeArray()[0];return t&&t.value||null}();return n&&d[t+"["+n+"]"]}function w(e){c(d).find("button.button-primary").each(function(t,n){n.disabled=e})}function I(){var t=g&&g.val(),n=t&&t.isValid()&&"zxx"!==t.lang,e=A&&A.val(),a=n&&e;if(j(t),w(!0),a){var c=A.txt();c!==i?(i=c,f.path.value=i,v.listen(N).connect()):w(!1)}}function N(t){w(!t)}function j(e){var t=c(d),n=e&&e.toString("_")||"",a=n?"zxx"===n?"
|
1 |
+
!function(t,n,c){var i,e,a,l,o,r,u,s=t.loco,f=n.getElementById("loco-fs"),d=n.getElementById("loco-poinit"),v=f&&s.fs.init(f),g=(a=(e=d)["select-locale"],l=e["custom-locale"],o=e["use-selector"],r=c(a).focus(p).closest("fieldset").click(p)[0],u=c(l).focus(x).closest("fieldset").click(x)[0],c(o).change(m),m(),s.watchtext(l,function(t){c(l.form).triggerHandler("change")}),{val:function(){var t=b();return t?s.locale.parse(t):s.locale.clone({lang:"zxx"})}});function h(){return o[0].checked}function p(){y(o[0].checked=!0)}function x(){l.value||(l.value=b()),y(!(o[1].checked=!0))}function b(){var t=c(h()?a:l).serializeArray();return t[0]&&t[0].value||""}function m(){return y(h()),!0}function y(t){l.disabled=t,a.disabled=!t,u.className=t?"disabled":"active",r.className=t?"active":"disabled",I()}var z,A=(z=d["select-path"],{val:function(){var t=k("path");return t&&t.value},txt:function(){var t=k("path");return t&&c(t.parentNode).find("code.path").text()}});function k(t){var n=function(){var t=c(z).serializeArray()[0];return t&&t.value||null}();return n&&d[t+"["+n+"]"]}function w(e){c(d).find("button.button-primary").each(function(t,n){n.disabled=e})}function I(){var t=g&&g.val(),n=t&&t.isValid()&&"zxx"!==t.lang,e=A&&A.val(),a=n&&e;if(j(t),w(!0),a){var c=A.txt();c!==i?(i=c,f.path.value=i,v.listen(N).connect()):w(!1)}}function N(t){w(!t)}function j(e){var t=c(d),n=e&&e.toString("_")||"",a=n?"zxx"===n?"{locale}":n:"{invalid}";t.find("code.path span").each(function(t,n){n.textContent=a}),t.find("span.lang").each(function(t,n){!function(t,n){n&&"zxx"!==n.lang?(t.setAttribute("lang",n.lang),t.setAttribute("class",n.getIcon())):(t.setAttribute("lang",""),t.setAttribute("class","lang nolang"))}(n,e)})}function B(t){var n=t&&t.redirect;n&&location.assign(n)}c(d).change(I).submit(function(t){return t.preventDefault(),v.applyCreds(d),s.ajax.submit(t.target,B),!1}),j(g.val())}(window,document,jQuery);
|
pub/js/min/upload.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(o,n,t){var e,i,r,a=o.loco,u=(a&&a.conf||{}).multipart&&o.FormData&&o.Blob,c=n.getElementById("loco-fs"),f=n.getElementById("loco-main");function l(e){var n=t(f).find("button.button-primary");return n.each(function(n,t){t.disabled=e}),n}function d(){l(!0).addClass("loco-loading")}function s(n){l(n).removeClass("loco-loading")}function m(){f.path.value=i+"/"+r,d(),e.connect()}function v(){return i&&r&&e.authed()}function p(n,t,e){n.redirect?(s(!0),o.location.assign(n.redirect)):s(!1)}function g(){s(!1)}c&&f&&(e=o.loco.fs.init(c).setForm(f).listen(function(n){s(!(n&&i&&r))}),t(f).change(function(n){r=String(f.f.value).split(/[\\\/]/).pop();var t,e=n.target||{};if("dir"===e.name&&e.checked){if((t=e.value)&&t!==i&&(i=t,r))return void m()}else if("f"===e.name&&i)return void m();l(!v())}).submit(function(n){if(v()){if(u){n.preventDefault();var t=new FormData(f);return d(),a.ajax.post("upload",t,p,g),!1}return!0}return n.preventDefault(),!1}))}(window,document,window.jQuery);
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: timwhitlock
|
|
3 |
Tags: translation, translators, localization, localisation, l10n, i18n, Gettext, PO, MO, productivity, multilingual, internationalization
|
4 |
Requires at least: 4.1
|
5 |
Requires PHP: 5.2.4
|
6 |
-
Tested up to: 5.5
|
7 |
-
Stable tag: 2.4.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -100,6 +100,16 @@ We don't collect your data or snoop on you. See the [plugin privacy notice](http
|
|
100 |
|
101 |
== Changelog ==
|
102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
= 2.4.3 =
|
104 |
* Improved fix for default syncing of msgstr fields
|
105 |
* Reverted accidental removal of js debug flag
|
@@ -367,7 +377,7 @@ We don't collect your data or snoop on you. See the [plugin privacy notice](http
|
|
367 |
|
368 |
== Upgrade Notice ==
|
369 |
|
370 |
-
= 2.4.
|
371 |
* Various improvements and bugfixes
|
372 |
|
373 |
|
3 |
Tags: translation, translators, localization, localisation, l10n, i18n, Gettext, PO, MO, productivity, multilingual, internationalization
|
4 |
Requires at least: 4.1
|
5 |
Requires PHP: 5.2.4
|
6 |
+
Tested up to: 5.5.1
|
7 |
+
Stable tag: 2.4.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
100 |
|
101 |
== Changelog ==
|
102 |
|
103 |
+
= 2.4.4 =
|
104 |
+
* Added PO file upload feature
|
105 |
+
* Added download button to file info page
|
106 |
+
* Fix for extracting plurals also used as singulars
|
107 |
+
* Updating API keys no longer require editor page reload
|
108 |
+
* Catching fatal startup errors in loco.php
|
109 |
+
* Supporting max_php_size=0 to mean no size restriction
|
110 |
+
* Auto-update detection now checks new site options
|
111 |
+
* Bumped WordPress version to 5.5.1
|
112 |
+
|
113 |
= 2.4.3 =
|
114 |
* Improved fix for default syncing of msgstr fields
|
115 |
* Reverted accidental removal of js debug flag
|
377 |
|
378 |
== Upgrade Notice ==
|
379 |
|
380 |
+
= 2.4.4 =
|
381 |
* Various improvements and bugfixes
|
382 |
|
383 |
|
src/admin/bundle/ViewController.php
CHANGED
@@ -96,6 +96,13 @@ class Loco_admin_bundle_ViewController extends Loco_admin_bundle_BaseController
|
|
96 |
'name' => __('New language','loco-translate'),
|
97 |
'icon' => 'add',
|
98 |
) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
|
100 |
$pot = $project->getPot();
|
101 |
|
96 |
'name' => __('New language','loco-translate'),
|
97 |
'icon' => 'add',
|
98 |
) );
|
99 |
+
|
100 |
+
// offer PO file upload
|
101 |
+
$p['nav'][] = new Loco_mvc_ViewParams( array(
|
102 |
+
'href' => $this->getProjectLink('upload', $project ),
|
103 |
+
'name' => __('Upload PO','loco-translate'),
|
104 |
+
'icon' => 'upload',
|
105 |
+
) );
|
106 |
|
107 |
$pot = $project->getPot();
|
108 |
|
src/admin/config/DebugController.php
CHANGED
@@ -73,13 +73,14 @@ class Loco_admin_config_DebugController extends Loco_admin_config_BaseController
|
|
73 |
}
|
74 |
|
75 |
// utf8 / encoding:
|
|
|
76 |
$encoding = new Loco_mvc_ViewParams( array (
|
77 |
'OK' => "\xCE\x9F\xCE\x9A",
|
78 |
'tick' => "\xE2\x9C\x93",
|
79 |
'json' => json_decode('"\\u039f\\u039a \\u2713"'),
|
|
|
80 |
'mbstring' => loco_check_extension('mbstring') ? "\xCE\x9F\xCE\x9A \xE2\x9C\x93" : 'No',
|
81 |
) );
|
82 |
-
|
83 |
// Sanity check mbstring.func_overload
|
84 |
if( 2 !== strlen("\xC2\xA3") ){
|
85 |
$encoding->mbstring = 'Error, disable mbstring.func_overload';
|
73 |
}
|
74 |
|
75 |
// utf8 / encoding:
|
76 |
+
$cs = get_option('blog_charset');
|
77 |
$encoding = new Loco_mvc_ViewParams( array (
|
78 |
'OK' => "\xCE\x9F\xCE\x9A",
|
79 |
'tick' => "\xE2\x9C\x93",
|
80 |
'json' => json_decode('"\\u039f\\u039a \\u2713"'),
|
81 |
+
'charset' => $cs.' '.( preg_match('/^utf-?8$/i',$cs) ? "\xE2\x9C\x93" : '(not recommended)' ),
|
82 |
'mbstring' => loco_check_extension('mbstring') ? "\xCE\x9F\xCE\x9A \xE2\x9C\x93" : 'No',
|
83 |
) );
|
|
|
84 |
// Sanity check mbstring.func_overload
|
85 |
if( 2 !== strlen("\xC2\xA3") ){
|
86 |
$encoding->mbstring = 'Error, disable mbstring.func_overload';
|
src/admin/file/BaseController.php
CHANGED
@@ -36,8 +36,6 @@ abstract class Loco_admin_file_BaseController extends Loco_admin_bundle_BaseCont
|
|
36 |
// security validations
|
37 |
try {
|
38 |
Loco_gettext_Data::ext( $file );
|
39 |
-
// TODO also need to block access to files outside content directory
|
40 |
-
// this is more difficult as can symlink into and out of the tree.
|
41 |
}
|
42 |
catch( Exception $e ){
|
43 |
return $this->view( 'admin/errors/file-sec', array( 'reason' => $e->getMessage() ) );
|
36 |
// security validations
|
37 |
try {
|
38 |
Loco_gettext_Data::ext( $file );
|
|
|
|
|
39 |
}
|
40 |
catch( Exception $e ){
|
41 |
return $this->view( 'admin/errors/file-sec', array( 'reason' => $e->getMessage() ) );
|
src/admin/file/EditController.php
CHANGED
@@ -42,40 +42,6 @@ class Loco_admin_file_EditController extends Loco_admin_file_BaseController {
|
|
42 |
}
|
43 |
|
44 |
|
45 |
-
/**
|
46 |
-
* @param bool whether po files is in read-only mode
|
47 |
-
* @return array[]|null
|
48 |
-
*/
|
49 |
-
private function getApiProviders( $readonly ){
|
50 |
-
if( $readonly ){
|
51 |
-
return null;
|
52 |
-
}
|
53 |
-
$apis = array_filter( Loco_api_Providers::export(), array(__CLASS__,'filterApiProvider') );
|
54 |
-
usort($apis,array(__CLASS__,'sortApiProviders') );
|
55 |
-
return $apis;
|
56 |
-
}
|
57 |
-
|
58 |
-
|
59 |
-
/**
|
60 |
-
* @internal
|
61 |
-
* @param string[]
|
62 |
-
* @return bool
|
63 |
-
*/
|
64 |
-
private static function filterApiProvider( array $api ){
|
65 |
-
return (bool) $api['key'];
|
66 |
-
}
|
67 |
-
|
68 |
-
/**
|
69 |
-
* @internal
|
70 |
-
* @param string[]
|
71 |
-
* @param string[]
|
72 |
-
* @return bool
|
73 |
-
*/
|
74 |
-
private static function sortApiProviders( array $a, array $b ){
|
75 |
-
return strcasecmp($a['name'],$b['name']);
|
76 |
-
}
|
77 |
-
|
78 |
-
|
79 |
/**
|
80 |
* {@inheritdoc}
|
81 |
*/
|
@@ -113,7 +79,7 @@ class Loco_admin_file_EditController extends Loco_admin_file_BaseController {
|
|
113 |
// Fine if not, this just means sync isn't possible.
|
114 |
catch( Loco_error_Exception $e ){
|
115 |
Loco_error_AdminNotices::add( $e );
|
116 |
-
Loco_error_AdminNotices::debug(
|
117 |
$project = null;
|
118 |
}
|
119 |
|
@@ -214,7 +180,7 @@ class Loco_admin_file_EditController extends Loco_admin_file_BaseController {
|
|
214 |
'domain' => (string) $project->getId(),
|
215 |
) : null,
|
216 |
'nonces' => $this->getNonces($readonly),
|
217 |
-
'apis' => $locale ?
|
218 |
) ) );
|
219 |
$this->set( 'ui', new Loco_mvc_ViewParams( array(
|
220 |
// Translators: button for adding a new string when manually editing a POT file
|
42 |
}
|
43 |
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
/**
|
46 |
* {@inheritdoc}
|
47 |
*/
|
79 |
// Fine if not, this just means sync isn't possible.
|
80 |
catch( Loco_error_Exception $e ){
|
81 |
Loco_error_AdminNotices::add( $e );
|
82 |
+
Loco_error_AdminNotices::debug("Sync is disabled because this file doesn't relate to a known set of translations");
|
83 |
$project = null;
|
84 |
}
|
85 |
|
180 |
'domain' => (string) $project->getId(),
|
181 |
) : null,
|
182 |
'nonces' => $this->getNonces($readonly),
|
183 |
+
'apis' => $locale && ! $readonly ? Loco_api_Providers::configured() : null,
|
184 |
) ) );
|
185 |
$this->set( 'ui', new Loco_mvc_ViewParams( array(
|
186 |
// Translators: button for adding a new string when manually editing a POT file
|
src/admin/file/InfoController.php
CHANGED
@@ -32,7 +32,7 @@ class Loco_admin_file_InfoController extends Loco_admin_file_BaseController {
|
|
32 |
* {@inheritdoc}
|
33 |
*/
|
34 |
public function render(){
|
35 |
-
|
36 |
$file = $this->get('file');
|
37 |
$name = $file->basename();
|
38 |
$this->set('title', $name );
|
@@ -67,6 +67,15 @@ class Loco_admin_file_InfoController extends Loco_admin_file_BaseController {
|
|
67 |
$dinfo['existent'] = true;
|
68 |
$dinfo['writable'] = $dir->writable();
|
69 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
// collect note worthy problems with file headers
|
72 |
$debugging = loco_debugging();
|
@@ -153,8 +162,8 @@ class Loco_admin_file_InfoController extends Loco_admin_file_BaseController {
|
|
153 |
}
|
154 |
}
|
155 |
if( $debugging ){
|
156 |
-
// missing or invalid headers are
|
157 |
-
if(
|
158 |
$debug[] = __('File does not have a valid header','loco-translate');
|
159 |
}
|
160 |
// Language header sanity checks, raising developer (debug) warnings
|
32 |
* {@inheritdoc}
|
33 |
*/
|
34 |
public function render(){
|
35 |
+
/* @var Loco_fs_File $file */
|
36 |
$file = $this->get('file');
|
37 |
$name = $file->basename();
|
38 |
$this->set('title', $name );
|
67 |
$dinfo['existent'] = true;
|
68 |
$dinfo['writable'] = $dir->writable();
|
69 |
}
|
70 |
+
|
71 |
+
// secure download link
|
72 |
+
$args = new Loco_mvc_HiddenFields( array (
|
73 |
+
'route' => 'download',
|
74 |
+
'action' => 'loco_download',
|
75 |
+
'path' => $file->getRelativePath(loco_constant('WP_CONTENT_DIR')),
|
76 |
+
) );
|
77 |
+
$args->setNonce('download');
|
78 |
+
$finfo['download'] = $args->getHref( admin_url('admin-ajax.php','relative') );
|
79 |
|
80 |
// collect note worthy problems with file headers
|
81 |
$debugging = loco_debugging();
|
162 |
}
|
163 |
}
|
164 |
if( $debugging ){
|
165 |
+
// missing or invalid headers are tolerated but developers should be notified
|
166 |
+
if( ! count($head) ){
|
167 |
$debug[] = __('File does not have a valid header','loco-translate');
|
168 |
}
|
169 |
// Language header sanity checks, raising developer (debug) warnings
|
src/admin/file/MoveController.php
CHANGED
@@ -26,12 +26,13 @@ class Loco_admin_file_MoveController extends Loco_admin_file_BaseController {
|
|
26 |
$this->set('hidden',$fields );
|
27 |
// attempt move if valid nonce posted back
|
28 |
while( $this->checkNonce($action) ){
|
|
|
29 |
// Chosen location should be valid as a posted "dest" parameter
|
30 |
-
if( !
|
31 |
Loco_error_AdminNotices::err('No destination posted');
|
32 |
break;
|
33 |
}
|
34 |
-
$target = new Loco_fs_LocaleFile(
|
35 |
$ext = $target->extension();
|
36 |
// primary file extension should only be permitted to change between po and pot
|
37 |
if( $ext !== $file->extension() && 'po' !== $ext && 'pot' !== $ext ){
|
26 |
$this->set('hidden',$fields );
|
27 |
// attempt move if valid nonce posted back
|
28 |
while( $this->checkNonce($action) ){
|
29 |
+
$post = Loco_mvc_PostParams::get();
|
30 |
// Chosen location should be valid as a posted "dest" parameter
|
31 |
+
if( ! $post->has('dest') ){
|
32 |
Loco_error_AdminNotices::err('No destination posted');
|
33 |
break;
|
34 |
}
|
35 |
+
$target = new Loco_fs_LocaleFile( $post->dest );
|
36 |
$ext = $target->extension();
|
37 |
// primary file extension should only be permitted to change between po and pot
|
38 |
if( $ext !== $file->extension() && 'po' !== $ext && 'pot' !== $ext ){
|
src/admin/init/BaseController.php
DELETED
File without changes
|
src/admin/init/InitPoController.php
CHANGED
@@ -74,9 +74,12 @@ class Loco_admin_init_InitPoController extends Loco_admin_bundle_BaseController
|
|
74 |
|
75 |
|
76 |
/**
|
77 |
-
* @internal
|
|
|
|
|
|
|
78 |
*/
|
79 |
-
|
80 |
static $order = array('custom' => 4, 'wplang' => 3, 'theme' => 2, 'plugin' => 2, 'other' => 1 );
|
81 |
$x = $order[$a];
|
82 |
$y = $order[$b];
|
@@ -246,9 +249,8 @@ class Loco_admin_init_InitPoController extends Loco_admin_bundle_BaseController
|
|
246 |
// there is no point checking whether any of these file exist, because we don't know what language will be chosen yet.
|
247 |
$sortable = array();
|
248 |
$locations = array();
|
249 |
-
$fs_protect = Loco_data_Settings::get()->fs_protect;
|
250 |
$fs_failure = null;
|
251 |
-
/* @var
|
252 |
foreach( $filechoice as $pofile ){
|
253 |
$parent = new Loco_fs_LocaleDirectory( $pofile->dirname() );
|
254 |
$systype = $parent->getUpdateType();
|
@@ -270,6 +272,7 @@ class Loco_admin_init_InitPoController extends Loco_admin_bundle_BaseController
|
|
270 |
$writable = false;
|
271 |
$disabled = true;
|
272 |
}
|
|
|
273 |
$choice = new Loco_mvc_ViewParams( array (
|
274 |
'checked' => '',
|
275 |
'writable' => $writable,
|
@@ -277,18 +280,14 @@ class Loco_admin_init_InitPoController extends Loco_admin_bundle_BaseController
|
|
277 |
'systype' => $systype,
|
278 |
'parent' => Loco_mvc_FileParams::create( $parent ),
|
279 |
'hidden' => $pofile->getRelativePath($content_dir),
|
280 |
-
'holder' => str_replace(
|
281 |
) );
|
282 |
-
// may need to show system file warnings
|
283 |
-
if( $systype && $fs_protect ){
|
284 |
-
$choice['syswarn'] = true;
|
285 |
-
}
|
286 |
$sortable[] = $choice;
|
287 |
$locations[$typeId]['paths'][] = $choice;
|
288 |
}
|
289 |
|
290 |
// display locations in runtime preference order
|
291 |
-
uksort( $locations, array(__CLASS__,'
|
292 |
$this->set( 'locations', $locations );
|
293 |
|
294 |
// pre-select best (safest/writable) option
|
74 |
|
75 |
|
76 |
/**
|
77 |
+
* @internal
|
78 |
+
* @param int
|
79 |
+
* @param int
|
80 |
+
* @return int
|
81 |
*/
|
82 |
+
private static function compareLocationKeys( $a, $b ){
|
83 |
static $order = array('custom' => 4, 'wplang' => 3, 'theme' => 2, 'plugin' => 2, 'other' => 1 );
|
84 |
$x = $order[$a];
|
85 |
$y = $order[$b];
|
249 |
// there is no point checking whether any of these file exist, because we don't know what language will be chosen yet.
|
250 |
$sortable = array();
|
251 |
$locations = array();
|
|
|
252 |
$fs_failure = null;
|
253 |
+
/* @var Loco_fs_LocaleFile $pofile */
|
254 |
foreach( $filechoice as $pofile ){
|
255 |
$parent = new Loco_fs_LocaleDirectory( $pofile->dirname() );
|
256 |
$systype = $parent->getUpdateType();
|
272 |
$writable = false;
|
273 |
$disabled = true;
|
274 |
}
|
275 |
+
$suffix = '-'.$pofile->getSuffix().'.po';
|
276 |
$choice = new Loco_mvc_ViewParams( array (
|
277 |
'checked' => '',
|
278 |
'writable' => $writable,
|
280 |
'systype' => $systype,
|
281 |
'parent' => Loco_mvc_FileParams::create( $parent ),
|
282 |
'hidden' => $pofile->getRelativePath($content_dir),
|
283 |
+
'holder' => str_replace( $suffix, '-<span>{locale}</span>.po', $pofile->basename() ),
|
284 |
) );
|
|
|
|
|
|
|
|
|
285 |
$sortable[] = $choice;
|
286 |
$locations[$typeId]['paths'][] = $choice;
|
287 |
}
|
288 |
|
289 |
// display locations in runtime preference order
|
290 |
+
uksort( $locations, array(__CLASS__,'compareLocationKeys') );
|
291 |
$this->set( 'locations', $locations );
|
292 |
|
293 |
// pre-select best (safest/writable) option
|
src/admin/init/UploadController.php
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* File upload initializer.
|
4 |
+
* Uploads a PO file to the bundle and compiles MO.
|
5 |
+
*/
|
6 |
+
class Loco_admin_init_UploadController extends Loco_admin_bundle_BaseController {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* {@inheritdoc}
|
10 |
+
**/
|
11 |
+
public function init() {
|
12 |
+
parent::init();
|
13 |
+
// Use Ajax controller for standard postback
|
14 |
+
if( $this->checkNonce('upload') ){
|
15 |
+
try {
|
16 |
+
$ctrl = new Loco_ajax_UploadController;
|
17 |
+
$ctrl->_init($_POST);
|
18 |
+
$href = $ctrl->process( Loco_mvc_PostParams::get() );
|
19 |
+
if( wp_redirect($href) ){
|
20 |
+
exit;
|
21 |
+
}
|
22 |
+
}
|
23 |
+
catch( Exception $e ){
|
24 |
+
Loco_error_AdminNotices::add( Loco_error_Exception::convert($e) );
|
25 |
+
}
|
26 |
+
}
|
27 |
+
// Set page title before render sets inline title
|
28 |
+
$bundle = $this->getBundle();
|
29 |
+
$this->set('title', __('Upload','loco-translate').' ‹ '.$bundle->getName() );
|
30 |
+
}
|
31 |
+
|
32 |
+
|
33 |
+
/**
|
34 |
+
* {@inheritdoc}
|
35 |
+
*/
|
36 |
+
public function render(){
|
37 |
+
// file upload requires a properly configured project
|
38 |
+
$bundle = $this->getBundle();
|
39 |
+
$project = $this->getProject();
|
40 |
+
$fields = new Loco_mvc_HiddenFields( array(
|
41 |
+
'path' => '',
|
42 |
+
'auth' => 'upload',
|
43 |
+
'type' => $bundle->getType(),
|
44 |
+
'domain' => $project->getId(),
|
45 |
+
'bundle' => $bundle->getHandle(),
|
46 |
+
) );
|
47 |
+
$fields->setNonce('upload');
|
48 |
+
$this->set('hidden',$fields);
|
49 |
+
$this->prepareFsConnect('upload','');
|
50 |
+
// standard bundle navigation with link back to overview
|
51 |
+
$breadcrumb = $this->prepareNavigation();
|
52 |
+
$breadcrumb->add( __('Upload a translation file','loco-translate') );
|
53 |
+
$this->set( 'breadcrumb', $breadcrumb );
|
54 |
+
// we won't know the locale until the file is uploaded, so use a dummy for location choice
|
55 |
+
$locale = new Loco_Locale('zxx');
|
56 |
+
$filechoice = $this->getProject()->initLocaleFiles($locale);
|
57 |
+
//
|
58 |
+
$locations = array();
|
59 |
+
/* @var Loco_fs_LocaleFile $pofile */
|
60 |
+
foreach( $filechoice as $pofile ){
|
61 |
+
// initialize location type (system, etc..)
|
62 |
+
$parent = new Loco_fs_LocaleDirectory( $pofile->dirname() );
|
63 |
+
$typeId = $parent->getTypeId();
|
64 |
+
if( ! isset($locations[$typeId]) ){
|
65 |
+
$locations[$typeId] = new Loco_mvc_ViewParams( array(
|
66 |
+
'label' => $parent->getTypeLabel($typeId),
|
67 |
+
'paths' => array(),
|
68 |
+
) );
|
69 |
+
}
|
70 |
+
$locations[$typeId]['paths'][] = new Loco_mvc_ViewParams( array(
|
71 |
+
'parent' => Loco_mvc_FileParams::create($parent),
|
72 |
+
'holder' => str_replace('-zxx.po','-{locale}</span>.po', $pofile->basename() ),
|
73 |
+
) );
|
74 |
+
}
|
75 |
+
// we don't know what the specifics will be until a location is chosen and a file is presented.
|
76 |
+
$this->set('locale',get_locale());
|
77 |
+
$this->set('locations', $locations );
|
78 |
+
// file upload will be done via ajax if possible
|
79 |
+
$settings = Loco_data_Settings::get();
|
80 |
+
$this->set('js',new Loco_mvc_ViewParams( array (
|
81 |
+
'multipart' => (bool) $settings->ajax_files,
|
82 |
+
'nonces' => array( 'upload' => $fields->getNonce() ),
|
83 |
+
) ) );
|
84 |
+
$this->enqueueScript('upload');
|
85 |
+
return $this->view('admin/init/upload');
|
86 |
+
}
|
87 |
+
|
88 |
+
}
|
src/ajax/ApisController.php
CHANGED
@@ -13,7 +13,35 @@ class Loco_ajax_ApisController extends Loco_mvc_AjaxController {
|
|
13 |
// Fire an event so translation apis can register their hooks as lazily as possible
|
14 |
do_action('loco_api_ajax');
|
15 |
|
16 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
$hook = (string) $post->hook;
|
18 |
|
19 |
// API client must be hooked in using loco_api_providers filter
|
13 |
// Fire an event so translation apis can register their hooks as lazily as possible
|
14 |
do_action('loco_api_ajax');
|
15 |
|
16 |
+
// Get request renders API modal contents:
|
17 |
+
if( 0 === $post->count() ){
|
18 |
+
$apis = Loco_api_Providers::configured();
|
19 |
+
$this->set('apis',$apis);
|
20 |
+
// modal views for batch-translate and suggest feature
|
21 |
+
$modal = new Loco_mvc_View;
|
22 |
+
$modal->set('apis',$apis);
|
23 |
+
// help buttons
|
24 |
+
$locale = $this->get('locale');
|
25 |
+
$modal->set( 'help', new Loco_mvc_ViewParams( array (
|
26 |
+
'text' => __('Help','loco-translate'),
|
27 |
+
'href' => apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/providers'),
|
28 |
+
) ) );
|
29 |
+
$modal->set('prof', new Loco_mvc_ViewParams( array (
|
30 |
+
'text' => __('Need a human?','loco-translate'),
|
31 |
+
'href' => apply_filters('loco_external','https://localise.biz/wordpress/translation?l='.$locale),
|
32 |
+
) ) );
|
33 |
+
// render auto-translate modal or prompt for configuration
|
34 |
+
if( $apis ){
|
35 |
+
$html = $modal->render('ajax/modal-apis-batch');
|
36 |
+
}
|
37 |
+
else {
|
38 |
+
$html = $modal->render('ajax/modal-apis-empty');
|
39 |
+
}
|
40 |
+
$this->set('html',$html);
|
41 |
+
return parent::render();
|
42 |
+
}
|
43 |
+
|
44 |
+
// else API client id should be posted to perform operation
|
45 |
$hook = (string) $post->hook;
|
46 |
|
47 |
// API client must be hooked in using loco_api_providers filter
|
src/ajax/DownloadController.php
CHANGED
@@ -14,12 +14,14 @@ class Loco_ajax_DownloadController extends Loco_mvc_AjaxController {
|
|
14 |
// we need a path, but it may not need to exist
|
15 |
$file = new Loco_fs_File( $this->get('path') );
|
16 |
$file->normalize( loco_constant( 'WP_CONTENT_DIR') );
|
17 |
-
|
|
|
|
|
18 |
|
19 |
// posted source must be clean and must parse as whatever the file extension claims to be
|
20 |
if( $raw = $post->source ){
|
21 |
// compile source if target is MO
|
22 |
-
if( $
|
23 |
$raw = Loco_gettext_Data::fromSource($raw)->msgfmt();
|
24 |
}
|
25 |
}
|
@@ -28,16 +30,13 @@ class Loco_ajax_DownloadController extends Loco_mvc_AjaxController {
|
|
28 |
else if( $file->exists() ){
|
29 |
$raw = $file->getContents();
|
30 |
}
|
31 |
-
|
32 |
-
else if( ! $is_binary ){
|
33 |
-
|
34 |
-
}*/
|
35 |
else {
|
36 |
throw new Loco_error_Exception('File not found and no source posted');
|
37 |
}
|
38 |
|
39 |
-
// Observe UTF-8 BOM setting
|
40 |
-
if(
|
41 |
$has_bom = "\xEF\xBB\xBF" === substr($raw,0,3);
|
42 |
$use_bom = (bool) Loco_data_Settings::get()->po_utf8_bom;
|
43 |
// only alter file if valid UTF-8. Deferring detection overhead until required
|
@@ -51,7 +50,6 @@ class Loco_ajax_DownloadController extends Loco_mvc_AjaxController {
|
|
51 |
}
|
52 |
}
|
53 |
|
54 |
-
|
55 |
return $raw;
|
56 |
}
|
57 |
|
14 |
// we need a path, but it may not need to exist
|
15 |
$file = new Loco_fs_File( $this->get('path') );
|
16 |
$file->normalize( loco_constant( 'WP_CONTENT_DIR') );
|
17 |
+
|
18 |
+
// Restrict download to gettext file formats
|
19 |
+
$ext = Loco_gettext_Data::ext($file);
|
20 |
|
21 |
// posted source must be clean and must parse as whatever the file extension claims to be
|
22 |
if( $raw = $post->source ){
|
23 |
// compile source if target is MO
|
24 |
+
if( 'mo' === $ext ) {
|
25 |
$raw = Loco_gettext_Data::fromSource($raw)->msgfmt();
|
26 |
}
|
27 |
}
|
30 |
else if( $file->exists() ){
|
31 |
$raw = $file->getContents();
|
32 |
}
|
33 |
+
// else we can't do anything except bail
|
|
|
|
|
|
|
34 |
else {
|
35 |
throw new Loco_error_Exception('File not found and no source posted');
|
36 |
}
|
37 |
|
38 |
+
// Observe UTF-8 BOM setting for PO and POT only
|
39 |
+
if( 'po' === $ext || 'pot' === $ext ){
|
40 |
$has_bom = "\xEF\xBB\xBF" === substr($raw,0,3);
|
41 |
$use_bom = (bool) Loco_data_Settings::get()->po_utf8_bom;
|
42 |
// only alter file if valid UTF-8. Deferring detection overhead until required
|
50 |
}
|
51 |
}
|
52 |
|
|
|
53 |
return $raw;
|
54 |
}
|
55 |
|
src/ajax/FsConnectController.php
CHANGED
@@ -47,6 +47,7 @@ class Loco_ajax_FsConnectController extends Loco_mvc_AjaxController {
|
|
47 |
|
48 |
|
49 |
/**
|
|
|
50 |
* @return bool
|
51 |
*/
|
52 |
private function authorizeUpdate( Loco_fs_File $file ){
|
@@ -57,16 +58,31 @@ class Loco_ajax_FsConnectController extends Loco_mvc_AjaxController {
|
|
57 |
if( Loco_data_Settings::get()->num_backups && ! $this->api->authorizeCopy($file) ){
|
58 |
return false;
|
59 |
}
|
60 |
-
// updating file
|
61 |
-
$files = new Loco_fs_Siblings(
|
62 |
-
|
63 |
-
|
|
|
64 |
}
|
65 |
// else no dependants to update
|
66 |
return true;
|
67 |
}
|
68 |
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
/**
|
71 |
* {@inheritdoc}
|
72 |
*/
|
47 |
|
48 |
|
49 |
/**
|
50 |
+
* @param Loco_fs_File file path to update (should exist)
|
51 |
* @return bool
|
52 |
*/
|
53 |
private function authorizeUpdate( Loco_fs_File $file ){
|
58 |
if( Loco_data_Settings::get()->num_backups && ! $this->api->authorizeCopy($file) ){
|
59 |
return false;
|
60 |
}
|
61 |
+
// updating file will also recompile binary, which may or may not exist
|
62 |
+
$files = new Loco_fs_Siblings($file);
|
63 |
+
$mofile = $files->getBinary();
|
64 |
+
if( $mofile && ! $this->api->authorizeSave($mofile) ){
|
65 |
+
return false;
|
66 |
}
|
67 |
// else no dependants to update
|
68 |
return true;
|
69 |
}
|
70 |
|
71 |
|
72 |
+
/**
|
73 |
+
* @param Loco_fs_File path which may exist (update it) or may not (create it)
|
74 |
+
* @return bool
|
75 |
+
*/
|
76 |
+
private function authorizeUpload( Loco_fs_File $file ){
|
77 |
+
if( $file->exists() ){
|
78 |
+
return $this->api->authorizeUpdate($file);
|
79 |
+
}
|
80 |
+
else {
|
81 |
+
return $this->api->authorizeCreate($file);
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
|
86 |
/**
|
87 |
* {@inheritdoc}
|
88 |
*/
|
src/ajax/SaveController.php
CHANGED
@@ -52,26 +52,16 @@ class Loco_ajax_SaveController extends Loco_ajax_common_BundleController {
|
|
52 |
$data = Loco_gettext_Data::fromSource( $post->data );
|
53 |
}
|
54 |
|
55 |
-
// WordPress-ize some headers that differ from JavaScript
|
56 |
-
if( $
|
57 |
$head = $data->getHeaders();
|
58 |
$head['Language'] = strtr( $locale, '-', '_' );
|
59 |
}
|
60 |
|
61 |
-
// backup existing file before overwriting, but
|
62 |
-
$
|
63 |
-
|
64 |
-
|
65 |
-
$api->authorizeCopy( $pofile );
|
66 |
-
$backups = new Loco_fs_Revisions( $pofile );
|
67 |
-
$backups->create();
|
68 |
-
$backups->prune($num_backups);
|
69 |
-
}
|
70 |
-
catch( Exception $e ){
|
71 |
-
Loco_error_AdminNotices::debug( $e->getMessage() );
|
72 |
-
$message = __('Failed to create backup file in "%s". Check file permissions or disable backups','loco-translate');
|
73 |
-
Loco_error_AdminNotices::warn( sprintf( $message, $pofile->getParent()->basename() ) );
|
74 |
-
}
|
75 |
}
|
76 |
|
77 |
// commit file directly to disk
|
@@ -97,21 +87,20 @@ class Loco_ajax_SaveController extends Loco_ajax_common_BundleController {
|
|
97 |
$this->set('datetime', Loco_mvc_ViewParams::date_i18n($mtime) );
|
98 |
|
99 |
// Compile MO and JSON files unless saving template
|
100 |
-
if( $
|
101 |
try {
|
102 |
$mofile = $pofile->cloneExtension('mo');
|
103 |
$api->authorizeSave( $mofile );
|
104 |
$bytes = $mofile->putContents( $data->msgfmt() );
|
105 |
$this->set( 'mobytes', $bytes );
|
106 |
Loco_error_AdminNotices::success( __('PO file saved and MO file compiled','loco-translate') );
|
107 |
-
|
108 |
}
|
109 |
catch( Exception $e ){
|
110 |
Loco_error_AdminNotices::debug( $e->getMessage() );
|
111 |
Loco_error_AdminNotices::warn( __('PO file saved, but MO file compilation failed','loco-translate') );
|
112 |
$this->set( 'mobytes', 0 );
|
113 |
// prevent further compilation if MO failed
|
114 |
-
$compile = false;
|
115 |
}
|
116 |
}
|
117 |
else {
|
52 |
$data = Loco_gettext_Data::fromSource( $post->data );
|
53 |
}
|
54 |
|
55 |
+
// WordPress-ize some headers that differ from that sent from JavaScript
|
56 |
+
if( $locale ){
|
57 |
$head = $data->getHeaders();
|
58 |
$head['Language'] = strtr( $locale, '-', '_' );
|
59 |
}
|
60 |
|
61 |
+
// backup existing file before overwriting, but continue if backups fails
|
62 |
+
if( $poexists ){
|
63 |
+
$backups = new Loco_fs_Revisions($pofile);
|
64 |
+
$backups->rotate($api);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
}
|
66 |
|
67 |
// commit file directly to disk
|
87 |
$this->set('datetime', Loco_mvc_ViewParams::date_i18n($mtime) );
|
88 |
|
89 |
// Compile MO and JSON files unless saving template
|
90 |
+
if( $locale ){
|
91 |
try {
|
92 |
$mofile = $pofile->cloneExtension('mo');
|
93 |
$api->authorizeSave( $mofile );
|
94 |
$bytes = $mofile->putContents( $data->msgfmt() );
|
95 |
$this->set( 'mobytes', $bytes );
|
96 |
Loco_error_AdminNotices::success( __('PO file saved and MO file compiled','loco-translate') );
|
|
|
97 |
}
|
98 |
catch( Exception $e ){
|
99 |
Loco_error_AdminNotices::debug( $e->getMessage() );
|
100 |
Loco_error_AdminNotices::warn( __('PO file saved, but MO file compilation failed','loco-translate') );
|
101 |
$this->set( 'mobytes', 0 );
|
102 |
// prevent further compilation if MO failed
|
103 |
+
// $compile = false;
|
104 |
}
|
105 |
}
|
106 |
else {
|
src/ajax/UploadController.php
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Ajax "upload" route, for putting translation files to the server
|
4 |
+
*/
|
5 |
+
class Loco_ajax_UploadController extends Loco_ajax_common_BundleController {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* {@inheritdoc}
|
9 |
+
*/
|
10 |
+
public function render(){
|
11 |
+
$post = $this->validate();
|
12 |
+
$href = $this->process( $post );
|
13 |
+
//
|
14 |
+
$this->set('redirect',$href);
|
15 |
+
return parent::render();
|
16 |
+
}
|
17 |
+
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Upload processor shared with standard postback controller
|
21 |
+
* @param Loco_mvc_ViewParams script input
|
22 |
+
* @return string redirect to file edit
|
23 |
+
*/
|
24 |
+
public function process( Loco_mvc_ViewParams $post ){
|
25 |
+
$bundle = $this->getBundle();
|
26 |
+
$project = $this->getProject( $bundle );
|
27 |
+
// Chosen folder location should be valid as a posted "dir" parameter
|
28 |
+
if( ! $post->has('dir') ){
|
29 |
+
throw new Loco_error_Exception('No destination posted');
|
30 |
+
}
|
31 |
+
$base = loco_constant('WP_CONTENT_DIR');
|
32 |
+
$parent = new Loco_fs_Directory($post->dir);
|
33 |
+
$parent->normalize($base);
|
34 |
+
// Loco_error_AdminNotices::debug('Destination set to '.$parent->getPath() );
|
35 |
+
// Ensure file uploaded ok
|
36 |
+
if( ! isset($_FILES['f']) ){
|
37 |
+
throw new Loco_error_Exception('No file posted');
|
38 |
+
}
|
39 |
+
$upload = new Loco_data_Upload($_FILES['f']);
|
40 |
+
$dummy = new Loco_fs_DummyFile( $upload->getName() );
|
41 |
+
$ext = strtolower( $dummy->extension() );
|
42 |
+
// Loco_error_AdminNotices::debug('Have uploaded file: '.$dummy->basename() );
|
43 |
+
switch($ext){
|
44 |
+
case 'po':
|
45 |
+
case 'mo':
|
46 |
+
$dummy->putContents($upload->getContents());
|
47 |
+
$pomo = Loco_gettext_Data::load($dummy);
|
48 |
+
break;
|
49 |
+
default:
|
50 |
+
throw new Loco_error_Exception('Only PO/MO uploads supported');
|
51 |
+
}
|
52 |
+
// PO/MO data is valid.
|
53 |
+
// get real file name and establish if a locale can be extracted, otherwise get from headers
|
54 |
+
$file = new Loco_fs_LocaleFile( $dummy->basename() );
|
55 |
+
$locale = $file->getLocale();
|
56 |
+
if( ! $locale->isValid() ){
|
57 |
+
$value = $pomo->getHeaders()->offsetGet('Language');
|
58 |
+
$locale = Loco_Locale::parse($value);
|
59 |
+
if( ! $locale->isValid() ){
|
60 |
+
throw new Loco_error_Exception('Unable to detect language from '.$file->basename() );
|
61 |
+
}
|
62 |
+
}
|
63 |
+
// Fail if user presents å wrongly named file. This is to avoid mixing up text domains.
|
64 |
+
$pofile = $project->initLocaleFile($parent,$locale);
|
65 |
+
if( $pofile->filename() !== $dummy->filename() ){
|
66 |
+
throw new Loco_error_Exception( sprintf('File must be named %s', $pofile->filename().'.'.$ext ) );
|
67 |
+
}
|
68 |
+
$api = new Loco_api_WordPressFileSystem;
|
69 |
+
// PO may exist already. If not we need to auth create instead of update
|
70 |
+
if( $pofile->exists() ){
|
71 |
+
if( 'po' === $ext && $pofile->md5() === $dummy->md5() ){
|
72 |
+
throw new Loco_error_Exception( __('Your file is identical to the existing one','loco-translate') );
|
73 |
+
}
|
74 |
+
// backup existing PO file before overwriting, but proceed on failure
|
75 |
+
$backups = new Loco_fs_Revisions($pofile);
|
76 |
+
$backups->rotate($api);
|
77 |
+
$api->authorizeUpdate($pofile);
|
78 |
+
}
|
79 |
+
else {
|
80 |
+
$api->authorizeCreate( $pofile );
|
81 |
+
}
|
82 |
+
// Putting file contents, because remote file system may not be able to read from tmp/upload location
|
83 |
+
if( 'mo' === $ext ){
|
84 |
+
$pofile->putContents( $pomo->msgcat() );
|
85 |
+
$bin = $dummy->getContents(); // <- use binary as-is.
|
86 |
+
}
|
87 |
+
else {
|
88 |
+
$pofile->putContents( $dummy->getContents() ); // <- use po source as is
|
89 |
+
$bin = $pomo->msgfmt(); // <- compile binary from PO
|
90 |
+
}
|
91 |
+
// should have binary data unless something went wrong
|
92 |
+
if( $bin ){
|
93 |
+
$mofile = $pofile->cloneExtension('mo');
|
94 |
+
$mofile->exists() ? $api->authorizeUpdate($mofile) : $api->authorizeCreate($mofile);
|
95 |
+
$mofile->putContents($bin);
|
96 |
+
}
|
97 |
+
// Redirect to edit this PO. Sync may be required and we're not doing automatically here.
|
98 |
+
$type = strtolower( $this->get('type') );
|
99 |
+
return Loco_mvc_AdminRouter::generate( sprintf('%s-file-edit',$type), array(
|
100 |
+
'path' => $pofile->getRelativePath($base),
|
101 |
+
'bundle' => $bundle->getHandle(),
|
102 |
+
'domain' => $project->getId(),
|
103 |
+
) );
|
104 |
+
}
|
105 |
+
}
|
src/api/Providers.php
CHANGED
@@ -42,6 +42,38 @@ abstract class Loco_api_Providers {
|
|
42 |
'key' => $settings->offsetGet('yandex_api_key'),
|
43 |
),
|
44 |
);
|
45 |
-
}
|
|
|
46 |
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
'key' => $settings->offsetGet('yandex_api_key'),
|
43 |
),
|
44 |
);
|
45 |
+
}
|
46 |
+
|
47 |
|
48 |
+
/**
|
49 |
+
* Get only configured APIs, and sort them fairly
|
50 |
+
* @return array[]
|
51 |
+
*/
|
52 |
+
public static function configured(){
|
53 |
+
$apis = array_filter( self::export(), array(__CLASS__,'filterConfigured') );
|
54 |
+
usort( $apis, array(__CLASS__,'compareNames') );
|
55 |
+
return $apis;
|
56 |
+
}
|
57 |
+
|
58 |
+
|
59 |
+
/**
|
60 |
+
* @internal
|
61 |
+
* @param string[]
|
62 |
+
* @return bool
|
63 |
+
*/
|
64 |
+
private static function filterConfigured( array $api ){
|
65 |
+
return array_key_exists('key',$api) && is_string($api['key']) && '' !== $api['key'];
|
66 |
+
}
|
67 |
+
|
68 |
+
|
69 |
+
/**
|
70 |
+
* @internal
|
71 |
+
* @param string[]
|
72 |
+
* @param string[]
|
73 |
+
* @return bool
|
74 |
+
*/
|
75 |
+
private static function compareNames( array $a, array $b ){
|
76 |
+
return strcasecmp($a['name'],$b['name']);
|
77 |
+
}
|
78 |
+
|
79 |
+
}
|
src/api/WordPressFileSystem.php
CHANGED
@@ -369,7 +369,7 @@ class Loco_api_WordPressFileSystem {
|
|
369 |
|
370 |
|
371 |
/**
|
372 |
-
* Check if a file is
|
373 |
* @param Loco_fs_File
|
374 |
* @return bool
|
375 |
*/
|
@@ -378,14 +378,32 @@ class Loco_api_WordPressFileSystem {
|
|
378 |
if( $this->isAutoUpdateDenied() ){
|
379 |
return false;
|
380 |
}
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
388 |
$item = new stdClass;
|
|
|
|
|
|
|
389 |
return apply_filters( 'auto_update_'.$type, true, $item );
|
390 |
}
|
391 |
// else safe (not auto-updatable)
|
369 |
|
370 |
|
371 |
/**
|
372 |
+
* Check if a file is subject to WordPress automatic updates
|
373 |
* @param Loco_fs_File
|
374 |
* @return bool
|
375 |
*/
|
378 |
if( $this->isAutoUpdateDenied() ){
|
379 |
return false;
|
380 |
}
|
381 |
+
// Auto-updates aren't denied, so ascertain location "type" and run through the same filters as WP_Automatic_Updater::should_update()
|
382 |
+
$type = $file->getUpdateType();
|
383 |
+
if( '' !== $type ){
|
384 |
+
// Since 5.5.0: "{type}_s_auto_update_enabled" filters auto-update status for themes and plugins
|
385 |
+
// admins must also enable auto-updates on plugins and themes individually, but not checking that here.
|
386 |
+
if( function_exists('wp_is_auto_update_enabled_for_type') && ('plugin'===$type||'theme'===$type) ){
|
387 |
+
$enabled = (bool) apply_filters( "{$type}s_auto_update_enabled", true );
|
388 |
+
if( $enabled ){
|
389 |
+
// resolve given file to plugin/theme handle so we can check if it's been enabled
|
390 |
+
$bundle = Loco_package_Bundle::fromFile($file);
|
391 |
+
if( $bundle instanceof Loco_package_Bundle ){
|
392 |
+
$handle = $bundle->getHandle();
|
393 |
+
$option = (array) get_site_option( "auto_update_{$type}s", array() );
|
394 |
+
// var_dump( compact('handle','option') );
|
395 |
+
if( ! in_array($handle,$option,true) ){
|
396 |
+
$enabled = false;
|
397 |
+
}
|
398 |
+
}
|
399 |
+
}
|
400 |
+
return $enabled;
|
401 |
+
}
|
402 |
+
// WordPress updater will have {item} from remote API data which we don't have here.
|
403 |
$item = new stdClass;
|
404 |
+
$item->new_files = false;
|
405 |
+
$item->autoupdate = true;
|
406 |
+
$item->disable_autoupdate = false;
|
407 |
return apply_filters( 'auto_update_'.$type, true, $item );
|
408 |
}
|
409 |
// else safe (not auto-updatable)
|
src/compat/Failure.php
CHANGED
@@ -13,7 +13,7 @@ abstract class Loco_compat_Failure {
|
|
13 |
*/
|
14 |
public static function print_hook_failure(){
|
15 |
$texts = array( 'Loco Translate failed to start up' );
|
16 |
-
/*/ Hooks currently not using
|
17 |
if( ini_get('opcache.enable') && ( ! ini_get('opcache.save_comments') || ! ini_get('opcache.load_comments') ) ){
|
18 |
$texts[] = 'Try configuring opcache to preserve comments';
|
19 |
}*/
|
13 |
*/
|
14 |
public static function print_hook_failure(){
|
15 |
$texts = array( 'Loco Translate failed to start up' );
|
16 |
+
/*/ Hooks currently not using annotations (would be if we enabled @priority tag)
|
17 |
if( ini_get('opcache.enable') && ( ! ini_get('opcache.save_comments') || ! ini_get('opcache.load_comments') ) ){
|
18 |
$texts[] = 'Try configuring opcache to preserve comments';
|
19 |
}*/
|
src/compat/PosixExtension.php
CHANGED
@@ -27,7 +27,7 @@ abstract class Loco_compat_PosixExtension {
|
|
27 |
}
|
28 |
// else use temp file system to establish owner
|
29 |
else {
|
30 |
-
self::$uid = self::getuidViaTempDir();
|
31 |
}
|
32 |
}
|
33 |
return self::$uid;
|
@@ -45,7 +45,7 @@ abstract class Loco_compat_PosixExtension {
|
|
45 |
}
|
46 |
// else use temp file system to establish group owner
|
47 |
else {
|
48 |
-
self::$gid = self::getgidViaTempDir();
|
49 |
}
|
50 |
}
|
51 |
return self::$gid;
|
27 |
}
|
28 |
// else use temp file system to establish owner
|
29 |
else {
|
30 |
+
self::$uid = self::getuidViaTempDir(); // @codeCoverageIgnore
|
31 |
}
|
32 |
}
|
33 |
return self::$uid;
|
45 |
}
|
46 |
// else use temp file system to establish group owner
|
47 |
else {
|
48 |
+
self::$gid = self::getgidViaTempDir(); // @codeCoverageIgnore
|
49 |
}
|
50 |
}
|
51 |
return self::$gid;
|
src/data/Upload.php
CHANGED
@@ -6,10 +6,16 @@
|
|
6 |
class Loco_data_Upload {
|
7 |
|
8 |
/**
|
|
|
9 |
* @var Loco_fs_File
|
10 |
*/
|
11 |
private $file;
|
12 |
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
/**
|
15 |
* Pass through temporary file data
|
@@ -19,7 +25,7 @@
|
|
19 |
*/
|
20 |
public static function src($key){
|
21 |
$upload = new Loco_data_Upload($_FILES[$key]);
|
22 |
-
return $upload->
|
23 |
}
|
24 |
|
25 |
|
@@ -28,6 +34,7 @@
|
|
28 |
* @throws Loco_error_UploadException
|
29 |
*/
|
30 |
public function __construct( array $data ){
|
|
|
31 |
// https://www.php.net/manual/en/features.file-upload.errors.php
|
32 |
$code = (int) $data['error'];
|
33 |
switch( $code ){
|
@@ -50,10 +57,6 @@
|
|
50 |
default:
|
51 |
throw new Loco_error_UploadException('Unknown file upload error',$code);
|
52 |
}
|
53 |
-
// mime check is largely pointless but may as well check as we'll only send one type
|
54 |
-
if( 'application/x-gettext' !== $data['type'] ){
|
55 |
-
throw new Loco_error_UploadException('Unsupported file type, expected PO or POT file');
|
56 |
-
}
|
57 |
// upload is OK according to PHP, but check it's really readable and not empty
|
58 |
$path = $data['tmp_name'];
|
59 |
$file = new Loco_fs_File($path);
|
@@ -66,6 +69,22 @@
|
|
66 |
// file is really ok
|
67 |
$this->file = $file;
|
68 |
}
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
}
|
71 |
|
6 |
class Loco_data_Upload {
|
7 |
|
8 |
/**
|
9 |
+
* Actual file currently on system
|
10 |
* @var Loco_fs_File
|
11 |
*/
|
12 |
private $file;
|
13 |
|
14 |
+
/**
|
15 |
+
* @var array
|
16 |
+
*/
|
17 |
+
private $data;
|
18 |
+
|
19 |
|
20 |
/**
|
21 |
* Pass through temporary file data
|
25 |
*/
|
26 |
public static function src($key){
|
27 |
$upload = new Loco_data_Upload($_FILES[$key]);
|
28 |
+
return $upload->getContents();
|
29 |
}
|
30 |
|
31 |
|
34 |
* @throws Loco_error_UploadException
|
35 |
*/
|
36 |
public function __construct( array $data ){
|
37 |
+
$this->data = $data;
|
38 |
// https://www.php.net/manual/en/features.file-upload.errors.php
|
39 |
$code = (int) $data['error'];
|
40 |
switch( $code ){
|
57 |
default:
|
58 |
throw new Loco_error_UploadException('Unknown file upload error',$code);
|
59 |
}
|
|
|
|
|
|
|
|
|
60 |
// upload is OK according to PHP, but check it's really readable and not empty
|
61 |
$path = $data['tmp_name'];
|
62 |
$file = new Loco_fs_File($path);
|
69 |
// file is really ok
|
70 |
$this->file = $file;
|
71 |
}
|
72 |
+
|
73 |
+
|
74 |
+
/**
|
75 |
+
* @return string
|
76 |
+
*/
|
77 |
+
public function getName(){
|
78 |
+
return $this->data['name'];
|
79 |
+
}
|
80 |
+
|
81 |
+
|
82 |
+
/**
|
83 |
+
* @return string
|
84 |
+
*/
|
85 |
+
public function getContents(){
|
86 |
+
return $this->file->getContents();
|
87 |
+
}
|
88 |
+
|
89 |
}
|
90 |
|
src/fs/DummyFile.php
CHANGED
@@ -119,13 +119,14 @@ class Loco_fs_DummyFile extends Loco_fs_File {
|
|
119 |
}
|
120 |
|
121 |
|
122 |
-
|
123 |
/**
|
124 |
* {@inheritdoc}
|
125 |
*/
|
126 |
public function copy( $dest ){
|
127 |
-
$copy =
|
128 |
-
$
|
|
|
|
|
129 |
return $copy;
|
130 |
}
|
131 |
|
@@ -144,9 +145,8 @@ class Loco_fs_DummyFile extends Loco_fs_File {
|
|
144 |
public function gid(){
|
145 |
return $this->gid;
|
146 |
}
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
/**
|
151 |
* {@inheritdoc}
|
152 |
* @codeCoverageIgnore
|
@@ -167,6 +167,14 @@ class Loco_fs_DummyFile extends Loco_fs_File {
|
|
167 |
}
|
168 |
// else locked:
|
169 |
return false;
|
170 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
|
172 |
}
|
119 |
}
|
120 |
|
121 |
|
|
|
122 |
/**
|
123 |
* {@inheritdoc}
|
124 |
*/
|
125 |
public function copy( $dest ){
|
126 |
+
$copy = new Loco_fs_DummyFile($dest);
|
127 |
+
foreach( get_object_vars($this) as $prop => $value ){
|
128 |
+
$copy->$prop = $value;
|
129 |
+
}
|
130 |
return $copy;
|
131 |
}
|
132 |
|
145 |
public function gid(){
|
146 |
return $this->gid;
|
147 |
}
|
148 |
+
|
149 |
+
|
|
|
150 |
/**
|
151 |
* {@inheritdoc}
|
152 |
* @codeCoverageIgnore
|
167 |
}
|
168 |
// else locked:
|
169 |
return false;
|
170 |
+
}
|
171 |
+
|
172 |
+
|
173 |
+
/**
|
174 |
+
* {@inheritDoc}
|
175 |
+
*/
|
176 |
+
public function md5(){
|
177 |
+
return md5( $this->getContents() );
|
178 |
+
}
|
179 |
|
180 |
}
|
src/fs/File.php
CHANGED
@@ -621,7 +621,8 @@ class Loco_fs_File {
|
|
621 |
public function getUpdateType(){
|
622 |
// global languages directory root, and canonical subdirectories
|
623 |
$dirpath = (string) ( $this->isDirectory() ? $this : $this->getParent() );
|
624 |
-
|
|
|
625 |
list($root) = explode('/', $sub, 2 );
|
626 |
if( '.' === $root || 'themes' === $root || 'plugins' === $root ){
|
627 |
return 'translation';
|
@@ -641,5 +642,19 @@ class Loco_fs_File {
|
|
641 |
// else not an update type
|
642 |
return '';
|
643 |
}
|
644 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
645 |
}
|
621 |
public function getUpdateType(){
|
622 |
// global languages directory root, and canonical subdirectories
|
623 |
$dirpath = (string) ( $this->isDirectory() ? $this : $this->getParent() );
|
624 |
+
$sub = Loco_fs_Locations::getGlobal()->rel($dirpath);
|
625 |
+
if( is_string($sub) && '' !== $sub ){
|
626 |
list($root) = explode('/', $sub, 2 );
|
627 |
if( '.' === $root || 'themes' === $root || 'plugins' === $root ){
|
628 |
return 'translation';
|
642 |
// else not an update type
|
643 |
return '';
|
644 |
}
|
645 |
+
|
646 |
+
|
647 |
+
/**
|
648 |
+
* Get MD5 hash of file contents
|
649 |
+
* @return string
|
650 |
+
*/
|
651 |
+
public function md5(){
|
652 |
+
if( $this->exists() ) {
|
653 |
+
return md5_file( $this->path );
|
654 |
+
}
|
655 |
+
else {
|
656 |
+
return 'd41d8cd98f00b204e9800998ecf8427e';
|
657 |
+
}
|
658 |
+
}
|
659 |
+
|
660 |
}
|
src/fs/Locations.php
CHANGED
@@ -111,6 +111,7 @@ class Loco_fs_Locations extends ArrayObject {
|
|
111 |
if( ! self::$plugin ){
|
112 |
self::$plugin = new Loco_fs_Locations( array(
|
113 |
loco_constant('WP_PLUGIN_DIR'),
|
|
|
114 |
) );
|
115 |
}
|
116 |
return self::$plugin;
|
111 |
if( ! self::$plugin ){
|
112 |
self::$plugin = new Loco_fs_Locations( array(
|
113 |
loco_constant('WP_PLUGIN_DIR'),
|
114 |
+
loco_constant('WPMU_PLUGIN_DIR'),
|
115 |
) );
|
116 |
}
|
117 |
return self::$plugin;
|
src/fs/Revisions.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
class Loco_fs_Revisions implements Countable/*, IteratorAggregate*/ {
|
7 |
|
8 |
/**
|
9 |
-
* @var
|
10 |
*/
|
11 |
private $master;
|
12 |
|
@@ -140,7 +140,6 @@ class Loco_fs_Revisions implements Countable/*, IteratorAggregate*/ {
|
|
140 |
}
|
141 |
|
142 |
|
143 |
-
|
144 |
/**
|
145 |
* @return array
|
146 |
*/
|
@@ -163,7 +162,6 @@ class Loco_fs_Revisions implements Countable/*, IteratorAggregate*/ {
|
|
163 |
}
|
164 |
|
165 |
|
166 |
-
|
167 |
/**
|
168 |
* Parse a file path into a timestamp
|
169 |
* @param string
|
@@ -179,7 +177,6 @@ class Loco_fs_Revisions implements Countable/*, IteratorAggregate*/ {
|
|
179 |
}
|
180 |
|
181 |
|
182 |
-
|
183 |
/**
|
184 |
* Get number of backups plus master
|
185 |
* @return int
|
@@ -192,7 +189,6 @@ class Loco_fs_Revisions implements Countable/*, IteratorAggregate*/ {
|
|
192 |
}
|
193 |
|
194 |
|
195 |
-
|
196 |
/**
|
197 |
* Delete file when object removed from memory.
|
198 |
* Previously unlinked on shutdown, but doesn't work with WordPress file system abstraction
|
@@ -204,24 +200,29 @@ class Loco_fs_Revisions implements Countable/*, IteratorAggregate*/ {
|
|
204 |
}
|
205 |
|
206 |
|
207 |
-
|
208 |
/**
|
209 |
-
*
|
210 |
-
* @
|
211 |
-
*
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
}
|
222 |
-
closedir($dir);
|
223 |
}
|
224 |
-
return
|
225 |
-
}
|
226 |
|
227 |
}
|
6 |
class Loco_fs_Revisions implements Countable/*, IteratorAggregate*/ {
|
7 |
|
8 |
/**
|
9 |
+
* @var Loco_fs_File
|
10 |
*/
|
11 |
private $master;
|
12 |
|
140 |
}
|
141 |
|
142 |
|
|
|
143 |
/**
|
144 |
* @return array
|
145 |
*/
|
162 |
}
|
163 |
|
164 |
|
|
|
165 |
/**
|
166 |
* Parse a file path into a timestamp
|
167 |
* @param string
|
177 |
}
|
178 |
|
179 |
|
|
|
180 |
/**
|
181 |
* Get number of backups plus master
|
182 |
* @return int
|
189 |
}
|
190 |
|
191 |
|
|
|
192 |
/**
|
193 |
* Delete file when object removed from memory.
|
194 |
* Previously unlinked on shutdown, but doesn't work with WordPress file system abstraction
|
200 |
}
|
201 |
|
202 |
|
|
|
203 |
/**
|
204 |
+
* Execute backup of current file.
|
205 |
+
* @param Loco_api_WordPressFileSystem Authorized file system
|
206 |
+
* @return bool whether rotation
|
207 |
+
*/
|
208 |
+
public function rotate( Loco_api_WordPressFileSystem $api ){
|
209 |
+
$pofile = $this->master;
|
210 |
+
// backup existing file before overwriting, but still allow if backups fails
|
211 |
+
$num_backups = Loco_data_Settings::get()->num_backups;
|
212 |
+
if( $num_backups ){
|
213 |
+
try {
|
214 |
+
$api->authorizeCopy($this->master);
|
215 |
+
$this->create();
|
216 |
+
$this->prune($num_backups);
|
217 |
+
return true;
|
218 |
+
}
|
219 |
+
catch( Exception $e ){
|
220 |
+
Loco_error_AdminNotices::debug( $e->getMessage() );
|
221 |
+
$message = __('Failed to create backup file in "%s". Check file permissions or disable backups','loco-translate');
|
222 |
+
Loco_error_AdminNotices::warn( sprintf( $message, $pofile->getParent()->basename() ) );
|
223 |
}
|
|
|
224 |
}
|
225 |
+
return false;
|
226 |
+
}
|
227 |
|
228 |
}
|
src/gettext/Data.php
CHANGED
@@ -10,12 +10,13 @@ class Loco_gettext_Data extends LocoPoIterator implements JsonSerializable {
|
|
10 |
/**
|
11 |
* Normalize file extension to internal type
|
12 |
* @param Loco_fs_File
|
13 |
-
* @return string "po", "pot" or "mo"
|
14 |
* @throws Loco_error_Exception
|
15 |
*/
|
16 |
public static function ext( Loco_fs_File $file ){
|
17 |
$ext = rtrim( strtolower( $file->extension() ), '~' );
|
18 |
if( 'po' === $ext || 'pot' === $ext || 'mo' === $ext ){
|
|
|
19 |
return $ext;
|
20 |
}
|
21 |
// translators: Error thrown when attempting to parse a file that is not PO, POT or MO
|
10 |
/**
|
11 |
* Normalize file extension to internal type
|
12 |
* @param Loco_fs_File
|
13 |
+
* @return string Normalized file extension "po", "pot" or "mo"
|
14 |
* @throws Loco_error_Exception
|
15 |
*/
|
16 |
public static function ext( Loco_fs_File $file ){
|
17 |
$ext = rtrim( strtolower( $file->extension() ), '~' );
|
18 |
if( 'po' === $ext || 'pot' === $ext || 'mo' === $ext ){
|
19 |
+
// We could validate file location here, but file type restriction should be sufficient
|
20 |
return $ext;
|
21 |
}
|
22 |
// translators: Error thrown when attempting to parse a file that is not PO, POT or MO
|
src/gettext/Extraction.php
CHANGED
@@ -88,18 +88,20 @@ class Loco_gettext_Extraction {
|
|
88 |
if( function_exists('wp_raise_memory_limit') ){
|
89 |
wp_raise_memory_limit('loco');
|
90 |
}
|
91 |
-
/* @var $file
|
92 |
foreach( $project->findSourceFiles() as $file ){
|
93 |
$type = $opts->ext2type( $file->extension() );
|
94 |
$extr = loco_wp_extractor($type);
|
95 |
if( 'js' !== $type ) {
|
96 |
// skip large files for PHP, because token_get_all is hungry
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
|
|
|
|
103 |
}
|
104 |
// extract headers from theme PHP files in
|
105 |
if( $project->getBundle()->isTheme() ){
|
88 |
if( function_exists('wp_raise_memory_limit') ){
|
89 |
wp_raise_memory_limit('loco');
|
90 |
}
|
91 |
+
/* @var Loco_fs_File $file */
|
92 |
foreach( $project->findSourceFiles() as $file ){
|
93 |
$type = $opts->ext2type( $file->extension() );
|
94 |
$extr = loco_wp_extractor($type);
|
95 |
if( 'js' !== $type ) {
|
96 |
// skip large files for PHP, because token_get_all is hungry
|
97 |
+
if( 0 !== $max ){
|
98 |
+
$size = $file->size();
|
99 |
+
$this->maxbytes = max( $this->maxbytes, $size );
|
100 |
+
if( $size > $max ){
|
101 |
+
$list = $this->skipped or $list = ( $this->skipped = new Loco_fs_FileList() );
|
102 |
+
$list->add( $file );
|
103 |
+
continue;
|
104 |
+
}
|
105 |
}
|
106 |
// extract headers from theme PHP files in
|
107 |
if( $project->getBundle()->isTheme() ){
|
src/mvc/AdminRouter.php
CHANGED
@@ -192,8 +192,9 @@ class Loco_mvc_AdminRouter extends Loco_hooks_Hookable {
|
|
192 |
'{type}-debug' => 'bundle_Debug',
|
193 |
'lang-view' => 'bundle_Locale',
|
194 |
// file initialization
|
195 |
-
'{type}-msginit'
|
196 |
-
'{type}-xgettext'
|
|
|
197 |
// file resource views
|
198 |
'{type}-file-view' => 'file_View',
|
199 |
'{type}-file-edit' => 'file_Edit',
|
192 |
'{type}-debug' => 'bundle_Debug',
|
193 |
'lang-view' => 'bundle_Locale',
|
194 |
// file initialization
|
195 |
+
'{type}-msginit' => 'init_InitPo',
|
196 |
+
'{type}-xgettext' => 'init_InitPot',
|
197 |
+
'{type}-upload' => 'init_Upload',
|
198 |
// file resource views
|
199 |
'{type}-file-view' => 'file_View',
|
200 |
'{type}-file-edit' => 'file_Edit',
|
src/mvc/HiddenFields.php
CHANGED
@@ -28,6 +28,14 @@ class Loco_mvc_HiddenFields extends Loco_mvc_ViewParams {
|
|
28 |
}
|
29 |
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
/**
|
32 |
* Load postdata fields
|
33 |
* @param Loco_mvc_PostParams post data
|
@@ -39,5 +47,17 @@ class Loco_mvc_HiddenFields extends Loco_mvc_ViewParams {
|
|
39 |
}
|
40 |
return $this;
|
41 |
}
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
}
|
28 |
}
|
29 |
|
30 |
|
31 |
+
/**
|
32 |
+
* @return string
|
33 |
+
*/
|
34 |
+
public function getNonce() {
|
35 |
+
return $this['loco-nonce'];
|
36 |
+
}
|
37 |
+
|
38 |
+
|
39 |
/**
|
40 |
* Load postdata fields
|
41 |
* @param Loco_mvc_PostParams post data
|
47 |
}
|
48 |
return $this;
|
49 |
}
|
50 |
+
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Append arguments to a URL
|
54 |
+
* @param string optional base url
|
55 |
+
* @return string full URL with query string
|
56 |
+
*/
|
57 |
+
public function getHref( $base = '' ){
|
58 |
+
$query = http_build_query($this->getArrayCopy(),null,'&');
|
59 |
+
$sep = false === strpos($base,'?') ? '?' : '&';
|
60 |
+
return $base.$sep.$query;
|
61 |
+
}
|
62 |
+
|
63 |
}
|
src/package/Bundle.php
CHANGED
@@ -56,8 +56,8 @@ abstract class Loco_package_Bundle extends ArrayObject implements JsonSerializab
|
|
56 |
|
57 |
/**
|
58 |
* Get system (i.e. "global") target locations for all projects of this type.
|
59 |
-
* These are
|
60 |
-
* @return
|
61 |
*/
|
62 |
abstract public function getSystemTargets();
|
63 |
|
@@ -108,7 +108,28 @@ abstract class Loco_package_Bundle extends ArrayObject implements JsonSerializab
|
|
108 |
return $bundle;
|
109 |
}
|
110 |
|
111 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
/**
|
113 |
* Construct from WordPress handle and friendly name
|
114 |
* @param string
|
@@ -516,7 +537,7 @@ abstract class Loco_package_Bundle extends ArrayObject implements JsonSerializab
|
|
516 |
|
517 |
/**
|
518 |
* Do basic configuration from bundle meta data (file headers)
|
519 |
-
* @param array header tags from theme or plugin
|
520 |
* @return bool whether configured
|
521 |
*/
|
522 |
public function configureMeta( array $header ){
|
@@ -539,16 +560,15 @@ abstract class Loco_package_Bundle extends ArrayObject implements JsonSerializab
|
|
539 |
if( isset($header['DomainPath']) && ( $path = trim($header['DomainPath'],'/') ) ){
|
540 |
$project->addTargetDirectory( $base.'/'.$path );
|
541 |
}
|
542 |
-
else if( $this->solo ){
|
543 |
-
// skip
|
544 |
-
}
|
545 |
// else use standard language path if it exists
|
546 |
-
else if(
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
|
|
|
|
552 |
}
|
553 |
// single file bundles can have only one source file
|
554 |
if( $this->solo ){
|
@@ -576,6 +596,8 @@ abstract class Loco_package_Bundle extends ArrayObject implements JsonSerializab
|
|
576 |
* Configure bundle from canonical sources.
|
577 |
* Source order is "db","file","meta" where meta is the auto-config fallback.
|
578 |
* No deep scanning is performed at this point
|
|
|
|
|
579 |
* @return Loco_package_Bundle
|
580 |
*/
|
581 |
public function configure( $base, array $header ){
|
@@ -587,18 +609,20 @@ abstract class Loco_package_Bundle extends ArrayObject implements JsonSerializab
|
|
587 |
|
588 |
/**
|
589 |
* Get the custom config saved in WordPress DB for this bundle
|
590 |
-
* @return Loco_config_CustomSaved
|
591 |
*/
|
592 |
public function getCustomConfig(){
|
593 |
$custom = new Loco_config_CustomSaved;
|
594 |
if( $custom->setBundle($this)->fetch() ){
|
595 |
return $custom;
|
596 |
}
|
|
|
597 |
}
|
598 |
|
599 |
|
600 |
/**
|
601 |
* Inherit another bundle. Used for child themes to display parent translations
|
|
|
602 |
* @return Loco_package_Bundle
|
603 |
*/
|
604 |
public function inherit( Loco_package_Bundle $parent ){
|
@@ -634,11 +658,11 @@ abstract class Loco_package_Bundle extends ArrayObject implements JsonSerializab
|
|
634 |
|
635 |
|
636 |
/**
|
637 |
-
* @return Loco_package_Project
|
638 |
*/
|
639 |
public function getDefaultProject(){
|
640 |
$i = 0;
|
641 |
-
/* @var $project
|
642 |
foreach( $this as $project ){
|
643 |
if( $project->isDomainDefault() ){
|
644 |
return $project;
|
@@ -649,6 +673,7 @@ abstract class Loco_package_Bundle extends ArrayObject implements JsonSerializab
|
|
649 |
if( 1 === $i ){
|
650 |
return $project;
|
651 |
}
|
|
|
652 |
}
|
653 |
|
654 |
|
56 |
|
57 |
/**
|
58 |
* Get system (i.e. "global") target locations for all projects of this type.
|
59 |
+
* These are always append to configs, and always excluded from serialization
|
60 |
+
* @return string[] absolute directory paths
|
61 |
*/
|
62 |
abstract public function getSystemTargets();
|
63 |
|
108 |
return $bundle;
|
109 |
}
|
110 |
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Resolve a file path to a plugin, theme or the core
|
114 |
+
* @param Loco_fs_File
|
115 |
+
* @return Loco_package_Bundle|null
|
116 |
+
*/
|
117 |
+
public static function fromFile( Loco_fs_File $file ){
|
118 |
+
if( $file->underThemeDirectory() ){
|
119 |
+
return Loco_package_Theme::fromFile($file);
|
120 |
+
}
|
121 |
+
else if( $file->underPluginDirectory() ){
|
122 |
+
return Loco_package_Plugin::fromFile($file);
|
123 |
+
}
|
124 |
+
else if( $file->underWordPressDirectory() && ! $file->underContentDirectory() ){
|
125 |
+
return Loco_package_Core::create();
|
126 |
+
}
|
127 |
+
else {
|
128 |
+
return null;
|
129 |
+
}
|
130 |
+
}
|
131 |
+
|
132 |
+
|
133 |
/**
|
134 |
* Construct from WordPress handle and friendly name
|
135 |
* @param string
|
537 |
|
538 |
/**
|
539 |
* Do basic configuration from bundle meta data (file headers)
|
540 |
+
* @param array header tags from theme or plugin bootstrap file
|
541 |
* @return bool whether configured
|
542 |
*/
|
543 |
public function configureMeta( array $header ){
|
560 |
if( isset($header['DomainPath']) && ( $path = trim($header['DomainPath'],'/') ) ){
|
561 |
$project->addTargetDirectory( $base.'/'.$path );
|
562 |
}
|
|
|
|
|
|
|
563 |
// else use standard language path if it exists
|
564 |
+
else if( ! $this->solo ){
|
565 |
+
if( is_dir($base.'/languages') ) {
|
566 |
+
$project->addTargetDirectory($base.'/languages');
|
567 |
+
}
|
568 |
+
// else add bundle root by default
|
569 |
+
else {
|
570 |
+
$project->addTargetDirectory($base);
|
571 |
+
}
|
572 |
}
|
573 |
// single file bundles can have only one source file
|
574 |
if( $this->solo ){
|
596 |
* Configure bundle from canonical sources.
|
597 |
* Source order is "db","file","meta" where meta is the auto-config fallback.
|
598 |
* No deep scanning is performed at this point
|
599 |
+
* @param string
|
600 |
+
* @param string[] header tags from theme or plugin bootstrap file
|
601 |
* @return Loco_package_Bundle
|
602 |
*/
|
603 |
public function configure( $base, array $header ){
|
609 |
|
610 |
/**
|
611 |
* Get the custom config saved in WordPress DB for this bundle
|
612 |
+
* @return Loco_config_CustomSaved|null
|
613 |
*/
|
614 |
public function getCustomConfig(){
|
615 |
$custom = new Loco_config_CustomSaved;
|
616 |
if( $custom->setBundle($this)->fetch() ){
|
617 |
return $custom;
|
618 |
}
|
619 |
+
return null;
|
620 |
}
|
621 |
|
622 |
|
623 |
/**
|
624 |
* Inherit another bundle. Used for child themes to display parent translations
|
625 |
+
* @param Loco_package_Bundle
|
626 |
* @return Loco_package_Bundle
|
627 |
*/
|
628 |
public function inherit( Loco_package_Bundle $parent ){
|
658 |
|
659 |
|
660 |
/**
|
661 |
+
* @return Loco_package_Project|null
|
662 |
*/
|
663 |
public function getDefaultProject(){
|
664 |
$i = 0;
|
665 |
+
/* @var Loco_package_Project $project */
|
666 |
foreach( $this as $project ){
|
667 |
if( $project->isDomainDefault() ){
|
668 |
return $project;
|
673 |
if( 1 === $i ){
|
674 |
return $project;
|
675 |
}
|
676 |
+
return null;
|
677 |
}
|
678 |
|
679 |
|
src/package/Plugin.php
CHANGED
@@ -238,5 +238,32 @@ class Loco_package_Plugin extends Loco_package_Bundle {
|
|
238 |
|
239 |
return $bundle;
|
240 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
|
242 |
-
}
|
238 |
|
239 |
return $bundle;
|
240 |
}
|
241 |
+
|
242 |
+
|
243 |
+
/**
|
244 |
+
* {@inheritDoc}
|
245 |
+
*/
|
246 |
+
public static function fromFile( Loco_fs_File $file ){
|
247 |
+
$find = $file->getPath();
|
248 |
+
foreach( self::get_plugins() as $handle => $data ){
|
249 |
+
$boot = new Loco_fs_File( $handle );
|
250 |
+
$boot->normalize( $data['basedir'] );
|
251 |
+
// single file plugins can only match if given file is the plugin file itself.
|
252 |
+
if( basename($handle) === $handle ){
|
253 |
+
if( $boot->getPath() === $file ){
|
254 |
+
return self::create($handle);
|
255 |
+
}
|
256 |
+
}
|
257 |
+
// else check file is under plugin root.
|
258 |
+
else {
|
259 |
+
$base = $boot->dirname();
|
260 |
+
$path = $base.substr( $find, strlen($base) );
|
261 |
+
if( $path === $find ){
|
262 |
+
return self::create($handle);
|
263 |
+
}
|
264 |
+
}
|
265 |
+
}
|
266 |
+
return null;
|
267 |
+
}
|
268 |
|
269 |
+
}
|
src/package/Project.php
CHANGED
@@ -731,23 +731,19 @@ class Loco_package_Project {
|
|
731 |
$suffix = sprintf( '%s.po', $locale );
|
732 |
$prefix = $slug ? sprintf('%s-',$slug) : '';
|
733 |
$choice = new Loco_fs_FileList;
|
734 |
-
/* @var $dir
|
735 |
foreach( $this->getConfiguredTargets() as $dir ){
|
736 |
// theme files under their own directory normally have no file prefix
|
737 |
if( $default && $dir->underThemeDirectory() ){
|
738 |
$path = $dir->getPath().'/'.$suffix;
|
739 |
}
|
740 |
-
// plugin files are prefixed even in their own directory, so empty prefix here implies incorrect bundle configuration
|
741 |
-
//else if( $default && ! $prefix && $dir->underPluginDirectory() ){
|
742 |
-
// $path = $dir->getPath().'/'.$domain.'-'.$suffix;
|
743 |
-
//}
|
744 |
// all other paths use configured prefix, which may be empty
|
745 |
else {
|
746 |
$path = $dir->getPath().'/'.$prefix.$suffix;
|
747 |
}
|
748 |
$choice->add( new Loco_fs_LocaleFile($path) );
|
749 |
}
|
750 |
-
/* @var $dir
|
751 |
foreach( $this->getSystemTargets() as $dir ){
|
752 |
$path = $dir->getPath();
|
753 |
// themes and plugins under global locations will be loaded by domain, regardless of prefix
|
@@ -765,6 +761,26 @@ class Loco_package_Project {
|
|
765 |
}
|
766 |
|
767 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
768 |
/**
|
769 |
* Get newest timestamp of all translation files (includes template, but exclude source files)
|
770 |
* @return int
|
731 |
$suffix = sprintf( '%s.po', $locale );
|
732 |
$prefix = $slug ? sprintf('%s-',$slug) : '';
|
733 |
$choice = new Loco_fs_FileList;
|
734 |
+
/* @var Loco_fs_Directory $dir */
|
735 |
foreach( $this->getConfiguredTargets() as $dir ){
|
736 |
// theme files under their own directory normally have no file prefix
|
737 |
if( $default && $dir->underThemeDirectory() ){
|
738 |
$path = $dir->getPath().'/'.$suffix;
|
739 |
}
|
|
|
|
|
|
|
|
|
740 |
// all other paths use configured prefix, which may be empty
|
741 |
else {
|
742 |
$path = $dir->getPath().'/'.$prefix.$suffix;
|
743 |
}
|
744 |
$choice->add( new Loco_fs_LocaleFile($path) );
|
745 |
}
|
746 |
+
/* @var Loco_fs_Directory $dir */
|
747 |
foreach( $this->getSystemTargets() as $dir ){
|
748 |
$path = $dir->getPath();
|
749 |
// themes and plugins under global locations will be loaded by domain, regardless of prefix
|
761 |
}
|
762 |
|
763 |
|
764 |
+
/**
|
765 |
+
* Initialize a PO file path from required location
|
766 |
+
* @param Loco_fs_Directory
|
767 |
+
* @param Loco_Locale
|
768 |
+
* @return Loco_fs_LocaleFile
|
769 |
+
* @throws Loco_error_Exception
|
770 |
+
*/
|
771 |
+
public function initLocaleFile( Loco_fs_Directory $dir, Loco_Locale $locale ){
|
772 |
+
$choice = $this->initLocaleFiles($locale);
|
773 |
+
$pattern = '!^'.preg_quote($dir->getPath(),'!').'/[^/.]+\\.po$!';
|
774 |
+
/* @var Loco_fs_LocaleFile $file */
|
775 |
+
foreach( $choice as $file ){
|
776 |
+
if( preg_match($pattern,$file->getPath()) ){
|
777 |
+
return $file;
|
778 |
+
}
|
779 |
+
}
|
780 |
+
throw new Loco_error_Exception('Unexpected file location: '.$dir );
|
781 |
+
}
|
782 |
+
|
783 |
+
|
784 |
/**
|
785 |
* Get newest timestamp of all translation files (includes template, but exclude source files)
|
786 |
* @return int
|
src/package/Theme.php
CHANGED
@@ -75,16 +75,18 @@ class Loco_package_Theme extends Loco_package_Bundle {
|
|
75 |
* Create theme bundle definition from WordPress theme handle
|
76 |
*
|
77 |
* @param string short name of theme, e.g. "twentyfifteen"
|
78 |
-
* @
|
|
|
79 |
*/
|
80 |
-
public static function create( $slug, $root =
|
81 |
return self::createFromTheme( wp_get_theme( $slug, $root ) );
|
82 |
}
|
83 |
|
84 |
|
85 |
-
|
86 |
/**
|
87 |
* Create theme bundle definition from WordPress theme data
|
|
|
|
|
88 |
*/
|
89 |
public static function createFromTheme( WP_Theme $theme ){
|
90 |
$slug = $theme->get_stylesheet();
|
@@ -130,5 +132,22 @@ class Loco_package_Theme extends Loco_package_Bundle {
|
|
130 |
// do_action( 'loco_bundle_configured', $bundle );
|
131 |
|
132 |
return $bundle;
|
133 |
-
}
|
134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
* Create theme bundle definition from WordPress theme handle
|
76 |
*
|
77 |
* @param string short name of theme, e.g. "twentyfifteen"
|
78 |
+
* @param string theme root if known
|
79 |
+
* @return Loco_package_Theme
|
80 |
*/
|
81 |
+
public static function create( $slug, $root = '' ){
|
82 |
return self::createFromTheme( wp_get_theme( $slug, $root ) );
|
83 |
}
|
84 |
|
85 |
|
|
|
86 |
/**
|
87 |
* Create theme bundle definition from WordPress theme data
|
88 |
+
* @param WP_Theme
|
89 |
+
* @return Loco_package_Theme
|
90 |
*/
|
91 |
public static function createFromTheme( WP_Theme $theme ){
|
92 |
$slug = $theme->get_stylesheet();
|
132 |
// do_action( 'loco_bundle_configured', $bundle );
|
133 |
|
134 |
return $bundle;
|
135 |
+
}
|
136 |
+
|
137 |
+
|
138 |
+
/**
|
139 |
+
* {@inheritDoc}
|
140 |
+
*/
|
141 |
+
public static function fromFile( Loco_fs_File $file ){
|
142 |
+
$find = $file->getPath();
|
143 |
+
foreach( wp_get_themes( array('errors'=>null) ) as $theme ){
|
144 |
+
$base = $theme->get_stylesheet_directory();
|
145 |
+
$path = $base.substr( $find, strlen($base) );
|
146 |
+
if( $find === $path ){
|
147 |
+
return self::createFromTheme($theme);
|
148 |
+
}
|
149 |
+
}
|
150 |
+
return null;
|
151 |
+
}
|
152 |
+
|
153 |
+
}
|
src/test/WordPressTestCase.php
CHANGED
@@ -36,7 +36,9 @@ abstract class Loco_test_WordPressTestCase extends WP_UnitTestCase {
|
|
36 |
*/
|
37 |
protected static function dropOptions(){
|
38 |
global $wpdb;
|
39 |
-
|
|
|
|
|
40 |
if( $results = $wpdb->get_results($query,ARRAY_N) ){
|
41 |
foreach( $results as $row ){
|
42 |
list( $option_name ) = $row;
|
@@ -439,6 +441,8 @@ abstract class Loco_test_WordPressTestCase extends WP_UnitTestCase {
|
|
439 |
|
440 |
|
441 |
/**
|
|
|
|
|
442 |
* @return string location
|
443 |
*/
|
444 |
public function assertRedirected( $status = 302, $message = 'Failed to redirect' ){
|
@@ -451,18 +455,21 @@ abstract class Loco_test_WordPressTestCase extends WP_UnitTestCase {
|
|
451 |
|
452 |
/**
|
453 |
* Set $_POST
|
|
|
454 |
* @return void
|
455 |
*/
|
456 |
public function setPostArray( array $post ){
|
457 |
$_POST = $post;
|
458 |
$_REQUEST = array_merge( $_GET, $_POST, $_COOKIE );
|
459 |
$_SERVER['REQUEST_METHOD'] = 'POST';
|
|
|
460 |
Loco_mvc_PostParams::destroy();
|
461 |
}
|
462 |
|
463 |
|
464 |
/**
|
465 |
* Augment $_POST
|
|
|
466 |
* @return void
|
467 |
*/
|
468 |
public function addPostArray( array $post ){
|
@@ -472,21 +479,47 @@ abstract class Loco_test_WordPressTestCase extends WP_UnitTestCase {
|
|
472 |
|
473 |
/**
|
474 |
* Set $_GET
|
|
|
475 |
* @return void
|
476 |
*/
|
477 |
public function setGetArray( array $get ){
|
478 |
$_GET = $get;
|
479 |
$_REQUEST = array_merge( $_GET, $_POST, $_COOKIE );
|
480 |
$_SERVER['REQUEST_METHOD'] = 'GET';
|
|
|
481 |
}
|
482 |
|
483 |
|
484 |
/**
|
485 |
* Augment $_GET
|
|
|
486 |
* @return void
|
487 |
*/
|
488 |
public function addGetArray( array $get ){
|
489 |
$this->setGetArray( $get + $_GET );
|
490 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
491 |
|
492 |
}
|
36 |
*/
|
37 |
protected static function dropOptions(){
|
38 |
global $wpdb;
|
39 |
+
|
40 |
+
$args = array('loco_%','_%_loco_%','%_auto_update_%');
|
41 |
+
$query = $wpdb->prepare( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE '%s' OR option_name LIKE '%s' OR option_name LIKE '%s';", $args );
|
42 |
if( $results = $wpdb->get_results($query,ARRAY_N) ){
|
43 |
foreach( $results as $row ){
|
44 |
list( $option_name ) = $row;
|
441 |
|
442 |
|
443 |
/**
|
444 |
+
* @param int
|
445 |
+
* @param string
|
446 |
* @return string location
|
447 |
*/
|
448 |
public function assertRedirected( $status = 302, $message = 'Failed to redirect' ){
|
455 |
|
456 |
/**
|
457 |
* Set $_POST
|
458 |
+
* @param string[]
|
459 |
* @return void
|
460 |
*/
|
461 |
public function setPostArray( array $post ){
|
462 |
$_POST = $post;
|
463 |
$_REQUEST = array_merge( $_GET, $_POST, $_COOKIE );
|
464 |
$_SERVER['REQUEST_METHOD'] = 'POST';
|
465 |
+
$_FILES = array();
|
466 |
Loco_mvc_PostParams::destroy();
|
467 |
}
|
468 |
|
469 |
|
470 |
/**
|
471 |
* Augment $_POST
|
472 |
+
* @param string[]
|
473 |
* @return void
|
474 |
*/
|
475 |
public function addPostArray( array $post ){
|
479 |
|
480 |
/**
|
481 |
* Set $_GET
|
482 |
+
* @param string[]
|
483 |
* @return void
|
484 |
*/
|
485 |
public function setGetArray( array $get ){
|
486 |
$_GET = $get;
|
487 |
$_REQUEST = array_merge( $_GET, $_POST, $_COOKIE );
|
488 |
$_SERVER['REQUEST_METHOD'] = 'GET';
|
489 |
+
$_FILES = array();
|
490 |
}
|
491 |
|
492 |
|
493 |
/**
|
494 |
* Augment $_GET
|
495 |
+
* @param string[]
|
496 |
* @return void
|
497 |
*/
|
498 |
public function addGetArray( array $get ){
|
499 |
$this->setGetArray( $get + $_GET );
|
500 |
}
|
501 |
+
|
502 |
+
|
503 |
+
/**
|
504 |
+
* @param string _FILES key
|
505 |
+
* @param string real file on local system that would be uploaded
|
506 |
+
*/
|
507 |
+
public function addFileUpload( $key, $path ){
|
508 |
+
if( 'POST' !== $_SERVER['REQUEST_METHOD'] ){
|
509 |
+
throw new LogicException('Set POST method before adding to files collection');
|
510 |
+
}
|
511 |
+
$src = file_get_contents($path);
|
512 |
+
$tmp = tempnam(LOCO_TEST_DATA_ROOT.'/tmp','phpunit');
|
513 |
+
$len = file_put_contents( $tmp, $src);
|
514 |
+
if( $len !== strlen($src) ){
|
515 |
+
throw new Exception('Bad file params');
|
516 |
+
}
|
517 |
+
$_FILES[$key] = array (
|
518 |
+
'error' => 0,
|
519 |
+
'tmp_name' => $tmp,
|
520 |
+
'name' => basename($path),
|
521 |
+
);
|
522 |
+
}
|
523 |
+
|
524 |
|
525 |
}
|
tpl/admin/config/debug.php
CHANGED
@@ -5,6 +5,7 @@
|
|
5 |
$this->extend('../layout');
|
6 |
|
7 |
/* @var Loco_mvc_ViewParams $versions */
|
|
|
8 |
?>
|
9 |
|
10 |
<div class="panel" id="loco-versions">
|
@@ -35,7 +36,10 @@ $this->extend('../layout');
|
|
35 |
<dd><?php echo $encoding->OK?> <span id="loco-utf8-check"><?php echo $encoding->tick?></span></dd>
|
36 |
|
37 |
<dt>Multibyte support:</dt>
|
38 |
-
<dd><?php
|
|
|
|
|
|
|
39 |
</dl>
|
40 |
</div>
|
41 |
|
5 |
$this->extend('../layout');
|
6 |
|
7 |
/* @var Loco_mvc_ViewParams $versions */
|
8 |
+
/* @var Loco_mvc_ViewParams $encoding */
|
9 |
?>
|
10 |
|
11 |
<div class="panel" id="loco-versions">
|
36 |
<dd><?php echo $encoding->OK?> <span id="loco-utf8-check"><?php echo $encoding->tick?></span></dd>
|
37 |
|
38 |
<dt>Multibyte support:</dt>
|
39 |
+
<dd><?php $encoding->e('mbstring')?></dd>
|
40 |
+
|
41 |
+
<dt>Site character set</dt>
|
42 |
+
<dd><?php $encoding->e('charset')?></dd>
|
43 |
</dl>
|
44 |
</div>
|
45 |
|
tpl/admin/file/edit-po.php
CHANGED
@@ -6,64 +6,3 @@ $this->extend('editor');
|
|
6 |
$this->start('header');
|
7 |
|
8 |
echo $this->render('../common/inc-po-header');
|
9 |
-
|
10 |
-
|
11 |
-
/* @var Loco_mvc_ViewParams $js */
|
12 |
-
$help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/providers');
|
13 |
-
|
14 |
-
// inline modal for auto-translate. Note that modal will be placed outside of #loco.wrap element
|
15 |
-
if( $js->apis ):?>
|
16 |
-
<div id="loco-auto" class="loco-batch" title="<?php esc_html_e('Auto-translate this file','loco-translate');?>">
|
17 |
-
<form action="#">
|
18 |
-
<fieldset>
|
19 |
-
<select name="api" id="auto-api"><?php foreach( $js->apis as $api ):?>
|
20 |
-
<option value="<?php self::e($api['id'])?>"><?php self::e($api['name'])?></option><?php
|
21 |
-
endforeach?>
|
22 |
-
</select>
|
23 |
-
</fieldset>
|
24 |
-
<fieldset>
|
25 |
-
<p>
|
26 |
-
<label for="auto-existing">
|
27 |
-
<input type="checkbox" id="auto-existing" name="existing" />
|
28 |
-
<?php esc_html_e('Overwrite existing translations','loco-translate')?>
|
29 |
-
</label>
|
30 |
-
</p>
|
31 |
-
<p>
|
32 |
-
<label for="auto-fuzzy">
|
33 |
-
<input type="checkbox" id="auto-fuzzy" name="fuzzy" />
|
34 |
-
<?php esc_html_e('Mark new translations as Fuzzy','loco-translate')?>
|
35 |
-
</label>
|
36 |
-
</p>
|
37 |
-
<blockquote id="loco-job-progress">
|
38 |
-
Initializing...
|
39 |
-
</blockquote>
|
40 |
-
<p>
|
41 |
-
<button type="submit" class="button button-primary has-icon icon-translate">
|
42 |
-
<span><?php esc_html_e('Translate','loco-translate')?></span>
|
43 |
-
</button>
|
44 |
-
<a href="<?php self::e($help)?>" class="button button-link has-icon icon-help" target="_blank"><?php
|
45 |
-
esc_html_e('Help','loco-translate');
|
46 |
-
?></a>
|
47 |
-
</p>
|
48 |
-
</fieldset>
|
49 |
-
</form>
|
50 |
-
</div><?php
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
// inline modal for when no APIs are configured.
|
55 |
-
else:?>
|
56 |
-
<div id="loco-auto" class="loco-alert" title="<?php esc_html_e('No translation APIs configured','loco-translate');?>">
|
57 |
-
<p>
|
58 |
-
<?php esc_html_e('Add automatic translation services in the plugin settings.','loco-translate')?>
|
59 |
-
</p>
|
60 |
-
<nav>
|
61 |
-
<a href="<?php $this->route('config-apis')->e('href')?>" class="has-icon icon-cog"><?php
|
62 |
-
esc_html_e('Settings','loco-translate');
|
63 |
-
?></a>
|
64 |
-
<a href="<?php self::e($help)?>" class="has-icon icon-help" target="_blank"><?php
|
65 |
-
esc_html_e('Help','loco-translate');
|
66 |
-
?></a>
|
67 |
-
</nav>
|
68 |
-
</div><?php
|
69 |
-
endif;
|
6 |
$this->start('header');
|
7 |
|
8 |
echo $this->render('../common/inc-po-header');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tpl/admin/file/editor.php
CHANGED
@@ -9,12 +9,13 @@ echo $header;
|
|
9 |
/* @var Loco_mvc_ViewParams $js */
|
10 |
/* @var Loco_mvc_ViewParams $ui */
|
11 |
/* @var Loco_mvc_ViewParams $params */
|
|
|
12 |
/* @var Loco_mvc_HiddenFields $dlFields */
|
13 |
?>
|
14 |
|
15 |
<div id="loco-editor">
|
16 |
-
|
17 |
-
<nav
|
18 |
<form action="#" id="loco-actions">
|
19 |
<fieldset>
|
20 |
<button class="button has-icon icon-save" data-loco="save" disabled>
|
9 |
/* @var Loco_mvc_ViewParams $js */
|
10 |
/* @var Loco_mvc_ViewParams $ui */
|
11 |
/* @var Loco_mvc_ViewParams $params */
|
12 |
+
/* @var Loco_mvc_ViewParams $locale */
|
13 |
/* @var Loco_mvc_HiddenFields $dlFields */
|
14 |
?>
|
15 |
|
16 |
<div id="loco-editor">
|
17 |
+
|
18 |
+
<nav class="wp-core-ui">
|
19 |
<form action="#" id="loco-actions">
|
20 |
<fieldset>
|
21 |
<button class="button has-icon icon-save" data-loco="save" disabled>
|
tpl/admin/file/info-po.php
CHANGED
@@ -5,10 +5,14 @@
|
|
5 |
$this->extend('info');
|
6 |
$this->start('header');
|
7 |
/* @var Loco_mvc_FileParams $file */
|
|
|
8 |
/* @var Loco_gettext_Metadata $meta */
|
9 |
?>
|
10 |
|
11 |
<div class="notice inline notice-info">
|
|
|
|
|
|
|
12 |
<h3>
|
13 |
<a href="<?php $locale->e('href')?>" class="has-lang">
|
14 |
<span class="<?php $locale->e('icon')?>" lang="<?php $locale->e('lang')?>"><code><?php $locale->e('code')?></code></span>
|
5 |
$this->extend('info');
|
6 |
$this->start('header');
|
7 |
/* @var Loco_mvc_FileParams $file */
|
8 |
+
/* @var Loco_mvc_FileParams $locale */
|
9 |
/* @var Loco_gettext_Metadata $meta */
|
10 |
?>
|
11 |
|
12 |
<div class="notice inline notice-info">
|
13 |
+
<nav>
|
14 |
+
<a class="icon only-icon icon-download" title="Download" href="<?php $file->e('download')?>"><span>download</span></a>
|
15 |
+
</nav>
|
16 |
<h3>
|
17 |
<a href="<?php $locale->e('href')?>" class="has-lang">
|
18 |
<span class="<?php $locale->e('icon')?>" lang="<?php $locale->e('lang')?>"><code><?php $locale->e('code')?></code></span>
|
tpl/admin/file/info-pot.php
CHANGED
@@ -9,7 +9,12 @@ $this->start('header');
|
|
9 |
?>
|
10 |
|
11 |
<div class="notice inline notice-info">
|
12 |
-
<
|
|
|
|
|
|
|
|
|
|
|
13 |
<dl>
|
14 |
<dt><?php self::e( __('File size','loco-translate') )?>:</dt>
|
15 |
<dd><?php $file->e('size')?></dd>
|
9 |
?>
|
10 |
|
11 |
<div class="notice inline notice-info">
|
12 |
+
<nav>
|
13 |
+
<a class="icon only-icon icon-download" title="Download" href="<?php $file->e('download')?>"><span>download</span></a>
|
14 |
+
</nav>
|
15 |
+
<h3>
|
16 |
+
<?php esc_html_e('Template file','loco-translate')?>
|
17 |
+
</h3>
|
18 |
<dl>
|
19 |
<dt><?php self::e( __('File size','loco-translate') )?>:</dt>
|
20 |
<dd><?php $file->e('size')?></dd>
|
tpl/admin/file/info.php
CHANGED
@@ -4,9 +4,9 @@
|
|
4 |
*/
|
5 |
$this->extend('../layout');
|
6 |
echo $header;
|
|
|
7 |
?>
|
8 |
|
9 |
-
|
10 |
<?php
|
11 |
if( ! $file->existent ):?>
|
12 |
<div class="notice inline notice-error">
|
4 |
*/
|
5 |
$this->extend('../layout');
|
6 |
echo $header;
|
7 |
+
/* @var Loco_mvc_FileParams $file */
|
8 |
?>
|
9 |
|
|
|
10 |
<?php
|
11 |
if( ! $file->existent ):?>
|
12 |
<div class="notice inline notice-error">
|
tpl/admin/file/move-po.php
CHANGED
@@ -21,7 +21,7 @@ $this->start('source');
|
|
21 |
<p class="description"><?php $location->e('label')?>:</p>
|
22 |
</td>
|
23 |
<td><?php
|
24 |
-
/* @var
|
25 |
foreach( $location['paths'] as $choice ):?>
|
26 |
<p><?php
|
27 |
if( $choice->active ):?>
|
21 |
<p class="description"><?php $location->e('label')?>:</p>
|
22 |
</td>
|
23 |
<td><?php
|
24 |
+
/* @var Loco_mvc_ViewParams $choice */
|
25 |
foreach( $location['paths'] as $choice ):?>
|
26 |
<p><?php
|
27 |
if( $choice->active ):?>
|
tpl/admin/file/move.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
$this->extend('../layout');
|
6 |
?>
|
7 |
|
8 |
-
<form action="" method="post" enctype="application/x-www-form-urlencoded" id="loco-
|
9 |
/* @var Loco_mvc_HiddenFields $hidden */
|
10 |
$hidden->_e();
|
11 |
echo $source?>
|
5 |
$this->extend('../layout');
|
6 |
?>
|
7 |
|
8 |
+
<form action="" method="post" enctype="application/x-www-form-urlencoded" id="loco-main"><?php
|
9 |
/* @var Loco_mvc_HiddenFields $hidden */
|
10 |
$hidden->_e();
|
11 |
echo $source?>
|
tpl/admin/help/side-bar.php
CHANGED
@@ -9,5 +9,8 @@
|
|
9 |
<a href="<?php echo esc_url( apply_filters('loco_external','https://wordpress.org/plugins/loco-translate/') )?>" target="_blank"><?php esc_html_e('Official plugin page','loco-translate')?></a>
|
10 |
</p>
|
11 |
<p>
|
12 |
-
<a href="<?php echo esc_url( apply_filters('loco_external','https://
|
|
|
|
|
|
|
13 |
</p>
|
9 |
<a href="<?php echo esc_url( apply_filters('loco_external','https://wordpress.org/plugins/loco-translate/') )?>" target="_blank"><?php esc_html_e('Official plugin page','loco-translate')?></a>
|
10 |
</p>
|
11 |
<p>
|
12 |
+
<a href="<?php echo esc_url( apply_filters('loco_external','https://wordpress.org/support/plugin/loco-translate/') )?>" target="_blank"><?php esc_html_e('Support forum','loco-translate')?></a>
|
13 |
+
</p>
|
14 |
+
<p>
|
15 |
+
<a href="<?php echo esc_url( apply_filters('loco_external','https://localise.biz/wordpress/plugin') )?>" target="_blank"><?php esc_html_e('Info and tutorials','loco-translate')?></a>
|
16 |
</p>
|
tpl/admin/init/upload.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Generic upload template for installing a file into a translation set.
|
4 |
+
*/
|
5 |
+
$this->extend('../layout');
|
6 |
+
/* @var Loco_mvc_ViewParams $params */
|
7 |
+
?>
|
8 |
+
|
9 |
+
<form action="" method="post" enctype="multipart/form-data" id="loco-main"><?php
|
10 |
+
/* @var Loco_mvc_HiddenFields $hidden */
|
11 |
+
$hidden->_e();?>
|
12 |
+
|
13 |
+
<div class="notice inline notice-generic">
|
14 |
+
<h2>
|
15 |
+
<?php self::e( __('Choose a location','loco-translate') );?>
|
16 |
+
</h2>
|
17 |
+
<table class="form-table">
|
18 |
+
<tbody class="loco-paths"><?php
|
19 |
+
/* @var Loco_mvc_ViewParams[] $locations */
|
20 |
+
foreach( $locations as $typeId => $location ):?>
|
21 |
+
<tr class="compact">
|
22 |
+
<td>
|
23 |
+
<p class="description"><?php $location->e('label')?>:</p>
|
24 |
+
</td>
|
25 |
+
<td><?php
|
26 |
+
/* @var Loco_mvc_ViewParams $choice */
|
27 |
+
/* @var Loco_mvc_FileParams $parent */
|
28 |
+
foreach( $location['paths'] as $choice ):
|
29 |
+
$parent = $choice['parent'];?>
|
30 |
+
<p>
|
31 |
+
<label>
|
32 |
+
<input type="radio" name="dir" value="<?php $parent->e('relpath')?>" />
|
33 |
+
<code class="path"><?php $parent->e('relpath')?>/<?php echo $choice->holder?></code>
|
34 |
+
</label>
|
35 |
+
</p><?php
|
36 |
+
endforeach?>
|
37 |
+
</td>
|
38 |
+
</tr><?php
|
39 |
+
endforeach?>
|
40 |
+
</tbody>
|
41 |
+
</table>
|
42 |
+
</div>
|
43 |
+
<div class="notice inline notice-info">
|
44 |
+
<h2>
|
45 |
+
Upload PO file
|
46 |
+
</h2>
|
47 |
+
<p>
|
48 |
+
Your file must be named as shown above where <code>{locale}</code> is the language code, e.g. <code><?php $params->e('locale')?></code>.
|
49 |
+
</p>
|
50 |
+
<p>
|
51 |
+
<input type="file" name="f" />
|
52 |
+
</p>
|
53 |
+
<p class="submit">
|
54 |
+
<button type="submit" class="button button-large button-primary has-icon icon-upload" disabled><?php esc_html_e('Upload','loco-translate')?></button>
|
55 |
+
</p>
|
56 |
+
</div>
|
57 |
+
</form>
|
58 |
+
|
tpl/ajax/modal-apis-batch.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Modal for batch translate of PO file currently in editor
|
4 |
+
*/
|
5 |
+
|
6 |
+
/* @var Loco_mvc_ViewParams $help */
|
7 |
+
/* @var Loco_mvc_ViewParams $prof */
|
8 |
+
/* @var array[] $apis */
|
9 |
+
|
10 |
+
?><div id="loco-auto" class="loco-batch" title="<?php esc_html_e('Auto-translate this file','loco-translate');?>">
|
11 |
+
<form action="#">
|
12 |
+
<fieldset>
|
13 |
+
<select name="api" id="auto-api"><?php
|
14 |
+
foreach( $apis as $a ): $api = new Loco_mvc_ViewParams($a);?>
|
15 |
+
<option value="<?php $api->e('id')?>"><?php $api->e('name')?></option><?php
|
16 |
+
endforeach?>
|
17 |
+
</select>
|
18 |
+
</fieldset>
|
19 |
+
<fieldset>
|
20 |
+
<p>
|
21 |
+
<label for="auto-existing">
|
22 |
+
<input type="checkbox" id="auto-existing" name="existing" />
|
23 |
+
<?php esc_html_e('Overwrite existing translations','loco-translate')?>
|
24 |
+
</label>
|
25 |
+
</p>
|
26 |
+
<p>
|
27 |
+
<label for="auto-fuzzy">
|
28 |
+
<input type="checkbox" id="auto-fuzzy" name="fuzzy" />
|
29 |
+
<?php esc_html_e('Mark new translations as Fuzzy','loco-translate')?>
|
30 |
+
</label>
|
31 |
+
</p>
|
32 |
+
<blockquote id="loco-job-progress">
|
33 |
+
Initializing...
|
34 |
+
</blockquote>
|
35 |
+
<p>
|
36 |
+
<button type="submit" class="button button-primary has-icon icon-translate">
|
37 |
+
<span><?php esc_html_e('Translate','loco-translate')?></span>
|
38 |
+
</button>
|
39 |
+
<a href="<?php $help->e('href')?>" class="button button-link has-icon icon-help" target="_blank"><?php
|
40 |
+
$help->e('text');
|
41 |
+
?></a>
|
42 |
+
<a href="<?php $prof->e('href')?>" class="button button-link has-icon icon-group" target="_blank"><?php
|
43 |
+
$prof->e('text');
|
44 |
+
?></a>
|
45 |
+
</p>
|
46 |
+
</fieldset>
|
47 |
+
</form>
|
48 |
+
</div>
|
tpl/ajax/modal-apis-empty.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Modal for when no APIs are configured.
|
4 |
+
*/
|
5 |
+
|
6 |
+
/* @var Loco_mvc_ViewParams $help */
|
7 |
+
/* @var Loco_mvc_ViewParams $prof */
|
8 |
+
|
9 |
+
?><div id="loco-auto" class="loco-alert" title="<?php esc_html_e('No translation APIs configured','loco-translate');?>">
|
10 |
+
<p>
|
11 |
+
<?php esc_html_e('Add automatic translation services in the plugin settings.','loco-translate')?>
|
12 |
+
</p>
|
13 |
+
<nav>
|
14 |
+
<a href="<?php $this->route('config-apis')->e('href')?>" class="button button-link has-icon icon-cog"><?php
|
15 |
+
esc_html_e('Settings','loco-translate');
|
16 |
+
?></a>
|
17 |
+
<a href="<?php $help->e('href')?>" class="button button-link has-icon icon-help" target="_blank"><?php
|
18 |
+
$help->e('text');
|
19 |
+
?></a>
|
20 |
+
<a href="<?php $prof->e('href')?>" class="button button-link has-icon icon-group" target="_blank"><?php
|
21 |
+
$prof->e('text');
|
22 |
+
?></a>
|
23 |
+
</nav>
|
24 |
+
</div>
|
tpl/debug/dump.php
CHANGED
@@ -1,11 +1,13 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
* Debug snippet: dumps current argument scope
|
|
|
4 |
*/
|
5 |
-
|
6 |
?><dl class="debug"><?php
|
|
|
7 |
foreach( $params as $prop => $value ): if( '_' !== substr($prop,0,1) ):?>
|
8 |
<dt><?php echo esc_html($prop)?></dt>
|
9 |
<dd><?php echo esc_html( json_encode($value,JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE) )?></dd><?php
|
10 |
endif; endforeach?>
|
11 |
-
</dl>
|
1 |
<?php
|
2 |
+
/*
|
3 |
* Debug snippet: dumps current argument scope
|
4 |
+
* Use from controller by returning $this->view('debug/dump',..)
|
5 |
*/
|
6 |
+
|
7 |
?><dl class="debug"><?php
|
8 |
+
/* @var Traversable $params */
|
9 |
foreach( $params as $prop => $value ): if( '_' !== substr($prop,0,1) ):?>
|
10 |
<dt><?php echo esc_html($prop)?></dt>
|
11 |
<dd><?php echo esc_html( json_encode($value,JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE) )?></dd><?php
|
12 |
endif; endforeach?>
|
13 |
+
</dl>
|