Version Description
- Various improvements including automatic translation support
=
Download this release
Release Info
Developer | timwhitlock |
Plugin | Loco Translate |
Version | 2.4.0 |
Comparing to | |
See all releases |
Code changes from version 2.3.4 to 2.4.0
- languages/loco-translate.pot +270 -148
- lib/compiled/gettext.php +4 -4
- lib/data/languages.php +1 -1
- lib/data/locales.php +1 -1
- loco.php +2 -8
- pub/css/admin.css +1 -1
- pub/css/editor.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/ocean.css +1 -1
- pub/css/skins/sunrise.css +1 -1
- pub/font/loco.eot +0 -0
- pub/font/loco.svg +1 -1
- pub/font/loco.ttf +0 -0
- pub/font/loco.woff +0 -0
- pub/img/api/google.png +0 -0
- pub/img/api/microsoft.png +0 -0
- pub/js/config.js +0 -83
- pub/js/debug.js +0 -44
- pub/js/delete.js +0 -13
- pub/js/editor.js +0 -586
- pub/js/min/admin.js +194 -240
- pub/js/min/config.js +1 -0
- pub/js/min/debug.js +1 -0
- pub/js/min/delete.js +1 -0
- pub/js/min/editor.js +1 -0
- pub/js/min/move.js +1 -0
- pub/js/min/podiff.js +1 -0
- pub/js/min/poinit.js +1 -0
- pub/js/min/potinit.js +1 -0
- pub/js/min/poview.js +1 -0
- pub/js/min/setup.js +1 -0
- pub/js/move.js +0 -52
- pub/js/podiff.js +0 -172
- pub/js/poinit.js +0 -203
- pub/js/potinit.js +0 -47
- pub/js/poview.js +0 -191
- pub/js/setup.js +0 -129
- readme.txt +18 -6
- src/Locale.php +4 -0
- src/admin/config/ApisController.php +66 -0
- src/admin/config/BaseController.php +5 -3
- src/admin/config/DebugController.php +14 -1
- src/admin/config/SettingsController.php +0 -1
- src/admin/file/EditController.php +39 -9
- src/ajax/ApisController.php +67 -0
- src/ajax/SyncController.php +2 -3
- src/api/Providers.php +42 -0
- src/data/Serializable.php +1 -1
- src/data/Settings.php +38 -16
- src/error/AdminNotices.php +1 -4
- src/hooks/AdminHooks.php +1 -2
- src/hooks/Hookable.php +0 -3
- src/js/Strings.php +54 -8
- src/mvc/AdminController.php +62 -24
- src/mvc/AdminRouter.php +1 -7
- src/mvc/AjaxController.php +2 -1
- src/mvc/AjaxRouter.php +3 -6
- src/mvc/Controller.php +3 -0
- src/mvc/View.php +27 -7
- src/test/WordPressTestCase.php +9 -1
- tpl/admin/config/apis.php +102 -0
- tpl/admin/config/debug.php +15 -1
- tpl/admin/config/prefs.php +3 -1
- tpl/admin/config/settings.php +6 -3
- tpl/admin/file/diff.php +2 -3
- tpl/admin/file/edit-po.php +61 -0
- tpl/admin/file/edit-pot.php +5 -0
- tpl/admin/file/editor.php +12 -8
- tpl/admin/file/info-po.php +3 -1
- tpl/admin/file/info-pot.php +5 -3
- tpl/admin/file/move.php +1 -1
- tpl/admin/file/msgcat.php +1 -1
- tpl/admin/help/tab-config-apis.php +10 -0
- tpl/admin/help/{tab-settings.php → tab-config.php} +0 -0
languages/loco-translate.pot
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
#, fuzzy
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
-
"Project-Id-Version: Loco Translate 2.
|
5 |
"Report-Msgid-Bugs-To: \n"
|
6 |
-
"POT-Creation-Date: 2020-05-
|
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.
|
17 |
|
18 |
#: src/fs/FileWriter.php:214
|
19 |
#, php-format
|
@@ -29,6 +29,12 @@ msgstr ""
|
|
29 |
msgid "%s already exists in this folder"
|
30 |
msgstr ""
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
#. Where %s is the type of file, e.g. "po"
|
33 |
#: tpl/admin/file/info.php:24
|
34 |
#, php-format
|
@@ -36,7 +42,7 @@ msgid "%s file is writeable"
|
|
36 |
msgstr ""
|
37 |
|
38 |
#. Shows number of fuzzy strings at top of editor
|
39 |
-
#: src/js/Strings.php:
|
40 |
#, javascript-format
|
41 |
msgid "%s fuzzy"
|
42 |
msgstr ""
|
@@ -47,29 +53,49 @@ msgstr ""
|
|
47 |
msgid "%s on disk"
|
48 |
msgstr ""
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
#. Shows number of untranslated strings at top of editor
|
51 |
-
#: src/js/Strings.php:
|
52 |
#, javascript-format
|
53 |
msgid "%s untranslated"
|
54 |
msgstr ""
|
55 |
|
56 |
#. Shows percentage translated at top of editor
|
57 |
-
#: src/js/Strings.php:
|
58 |
#, javascript-format
|
59 |
msgid "%s%% translated"
|
60 |
msgstr ""
|
61 |
|
62 |
#. Summary of new strings after running in-editor Sync
|
63 |
-
#: src/js/Strings.php:
|
64 |
-
#,
|
65 |
msgid "1 new string added"
|
66 |
msgid_plural "%s new strings added"
|
67 |
msgstr[0] ""
|
68 |
msgstr[1] ""
|
69 |
|
70 |
#. Summary of existing strings that no longer exist after running in-editor Sync
|
71 |
-
#: src/js/Strings.php:
|
72 |
-
#,
|
73 |
msgid "1 obsolete string removed"
|
74 |
msgid_plural "%s obsolete strings removed"
|
75 |
msgstr[0] ""
|
@@ -83,21 +109,29 @@ msgstr[0] ""
|
|
83 |
msgstr[1] ""
|
84 |
|
85 |
#. Shows total string count at top of editor
|
86 |
-
#: src/js/Strings.php:
|
87 |
-
#,
|
88 |
msgid "1 string"
|
89 |
msgid_plural "%s strings"
|
90 |
msgstr[0] ""
|
91 |
msgstr[1] ""
|
92 |
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
#, php-format
|
95 |
msgid "1 word"
|
96 |
msgid_plural "%s words"
|
97 |
msgstr[0] ""
|
98 |
msgstr[1] ""
|
99 |
|
100 |
-
#: tpl/admin/config/settings.php:
|
101 |
msgid "About file system access"
|
102 |
msgstr ""
|
103 |
|
@@ -117,11 +151,15 @@ msgstr ""
|
|
117 |
msgid "Active theme:"
|
118 |
msgstr ""
|
119 |
|
|
|
|
|
|
|
|
|
120 |
#: tpl/admin/bundle/conf.php:142
|
121 |
msgid "Add set"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: tpl/admin/config/settings.php:
|
125 |
msgid "Add UTF-8 byte order mark"
|
126 |
msgstr ""
|
127 |
|
@@ -129,14 +167,14 @@ msgstr ""
|
|
129 |
msgid "Additional files found"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: src/hooks/AdminHooks.php:
|
133 |
#, php-format
|
134 |
msgid ""
|
135 |
"Administrators and auditors may wish to review Loco's <a href=\"%s\">plugin "
|
136 |
"privacy notice</a>."
|
137 |
msgstr ""
|
138 |
|
139 |
-
#: src/admin/bundle/BaseController.php:97
|
140 |
msgid "Advanced"
|
141 |
msgstr ""
|
142 |
|
@@ -149,36 +187,31 @@ msgstr ""
|
|
149 |
msgid "Advanced tab"
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: src/mvc/AjaxRouter.php:
|
153 |
msgid "Ajax controller returned empty JSON"
|
154 |
msgstr ""
|
155 |
|
156 |
-
#: src/mvc/AjaxRouter.php:
|
157 |
#, php-format
|
158 |
msgid "Ajax route not found: \"%s\""
|
159 |
msgstr ""
|
160 |
|
161 |
-
#: src/admin/config/SettingsController.php:
|
162 |
msgid "Allow"
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: src/admin/config/SettingsController.php:
|
166 |
msgid "Allow (with warning)"
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: tpl/admin/config/settings.php:
|
170 |
msgid "Allow full access to these roles"
|
171 |
msgstr ""
|
172 |
|
173 |
-
|
174 |
-
#: src/
|
175 |
-
|
176 |
-
msgid "
|
177 |
-
msgstr ""
|
178 |
-
|
179 |
-
#. Message appears after sync operation when nothing has changed
|
180 |
-
#: src/js/Strings.php:34
|
181 |
-
msgid "Already up to date with source code"
|
182 |
msgstr ""
|
183 |
|
184 |
#: tpl/admin/file/delete.php:16
|
@@ -195,6 +228,10 @@ msgstr ""
|
|
195 |
msgid "Author details"
|
196 |
msgstr ""
|
197 |
|
|
|
|
|
|
|
|
|
198 |
#: tpl/admin/init/init-po.php:67
|
199 |
msgid "Available languages"
|
200 |
msgstr ""
|
@@ -205,7 +242,7 @@ msgid ""
|
|
205 |
"editor"
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: tpl/admin/file/info-po.php:
|
209 |
msgid "Binary file missing"
|
210 |
msgstr ""
|
211 |
|
@@ -242,7 +279,7 @@ msgstr ""
|
|
242 |
msgid "Check config repository"
|
243 |
msgstr ""
|
244 |
|
245 |
-
#: src/js/Strings.php:
|
246 |
msgid "Check console output for debugging information"
|
247 |
msgstr ""
|
248 |
|
@@ -281,7 +318,7 @@ msgstr ""
|
|
281 |
msgid "Compiled translations"
|
282 |
msgstr ""
|
283 |
|
284 |
-
#: tpl/admin/config/settings.php:
|
285 |
msgid "Compiling MO files"
|
286 |
msgstr ""
|
287 |
|
@@ -353,7 +390,7 @@ msgstr ""
|
|
353 |
msgid "Custom language"
|
354 |
msgstr ""
|
355 |
|
356 |
-
#: src/error/Debug.php:19 src/admin/config/BaseController.php:
|
357 |
#: src/admin/config/DebugController.php:12
|
358 |
#: src/admin/bundle/BaseController.php:100
|
359 |
msgid "Debug"
|
@@ -387,13 +424,15 @@ msgstr ""
|
|
387 |
msgid "Directory is writeable"
|
388 |
msgstr ""
|
389 |
|
390 |
-
#: src/admin/config/SettingsController.php:
|
391 |
msgid "Disallow"
|
392 |
msgstr ""
|
393 |
|
394 |
-
#: src/admin/file/EditController.php:
|
395 |
-
#: src/admin/bundle/LocaleController.php:130 tpl/admin/
|
396 |
-
#: tpl/admin/
|
|
|
|
|
397 |
msgid "Documentation"
|
398 |
msgstr ""
|
399 |
|
@@ -401,11 +440,11 @@ msgstr ""
|
|
401 |
msgid "Domain path"
|
402 |
msgstr ""
|
403 |
|
404 |
-
#: src/mvc/AjaxRouter.php:
|
405 |
msgid "Download action not found"
|
406 |
msgstr ""
|
407 |
|
408 |
-
#: src/mvc/AjaxRouter.php:
|
409 |
msgid "Download controller returned empty output"
|
410 |
msgstr ""
|
411 |
|
@@ -427,7 +466,7 @@ msgstr ""
|
|
427 |
msgid "Editing %1$s in %2$s"
|
428 |
msgstr ""
|
429 |
|
430 |
-
#: tpl/admin/config/settings.php:
|
431 |
msgid "Editing of POT (template) files"
|
432 |
msgstr ""
|
433 |
|
@@ -436,127 +475,137 @@ msgid "Editor"
|
|
436 |
msgstr ""
|
437 |
|
438 |
#. Where %s is the name of the language, e.g. "French translation"
|
439 |
-
#: src/js/Strings.php:
|
440 |
#, javascript-format
|
441 |
msgctxt "Editor"
|
442 |
msgid "%s translation"
|
443 |
msgstr ""
|
444 |
|
445 |
#. button for adding a new string when manually editing a POT file
|
446 |
-
#: src/admin/file/EditController.php:
|
447 |
msgctxt "Editor"
|
448 |
msgid "Add"
|
449 |
msgstr ""
|
450 |
|
|
|
|
|
|
|
|
|
|
|
|
|
451 |
#. Label for the window pane for entering translator comments
|
452 |
-
#: src/js/Strings.php:
|
453 |
msgctxt "Editor"
|
454 |
msgid "Comments"
|
455 |
msgstr ""
|
456 |
|
457 |
#. Label for the window pane holding message context
|
458 |
-
#: src/js/Strings.php:
|
459 |
msgctxt "Editor"
|
460 |
msgid "Context"
|
461 |
msgstr ""
|
462 |
|
463 |
#. Label for the context window when no translation selected
|
464 |
-
#: src/js/Strings.php:
|
465 |
msgctxt "Editor"
|
466 |
msgid "Context not loaded"
|
467 |
msgstr ""
|
468 |
|
469 |
#. Button for downloading a PO, MO or POT file
|
470 |
-
#: src/admin/file/EditController.php:
|
471 |
msgctxt "Editor"
|
472 |
msgid "Download"
|
473 |
msgstr ""
|
474 |
|
475 |
-
#. Button that toggles a translation's Fuzzy flag
|
476 |
-
#: src/js/Strings.php:105 src/admin/file/EditController.php:180
|
477 |
-
msgctxt "Editor"
|
478 |
-
msgid "Fuzzy"
|
479 |
-
msgstr ""
|
480 |
-
|
481 |
#. Label for the plural form of the original English text
|
482 |
-
#: src/js/Strings.php:
|
483 |
msgctxt "Editor"
|
484 |
msgid "Plural"
|
485 |
msgstr ""
|
486 |
|
487 |
#. button for removing a string when manually editing a POT file
|
488 |
-
#: src/admin/file/EditController.php:
|
489 |
msgctxt "Editor"
|
490 |
msgid "Remove"
|
491 |
msgstr ""
|
492 |
|
493 |
#. Button that reloads current screen
|
494 |
-
#: src/admin/file/EditController.php:
|
495 |
msgctxt "Editor"
|
496 |
msgid "Revert"
|
497 |
msgstr ""
|
498 |
|
499 |
#. Button that saves translations to disk
|
500 |
-
#: src/admin/file/EditController.php:
|
501 |
msgctxt "Editor"
|
502 |
msgid "Save"
|
503 |
msgstr ""
|
504 |
|
505 |
#. Label for the singular form of the original English text
|
506 |
-
#: src/js/Strings.php:
|
507 |
msgctxt "Editor"
|
508 |
msgid "Single"
|
509 |
msgstr ""
|
510 |
|
511 |
#. Label for the window pane holding the original English text
|
512 |
#. List heading showing preview of English text for each item
|
513 |
-
#: src/js/Strings.php:
|
514 |
msgctxt "Editor"
|
515 |
msgid "Source text"
|
516 |
msgstr ""
|
517 |
|
518 |
#. Label for the source text window when no translation selected
|
519 |
-
#: src/js/Strings.php:
|
520 |
msgctxt "Editor"
|
521 |
msgid "Source text not loaded"
|
522 |
msgstr ""
|
523 |
|
|
|
|
|
|
|
|
|
|
|
524 |
#. Button that runs in-editor sync/operation
|
525 |
-
#: src/admin/file/EditController.php:
|
526 |
msgctxt "Editor"
|
527 |
msgid "Sync"
|
528 |
msgstr ""
|
529 |
|
530 |
#. Button that toggles between "code" and regular text editing modes
|
531 |
-
#: src/admin/file/EditController.php:
|
532 |
msgctxt "Editor"
|
533 |
msgid "Toggle code view"
|
534 |
msgstr ""
|
535 |
|
|
|
|
|
|
|
|
|
|
|
536 |
#. Button that toggles invisible characters
|
537 |
-
#: src/admin/file/EditController.php:
|
538 |
msgctxt "Editor"
|
539 |
msgid "Toggle invisibles"
|
540 |
msgstr ""
|
541 |
|
542 |
-
#: src/js/Strings.php:
|
543 |
msgctxt "Editor"
|
544 |
msgid "Translated"
|
545 |
msgstr ""
|
546 |
|
547 |
#. List heading showing preview of translated text for each item
|
548 |
-
#: src/js/Strings.php:
|
549 |
msgctxt "Editor"
|
550 |
msgid "Translation"
|
551 |
msgstr ""
|
552 |
|
553 |
#. Label for the translation editing window when no translation selected
|
554 |
-
#: src/js/Strings.php:
|
555 |
msgctxt "Editor"
|
556 |
msgid "Translation not loaded"
|
557 |
msgstr ""
|
558 |
|
559 |
-
#: src/js/Strings.php:
|
560 |
msgctxt "Editor"
|
561 |
msgid "Untranslated"
|
562 |
msgstr ""
|
@@ -567,7 +616,7 @@ msgid ""
|
|
567 |
"it"
|
568 |
msgstr ""
|
569 |
|
570 |
-
#: tpl/admin/config/settings.php:
|
571 |
msgid "Enable Ajax file uploads"
|
572 |
msgstr ""
|
573 |
|
@@ -575,7 +624,7 @@ msgstr ""
|
|
575 |
msgid "Enter a new location for this file"
|
576 |
msgstr ""
|
577 |
|
578 |
-
#: src/js/Strings.php:
|
579 |
msgid "Error"
|
580 |
msgstr ""
|
581 |
|
@@ -591,7 +640,7 @@ msgid_plural "Excludes %s files over %2$s"
|
|
591 |
msgstr[0] ""
|
592 |
msgstr[1] ""
|
593 |
|
594 |
-
#: tpl/admin/config/settings.php:
|
595 |
msgid "Extracting strings"
|
596 |
msgstr ""
|
597 |
|
@@ -656,8 +705,8 @@ msgstr ""
|
|
656 |
msgid "File doesn't exist"
|
657 |
msgstr ""
|
658 |
|
659 |
-
#: src/admin/file/BaseController.php:107 tpl/admin/
|
660 |
-
#: tpl/admin/bundle/
|
661 |
msgid "File info"
|
662 |
msgstr ""
|
663 |
|
@@ -701,8 +750,8 @@ msgstr ""
|
|
701 |
msgid "File modification is disallowed by your WordPress config"
|
702 |
msgstr ""
|
703 |
|
704 |
-
#: tpl/admin/file/info-mo.php:21 tpl/admin/file/info-pot.php:
|
705 |
-
#: tpl/admin/file/info-po.php:
|
706 |
msgid "File modified"
|
707 |
msgstr ""
|
708 |
|
@@ -725,12 +774,12 @@ msgstr ""
|
|
725 |
msgid "File restored"
|
726 |
msgstr ""
|
727 |
|
728 |
-
#: tpl/admin/file/info-mo.php:18 tpl/admin/file/info-pot.php:
|
729 |
-
#: tpl/admin/file/info-po.php:
|
730 |
msgid "File size"
|
731 |
msgstr ""
|
732 |
|
733 |
-
#: tpl/admin/config/settings.php:
|
734 |
msgid "File system access"
|
735 |
msgstr ""
|
736 |
|
@@ -750,7 +799,7 @@ msgid ""
|
|
750 |
msgstr ""
|
751 |
|
752 |
#. Placeholder text for text filter above editor
|
753 |
-
#: src/admin/file/EditController.php:
|
754 |
msgid "Filter translations"
|
755 |
msgstr ""
|
756 |
|
@@ -777,11 +826,11 @@ msgstr ""
|
|
777 |
msgid "Folders within the bundle that will never be searched for files"
|
778 |
msgstr ""
|
779 |
|
780 |
-
#: tpl/admin/help/tab-
|
781 |
msgid "Full documentation"
|
782 |
msgstr ""
|
783 |
|
784 |
-
#: tpl/admin/config/settings.php:
|
785 |
msgid "Generate hash tables"
|
786 |
msgstr ""
|
787 |
|
@@ -797,15 +846,16 @@ msgstr ""
|
|
797 |
msgid "Go to WordPress Core"
|
798 |
msgstr ""
|
799 |
|
800 |
-
#: tpl/admin/config/settings.php:
|
801 |
msgid "Grant access to roles"
|
802 |
msgstr ""
|
803 |
|
804 |
-
#: src/admin/file/EditController.php:
|
|
|
805 |
msgid "Help"
|
806 |
msgstr ""
|
807 |
|
808 |
-
#: src/mvc/AdminController.php:
|
809 |
msgid "Help & support"
|
810 |
msgstr ""
|
811 |
|
@@ -841,7 +891,11 @@ msgstr ""
|
|
841 |
msgid "Import config from XML"
|
842 |
msgstr ""
|
843 |
|
844 |
-
#: tpl/admin/
|
|
|
|
|
|
|
|
|
845 |
msgid "In sync with template"
|
846 |
msgstr ""
|
847 |
|
@@ -849,7 +903,7 @@ msgstr ""
|
|
849 |
msgid "Include"
|
850 |
msgstr ""
|
851 |
|
852 |
-
#: tpl/admin/config/settings.php:
|
853 |
msgid "Include Fuzzy strings"
|
854 |
msgstr ""
|
855 |
|
@@ -871,7 +925,7 @@ msgstr ""
|
|
871 |
msgid "Installed languages"
|
872 |
msgstr ""
|
873 |
|
874 |
-
#: src/Locale.php:
|
875 |
msgid "Invalid locale"
|
876 |
msgstr ""
|
877 |
|
@@ -888,6 +942,10 @@ msgstr ""
|
|
888 |
msgid "Just now"
|
889 |
msgstr ""
|
890 |
|
|
|
|
|
|
|
|
|
891 |
#: tpl/admin/bundle/inc-po-table.php:13
|
892 |
msgid "Language"
|
893 |
msgstr ""
|
@@ -912,7 +970,7 @@ msgstr ""
|
|
912 |
msgid "largest is %s"
|
913 |
msgstr ""
|
914 |
|
915 |
-
#: tpl/admin/file/info-pot.php:
|
916 |
msgid "Last extracted"
|
917 |
msgstr ""
|
918 |
|
@@ -921,7 +979,7 @@ msgstr ""
|
|
921 |
msgid "Last modified"
|
922 |
msgstr ""
|
923 |
|
924 |
-
#: tpl/admin/file/info-mo.php:24 tpl/admin/file/info-po.php:
|
925 |
msgid "Last translation"
|
926 |
msgstr ""
|
927 |
|
@@ -929,6 +987,10 @@ msgstr ""
|
|
929 |
msgid "Load config"
|
930 |
msgstr ""
|
931 |
|
|
|
|
|
|
|
|
|
932 |
#: tpl/admin/list/locales.php:16
|
933 |
msgid "Locale code"
|
934 |
msgstr ""
|
@@ -946,7 +1008,7 @@ msgstr ""
|
|
946 |
msgid "Loco interrupted by output from %s:%u"
|
947 |
msgstr ""
|
948 |
|
949 |
-
#: loco.php:
|
950 |
#, php-format
|
951 |
msgid ""
|
952 |
"Loco requires the \"%s\" PHP extension. Ask your hosting provider to install "
|
@@ -962,7 +1024,7 @@ msgid ""
|
|
962 |
msgstr ""
|
963 |
|
964 |
#. Name of the plugin
|
965 |
-
#: src/mvc/AdminRouter.php:37 src/hooks/AdminHooks.php:
|
966 |
msgid "Loco Translate"
|
967 |
msgstr ""
|
968 |
|
@@ -972,7 +1034,13 @@ msgstr ""
|
|
972 |
msgid "Loco Translate %s"
|
973 |
msgstr ""
|
974 |
|
975 |
-
#: src/
|
|
|
|
|
|
|
|
|
|
|
|
|
976 |
msgid "Loco Translate is powered by"
|
977 |
msgstr ""
|
978 |
|
@@ -981,7 +1049,11 @@ msgstr ""
|
|
981 |
msgid "Loco, Translation Management"
|
982 |
msgstr ""
|
983 |
|
984 |
-
#: tpl/admin/
|
|
|
|
|
|
|
|
|
985 |
msgid "Maximum line length (zero disables wrapping)"
|
986 |
msgstr ""
|
987 |
|
@@ -996,7 +1068,7 @@ msgstr ""
|
|
996 |
msgid "Merged from source code"
|
997 |
msgstr ""
|
998 |
|
999 |
-
#: tpl/admin/file/info-po.php:
|
1000 |
msgid "Missing template"
|
1001 |
msgstr ""
|
1002 |
|
@@ -1005,7 +1077,7 @@ msgid "MO file exists for this language already. Delete it first"
|
|
1005 |
msgstr ""
|
1006 |
|
1007 |
#. @var Loco_mvc_ViewParams $verbose
|
1008 |
-
#: tpl/admin/config/settings.php:
|
1009 |
msgid "Modification of installed files"
|
1010 |
msgstr ""
|
1011 |
|
@@ -1068,6 +1140,10 @@ msgstr ""
|
|
1068 |
msgid "No previous file revisions"
|
1069 |
msgstr ""
|
1070 |
|
|
|
|
|
|
|
|
|
1071 |
#: tpl/admin/bundle/inc-po-table.php:105
|
1072 |
#, php-format
|
1073 |
msgid "No translations found for \"%s\""
|
@@ -1078,7 +1154,7 @@ msgstr ""
|
|
1078 |
msgid "no wildcards"
|
1079 |
msgstr ""
|
1080 |
|
1081 |
-
#: tpl/admin/config/settings.php:
|
1082 |
msgid "Not recommended"
|
1083 |
msgstr ""
|
1084 |
|
@@ -1093,12 +1169,16 @@ msgstr ""
|
|
1093 |
msgid "Nothing matches the text filter"
|
1094 |
msgstr ""
|
1095 |
|
1096 |
-
#: src/js/Strings.php:
|
|
|
|
|
|
|
|
|
1097 |
#: tpl/admin/common/inc-fsconn.php:37
|
1098 |
msgid "Notice"
|
1099 |
msgstr ""
|
1100 |
|
1101 |
-
#: tpl/admin/config/settings.php:
|
1102 |
msgid "Number of backups to keep of each file:"
|
1103 |
msgstr ""
|
1104 |
|
@@ -1110,7 +1190,7 @@ msgstr ""
|
|
1110 |
msgid "Official plugin page"
|
1111 |
msgstr ""
|
1112 |
|
1113 |
-
#: src/js/Strings.php:
|
1114 |
msgid "OK"
|
1115 |
msgstr ""
|
1116 |
|
@@ -1140,7 +1220,7 @@ msgstr[0] ""
|
|
1140 |
msgstr[1] ""
|
1141 |
|
1142 |
#. Where %2$s is the maximum size of a file that will be included and %3$s is the largest encountered
|
1143 |
-
#: src/ajax/SyncController.php:
|
1144 |
#, php-format
|
1145 |
msgid ""
|
1146 |
"One file has been skipped because it's %3$s. (Max is %2$s). Check all "
|
@@ -1165,7 +1245,7 @@ msgid_plural "%s strings found in %s"
|
|
1165 |
msgstr[0] ""
|
1166 |
msgstr[1] ""
|
1167 |
|
1168 |
-
#: tpl/admin/file/info-po.php:
|
1169 |
msgid "Out of sync with template"
|
1170 |
msgstr ""
|
1171 |
|
@@ -1173,7 +1253,11 @@ msgstr ""
|
|
1173 |
msgid "Overview"
|
1174 |
msgstr ""
|
1175 |
|
1176 |
-
#:
|
|
|
|
|
|
|
|
|
1177 |
msgid "Page not found"
|
1178 |
msgstr ""
|
1179 |
|
@@ -1206,9 +1290,10 @@ msgstr ""
|
|
1206 |
msgid "Plugin not found: %s"
|
1207 |
msgstr ""
|
1208 |
|
1209 |
-
#: src/mvc/AdminRouter.php:66 src/admin/config/
|
|
|
1210 |
#: src/admin/config/VersionController.php:22
|
1211 |
-
#: src/admin/config/SettingsController.php:
|
1212 |
msgid "Plugin settings"
|
1213 |
msgstr ""
|
1214 |
|
@@ -1223,49 +1308,49 @@ msgid "Plugins"
|
|
1223 |
msgstr ""
|
1224 |
|
1225 |
#. Plural category for languages that have no plurals
|
1226 |
-
#: src/Locale.php:
|
1227 |
msgctxt "Plural category"
|
1228 |
msgid "All forms"
|
1229 |
msgstr ""
|
1230 |
|
1231 |
#. Plural category used in some multi-plural languages
|
1232 |
-
#: src/Locale.php:
|
1233 |
msgctxt "Plural category"
|
1234 |
msgid "Few"
|
1235 |
msgstr ""
|
1236 |
|
1237 |
#. Plural category used in some multi-plural languages
|
1238 |
-
#: src/Locale.php:
|
1239 |
msgctxt "Plural category"
|
1240 |
msgid "Many"
|
1241 |
msgstr ""
|
1242 |
|
1243 |
#. Plural category for singular quantity
|
1244 |
-
#: src/Locale.php:
|
1245 |
msgctxt "Plural category"
|
1246 |
msgid "One"
|
1247 |
msgstr ""
|
1248 |
|
1249 |
#. General plural category not covered by other forms
|
1250 |
-
#: src/Locale.php:
|
1251 |
msgctxt "Plural category"
|
1252 |
msgid "Other"
|
1253 |
msgstr ""
|
1254 |
|
1255 |
#. Plural category used in some multi-plural languages
|
1256 |
-
#: src/Locale.php:
|
1257 |
msgctxt "Plural category"
|
1258 |
msgid "Two"
|
1259 |
msgstr ""
|
1260 |
|
1261 |
#. Plural category for zero quantity
|
1262 |
-
#: src/Locale.php:
|
1263 |
msgctxt "Plural category"
|
1264 |
msgid "Zero"
|
1265 |
msgstr ""
|
1266 |
|
1267 |
#. Where %s is the name of a template file
|
1268 |
-
#: tpl/admin/file/info-po.php:
|
1269 |
#, php-format
|
1270 |
msgid ""
|
1271 |
"PO file has different source strings to \"%s\". Try running Sync before "
|
@@ -1273,7 +1358,7 @@ msgid ""
|
|
1273 |
msgstr ""
|
1274 |
|
1275 |
#. Where %s is the name of a template file
|
1276 |
-
#: tpl/admin/file/info-po.php:
|
1277 |
#, php-format
|
1278 |
msgid "PO file has the same source strings as \"%s\""
|
1279 |
msgstr ""
|
@@ -1294,7 +1379,7 @@ msgstr ""
|
|
1294 |
msgid "POT file saved"
|
1295 |
msgstr ""
|
1296 |
|
1297 |
-
#: tpl/admin/config/settings.php:
|
1298 |
msgid "POT template files"
|
1299 |
msgstr ""
|
1300 |
|
@@ -1302,7 +1387,7 @@ msgstr ""
|
|
1302 |
msgid "Project name"
|
1303 |
msgstr ""
|
1304 |
|
1305 |
-
#: src/js/Strings.php:
|
1306 |
msgid "Provide the following text when reporting a problem"
|
1307 |
msgstr ""
|
1308 |
|
@@ -1314,7 +1399,7 @@ msgstr ""
|
|
1314 |
msgid "Recently updated:"
|
1315 |
msgstr ""
|
1316 |
|
1317 |
-
#: tpl/admin/config/settings.php:
|
1318 |
msgid "Recommended"
|
1319 |
msgstr ""
|
1320 |
|
@@ -1344,10 +1429,6 @@ msgstr ""
|
|
1344 |
msgid "Restore %s"
|
1345 |
msgstr ""
|
1346 |
|
1347 |
-
#: tpl/admin/file/diff.php:57
|
1348 |
-
msgid "Revision saved"
|
1349 |
-
msgstr ""
|
1350 |
-
|
1351 |
#. Where %s is a file name
|
1352 |
#: src/ajax/DiffController.php:47
|
1353 |
#, php-format
|
@@ -1362,15 +1443,16 @@ msgstr ""
|
|
1362 |
msgid "Save config"
|
1363 |
msgstr ""
|
1364 |
|
1365 |
-
#: tpl/admin/config/settings.php:
|
1366 |
msgid "Save credentials in session"
|
1367 |
msgstr ""
|
1368 |
|
1369 |
-
#: tpl/admin/config/settings.php:
|
|
|
1370 |
msgid "Save settings"
|
1371 |
msgstr ""
|
1372 |
|
1373 |
-
#: tpl/admin/config/settings.php:
|
1374 |
msgid "Saving PO/POT files"
|
1375 |
msgstr ""
|
1376 |
|
@@ -1378,11 +1460,11 @@ msgstr ""
|
|
1378 |
msgid "Saving this file requires permission"
|
1379 |
msgstr ""
|
1380 |
|
1381 |
-
#: tpl/admin/config/settings.php:
|
1382 |
msgid "Scan JavaScript files with extensions:"
|
1383 |
msgstr ""
|
1384 |
|
1385 |
-
#: tpl/admin/config/settings.php:
|
1386 |
msgid "Scan PHP files with extensions:"
|
1387 |
msgstr ""
|
1388 |
|
@@ -1402,8 +1484,12 @@ msgstr ""
|
|
1402 |
msgid "See FAQ"
|
1403 |
msgstr ""
|
1404 |
|
|
|
|
|
|
|
|
|
1405 |
#. Generic error when external process broke an Ajax request
|
1406 |
-
#: src/js/Strings.php:
|
1407 |
msgid "Server returned invalid data"
|
1408 |
msgstr ""
|
1409 |
|
@@ -1418,11 +1504,13 @@ msgid "Sets"
|
|
1418 |
msgstr ""
|
1419 |
|
1420 |
#: src/mvc/AdminRouter.php:67 src/mvc/AdminRouter.php:72
|
1421 |
-
#: src/
|
|
|
1422 |
#: tpl/admin/common/inc-fsconn.php:43 tpl/admin/errors/no-backups.php:24
|
1423 |
msgid "Settings"
|
1424 |
msgstr ""
|
1425 |
|
|
|
1426 |
#: src/admin/config/PrefsController.php:26
|
1427 |
#: src/admin/config/SettingsController.php:31
|
1428 |
msgid "Settings saved"
|
@@ -1444,12 +1532,12 @@ msgstr ""
|
|
1444 |
msgid "Site options"
|
1445 |
msgstr ""
|
1446 |
|
1447 |
-
#: tpl/admin/help/tab-
|
1448 |
msgid ""
|
1449 |
"Site options apply to all users of Loco Translate across the current site"
|
1450 |
msgstr ""
|
1451 |
|
1452 |
-
#: tpl/admin/config/settings.php:
|
1453 |
msgid "Skip PHP files larger than:"
|
1454 |
msgstr ""
|
1455 |
|
@@ -1469,18 +1557,29 @@ msgstr ""
|
|
1469 |
msgid "Source files to scan:"
|
1470 |
msgstr ""
|
1471 |
|
1472 |
-
#: tpl/admin/file/info-pot.php:21
|
1473 |
-
msgid "Source text"
|
1474 |
-
msgstr ""
|
1475 |
-
|
1476 |
#: tpl/admin/init/init-po.php:173
|
1477 |
msgid "Start translating"
|
1478 |
msgstr ""
|
1479 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1480 |
#: tpl/admin/init/init-pot.php:30
|
1481 |
msgid "Strings will be extracted to:"
|
1482 |
msgstr ""
|
1483 |
|
|
|
|
|
|
|
|
|
1484 |
#: tpl/admin/init/init-prompt.php:34
|
1485 |
msgid "Suggestion"
|
1486 |
msgstr ""
|
@@ -1490,7 +1589,7 @@ msgid "System diagnostics"
|
|
1490 |
msgstr ""
|
1491 |
|
1492 |
#: tpl/admin/file/view-pot.php:9 tpl/admin/file/edit-pot.php:10
|
1493 |
-
#: tpl/admin/file/info-pot.php:
|
1494 |
#: tpl/admin/bundle/conf.php:65
|
1495 |
msgid "Template file"
|
1496 |
msgstr ""
|
@@ -1568,12 +1667,18 @@ msgid ""
|
|
1568 |
"These plugins have recently loaded translation files into the admin area"
|
1569 |
msgstr ""
|
1570 |
|
1571 |
-
#: tpl/admin/file/info-po.php:
|
1572 |
msgid ""
|
1573 |
"These translations are not linked to a POT file. Sync operations will "
|
1574 |
"extract strings directly from source code."
|
1575 |
msgstr ""
|
1576 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1577 |
#: tpl/admin/init/init-prompt.php:18
|
1578 |
msgid "This bundle doesn't define a translations template file"
|
1579 |
msgstr ""
|
@@ -1651,7 +1756,7 @@ msgid "This information is for developers to find problems in the bundle setup"
|
|
1651 |
msgstr ""
|
1652 |
|
1653 |
#. Warning when POT file is opened in the file editor. It can be disabled in settings.
|
1654 |
-
#: src/admin/file/EditController.php:
|
1655 |
msgid ""
|
1656 |
"This is NOT a translation file. Manual editing of source strings is not "
|
1657 |
"recommended."
|
@@ -1665,7 +1770,7 @@ msgstr ""
|
|
1665 |
msgid "This page was expecting a file, but the path is actually a directory"
|
1666 |
msgstr ""
|
1667 |
|
1668 |
-
#: src/hooks/AdminHooks.php:
|
1669 |
msgid "This plugin doesn't collect any data from public website visitors."
|
1670 |
msgstr ""
|
1671 |
|
@@ -1695,7 +1800,7 @@ msgid ""
|
|
1695 |
"the file writeable by %s"
|
1696 |
msgstr ""
|
1697 |
|
1698 |
-
#: src/hooks/AdminHooks.php:
|
1699 |
msgid "Translate"
|
1700 |
msgstr ""
|
1701 |
|
@@ -1711,18 +1816,31 @@ msgstr ""
|
|
1711 |
msgid "Translate themes and plugins directly in WordPress"
|
1712 |
msgstr ""
|
1713 |
|
1714 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1715 |
#: tpl/admin/bundle/locale.php:36
|
1716 |
msgid "Translation progress"
|
1717 |
msgstr ""
|
1718 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1719 |
#. Where %s is the name of the invalid POT file
|
1720 |
-
#: src/ajax/SyncController.php:
|
1721 |
#, php-format
|
1722 |
msgid "Translation template is invalid (%s)"
|
1723 |
msgstr ""
|
1724 |
|
1725 |
-
#: src/admin/file/EditController.php:
|
1726 |
#, php-format
|
1727 |
msgid "Translations don't match template. Run sync to update from %s"
|
1728 |
msgstr ""
|
@@ -1731,7 +1849,7 @@ msgstr ""
|
|
1731 |
msgid "Translations have been recently modified in the following bundles"
|
1732 |
msgstr ""
|
1733 |
|
1734 |
-
#: tpl/admin/config/prefs.php:
|
1735 |
msgid "Translator credit"
|
1736 |
msgstr ""
|
1737 |
|
@@ -1751,7 +1869,7 @@ msgstr ""
|
|
1751 |
msgid "Unknown author"
|
1752 |
msgstr ""
|
1753 |
|
1754 |
-
#: src/js/Strings.php:
|
1755 |
msgid "Unknown error"
|
1756 |
msgstr ""
|
1757 |
|
@@ -1764,12 +1882,16 @@ msgstr ""
|
|
1764 |
msgid "Use this file as template when running Sync"
|
1765 |
msgstr ""
|
1766 |
|
|
|
|
|
|
|
|
|
1767 |
#: src/mvc/AdminRouter.php:71 src/admin/config/PrefsController.php:13
|
1768 |
#: src/admin/config/BaseController.php:19
|
1769 |
msgid "User options"
|
1770 |
msgstr ""
|
1771 |
|
1772 |
-
#: tpl/admin/help/tab-
|
1773 |
msgid "User options apply to your WordPress login, across all sites"
|
1774 |
msgstr ""
|
1775 |
|
@@ -1785,7 +1907,7 @@ msgid ""
|
|
1785 |
msgstr ""
|
1786 |
|
1787 |
#: src/admin/config/VersionController.php:13
|
1788 |
-
#: src/admin/config/BaseController.php:
|
1789 |
msgid "Version"
|
1790 |
msgstr ""
|
1791 |
|
@@ -1807,11 +1929,11 @@ msgstr ""
|
|
1807 |
msgid "Visit official site"
|
1808 |
msgstr ""
|
1809 |
|
1810 |
-
#: src/js/Strings.php:
|
1811 |
msgid "Warning"
|
1812 |
msgstr ""
|
1813 |
|
1814 |
-
#: tpl/admin/file/info-po.php:
|
1815 |
msgid "We can't find the binary MO file that belongs with these translations"
|
1816 |
msgstr ""
|
1817 |
|
@@ -1917,6 +2039,6 @@ msgid "Your admin language is %s."
|
|
1917 |
msgstr ""
|
1918 |
|
1919 |
#. Warning appears when user tries to refresh or navigate away when editor work is unsaved
|
1920 |
-
#: src/js/Strings.php:
|
1921 |
msgid "Your changes will be lost if you continue without saving"
|
1922 |
msgstr ""
|
1 |
#, fuzzy
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
+
"Project-Id-Version: Loco Translate 2.4.0\n"
|
5 |
"Report-Msgid-Bugs-To: \n"
|
6 |
+
"POT-Creation-Date: 2020-05-25 13:53+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.0; wp-5.4.1"
|
17 |
|
18 |
#: src/fs/FileWriter.php:214
|
19 |
#, php-format
|
29 |
msgid "%s already exists in this folder"
|
30 |
msgstr ""
|
31 |
|
32 |
+
#. characters meaning individual unicode characters of source text
|
33 |
+
#: src/js/Strings.php:47
|
34 |
+
#, javascript-format
|
35 |
+
msgid "%s characters will be sent for translation."
|
36 |
+
msgstr ""
|
37 |
+
|
38 |
#. Where %s is the type of file, e.g. "po"
|
39 |
#: tpl/admin/file/info.php:24
|
40 |
#, php-format
|
42 |
msgstr ""
|
43 |
|
44 |
#. Shows number of fuzzy strings at top of editor
|
45 |
+
#: src/js/Strings.php:91 src/gettext/Metadata.php:205
|
46 |
#, javascript-format
|
47 |
msgid "%s fuzzy"
|
48 |
msgstr ""
|
53 |
msgid "%s on disk"
|
54 |
msgstr ""
|
55 |
|
56 |
+
#. e.g. via Google Translate
|
57 |
+
#: src/js/Strings.php:58
|
58 |
+
#, javascript-format
|
59 |
+
msgid "%s string translated via %s"
|
60 |
+
msgid_plural "%s strings translated via %s"
|
61 |
+
msgstr[0] ""
|
62 |
+
msgstr[1] ""
|
63 |
+
|
64 |
+
#: src/js/Strings.php:61
|
65 |
+
#, javascript-format
|
66 |
+
msgid "%s string updated"
|
67 |
+
msgid_plural "%s strings updated"
|
68 |
+
msgstr[0] ""
|
69 |
+
msgstr[1] ""
|
70 |
+
|
71 |
+
#: src/js/Strings.php:43
|
72 |
+
#, javascript-format
|
73 |
+
msgid "%s unique source strings."
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
#. Shows number of untranslated strings at top of editor
|
77 |
+
#: src/js/Strings.php:95 src/gettext/Metadata.php:208
|
78 |
#, javascript-format
|
79 |
msgid "%s untranslated"
|
80 |
msgstr ""
|
81 |
|
82 |
#. Shows percentage translated at top of editor
|
83 |
+
#: src/js/Strings.php:87 src/gettext/Metadata.php:203
|
84 |
#, javascript-format
|
85 |
msgid "%s%% translated"
|
86 |
msgstr ""
|
87 |
|
88 |
#. Summary of new strings after running in-editor Sync
|
89 |
+
#: src/js/Strings.php:25
|
90 |
+
#, javascript-format
|
91 |
msgid "1 new string added"
|
92 |
msgid_plural "%s new strings added"
|
93 |
msgstr[0] ""
|
94 |
msgstr[1] ""
|
95 |
|
96 |
#. Summary of existing strings that no longer exist after running in-editor Sync
|
97 |
+
#: src/js/Strings.php:29
|
98 |
+
#, javascript-format
|
99 |
msgid "1 obsolete string removed"
|
100 |
msgid_plural "%s obsolete strings removed"
|
101 |
msgstr[0] ""
|
109 |
msgstr[1] ""
|
110 |
|
111 |
#. Shows total string count at top of editor
|
112 |
+
#: src/js/Strings.php:83 src/gettext/Metadata.php:193
|
113 |
+
#, javascript-format
|
114 |
msgid "1 string"
|
115 |
msgid_plural "%s strings"
|
116 |
msgstr[0] ""
|
117 |
msgstr[1] ""
|
118 |
|
119 |
+
#. Summary of existing translations where the source text has changed slightly
|
120 |
+
#: src/js/Strings.php:33
|
121 |
+
#, javascript-format
|
122 |
+
msgid "1 string marked Fuzzy"
|
123 |
+
msgid_plural "%s strings marked Fuzzy"
|
124 |
+
msgstr[0] ""
|
125 |
+
msgstr[1] ""
|
126 |
+
|
127 |
+
#: tpl/admin/file/info-pot.php:24
|
128 |
#, php-format
|
129 |
msgid "1 word"
|
130 |
msgid_plural "%s words"
|
131 |
msgstr[0] ""
|
132 |
msgstr[1] ""
|
133 |
|
134 |
+
#: tpl/admin/config/settings.php:148
|
135 |
msgid "About file system access"
|
136 |
msgstr ""
|
137 |
|
151 |
msgid "Active theme:"
|
152 |
msgstr ""
|
153 |
|
154 |
+
#: tpl/admin/file/edit-po.php:58
|
155 |
+
msgid "Add automatic translation services in the plugin settings."
|
156 |
+
msgstr ""
|
157 |
+
|
158 |
#: tpl/admin/bundle/conf.php:142
|
159 |
msgid "Add set"
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: tpl/admin/config/settings.php:89
|
163 |
msgid "Add UTF-8 byte order mark"
|
164 |
msgstr ""
|
165 |
|
167 |
msgid "Additional files found"
|
168 |
msgstr ""
|
169 |
|
170 |
+
#: src/hooks/AdminHooks.php:66
|
171 |
#, php-format
|
172 |
msgid ""
|
173 |
"Administrators and auditors may wish to review Loco's <a href=\"%s\">plugin "
|
174 |
"privacy notice</a>."
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: src/admin/bundle/BaseController.php:97 tpl/admin/file/move.php:26
|
178 |
msgid "Advanced"
|
179 |
msgstr ""
|
180 |
|
187 |
msgid "Advanced tab"
|
188 |
msgstr ""
|
189 |
|
190 |
+
#: src/mvc/AjaxRouter.php:174
|
191 |
msgid "Ajax controller returned empty JSON"
|
192 |
msgstr ""
|
193 |
|
194 |
+
#: src/mvc/AjaxRouter.php:169
|
195 |
#, php-format
|
196 |
msgid "Ajax route not found: \"%s\""
|
197 |
msgstr ""
|
198 |
|
199 |
+
#: src/admin/config/SettingsController.php:66
|
200 |
msgid "Allow"
|
201 |
msgstr ""
|
202 |
|
203 |
+
#: src/admin/config/SettingsController.php:67
|
204 |
msgid "Allow (with warning)"
|
205 |
msgstr ""
|
206 |
|
207 |
+
#: tpl/admin/config/settings.php:159
|
208 |
msgid "Allow full access to these roles"
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: src/admin/config/ApisController.php:12
|
212 |
+
#: src/admin/config/BaseController.php:20
|
213 |
+
#: src/admin/config/BaseController.php:42 tpl/admin/help/tab-config-apis.php:2
|
214 |
+
msgid "API keys"
|
|
|
|
|
|
|
|
|
|
|
215 |
msgstr ""
|
216 |
|
217 |
#: tpl/admin/file/delete.php:16
|
228 |
msgid "Author details"
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: tpl/admin/file/edit-po.php:16
|
232 |
+
msgid "Auto-translate this file"
|
233 |
+
msgstr ""
|
234 |
+
|
235 |
#: tpl/admin/init/init-po.php:67
|
236 |
msgid "Available languages"
|
237 |
msgstr ""
|
242 |
"editor"
|
243 |
msgstr ""
|
244 |
|
245 |
+
#: tpl/admin/file/info-po.php:42
|
246 |
msgid "Binary file missing"
|
247 |
msgstr ""
|
248 |
|
279 |
msgid "Check config repository"
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: src/js/Strings.php:101
|
283 |
msgid "Check console output for debugging information"
|
284 |
msgstr ""
|
285 |
|
318 |
msgid "Compiled translations"
|
319 |
msgstr ""
|
320 |
|
321 |
+
#: tpl/admin/config/settings.php:18 tpl/admin/config/settings.php:22
|
322 |
msgid "Compiling MO files"
|
323 |
msgstr ""
|
324 |
|
390 |
msgid "Custom language"
|
391 |
msgstr ""
|
392 |
|
393 |
+
#: src/error/Debug.php:19 src/admin/config/BaseController.php:24
|
394 |
#: src/admin/config/DebugController.php:12
|
395 |
#: src/admin/bundle/BaseController.php:100
|
396 |
msgid "Debug"
|
424 |
msgid "Directory is writeable"
|
425 |
msgstr ""
|
426 |
|
427 |
+
#: src/admin/config/SettingsController.php:68
|
428 |
msgid "Disallow"
|
429 |
msgstr ""
|
430 |
|
431 |
+
#: src/data/Settings.php:186 src/admin/file/EditController.php:175
|
432 |
+
#: src/admin/bundle/LocaleController.php:130 tpl/admin/config/settings.php:177
|
433 |
+
#: tpl/admin/config/apis.php:100 tpl/admin/config/prefs.php:32
|
434 |
+
#: tpl/admin/common/inc-fsconn.php:16 tpl/admin/common/inc-fsconn.php:41
|
435 |
+
#: tpl/admin/errors/no-backups.php:22
|
436 |
msgid "Documentation"
|
437 |
msgstr ""
|
438 |
|
440 |
msgid "Domain path"
|
441 |
msgstr ""
|
442 |
|
443 |
+
#: src/mvc/AjaxRouter.php:197
|
444 |
msgid "Download action not found"
|
445 |
msgstr ""
|
446 |
|
447 |
+
#: src/mvc/AjaxRouter.php:202
|
448 |
msgid "Download controller returned empty output"
|
449 |
msgstr ""
|
450 |
|
466 |
msgid "Editing %1$s in %2$s"
|
467 |
msgstr ""
|
468 |
|
469 |
+
#: tpl/admin/config/settings.php:138
|
470 |
msgid "Editing of POT (template) files"
|
471 |
msgstr ""
|
472 |
|
475 |
msgstr ""
|
476 |
|
477 |
#. Where %s is the name of the language, e.g. "French translation"
|
478 |
+
#: src/js/Strings.php:127
|
479 |
#, javascript-format
|
480 |
msgctxt "Editor"
|
481 |
msgid "%s translation"
|
482 |
msgstr ""
|
483 |
|
484 |
#. button for adding a new string when manually editing a POT file
|
485 |
+
#: src/admin/file/EditController.php:199
|
486 |
msgctxt "Editor"
|
487 |
msgid "Add"
|
488 |
msgstr ""
|
489 |
|
490 |
+
#. Button that opens window for auto-translating
|
491 |
+
#: src/admin/file/EditController.php:210
|
492 |
+
msgctxt "Editor"
|
493 |
+
msgid "Auto"
|
494 |
+
msgstr ""
|
495 |
+
|
496 |
#. Label for the window pane for entering translator comments
|
497 |
+
#: src/js/Strings.php:133
|
498 |
msgctxt "Editor"
|
499 |
msgid "Comments"
|
500 |
msgstr ""
|
501 |
|
502 |
#. Label for the window pane holding message context
|
503 |
+
#: src/js/Strings.php:130
|
504 |
msgctxt "Editor"
|
505 |
msgid "Context"
|
506 |
msgstr ""
|
507 |
|
508 |
#. Label for the context window when no translation selected
|
509 |
+
#: src/js/Strings.php:157
|
510 |
msgctxt "Editor"
|
511 |
msgid "Context not loaded"
|
512 |
msgstr ""
|
513 |
|
514 |
#. Button for downloading a PO, MO or POT file
|
515 |
+
#: src/admin/file/EditController.php:212
|
516 |
msgctxt "Editor"
|
517 |
msgid "Download"
|
518 |
msgstr ""
|
519 |
|
|
|
|
|
|
|
|
|
|
|
|
|
520 |
#. Label for the plural form of the original English text
|
521 |
+
#: src/js/Strings.php:139
|
522 |
msgctxt "Editor"
|
523 |
msgid "Plural"
|
524 |
msgstr ""
|
525 |
|
526 |
#. button for removing a string when manually editing a POT file
|
527 |
+
#: src/admin/file/EditController.php:201
|
528 |
msgctxt "Editor"
|
529 |
msgid "Remove"
|
530 |
msgstr ""
|
531 |
|
532 |
#. Button that reloads current screen
|
533 |
+
#: src/admin/file/EditController.php:208
|
534 |
msgctxt "Editor"
|
535 |
msgid "Revert"
|
536 |
msgstr ""
|
537 |
|
538 |
#. Button that saves translations to disk
|
539 |
+
#: src/admin/file/EditController.php:204
|
540 |
msgctxt "Editor"
|
541 |
msgid "Save"
|
542 |
msgstr ""
|
543 |
|
544 |
#. Label for the singular form of the original English text
|
545 |
+
#: src/js/Strings.php:136
|
546 |
msgctxt "Editor"
|
547 |
msgid "Single"
|
548 |
msgstr ""
|
549 |
|
550 |
#. Label for the window pane holding the original English text
|
551 |
#. List heading showing preview of English text for each item
|
552 |
+
#: src/js/Strings.php:123 tpl/admin/file/info-pot.php:23
|
553 |
msgctxt "Editor"
|
554 |
msgid "Source text"
|
555 |
msgstr ""
|
556 |
|
557 |
#. Label for the source text window when no translation selected
|
558 |
+
#: src/js/Strings.php:154
|
559 |
msgctxt "Editor"
|
560 |
msgid "Source text not loaded"
|
561 |
msgstr ""
|
562 |
|
563 |
+
#: src/js/Strings.php:151
|
564 |
+
msgctxt "Editor"
|
565 |
+
msgid "Suggest translation"
|
566 |
+
msgstr ""
|
567 |
+
|
568 |
#. Button that runs in-editor sync/operation
|
569 |
+
#: src/admin/file/EditController.php:206
|
570 |
msgctxt "Editor"
|
571 |
msgid "Sync"
|
572 |
msgstr ""
|
573 |
|
574 |
#. Button that toggles between "code" and regular text editing modes
|
575 |
+
#: src/admin/file/EditController.php:218
|
576 |
msgctxt "Editor"
|
577 |
msgid "Toggle code view"
|
578 |
msgstr ""
|
579 |
|
580 |
+
#: src/js/Strings.php:148
|
581 |
+
msgctxt "Editor"
|
582 |
+
msgid "Toggle Fuzzy"
|
583 |
+
msgstr ""
|
584 |
+
|
585 |
#. Button that toggles invisible characters
|
586 |
+
#: src/admin/file/EditController.php:216
|
587 |
msgctxt "Editor"
|
588 |
msgid "Toggle invisibles"
|
589 |
msgstr ""
|
590 |
|
591 |
+
#: src/js/Strings.php:145
|
592 |
msgctxt "Editor"
|
593 |
msgid "Translated"
|
594 |
msgstr ""
|
595 |
|
596 |
#. List heading showing preview of translated text for each item
|
597 |
+
#: src/js/Strings.php:163
|
598 |
msgctxt "Editor"
|
599 |
msgid "Translation"
|
600 |
msgstr ""
|
601 |
|
602 |
#. Label for the translation editing window when no translation selected
|
603 |
+
#: src/js/Strings.php:160
|
604 |
msgctxt "Editor"
|
605 |
msgid "Translation not loaded"
|
606 |
msgstr ""
|
607 |
|
608 |
+
#: src/js/Strings.php:142
|
609 |
msgctxt "Editor"
|
610 |
msgid "Untranslated"
|
611 |
msgstr ""
|
616 |
"it"
|
617 |
msgstr ""
|
618 |
|
619 |
+
#: tpl/admin/config/settings.php:95
|
620 |
msgid "Enable Ajax file uploads"
|
621 |
msgstr ""
|
622 |
|
624 |
msgid "Enter a new location for this file"
|
625 |
msgstr ""
|
626 |
|
627 |
+
#: src/js/Strings.php:110 src/error/Exception.php:149
|
628 |
msgid "Error"
|
629 |
msgstr ""
|
630 |
|
640 |
msgstr[0] ""
|
641 |
msgstr[1] ""
|
642 |
|
643 |
+
#: tpl/admin/config/settings.php:40 tpl/admin/config/settings.php:44
|
644 |
msgid "Extracting strings"
|
645 |
msgstr ""
|
646 |
|
705 |
msgid "File doesn't exist"
|
706 |
msgstr ""
|
707 |
|
708 |
+
#: src/admin/file/BaseController.php:107 tpl/admin/bundle/inc-po-table.php:22
|
709 |
+
#: tpl/admin/bundle/locale.php:43
|
710 |
msgid "File info"
|
711 |
msgstr ""
|
712 |
|
750 |
msgid "File modification is disallowed by your WordPress config"
|
751 |
msgstr ""
|
752 |
|
753 |
+
#: tpl/admin/file/info-mo.php:21 tpl/admin/file/info-pot.php:17
|
754 |
+
#: tpl/admin/file/info-po.php:22
|
755 |
msgid "File modified"
|
756 |
msgstr ""
|
757 |
|
774 |
msgid "File restored"
|
775 |
msgstr ""
|
776 |
|
777 |
+
#: tpl/admin/file/info-mo.php:18 tpl/admin/file/info-pot.php:14
|
778 |
+
#: tpl/admin/file/info-po.php:19
|
779 |
msgid "File size"
|
780 |
msgstr ""
|
781 |
|
782 |
+
#: tpl/admin/config/settings.php:115 tpl/admin/config/settings.php:119
|
783 |
msgid "File system access"
|
784 |
msgstr ""
|
785 |
|
799 |
msgstr ""
|
800 |
|
801 |
#. Placeholder text for text filter above editor
|
802 |
+
#: src/admin/file/EditController.php:214
|
803 |
msgid "Filter translations"
|
804 |
msgstr ""
|
805 |
|
826 |
msgid "Folders within the bundle that will never be searched for files"
|
827 |
msgstr ""
|
828 |
|
829 |
+
#: tpl/admin/help/tab-config.php:9 tpl/admin/help/tab-config-apis.php:9
|
830 |
msgid "Full documentation"
|
831 |
msgstr ""
|
832 |
|
833 |
+
#: tpl/admin/config/settings.php:27
|
834 |
msgid "Generate hash tables"
|
835 |
msgstr ""
|
836 |
|
846 |
msgid "Go to WordPress Core"
|
847 |
msgstr ""
|
848 |
|
849 |
+
#: tpl/admin/config/settings.php:155
|
850 |
msgid "Grant access to roles"
|
851 |
msgstr ""
|
852 |
|
853 |
+
#: src/admin/file/EditController.php:202 tpl/admin/file/edit-po.php:45
|
854 |
+
#: tpl/admin/file/edit-po.php:65
|
855 |
msgid "Help"
|
856 |
msgstr ""
|
857 |
|
858 |
+
#: src/mvc/AdminController.php:53
|
859 |
msgid "Help & support"
|
860 |
msgstr ""
|
861 |
|
891 |
msgid "Import config from XML"
|
892 |
msgstr ""
|
893 |
|
894 |
+
#: tpl/admin/config/apis.php:90
|
895 |
+
msgid "Important"
|
896 |
+
msgstr ""
|
897 |
+
|
898 |
+
#: tpl/admin/file/info-po.php:55
|
899 |
msgid "In sync with template"
|
900 |
msgstr ""
|
901 |
|
903 |
msgid "Include"
|
904 |
msgstr ""
|
905 |
|
906 |
+
#: tpl/admin/config/settings.php:33
|
907 |
msgid "Include Fuzzy strings"
|
908 |
msgstr ""
|
909 |
|
925 |
msgid "Installed languages"
|
926 |
msgstr ""
|
927 |
|
928 |
+
#: src/Locale.php:304
|
929 |
msgid "Invalid locale"
|
930 |
msgstr ""
|
931 |
|
942 |
msgid "Just now"
|
943 |
msgstr ""
|
944 |
|
945 |
+
#: src/js/Strings.php:76
|
946 |
+
msgid "Keep this translation"
|
947 |
+
msgstr ""
|
948 |
+
|
949 |
#: tpl/admin/bundle/inc-po-table.php:13
|
950 |
msgid "Language"
|
951 |
msgstr ""
|
970 |
msgid "largest is %s"
|
971 |
msgstr ""
|
972 |
|
973 |
+
#: tpl/admin/file/info-pot.php:20
|
974 |
msgid "Last extracted"
|
975 |
msgstr ""
|
976 |
|
979 |
msgid "Last modified"
|
980 |
msgstr ""
|
981 |
|
982 |
+
#: tpl/admin/file/info-mo.php:24 tpl/admin/file/info-po.php:25
|
983 |
msgid "Last translation"
|
984 |
msgstr ""
|
985 |
|
987 |
msgid "Load config"
|
988 |
msgstr ""
|
989 |
|
990 |
+
#: src/js/Strings.php:73
|
991 |
+
msgid "Loading suggestions"
|
992 |
+
msgstr ""
|
993 |
+
|
994 |
#: tpl/admin/list/locales.php:16
|
995 |
msgid "Locale code"
|
996 |
msgstr ""
|
1008 |
msgid "Loco interrupted by output from %s:%u"
|
1009 |
msgstr ""
|
1010 |
|
1011 |
+
#: loco.php:129
|
1012 |
#, php-format
|
1013 |
msgid ""
|
1014 |
"Loco requires the \"%s\" PHP extension. Ask your hosting provider to install "
|
1024 |
msgstr ""
|
1025 |
|
1026 |
#. Name of the plugin
|
1027 |
+
#: src/mvc/AdminRouter.php:37 src/hooks/AdminHooks.php:63
|
1028 |
msgid "Loco Translate"
|
1029 |
msgstr ""
|
1030 |
|
1034 |
msgid "Loco Translate %s"
|
1035 |
msgstr ""
|
1036 |
|
1037 |
+
#: src/data/Settings.php:184
|
1038 |
+
msgid ""
|
1039 |
+
"Loco Translate 2.4 supports third party translation providers. Set up your "
|
1040 |
+
"API keys in the plugin settings!"
|
1041 |
+
msgstr ""
|
1042 |
+
|
1043 |
+
#: src/mvc/AdminController.php:116
|
1044 |
msgid "Loco Translate is powered by"
|
1045 |
msgstr ""
|
1046 |
|
1049 |
msgid "Loco, Translation Management"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
+
#: tpl/admin/file/edit-po.php:34
|
1053 |
+
msgid "Mark new translations as Fuzzy"
|
1054 |
+
msgstr ""
|
1055 |
+
|
1056 |
+
#: tpl/admin/config/settings.php:82
|
1057 |
msgid "Maximum line length (zero disables wrapping)"
|
1058 |
msgstr ""
|
1059 |
|
1068 |
msgid "Merged from source code"
|
1069 |
msgstr ""
|
1070 |
|
1071 |
+
#: tpl/admin/file/info-po.php:79
|
1072 |
msgid "Missing template"
|
1073 |
msgstr ""
|
1074 |
|
1077 |
msgstr ""
|
1078 |
|
1079 |
#. @var Loco_mvc_ViewParams $verbose
|
1080 |
+
#: tpl/admin/config/settings.php:130
|
1081 |
msgid "Modification of installed files"
|
1082 |
msgstr ""
|
1083 |
|
1140 |
msgid "No previous file revisions"
|
1141 |
msgstr ""
|
1142 |
|
1143 |
+
#: tpl/admin/file/edit-po.php:56
|
1144 |
+
msgid "No translation APIs configured"
|
1145 |
+
msgstr ""
|
1146 |
+
|
1147 |
#: tpl/admin/bundle/inc-po-table.php:105
|
1148 |
#, php-format
|
1149 |
msgid "No translations found for \"%s\""
|
1154 |
msgid "no wildcards"
|
1155 |
msgstr ""
|
1156 |
|
1157 |
+
#: tpl/admin/config/settings.php:89 tpl/admin/config/settings.php:125
|
1158 |
msgid "Not recommended"
|
1159 |
msgstr ""
|
1160 |
|
1169 |
msgid "Nothing matches the text filter"
|
1170 |
msgstr ""
|
1171 |
|
1172 |
+
#: src/js/Strings.php:64
|
1173 |
+
msgid "Nothing needed updating"
|
1174 |
+
msgstr ""
|
1175 |
+
|
1176 |
+
#: src/js/Strings.php:116 src/error/Notice.php:20
|
1177 |
#: tpl/admin/common/inc-fsconn.php:37
|
1178 |
msgid "Notice"
|
1179 |
msgstr ""
|
1180 |
|
1181 |
+
#: tpl/admin/config/settings.php:76
|
1182 |
msgid "Number of backups to keep of each file:"
|
1183 |
msgstr ""
|
1184 |
|
1190 |
msgid "Official plugin page"
|
1191 |
msgstr ""
|
1192 |
|
1193 |
+
#: src/js/Strings.php:119 src/error/Success.php:19
|
1194 |
msgid "OK"
|
1195 |
msgstr ""
|
1196 |
|
1220 |
msgstr[1] ""
|
1221 |
|
1222 |
#. Where %2$s is the maximum size of a file that will be included and %3$s is the largest encountered
|
1223 |
+
#: src/ajax/SyncController.php:62
|
1224 |
#, php-format
|
1225 |
msgid ""
|
1226 |
"One file has been skipped because it's %3$s. (Max is %2$s). Check all "
|
1245 |
msgstr[0] ""
|
1246 |
msgstr[1] ""
|
1247 |
|
1248 |
+
#: tpl/admin/file/info-po.php:66
|
1249 |
msgid "Out of sync with template"
|
1250 |
msgstr ""
|
1251 |
|
1253 |
msgid "Overview"
|
1254 |
msgstr ""
|
1255 |
|
1256 |
+
#: tpl/admin/file/edit-po.php:28
|
1257 |
+
msgid "Overwrite existing translations"
|
1258 |
+
msgstr ""
|
1259 |
+
|
1260 |
+
#: src/mvc/AdminRouter.php:237
|
1261 |
msgid "Page not found"
|
1262 |
msgstr ""
|
1263 |
|
1290 |
msgid "Plugin not found: %s"
|
1291 |
msgstr ""
|
1292 |
|
1293 |
+
#: src/mvc/AdminRouter.php:66 src/admin/config/ApisController.php:59
|
1294 |
+
#: src/admin/config/PrefsController.php:42
|
1295 |
#: src/admin/config/VersionController.php:22
|
1296 |
+
#: src/admin/config/SettingsController.php:79 tpl/admin/help/tab-config.php:2
|
1297 |
msgid "Plugin settings"
|
1298 |
msgstr ""
|
1299 |
|
1308 |
msgstr ""
|
1309 |
|
1310 |
#. Plural category for languages that have no plurals
|
1311 |
+
#: src/Locale.php:383
|
1312 |
msgctxt "Plural category"
|
1313 |
msgid "All forms"
|
1314 |
msgstr ""
|
1315 |
|
1316 |
#. Plural category used in some multi-plural languages
|
1317 |
+
#: src/Locale.php:397
|
1318 |
msgctxt "Plural category"
|
1319 |
msgid "Few"
|
1320 |
msgstr ""
|
1321 |
|
1322 |
#. Plural category used in some multi-plural languages
|
1323 |
+
#: src/Locale.php:399
|
1324 |
msgctxt "Plural category"
|
1325 |
msgid "Many"
|
1326 |
msgstr ""
|
1327 |
|
1328 |
#. Plural category for singular quantity
|
1329 |
+
#: src/Locale.php:393
|
1330 |
msgctxt "Plural category"
|
1331 |
msgid "One"
|
1332 |
msgstr ""
|
1333 |
|
1334 |
#. General plural category not covered by other forms
|
1335 |
+
#: src/Locale.php:401
|
1336 |
msgctxt "Plural category"
|
1337 |
msgid "Other"
|
1338 |
msgstr ""
|
1339 |
|
1340 |
#. Plural category used in some multi-plural languages
|
1341 |
+
#: src/Locale.php:395
|
1342 |
msgctxt "Plural category"
|
1343 |
msgid "Two"
|
1344 |
msgstr ""
|
1345 |
|
1346 |
#. Plural category for zero quantity
|
1347 |
+
#: src/Locale.php:391
|
1348 |
msgctxt "Plural category"
|
1349 |
msgid "Zero"
|
1350 |
msgstr ""
|
1351 |
|
1352 |
#. Where %s is the name of a template file
|
1353 |
+
#: tpl/admin/file/info-po.php:70
|
1354 |
#, php-format
|
1355 |
msgid ""
|
1356 |
"PO file has different source strings to \"%s\". Try running Sync before "
|
1358 |
msgstr ""
|
1359 |
|
1360 |
#. Where %s is the name of a template file
|
1361 |
+
#: tpl/admin/file/info-po.php:59
|
1362 |
#, php-format
|
1363 |
msgid "PO file has the same source strings as \"%s\""
|
1364 |
msgstr ""
|
1379 |
msgid "POT file saved"
|
1380 |
msgstr ""
|
1381 |
|
1382 |
+
#: tpl/admin/config/settings.php:102
|
1383 |
msgid "POT template files"
|
1384 |
msgstr ""
|
1385 |
|
1387 |
msgid "Project name"
|
1388 |
msgstr ""
|
1389 |
|
1390 |
+
#: src/js/Strings.php:104
|
1391 |
msgid "Provide the following text when reporting a problem"
|
1392 |
msgstr ""
|
1393 |
|
1399 |
msgid "Recently updated:"
|
1400 |
msgstr ""
|
1401 |
|
1402 |
+
#: tpl/admin/config/settings.php:95
|
1403 |
msgid "Recommended"
|
1404 |
msgstr ""
|
1405 |
|
1429 |
msgid "Restore %s"
|
1430 |
msgstr ""
|
1431 |
|
|
|
|
|
|
|
|
|
1432 |
#. Where %s is a file name
|
1433 |
#: src/ajax/DiffController.php:47
|
1434 |
#, php-format
|
1443 |
msgid "Save config"
|
1444 |
msgstr ""
|
1445 |
|
1446 |
+
#: tpl/admin/config/settings.php:124
|
1447 |
msgid "Save credentials in session"
|
1448 |
msgstr ""
|
1449 |
|
1450 |
+
#: tpl/admin/config/settings.php:176 tpl/admin/config/apis.php:99
|
1451 |
+
#: tpl/admin/config/prefs.php:31
|
1452 |
msgid "Save settings"
|
1453 |
msgstr ""
|
1454 |
|
1455 |
+
#: tpl/admin/config/settings.php:68 tpl/admin/config/settings.php:72
|
1456 |
msgid "Saving PO/POT files"
|
1457 |
msgstr ""
|
1458 |
|
1460 |
msgid "Saving this file requires permission"
|
1461 |
msgstr ""
|
1462 |
|
1463 |
+
#: tpl/admin/config/settings.php:60
|
1464 |
msgid "Scan JavaScript files with extensions:"
|
1465 |
msgstr ""
|
1466 |
|
1467 |
+
#: tpl/admin/config/settings.php:54
|
1468 |
msgid "Scan PHP files with extensions:"
|
1469 |
msgstr ""
|
1470 |
|
1484 |
msgid "See FAQ"
|
1485 |
msgstr ""
|
1486 |
|
1487 |
+
#: tpl/admin/config/apis.php:93
|
1488 |
+
msgid "See full disclaimer"
|
1489 |
+
msgstr ""
|
1490 |
+
|
1491 |
#. Generic error when external process broke an Ajax request
|
1492 |
+
#: src/js/Strings.php:98
|
1493 |
msgid "Server returned invalid data"
|
1494 |
msgstr ""
|
1495 |
|
1504 |
msgstr ""
|
1505 |
|
1506 |
#: src/mvc/AdminRouter.php:67 src/mvc/AdminRouter.php:72
|
1507 |
+
#: src/data/Settings.php:185 src/admin/file/EditController.php:174
|
1508 |
+
#: tpl/admin/file/edit-po.php:62 tpl/admin/common/inc-fsconn.php:18
|
1509 |
#: tpl/admin/common/inc-fsconn.php:43 tpl/admin/errors/no-backups.php:24
|
1510 |
msgid "Settings"
|
1511 |
msgstr ""
|
1512 |
|
1513 |
+
#: src/admin/config/ApisController.php:43
|
1514 |
#: src/admin/config/PrefsController.php:26
|
1515 |
#: src/admin/config/SettingsController.php:31
|
1516 |
msgid "Settings saved"
|
1532 |
msgid "Site options"
|
1533 |
msgstr ""
|
1534 |
|
1535 |
+
#: tpl/admin/help/tab-config.php:5
|
1536 |
msgid ""
|
1537 |
"Site options apply to all users of Loco Translate across the current site"
|
1538 |
msgstr ""
|
1539 |
|
1540 |
+
#: tpl/admin/config/settings.php:48
|
1541 |
msgid "Skip PHP files larger than:"
|
1542 |
msgstr ""
|
1543 |
|
1557 |
msgid "Source files to scan:"
|
1558 |
msgstr ""
|
1559 |
|
|
|
|
|
|
|
|
|
1560 |
#: tpl/admin/init/init-po.php:173
|
1561 |
msgid "Start translating"
|
1562 |
msgstr ""
|
1563 |
|
1564 |
+
#. Message appears after sync operation, where %s refers to a POT file.
|
1565 |
+
#: src/js/Strings.php:37
|
1566 |
+
#, javascript-format
|
1567 |
+
msgid "Strings up to date with %s"
|
1568 |
+
msgstr ""
|
1569 |
+
|
1570 |
+
#. Message appears after sync operation.
|
1571 |
+
#: src/js/Strings.php:40
|
1572 |
+
msgid "Strings up to date with source code"
|
1573 |
+
msgstr ""
|
1574 |
+
|
1575 |
#: tpl/admin/init/init-pot.php:30
|
1576 |
msgid "Strings will be extracted to:"
|
1577 |
msgstr ""
|
1578 |
|
1579 |
+
#: src/js/Strings.php:70
|
1580 |
+
msgid "Suggested translations"
|
1581 |
+
msgstr ""
|
1582 |
+
|
1583 |
#: tpl/admin/init/init-prompt.php:34
|
1584 |
msgid "Suggestion"
|
1585 |
msgstr ""
|
1589 |
msgstr ""
|
1590 |
|
1591 |
#: tpl/admin/file/view-pot.php:9 tpl/admin/file/edit-pot.php:10
|
1592 |
+
#: tpl/admin/file/info-pot.php:12 tpl/admin/bundle/inc-po-table.php:42
|
1593 |
#: tpl/admin/bundle/conf.php:65
|
1594 |
msgid "Template file"
|
1595 |
msgstr ""
|
1667 |
"These plugins have recently loaded translation files into the admin area"
|
1668 |
msgstr ""
|
1669 |
|
1670 |
+
#: tpl/admin/file/info-po.php:83
|
1671 |
msgid ""
|
1672 |
"These translations are not linked to a POT file. Sync operations will "
|
1673 |
"extract strings directly from source code."
|
1674 |
msgstr ""
|
1675 |
|
1676 |
+
#: tpl/admin/config/apis.php:92
|
1677 |
+
msgid ""
|
1678 |
+
"Third party services are subject to their own terms of use and may incur "
|
1679 |
+
"costs from the provider"
|
1680 |
+
msgstr ""
|
1681 |
+
|
1682 |
#: tpl/admin/init/init-prompt.php:18
|
1683 |
msgid "This bundle doesn't define a translations template file"
|
1684 |
msgstr ""
|
1756 |
msgstr ""
|
1757 |
|
1758 |
#. Warning when POT file is opened in the file editor. It can be disabled in settings.
|
1759 |
+
#: src/admin/file/EditController.php:173
|
1760 |
msgid ""
|
1761 |
"This is NOT a translation file. Manual editing of source strings is not "
|
1762 |
"recommended."
|
1770 |
msgid "This page was expecting a file, but the path is actually a directory"
|
1771 |
msgstr ""
|
1772 |
|
1773 |
+
#: src/hooks/AdminHooks.php:64
|
1774 |
msgid "This plugin doesn't collect any data from public website visitors."
|
1775 |
msgstr ""
|
1776 |
|
1800 |
"the file writeable by %s"
|
1801 |
msgstr ""
|
1802 |
|
1803 |
+
#: src/hooks/AdminHooks.php:103 tpl/admin/file/edit-po.php:42
|
1804 |
msgid "Translate"
|
1805 |
msgstr ""
|
1806 |
|
1816 |
msgid "Translate themes and plugins directly in WordPress"
|
1817 |
msgstr ""
|
1818 |
|
1819 |
+
#: src/js/Strings.php:54
|
1820 |
+
#, javascript-format
|
1821 |
+
msgid "Translation job aborted with one string remaining"
|
1822 |
+
msgid_plural "Translation job aborted with %s strings remaining"
|
1823 |
+
msgstr[0] ""
|
1824 |
+
msgstr[1] ""
|
1825 |
+
|
1826 |
+
#: tpl/admin/file/info-po.php:28 tpl/admin/bundle/inc-po-table.php:16
|
1827 |
#: tpl/admin/bundle/locale.php:36
|
1828 |
msgid "Translation progress"
|
1829 |
msgstr ""
|
1830 |
|
1831 |
+
#. %s%% is a percentage, e.g. 50%
|
1832 |
+
#: src/js/Strings.php:51
|
1833 |
+
#, javascript-format
|
1834 |
+
msgid "Translation progress %s%%"
|
1835 |
+
msgstr ""
|
1836 |
+
|
1837 |
#. Where %s is the name of the invalid POT file
|
1838 |
+
#: src/ajax/SyncController.php:47 src/admin/file/EditController.php:135
|
1839 |
#, php-format
|
1840 |
msgid "Translation template is invalid (%s)"
|
1841 |
msgstr ""
|
1842 |
|
1843 |
+
#: src/admin/file/EditController.php:130
|
1844 |
#, php-format
|
1845 |
msgid "Translations don't match template. Run sync to update from %s"
|
1846 |
msgstr ""
|
1849 |
msgid "Translations have been recently modified in the following bundles"
|
1850 |
msgstr ""
|
1851 |
|
1852 |
+
#: tpl/admin/config/prefs.php:16 tpl/admin/config/prefs.php:20
|
1853 |
msgid "Translator credit"
|
1854 |
msgstr ""
|
1855 |
|
1869 |
msgid "Unknown author"
|
1870 |
msgstr ""
|
1871 |
|
1872 |
+
#: src/js/Strings.php:107
|
1873 |
msgid "Unknown error"
|
1874 |
msgstr ""
|
1875 |
|
1882 |
msgid "Use this file as template when running Sync"
|
1883 |
msgstr ""
|
1884 |
|
1885 |
+
#: src/js/Strings.php:67
|
1886 |
+
msgid "Use this translation"
|
1887 |
+
msgstr ""
|
1888 |
+
|
1889 |
#: src/mvc/AdminRouter.php:71 src/admin/config/PrefsController.php:13
|
1890 |
#: src/admin/config/BaseController.php:19
|
1891 |
msgid "User options"
|
1892 |
msgstr ""
|
1893 |
|
1894 |
+
#: tpl/admin/help/tab-config.php:6
|
1895 |
msgid "User options apply to your WordPress login, across all sites"
|
1896 |
msgstr ""
|
1897 |
|
1907 |
msgstr ""
|
1908 |
|
1909 |
#: src/admin/config/VersionController.php:13
|
1910 |
+
#: src/admin/config/BaseController.php:21
|
1911 |
msgid "Version"
|
1912 |
msgstr ""
|
1913 |
|
1929 |
msgid "Visit official site"
|
1930 |
msgstr ""
|
1931 |
|
1932 |
+
#: src/js/Strings.php:113 src/error/Warning.php:19
|
1933 |
msgid "Warning"
|
1934 |
msgstr ""
|
1935 |
|
1936 |
+
#: tpl/admin/file/info-po.php:45
|
1937 |
msgid "We can't find the binary MO file that belongs with these translations"
|
1938 |
msgstr ""
|
1939 |
|
2039 |
msgstr ""
|
2040 |
|
2041 |
#. Warning appears when user tries to refresh or navigate away when editor work is unsaved
|
2042 |
+
#: src/js/Strings.php:79
|
2043 |
msgid "Your changes will be lost if you continue without saving"
|
2044 |
msgstr ""
|
lib/compiled/gettext.php
CHANGED
@@ -10,12 +10,12 @@ function loco_convert_utf8( $str, $enc ){ if( '' === $enc ){ if( false === pre
|
|
10 |
abstract class LocoGettextParser { private $head; private $cs; abstract public function parse( $limit = -1 ); protected function setHeader( LocoPoHeaders $head ){ $this->head = $head; if( $cs = $head->getCharset() ){ if( is_null($this->cs) ){ $this->setCharset($cs); } } return $head; } public function getHeader(){ return $this->head; } protected function setCharset( $cs ){ $this->cs = $cs; } protected function getCharset(){ return $this->cs; } protected function str( $str ){ if( '' !== $str ){ $enc = (string) $this->cs; $str = loco_convert_utf8( $str, $enc ); } return $str; } }
|
11 |
function loco_remove_bom( $s, &$c ){ $bom = substr($s,0,2); if( "\xFF\xFE" === $bom ){ $c = 'UTF-16LE'; return substr($s,2); } if( "\xFE\xFF" === $bom ){ $c = 'UTF-16BE'; return substr($s,2); } if( "\xEF\xBB" === $bom && "\xBF" === $s[2] ){ $c = 'UTF-8'; return substr($s,3); } $c = ''; return $s; }
|
12 |
function loco_parse_reference_id( $refs, &$_id ){ if( false === ( $n = strpos($refs,'loco:') ) ){ $_id = ''; return $refs; } $_id = substr($refs, $n+5, 24 ); $refs = substr_replace( $refs, '', $n, 29 ); return trim( $refs ); }
|
13 |
-
class LocoPoParser extends LocoGettextParser implements Iterator { private $lines = array(); private $i; private $k; private $m; public function __construct( $src ){ if( '' !== $src ){ $src = loco_remove_bom($src,$cs); if( $cs && 'UTF-8' !== $cs ){ $src = mb_convert_encoding( $src, 'UTF-8', array($cs) ); } if( 'UTF-8' === mb_detect_encoding($src,array('UTF-8','ISO-8859-1'),true) ){ $this->setCharset('UTF-8'); } $this->lines = preg_split('/(\\r\\n?|\\n)/', $src ); } } public function rewind(){ $this->i = -1; $this->k = -1; $this->next(); } public function valid(){ return is_int($this->i); } public function key(){ return $this->k; } public function current(){ return $this->m; } public function next(){ $valid = false; $entry = array( '#' => array(), 'id' => array(null), 'str' => array(null) ); $i = $this->i; while( array_key_exists(++$i,$this->lines) ){ $line = $this->lines[$i]; try { if( '' === $line ){ if( $valid ){ break; } continue; } $c = $line[0]; if( '#' === $c ){ if( $valid ){ $i--; break; } if( '#' === $line ){ continue; } $f = $line[1]; $entry['#'][$f][] = trim( substr( $line, 1+strlen($f) ), "/ \n\r\t" ); } else if( preg_match('/^msg(id(?:_plural)?|ctxt|str(?:\\[(\\d+)])?)[ \\t]*/', $line, $r ) ){ if( isset($r[2]) ){ $key = 'str'; $idx = (int) $r[2]; } else { $key = $r[1]; $idx = 0; } if( $valid && 'str' !== $key && null !== $entry['str'][0] ){ $i--; break; } $snip = strlen($r[0]); if( '"' !== substr($line,$snip,1) ){ throw new Exception('Expected " to follow msg'.$key); } $val = ''; $line = substr($line,$snip); while( true ){ if( '"' === $line || '"' !== substr($line,-1) ){ throw new Exception('Unterminated msg'.$key ); } $val .= substr( $line, 1, -1 ); $j = $i + 1; if( array_key_exists($j,$this->lines) && ( $line = $this->lines[$j] ) && '"' === $line[0] ){ $i = $j; } else { break; } } if( ! $valid ){ $valid = true; } if( 'id_plural' === $key ){ $key = 'id'; $idx = 1; } $entry[$key][$idx] = stripcslashes($val); } else if( preg_match('/^[ \\t]+$/',$line) ){ if( $valid ) { break; } } else if( '"' === $c ){ throw new Exception('String encountered without keyword'); } else { throw new Exception('Junk'); } } catch( Exception $e ){ } } if( $valid ){ ++$this->k; $this->i = $i; $this->m = $entry; } else { $this->i = null; $this->k = null; $this->m = null; } } public function parse( $limit = -1 ){ $this->rewind(); if( ! $this->valid() ){ throw new Loco_error_ParseException('Invalid PO file'); } $i = -1; $assets = array(); $entry = $this->current(); if( '' !== $entry['id'][0] || isset($entry['ctxt']) || is_null($entry['str'][0]) ){ $head = $this->setHeader( new LocoPoHeaders ); } else { $head = $this->setHeader( LocoPoHeaders::fromMsgstr($entry['str'][0]) ); } $lk = $head['X-Loco-Lookup']; while( $this->valid() ){ $entry = $this->current(); $this->next(); $msgid = $entry['id'][0]; if( is_null($msgid) ){ continue; } if( ++$i === $limit ){ return $assets; } $asset = array( 'source' => $this->str( $msgid ), 'target' => $this->str( (string) $entry['str'][0] ), 'context' => null, ); $prev_entry = null; if( isset($entry['ctxt']) ){ $asset['context'] = $this->str( $entry['ctxt'][0] ); } $cmt = $entry['#']; if( isset($cmt[' ']) ){ $asset['comment'] = $this->str( implode("\n", $cmt[' '] ) ); } if( isset($cmt['.']) ){ $asset['notes'] = $this->str( implode("\n", $cmt['.'] ) ); } if( isset($cmt[':']) ){ if( $refs = implode( ' ', $cmt[':'] ) ) { $refs = $this->str($refs); if( $refs = loco_parse_reference_id( $refs, $_id ) ){ $asset['refs'] = $refs; } if( $_id ){ $asset['_id'] = $_id; } } } if( isset($cmt[',']) ){ foreach( $cmt[','] as $flags ){ foreach( explode(',',$flags) as $flag ){ if( $flag = trim($flag," \t") ){ if( preg_match('/^((?:no-)?\w+)-format/', $flag, $r ) ){ $asset['format'] = $r[1]; } else if( 'fuzzy' === $flag ){ $asset['flag'] = 4; } } } } } if( isset($cmt['|']) ){ $p = new LocoPoParser(''); $p->lines = $cmt['|']; $p->setCharset( $this->getCharset() ); try { $prev_entry = $p->parse(); } catch( Loco_error_ParseException $e ){ } if( $prev_entry ){ $msgid = $prev_entry[0]['source']; if( $lk ){ $asset[$lk] = $asset['source']; $asset['source'] = $msgid; } else if( 'loco:' === substr($msgid,0,5) ){ $asset['_id'] = substr($msgid,5); } else { $asset['prev'] = $prev_entry;
|
14 |
class LocoMoParser extends LocoGettextParser { private $bin; private $be; private $n; private $o; private $t; private $v; public function __construct( $bin ){ $this->bin = $bin; } public function getAt( $idx ){ $offset = $this->targetOffset(); $offset += ( $idx * 8 ); $len = $this->integerAt( $offset ); $idx = $this->integerAt( $offset + 4 ); $txt = $this->bytes( $idx, $len ); if( false === strpos( $txt, "\0") ){ return $txt; } return explode( "\0", $txt ); } public function parse( $limit = -1 ){ $i = -1; $r = array(); $sourceOffset = $this->sourceOffset(); $targetOffset = $this->targetOffset(); $soffset = $sourceOffset; $toffset = $targetOffset; while( $soffset < $targetOffset ){ $len = $this->integerAt( $soffset ); $idx = $this->integerAt( $soffset + 4 ); $src = $this->bytes( $idx, $len ); $eot = strpos( $src, "\x04" ); if( false === $eot ){ $context = null; } else { $context = $this->str( substr($src, 0, $eot ) ); $src = substr( $src, $eot+1 ); } $sources = explode( "\0", $src, 2 ); $len = $this->integerAt( $toffset ); $idx = $this->integerAt( $toffset + 4 ); $targets = explode( "\0", $this->bytes( $idx, $len ) ); if( -1 === $i && '' === $sources[0] && is_null($context) ){ $this->setHeader( LocoPoHeaders::fromMsgstr($targets[0]) ); } if( ++$i === $limit ){ break; } $r[$i] = array( 'source' => $this->str( $sources[0] ), 'target' => $this->str( $targets[0] ), 'context' => $context, ); if( isset($sources[1]) ){ $p = count($r) - 1; $nforms = max( 2, count($targets) ); for( $i = 1; $i < $nforms; $i++ ){ $r[] = array( 'source' => isset($sources[$i]) ? $this->str( $sources[$i] ) : sprintf('%s (plural %u)',$r[$p]['source'],$i), 'target' => isset($targets[$i]) ? $this->str( $targets[$i] ) : '', 'parent' => $p, 'plural' => $i, ); } } $soffset += 8; $toffset += 8; } return $r; } public function isBigendian(){ if( is_null($this->be) ){ $str = $this->words( 0, 1 ); if( "\xDE\x12\x04\x95" === $str ){ $this->be = false; } else if( "\x95\x04\x12\xDE" === $str ){ $this->be = true; } else { throw new Loco_error_ParseException('Invalid MO format'); } } return $this->be; } public function version(){ if( is_null($this->v) ){ $this->v = $this->integerWord(1); } return $this->v; } public function count(){ if( is_null($this->n) ){ $this->n = $this->integerWord(2); } return $this->n; } public function sourceOffset(){ if( is_null($this->o) ){ $this->o = $this->integerWord(3); } return $this->o; } public function targetOffset(){ if( is_null($this->t) ){ $this->t = $this->integerWord(4); } return $this->t; } public function getHashTable(){ $s = $this->integerWord(5); $h = $this->integerWord(6); return $this->bytes( $h, $s * 4 ); } private function bytes( $offset, $length ){ $s = substr( $this->bin, $offset, $length ); if( strlen($s) !== $length ){ throw new Loco_error_ParseException('Failed to read '.$length.' bytes at ['.$offset.']' ); } return $s; } private function words( $offset, $length ){ return $this->bytes( $offset * 4, $length * 4 ); } private function integerWord( $offset ){ return $this->integerAt( $offset * 4 ); } private function integerAt( $offset ){ $str = $this->bytes( $offset, 4 ); $fmt = $this->isBigendian() ? 'N' : 'V'; $arr = unpack( $fmt, $str ); if( ! isset($arr[1]) || ! is_int($arr[1]) ){ throw new Loco_error_ParseException('Failed to read integer at byte '.$offset); } return $arr[1]; } }
|
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 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 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[++$i]['parent']) ){ $this->i = $i; $plurals[] = new LocoPoMessage( $po[$i] ); } 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_null($map) ){ } else 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' ); } }
|
17 |
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; } }
|
18 |
-
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
|
|
|
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(array('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 ); }
|
@@ -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( $key, array $entry ){ $key = $key."\2"; if( ! isset($this->reg[$key]) ){ $index = count($this->exp); $this->reg[$key] = $index; $this->exp[$index] = $entry; } } 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 ); } }
|
10 |
abstract class LocoGettextParser { private $head; private $cs; abstract public function parse( $limit = -1 ); protected function setHeader( LocoPoHeaders $head ){ $this->head = $head; if( $cs = $head->getCharset() ){ if( is_null($this->cs) ){ $this->setCharset($cs); } } return $head; } public function getHeader(){ return $this->head; } protected function setCharset( $cs ){ $this->cs = $cs; } protected function getCharset(){ return $this->cs; } protected function str( $str ){ if( '' !== $str ){ $enc = (string) $this->cs; $str = loco_convert_utf8( $str, $enc ); } return $str; } }
|
11 |
function loco_remove_bom( $s, &$c ){ $bom = substr($s,0,2); if( "\xFF\xFE" === $bom ){ $c = 'UTF-16LE'; return substr($s,2); } if( "\xFE\xFF" === $bom ){ $c = 'UTF-16BE'; return substr($s,2); } if( "\xEF\xBB" === $bom && "\xBF" === $s[2] ){ $c = 'UTF-8'; return substr($s,3); } $c = ''; return $s; }
|
12 |
function loco_parse_reference_id( $refs, &$_id ){ if( false === ( $n = strpos($refs,'loco:') ) ){ $_id = ''; return $refs; } $_id = substr($refs, $n+5, 24 ); $refs = substr_replace( $refs, '', $n, 29 ); return trim( $refs ); }
|
13 |
+
class LocoPoParser extends LocoGettextParser implements Iterator { private $lines = array(); private $i; private $k; private $m; public function __construct( $src ){ if( '' !== $src ){ $src = loco_remove_bom($src,$cs); if( $cs && 'UTF-8' !== $cs ){ $src = mb_convert_encoding( $src, 'UTF-8', array($cs) ); } if( 'UTF-8' === mb_detect_encoding($src,array('UTF-8','ISO-8859-1'),true) ){ $this->setCharset('UTF-8'); } $this->lines = preg_split('/(\\r\\n?|\\n)/', $src ); } } public function rewind(){ $this->i = -1; $this->k = -1; $this->next(); } public function valid(){ return is_int($this->i); } public function key(){ return $this->k; } public function current(){ return $this->m; } public function next(){ $valid = false; $entry = array( '#' => array(), 'id' => array(null), 'str' => array(null) ); $i = $this->i; while( array_key_exists(++$i,$this->lines) ){ $line = $this->lines[$i]; try { if( '' === $line ){ if( $valid ){ break; } continue; } $c = $line[0]; if( '#' === $c ){ if( $valid ){ $i--; break; } if( '#' === $line ){ continue; } $f = $line[1]; $entry['#'][$f][] = trim( substr( $line, 1+strlen($f) ), "/ \n\r\t" ); } else if( preg_match('/^msg(id(?:_plural)?|ctxt|str(?:\\[(\\d+)])?)[ \\t]*/', $line, $r ) ){ if( isset($r[2]) ){ $key = 'str'; $idx = (int) $r[2]; } else { $key = $r[1]; $idx = 0; } if( $valid && 'str' !== $key && null !== $entry['str'][0] ){ $i--; break; } $snip = strlen($r[0]); if( '"' !== substr($line,$snip,1) ){ throw new Exception('Expected " to follow msg'.$key); } $val = ''; $line = substr($line,$snip); while( true ){ if( '"' === $line || '"' !== substr($line,-1) ){ throw new Exception('Unterminated msg'.$key ); } $val .= substr( $line, 1, -1 ); $j = $i + 1; if( array_key_exists($j,$this->lines) && ( $line = $this->lines[$j] ) && '"' === $line[0] ){ $i = $j; } else { break; } } if( ! $valid ){ $valid = true; } if( 'id_plural' === $key ){ $key = 'id'; $idx = 1; } $entry[$key][$idx] = stripcslashes($val); } else if( preg_match('/^[ \\t]+$/',$line) ){ if( $valid ) { break; } } else if( '"' === $c ){ throw new Exception('String encountered without keyword'); } else { throw new Exception('Junk'); } } catch( Exception $e ){ } } if( $valid ){ ++$this->k; $this->i = $i; $this->m = $entry; } else { $this->i = null; $this->k = null; $this->m = null; } } public function parse( $limit = -1 ){ $this->rewind(); if( ! $this->valid() ){ throw new Loco_error_ParseException('Invalid PO file'); } $i = -1; $assets = array(); $entry = $this->current(); if( '' !== $entry['id'][0] || isset($entry['ctxt']) || is_null($entry['str'][0]) ){ $head = $this->setHeader( new LocoPoHeaders ); } else { $head = $this->setHeader( LocoPoHeaders::fromMsgstr($entry['str'][0]) ); } $lk = $head['X-Loco-Lookup']; while( $this->valid() ){ $entry = $this->current(); $this->next(); $msgid = $entry['id'][0]; if( is_null($msgid) ){ continue; } if( ++$i === $limit ){ return $assets; } $asset = array( 'source' => $this->str( $msgid ), 'target' => $this->str( (string) $entry['str'][0] ), 'context' => null, ); $prev_entry = null; if( isset($entry['ctxt']) ){ $asset['context'] = $this->str( $entry['ctxt'][0] ); } $cmt = $entry['#']; if( isset($cmt[' ']) ){ $asset['comment'] = $this->str( implode("\n", $cmt[' '] ) ); } if( isset($cmt['.']) ){ $asset['notes'] = $this->str( implode("\n", $cmt['.'] ) ); } if( isset($cmt[':']) ){ if( $refs = implode( ' ', $cmt[':'] ) ) { $refs = $this->str($refs); if( $refs = loco_parse_reference_id( $refs, $_id ) ){ $asset['refs'] = $refs; } if( $_id ){ $asset['_id'] = $_id; } } } if( isset($cmt[',']) ){ foreach( $cmt[','] as $flags ){ foreach( explode(',',$flags) as $flag ){ if( $flag = trim($flag," \t") ){ if( preg_match('/^((?:no-)?\w+)-format/', $flag, $r ) ){ $asset['format'] = $r[1]; } else if( 'fuzzy' === $flag ){ $asset['flag'] = 4; } } } } } if( isset($cmt['|']) ){ $p = new LocoPoParser(''); $p->lines = $cmt['|']; $p->setCharset( $this->getCharset() ); try { $prev_entry = $p->parse(); } catch( Loco_error_ParseException $e ){ } if( $prev_entry ){ $msgid = $prev_entry[0]['source']; if( $lk && 'text' !== $lk ){ $asset[$lk] = $asset['source']; $asset['source'] = $msgid; } else if( 'loco:' === substr($msgid,0,5) ){ $asset['_id'] = substr($msgid,5); } else { $asset['prev'] = $prev_entry; $prev_entry = null; } } } $assets[] = $asset; if( isset($entry['id'][1]) ){ $idx = 0; $pidx = count($assets) - 1; $num = max( 2, count($entry['str']) ); while( ++$idx < $num ){ $plural = array( 'source' => '', 'target' => isset($entry['str'][$idx]) ? $this->str($entry['str'][$idx]) : '', 'plural' => $idx, 'parent' => $pidx, ); if( 1 === $idx ){ $plural['source'] = $this->str($entry['id'][1]); if( is_array($prev_entry) && isset($prev_entry[1]) ){ if( $lk && 'text' !== $lk ){ $plural[$lk] = $plural['source']; $plural['source'] = $prev_entry[1]['source']; } } } if( isset($asset['flag']) ){ $plural['flag'] = $asset['flag']; } $assets[] = $plural; } } } if( -1 === $i ){ throw new Loco_error_ParseException('Invalid PO file'); } else if( 0 === $i && '' === $assets[0]['source'] && '' === $assets[0]['target'] ){ throw new Loco_error_ParseException('Invalid PO file' ); } return $assets; } }
|
14 |
class LocoMoParser extends LocoGettextParser { private $bin; private $be; private $n; private $o; private $t; private $v; public function __construct( $bin ){ $this->bin = $bin; } public function getAt( $idx ){ $offset = $this->targetOffset(); $offset += ( $idx * 8 ); $len = $this->integerAt( $offset ); $idx = $this->integerAt( $offset + 4 ); $txt = $this->bytes( $idx, $len ); if( false === strpos( $txt, "\0") ){ return $txt; } return explode( "\0", $txt ); } public function parse( $limit = -1 ){ $i = -1; $r = array(); $sourceOffset = $this->sourceOffset(); $targetOffset = $this->targetOffset(); $soffset = $sourceOffset; $toffset = $targetOffset; while( $soffset < $targetOffset ){ $len = $this->integerAt( $soffset ); $idx = $this->integerAt( $soffset + 4 ); $src = $this->bytes( $idx, $len ); $eot = strpos( $src, "\x04" ); if( false === $eot ){ $context = null; } else { $context = $this->str( substr($src, 0, $eot ) ); $src = substr( $src, $eot+1 ); } $sources = explode( "\0", $src, 2 ); $len = $this->integerAt( $toffset ); $idx = $this->integerAt( $toffset + 4 ); $targets = explode( "\0", $this->bytes( $idx, $len ) ); if( -1 === $i && '' === $sources[0] && is_null($context) ){ $this->setHeader( LocoPoHeaders::fromMsgstr($targets[0]) ); } if( ++$i === $limit ){ break; } $r[$i] = array( 'source' => $this->str( $sources[0] ), 'target' => $this->str( $targets[0] ), 'context' => $context, ); if( isset($sources[1]) ){ $p = count($r) - 1; $nforms = max( 2, count($targets) ); for( $i = 1; $i < $nforms; $i++ ){ $r[] = array( 'source' => isset($sources[$i]) ? $this->str( $sources[$i] ) : sprintf('%s (plural %u)',$r[$p]['source'],$i), 'target' => isset($targets[$i]) ? $this->str( $targets[$i] ) : '', 'parent' => $p, 'plural' => $i, ); } } $soffset += 8; $toffset += 8; } return $r; } public function isBigendian(){ if( is_null($this->be) ){ $str = $this->words( 0, 1 ); if( "\xDE\x12\x04\x95" === $str ){ $this->be = false; } else if( "\x95\x04\x12\xDE" === $str ){ $this->be = true; } else { throw new Loco_error_ParseException('Invalid MO format'); } } return $this->be; } public function version(){ if( is_null($this->v) ){ $this->v = $this->integerWord(1); } return $this->v; } public function count(){ if( is_null($this->n) ){ $this->n = $this->integerWord(2); } return $this->n; } public function sourceOffset(){ if( is_null($this->o) ){ $this->o = $this->integerWord(3); } return $this->o; } public function targetOffset(){ if( is_null($this->t) ){ $this->t = $this->integerWord(4); } return $this->t; } public function getHashTable(){ $s = $this->integerWord(5); $h = $this->integerWord(6); return $this->bytes( $h, $s * 4 ); } private function bytes( $offset, $length ){ $s = substr( $this->bin, $offset, $length ); if( strlen($s) !== $length ){ throw new Loco_error_ParseException('Failed to read '.$length.' bytes at ['.$offset.']' ); } return $s; } private function words( $offset, $length ){ return $this->bytes( $offset * 4, $length * 4 ); } private function integerWord( $offset ){ return $this->integerAt( $offset * 4 ); } private function integerAt( $offset ){ $str = $this->bytes( $offset, 4 ); $fmt = $this->isBigendian() ? 'N' : 'V'; $arr = unpack( $fmt, $str ); if( ! isset($arr[1]) || ! is_int($arr[1]) ){ throw new Loco_error_ParseException('Failed to read integer at byte '.$offset); } return $arr[1]; } }
|
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[++$i]['parent']) ){ $this->i = $i; $plurals[] = new LocoPoMessage( $po[$i] ); } 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(array('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 ); }
|
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( $key, array $entry ){ $key = $key."\2"; if( ! isset($this->reg[$key]) ){ $index = count($this->exp); $this->reg[$key] = $index; $this->exp[$index] = $entry; if( isset($entry['format']) ){ $index = $entry['parent']; if( ! isset($this->exp[$index]['format']) ) { $this->exp[$index]['format'] = $entry['format']; } } } } 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 ); } }
|
lib/data/languages.php
CHANGED
@@ -2,4 +2,4 @@
|
|
2 |
/**
|
3 |
* Compiled data. Do not edit.
|
4 |
*/
|
5 |
-
return array('aa'=>'Afar','ab'=>'Abkhazian','ae'=>'Avestan','af'=>'Afrikaans','ak'=>'Akan','am'=>'Amharic','an'=>'Aragonese','ar'=>'Arabic','arq'=>'Algerian Arabic','ary'=>'Moroccan Arabic','as'=>'Assamese','ast'=>'Asturian','av'=>'Avaric','ay'=>'Aymara','az'=>'Azerbaijani','azb'=>'South Azerbaijani','ba'=>'Bashkir','bal'=>'Baluchi','bcc'=>'Southern Balochi','be'=>'Belarusian','bg'=>'Bulgarian','bi'=>'Bislama','bm'=>'Bambara','bn'=>'Bengali','bo'=>'Tibetan','br'=>'Breton','bs'=>'Bosnian','ca'=>'Catalan','ce'=>'Chechen','ceb'=>'Cebuano','ch'=>'Chamorro','ckb'=>'Central Kurdish','co'=>'Corsican','cr'=>'Cree','cs'=>'Czech','cu'=>'Church Slavic','cv'=>'Chuvash','cy'=>'Welsh','da'=>'Danish','de'=>'German','dv'=>'Dhivehi','dz'=>'Dzongkha','ee'=>'Ewe','el'=>'Greek','en'=>'English','eo'=>'Esperanto','es'=>'Spanish','et'=>'Estonian','eu'=>'Basque','fa'=>'Persian','ff'=>'Fulah','fi'=>'Finnish','fj'=>'Fijian','fo'=>'Faroese','fr'=>'French','frp'=>'Arpitan','fuc'=>'Pulaar','fur'=>'Friulian','fy'=>'Western Frisian','ga'=>'Irish','gd'=>'Scottish Gaelic','gl'=>'Galician','gn'=>'Guarani','gsw'=>'Swiss German','gu'=>'Gujarati','gv'=>'Manx','ha'=>'Hausa','haw'=>'Hawaiian','haz'=>'Hazaragi','he'=>'Hebrew','hi'=>'Hindi','ho'=>'Hiri Motu','hr'=>'Croatian','ht'=>'Haitian','hu'=>'Hungarian','hy'=>'Armenian','hz'=>'Herero','ia'=>'Interlingua','id'=>'Indonesian','ie'=>'Interlingue','ig'=>'Igbo','ii'=>'Sichuan Yi','ik'=>'Inupiaq','io'=>'Ido','is'=>'Icelandic','it'=>'Italian','iu'=>'Inuktitut','ja'=>'Japanese','jv'=>'Javanese','ka'=>'Georgian','kab'=>'Kabyle','kg'=>'Kongo','ki'=>'Kikuyu','kj'=>'Kuanyama','kk'=>'Kazakh','kl'=>'Kalaallisut','km'=>'Central Khmer','kn'=>'Kannada','ko'=>'Korean','kr'=>'Kanuri','ks'=>'Kashmiri','ku'=>'Kurdish','kv'=>'Komi','kw'=>'Cornish','ky'=>'Kirghiz','la'=>'Latin','lb'=>'Luxembourgish','lg'=>'Ganda','li'=>'Limburgan','ln'=>'Lingala','lo'=>'Lao','lt'=>'Lithuanian','lu'=>'Luba-Katanga','lv'=>'Latvian','mg'=>'Malagasy','mh'=>'Marshallese','mi'=>'Maori','mk'=>'Macedonian','ml'=>'Malayalam','mn'=>'Mongolian','mr'=>'Marathi','ms'=>'Malay','mt'=>'Maltese','my'=>'Burmese','na'=>'Nauru','nb'=>'Norwegian Bokmål','nd'=>'North Ndebele','ne'=>'Nepali','ng'=>'Ndonga','nl'=>'Dutch','nn'=>'Norwegian Nynorsk','no'=>'Norwegian','nr'=>'South Ndebele','nv'=>'Navajo','ny'=>'Nyanja','oc'=>'Occitan (post 1500)','oj'=>'Ojibwa','om'=>'Oromo','or'=>'Oriya','ory'=>'Oriya (individual language)','os'=>'Ossetian','pa'=>'Panjabi','pi'=>'Pali','pl'=>'Polish','ps'=>'Pushto','pt'=>'Portuguese','qu'=>'Quechua','rhg'=>'Rohingya','rm'=>'Romansh','rn'=>'Rundi','ro'=>'Romanian','ru'=>'Russian','rue'=>'Rusyn','rup'=>'Macedo-Romanian','rw'=>'Kinyarwanda','sa'=>'Sanskrit','sah'=>'Yakut','sc'=>'Sardinian','sd'=>'Sindhi','se'=>'Northern Sami','sg'=>'Sango','sh'=>'Serbo-Croatian','si'=>'Sinhala','sk'=>'Slovak','sl'=>'Slovenian','sm'=>'Samoan','sn'=>'Shona','so'=>'Somali','sq'=>'Albanian','sr'=>'Serbian','ss'=>'Swati','st'=>'Southern Sotho','su'=>'Sundanese','sv'=>'Swedish','sw'=>'Swahili','szl'=>'Silesian','ta'=>'Tamil','te'=>'Telugu','tg'=>'Tajik','th'=>'Thai','ti'=>'Tigrinya','tk'=>'Turkmen','tl'=>'Tagalog','tn'=>'Tswana','to'=>'Tonga (Tonga Islands)','tr'=>'Turkish','ts'=>'Tsonga','tt'=>'Tatar','tw'=>'Twi','twd'=>'Twents','ty'=>'Tahitian','tzm'=>'Central Atlas Tamazight','ug'=>'Uighur','uk'=>'Ukrainian','ur'=>'Urdu','uz'=>'Uzbek','ve'=>'Venda','vi'=>'Vietnamese','vo'=>'Volapük','wa'=>'Walloon','wo'=>'Wolof','xh'=>'Xhosa','xmf'=>'Mingrelian','yi'=>'Yiddish','yo'=>'Yoruba','za'=>'Zhuang','zh'=>'Chinese','zu'=>'Zulu');
|
2 |
/**
|
3 |
* Compiled data. Do not edit.
|
4 |
*/
|
5 |
+
return array('aa'=>'Afar','ab'=>'Abkhazian','ae'=>'Avestan','af'=>'Afrikaans','ak'=>'Akan','am'=>'Amharic','an'=>'Aragonese','ar'=>'Arabic','arq'=>'Algerian Arabic','ary'=>'Moroccan Arabic','as'=>'Assamese','ast'=>'Asturian','av'=>'Avaric','ay'=>'Aymara','az'=>'Azerbaijani','azb'=>'South Azerbaijani','ba'=>'Bashkir','bal'=>'Baluchi','bcc'=>'Southern Balochi','be'=>'Belarusian','bg'=>'Bulgarian','bi'=>'Bislama','bm'=>'Bambara','bn'=>'Bengali','bo'=>'Tibetan','br'=>'Breton','bs'=>'Bosnian','ca'=>'Catalan','ce'=>'Chechen','ceb'=>'Cebuano','ch'=>'Chamorro','ckb'=>'Central Kurdish','co'=>'Corsican','cr'=>'Cree','cs'=>'Czech','cu'=>'Church Slavic','cv'=>'Chuvash','cy'=>'Welsh','da'=>'Danish','de'=>'German','dv'=>'Dhivehi','dz'=>'Dzongkha','ee'=>'Ewe','el'=>'Greek','en'=>'English','eo'=>'Esperanto','es'=>'Spanish','et'=>'Estonian','eu'=>'Basque','fa'=>'Persian','ff'=>'Fulah','fi'=>'Finnish','fj'=>'Fijian','fo'=>'Faroese','fr'=>'French','frp'=>'Arpitan','fuc'=>'Pulaar','fur'=>'Friulian','fy'=>'Western Frisian','ga'=>'Irish','gd'=>'Scottish Gaelic','gl'=>'Galician','gn'=>'Guarani','gsw'=>'Swiss German','gu'=>'Gujarati','gv'=>'Manx','ha'=>'Hausa','haw'=>'Hawaiian','haz'=>'Hazaragi','he'=>'Hebrew','hi'=>'Hindi','ho'=>'Hiri Motu','hr'=>'Croatian','ht'=>'Haitian','hu'=>'Hungarian','hy'=>'Armenian','hz'=>'Herero','ia'=>'Interlingua','id'=>'Indonesian','ie'=>'Interlingue','ig'=>'Igbo','ii'=>'Sichuan Yi','ik'=>'Inupiaq','io'=>'Ido','is'=>'Icelandic','it'=>'Italian','iu'=>'Inuktitut','ja'=>'Japanese','jv'=>'Javanese','ka'=>'Georgian','kab'=>'Kabyle','kg'=>'Kongo','ki'=>'Kikuyu','kj'=>'Kuanyama','kk'=>'Kazakh','kl'=>'Kalaallisut','km'=>'Central Khmer','kn'=>'Kannada','ko'=>'Korean','kr'=>'Kanuri','ks'=>'Kashmiri','ku'=>'Kurdish','kv'=>'Komi','kw'=>'Cornish','ky'=>'Kirghiz','la'=>'Latin','lb'=>'Luxembourgish','lg'=>'Ganda','li'=>'Limburgan','ln'=>'Lingala','lo'=>'Lao','lt'=>'Lithuanian','lu'=>'Luba-Katanga','lv'=>'Latvian','mg'=>'Malagasy','mh'=>'Marshallese','mi'=>'Maori','mk'=>'Macedonian','ml'=>'Malayalam','mn'=>'Mongolian','mr'=>'Marathi','ms'=>'Malay','mt'=>'Maltese','my'=>'Burmese','na'=>'Nauru','nb'=>'Norwegian Bokmål','nd'=>'North Ndebele','ne'=>'Nepali','ng'=>'Ndonga','nl'=>'Dutch','nn'=>'Norwegian Nynorsk','no'=>'Norwegian','nr'=>'South Ndebele','nv'=>'Navajo','ny'=>'Nyanja','oc'=>'Occitan (post 1500)','oj'=>'Ojibwa','om'=>'Oromo','or'=>'Oriya','ory'=>'Oriya (individual language)','os'=>'Ossetian','pa'=>'Panjabi','pi'=>'Pali','pl'=>'Polish','ps'=>'Pushto','pt'=>'Portuguese','qu'=>'Quechua','rhg'=>'Rohingya','rm'=>'Romansh','rn'=>'Rundi','ro'=>'Romanian','ru'=>'Russian','rue'=>'Rusyn','rup'=>'Macedo-Romanian','rw'=>'Kinyarwanda','sa'=>'Sanskrit','sah'=>'Yakut','sc'=>'Sardinian','sd'=>'Sindhi','se'=>'Northern Sami','sg'=>'Sango','sh'=>'Serbo-Croatian','si'=>'Sinhala','sk'=>'Slovak','sl'=>'Slovenian','sm'=>'Samoan','sn'=>'Shona','so'=>'Somali','sq'=>'Albanian','sr'=>'Serbian','ss'=>'Swati','st'=>'Southern Sotho','su'=>'Sundanese','sv'=>'Swedish','sw'=>'Swahili','szl'=>'Silesian','ta'=>'Tamil','te'=>'Telugu','tg'=>'Tajik','th'=>'Thai','ti'=>'Tigrinya','tk'=>'Turkmen','tl'=>'Tagalog','tn'=>'Tswana','to'=>'Tonga (Tonga Islands)','tr'=>'Turkish','ts'=>'Tsonga','tt'=>'Tatar','tw'=>'Twi','twd'=>'Twents','ty'=>'Tahitian','tzm'=>'Central Atlas Tamazight','ug'=>'Uighur','uk'=>'Ukrainian','ur'=>'Urdu','uz'=>'Uzbek','ve'=>'Venda','vi'=>'Vietnamese','vo'=>'Volapük','wa'=>'Walloon','wo'=>'Wolof','xh'=>'Xhosa','xmf'=>'Mingrelian','yi'=>'Yiddish','yo'=>'Yoruba','za'=>'Zhuang','zh'=>'Chinese','zu'=>'Zulu','tlh'=>'Klingon');
|
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'=>array(0=>'German (Switzerland)',1=>'Deutsch (Schweiz)'),'de_CH_informal'=>array(0=>'German (Switzerland, Informal)',1=>'Deutsch (Schweiz, Du)'),'de_DE'=>array(0=>'German',1=>'Deutsch'),'dzo'=>array(0=>'Dzongkha',1=>'རྫོང་ཁ'),'el'=>array(0=>'Greek',1=>'Ελληνικά'),'en_GB'=>array(0=>'English (UK)',1=>'English (UK)'),'en_ZA'=>array(0=>'English (South Africa)',1=>'English (South Africa)'),'en_CA'=>array(0=>'English (Canada)',1=>'English (Canada)'),'en_AU'=>array(0=>'English (Australia)',1=>'English (Australia)'),'en_NZ'=>array(0=>'English (New Zealand)',1=>'English (New Zealand)'),'eo'=>array(0=>'Esperanto',1=>'Esperanto'),'es_GT'=>array(0=>'Spanish (Guatemala)',1=>'Español de Guatemala'),'es_ES'=>array(0=>'Spanish (Spain)',1=>'Español'),'es_AR'=>array(0=>'Spanish (Argentina)',1=>'Español de Argentina'),'es_CL'=>array(0=>'Spanish (Chile)',1=>'Español de Chile'),'es_MX'=>array(0=>'Spanish (Mexico)',1=>'Español de México'),'es_CO'=>array(0=>'Spanish (Colombia)',1=>'Español de Colombia'),'es_VE'=>array(0=>'Spanish (Venezuela)',1=>'Español de Venezuela'),'es_CR'=>array(0=>'Spanish (Costa Rica)',1=>'Español de Costa Rica'),'es_PE'=>array(0=>'Spanish (Peru)',1=>'Español de Perú'),'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_BE'=>array(0=>'Dutch (Belgium)',1=>'Nederlands (België)'),'nl_NL_formal'=>array(0=>'Dutch (Formal)',1=>'Nederlands (Formeel)'),'nl_NL'=>array(0=>'Dutch',1=>'Nederlands'),'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_ao90'=>array(0=>'Portuguese (Portugal, AO90)',1=>'Português (AO90)'),'pt_PT'=>array(0=>'Portuguese (Portugal)',1=>'Português'),'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_TW'=>array(0=>'Chinese (Taiwan)',1=>'繁體中文'),'zh_CN'=>array(0=>'Chinese (China)',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.
|
8 |
Author URI: https://localise.biz/wordpress/plugin
|
9 |
Text Domain: loco-translate
|
10 |
Domain Path: /languages/
|
@@ -16,12 +16,6 @@ if( ! function_exists('is_admin') ){
|
|
16 |
}
|
17 |
|
18 |
|
19 |
-
// legacy plugin should not be installed at the same time
|
20 |
-
if( function_exists('loco_require') ){
|
21 |
-
return;
|
22 |
-
}
|
23 |
-
|
24 |
-
|
25 |
/**
|
26 |
* Get absolute path to Loco primary plugin file
|
27 |
* @return string
|
@@ -36,7 +30,7 @@ function loco_plugin_file(){
|
|
36 |
* @return string
|
37 |
*/
|
38 |
function loco_plugin_version(){
|
39 |
-
return '2.
|
40 |
}
|
41 |
|
42 |
|
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.0
|
8 |
Author URI: https://localise.biz/wordpress/plugin
|
9 |
Text Domain: loco-translate
|
10 |
Domain Path: /languages/
|
16 |
}
|
17 |
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
/**
|
20 |
* Get absolute path to Loco primary plugin file
|
21 |
* @return string
|
30 |
* @return string
|
31 |
*/
|
32 |
function loco_plugin_version(){
|
33 |
+
return '2.4.0';
|
34 |
}
|
35 |
|
36 |
|
pub/css/admin.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.3.2);background-repeat:no-repeat;min-height:16px}._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.3.2) 0 0 no-repeat;min-height:75px}._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.3.2);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.3.2);background-size:16px}._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.3.2);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.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco.wrap .icon,#loco.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");src:url("../font/loco.eot?#iefix") format("embedded-opentype"),url("../font/loco.woff") format("woff"),url("../font/loco.ttf") format("truetype"),url("../font/loco.svg#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.wrap .selector li,#loco.wrap .selector .handle,#loco.wrap .selectoradd a,#loco.wrap .selectorsep:before,#loco.wrap .selectorsep span{padding:.3em .75em}#loco.wrap .selector{text-align:left;display:inline-block;white-space:nowrap}#loco.wrap .selectoradd a,#loco.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.wrap .selectorsep{display:inline-block;border:solid 1px transparent}#loco.wrap .selectorsep:before{display:block;position:relative;color:#999;height:1.3em;overflow:hidden}#loco.wrap .selectorsep>*{display:block;line-height:1em;color:#666;height:1.3em;overflow:hidden}#loco.wrap .selector .handle{outline:none;white-space:nowrap;padding-right:2.3em;max-width:250px;text-overflow:ellipsis}#loco.wrap .selector .handle .prefix{padding-right:.6ex}#loco.wrap .selector .handle:after{font-family:loco;font-size:1.3em;color:#ccc;display:block;position:absolute;top:.25em;right:.6em;content:"▼"}#loco.wrap .selector .handle:focus:after,#loco.wrap .selector .handle:hover:after{color:#666}#loco.wrap .selector.no-caret .handle{padding-right:.75em}#loco.wrap .selector.no-caret .handle:after{display:none}#loco.wrap .selector.no-title .handle{padding-left:.5em;padding-right:.5em}#loco.wrap .selector.no-title .handle .label{display:none}#loco.wrap .selector.no-title .handle .icon{margin-right:0px}#loco.wrap .selector.dummy .handle{border-color:transparent}#loco.wrap .selector.dummy .handle:after{display:none}#loco.wrap .selectoradd{position:relative}#loco.wrap .selectoradd>*{display:block;float:left;clear:none}#loco.wrap .selectoradd>a.has-icon{width:1.3em}#loco.wrap .selectoradd>a.has-icon:before{color:#999;display:inline;padding-left:0;padding-right:0;line-height:1.4em}#loco.wrap .selectoradd>a.has-icon:hover:after{color:#2e892e}#loco.wrap .selectorsep{display:inline-block}#loco.wrap .selectorsep span{color:#666;height:1.3em}#loco.wrap .selector ul{padding:0}#loco.wrap .selector ul,#loco.wrap .selector li{display:block;position:relative;cursor:default;margin:0}#loco.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.wrap .selector.up ul{margin-top:0}#loco.wrap .selector.multi li input{display:none}#loco.wrap .selector.multi li.checked{background:#e5e5e5}#loco.wrap .selector li.active{background:#e5e5e5 !important}#loco.wrap .selector li.over{background:#ccc !important;color:#fff;text-shadow:1px 1px #aaa}#loco.wrap .selector li.over .label{color:#fff}#loco.wrap .selector .label{font:inherit;color:inherit}#loco.wrap .selector .icon{display:inline-block;min-width:1.2em;text-align:center;font-size:14px}#loco.wrap .selector .icon.no-icon{display:none}#loco.wrap .selector .icon:before{color:#666}#loco.wrap .selector .avtr{width:18px;height:18px;background-size:18px;background-repeat:no-repeat}#loco.wrap .selector .label{line-height:1}#loco.wrap .selector .icon,#loco.wrap .selector .icon-16{vertical-align:bottom}#loco.wrap .selector .icon,#loco.wrap .selector .lang,#loco.wrap .selector .icon-16{margin-right:5px}#loco.wrap .selector .region,#loco.wrap .selector .variant-wales,#loco.wrap .selector .region-gb.lang-cy,#loco.wrap .selector .variant-scotland,#loco.wrap .selector .region-gb.lang-gd,#loco.wrap .selector .variant-valencia,#loco.wrap .selector .region-es.variant-valencia,#loco.wrap .selector .lang-ca,#loco.wrap .selector .region-es.lang-ca,#loco.wrap .selector .lang-eo,#loco.wrap .selector .lang-eu{margin-left:2px;margin-right:7px}#loco.wrap .selector.ticked .icon.no-icon{font-size:12px;display:inline-block}#loco.wrap .selector.ticked .active .icon.no-icon:before{content:"✓"}#loco.wrap .selectoradd a:hover,#loco.wrap .selector a.handle:focus,#loco.wrap .selector a.handle:hover{color:#000;border-color:#999}#loco.wrap .selector.active .handle{border-color:#999;background-color:#eee;color:#999}#loco.wrap .selector.active .handle:after{color:#999;content:"▲"}#loco.wrap .selector.disabled{cursor:default;cursor:no-drop;cursor:not-allowed}#loco.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.wrap .selector.disabled .handle:after{display:none}#loco.wrap .selector.disabled .handle span.icon{color:#999 !important}#loco.wrap .selector li.disabled,#loco.wrap .selector li.disabled.over{color:#aaa;text-shadow:1px 1px #fff;pointer-events:none}#loco.wrap .selector li.disabled *{cursor:text}#loco.wrap .selector li.disabled .icon:before{color:#aaa}#loco.wrap .selector li.disabled .flag,#loco.wrap .selector li.disabled .icon-16{opacity:.4}#loco.wrap .selector.lefty ul{left:auto;right:0}#loco.wrap .selector.lefty ul .icon,#loco.wrap .selector.lefty ul .icon-32{display:block;float:right;clear:none}#loco.wrap .selector.lefty ul .label{padding-right:32px;padding-left:0}#loco.wrap .selector ul>form{margin:0;display:block}#loco.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.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.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.wrap .selector ul>form a.clear{margin:0;border:none}#loco.wrap .selector ul>form ::placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco.wrap .selector ul>form ::-webkit-input-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco.wrap .selector ul>form :-moz-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block;opacity:1}#loco.wrap .selector ul>form ::-moz-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block;opacity:1}#loco.wrap .selector ul>form :-ms-input-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco.wrap .selector ul>form .ielt10 .placeheld{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco.wrap div.auto-comp-wrap{width:100%}#loco.wrap div.auto-comp-wrap input{display:inline-block}#loco.wrap div.auto-comp-wrap.loading input{background:transparent url(../img/ajax-loader.gif?v=2.3.2) right 2px no-repeat}#loco.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.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.wrap div.auto-comp-result:first-child{border-top:solid 1px #ddd}#loco.wrap div.auto-comp-result>*{display:inline-block;vertical-align:middle;line-height:normal}#loco.wrap div.auto-comp-result .icon:before{padding-right:5px}#loco.wrap div.auto-comp-result:hover{background:#a8a8a8;color:#fff;border-top-color:#a8a8a8;border-bottom-color:#999}#loco.wrap div.auto-comp-result.selected{background:#666 !important;color:#fff;border-top-color:#666;border-bottom-color:#666}#loco.wrap div.auto-comp-result .lang,#loco.wrap div.auto-comp-result .region,#loco.wrap div.auto-comp-result .variant-wales,#loco.wrap div.auto-comp-result .region-gb.lang-cy,#loco.wrap div.auto-comp-result .variant-scotland,#loco.wrap div.auto-comp-result .region-gb.lang-gd,#loco.wrap div.auto-comp-result .variant-valencia,#loco.wrap div.auto-comp-result .region-es.variant-valencia,#loco.wrap div.auto-comp-result .lang-ca,#loco.wrap div.auto-comp-result .region-es.lang-ca,#loco.wrap div.auto-comp-result .lang-eo,#loco.wrap div.auto-comp-result .lang-eu,#loco.wrap div.auto-comp-result .avtr{margin-right:5px}#loco.wrap div.auto-comp-wrap.error a.icon.clear:before{color:#c00;opacity:1}#loco.wrap div.auto-comp-wrap.error input[type=text]{border-color:#c00;color:#c00}#loco.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.wrap ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.3.2);background-repeat:no-repeat;min-height:16px}#loco.wrap ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.3.2) 0 0 no-repeat;min-height:75px}#loco.wrap ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.3.2);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.wrap ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.3.2);background-size:16px}#loco.wrap ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.3.2);background-size:16px}}#loco.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.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.wrap .loco-font,#loco.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco.wrap .icon,#loco.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.wrap .has-icon:before{display:inline-block;padding-right:.3em}#loco.wrap a.icon-help{cursor:help}#loco.wrap a.icon-help span{display:none}#loco.wrap .icon-notag:before{content:""}#loco.wrap .icon-magnify:before{content:"🔍"}#loco.wrap .icon-python:before{content:"🐍"}#loco.wrap .icon-unicode:before{content:"u"}#loco.wrap .icon-json:before{content:"{"}#loco.wrap .icon-bullist:before{content:""}#loco.wrap .icon-numlist:before{content:""}#loco.wrap .icon-indent:before{content:""}#loco.wrap .icon-outdent:before{content:""}#loco.wrap .icon-link:before{content:""}#loco.wrap .icon-unlink:before{content:""}#loco.wrap .icon-bold:before{content:"B"}#loco.wrap .icon-italic:before{content:"I"}#loco.wrap .icon-translate:before{content:""}#loco.wrap .icon-proj:before{content:""}#loco.wrap .icon-plural:before{content:"᛬"}#loco.wrap .icon-max:before,#loco.wrap .icon-full-screen:before{content:""}#loco.wrap .icon-min:before{content:""}#loco.wrap .icon-sort:before{content:""}#loco.wrap .icon-ok:before,#loco.wrap .notice-success>.has-icon:before,#loco.wrap .notice-success p>strong.has-icon:before{content:"✓"}#loco.wrap .icon-ok-empty:before{content:"🗌"}#loco.wrap .icon-checkbox-checked:before,#loco.wrap .selector.multi li.checked .icon-checkbox:before{content:"☑"}#loco.wrap .icon-checkbox-unchecked:before{content:"☐"}#loco.wrap .icon-checkbox-partial:before{content:"☉"}#loco.wrap .icon-radio-checked:before{content:"⚫"}#loco.wrap .icon-radio-unchecked:before{content:"⚪"}#loco.wrap .icon-ext:before{content:"⬈"}#loco.wrap .icon-share:before{content:""}#loco.wrap .icon-star:before{content:""}#loco.wrap .icon-user:before{content:""}#loco.wrap .icon-remove:before{content:"×"}#loco.wrap .icon-cog:before{content:""}#loco.wrap .icon-trash:before{content:""}#loco.wrap .icon-time:before,#loco.wrap .icon-history:before{content:""}#loco.wrap .icon-download:before{content:""}#loco.wrap .icon-revert:before{content:""}#loco.wrap .icon-sync:before{content:""}#loco.wrap .icon-lock:before,#loco.wrap .notice-locked>.has-icon:before,#loco.wrap .notice-locked p>strong.has-icon:before{content:""}#loco.wrap .icon-flag:before{content:""}#loco.wrap .icon-tag:before{content:""}#loco.wrap .icon-tags:before{content:""}#loco.wrap .icon-print:before{content:""}#loco.wrap .icon-camera:before{content:""}#loco.wrap .icon-pencil:before{content:""}#loco.wrap .icon-add:before{content:""}#loco.wrap .icon-del:before{content:""}#loco.wrap .icon-clear:before,#loco.wrap a.icon.clear:before{content:""}#loco.wrap .icon-ok-sign:before{content:"✔"}#loco.wrap .icon-help:before{content:"?"}#loco.wrap .icon-info:before,#loco.wrap .notice-info>.has-icon:before,#loco.wrap .notice-info p>strong.has-icon:before{content:"ℹ"}#loco.wrap .icon-cancel:before{content:""}#loco.wrap .icon-warn:before,#loco.wrap .notice-error>.has-icon:before,#loco.wrap .notice-error p>strong.has-icon:before,#loco.wrap .notice-warning>.has-icon:before,#loco.wrap .notice-warning p>strong.has-icon:before{content:""}#loco.wrap .icon-comment:before{content:""}#loco.wrap .icon-bar-chart:before{content:""}#loco.wrap .icon-key:before{content:""}#loco.wrap .icon-cogs:before{content:""}#loco.wrap .icon-comments:before{content:""}#loco.wrap .icon-signout:before{content:""}#loco.wrap .icon-signin:before{content:""}#loco.wrap .icon-upload:before{content:""}#loco.wrap .icon-twitter:before{content:"🐦"}#loco.wrap .icon-facebook:before{content:""}#loco.wrap .icon-github:before{content:""}#loco.wrap .icon-feed:before{content:""}#loco.wrap .icon-globe:before{content:""}#loco.wrap .icon-wrench:before,#loco.wrap .notice-debug>.has-icon:before,#loco.wrap .notice-debug p>strong.has-icon:before{content:""}#loco.wrap .icon-group:before{content:""}#loco.wrap .icon-cloud:before{content:""}#loco.wrap .icon-copy:before{content:""}#loco.wrap .icon-save:before{content:""}#loco.wrap .icon-menu:before{content:""}#loco.wrap .icon-table:before{content:""}#loco.wrap .icon-caret-down:before{content:"▼"}#loco.wrap .icon-caret-up:before{content:"▲"}#loco.wrap .icon-caret-right:before{content:"▶"}#loco.wrap .icon-mail:before{content:""}#loco.wrap .icon-cloud-upload:before{content:""}#loco.wrap .icon-file:before{content:""}#loco.wrap .icon-circle-white:before{content:"⚬"}#loco.wrap .icon-circle-black:before{content:"●"}#loco.wrap .icon-eraser:before{content:""}#loco.wrap .icon-unlock:before{content:""}#loco.wrap .icon-apple:before{content:""}#loco.wrap .icon-android:before{content:""}#loco.wrap .icon-back:before{content:"⬅"}#loco.wrap .icon-next:before{content:"➔"}#loco.wrap .icon-arrow-up:before{content:""}#loco.wrap .icon-ccard:before{content:""}#loco.wrap .icon-caret-left:before{content:"◀"}#loco.wrap .icon-pro:before{content:"⚡"}#loco.wrap .icon-bell:before{content:""}#loco.wrap .icon-code:before{content:""}#loco.wrap .icon-privacy:before{content:"🛡"}#loco.wrap .icon-hellip:before{content:"…"}#loco.wrap .icon-vellip:before{content:"⁞"}#loco.wrap .icon-collapse:before{content:""}#loco.wrap .icon-expand:before{content:""}#loco.wrap .icon-wordpress:before{content:""}#loco.wrap .icon-database:before{content:""}#loco.wrap .icon-restore:before{content:""}#loco.wrap .icon-pilcrow:before{content:"¶"}#loco.wrap .icon-status.is-translated:before,#loco.wrap .is-translated>header>.icon-status:before{color:#2e892e;content:"✓";text-align:center}#loco.wrap .icon-status.is-untranslated:before,#loco.wrap .is-untranslated>header>.icon-status:before{color:#aaa;content:"×";text-align:center;font-size:1.1em}#loco.wrap .icon-status.is-flagged:before,#loco.wrap .is-flagged>header>.icon-status:before{color:#bd2c00;content:"";text-align:center}#loco.wrap .icon-status.is-translated.is-blank:before,#loco.wrap .icon-status.is-translated.is-inherit:before,#loco.wrap .is-translated.is-blank>header>.icon-status:before,#loco.wrap .is-translated.is-inherit>header>.icon-status:before{content:"🗌"}#loco.wrap .icon-status.is-fuzzy:before,#loco.wrap .is-fuzzy>header>.icon-status:before{color:#666;content:""}#loco.wrap .lang,#loco.wrap .region,#loco.wrap .variant-wales,#loco.wrap .region-gb.lang-cy,#loco.wrap .variant-scotland,#loco.wrap .region-gb.lang-gd,#loco.wrap .variant-valencia,#loco.wrap .region-es.variant-valencia,#loco.wrap .lang-ca,#loco.wrap .region-es.lang-ca,#loco.wrap .lang-eo,#loco.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.wrap .lang{width:20px;height:12px;line-height:12px;vertical-align:middle}#loco.wrap .lang:before{content:attr(lang);vertical-align:baseline}#loco.wrap .no-lang{width:18px;height:10px;border:solid 1px #2e892e;background:transparent}#loco.wrap .lang-el{background-color:#1d48a3}#loco.wrap .lang-el:before{content:"Ελ"}#loco.wrap .region,#loco.wrap .variant-wales,#loco.wrap .region-gb.lang-cy,#loco.wrap .variant-scotland,#loco.wrap .region-gb.lang-gd,#loco.wrap .variant-valencia,#loco.wrap .region-es.variant-valencia,#loco.wrap .lang-ca,#loco.wrap .region-es.lang-ca,#loco.wrap .lang-eo,#loco.wrap .lang-eu{width:16px;height:12px;margin:0 2px;background-image:url(../img/flags.png?v=2.3.2);background-repeat:no-repeat;background-color:transparent}#loco.wrap .region:before,#loco.wrap .variant-wales:before,#loco.wrap .region-gb.lang-cy:before,#loco.wrap .variant-scotland:before,#loco.wrap .region-gb.lang-gd:before,#loco.wrap .variant-valencia:before,#loco.wrap .region-es.variant-valencia:before,#loco.wrap .lang-ca:before,#loco.wrap .region-es.lang-ca:before,#loco.wrap .lang-eo:before,#loco.wrap .lang-eu:before{visibility:hidden}#loco.wrap .lang-zh{background-color:#b90000}#loco.wrap .lang-zh.script-hans:before{content:"中国"}#loco.wrap .lang-zh.script-hant:before{content:"中國"}#loco.wrap .__{background-position:0 0}#loco.wrap .lang-eo{background-position:0 -12px}#loco.wrap .lang-eu{background-position:0 -24px}#loco.wrap .lang-ca,#loco.wrap .region-es.lang-ca{background-position:0 -36px}#loco.wrap .region-tg{background-position:0 -48px}#loco.wrap .region-me{background-position:0 -60px}#loco.wrap .region-la{background-position:0 -73px}#loco.wrap .region-mr{background-position:0 -85px}#loco.wrap .region-ni{background-position:0 -97px}#loco.wrap .region-lv{background-position:0 -109px}#loco.wrap .region-om{background-position:0 -121px}#loco.wrap .region-af{background-position:0 -133px}#loco.wrap .region-cy{background-position:0 -145px}#loco.wrap .region-bj{background-position:0 -157px}#loco.wrap .region-aq{background-position:0 -169px}#loco.wrap .region-cn{background-position:0 -186px}#loco.wrap .region-co{background-position:0 -198px}#loco.wrap .region-cx{background-position:0 -210px}#loco.wrap .region-ag{background-position:0 -222px}#loco.wrap .region-ms{background-position:0 -234px}#loco.wrap .region-md{background-position:0 -246px}#loco.wrap .region-zm{background-position:0 -258px}#loco.wrap .region-vn{background-position:0 -270px}#loco.wrap .region-tf{background-position:0 -282px}#loco.wrap .region-td{background-position:0 -294px}#loco.wrap .region-yt{background-position:0 -306px}#loco.wrap .region-lb{background-position:0 -318px}#loco.wrap .region-mf{background-position:0 -330px}#loco.wrap .region-lu{background-position:0 -347px}#loco.wrap .region-mq{background-position:0 -359px}#loco.wrap .region-cz{background-position:0 -371px}#loco.wrap .region-ae{background-position:0 -383px}#loco.wrap .region-cm{background-position:0 -395px}#loco.wrap .region-bi{background-position:0 -407px}#loco.wrap .region-ar{background-position:0 -419px}#loco.wrap .region-as{background-position:0 -431px}#loco.wrap .region-bh{background-position:0 -443px}#loco.wrap .region-cl{background-position:0 -455px}#loco.wrap .region-ad{background-position:0 -467px}#loco.wrap .region-mp{background-position:0 -479px}#loco.wrap .region-lt{background-position:0 -491px}#loco.wrap .region-mg{background-position:0 -503px}#loco.wrap .region-lc{background-position:0 -515px}#loco.wrap .region-tr{background-position:0 -527px}#loco.wrap .region-ua{background-position:0 -539px}#loco.wrap .region-tv{background-position:0 -551px}#loco.wrap .region-vi{background-position:0 -563px}#loco.wrap .region-mt{background-position:0 -575px}#loco.wrap .region-no{background-position:0 -587px}#loco.wrap .region-mc{background-position:0 -599px}#loco.wrap .region-ch{background-position:0 -611px}#loco.wrap .region-bl{background-position:0 -623px}#loco.wrap .region-aw{background-position:0 -640px}#loco.wrap .region-bz{background-position:0 -652px}#loco.wrap .region-bm{background-position:0 -664px}#loco.wrap .region-ci{background-position:0 -676px}#loco.wrap .region-mu{background-position:0 -688px}#loco.wrap .region-us{background-position:0 -700px}#loco.wrap .region-tw{background-position:0 -712px}#loco.wrap .region-ye{background-position:0 -724px}#loco.wrap .region-mw{background-position:0 -736px}#loco.wrap .region-nl{background-position:0 -748px}#loco.wrap .region-ls{background-position:0 -760px}#loco.wrap .region-bo{background-position:0 -772px}#loco.wrap .region-at{background-position:0 -784px}#loco.wrap .region-ck{background-position:0 -796px}#loco.wrap .region-by{background-position:0 -808px}#loco.wrap .region-au{background-position:0 -820px}#loco.wrap .region-bn{background-position:0 -832px}#loco.wrap .region-ma{background-position:0 -844px}#loco.wrap .region-nz{background-position:0 -856px}#loco.wrap .region-lr{background-position:0 -868px}#loco.wrap .region-mv{background-position:0 -880px}#loco.wrap .region-tc{background-position:0 -892px}#loco.wrap .region-ug{background-position:0 -904px}#loco.wrap .region-tt{background-position:0 -916px}#loco.wrap .region-pl{background-position:0 -928px}#loco.wrap .region-rs{background-position:0 -940px}#loco.wrap .region-in{background-position:0 -952px}#loco.wrap .region-ge{background-position:0 -964px}#loco.wrap .region-gr{background-position:0 -976px}#loco.wrap .region-gs{background-position:0 -988px}#loco.wrap .region-gd{background-position:0 -1000px}#loco.wrap .region-io{background-position:0 -1012px}#loco.wrap .region-hk{background-position:0 -1024px}#loco.wrap .region-kp{background-position:0 -1036px}#loco.wrap .region-kg{background-position:0 -1048px}#loco.wrap .region-pm{background-position:0 -1060px}#loco.wrap .region-sv{background-position:0 -1072px}#loco.wrap .region-re{background-position:0 -1084px}#loco.wrap .region-sa{background-position:0 -1096px}#loco.wrap .region-sc{background-position:0 -1108px}#loco.wrap .region-st{background-position:0 -1120px}#loco.wrap .region-ke{background-position:0 -1132px}#loco.wrap .region-im{background-position:0 -1144px}#loco.wrap .region-kr{background-position:0 -1161px}#loco.wrap .region-gf{background-position:0 -1173px}#loco.wrap .region-dj{background-position:0 -1185px}#loco.wrap .region-gq{background-position:0 -1197px}#loco.wrap .region-gp{background-position:0 -1209px}#loco.wrap .region-dk{background-position:0 -1221px}#loco.wrap .region-gg{background-position:0 -1233px}#loco.wrap .region-il{background-position:0 -1250px}#loco.wrap .region-pn{background-position:0 -1262px}#loco.wrap .region-sb{background-position:0 -1274px}#loco.wrap .region-py{background-position:0 -1286px}#loco.wrap .region-ru{background-position:0 -1298px}#loco.wrap .region-kw{background-position:0 -1310px}#loco.wrap .region-do{background-position:0 -1322px}#loco.wrap .region-gt{background-position:0 -1334px}#loco.wrap .region-gb{background-position:0 -1346px}#loco.wrap .region-gu{background-position:0 -1358px}#loco.wrap .region-je{background-position:0 -1370px}#loco.wrap .region-hm{background-position:0 -1387px}#loco.wrap .region-sg{background-position:0 -1399px}#loco.wrap .region-pk{background-position:0 -1411px}#loco.wrap .region-sr{background-position:0 -1423px}#loco.wrap .region-se{background-position:0 -1435px}#loco.wrap .region-jp{background-position:0 -1447px}#loco.wrap .region-gw{background-position:0 -1459px}#loco.wrap .region-eh{background-position:0 -1471px}#loco.wrap .region-dz{background-position:0 -1483px}#loco.wrap .region-ga{background-position:0 -1495px}#loco.wrap .region-fr{background-position:0 -1507px}#loco.wrap .region-dm{background-position:0 -1519px}#loco.wrap .region-hn{background-position:0 -1531px}#loco.wrap .region-sd{background-position:0 -1543px}#loco.wrap .region-rw{background-position:0 -1555px}#loco.wrap .region-ph{background-position:0 -1567px}#loco.wrap .region-ss{background-position:0 -1579px}#loco.wrap .region-qa{background-position:0 -1596px}#loco.wrap .region-pe{background-position:0 -1608px}#loco.wrap .region-pr{background-position:0 -1620px}#loco.wrap .region-si{background-position:0 -1632px}#loco.wrap .region-ht{background-position:0 -1644px}#loco.wrap .region-es{background-position:0 -1656px}#loco.wrap .region-gl{background-position:0 -1668px}#loco.wrap .region-gm{background-position:0 -1680px}#loco.wrap .region-er{background-position:0 -1692px}#loco.wrap .region-fi{background-position:0 -1704px}#loco.wrap .region-ee{background-position:0 -1716px}#loco.wrap .region-kn{background-position:0 -1728px}#loco.wrap .region-hu{background-position:0 -1740px}#loco.wrap .region-iq{background-position:0 -1752px}#loco.wrap .region-ky{background-position:0 -1764px}#loco.wrap .region-sh{background-position:0 -1776px}#loco.wrap .region-ps{background-position:0 -1788px}#loco.wrap .region-pf{background-position:0 -1800px}#loco.wrap .region-sj{background-position:0 -1812px}#loco.wrap .region-id{background-position:0 -1824px}#loco.wrap .region-is{background-position:0 -1836px}#loco.wrap .region-eg{background-position:0 -1848px}#loco.wrap .region-fk{background-position:0 -1860px}#loco.wrap .region-fj{background-position:0 -1872px}#loco.wrap .region-gn{background-position:0 -1884px}#loco.wrap .region-gy{background-position:0 -1896px}#loco.wrap .region-ir{background-position:0 -1908px}#loco.wrap .region-km{background-position:0 -1920px}#loco.wrap .region-ie{background-position:0 -1932px}#loco.wrap .region-kz{background-position:0 -1944px}#loco.wrap .region-ro{background-position:0 -1956px}#loco.wrap .region-sk{background-position:0 -1968px}#loco.wrap .region-pg{background-position:0 -1980px}#loco.wrap .region-pt{background-position:0 -1992px}#loco.wrap .region-so{background-position:0 -2004px}#loco.wrap .region-sx{background-position:0 -2016px}#loco.wrap .region-hr{background-position:0 -2033px}#loco.wrap .region-ki{background-position:0 -2045px}#loco.wrap .region-jm{background-position:0 -2057px}#loco.wrap .region-ec{background-position:0 -2069px}#loco.wrap .region-et{background-position:0 -2081px}#loco.wrap .region-fo{background-position:0 -2093px}#loco.wrap .region-kh{background-position:0 -2105px}#loco.wrap .region-sy{background-position:0 -2117px}#loco.wrap .region-sn{background-position:0 -2129px}#loco.wrap .region-pw{background-position:0 -2141px}#loco.wrap .region-sl{background-position:0 -2153px}#loco.wrap .region-fm{background-position:0 -2165px}#loco.wrap .region-gi{background-position:0 -2177px}#loco.wrap .region-de{background-position:0 -2189px}#loco.wrap .region-gh{background-position:0 -2201px}#loco.wrap .region-jo{background-position:0 -2213px}#loco.wrap .region-it{background-position:0 -2225px}#loco.wrap .region-pa{background-position:0 -2237px}#loco.wrap .region-sz{background-position:0 -2249px}#loco.wrap .region-sm{background-position:0 -2261px}#loco.wrap .region-tn{background-position:0 -2273px}#loco.wrap .region-ml{background-position:0 -2285px}#loco.wrap .region-cg{background-position:0 -2297px}#loco.wrap .region-ax{background-position:0 -2309px}#loco.wrap .region-ao{background-position:0 -2321px}#loco.wrap .region-bt{background-position:0 -2333px}#loco.wrap .region-an{background-position:0 -2345px}#loco.wrap .region-bb{background-position:0 -2357px}#loco.wrap .region-cf{background-position:0 -2369px}#loco.wrap .region-mm{background-position:0 -2381px}#loco.wrap .region-li{background-position:0 -2393px}#loco.wrap .region-na{background-position:0 -2405px}#loco.wrap .region-mz{background-position:0 -2417px}#loco.wrap .region-to{background-position:0 -2429px}#loco.wrap .region-vg{background-position:0 -2441px}#loco.wrap .region-ve{background-position:0 -2453px}#loco.wrap .region-tz{background-position:0 -2465px}#loco.wrap .region-tm{background-position:0 -2477px}#loco.wrap .region-mx{background-position:0 -2489px}#loco.wrap .region-nc{background-position:0 -2501px}#loco.wrap .region-mo{background-position:0 -2513px}#loco.wrap .region-lk{background-position:0 -2525px}#loco.wrap .region-cd{background-position:0 -2537px}#loco.wrap .region-al{background-position:0 -2549px}#loco.wrap .region-bw{background-position:0 -2561px}#loco.wrap .region-cs{background-position:0 -2573px}#loco.wrap .region-cr{background-position:0 -2585px}#loco.wrap .region-bv{background-position:0 -2597px}#loco.wrap .region-am{background-position:0 -2609px}#loco.wrap .region-az{background-position:0 -2621px}#loco.wrap .region-ba{background-position:0 -2633px}#loco.wrap .region-mn{background-position:0 -2645px}#loco.wrap .region-nu{background-position:0 -2657px}#loco.wrap .region-my{background-position:0 -2669px}#loco.wrap .region-tl{background-position:0 -2681px}#loco.wrap .region-ws{background-position:0 -2693px}#loco.wrap .region-th{background-position:0 -2705px}#loco.wrap .region-nf{background-position:0 -2717px}#loco.wrap .region-ly{background-position:0 -2729px}#loco.wrap .region-ai{background-position:0 -2741px}#loco.wrap .region-br{background-position:0 -2753px}#loco.wrap .region-cv{background-position:0 -2765px}#loco.wrap .region-be{background-position:0 -2777px}#loco.wrap .region-ca{background-position:0 -2789px}#loco.wrap .region-bd{background-position:0 -2801px}#loco.wrap .region-cw{background-position:0 -2813px}#loco.wrap .region-bs{background-position:0 -2830px}#loco.wrap .region-ng{background-position:0 -2842px}#loco.wrap .region-mk{background-position:0 -2854px}#loco.wrap .region-np{background-position:0 -2866px}#loco.wrap .region-va{background-position:0 -2878px}#loco.wrap .region-uz{background-position:0 -2890px}#loco.wrap .region-um{background-position:0 -2902px}#loco.wrap .region-tk{background-position:0 -2914px}#loco.wrap .region-vc{background-position:0 -2926px}#loco.wrap .region-zw{background-position:0 -2938px}#loco.wrap .region-nr{background-position:0 -2950px}#loco.wrap .region-ne{background-position:0 -2962px}#loco.wrap .region-cu{background-position:0 -2974px}#loco.wrap .region-bq{background-position:0 -2986px}#loco.wrap .region-bf{background-position:0 -2998px}#loco.wrap .region-bg{background-position:0 -3010px}#loco.wrap .region-cc{background-position:0 -3022px}#loco.wrap .region-mh{background-position:0 -3034px}#loco.wrap .region-za{background-position:0 -3046px}#loco.wrap .region-uy{background-position:0 -3058px}#loco.wrap .region-wf{background-position:0 -3070px}#loco.wrap .region-vu{background-position:0 -3082px}#loco.wrap .region-tj{background-position:0 -3094px}#loco.wrap .variant-scotland,#loco.wrap .region-gb.lang-gd{background-position:0 -3106px}#loco.wrap .variant-valencia,#loco.wrap .region-es.variant-valencia{background-position:0 -3118px}#loco.wrap .variant-wales,#loco.wrap .region-gb.lang-cy{background-position:0 -3130px}#loco.wrap .x-eu{background-position:0 -3142px}#loco.wrap span.lang code{display:none}#loco.wrap .icon-notag:before{content:""}#loco.wrap .icon-magnify:before{content:"🔍"}#loco.wrap .icon-python:before{content:"🐍"}#loco.wrap .icon-unicode:before{content:"u"}#loco.wrap .icon-json:before{content:"{"}#loco.wrap .icon-bullist:before{content:""}#loco.wrap .icon-numlist:before{content:""}#loco.wrap .icon-indent:before{content:""}#loco.wrap .icon-outdent:before{content:""}#loco.wrap .icon-link:before{content:""}#loco.wrap .icon-unlink:before{content:""}#loco.wrap .icon-bold:before{content:"B"}#loco.wrap .icon-italic:before{content:"I"}#loco.wrap .icon-translate:before{content:""}#loco.wrap .icon-proj:before{content:""}#loco.wrap .icon-plural:before{content:"᛬"}#loco.wrap .icon-max:before,#loco.wrap .icon-full-screen:before{content:""}#loco.wrap .icon-min:before{content:""}#loco.wrap .icon-sort:before{content:""}#loco.wrap .icon-ok:before,#loco.wrap .notice-success>.has-icon:before,#loco.wrap .notice-success p>strong.has-icon:before{content:"✓"}#loco.wrap .icon-ok-empty:before{content:"🗌"}#loco.wrap .icon-checkbox-checked:before,#loco.wrap .selector.multi li.checked .icon-checkbox:before{content:"☑"}#loco.wrap .icon-checkbox-unchecked:before{content:"☐"}#loco.wrap .icon-checkbox-partial:before{content:"☉"}#loco.wrap .icon-radio-checked:before{content:"⚫"}#loco.wrap .icon-radio-unchecked:before{content:"⚪"}#loco.wrap .icon-ext:before{content:"⬈"}#loco.wrap .icon-share:before{content:""}#loco.wrap .icon-star:before{content:""}#loco.wrap .icon-user:before{content:""}#loco.wrap .icon-remove:before{content:"×"}#loco.wrap .icon-cog:before{content:""}#loco.wrap .icon-trash:before{content:""}#loco.wrap .icon-time:before,#loco.wrap .icon-history:before{content:""}#loco.wrap .icon-download:before{content:""}#loco.wrap .icon-revert:before{content:""}#loco.wrap .icon-sync:before{content:""}#loco.wrap .icon-lock:before,#loco.wrap .notice-locked>.has-icon:before,#loco.wrap .notice-locked p>strong.has-icon:before{content:""}#loco.wrap .icon-flag:before{content:""}#loco.wrap .icon-tag:before{content:""}#loco.wrap .icon-tags:before{content:""}#loco.wrap .icon-print:before{content:""}#loco.wrap .icon-camera:before{content:""}#loco.wrap .icon-pencil:before{content:""}#loco.wrap .icon-add:before{content:""}#loco.wrap .icon-del:before{content:""}#loco.wrap .icon-clear:before,#loco.wrap a.icon.clear:before{content:""}#loco.wrap .icon-ok-sign:before{content:"✔"}#loco.wrap .icon-help:before{content:"?"}#loco.wrap .icon-info:before,#loco.wrap .notice-info>.has-icon:before,#loco.wrap .notice-info p>strong.has-icon:before{content:"ℹ"}#loco.wrap .icon-cancel:before{content:""}#loco.wrap .icon-warn:before,#loco.wrap .notice-error>.has-icon:before,#loco.wrap .notice-error p>strong.has-icon:before,#loco.wrap .notice-warning>.has-icon:before,#loco.wrap .notice-warning p>strong.has-icon:before{content:""}#loco.wrap .icon-comment:before{content:""}#loco.wrap .icon-bar-chart:before{content:""}#loco.wrap .icon-key:before{content:""}#loco.wrap .icon-cogs:before{content:""}#loco.wrap .icon-comments:before{content:""}#loco.wrap .icon-signout:before{content:""}#loco.wrap .icon-signin:before{content:""}#loco.wrap .icon-upload:before{content:""}#loco.wrap .icon-twitter:before{content:"🐦"}#loco.wrap .icon-facebook:before{content:""}#loco.wrap .icon-github:before{content:""}#loco.wrap .icon-feed:before{content:""}#loco.wrap .icon-globe:before{content:""}#loco.wrap .icon-wrench:before,#loco.wrap .notice-debug>.has-icon:before,#loco.wrap .notice-debug p>strong.has-icon:before{content:""}#loco.wrap .icon-group:before{content:""}#loco.wrap .icon-cloud:before{content:""}#loco.wrap .icon-copy:before{content:""}#loco.wrap .icon-save:before{content:""}#loco.wrap .icon-menu:before{content:""}#loco.wrap .icon-table:before{content:""}#loco.wrap .icon-caret-down:before{content:"▼"}#loco.wrap .icon-caret-up:before{content:"▲"}#loco.wrap .icon-caret-right:before{content:"▶"}#loco.wrap .icon-mail:before{content:""}#loco.wrap .icon-cloud-upload:before{content:""}#loco.wrap .icon-file:before{content:""}#loco.wrap .icon-circle-white:before{content:"⚬"}#loco.wrap .icon-circle-black:before{content:"●"}#loco.wrap .icon-eraser:before{content:""}#loco.wrap .icon-unlock:before{content:""}#loco.wrap .icon-apple:before{content:""}#loco.wrap .icon-android:before{content:""}#loco.wrap .icon-back:before{content:"⬅"}#loco.wrap .icon-next:before{content:"➔"}#loco.wrap .icon-arrow-up:before{content:""}#loco.wrap .icon-ccard:before{content:""}#loco.wrap .icon-caret-left:before{content:"◀"}#loco.wrap .icon-pro:before{content:"⚡"}#loco.wrap .icon-bell:before{content:""}#loco.wrap .icon-code:before{content:""}#loco.wrap .icon-privacy:before{content:"🛡"}#loco.wrap .icon-hellip:before{content:"…"}#loco.wrap .icon-vellip:before{content:"⁞"}#loco.wrap .icon-collapse:before{content:""}#loco.wrap .icon-expand:before{content:""}#loco.wrap .icon-wordpress:before{content:""}#loco.wrap .icon-database:before{content:""}#loco.wrap .icon-restore:before{content:""}#loco.wrap .icon-pilcrow:before{content:"¶"}#loco.wrap .icon,#loco.wrap .has-icon:before,#loco.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.wrap .icon,#loco.wrap .has-icon:before{font-family:"loco"}#loco.wrap .has-dashicon:before{font-family:"dashicons";font-size:1.4em}#loco.wrap .has-icon:before,#loco.wrap .has-dashicon:before,#loco.wrap .has-icon>span{display:inline-block;vertical-align:middle}#loco.wrap .only-icon{text-align:center}#loco.wrap .only-icon:before{text-align:center}#loco.wrap .only-icon span{display:none}#loco.wrap a,#loco.wrap .wp-core-ui .button-link{text-decoration:none}#loco.wrap h3:hover>a.loco-anchor{color:#ccc}#loco.wrap h3:hover>a.loco-anchor:before{content:"¶"}#loco.wrap .has-lang>span{display:inline-block;vertical-align:middle}#loco.wrap a.has-lang:hover>span:last-child{text-decoration:underline}#loco.wrap h1 ul,#loco.wrap h1 li{margin:0;padding:0}#loco.wrap h1 li{display:inline-block}#loco.wrap h1 li:after{content:"/";color:#999;text-shadow:none;display:inline-block}#loco.wrap h1 li:last-child:after{content:""}#loco.wrap h1 li:last-child a{color:inherit;pointer-events:none;cursor:auto}#loco.wrap h2 span{color:#999;font-weight:normal}#loco.wrap h2 .loco-meta,#loco.wrap h3 .loco-meta{color:inherit;font-size:14px;font-weight:normal;vertical-align:middle}#loco.wrap .wp-list-table td:first-child .icon{width:16px;display:inline-block;text-align:center}#loco.wrap .wp-list-table td{white-space:nowrap}#loco.wrap .wp-list-table td>a,#loco.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.wrap .wp-list-table th.loco-sort{cursor:pointer}#loco.wrap .wp-list-table th.loco-sort:hover{color:#000}#loco.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco.wrap .wp-list-table th.loco-sort.loco-desc:after{padding:0 0 0 4px;color:#999}#loco.wrap .wp-list-table th.loco-sort.loco-desc:after{content:"▼"}#loco.wrap .wp-list-table th.loco-sort.loco-asc:after{content:"▲"}#loco.wrap .wp-list-table td.has-row-actions{overflow:visible}#loco.wrap form.loco-filter{display:block;margin-bottom:5px}#loco.wrap form.loco-filter .icon-filter{color:#999}#loco.wrap nav.above-list-table{margin-bottom:1em}#loco.wrap nav.above-list-table a{display:inline-block;margin-right:1em}#loco.wrap .wp-core-ui button.inverted,#loco.wrap .wp-core-ui button.inverted:hover{background:-moz-linear-gradient(top, #cccccc 0%, #e0e0e0 5%, #fefefe 100%);background:-webkit-linear-gradient(top, #cccccc 0%, #e0e0e0 5%, #fefefe 100%);background:linear-gradient(to bottom, #cccccc 0%, #e0e0e0 5%, #fefefe 100%);-webkit-box-shadow:0 1px 0 #fff;-moz-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff;border-color:#bbb}#loco.wrap .wp-core-ui button:active,#loco.wrap .wp-core-ui button.inverted:active{border-color:#5b9dd9}#loco.wrap .loco-clearable{display:inline-block;vertical-align:middle;position:relative}#loco.wrap .loco-clearable a.clear,#loco.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.wrap .loco-clearable a.clear:before,#loco.wrap .auto-comp-wrap a.clear:before{vertical-align:middle;padding:0;color:#999}#loco.wrap .loco-clearable a.clear:hover:before,#loco.wrap .auto-comp-wrap a.clear:hover:before{color:#333}#loco.wrap .loco-clearable a.clear span,#loco.wrap .auto-comp-wrap a.clear span{display:none}#loco.wrap .loco-clearable ::-ms-clear,#loco.wrap .auto-comp-wrap ::-ms-clear{display:none}#loco.wrap div.progress{color:#000;background:transparent !important}#loco.wrap div.progress *{height:100%;overflow:hidden;white-space:nowrap}#loco.wrap div.progress .t{background-color:#ddd;border:1px solid #ccc}#loco.wrap div.progress .t .bar{float:left;clear:none;background-color:#3db63d}#loco.wrap div.progress .t .bar.f{background-color:#bd2c00}#loco.wrap div.progress .l{display:block}#loco.wrap td div.progress .t{border:none}#loco.wrap td div.progress .l{display:none}#loco.wrap code.path{color:#333;margin:0;padding:0;display:inline;background:transparent}#loco.wrap .loco-danger{color:#d54e21}#loco.wrap .notice,#loco.wrap .panel{background:#fff;position:relative;margin:1em 0;padding:1px 12px}#loco.wrap .notice-generic{border-color:#ddd}#loco.wrap .notice-success>.has-icon,#loco.wrap .notice-success p>strong.has-icon{color:#000}#loco.wrap .notice-warning{border-color:orange}#loco.wrap .notice-error{border-color:#dc3232}#loco.wrap .notice-debug{border-color:#00a0d2}#loco.wrap .notice-danger{border-color:#dc3232}#loco.wrap .notice-locked{border-color:orange}#loco.wrap .notice>.has-icon:before,#loco.wrap .notice p>strong.has-icon:before{padding-right:6px}#loco.wrap .notice>p>a.button.has-icon:before{width:1.2em}#loco.wrap .notice>p>em{color:#d54e21;font-style:normal}#loco.wrap .notice>p>em a{color:inherit}#loco.wrap .notice>p a:hover,#loco.wrap .notice>nav a:hover{text-decoration:underline}#loco.wrap .notice>p a.button,#loco.wrap .notice>nav a.button{text-decoration:inherit}#loco.wrap .notice.has-nav{display:flex;flex-direction:row}#loco.wrap .notice.has-nav p,#loco.wrap .notice.has-nav nav{line-height:22px;flex-grow:1}#loco.wrap .notice.has-nav nav{text-align:right;padding:2px;margin:.5em 0}#loco.wrap .notice.has-nav.is-dismissible{padding-right:38px}#loco.wrap .notice.has-nav a{white-space:nowrap}#loco.wrap .notice.has-nav nav>span{color:#666}#loco.wrap .notice>h3>span{display:inline-block;vertical-align:middle}#loco.wrap ul.problems li{font-style:italic}#loco.wrap label{position:relative}#loco.wrap label.for-disabled,#loco.wrap label.for-disabled>input{cursor:default !important}#loco.wrap input.regular-text,#loco.wrap textarea.regular-text{width:25em}#loco.wrap .button-link{padding:0 10px 1px}#loco.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.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.wrap .button-success:hover{background:#3db63d}#loco.wrap form button.loco-loading.button-large{padding-left:0}#loco.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.wrap ::placeholder{color:#ccc}#loco.wrap ::-webkit-input-placeholder{color:#ccc}#loco.wrap :-moz-placeholder{color:#ccc;opacity:1}#loco.wrap ::-moz-placeholder{color:#ccc;opacity:1}#loco.wrap :-ms-input-placeholder{color:#ccc}#loco.wrap .ielt10 .placeheld{color:#ccc}#loco.wrap a.has-raquo:after{content:" »"}#loco.wrap a.has-laquo:before{content:"« "}#loco.wrap span.inline-spinner{display:inline-block;min-width:16px;min-height:16px;background:transparent url(../img/spin-modal.gif?v=2.3.2) 0 0 no-repeat}.js #wpbody-content>.notice{display:none}.js #wpbody-content>.notice.inline{display:block}.js #loco.wrap .jshide,.no-js #loco.wrap .jsonly{display:none !important}#loco.wrap .invis{visibility:hidden}.form-table tr{vertical-align:top}.form-table tr.compact td{padding-top:0}.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.3.2) center 20px no-repeat}#loco-credit>*{vertical-align:middle}#loco-credit>a{display:inline-block;position:relative;overflow:hidden;background:transparent url(../img/logo-foot.gif?v=2.3.2) 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}.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)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../img/skins/fresh/spin-primary-button.gif?v=2.3.2) 0 0 no-repeat !important}
|
1 |
+
._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.4.0);background-repeat:no-repeat;min-height:16px}._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.4.0) 0 0 no-repeat;min-height:75px}._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.4.0);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.0);background-size:16px}._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.4.0);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.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco.wrap .icon,#loco.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.0");src:url("../font/loco.eot?v=2.4.0?#iefix") format("embedded-opentype"),url("../font/loco.woff?v=2.4.0") format("woff"),url("../font/loco.ttf?v=2.4.0") format("truetype"),url("../font/loco.svg?v=2.4.0#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.wrap .selector li,#loco.wrap .selector .handle,#loco.wrap .selectoradd a,#loco.wrap .selectorsep:before,#loco.wrap .selectorsep span{padding:.3em .75em}#loco.wrap .selector{text-align:left;display:inline-block;white-space:nowrap}#loco.wrap .selectoradd a,#loco.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.wrap .selectorsep{display:inline-block;border:solid 1px transparent}#loco.wrap .selectorsep:before{display:block;position:relative;color:#999;height:1.3em;overflow:hidden}#loco.wrap .selectorsep>*{display:block;line-height:1em;color:#666;height:1.3em;overflow:hidden}#loco.wrap .selector .handle{outline:none;white-space:nowrap;padding-right:2.3em;max-width:250px;text-overflow:ellipsis}#loco.wrap .selector .handle .prefix{padding-right:.6ex}#loco.wrap .selector .handle:after{font-family:loco;font-size:1.3em;color:#ccc;display:block;position:absolute;top:.25em;right:.6em;content:"▼"}#loco.wrap .selector .handle:focus:after,#loco.wrap .selector .handle:hover:after{color:#666}#loco.wrap .selector.no-caret .handle{padding-right:.75em}#loco.wrap .selector.no-caret .handle:after{display:none}#loco.wrap .selector.no-title .handle{padding-left:.5em;padding-right:.5em}#loco.wrap .selector.no-title .handle .label{display:none}#loco.wrap .selector.no-title .handle .icon{margin-right:0px}#loco.wrap .selector.dummy .handle{border-color:transparent}#loco.wrap .selector.dummy .handle:after{display:none}#loco.wrap .selectoradd{position:relative}#loco.wrap .selectoradd>*{display:block;float:left;clear:none}#loco.wrap .selectoradd>a.has-icon{width:1.3em}#loco.wrap .selectoradd>a.has-icon:before{color:#999;display:inline;padding-left:0;padding-right:0;line-height:1.4em}#loco.wrap .selectoradd>a.has-icon:hover:after{color:#2e892e}#loco.wrap .selectorsep{display:inline-block}#loco.wrap .selectorsep span{color:#666;height:1.3em}#loco.wrap .selector ul{padding:0}#loco.wrap .selector ul,#loco.wrap .selector li{display:block;position:relative;cursor:default;margin:0}#loco.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.wrap .selector.up ul{margin-top:0}#loco.wrap .selector.multi li input{display:none}#loco.wrap .selector.multi li.checked{background:#e5e5e5}#loco.wrap .selector li.active{background:#e5e5e5 !important}#loco.wrap .selector li.over{background:#ccc !important;color:#fff;text-shadow:1px 1px #aaa}#loco.wrap .selector li.over .label{color:#fff}#loco.wrap .selector .label{font:inherit;color:inherit}#loco.wrap .selector .icon{display:inline-block;min-width:1.2em;text-align:center;font-size:14px}#loco.wrap .selector .icon.no-icon{display:none}#loco.wrap .selector .icon:before{color:#666}#loco.wrap .selector .avtr{width:18px;height:18px;background-size:18px;background-repeat:no-repeat}#loco.wrap .selector .label{line-height:1}#loco.wrap .selector .icon,#loco.wrap .selector .icon-16{vertical-align:bottom}#loco.wrap .selector .icon,#loco.wrap .selector .lang,#loco.wrap .selector .icon-16{margin-right:5px}#loco.wrap .selector .region,#loco.wrap .selector .variant-wales,#loco.wrap .selector .region-gb.lang-cy,#loco.wrap .selector .variant-scotland,#loco.wrap .selector .region-gb.lang-gd,#loco.wrap .selector .variant-valencia,#loco.wrap .selector .region-es.variant-valencia,#loco.wrap .selector .lang-ca,#loco.wrap .selector .region-es.lang-ca,#loco.wrap .selector .lang-eo,#loco.wrap .selector .lang-eu{margin-left:2px;margin-right:7px}#loco.wrap .selector.ticked .icon.no-icon{font-size:12px;display:inline-block}#loco.wrap .selector.ticked .active .icon.no-icon:before{content:"✓"}#loco.wrap .selectoradd a:hover,#loco.wrap .selector a.handle:focus,#loco.wrap .selector a.handle:hover{color:#000;border-color:#999}#loco.wrap .selector.active .handle{border-color:#999;background-color:#eee;color:#999}#loco.wrap .selector.active .handle:after{color:#999;content:"▲"}#loco.wrap .selector.disabled{cursor:default;cursor:no-drop;cursor:not-allowed}#loco.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.wrap .selector.disabled .handle:after{display:none}#loco.wrap .selector.disabled .handle span.icon{color:#999 !important}#loco.wrap .selector li.disabled,#loco.wrap .selector li.disabled.over{color:#aaa;text-shadow:1px 1px #fff;pointer-events:none}#loco.wrap .selector li.disabled *{cursor:text}#loco.wrap .selector li.disabled .icon:before{color:#aaa}#loco.wrap .selector li.disabled .flag,#loco.wrap .selector li.disabled .icon-16{opacity:.4}#loco.wrap .selector.lefty ul{left:auto;right:0}#loco.wrap .selector.lefty ul .icon,#loco.wrap .selector.lefty ul .icon-32{display:block;float:right;clear:none}#loco.wrap .selector.lefty ul .label{padding-right:32px;padding-left:0}#loco.wrap .selector ul>form{margin:0;display:block}#loco.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.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.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.wrap .selector ul>form a.clear{margin:0;border:none}#loco.wrap .selector ul>form ::placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco.wrap .selector ul>form ::-webkit-input-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco.wrap .selector ul>form :-moz-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block;opacity:1}#loco.wrap .selector ul>form ::-moz-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block;opacity:1}#loco.wrap .selector ul>form :-ms-input-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco.wrap .selector ul>form .ielt10 .placeheld{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco.wrap div.auto-comp-wrap{width:100%}#loco.wrap div.auto-comp-wrap input{display:inline-block}#loco.wrap div.auto-comp-wrap.loading input{background:transparent url(../img/ajax-loader.gif?v=2.4.0) right 2px no-repeat}#loco.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.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.wrap div.auto-comp-result:first-child{border-top:solid 1px #ddd}#loco.wrap div.auto-comp-result>*{display:inline-block;vertical-align:middle;line-height:normal}#loco.wrap div.auto-comp-result .icon:before{padding-right:5px}#loco.wrap div.auto-comp-result:hover{background:#a8a8a8;color:#fff;border-top-color:#a8a8a8;border-bottom-color:#999}#loco.wrap div.auto-comp-result.selected{background:#666 !important;color:#fff;border-top-color:#666;border-bottom-color:#666}#loco.wrap div.auto-comp-result .lang,#loco.wrap div.auto-comp-result .region,#loco.wrap div.auto-comp-result .variant-wales,#loco.wrap div.auto-comp-result .region-gb.lang-cy,#loco.wrap div.auto-comp-result .variant-scotland,#loco.wrap div.auto-comp-result .region-gb.lang-gd,#loco.wrap div.auto-comp-result .variant-valencia,#loco.wrap div.auto-comp-result .region-es.variant-valencia,#loco.wrap div.auto-comp-result .lang-ca,#loco.wrap div.auto-comp-result .region-es.lang-ca,#loco.wrap div.auto-comp-result .lang-eo,#loco.wrap div.auto-comp-result .lang-eu,#loco.wrap div.auto-comp-result .avtr{margin-right:5px}#loco.wrap div.auto-comp-wrap.error a.icon.clear:before{color:#c00;opacity:1}#loco.wrap div.auto-comp-wrap.error input[type=text]{border-color:#c00;color:#c00}#loco.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.wrap ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.4.0);background-repeat:no-repeat;min-height:16px}#loco.wrap ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.4.0) 0 0 no-repeat;min-height:75px}#loco.wrap ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.4.0);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.wrap ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.4.0);background-size:16px}#loco.wrap ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.4.0);background-size:16px}}#loco.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.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.wrap .loco-font,#loco.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco.wrap .icon,#loco.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.wrap .has-icon:before{display:inline-block;padding-right:.3em}#loco.wrap a.icon-help{cursor:help}#loco.wrap a.icon-help span{display:none}#loco.wrap .icon-notag:before{content:""}#loco.wrap .icon-python:before{content:"🐍"}#loco.wrap .icon-unicode:before{content:"u"}#loco.wrap .icon-json:before{content:"{"}#loco.wrap .icon-bullist:before{content:""}#loco.wrap .icon-numlist:before{content:""}#loco.wrap .icon-indent:before{content:""}#loco.wrap .icon-outdent:before{content:""}#loco.wrap .icon-link:before{content:""}#loco.wrap .icon-unlink:before{content:""}#loco.wrap .icon-bold:before{content:"B"}#loco.wrap .icon-italic:before{content:"I"}#loco.wrap .icon-translate:before{content:""}#loco.wrap .icon-proj:before{content:""}#loco.wrap .icon-plural:before{content:"᛬"}#loco.wrap .icon-max:before,#loco.wrap .icon-full-screen:before{content:""}#loco.wrap .icon-min:before{content:""}#loco.wrap .icon-sort:before{content:""}#loco.wrap .icon-ok:before,#loco.wrap .notice-success>.has-icon:before,#loco.wrap .notice-success p>strong.has-icon:before{content:"✓"}#loco.wrap .icon-ok-empty:before{content:"🗌"}#loco.wrap .icon-checkbox-checked:before,#loco.wrap .selector.multi li.checked .icon-checkbox:before{content:"☑"}#loco.wrap .icon-checkbox-unchecked:before{content:"☐"}#loco.wrap .icon-checkbox-partial:before{content:"☉"}#loco.wrap .icon-radio-checked:before{content:"⚫"}#loco.wrap .icon-radio-unchecked:before{content:"⚪"}#loco.wrap .icon-ext:before{content:"⬈"}#loco.wrap .icon-share:before{content:""}#loco.wrap .icon-star:before{content:""}#loco.wrap .icon-user:before{content:""}#loco.wrap .icon-remove:before{content:"×"}#loco.wrap .icon-cog:before{content:""}#loco.wrap .icon-trash:before{content:""}#loco.wrap .icon-time:before,#loco.wrap .icon-history:before{content:""}#loco.wrap .icon-download:before{content:""}#loco.wrap .icon-revert:before{content:""}#loco.wrap .icon-sync:before{content:""}#loco.wrap .icon-lock:before,#loco.wrap .notice-locked>.has-icon:before,#loco.wrap .notice-locked p>strong.has-icon:before{content:""}#loco.wrap .icon-flag:before{content:""}#loco.wrap .icon-tag:before{content:""}#loco.wrap .icon-tags:before{content:""}#loco.wrap .icon-print:before{content:""}#loco.wrap .icon-camera:before{content:""}#loco.wrap .icon-pencil:before{content:""}#loco.wrap .icon-add:before{content:""}#loco.wrap .icon-del:before{content:""}#loco.wrap .icon-clear:before,#loco.wrap a.icon.clear:before{content:""}#loco.wrap .icon-ok-sign:before{content:"✔"}#loco.wrap .icon-help:before{content:"?"}#loco.wrap .icon-info:before,#loco.wrap .notice-info>.has-icon:before,#loco.wrap .notice-info p>strong.has-icon:before{content:"ℹ"}#loco.wrap .icon-cancel:before{content:""}#loco.wrap .icon-warn:before,#loco.wrap .notice-error>.has-icon:before,#loco.wrap .notice-error p>strong.has-icon:before,#loco.wrap .notice-warning>.has-icon:before,#loco.wrap .notice-warning p>strong.has-icon:before{content:""}#loco.wrap .icon-comment:before{content:""}#loco.wrap .icon-bar-chart:before{content:""}#loco.wrap .icon-key:before{content:""}#loco.wrap .icon-cogs:before{content:""}#loco.wrap .icon-comments:before{content:""}#loco.wrap .icon-signout:before{content:""}#loco.wrap .icon-signin:before{content:""}#loco.wrap .icon-upload:before{content:""}#loco.wrap .icon-twitter:before{content:"🐦"}#loco.wrap .icon-facebook:before{content:""}#loco.wrap .icon-github:before{content:""}#loco.wrap .icon-feed:before{content:""}#loco.wrap .icon-globe:before{content:""}#loco.wrap .icon-wrench:before,#loco.wrap .notice-debug>.has-icon:before,#loco.wrap .notice-debug p>strong.has-icon:before{content:""}#loco.wrap .icon-group:before{content:""}#loco.wrap .icon-cloud:before{content:""}#loco.wrap .icon-copy:before{content:""}#loco.wrap .icon-save:before{content:""}#loco.wrap .icon-menu:before{content:""}#loco.wrap .icon-table:before{content:""}#loco.wrap .icon-caret-down:before{content:"▼"}#loco.wrap .icon-caret-up:before{content:"▲"}#loco.wrap .icon-caret-right:before{content:"▶"}#loco.wrap .icon-mail:before{content:""}#loco.wrap .icon-cloud-upload:before{content:""}#loco.wrap .icon-file:before{content:""}#loco.wrap .icon-circle-white:before{content:"⚬"}#loco.wrap .icon-circle-black:before{content:"●"}#loco.wrap .icon-eraser:before{content:""}#loco.wrap .icon-unlock:before{content:""}#loco.wrap .icon-apple:before{content:""}#loco.wrap .icon-android:before{content:""}#loco.wrap .icon-robot:before{content:"🤖"}#loco.wrap .icon-back:before{content:"⬅"}#loco.wrap .icon-next:before{content:"➔"}#loco.wrap .icon-arrow-up:before{content:""}#loco.wrap .icon-ccard:before{content:""}#loco.wrap .icon-caret-left:before{content:"◀"}#loco.wrap .icon-pro:before{content:"⚡"}#loco.wrap .icon-bell:before{content:""}#loco.wrap .icon-code:before{content:""}#loco.wrap .icon-privacy:before{content:"🛡"}#loco.wrap .icon-hellip:before{content:"…"}#loco.wrap .icon-vellip:before{content:"⁞"}#loco.wrap .icon-collapse:before{content:""}#loco.wrap .icon-expand:before{content:""}#loco.wrap .icon-wordpress:before{content:""}#loco.wrap .icon-database:before{content:""}#loco.wrap .icon-restore:before{content:""}#loco.wrap .icon-pilcrow:before{content:"¶"}#loco.wrap .icon-status.is-translated:before,#loco.wrap .is-translated>header>.icon-status:before{color:#2e892e;content:"✓";text-align:center}#loco.wrap .icon-status.is-untranslated:before,#loco.wrap .is-untranslated>header>.icon-status:before{color:#aaa;content:"×";text-align:center;font-size:1.1em}#loco.wrap .icon-status.is-flagged:before,#loco.wrap .is-flagged>header>.icon-status:before{color:#bd2c00;content:"";text-align:center}#loco.wrap .icon-status.is-translated.is-blank:before,#loco.wrap .icon-status.is-translated.is-inherit:before,#loco.wrap .is-translated.is-blank>header>.icon-status:before,#loco.wrap .is-translated.is-inherit>header>.icon-status:before{content:"🗌"}#loco.wrap .icon-status.is-fuzzy:before,#loco.wrap .is-fuzzy>header>.icon-status:before{color:#666;content:""}#loco.wrap .lang,#loco.wrap .region,#loco.wrap .variant-wales,#loco.wrap .region-gb.lang-cy,#loco.wrap .variant-scotland,#loco.wrap .region-gb.lang-gd,#loco.wrap .variant-valencia,#loco.wrap .region-es.variant-valencia,#loco.wrap .lang-ca,#loco.wrap .region-es.lang-ca,#loco.wrap .lang-eo,#loco.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.wrap .lang{width:20px;height:12px;line-height:12px;vertical-align:middle}#loco.wrap .lang:before{content:attr(lang);vertical-align:baseline}#loco.wrap .no-lang{width:18px;height:10px;border:solid 1px #2e892e;background:transparent}#loco.wrap .lang-el{background-color:#1d48a3}#loco.wrap .lang-el:before{content:"Ελ"}#loco.wrap .region,#loco.wrap .variant-wales,#loco.wrap .region-gb.lang-cy,#loco.wrap .variant-scotland,#loco.wrap .region-gb.lang-gd,#loco.wrap .variant-valencia,#loco.wrap .region-es.variant-valencia,#loco.wrap .lang-ca,#loco.wrap .region-es.lang-ca,#loco.wrap .lang-eo,#loco.wrap .lang-eu{width:16px;height:12px;margin:0 2px;background-image:url(../img/flags.png?v=2.4.0);background-repeat:no-repeat;background-color:transparent}#loco.wrap .region:before,#loco.wrap .variant-wales:before,#loco.wrap .region-gb.lang-cy:before,#loco.wrap .variant-scotland:before,#loco.wrap .region-gb.lang-gd:before,#loco.wrap .variant-valencia:before,#loco.wrap .region-es.variant-valencia:before,#loco.wrap .lang-ca:before,#loco.wrap .region-es.lang-ca:before,#loco.wrap .lang-eo:before,#loco.wrap .lang-eu:before{visibility:hidden}#loco.wrap .lang-zh{background-color:#b90000}#loco.wrap .lang-zh.script-hans:before{content:"中国"}#loco.wrap .lang-zh.script-hant:before{content:"中國"}#loco.wrap .__{background-position:0 0}#loco.wrap .lang-eo{background-position:0 -12px}#loco.wrap .lang-eu{background-position:0 -24px}#loco.wrap .lang-ca,#loco.wrap .region-es.lang-ca{background-position:0 -36px}#loco.wrap .region-tg{background-position:0 -48px}#loco.wrap .region-me{background-position:0 -60px}#loco.wrap .region-la{background-position:0 -73px}#loco.wrap .region-mr{background-position:0 -85px}#loco.wrap .region-ni{background-position:0 -97px}#loco.wrap .region-lv{background-position:0 -109px}#loco.wrap .region-om{background-position:0 -121px}#loco.wrap .region-af{background-position:0 -133px}#loco.wrap .region-cy{background-position:0 -145px}#loco.wrap .region-bj{background-position:0 -157px}#loco.wrap .region-aq{background-position:0 -169px}#loco.wrap .region-cn{background-position:0 -186px}#loco.wrap .region-co{background-position:0 -198px}#loco.wrap .region-cx{background-position:0 -210px}#loco.wrap .region-ag{background-position:0 -222px}#loco.wrap .region-ms{background-position:0 -234px}#loco.wrap .region-md{background-position:0 -246px}#loco.wrap .region-zm{background-position:0 -258px}#loco.wrap .region-vn{background-position:0 -270px}#loco.wrap .region-tf{background-position:0 -282px}#loco.wrap .region-td{background-position:0 -294px}#loco.wrap .region-yt{background-position:0 -306px}#loco.wrap .region-lb{background-position:0 -318px}#loco.wrap .region-mf{background-position:0 -330px}#loco.wrap .region-lu{background-position:0 -347px}#loco.wrap .region-mq{background-position:0 -359px}#loco.wrap .region-cz{background-position:0 -371px}#loco.wrap .region-ae{background-position:0 -383px}#loco.wrap .region-cm{background-position:0 -395px}#loco.wrap .region-bi{background-position:0 -407px}#loco.wrap .region-ar{background-position:0 -419px}#loco.wrap .region-as{background-position:0 -431px}#loco.wrap .region-bh{background-position:0 -443px}#loco.wrap .region-cl{background-position:0 -455px}#loco.wrap .region-ad{background-position:0 -467px}#loco.wrap .region-mp{background-position:0 -479px}#loco.wrap .region-lt{background-position:0 -491px}#loco.wrap .region-mg{background-position:0 -503px}#loco.wrap .region-lc{background-position:0 -515px}#loco.wrap .region-tr{background-position:0 -527px}#loco.wrap .region-ua{background-position:0 -539px}#loco.wrap .region-tv{background-position:0 -551px}#loco.wrap .region-vi{background-position:0 -563px}#loco.wrap .region-mt{background-position:0 -575px}#loco.wrap .region-no{background-position:0 -587px}#loco.wrap .region-mc{background-position:0 -599px}#loco.wrap .region-ch{background-position:0 -611px}#loco.wrap .region-bl{background-position:0 -623px}#loco.wrap .region-aw{background-position:0 -640px}#loco.wrap .region-bz{background-position:0 -652px}#loco.wrap .region-bm{background-position:0 -664px}#loco.wrap .region-ci{background-position:0 -676px}#loco.wrap .region-mu{background-position:0 -688px}#loco.wrap .region-us{background-position:0 -700px}#loco.wrap .region-tw{background-position:0 -712px}#loco.wrap .region-ye{background-position:0 -724px}#loco.wrap .region-mw{background-position:0 -736px}#loco.wrap .region-nl{background-position:0 -748px}#loco.wrap .region-ls{background-position:0 -760px}#loco.wrap .region-bo{background-position:0 -772px}#loco.wrap .region-at{background-position:0 -784px}#loco.wrap .region-ck{background-position:0 -796px}#loco.wrap .region-by{background-position:0 -808px}#loco.wrap .region-au{background-position:0 -820px}#loco.wrap .region-bn{background-position:0 -832px}#loco.wrap .region-ma{background-position:0 -844px}#loco.wrap .region-nz{background-position:0 -856px}#loco.wrap .region-lr{background-position:0 -868px}#loco.wrap .region-mv{background-position:0 -880px}#loco.wrap .region-tc{background-position:0 -892px}#loco.wrap .region-ug{background-position:0 -904px}#loco.wrap .region-tt{background-position:0 -916px}#loco.wrap .region-pl{background-position:0 -928px}#loco.wrap .region-rs{background-position:0 -940px}#loco.wrap .region-in{background-position:0 -952px}#loco.wrap .region-ge{background-position:0 -964px}#loco.wrap .region-gr{background-position:0 -976px}#loco.wrap .region-gs{background-position:0 -988px}#loco.wrap .region-gd{background-position:0 -1000px}#loco.wrap .region-io{background-position:0 -1012px}#loco.wrap .region-hk{background-position:0 -1024px}#loco.wrap .region-kp{background-position:0 -1036px}#loco.wrap .region-kg{background-position:0 -1048px}#loco.wrap .region-pm{background-position:0 -1060px}#loco.wrap .region-sv{background-position:0 -1072px}#loco.wrap .region-re{background-position:0 -1084px}#loco.wrap .region-sa{background-position:0 -1096px}#loco.wrap .region-sc{background-position:0 -1108px}#loco.wrap .region-st{background-position:0 -1120px}#loco.wrap .region-ke{background-position:0 -1132px}#loco.wrap .region-im{background-position:0 -1144px}#loco.wrap .region-kr{background-position:0 -1161px}#loco.wrap .region-gf{background-position:0 -1173px}#loco.wrap .region-dj{background-position:0 -1185px}#loco.wrap .region-gq{background-position:0 -1197px}#loco.wrap .region-gp{background-position:0 -1209px}#loco.wrap .region-dk{background-position:0 -1221px}#loco.wrap .region-gg{background-position:0 -1233px}#loco.wrap .region-il{background-position:0 -1250px}#loco.wrap .region-pn{background-position:0 -1262px}#loco.wrap .region-sb{background-position:0 -1274px}#loco.wrap .region-py{background-position:0 -1286px}#loco.wrap .region-ru{background-position:0 -1298px}#loco.wrap .region-kw{background-position:0 -1310px}#loco.wrap .region-do{background-position:0 -1322px}#loco.wrap .region-gt{background-position:0 -1334px}#loco.wrap .region-gb{background-position:0 -1346px}#loco.wrap .region-gu{background-position:0 -1358px}#loco.wrap .region-je{background-position:0 -1370px}#loco.wrap .region-hm{background-position:0 -1387px}#loco.wrap .region-sg{background-position:0 -1399px}#loco.wrap .region-pk{background-position:0 -1411px}#loco.wrap .region-sr{background-position:0 -1423px}#loco.wrap .region-se{background-position:0 -1435px}#loco.wrap .region-jp{background-position:0 -1447px}#loco.wrap .region-gw{background-position:0 -1459px}#loco.wrap .region-eh{background-position:0 -1471px}#loco.wrap .region-dz{background-position:0 -1483px}#loco.wrap .region-ga{background-position:0 -1495px}#loco.wrap .region-fr{background-position:0 -1507px}#loco.wrap .region-dm{background-position:0 -1519px}#loco.wrap .region-hn{background-position:0 -1531px}#loco.wrap .region-sd{background-position:0 -1543px}#loco.wrap .region-rw{background-position:0 -1555px}#loco.wrap .region-ph{background-position:0 -1567px}#loco.wrap .region-ss{background-position:0 -1579px}#loco.wrap .region-qa{background-position:0 -1596px}#loco.wrap .region-pe{background-position:0 -1608px}#loco.wrap .region-pr{background-position:0 -1620px}#loco.wrap .region-si{background-position:0 -1632px}#loco.wrap .region-ht{background-position:0 -1644px}#loco.wrap .region-es{background-position:0 -1656px}#loco.wrap .region-gl{background-position:0 -1668px}#loco.wrap .region-gm{background-position:0 -1680px}#loco.wrap .region-er{background-position:0 -1692px}#loco.wrap .region-fi{background-position:0 -1704px}#loco.wrap .region-ee{background-position:0 -1716px}#loco.wrap .region-kn{background-position:0 -1728px}#loco.wrap .region-hu{background-position:0 -1740px}#loco.wrap .region-iq{background-position:0 -1752px}#loco.wrap .region-ky{background-position:0 -1764px}#loco.wrap .region-sh{background-position:0 -1776px}#loco.wrap .region-ps{background-position:0 -1788px}#loco.wrap .region-pf{background-position:0 -1800px}#loco.wrap .region-sj{background-position:0 -1812px}#loco.wrap .region-id{background-position:0 -1824px}#loco.wrap .region-is{background-position:0 -1836px}#loco.wrap .region-eg{background-position:0 -1848px}#loco.wrap .region-fk{background-position:0 -1860px}#loco.wrap .region-fj{background-position:0 -1872px}#loco.wrap .region-gn{background-position:0 -1884px}#loco.wrap .region-gy{background-position:0 -1896px}#loco.wrap .region-ir{background-position:0 -1908px}#loco.wrap .region-km{background-position:0 -1920px}#loco.wrap .region-ie{background-position:0 -1932px}#loco.wrap .region-kz{background-position:0 -1944px}#loco.wrap .region-ro{background-position:0 -1956px}#loco.wrap .region-sk{background-position:0 -1968px}#loco.wrap .region-pg{background-position:0 -1980px}#loco.wrap .region-pt{background-position:0 -1992px}#loco.wrap .region-so{background-position:0 -2004px}#loco.wrap .region-sx{background-position:0 -2016px}#loco.wrap .region-hr{background-position:0 -2033px}#loco.wrap .region-ki{background-position:0 -2045px}#loco.wrap .region-jm{background-position:0 -2057px}#loco.wrap .region-ec{background-position:0 -2069px}#loco.wrap .region-et{background-position:0 -2081px}#loco.wrap .region-fo{background-position:0 -2093px}#loco.wrap .region-kh{background-position:0 -2105px}#loco.wrap .region-sy{background-position:0 -2117px}#loco.wrap .region-sn{background-position:0 -2129px}#loco.wrap .region-pw{background-position:0 -2141px}#loco.wrap .region-sl{background-position:0 -2153px}#loco.wrap .region-fm{background-position:0 -2165px}#loco.wrap .region-gi{background-position:0 -2177px}#loco.wrap .region-de{background-position:0 -2189px}#loco.wrap .region-gh{background-position:0 -2201px}#loco.wrap .region-jo{background-position:0 -2213px}#loco.wrap .region-it{background-position:0 -2225px}#loco.wrap .region-pa{background-position:0 -2237px}#loco.wrap .region-sz{background-position:0 -2249px}#loco.wrap .region-sm{background-position:0 -2261px}#loco.wrap .region-tn{background-position:0 -2273px}#loco.wrap .region-ml{background-position:0 -2285px}#loco.wrap .region-cg{background-position:0 -2297px}#loco.wrap .region-ax{background-position:0 -2309px}#loco.wrap .region-ao{background-position:0 -2321px}#loco.wrap .region-bt{background-position:0 -2333px}#loco.wrap .region-an{background-position:0 -2345px}#loco.wrap .region-bb{background-position:0 -2357px}#loco.wrap .region-cf{background-position:0 -2369px}#loco.wrap .region-mm{background-position:0 -2381px}#loco.wrap .region-li{background-position:0 -2393px}#loco.wrap .region-na{background-position:0 -2405px}#loco.wrap .region-mz{background-position:0 -2417px}#loco.wrap .region-to{background-position:0 -2429px}#loco.wrap .region-vg{background-position:0 -2441px}#loco.wrap .region-ve{background-position:0 -2453px}#loco.wrap .region-tz{background-position:0 -2465px}#loco.wrap .region-tm{background-position:0 -2477px}#loco.wrap .region-mx{background-position:0 -2489px}#loco.wrap .region-nc{background-position:0 -2501px}#loco.wrap .region-mo{background-position:0 -2513px}#loco.wrap .region-lk{background-position:0 -2525px}#loco.wrap .region-cd{background-position:0 -2537px}#loco.wrap .region-al{background-position:0 -2549px}#loco.wrap .region-bw{background-position:0 -2561px}#loco.wrap .region-cs{background-position:0 -2573px}#loco.wrap .region-cr{background-position:0 -2585px}#loco.wrap .region-bv{background-position:0 -2597px}#loco.wrap .region-am{background-position:0 -2609px}#loco.wrap .region-az{background-position:0 -2621px}#loco.wrap .region-ba{background-position:0 -2633px}#loco.wrap .region-mn{background-position:0 -2645px}#loco.wrap .region-nu{background-position:0 -2657px}#loco.wrap .region-my{background-position:0 -2669px}#loco.wrap .region-tl{background-position:0 -2681px}#loco.wrap .region-ws{background-position:0 -2693px}#loco.wrap .region-th{background-position:0 -2705px}#loco.wrap .region-nf{background-position:0 -2717px}#loco.wrap .region-ly{background-position:0 -2729px}#loco.wrap .region-ai{background-position:0 -2741px}#loco.wrap .region-br{background-position:0 -2753px}#loco.wrap .region-cv{background-position:0 -2765px}#loco.wrap .region-be{background-position:0 -2777px}#loco.wrap .region-ca{background-position:0 -2789px}#loco.wrap .region-bd{background-position:0 -2801px}#loco.wrap .region-cw{background-position:0 -2813px}#loco.wrap .region-bs{background-position:0 -2830px}#loco.wrap .region-ng{background-position:0 -2842px}#loco.wrap .region-mk{background-position:0 -2854px}#loco.wrap .region-np{background-position:0 -2866px}#loco.wrap .region-va{background-position:0 -2878px}#loco.wrap .region-uz{background-position:0 -2890px}#loco.wrap .region-um{background-position:0 -2902px}#loco.wrap .region-tk{background-position:0 -2914px}#loco.wrap .region-vc{background-position:0 -2926px}#loco.wrap .region-zw{background-position:0 -2938px}#loco.wrap .region-nr{background-position:0 -2950px}#loco.wrap .region-ne{background-position:0 -2962px}#loco.wrap .region-cu{background-position:0 -2974px}#loco.wrap .region-bq{background-position:0 -2986px}#loco.wrap .region-bf{background-position:0 -2998px}#loco.wrap .region-bg{background-position:0 -3010px}#loco.wrap .region-cc{background-position:0 -3022px}#loco.wrap .region-mh{background-position:0 -3034px}#loco.wrap .region-za{background-position:0 -3046px}#loco.wrap .region-uy{background-position:0 -3058px}#loco.wrap .region-wf{background-position:0 -3070px}#loco.wrap .region-vu{background-position:0 -3082px}#loco.wrap .region-tj{background-position:0 -3094px}#loco.wrap .variant-scotland,#loco.wrap .region-gb.lang-gd{background-position:0 -3106px}#loco.wrap .variant-valencia,#loco.wrap .region-es.variant-valencia{background-position:0 -3118px}#loco.wrap .variant-wales,#loco.wrap .region-gb.lang-cy{background-position:0 -3130px}#loco.wrap .x-eu{background-position:0 -3142px}#loco.wrap span.lang code{display:none}#loco.wrap .icon-notag:before{content:""}#loco.wrap .icon-python:before{content:"🐍"}#loco.wrap .icon-unicode:before{content:"u"}#loco.wrap .icon-json:before{content:"{"}#loco.wrap .icon-bullist:before{content:""}#loco.wrap .icon-numlist:before{content:""}#loco.wrap .icon-indent:before{content:""}#loco.wrap .icon-outdent:before{content:""}#loco.wrap .icon-link:before{content:""}#loco.wrap .icon-unlink:before{content:""}#loco.wrap .icon-bold:before{content:"B"}#loco.wrap .icon-italic:before{content:"I"}#loco.wrap .icon-translate:before{content:""}#loco.wrap .icon-proj:before{content:""}#loco.wrap .icon-plural:before{content:"᛬"}#loco.wrap .icon-max:before,#loco.wrap .icon-full-screen:before{content:""}#loco.wrap .icon-min:before{content:""}#loco.wrap .icon-sort:before{content:""}#loco.wrap .icon-ok:before,#loco.wrap .notice-success>.has-icon:before,#loco.wrap .notice-success p>strong.has-icon:before{content:"✓"}#loco.wrap .icon-ok-empty:before{content:"🗌"}#loco.wrap .icon-checkbox-checked:before,#loco.wrap .selector.multi li.checked .icon-checkbox:before{content:"☑"}#loco.wrap .icon-checkbox-unchecked:before{content:"☐"}#loco.wrap .icon-checkbox-partial:before{content:"☉"}#loco.wrap .icon-radio-checked:before{content:"⚫"}#loco.wrap .icon-radio-unchecked:before{content:"⚪"}#loco.wrap .icon-ext:before{content:"⬈"}#loco.wrap .icon-share:before{content:""}#loco.wrap .icon-star:before{content:""}#loco.wrap .icon-user:before{content:""}#loco.wrap .icon-remove:before{content:"×"}#loco.wrap .icon-cog:before{content:""}#loco.wrap .icon-trash:before{content:""}#loco.wrap .icon-time:before,#loco.wrap .icon-history:before{content:""}#loco.wrap .icon-download:before{content:""}#loco.wrap .icon-revert:before{content:""}#loco.wrap .icon-sync:before{content:""}#loco.wrap .icon-lock:before,#loco.wrap .notice-locked>.has-icon:before,#loco.wrap .notice-locked p>strong.has-icon:before{content:""}#loco.wrap .icon-flag:before{content:""}#loco.wrap .icon-tag:before{content:""}#loco.wrap .icon-tags:before{content:""}#loco.wrap .icon-print:before{content:""}#loco.wrap .icon-camera:before{content:""}#loco.wrap .icon-pencil:before{content:""}#loco.wrap .icon-add:before{content:""}#loco.wrap .icon-del:before{content:""}#loco.wrap .icon-clear:before,#loco.wrap a.icon.clear:before{content:""}#loco.wrap .icon-ok-sign:before{content:"✔"}#loco.wrap .icon-help:before{content:"?"}#loco.wrap .icon-info:before,#loco.wrap .notice-info>.has-icon:before,#loco.wrap .notice-info p>strong.has-icon:before{content:"ℹ"}#loco.wrap .icon-cancel:before{content:""}#loco.wrap .icon-warn:before,#loco.wrap .notice-error>.has-icon:before,#loco.wrap .notice-error p>strong.has-icon:before,#loco.wrap .notice-warning>.has-icon:before,#loco.wrap .notice-warning p>strong.has-icon:before{content:""}#loco.wrap .icon-comment:before{content:""}#loco.wrap .icon-bar-chart:before{content:""}#loco.wrap .icon-key:before{content:""}#loco.wrap .icon-cogs:before{content:""}#loco.wrap .icon-comments:before{content:""}#loco.wrap .icon-signout:before{content:""}#loco.wrap .icon-signin:before{content:""}#loco.wrap .icon-upload:before{content:""}#loco.wrap .icon-twitter:before{content:"🐦"}#loco.wrap .icon-facebook:before{content:""}#loco.wrap .icon-github:before{content:""}#loco.wrap .icon-feed:before{content:""}#loco.wrap .icon-globe:before{content:""}#loco.wrap .icon-wrench:before,#loco.wrap .notice-debug>.has-icon:before,#loco.wrap .notice-debug p>strong.has-icon:before{content:""}#loco.wrap .icon-group:before{content:""}#loco.wrap .icon-cloud:before{content:""}#loco.wrap .icon-copy:before{content:""}#loco.wrap .icon-save:before{content:""}#loco.wrap .icon-menu:before{content:""}#loco.wrap .icon-table:before{content:""}#loco.wrap .icon-caret-down:before{content:"▼"}#loco.wrap .icon-caret-up:before{content:"▲"}#loco.wrap .icon-caret-right:before{content:"▶"}#loco.wrap .icon-mail:before{content:""}#loco.wrap .icon-cloud-upload:before{content:""}#loco.wrap .icon-file:before{content:""}#loco.wrap .icon-circle-white:before{content:"⚬"}#loco.wrap .icon-circle-black:before{content:"●"}#loco.wrap .icon-eraser:before{content:""}#loco.wrap .icon-unlock:before{content:""}#loco.wrap .icon-apple:before{content:""}#loco.wrap .icon-android:before{content:""}#loco.wrap .icon-robot:before{content:"🤖"}#loco.wrap .icon-back:before{content:"⬅"}#loco.wrap .icon-next:before{content:"➔"}#loco.wrap .icon-arrow-up:before{content:""}#loco.wrap .icon-ccard:before{content:""}#loco.wrap .icon-caret-left:before{content:"◀"}#loco.wrap .icon-pro:before{content:"⚡"}#loco.wrap .icon-bell:before{content:""}#loco.wrap .icon-code:before{content:""}#loco.wrap .icon-privacy:before{content:"🛡"}#loco.wrap .icon-hellip:before{content:"…"}#loco.wrap .icon-vellip:before{content:"⁞"}#loco.wrap .icon-collapse:before{content:""}#loco.wrap .icon-expand:before{content:""}#loco.wrap .icon-wordpress:before{content:""}#loco.wrap .icon-database:before{content:""}#loco.wrap .icon-restore:before{content:""}#loco.wrap .icon-pilcrow:before{content:"¶"}#loco.wrap .icon,#loco.wrap .has-icon:before,#loco.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.wrap .icon,#loco.wrap .has-icon:before{font-family:"loco"}#loco.wrap .has-dashicon:before{font-family:"dashicons";font-size:1.4em}#loco.wrap .has-icon:before,#loco.wrap .has-dashicon:before,#loco.wrap .has-icon>span{display:inline-block;vertical-align:middle}#loco.wrap .only-icon{text-align:center}#loco.wrap .only-icon:before{text-align:center;padding:0}#loco.wrap .only-icon span{display:none}#loco.wrap a,#loco.wrap .wp-core-ui .button-link{text-decoration:none}#loco.wrap h3:hover>a.loco-anchor{color:#ccc}#loco.wrap h3:hover>a.loco-anchor:before{content:"¶"}#loco.wrap .has-lang>span{display:inline-block;vertical-align:middle}#loco.wrap a.has-lang:hover>span:last-child{text-decoration:underline}#loco.wrap h1 ul,#loco.wrap h1 li{margin:0;padding:0}#loco.wrap h1 li{display:inline-block}#loco.wrap h1 li:after{content:"/";color:#999;text-shadow:none;display:inline-block}#loco.wrap h1 li:last-child:after{content:""}#loco.wrap h1 li:last-child a{color:inherit;pointer-events:none;cursor:auto}#loco.wrap h2 span{color:#999;font-weight:normal}#loco.wrap h2 .loco-meta,#loco.wrap h3 .loco-meta{color:inherit;font-size:14px;font-weight:normal;vertical-align:middle}#loco.wrap .wp-list-table td:first-child .icon{width:16px;display:inline-block;text-align:center}#loco.wrap .wp-list-table td{white-space:nowrap}#loco.wrap .wp-list-table td>a,#loco.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.wrap .wp-list-table th.loco-sort{cursor:pointer}#loco.wrap .wp-list-table th.loco-sort:hover{color:#000}#loco.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco.wrap .wp-list-table th.loco-sort.loco-desc:after{padding:0 0 0 4px;color:#999}#loco.wrap .wp-list-table th.loco-sort.loco-desc:after{content:"▼"}#loco.wrap .wp-list-table th.loco-sort.loco-asc:after{content:"▲"}#loco.wrap .wp-list-table td.has-row-actions{overflow:visible}#loco.wrap form.loco-filter{display:block;margin-bottom:5px}#loco.wrap form.loco-filter .icon-filter{color:#999}#loco.wrap nav.above-list-table{margin-bottom:1em}#loco.wrap nav.above-list-table a{display:inline-block;margin-right:1em}#loco.wrap .wp-core-ui button.inverted,#loco.wrap .wp-core-ui button.inverted:hover,#loco.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.wrap .wp-core-ui button:active,#loco.wrap .wp-core-ui button.inverted:active{border-color:#5b9dd9}#loco.wrap .loco-clearable{display:inline-block;vertical-align:middle;position:relative}#loco.wrap .loco-clearable a.clear,#loco.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.wrap .loco-clearable a.clear:before,#loco.wrap .auto-comp-wrap a.clear:before{vertical-align:middle;padding:0;color:#999}#loco.wrap .loco-clearable a.clear:hover:before,#loco.wrap .auto-comp-wrap a.clear:hover:before{color:#333}#loco.wrap .loco-clearable a.clear span,#loco.wrap .auto-comp-wrap a.clear span{display:none}#loco.wrap .loco-clearable ::-ms-clear,#loco.wrap .auto-comp-wrap ::-ms-clear{display:none}#loco.wrap div.progress{color:#000;background:transparent !important}#loco.wrap div.progress *{height:100%;overflow:hidden;white-space:nowrap}#loco.wrap div.progress .t{background-color:#ddd;border:1px solid #ccc}#loco.wrap div.progress .t .bar{float:left;clear:none;background-color:#3db63d}#loco.wrap div.progress .t .bar.f{background-color:#bd2c00}#loco.wrap div.progress .l{display:block}#loco.wrap td div.progress .t{border:none}#loco.wrap td div.progress .l{display:none}#loco.wrap code.path{color:#333;margin:0;padding:0;display:inline;background:transparent}#loco.wrap .loco-danger{color:#d54e21}#loco.wrap .notice,#loco.wrap .panel{background:#fff;position:relative;margin:1em 0;padding:1px 12px}#loco.wrap .notice-generic{border-color:#ddd}#loco.wrap .notice-success>.has-icon,#loco.wrap .notice-success p>strong.has-icon{color:#000}#loco.wrap .notice-warning{border-color:orange}#loco.wrap .notice-error{border-color:#dc3232}#loco.wrap .notice-debug{border-color:#00a0d2}#loco.wrap .notice-danger{border-color:#dc3232}#loco.wrap .notice-locked{border-color:orange}#loco.wrap .notice>.has-icon:before,#loco.wrap .notice p>strong.has-icon:before{padding-right:6px}#loco.wrap .notice>p>a.button.has-icon:before{width:1.2em}#loco.wrap .notice>p>em{color:#d54e21;font-style:normal}#loco.wrap .notice>p>em a{color:inherit}#loco.wrap .notice>p a:hover,#loco.wrap .notice>nav a:hover{text-decoration:underline}#loco.wrap .notice>p a.button,#loco.wrap .notice>nav a.button{text-decoration:inherit}#loco.wrap .notice.has-nav{display:flex;flex-direction:row}#loco.wrap .notice.has-nav p,#loco.wrap .notice.has-nav nav{line-height:22px;flex-grow:1}#loco.wrap .notice.has-nav nav{text-align:right;padding:2px;margin:.5em 0}#loco.wrap .notice.has-nav.is-dismissible{padding-right:38px}#loco.wrap .notice.has-nav a{white-space:nowrap}#loco.wrap .notice.has-nav nav>span{color:#666}#loco.wrap .notice>h3>span{display:inline-block;vertical-align:middle}#loco.wrap ul.problems li{font-style:italic}#loco.wrap label{position:relative}#loco.wrap label.for-disabled,#loco.wrap label.for-disabled>input{cursor:default !important}#loco.wrap input.regular-text,#loco.wrap textarea.regular-text{width:25em}#loco.wrap .button-link{padding:0 10px 1px}#loco.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.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.wrap .button-success:hover{background:#3db63d}#loco.wrap form button.loco-loading.button-large{padding-left:0}#loco.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.wrap ::placeholder{color:#ccc}#loco.wrap ::-webkit-input-placeholder{color:#ccc}#loco.wrap :-moz-placeholder{color:#ccc;opacity:1}#loco.wrap ::-moz-placeholder{color:#ccc;opacity:1}#loco.wrap :-ms-input-placeholder{color:#ccc}#loco.wrap .ielt10 .placeheld{color:#ccc}#loco.wrap a.has-raquo:after{content:" »"}#loco.wrap a.has-laquo:before{content:"« "}#loco.wrap span.inline-spinner{display:inline-block;min-width:16px;min-height:16px;background:transparent url(../img/spin-modal.gif?v=2.4.0) 0 0 no-repeat}.js #wpbody-content>.notice{display:none}.js #wpbody-content>.notice.inline{display:block}.js #loco.wrap .jshide,.no-js #loco.wrap .jsonly{display:none !important}#loco.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.0) 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.0) 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}.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)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../img/skins/fresh/spin-primary-button.gif?v=2.4.0) 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.3.2);background-repeat:no-repeat;min-height:16px}#loco-editor ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.3.2) 0 0 no-repeat;min-height:75px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.3.2);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.3.2);background-size:16px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.3.2);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.3.2) 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.3.2);background-repeat:no-repeat;min-height:16px}#loco-editor ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.3.2) 0 0 no-repeat;min-height:75px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.3.2);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.3.2);background-size:16px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.3.2);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.3.2) 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.3.2) 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}#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>.errors{color:#c00}#loco-editor .wg-cell>.meta,#loco-editor .wg-cell>.errors{margin:0 !important;padding:6px 10px;font-weight:normal;font-size:13px;line-height:1.4em;cursor:default !important}#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-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-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.3.2) center 20px no-repeat}#loco-editor-inner h2{color:#000;line-height:1}#loco.wrap #loco-toolbar{font-size:14px;height:50px}#loco.wrap #loco-toolbar form{display:block;float:left;clear:none;padding:0;margin:0}#loco.wrap #loco-toolbar form.aux{float:right;margin-right:5px}#loco.wrap #loco-toolbar fieldset{display:block;position:relative;float:left;clear:none}#loco.wrap #loco-toolbar button,#loco.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.wrap #loco-toolbar input[type=text]{padding:0 10px;font-size:14px;line-height:normal}#loco.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.wrap #loco-toolbar .loco-clearable{padding:0 20px}#loco.wrap #loco-toolbar .loco-clearable.invalid a.clear:before{color:#c00}#loco.wrap #loco-toolbar .loco-clearable a.clear{right:25px;line-height:2}#loco.wrap #loco-toolbar .loco-clearable a.clear:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#loco.wrap #loco-toolbar .loco-clearable a.clear:hover:before{color:#c00}#loco.wrap #loco-toolbar .loco-clearable a.clear:active:before{color:#000}#loco.wrap #loco-toolbar button,#loco.wrap #loco-toolbar input[type=text]{border-color:#aaa}#loco.wrap #loco-toolbar button.has-icon:before{width:16px;padding:0}#loco.wrap #loco-toolbar button.has-icon.loco-loading:before{content:" ";height:16px;background:transparent url(../img/spin-editor-button.gif?v=2.3.2) 0 0 no-repeat}#loco.wrap #loco-toolbar button.only-icon{width:40px}
|
1 |
+
#loco-editor{border:solid 1px #ccc}#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.4.0);background-repeat:no-repeat;min-height:16px}#loco-editor ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.4.0) 0 0 no-repeat;min-height:75px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.4.0);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.0);background-size:16px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.4.0);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.0) 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.0);background-repeat:no-repeat;min-height:16px}#loco-editor ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.4.0) 0 0 no-repeat;min-height:75px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.4.0);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.0);background-size:16px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.4.0);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.0) 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.0) 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.0) 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.wrap #loco-toolbar{font-size:14px;height:50px}#loco.wrap #loco-toolbar form{display:block;float:left;clear:none;padding:0;margin:0}#loco.wrap #loco-toolbar form.aux{float:right;margin-right:5px}#loco.wrap #loco-toolbar fieldset{display:block;position:relative;float:left;clear:none}#loco.wrap #loco-toolbar button,#loco.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.wrap #loco-toolbar input[type=text]{padding:0 10px;font-size:14px;line-height:normal}#loco.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.wrap #loco-toolbar .loco-clearable{padding:0 20px}#loco.wrap #loco-toolbar .loco-clearable.invalid a.clear:before{color:#c00}#loco.wrap #loco-toolbar .loco-clearable a.clear{right:25px;line-height:2}#loco.wrap #loco-toolbar .loco-clearable a.clear:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#loco.wrap #loco-toolbar .loco-clearable a.clear:hover:before{color:#c00}#loco.wrap #loco-toolbar .loco-clearable a.clear:active:before{color:#000}#loco.wrap #loco-toolbar button.only-icon{width:40px}#loco.wrap button.has-icon:before{width:16px;padding:0}#loco.wrap button.has-icon.loco-loading:before{content:" ";height:16px;background:transparent url(../img/spin-editor-button.gif?v=2.4.0) 0 0 no-repeat}#loco.wrap .button,#loco.wrap .button-link,#loco.wrap input[type=text]{border-color:#aaa;color:#444}#loco.wrap .button-primary{color:#fff}#loco.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.0) 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.0) 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.0) 0 0 no-repeat}.loco-api-microsoft a.loco-api-credit:before{content:"Translated by "}
|
pub/css/podiff.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#loco.wrap .revisions-diff{padding:10px;min-height:20px}#loco.wrap table.diff{border-collapse:collapse}#loco.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.wrap table.diff td>span{color:#aaa}#loco.wrap table.diff td>span:after{content:". "}#loco.wrap table.diff tbody{border-top:1px dashed #ccc}#loco.wrap table.diff tbody:first-child{border-top:none}#loco.wrap .revisions.loading .diff-meta{color:#eee}#loco.wrap .revisions.loading .loading-indicator span.spinner{visibility:visible;background:#fff url(../img/spin-modal.gif?v=2.
|
1 |
+
#loco.wrap .revisions-diff{padding:10px;min-height:20px}#loco.wrap table.diff{border-collapse:collapse}#loco.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.wrap table.diff td>span{color:#aaa}#loco.wrap table.diff td>span:after{content:". "}#loco.wrap table.diff tbody{border-top:1px dashed #ccc}#loco.wrap table.diff tbody:first-child{border-top:none}#loco.wrap .revisions.loading .diff-meta{color:#eee}#loco.wrap .revisions.loading .loading-indicator span.spinner{visibility:visible;background:#fff url(../img/spin-modal.gif?v=2.4.0) center center no-repeat}#loco.wrap .revisions-meta{clear:both;padding:10px 12px;margin:0;position:relative;top:10px}#loco.wrap .revisions-meta .diff-meta{clear:none;float:left;width:50%;padding:0;min-height:auto}#loco.wrap .revisions-meta .diff-meta button{margin-top:5px}#loco.wrap .revisions-meta .diff-meta-current{float:right;text-align:right}#loco.wrap .revisions-meta time{color:#72777c}#loco.wrap .revisions-control-frame{margin:10px 0}#loco.wrap .revisions-diff-frame{margin-top:20px}
|
pub/css/poview.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.js #loco.wrap .loco-loading{min-height:100px;background:#fff url(../img/spin-modal.gif?v=2.
|
1 |
+
.js #loco.wrap .loco-loading{min-height:100px;background:#fff url(../img/spin-modal.gif?v=2.4.0) center center no-repeat}.js #loco.wrap .loco-loading ol.msgcat{display:none}#loco.wrap #loco-po{padding-right:0;overflow:auto}#loco.wrap ol.msgcat{margin-left:3em;padding-top:1em;border-top:1px dashed #ccc}#loco.wrap ol.msgcat:first-child{padding-top:0;border-top:none}#loco.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.wrap ol.msgcat li>*{color:#333;white-space:pre}#loco.wrap ol.msgcat li>.po-comment{color:#3cc200}#loco.wrap ol.msgcat li>.po-refs{color:#0073aa}#loco.wrap ol.msgcat li>.po-refs a{color:inherit;text-decoration:none}#loco.wrap ol.msgcat li>.po-refs a:hover{text-decoration:underline}#loco.wrap ol.msgcat li>.po-flags{color:#77904a}#loco.wrap ol.msgcat li>.po-flags em{font-style:normal}#loco.wrap ol.msgcat li>.po-word{color:#000}#loco.wrap ol.msgcat li>.po-junk{font-style:italic;color:#ccc}#loco.wrap ol.msgcat li>.po-string>span{color:#c931c7}#loco.wrap form.loco-filter{top:0;right:0;position:absolute}#loco.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.wrap .loco-invalid ol.msgcat{list-style-type:none}#loco.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}.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)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/blue/spin-primary-button.gif?v=2.
|
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}.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)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/blue/spin-primary-button.gif?v=2.4.0) 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}.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)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/coffee/spin-primary-button.gif?v=2.
|
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}.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)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/coffee/spin-primary-button.gif?v=2.4.0) 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}.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)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/ectoplasm/spin-primary-button.gif?v=2.
|
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}.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)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/ectoplasm/spin-primary-button.gif?v=2.4.0) 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}.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)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/light/spin-primary-button.gif?v=2.
|
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}.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)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/light/spin-primary-button.gif?v=2.4.0) 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}.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)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/midnight/spin-primary-button.gif?v=2.
|
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}.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)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/midnight/spin-primary-button.gif?v=2.4.0) 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}.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)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/ocean/spin-primary-button.gif?v=2.
|
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}.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)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/ocean/spin-primary-button.gif?v=2.4.0) 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}.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)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/sunrise/spin-primary-button.gif?v=2.
|
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}.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)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/sunrise/spin-primary-button.gif?v=2.4.0) 0 0 no-repeat !important}
|
pub/font/loco.eot
CHANGED
Binary file
|
pub/font/loco.svg
CHANGED
@@ -105,7 +105,7 @@
|
|
105 |
<glyph unicode="" glyph-name="translate" d="M628.217 728.84h-81.381q-24.792 0-48.236-10.509t-37.457-27.217l-48.505 145.516h-154.678l-128.808-377.263h91.082l39.882 107.789h152.522v-215.579h-269.474q-44.194 0-75.992 31.798t-31.798 75.992v377.263q0 44.194 31.798 75.992t75.992 31.798h377.263q44.194 0 75.992-31.798t31.798-75.992v-107.789zM386.23 621.051h-108.867l53.895 157.912zM574.322 674.945h377.263q44.194 0 75.992-31.798t31.798-75.992v-377.263q0-44.194-31.798-75.992t-75.992-31.798h-377.263q-44.194 0-75.992 31.798t-31.798 75.992v377.263q0 44.194 31.798 75.992t75.992 31.798zM965.059 405.472v58.206h-170.846v116.952h-62.518v-116.952h-170.846v-58.206h68.985q4.851-35.571 22.636-73.297t46.349-67.907q-34.493-14.013-70.872-23.714t-53.625-9.701l2.695-14.013q2.695-14.013 5.659-33.415t2.425-31.259q33.415 0 82.998 17.516t93.777 44.463q44.733-26.947 95.394-44.463t84.615-17.516q-0.539 7.545 0.539 18.055t2.695 20.749 3.234 19.133 3.234 14.821l1.078 5.928q-17.785 0-55.512 9.971t-72.758 23.983q27.486 30.181 45.002 67.907t22.366 72.758h73.297zM759.72 301.455q-40.96 37.726-54.434 104.017h112.64q-14.013-66.829-53.895-104.017l-2.156-1.617q-1.617 1.078-2.156 1.617z" />
|
106 |
<glyph unicode="🐍" glyph-name="python" horiz-adv-x="896" d="M879.6 559c-15.4 61.8-44.6 108.4-106.8 108.4h-80.2v-94.8c0-73.6-62.4-135.6-133.6-135.6h-213.6c-58.4 0-106.8-50-106.8-108.6v-203.6c0-58 50.4-92 106.8-108.6 67.6-19.8 132.6-23.4 213.6 0 53.8 15.6 106.8 47 106.8 108.6v81.4h-213.4v27.2h320.4c62.2 0 85.2 43.4 106.8 108.4 22.4 67 21.4 131.4 0 217.2zM572.4 152c22.2 0 40.2-18.2 40.2-40.6 0-22.6-18-40.8-40.2-40.8-22 0-40.2 18.4-40.2 40.8 0.2 22.6 18.2 40.6 40.2 40.6zM335.6 463.8h213.6c59.4 0 106.8 49 106.8 108.6v203.8c0 58-48.8 101.4-106.8 111.2-71.6 11.8-149.4 11.2-213.6-0.2-90.4-16-106.8-49.4-106.8-111.2v-81.4h213.8v-27.2h-294c-62.2 0-116.6-37.4-133.6-108.4-19.6-81.4-20.4-132.2 0-217.2 15.2-63.2 51.4-108.4 113.6-108.4h73.4v97.6c0 70.6 61 132.8 133.6 132.8zM322.2 749c-22.2 0-40.2 18.2-40.2 40.6 0.2 22.6 18 40.8 40.2 40.8 22 0 40.2-18.4 40.2-40.8s-18-40.6-40.2-40.6z" />
|
107 |
<glyph unicode="🐦" glyph-name="twitter" horiz-adv-x="951" d="M925.714 717.714q-38.286-56-92.571-95.429 0.571-8 0.571-24 0-74.286-21.714-148.286t-66-142-105.429-120.286-147.429-83.429-184.571-31.143q-154.857 0-283.429 82.857 20-2.286 44.571-2.286 128.571 0 229.143 78.857-60 1.143-107.429 36.857t-65.143 91.143q18.857-2.857 34.857-2.857 24.571 0 48.571 6.286-64 13.143-106 63.714t-42 117.429v2.286q38.857-21.714 83.429-23.429-37.714 25.143-60 65.714t-22.286 88q0 50.286 25.143 93.143 69.143-85.143 168.286-136.286t212.286-56.857q-4.571 21.714-4.571 42.286 0 76.571 54 130.571t130.571 54q80 0 134.857-58.286 62.286 12 117.143 44.571-21.143-65.714-81.143-101.714 53.143 5.714 106.286 28.571z" />
|
108 |
-
<glyph unicode="🔍" glyph-name="magnify" d="M898.304 180.89l-193.485 193.485c29.184 47.872 45.978 104.192 45.978 164.352 0 174.95-151.603 326.502-326.554 326.502-174.95 0.051-316.723-141.773-316.723-316.723 0-174.899 151.603-326.502 326.502-326.502 58.214 0 112.64 15.821 159.488 43.213l194.509-194.611c19.046-18.995 49.92-18.995 68.915 0l48.282 48.282c18.995 18.995 12.083 43.008-6.912 62.003zM205.005 548.506c0 121.139 98.15 219.29 219.238 219.29 121.139 0 229.069-107.878 229.069-229.069 0-121.088-98.202-219.29-219.29-219.29-121.139 0.051-229.018 107.981-229.018 229.069z" />
|
109 |
<glyph unicode="🗌" glyph-name="ok-empty" d="M397.434 42.304l-397.868 391.6 197.378 194.27 200.49-197.332 429.62 422.852 197.378-194.27-626.998-617.12zM107.912 433.904l289.524-284.962 518.656 510.482-89.036 87.632-429.62-422.852-200.49 197.334-89.034-87.634z" />
|
110 |
<glyph unicode="🛡" glyph-name="privacy" horiz-adv-x="731" d="M0 402.286v438.857q0 14.857 10.857 25.714t25.714 10.857h658.286q14.857 0 25.714-10.857t10.857-25.714v-438.857q0-49.143-19.143-97.429t-47.429-85.714-67.429-72.857-72.286-58.857-69.143-44.286-51.143-28.286-24.286-11.429q-6.857-3.429-14.857-3.429t-14.857 3.429q-9.143 4-24.286 11.429t-51.143 28.286-69.143 44.286-72.286 58.857-67.429 72.857-47.429 85.714-19.143 97.429zM365.714 118.286q68 36 121.714 78.286 134.286 105.143 134.286 205.714v365.714h-256v-649.714z" />
|
|
|
111 |
</font></defs></svg>
|
105 |
<glyph unicode="" glyph-name="translate" d="M628.217 728.84h-81.381q-24.792 0-48.236-10.509t-37.457-27.217l-48.505 145.516h-154.678l-128.808-377.263h91.082l39.882 107.789h152.522v-215.579h-269.474q-44.194 0-75.992 31.798t-31.798 75.992v377.263q0 44.194 31.798 75.992t75.992 31.798h377.263q44.194 0 75.992-31.798t31.798-75.992v-107.789zM386.23 621.051h-108.867l53.895 157.912zM574.322 674.945h377.263q44.194 0 75.992-31.798t31.798-75.992v-377.263q0-44.194-31.798-75.992t-75.992-31.798h-377.263q-44.194 0-75.992 31.798t-31.798 75.992v377.263q0 44.194 31.798 75.992t75.992 31.798zM965.059 405.472v58.206h-170.846v116.952h-62.518v-116.952h-170.846v-58.206h68.985q4.851-35.571 22.636-73.297t46.349-67.907q-34.493-14.013-70.872-23.714t-53.625-9.701l2.695-14.013q2.695-14.013 5.659-33.415t2.425-31.259q33.415 0 82.998 17.516t93.777 44.463q44.733-26.947 95.394-44.463t84.615-17.516q-0.539 7.545 0.539 18.055t2.695 20.749 3.234 19.133 3.234 14.821l1.078 5.928q-17.785 0-55.512 9.971t-72.758 23.983q27.486 30.181 45.002 67.907t22.366 72.758h73.297zM759.72 301.455q-40.96 37.726-54.434 104.017h112.64q-14.013-66.829-53.895-104.017l-2.156-1.617q-1.617 1.078-2.156 1.617z" />
|
106 |
<glyph unicode="🐍" glyph-name="python" horiz-adv-x="896" d="M879.6 559c-15.4 61.8-44.6 108.4-106.8 108.4h-80.2v-94.8c0-73.6-62.4-135.6-133.6-135.6h-213.6c-58.4 0-106.8-50-106.8-108.6v-203.6c0-58 50.4-92 106.8-108.6 67.6-19.8 132.6-23.4 213.6 0 53.8 15.6 106.8 47 106.8 108.6v81.4h-213.4v27.2h320.4c62.2 0 85.2 43.4 106.8 108.4 22.4 67 21.4 131.4 0 217.2zM572.4 152c22.2 0 40.2-18.2 40.2-40.6 0-22.6-18-40.8-40.2-40.8-22 0-40.2 18.4-40.2 40.8 0.2 22.6 18.2 40.6 40.2 40.6zM335.6 463.8h213.6c59.4 0 106.8 49 106.8 108.6v203.8c0 58-48.8 101.4-106.8 111.2-71.6 11.8-149.4 11.2-213.6-0.2-90.4-16-106.8-49.4-106.8-111.2v-81.4h213.8v-27.2h-294c-62.2 0-116.6-37.4-133.6-108.4-19.6-81.4-20.4-132.2 0-217.2 15.2-63.2 51.4-108.4 113.6-108.4h73.4v97.6c0 70.6 61 132.8 133.6 132.8zM322.2 749c-22.2 0-40.2 18.2-40.2 40.6 0.2 22.6 18 40.8 40.2 40.8 22 0 40.2-18.4 40.2-40.8s-18-40.6-40.2-40.6z" />
|
107 |
<glyph unicode="🐦" glyph-name="twitter" horiz-adv-x="951" d="M925.714 717.714q-38.286-56-92.571-95.429 0.571-8 0.571-24 0-74.286-21.714-148.286t-66-142-105.429-120.286-147.429-83.429-184.571-31.143q-154.857 0-283.429 82.857 20-2.286 44.571-2.286 128.571 0 229.143 78.857-60 1.143-107.429 36.857t-65.143 91.143q18.857-2.857 34.857-2.857 24.571 0 48.571 6.286-64 13.143-106 63.714t-42 117.429v2.286q38.857-21.714 83.429-23.429-37.714 25.143-60 65.714t-22.286 88q0 50.286 25.143 93.143 69.143-85.143 168.286-136.286t212.286-56.857q-4.571 21.714-4.571 42.286 0 76.571 54 130.571t130.571 54q80 0 134.857-58.286 62.286 12 117.143 44.571-21.143-65.714-81.143-101.714 53.143 5.714 106.286 28.571z" />
|
|
|
108 |
<glyph unicode="🗌" glyph-name="ok-empty" d="M397.434 42.304l-397.868 391.6 197.378 194.27 200.49-197.332 429.62 422.852 197.378-194.27-626.998-617.12zM107.912 433.904l289.524-284.962 518.656 510.482-89.036 87.632-429.62-422.852-200.49 197.334-89.034-87.634z" />
|
109 |
<glyph unicode="🛡" glyph-name="privacy" horiz-adv-x="731" d="M0 402.286v438.857q0 14.857 10.857 25.714t25.714 10.857h658.286q14.857 0 25.714-10.857t10.857-25.714v-438.857q0-49.143-19.143-97.429t-47.429-85.714-67.429-72.857-72.286-58.857-69.143-44.286-51.143-28.286-24.286-11.429q-6.857-3.429-14.857-3.429t-14.857 3.429q-9.143 4-24.286 11.429t-51.143 28.286-69.143 44.286-72.286 58.857-67.429 72.857-47.429 85.714-19.143 97.429zM365.714 118.286q68 36 121.714 78.286 134.286 105.143 134.286 205.714v365.714h-256v-649.714z" />
|
110 |
+
<glyph unicode="🤖" glyph-name="robot" horiz-adv-x="1280" d="M64 502.857h64v-384h-64c-0.023 0-0.050 0-0.077 0-35.304 0-63.923 28.619-63.923 63.923 0 0.027 0 0.054 0 0.081v-0.004 256c0 0.023 0 0.050 0 0.077 0 35.304 28.619 63.923 63.923 63.923 0.027 0 0.054 0 0.081 0h-0.004zM1088 598.857v-544c-0.072-70.664-57.337-127.928-127.993-128h-640.007c-70.664 0.072-127.928 57.337-128 127.993v544.007c0 0.015 0 0.034 0 0.052 0 88.337 71.611 159.948 159.948 159.948 0.018 0 0.037 0 0.055 0h223.997v128c0 35.346 28.654 64 64 64s64-28.654 64-64v0-128h224c0.015 0 0.034 0 0.052 0 88.337 0 159.948-71.611 159.948-159.948 0-0.018 0-0.037 0-0.055v0.003zM528 438.857c0 44.183-35.817 80-80 80s-80-35.817-80-80c0-44.183 35.817-80 80-80v0c0.002 0 0.004 0 0.006 0 44.179 0 79.994 35.815 79.994 79.994 0 0.002 0 0.004 0 0.006v0zM512 182.857h-128v-64h128zM704 182.857h-128v-64h128zM912 438.857c0 44.183-35.817 80-80 80s-80-35.817-80-80c0-44.183 35.817-80 80-80v0c0.002 0 0.004 0 0.006 0 44.179 0 79.994 35.815 79.994 79.994 0 0.002 0 0.004 0 0.006v0zM896 182.857h-128v-64h128zM1280 438.857v-256c0-0.023 0-0.050 0-0.077 0-35.304-28.619-63.923-63.923-63.923-0.027 0-0.054 0-0.081 0h-63.996v384h64c0.023 0 0.050 0 0.077 0 35.304 0 63.923-28.619 63.923-63.923 0-0.027 0-0.054 0-0.081v0.004z" />
|
111 |
</font></defs></svg>
|
pub/font/loco.ttf
CHANGED
Binary file
|
pub/font/loco.woff
CHANGED
Binary file
|
pub/img/api/google.png
ADDED
Binary file
|
pub/img/api/microsoft.png
ADDED
Binary file
|
pub/js/config.js
DELETED
@@ -1,83 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Script for bundle configuration screen
|
3 |
-
*/
|
4 |
-
!function( window, document, $ ){
|
5 |
-
|
6 |
-
|
7 |
-
// utility for scrolling
|
8 |
-
function elementTop( el, ancestor ){
|
9 |
-
var y = el.offsetTop;
|
10 |
-
while( ( el = el.offsetParent ) && el !== ancestor ){
|
11 |
-
y += el.offsetTop;
|
12 |
-
}
|
13 |
-
return y;
|
14 |
-
}
|
15 |
-
|
16 |
-
|
17 |
-
// form duplicator for adding another project
|
18 |
-
function addProject(){
|
19 |
-
|
20 |
-
var $divs = $('#loco-conf > div'),
|
21 |
-
$copy = $divs.eq(0).clone(),
|
22 |
-
index = $divs.length,
|
23 |
-
id = 'loco-conf-'+index,
|
24 |
-
ns = '['+index+']'
|
25 |
-
;
|
26 |
-
|
27 |
-
function clearField( i, input ){
|
28 |
-
var name = input.name.replace('[0]',ns);
|
29 |
-
$(input).attr('name', name ).val('');
|
30 |
-
}
|
31 |
-
|
32 |
-
$copy.attr('id', 'loco-conf-'+index );
|
33 |
-
$copy.find('input').each( clearField );
|
34 |
-
$copy.find('textarea').each( clearField );
|
35 |
-
//$copy.find('div.notice').remove();
|
36 |
-
|
37 |
-
// TODO translations of this:
|
38 |
-
$copy.find('h2').eq(0).html('New set <span>(untitled)</span>');
|
39 |
-
|
40 |
-
$copy.insertBefore('#loco-form-foot');
|
41 |
-
|
42 |
-
createClickRemove( $copy.find('a.icon-del'), index );
|
43 |
-
|
44 |
-
// scroll to $copy
|
45 |
-
$copy.hide().slideDown( 500 );
|
46 |
-
$('html, body').animate( { scrollTop: elementTop($copy[0]) }, 500 );
|
47 |
-
}
|
48 |
-
|
49 |
-
|
50 |
-
function createClickRemove( $el, index ){
|
51 |
-
return $el.click( function(event){
|
52 |
-
event.preventDefault();
|
53 |
-
delProject( index );
|
54 |
-
return false;
|
55 |
-
} );
|
56 |
-
}
|
57 |
-
|
58 |
-
|
59 |
-
// remove whole set from form
|
60 |
-
function delProject( index ){
|
61 |
-
var $div = $('#loco-conf-'+index),
|
62 |
-
$fld = $div.find('input[name="conf['+index+'][removed]"]')
|
63 |
-
;
|
64 |
-
// setting removed flag saves having to re-index all sets. back end will ignore it.
|
65 |
-
$fld.val('1');
|
66 |
-
$div.slideUp( 500, function(){ $(this).hide().find('table').remove(); } );
|
67 |
-
}
|
68 |
-
|
69 |
-
|
70 |
-
// enable project removal from initial blocks
|
71 |
-
$('#loco-conf > div').each( function( index, div ){
|
72 |
-
createClickRemove( $(div).find('a.icon-del'), index );
|
73 |
-
} );
|
74 |
-
|
75 |
-
// enable project addition via button in footer
|
76 |
-
$('#loco-add-butt').attr('disabled',false).click( function(event){
|
77 |
-
event.preventDefault();
|
78 |
-
addProject();
|
79 |
-
return false;
|
80 |
-
} );
|
81 |
-
|
82 |
-
|
83 |
-
}( window, document, jQuery );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pub/js/debug.js
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Run Javascript diagnostics
|
3 |
-
*/
|
4 |
-
!function( loco, $ ){
|
5 |
-
|
6 |
-
// check tick symbol is readable by JavaScript as UTF-8
|
7 |
-
// E2\x9C\x93 => 0x2713
|
8 |
-
var span = $('#loco-utf8-check'),
|
9 |
-
tick = span[0].textContent
|
10 |
-
;
|
11 |
-
if( 1 !== tick.length || 0x2713 !== tick.charCodeAt(0) ){
|
12 |
-
loco.notices.warn("This page has a problem rendering UTF-8").stick();
|
13 |
-
}
|
14 |
-
|
15 |
-
// show custom endpoint if set in global
|
16 |
-
if( window.ajaxurl ){
|
17 |
-
$('#loco-ajax-url').text( window.ajaxurl );
|
18 |
-
}
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
// check UTF-8 passes to Ajax and back without a problem
|
23 |
-
|
24 |
-
function onAjaxTestPass( data, status, xhr ){
|
25 |
-
if( data && data.ping ){
|
26 |
-
$('#loco-ajax-check').text( data.ping );
|
27 |
-
}
|
28 |
-
else {
|
29 |
-
onAjaxTestFail( xhr, status, data && data.error && data.error.message );
|
30 |
-
}
|
31 |
-
}
|
32 |
-
|
33 |
-
function onAjaxTestFail( xhr, error, message ){
|
34 |
-
if( 'success' !== error ){
|
35 |
-
message = loco.ajax.parse( loco.ajax.strip( xhr.responseText ) );
|
36 |
-
}
|
37 |
-
$('#loco-ajax-check').text( 'FAILED: '+message ).addClass('loco-danger');
|
38 |
-
}
|
39 |
-
|
40 |
-
loco.ajax.post( 'ping', {echo:'\u039F\u039A \u2713'}, onAjaxTestPass, onAjaxTestFail );
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
}( window.locoScope, window.jQuery );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pub/js/delete.js
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Script for file delete operation
|
3 |
-
*/
|
4 |
-
!function( window, document, $ ){
|
5 |
-
|
6 |
-
var fsHook = document.getElementById('loco-fs'),
|
7 |
-
elForm = document.getElementById('loco-del')
|
8 |
-
;
|
9 |
-
if( fsHook && elForm ){
|
10 |
-
window.locoScope.fs.init(fsHook).setForm(elForm);
|
11 |
-
}
|
12 |
-
|
13 |
-
}( window, document, jQuery );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pub/js/editor.js
DELETED
@@ -1,586 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Script for PO file editor pages
|
3 |
-
*/
|
4 |
-
!function( window, $ ){
|
5 |
-
|
6 |
-
var loco = window.locoScope,
|
7 |
-
conf = window.locoConf,
|
8 |
-
|
9 |
-
syncParams = null,
|
10 |
-
saveParams = null,
|
11 |
-
ajaxUpload = conf.multipart,
|
12 |
-
|
13 |
-
// UI translation
|
14 |
-
translator = loco.l10n,
|
15 |
-
sprintf = loco.string.sprintf,
|
16 |
-
|
17 |
-
// PO file data
|
18 |
-
locale = conf.locale,
|
19 |
-
messages = loco.po.init( locale ).wrap( conf.powrap ),
|
20 |
-
template = ! locale,
|
21 |
-
|
22 |
-
// form containing action buttons
|
23 |
-
elForm = document.getElementById('loco-actions'),
|
24 |
-
filePath = conf.popath,
|
25 |
-
syncPath = conf.potpath,
|
26 |
-
|
27 |
-
// file system connect when file is locked
|
28 |
-
elFilesys = document.getElementById('loco-fs'),
|
29 |
-
fsConnect = elFilesys && loco.fs.init( elFilesys ),
|
30 |
-
|
31 |
-
// prevent all write operations if readonly mode
|
32 |
-
readonly = conf.readonly,
|
33 |
-
editable = ! readonly,
|
34 |
-
|
35 |
-
// Editor components
|
36 |
-
editor,
|
37 |
-
saveButton,
|
38 |
-
innerDiv = document.getElementById('loco-editor-inner')
|
39 |
-
;
|
40 |
-
|
41 |
-
|
42 |
-
// warn if ajax uploads are enabled but not supported
|
43 |
-
if( ajaxUpload && ! ( window.FormData && window.Blob ) ){
|
44 |
-
ajaxUpload = false;
|
45 |
-
loco.notices.warn("Your browser doesn't support Ajax file uploads. Falling back to standard postdata");
|
46 |
-
}
|
47 |
-
|
48 |
-
|
49 |
-
/**
|
50 |
-
*
|
51 |
-
*/
|
52 |
-
function doSyncAction( callback ){
|
53 |
-
function onSuccess( result ){
|
54 |
-
var info = [],
|
55 |
-
doc = messages,
|
56 |
-
exp = result.po,
|
57 |
-
src = result.pot,
|
58 |
-
pot = loco.po.init().load( exp ),
|
59 |
-
done = doc.merge( pot ),
|
60 |
-
nadd = done.add.length,
|
61 |
-
ndel = done.del.length,
|
62 |
-
t = translator;
|
63 |
-
// reload even if unchanged, cos indexes could be off
|
64 |
-
editor.load( doc );
|
65 |
-
// Show summary
|
66 |
-
if( nadd || ndel ){
|
67 |
-
if( src ){
|
68 |
-
// Translators: Where %s is the name of the POT template file. Message appears after sync
|
69 |
-
info.push( sprintf( t._('Merged from %s'), src ) );
|
70 |
-
}
|
71 |
-
else {
|
72 |
-
// Translators: Message appears after sync operation
|
73 |
-
info.push( t._('Merged from source code') );
|
74 |
-
}
|
75 |
-
// Translators: Summary of new strings after running in-editor Sync
|
76 |
-
nadd && info.push( sprintf( t._n('1 new string added','%s new strings added', nadd ), nadd ) );
|
77 |
-
// Translators: Summary of existing strings that no longer exist after running in-editor Sync
|
78 |
-
ndel && info.push( sprintf( t._n('1 obsolete string removed','%s obsolete strings removed', ndel ), ndel ) );
|
79 |
-
// editor thinks it's saved, but we want the UI to appear otherwise
|
80 |
-
$(innerDiv).trigger('poUnsaved',[]);
|
81 |
-
updateStatus();
|
82 |
-
// debug info in lieu of proper merge confirmation:
|
83 |
-
window.console && debugMerge( console, done );
|
84 |
-
}
|
85 |
-
else if( src ){
|
86 |
-
// Translators: Message appears after sync operation when nothing has changed. %s refers to a POT file.
|
87 |
-
info.push( sprintf( t._('Already up to date with %s'), src ) );
|
88 |
-
}
|
89 |
-
else {
|
90 |
-
// Translators: Message appears after sync operation when nothing has changed
|
91 |
-
info.push( t._('Already up to date with source code') );
|
92 |
-
}
|
93 |
-
loco.notices.success( info.join('. ') );
|
94 |
-
$(innerDiv).trigger('poMerge',[result]);
|
95 |
-
// done sync
|
96 |
-
callback && callback();
|
97 |
-
}
|
98 |
-
loco.ajax.post( 'sync', syncParams, onSuccess, callback );
|
99 |
-
}
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
function debugMerge( console, result ){
|
104 |
-
var i = -1, t = result.add.length;
|
105 |
-
while( ++i < t ){
|
106 |
-
console.log(' + '+result.add[i].source() );
|
107 |
-
}
|
108 |
-
i = -1, t = result.del.length;
|
109 |
-
while( ++i < t ){
|
110 |
-
console.log(' - '+result.del[i].source() );
|
111 |
-
}
|
112 |
-
}
|
113 |
-
|
114 |
-
|
115 |
-
/**
|
116 |
-
* @param params {Object}
|
117 |
-
* @return FormData
|
118 |
-
*/
|
119 |
-
function initMultiPart( params ){
|
120 |
-
var p, data = new FormData;
|
121 |
-
for( p in params ){
|
122 |
-
if( params.hasOwnProperty(p) ) {
|
123 |
-
data.append(p, params[p]);
|
124 |
-
}
|
125 |
-
}
|
126 |
-
return data;
|
127 |
-
}
|
128 |
-
|
129 |
-
|
130 |
-
/**
|
131 |
-
* Post full editor contents to "posave" endpoint
|
132 |
-
*/
|
133 |
-
function doSaveAction( callback ){
|
134 |
-
function onSuccess( result ){
|
135 |
-
callback && callback();
|
136 |
-
editor.save( true );
|
137 |
-
// Update saved time update
|
138 |
-
$('#loco-po-modified').text( result.datetime||'[datetime error]' );
|
139 |
-
}
|
140 |
-
var postData = $.extend( {locale:String(messages.locale()||'')}, saveParams||{} );
|
141 |
-
if( fsConnect ){
|
142 |
-
fsConnect.applyCreds(postData);
|
143 |
-
}
|
144 |
-
// submit PO as concrete file if configured
|
145 |
-
if( ajaxUpload ){
|
146 |
-
postData = initMultiPart(postData);
|
147 |
-
postData.append('po', new Blob([String(messages)],{type:'application/x-gettext'}), String(postData.path).split('/').pop()||'untitled.po' );
|
148 |
-
}
|
149 |
-
else {
|
150 |
-
postData.data = String(messages);
|
151 |
-
}
|
152 |
-
loco.ajax.post( 'save', postData, onSuccess, callback );
|
153 |
-
}
|
154 |
-
|
155 |
-
|
156 |
-
function saveIfDirty(){
|
157 |
-
editor.dirty && doSaveAction();
|
158 |
-
}
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
function onUnloadWarning(){
|
163 |
-
// Translators: Warning appears when user tries to refresh or navigate away when editor work is unsaved
|
164 |
-
return translator._("Your changes will be lost if you continue without saving");
|
165 |
-
}
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
function registerSaveButton( button ){
|
170 |
-
saveButton = button;
|
171 |
-
// enables and disable according to save/unsave events
|
172 |
-
editor
|
173 |
-
.on('poUnsaved', function(){
|
174 |
-
enable();
|
175 |
-
$(button).addClass( 'button-primary loco-flagged' );
|
176 |
-
} )
|
177 |
-
.on('poSave', function(){
|
178 |
-
disable();
|
179 |
-
$(button).removeClass( 'button-primary loco-flagged' );
|
180 |
-
} )
|
181 |
-
;
|
182 |
-
function disable(){
|
183 |
-
button.disabled = true;
|
184 |
-
}
|
185 |
-
function enable(){
|
186 |
-
button.disabled = false;
|
187 |
-
}
|
188 |
-
function think(){
|
189 |
-
disable();
|
190 |
-
$(button).addClass('loco-loading');
|
191 |
-
}
|
192 |
-
function unthink(){
|
193 |
-
enable();
|
194 |
-
$(button).removeClass('loco-loading');
|
195 |
-
}
|
196 |
-
saveParams = $.extend( { path: filePath }, conf.project||{} );
|
197 |
-
|
198 |
-
$(button).click( function(event){
|
199 |
-
event.preventDefault();
|
200 |
-
think();
|
201 |
-
doSaveAction( unthink );
|
202 |
-
return false;
|
203 |
-
} );
|
204 |
-
return true;
|
205 |
-
};
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
function registerSyncButton( button ){
|
210 |
-
var project = conf.project;
|
211 |
-
if( project ){
|
212 |
-
function disable(){
|
213 |
-
button.disabled = true;
|
214 |
-
}
|
215 |
-
function enable(){
|
216 |
-
button.disabled = false;
|
217 |
-
}
|
218 |
-
function think(){
|
219 |
-
disable();
|
220 |
-
$(button).addClass('loco-loading');
|
221 |
-
}
|
222 |
-
function unthink(){
|
223 |
-
enable();
|
224 |
-
$(button).removeClass('loco-loading');
|
225 |
-
}
|
226 |
-
// Only permit sync when document is saved
|
227 |
-
editor
|
228 |
-
.on('poUnsaved', function(){
|
229 |
-
disable();
|
230 |
-
} )
|
231 |
-
.on('poSave', function(){
|
232 |
-
enable();
|
233 |
-
} )
|
234 |
-
;
|
235 |
-
// params for sync end point
|
236 |
-
syncParams = {
|
237 |
-
bundle: project.bundle,
|
238 |
-
domain: project.domain,
|
239 |
-
type: template ? 'pot' : 'po',
|
240 |
-
sync: syncPath||''
|
241 |
-
};
|
242 |
-
// enable syncing on button click
|
243 |
-
$(button)
|
244 |
-
.click( function(event){
|
245 |
-
event.preventDefault();
|
246 |
-
think();
|
247 |
-
doSyncAction( unthink );
|
248 |
-
return false;
|
249 |
-
} )
|
250 |
-
//.attr('title', syncPath ? sprintf( translator._('Update from %s'), syncPath ) : translator._('Update from source code') )
|
251 |
-
;
|
252 |
-
enable();
|
253 |
-
}
|
254 |
-
return true;
|
255 |
-
}
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
function registerFuzzyButton( button ){
|
260 |
-
var toggled = false,
|
261 |
-
enabled = false
|
262 |
-
;
|
263 |
-
function redraw( message, state ){
|
264 |
-
// fuzziness only makes sense when top-level string is translated
|
265 |
-
var allowed = message && message.translated(0) || false;
|
266 |
-
if( enabled !== allowed ){
|
267 |
-
button.disabled = ! allowed;
|
268 |
-
enabled = allowed;
|
269 |
-
}
|
270 |
-
// toggle on/off according to new fuzziness
|
271 |
-
if( state !== toggled ){
|
272 |
-
$(button)[ state ? 'addClass' : 'removeClass' ]('inverted');
|
273 |
-
toggled = state;
|
274 |
-
}
|
275 |
-
}
|
276 |
-
// state changes depending on whether an asset is selected and is fuzzy
|
277 |
-
editor
|
278 |
-
.on('poSelected', function( event, message ){
|
279 |
-
redraw( message, message && message.fuzzy() || false );
|
280 |
-
} )
|
281 |
-
.on( 'poEmpty', function( event, blank, message, pluralIndex ){
|
282 |
-
if( 0 === pluralIndex && blank === enabled ){
|
283 |
-
redraw( message, toggled );
|
284 |
-
}
|
285 |
-
} )
|
286 |
-
.on( 'poFuzzy', function( event, message, newState ){
|
287 |
-
redraw( message, newState );
|
288 |
-
} )
|
289 |
-
;
|
290 |
-
// click toggles current state
|
291 |
-
$(button).click( function( event ){
|
292 |
-
event.preventDefault();
|
293 |
-
editor.fuzzy( ! editor.fuzzy() );
|
294 |
-
return false;
|
295 |
-
} );
|
296 |
-
return true;
|
297 |
-
};
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
function registerRevertButton( button ){
|
302 |
-
// No need for revert when document is saved
|
303 |
-
editor
|
304 |
-
.on('poUnsaved', function(){
|
305 |
-
button.disabled = false;
|
306 |
-
} )
|
307 |
-
.on('poSave', function(){
|
308 |
-
button.disabled = true;
|
309 |
-
} )
|
310 |
-
;
|
311 |
-
// handling unsaved state prompt with onbeforeunload, see below
|
312 |
-
$(button).click( function( event ){
|
313 |
-
event.preventDefault();
|
314 |
-
location.reload();
|
315 |
-
return false;
|
316 |
-
} );
|
317 |
-
return true;
|
318 |
-
};
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
function registerInvisiblesButton( button ){
|
323 |
-
var $button = $(button);
|
324 |
-
button.disabled = false;
|
325 |
-
editor.on('poInvs', function( event, state ){
|
326 |
-
$button[ state ? 'addClass' : 'removeClass' ]('inverted');
|
327 |
-
});
|
328 |
-
$button.click( function( event ){
|
329 |
-
event.preventDefault();
|
330 |
-
editor.setInvs( ! editor.getInvs() );
|
331 |
-
return false;
|
332 |
-
} );
|
333 |
-
locoScope.tooltip.init($button);
|
334 |
-
return true;
|
335 |
-
}
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
function registerCodeviewButton( button ){
|
340 |
-
var $button = $(button);
|
341 |
-
button.disabled = false;
|
342 |
-
$button.click( function(event){
|
343 |
-
event.preventDefault();
|
344 |
-
var state = ! editor.getMono();
|
345 |
-
editor.setMono( state );
|
346 |
-
$button[ state ? 'addClass' : 'removeClass' ]('inverted');
|
347 |
-
return false;
|
348 |
-
} );
|
349 |
-
locoScope.tooltip.init($button);
|
350 |
-
return true;
|
351 |
-
};
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
function registerAddButton( button ){
|
356 |
-
button.disabled = false;
|
357 |
-
$(button).click( function( event ){
|
358 |
-
event.preventDefault();
|
359 |
-
// Need a placeholder guaranteed to be unique for new items
|
360 |
-
var i = 1, baseid, msgid, regex = /(\d+)$/;
|
361 |
-
msgid = baseid = 'New message';
|
362 |
-
while( messages.get( msgid ) ){
|
363 |
-
i = regex.exec(msgid) ? Math.max(i,RegExp.$1) : i;
|
364 |
-
msgid = baseid+' '+( ++i );
|
365 |
-
}
|
366 |
-
editor.add( msgid );
|
367 |
-
return false;
|
368 |
-
} );
|
369 |
-
return true;
|
370 |
-
};
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
function registerDelButton( button ){
|
375 |
-
button.disabled = false;
|
376 |
-
$(button).click( function(event){
|
377 |
-
event.preventDefault();
|
378 |
-
editor.del();
|
379 |
-
return false;
|
380 |
-
} );
|
381 |
-
return true;
|
382 |
-
};
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
function registerDownloadButton( button, id ){
|
387 |
-
button.disabled = false;
|
388 |
-
$(button).click( function( event ){
|
389 |
-
var form = button.form,
|
390 |
-
path = filePath;
|
391 |
-
// swap out path
|
392 |
-
if( 'binary' === id ){
|
393 |
-
path = path.replace(/\.po$/,'.mo');
|
394 |
-
}
|
395 |
-
form.path.value = path;
|
396 |
-
form.source.value = messages.toString();
|
397 |
-
// allow form to submit
|
398 |
-
return true;
|
399 |
-
} );
|
400 |
-
return true;
|
401 |
-
}
|
402 |
-
|
403 |
-
|
404 |
-
// event handler that stops dead
|
405 |
-
function noop( event ){
|
406 |
-
event.preventDefault();
|
407 |
-
return false;
|
408 |
-
}
|
409 |
-
|
410 |
-
|
411 |
-
/*/ dummy function for enabling buttons that do nothing (or do something inherently)
|
412 |
-
function registerNoopButton( button ){
|
413 |
-
return true;
|
414 |
-
}*/
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
/**
|
419 |
-
* Update status message above editor.
|
420 |
-
* This is dynamic version of PHP Loco_gettext_Metadata::getProgressSummary
|
421 |
-
* TODO implement progress bar, not just text.
|
422 |
-
*/
|
423 |
-
function updateStatus(){
|
424 |
-
var t = translator,
|
425 |
-
stats = editor.stats(),
|
426 |
-
total = stats.t,
|
427 |
-
fuzzy = stats.f,
|
428 |
-
empty = stats.u,
|
429 |
-
// Translators: Shows total string count at top of editor
|
430 |
-
stext = sprintf( t._n('1 string','%s strings',total ), total.format(0) ),
|
431 |
-
extra = [];
|
432 |
-
if( locale ){
|
433 |
-
// Translators: Shows percentage translated at top of editor
|
434 |
-
stext = sprintf( t._('%s%% translated'), stats.p.replace('%','') ) +', '+ stext;
|
435 |
-
// Translators: Shows number of fuzzy strings at top of editor
|
436 |
-
fuzzy && extra.push( sprintf( t._('%s fuzzy'), fuzzy.format(0) ) );
|
437 |
-
// Translators: Shows number of untranslated strings at top of editor
|
438 |
-
empty && extra.push( sprintf( t._('%s untranslated'), empty.format(0) ) );
|
439 |
-
if( extra.length ){
|
440 |
-
stext += ' ('+extra.join(', ')+')';
|
441 |
-
}
|
442 |
-
}
|
443 |
-
$('#loco-po-status').text( stext );
|
444 |
-
}
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
/**
|
449 |
-
* Enable text filtering
|
450 |
-
*/
|
451 |
-
function initSearchFilter( elSearch ){
|
452 |
-
editor.searchable( loco.fulltext.init() );
|
453 |
-
// prep search text field
|
454 |
-
elSearch.disabled = false;
|
455 |
-
elSearch.value = '';
|
456 |
-
function showValidFilter( numFound ){
|
457 |
-
$(elSearch.parentNode)[ numFound || null == numFound ? 'removeClass' : 'addClass' ]('invalid');
|
458 |
-
}
|
459 |
-
var listener = loco.watchtext( elSearch, function( value ){
|
460 |
-
var numFound = editor.filter( value, true );
|
461 |
-
showValidFilter( numFound );
|
462 |
-
} );
|
463 |
-
editor
|
464 |
-
.on( 'poFilter', function( event, value, numFound ){
|
465 |
-
listener.val( value||'' );
|
466 |
-
showValidFilter( numFound );
|
467 |
-
} )
|
468 |
-
.on( 'poMerge', function( event, result ){
|
469 |
-
var value = listener.val();
|
470 |
-
value && editor.filter( value );
|
471 |
-
} )
|
472 |
-
;
|
473 |
-
}
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
// resize function fits editor to screen, accounting for headroom and touching bottom of screen.
|
478 |
-
var resize = function(){
|
479 |
-
function top( el, ancestor ){
|
480 |
-
var y = el.offsetTop||0;
|
481 |
-
while( ( el = el.offsetParent ) && el !== ancestor ){
|
482 |
-
y += el.offsetTop||0;
|
483 |
-
}
|
484 |
-
return y;
|
485 |
-
}
|
486 |
-
var fixHeight,
|
487 |
-
minHeight = parseInt($(innerDiv).css('min-height')||0)
|
488 |
-
;
|
489 |
-
return function(){
|
490 |
-
var padBottom = 20,
|
491 |
-
topBanner = top( innerDiv, document.body ),
|
492 |
-
winHeight = window.innerHeight,
|
493 |
-
setHeight = Math.max( minHeight, winHeight - topBanner - padBottom )
|
494 |
-
;
|
495 |
-
if( fixHeight !== setHeight ){
|
496 |
-
innerDiv.style.height = String(setHeight)+'px';
|
497 |
-
fixHeight = setHeight;
|
498 |
-
}
|
499 |
-
};
|
500 |
-
}();
|
501 |
-
|
502 |
-
// ensure outer resize is handled before editor's internal resize
|
503 |
-
resize();
|
504 |
-
$(window).resize( resize );
|
505 |
-
|
506 |
-
// initialize editor
|
507 |
-
innerDiv.innerHTML = '';
|
508 |
-
editor = loco.po.ed
|
509 |
-
.init( innerDiv )
|
510 |
-
.localise( translator )
|
511 |
-
;
|
512 |
-
loco.po.kbd
|
513 |
-
.init( editor )
|
514 |
-
.add( 'save', saveIfDirty )
|
515 |
-
.enable('copy','clear','enter','next','prev','fuzzy','save','invis')
|
516 |
-
;
|
517 |
-
|
518 |
-
// initialize toolbar button actions
|
519 |
-
var buttons = {
|
520 |
-
// help: registerNoopButton,
|
521 |
-
save: editable && registerSaveButton,
|
522 |
-
sync: editable && registerSyncButton,
|
523 |
-
revert: registerRevertButton,
|
524 |
-
// editor mode togglers
|
525 |
-
invs: registerInvisiblesButton,
|
526 |
-
code: registerCodeviewButton,
|
527 |
-
// downloads / post-throughs
|
528 |
-
source: registerDownloadButton,
|
529 |
-
binary: template ? null : registerDownloadButton
|
530 |
-
};
|
531 |
-
// POT only
|
532 |
-
if( template ){
|
533 |
-
buttons.add = editable && registerAddButton;
|
534 |
-
buttons.del = editable && registerDelButton;
|
535 |
-
}
|
536 |
-
// PO only
|
537 |
-
else {
|
538 |
-
buttons.fuzzy = registerFuzzyButton;
|
539 |
-
};
|
540 |
-
$('#loco-toolbar').find('button').each( function(i,el){
|
541 |
-
var id = el.getAttribute('data-loco'), register = buttons[id];
|
542 |
-
register && register(el,id) || $(el).hide();
|
543 |
-
} );
|
544 |
-
|
545 |
-
// disable submit on dummy form
|
546 |
-
$(elForm).submit( noop );
|
547 |
-
|
548 |
-
// enable text filtering
|
549 |
-
initSearchFilter( document.getElementById('loco-search') );
|
550 |
-
|
551 |
-
// editor event behaviours
|
552 |
-
editor
|
553 |
-
.on('poUnsaved', function(){
|
554 |
-
window.onbeforeunload = onUnloadWarning;
|
555 |
-
} )
|
556 |
-
.on('poSave', function(){
|
557 |
-
updateStatus();
|
558 |
-
window.onbeforeunload = null;
|
559 |
-
} )
|
560 |
-
.on( 'poUpdate', updateStatus );
|
561 |
-
;
|
562 |
-
|
563 |
-
// load raw message data
|
564 |
-
messages.load( conf.podata );
|
565 |
-
|
566 |
-
// ready to render editor
|
567 |
-
editor.load( messages );
|
568 |
-
|
569 |
-
// locale should be cast to full object once set in editor
|
570 |
-
if( locale = editor.targetLocale ){
|
571 |
-
locale.isRTL() && $(innerDiv).addClass('trg-rtl');
|
572 |
-
}
|
573 |
-
// enable template mode when no target locale
|
574 |
-
else {
|
575 |
-
editor.unlock();
|
576 |
-
}
|
577 |
-
|
578 |
-
// ok, editor ready
|
579 |
-
updateStatus();
|
580 |
-
|
581 |
-
// clean up
|
582 |
-
delete window.locoConf;
|
583 |
-
conf = buttons = null;
|
584 |
-
|
585 |
-
|
586 |
-
}( window, jQuery );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pub/js/min/admin.js
CHANGED
@@ -1,242 +1,196 @@
|
|
1 |
-
(function(
|
2 |
-
""}
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
b
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
return
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
"
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
b
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
b
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
"
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
"
|
54 |
-
"
|
55 |
-
"
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
A(e,h)}(v=b.length)?(B&&c(),C(0)):(C(null),a(),D.trigger("locoAutonone",[]))}function A(a,b){w.append(b);b.click(function(g){g.stopPropagation();C(a,b);r();return!1});return b}function C(a,b){u&&(u.removeClass("selected"),u=null);f=null;null==a?d(""):(b||(b=w.find("div.auto-comp-result").eq(a)),b.length&&(b.addClass("selected"),f=a,u=b))}function s(a){if(v){var b=v-1;null==f?a=0<a?0:b:(a=f+a,0>a?a=b:a>b&&(a=0));return C(a)}}function r(){if(null==f)y.val(""),d("");else{var b=w.find("div.auto-comp-result").eq(f),
|
62 |
-
e=b.data()||{label:"Error"},q=e.value,n=e.label;d(q);y.val(n);h();b=b.clone();b.data(e);g();A(0,b);v=1;C(0,b);a();b.trigger("locoAutocomp",[q,n,b])}}var v=0,q=!1,B=!1,E=e.form,f=null,u=null,z=k(e),F=z.attr("name"),K=z.attr("data-mode"),I=z.attr("data-provider"),J="hint"!==K&&k('<input type="hidden" value="" name="'+F+'" />').appendTo(E),D=k('<div class="auto-comp-wrap"></div>').replaceAll(z),w=k('<div class="auto-comp-drop"></div>');I&&(I=new l(I));J&&z.attr("name","_"+F);z.attr("autocomplete")||
|
63 |
-
z.attr("autocomplete","off");D.append(z).append(w);h();z.focus(function(){B=!0;1<v&&c()}).blur(function(){B=!1;a()}).keydown(function(a){function b(){a.preventDefault();a.stopPropagation();return!1}switch(a.keyCode){case 27:q&&(a.stopPropagation(),h(),z.blur());break;case 40:v&&(q?s(1):c());break;case 38:q&&s(-1);break;case 13:if(q)return r(),b();if(!f&&"hint"!==K)return b()}return!0});var y=m.require("$8","LocoTextListener.js").listen(z,function(a){I&&I.fetch(a,n)});(E=z.attr("data-pre"))&&(E=k.parseJSON(E))&&
|
64 |
-
E.value&&E.label?(n([E]),r()):!e.value||J&&J.val()||!I||I.fetch(e.value,function(a){n(a);r()});return{$:z,val:function(){return J&&J.val()},clear:g,reset:function(){g();z.val("");d("");y.ping()},force:function(a,b){g();d(b||"");y.val(a)},preload:function(a){v&&g();I=new b;var d,e;for(d in a)e=a[d],I.add(e)},mode:function(a){K=a},provide:function(a){I=new l(a)}}};l.prototype.fetch=function(b,a){if(!b)return a&&a([]),this.dead={},this;var d,c=this.dead;for(d in c)if(0===b.indexOf(d))return a&&a([]),
|
65 |
-
this;d={dataType:"json",url:this.url+encodeURIComponent(b)};m.require("$22","http.js").ajax(d,function(d){var g=d&&d.results;g&&(a&&d.query&&d.query===b&&a(d.results),g.length||(c[b]=0));return!0});return this};b.prototype.add=function(b){var a=b.fulltext||b.label||b.value;a&&this.dict.add(b,a)};b.prototype.fetch=function(b,a){var d=b?this.dict.find(b):[];a&&a(d);return this};return c}({},w,y));m.register("$9",function(c,f,D){function l(a){a.stopPropagation();a.preventDefault();return!1}function b(a,
|
66 |
-
b,d){d.off().mouseup(function(d){d.stopPropagation();a.selectIndex(b,!0);return!1}).mouseover(function(){k(this).addClass("over");a.hover=b;return!0}).mouseout(function(){k(this).removeClass("over");a.hover=-1;return!0});return d}function e(b){p===b&&(k(f).off("resize scroll",a),p=null);return b}function a(){p&&p.resize()}function d(a){if(a){var b,d=a[0],e=d.id,c=d.title,r=d.disabled,v=[],q=[],p,h=-1,f=d.options.length,u=this.selectedIcon||"";this.id=e||"";this.name=d.name||"";this.prefix=d.getAttribute("data-prefix");
|
67 |
-
for(this.defaultIcon=d.getAttribute("data-icon")||"icon no-icon";++h<f;)b=d.options[h],p=k(b),b.selected&&v.push(h),q.push([p.val(),p.text(),p.attr("data-icon")||u,b.disabled,p.attr("lang")]);this.hidden||(this.hidden=k('<input type="hidden" name="'+this.name+'" value="" />').appendTo(d.form));this.list=k("<ul></ul>").mouseup(l);this.icon=k('<span class="icon"> </span>');this.selection=k('<span class="label"></span>');this.handle=k('<a class="handle" href="#"></a>').attr("tabindex",a.attr("tabindex")||
|
68 |
-
"").append(this.icon).append(this.selection);b=k('<div class="selector"></div>').addClass(d.className).append(this.handle).append(this.list).replaceAll(d);e&&b.attr("id",e);c&&a.hasClass("hastip")&&(b.attr("title",c),m.require("$11","tooltip.js").init(b,{gravity:a.attr("data-gravity")||"s",anchor:a.attr("data-anchor")}));this.wrapper=b;this.up=b.hasClass("up");for(this.clearOptions();b=q.shift();)this.addOption.apply(this,b);r?this.disable():this.enable();this.close();if(f=v.length)for(h=0;h<f;h++)this.selectIndex(v[h]);
|
69 |
-
else h=d.selectedIndex,null!=h&&0<=h&&this.selectIndex(h)}}c.create=function(a){return new d(a)};c.extend=function(a){a.parent=d;a.prototype=new d};var p,h=d.prototype;h.enable=function(){var a=this;a.bound?a.wrapper.removeClass("disabled"):(a.handle.click(function(a){a.preventDefault();return!1}).mouseover(function(b){return a.onRollover(b)}).mouseout(function(b){return a.onRollout(b)}).mousedown(function(b){return a.onPress(b)}).keydown(function(b){return a.onKeydown(b)}),k(D).mouseup(function(b){return a.onRelease(b)}).keydown(function(b){return a.onGlobalKeydown(b)}),
|
70 |
-
a.bound=!0)};h.disable=function(){this.wrapper.addClass("disabled")};h.isDisabled=function(){return this.wrapper.hasClass("disabled")};h.onRollover=function(){return this.over=!0};h.onRollout=function(){this.over=!1;return!0};h.onPress=function(a){return this.active?this.over?(this.close(),a.stopPropagation(),a.preventDefault(),!1):!0:(this.open(),a.stopPropagation(),a.preventDefault(),this.handle.focus(),!1)};h.onRelease=function(){this.active&&!this.over&&this.close();return!0};h.onGlobalKeydown=
|
71 |
-
function(a){if(this.active)switch(a.keyCode){case 27:return this.close(),l(a);case 40:return this.hoverNext(1),l(a);case 38:return this.hoverNext(-1),l(a);case 13:if(-1!=this.hover)return this.selectIndex(this.hover,!0),this.hoverItem(-1),this.close(),l(a)}return!0};h.onKeydown=function(a){return this.active||40!==a.keyCode?!0:(this.open(),l(a))};h.resize=function(){var a=this.list,b=this.handle,d=b.outerWidth()||0,e=a.outerWidth()||0,c;this.up?(c=a.outerHeight(),a.css("top","-"+(c+2)+"px")):(c=b.outerHeight()||
|
72 |
-
0,c+=2,a.css("top",c+"px"),b=c+m.require("$18","html.js").top(b[0]),c=f.innerHeight-Math.max(0,b-f.pageYOffset),c-=4,a.css("max-height",c+"px"));d>e&&(d-=e-a.width(),a.css("min-width",String(d)+"px"))};h.open=function(){var b=this.list,d=this.wrapper,c=d.data("tipsy");this.active=!0;this.hover=-1;d.addClass("active");b.show().scrollTop(0);c&&c.disable();this!==p&&(p&&e(p),k(f).on("resize scroll",a),p=this);this.resize()};h.close=function(){var a=this.wrapper,b=a.data("tipsy");this.list.hide();this.active=
|
73 |
-
!1;-1!==this.hover&&(this.getElement(this.hover).removeClass("over"),this.hover=-1);a.removeClass("active");b&&b.enable();e(this)};h.hoverItem=function(a,b){-1!==this.hover&&this.getElement(this.hover).removeClass("over");this.hover=a;-1!==a&&(b=b||this.getElement(a),b.addClass("over"))};h.hoverNext=function(a){var b=this.hover,d=this.options.length,e,c=null;for(-1===b&&0>a&&(b=d);d;){b+=a;if(0>b){this.close();break}else b>=d&&(b=0);if((e=this.options[b])&&!e.disabled&&!e.hidden){this.hoverItem(b);
|
74 |
-
break}if(null==c)c=b;else if(c===b)break}};h.enableChange=function(a){this.eventName=a;this.eventData=[].slice.call(arguments,1);return this};h.enableConfirm=function(a){this.confirm=a;return this};h.clearOptions=function(){this.index={};this.length=0;this.options=[];this.list.html("");this.hidden.val("");this.idx=this.hover=-1;this.dict=null;return this};h.destroy=function(){this.clearOptions();this.hidden.remove()};h.addOption=function(a,d,e,c,h){var r=this.options.length,p=k("<span></span>").addClass(e||
|
75 |
-
"icon no-icon"),q=k('<span class="label"></span>').text(d||a),q=k("<li></li>").append(p).append(q).appendTo(this.list);14<r&&this.getDict().add(r,d);h?h=h.split("-").shift():e&&-1!==e.indexOf("lang-"+a)&&(h=a);h&&p.attr("lang",h);q.attr("data-option",r);this.options[r]={value:a,text:d,lang:h||"",icon:e};this.index[a]=r;this.length=r+1;c?this.disableIndex(r):b(this,r,q);return r};h.getDict=function(){return this.dict||(this.dict=this.createDict())};h.createDict=function(){var a=this,b=m.require("$7",
|
76 |
-
"fulltext.js").init(),d=k('<input type="text" placeholder="🔍"/>').appendTo(k('<form class="clearable"></form>').submit(l).insertBefore(a.getElement(0)));m.require("$8","LocoTextListener.js").listen(d,function(e){0===(""===e?a.unfilter():a.filter(b.find(e)))?d.addClass("error"):d.removeClass("error")});k.each(a.options,function(a,d){b.add(a,d.text)});return b};h.filter=function(a){var b=-1,d=this.length,e,c=-1,r=a.length;if(r===d)this.unfilter();else{for(;++c<r;){for(e=a[c];++b<e;)this.hideIndex(b);
|
77 |
-
this.showIndex(b)}for(;++b<d;)this.hideIndex(b)}return r};h.unfilter=function(){for(var a=-1,b=this.length;++a<b;)this.showIndex(a);return b};h.disableOption=function(a){return this.disableIndex(this.index[a])};h.enableOption=function(a){return this.enableIndex(this.index[a])};h.disableIndex=function(a){var b=this.options[a];b&&!b.disabled&&(b.disabled=!0,this.getElement(a).addClass("disabled").off());return this};h.enableIndex=function(a){var d=this.options[a];d&&d.disabled&&(d.disabled=null,b(this,
|
78 |
-
a,this.getElement(a)).removeClass("disabled"));return this};h.hideIndex=function(a){var b=this.options[a];b&&!b.hidden&&(b.hidden=!0,this.getElement(a).hide())};h.showIndex=function(a){var b=this.options[a];b&&b.hidden&&(b.hidden=null,this.getElement(a).show())};h.each=function(a){for(var b=-1,d=this.options,e=d.length;++b<e;)a(b,d[b]);return this};h.reIndex=function(){var a=-1,d={},e,c=this.dict,h=this.options,r=h.length;for(c&&c.clear();++a<r;)e=h[a],d[e.value]=a,c&&c.add(a,e.text),e.disabled||
|
79 |
-
b(this,a,this.getElement(a));this.index=d;this.length=r};h.selectValue=function(a,b){return this.selectIndex(this.index[a],b)};h.hasValue=function(a){return null!=this.index[a]};h.hasIndex=function(a){return this.length>a};h.getIndex=function(){return this.idx};h.selectIndex=function(a,b){var d=this.options[a];if(d){var e=this,c=e.idx,r=d.value,h=d.icon||e.defaultIcon,q=function(){null!=c&&e.getElement(c).removeClass("active");e.getElement(a).addClass("active");e.setLabel(d.text).setIcon(h,d.lang);
|
80 |
-
e.hidden.val(r);e.idx=a;b&&e.change()};c===a?e.hidden.val(r):b?"function"===typeof e.confirm?e.confirm.call(null,d,function(a){a&&q()}):e.beforeChange(r)&&q():q();e.active&&e.close()}return this};h.setLabel=function(a){this.selection.text(a);(a=this.prefix)&&this.selection.prepend(k('<span class="prefix"></span>').text(a));return this};h.setIcon=function(a,b){this.icon.attr("class",a).attr("lang",b||"");return this};h.val=function(){var a=this.options[this.idx];return a&&a.value};h.change=function(){var a=
|
81 |
-
this.val(),b=this.save,d=this.eventName||"change",e=[a].concat(this.eventData||[]);this.wrapper.trigger(d,e);b&&b(a);this.hidden.triggerHandler("change");return this};h.beforeChange=function(a){var b=k.Event("locoBeforeSelect");this.wrapper.trigger(b,[a]);return!b.isDefaultPrevented()};h.renameOption=function(a,b){var d=this.index[a],e=this.options[d];e&&(e.text=b,this.getElement(d).find("span.label").text(b),d===this.idx&&this.setLabel(b));return this};h.removeOption=function(a){var b=this.index[a],
|
82 |
-
d=this.options[b];d&&(a=this.val(),this.getElement(b).remove(),this.options.splice(b,1),this.reIndex(),a===d.value?this.selectIndex(0,!0):this.selectValue(a,!1))};h.getElement=function(a){return this.list.find("li").eq(a)};h.getWrapper=function(){return this.wrapper};h.tip=function(){return this.getWrapper().data("tipsy")};h.$=function(a,b){k.fn[a].apply(this.wrapper,b||[]);return this};h.persist=function(a){var b=this.id||this.name,d=a.fetch(b);null!=d&&this.selectValue(d,!0);this.save=function(d){a.store(b,
|
83 |
-
d)};return this};h.listen=function(a){return this.on(this.eventName||"change",a)};h.on=function(a,b){this.wrapper.on(a,b);return this};h=null;return c}({},w,y));m.register("$33",function(c,f,D){function l(b){var e=[],a=k([]);this.hidden=a;this.selected=e;this.selectedIcon="icon icon-checkbox";this.constructor.call(this,b);this.wrapper.addClass("multi");for(var d,c,h,g=k('<input type="checkbox" name="'+this.name+'[]" />')[0],n=this.options,A=n.length,f=-1;++f<A;)d=this.getElement(f)[0],h=g.cloneNode(!0),
|
84 |
-
e[f]&&(h.checked=!0),h.setAttribute("value",n[f].value),a.push(d.appendChild(h));(c=this.defaultIcon)&&this.setIcon(c);(c=b.attr("title"))?this.setLabel(c):this.wrapper.addClass("no-title")}c.create=function(b){return new l(b)};m.require("$9","LocoSelector.js").extend(l);f=l.prototype;f.selectIndex=function(b,e){return this.setIndexState(b,!this.selected[b],e)};f.setIndexState=function(b,e,a){var d=this.options[b],c=this.getElement(b),h=this.hidden[b],g=this.selected;d&&e!==g[b]&&(g[b]=e,c[e?"addClass":
|
85 |
-
"removeClass"]("checked"),h&&(h.checked=e),a&&this.change());return this};f.selectValue=function(b,e){if(null==b.pop)return l.parent.prototype.selectValue.call(this,b,e);for(var a=this.selected.slice(),d=this.options.length,c=this.index||{},h=!1,g=-1,n=-1;++g<d;)a[g]&&(h=!0),a[g]=!1;if(d=b.length)for(;++n<d;)g=c[b[n]],null==g?h=!0:!1===a[g]&&(h=a[g]=!0);if(h){for(g in a)this.setIndexState(g,a[g]);e&&this.change()}return this};f.val=function(){for(var b=[],e=this.options,a=this.selected,d=a.length,
|
86 |
-
c=-1;++c<d;)a[c]&&b.push(e[c].value);return b};f=null;return c}({},w,y));m.register("$44",function(c,f,k){function l(b,a){for(var d=String(b);a>d.length;)d="0"+d;return d}function b(b){var a=b%10;if(1===a){if(11!==b)return"st"}else if(2===a){if(12!==b)return"nd"}else if(3===a&&13!==b)return"rd";return"th"}c.formatter=function(){return{format:function(b,a){var d=this;return a.replace(/%[YmdHisMjSghAa]/g,function(a){return d[a.charAt(1)](b)})},Y:function(b){return String(b.getFullYear())},m:function(b){return l(1+
|
87 |
-
b.getFullMonth(),2)},M:function(b){return"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ")[b.getMonth()]},d:function(b){return l(b.getDate(),2)},H:function(b){return l(b.getHours(),2)},i:function(b){return l(b.getMinutes(),2)},s:function(b){return l(b.getSeconds(),2)},j:function(b){return String(b.getDate())},S:function(e){return b(e.getDate())},g:function(b){b=b.getHours();return String(0===b?12:12<b?b-12:b)},h:function(b){return l(this.g(b),2)},a:function(b){return 12>b.getHours()?"am":
|
88 |
-
"pm"},A:function(b){return 12>b.getHours()?"AM":"PM"}}};return c}({},w,y));m.register("$34",function(c,f,D){function l(a){var e=a.id,c=p||(p=[]),r=h||(h={}),v=a.getAttribute("datetime"),v=n(v);if(!isNaN(v))return e||(e="tick"+ ++g,a.setAttribute("id",e)),a={id:e,el:a,dt:new Date(v),st:a.textContent},r[e]||c.push(a),r[e]=a,d||(d=setTimeout(b,200)),a}function b(){for(var a=p,c=a.length,g={},r=[];0<c--;)ticker=a[c],e(ticker)&&(r.push(ticker),g[ticker.id]=ticker);r.length?(p=r,h=g,d=setTimeout(b,3E4)):
|
89 |
-
d=h=p=null}function e(b){var d=b.el;if(D.contains&&!D.contains(d))return!1;strDate=a(b.dt,new Date,!0);if(""===strDate)return!1;strDate!==b.st&&(k(d).text(strDate),b.st=strDate);return!0}function a(a,b,d){var e=b.getTime(),c=a.getTime(),q=e-c;if(6E4>q)return"Just now";if(36E5>q)return a=Math.floor(q/6E4),String(a)+" minute"+(1===a?"":"s")+" ago";if(864E5>q&&b.getDate()===a.getDate()&&b.getMonth()===a.getMonth()&&b.getFullYear()===a.getFullYear())return a=Math.round(q/36E5),"About "+String(a)+" hour"+
|
90 |
-
(1===a?"":"s")+" ago";if(d)return"";d=Math.floor(e/864E5)-Math.floor(c/864E5);e=m.require("$44","date.js").formatter();q=e.format(a," %g:%i %A");return 1>=d&&(b.setHours(0),b.setMinutes(0),b.setSeconds(0),b=b.getTime()-864E5,c>=b)?"Yesterday at"+q:11>d?d+" days ago at"+q:e.format(a,"%M %j%S %Y,")+q}var d,p,h,g=0,n=Date.parse||function(){return Number.NaN};c.onEach=function(a,b){l(b)};c.update=function(a){e(l(a))};c.rel=a;return c}({},w,y));m.register("$18",function(c,f,D){var l=f.ieVersion;c.ie=function(b){return b?
|
91 |
-
l<=b:l};var b=c.init=function(b){b?b instanceof jQuery||(b=k(b)):b=k(D.body);var a=m.require("$31","ga.js"),d=m.require("$19","forms.js"),p=m.require("$32","modal.js"),h=m.require("$10","LocoAutoComplete.js"),g=m.require("$9","LocoSelector.js"),n=m.require("$33","LocoMultiSelector.js"),f=m.require("$11","tooltip.js");b.find("form").each(function(a,b){var e=k(b);l&&10>l&&d.placeholders(e);b.getAttribute("data-modal")?p.initForm(b):b.hasAttribute("action")&&"#"!==e.attr("action").charAt(0)&&!b.target&&
|
92 |
-
d.jsonify(b);e.find("input.auto-comp").each(function(a,b){h.init(b)});e.find("select.selector").each(function(a,b){b.hasAttribute("multiple")?n.create(k(b)):g.create(k(b))});e.hasClass("hasreveal")&&d.revealify(e);e.find("button.hastip").each(function(a,b){f.init(k(b))})});b.find("a").each(function(b,d){-1!==d.className.indexOf("hastip")&&f.init(k(d));"/modal/"===String(d.getAttribute("href")).substr(0,7)||d.getAttribute("data-modal")?p.initLink(k(d)):a.link(d)});b.find("time.tick").each(m.require("$34",
|
93 |
-
"tick.js").onEach);d=p=h=b=null;return c};c.$=function(b){return k(f.innerShiv?innerShiv(b,!1):b)};k.fn._html=function(e){return null!=e?(e=this.html(f.innerShiv?innerShiv(e,!1):e),b(this),e):j.html()};k.fn.macro=function(b,a){if("function"!==typeof b.run)throw Error("macro has no run function");b.run(this,a||{});return this};c.el=function(b,a){var d=D.createElement(b||"div");a&&(d.className=a);return d};c.txt=function(b){return D.createTextNode(b||"")};c.h=function(){function b(){c=/[<>&]/g;h=/(\r\n|\n|\r)/g;
|
94 |
-
g=/(?:https?):\/\/(\S+)/ig;n=location.hostname;b=null}function a(a){return"&#"+a.charCodeAt(0)+";"}function d(a,b){return'<a href="'+a+'" target="'+(b.indexOf(n)?"_blank":"_top")+'">'+b+"</a>"}var c,h,g,n;return function(n,f){b&&b();var s=n.replace(c,a);f&&(s=s.replace(g,d).replace(h,"<br />"));return s}}();c.noop=function(b){b&&(b.preventDefault(),b.stopPropagation(),k(b.target).blur());return!1};c.top=function(b,a){a||(a=D.body);for(var d=b.offsetTop||0;(b=b.offsetParent)&&b!==a;)d+=b.offsetTop||
|
95 |
-
0;return d};c.left=function(b,a){a||(a=D.body);for(var d=b.offsetLeft||0;(b=b.offsetParent)&&b!==a;)d+=b.offsetLeft||0;return d};return c}({},w,y));m.register("$19",function(c,f,D){function l(a){function b(){a.value===g&&(a.value="",c.removeClass("placeheld"));return!0}function e(){""===a.value&&(a.value=g,c.addClass("placeheld"));return!0}var c=k(a);if(!c.hasClass("auto-comp")){var g=c.attr("placeholder");if(g)return c.focus(b).blur(e),e(),{kill:function(){b();c.off("focus",b).off("blur",e)}}}}var b=
|
96 |
-
c.enable=function(a){function b(a,d){d.getAttribute("data-was-disabled")||(d.disabled=!1)}a.find(".button").removeClass("loading");a.find("button").each(b);a.find("input").each(b);a.find("select").each(b);a.find("textarea").each(b);f.attachEvent&&a.hasClass("has-placeholders")&&c.placeholders(a);a.removeClass("disabled").trigger("locoEnable");delete a._disabled},e=c.disable=function(a){function b(a,d){d.disabled?d.setAttribute("data-was-disabled","true"):d.disabled=!0}a._disabled||(a.find(".button").addClass("loading"),
|
97 |
-
a.find("button").each(b),a.find("input").each(b),a.find("select").each(b),a.find("textarea").each(b),a.addClass("disabled").trigger("locoDisable"),a._disabled=!0)};c.jsonify=function(a,d,c){a instanceof jQuery||(a=k(a));a.disable||(k.fn.disable=function(){e(this);return this},k.fn.enable=function(){b(this);this.placehold&&this.placehold();return this});var h="";a.find('[type="submit"]').click(function(a){a&&a.target&&a.target.name&&(h=encodeURIComponent(a.target.name)+"="+encodeURIComponent(a.target.value));
|
98 |
-
return!0});a.submit(function(b){if(b&&b.isDefaultPrevented&&b.isDefaultPrevented()||c&&!1===c(b))return!1;var e=a.serialize(),e=e.replace(/%0D%0A/g,"%0A");h&&(e&&(e+="&"),e+=h,h="");a.disable();var f=m.require("$22","http.js"),e={url:f.jsonLink(a.attr("action")),type:a.attr("method"),data:e};f.ajax(e,d,function(){a.enable()},a);b.preventDefault();b.stopPropagation();return!1})};c.revealify=function(a){a=a.closest("form");a.find("div[data-reveal-if]").each(function(b,e){function c(a){var b;b=l;q=q||
|
99 |
-
a.target;if("."===r)b=Boolean(q&&q[v]),l&&(b=!b);else{var d,e,z=k(q.form).serializeArray();for(e in z)z[e].name===s&&(d=z[e].value);"!="===r&&(b=!b);b=b?v!==d:v===d}if(b!==f)if(f=b,a)g[f?"slideDown":"slideUp"](200);else g[f?"show":"hide"]();return!0}var g=k(e),n=/^(\!?)([_\w\-\[\]]+)(\.|!?=)(.*)$/.exec(g.attr("data-reveal-if"));if(n){var f,l=n[1]?!0:!1,s=n[2],r=n[3],v=n[4],n=a[0][s];if(n.type||null==n.length)n=[n];b=n.length;for(var q;0!==b--;)q=n[b],c(),k(q).change(c).removeClass("jshide");n=n=q=
|
100 |
-
null}});a=null};c.linkify=function(a){var b=a.getAttribute("data-icon");if(b){var e=k(a),c=k("<a> </a>");c.attr("href",a.form.action);c.attr("class",e.attr("class"));c.attr("tabindex",e.attr("tabindex"));e.attr("tabindex","-1");c.text(e.val());b&&k("<span></span>").prependTo(c).addClass(b);e.hide().after(c);c.click(function(a){e.click();return!1})}};c.placeholders=function(a){var b,e=[];a.find("input[placeholder]").each(function(a,c){"password"!==c.type&&(b=l(c))&&e.push(b)});e.length&&(a.submit(function(){for(var a in e)e[a].kill()}),
|
101 |
-
a.addClass("has-placeholders"),b=i=null)};return c}({},w,y));m.register("$4",function(c,f,D){function l(a,b,d){function e(){c();g=setTimeout(b,d)}function c(){g&&clearTimeout(g);g=null}var g;e();k(a).mouseenter(c).mouseleave(e);return{die:function(){c();k(a).off("mouseenter mouseleave")}}}function b(a,b){a.fadeTo(b,0,function(){a.slideUp(b,function(){a.remove();k(f).triggerHandler("resize")})});return a}function e(a,d){function e(d){g[r]=null;b(k(a),250);c&&c.die();var q;if(q=d)d.stopPropagation(),
|
102 |
-
d.preventDefault(),q=!1;return q}var c,r;k(a).addClass("is-dismissible");k('<button type="button" class="notice-dismiss" href="#"> </a>').prependTo(a).click(e);k(f).triggerHandler("resize");n();r=g.length;g.push(e);d&&(c=l(a,e,d));return{stick:function(){c&&c.die();c=null;g[r]=null}}}function a(a,b,d){var e=m.require("$18","html.js");a=k('<div class="notice notice-'+a+'" loco-notice inline></div>').prependTo(k("#loco-notices"));var c=k(e.el("p"));d=k(e.el("span")).text(d);b=k(e.el("strong","has-icon")).text(b+
|
103 |
-
": ");c.append(b).append(d).appendTo(a);return a}function d(b,d,c,g){b=a(c,d,b).hide().fadeIn(500);k(f).triggerHandler("resize");return e(b,g)}function p(a){return d(a,C,"warning")}function h(){k("#loco-notices").find("div.notice").each(function(a,b){if(-1===b.className.indexOf("jshide")){var d=-1===b.className.indexOf("notice-success")?null:5E3;e(b,d)}})}var g=[],n=Date.now||function(){return(new Date).getTime()},A,C,s,r;c.error=function(a){return d(a,A,"error")};c.warn=p;c.info=function(a){return d(a,
|
104 |
-
s,"info")};c.success=function(a){return d(a,r,"success",5E3)};c.warning=p;c.log=function(){f.console&&console.log&&console.log.apply(console,arguments)};c.debug=function(a,b){f.console&&console.error&&(console.error("Loco Error: "+a),b&&console.debug&&console.debug(b))};c.clear=function(){for(var a=-1,b,d=g,e=d.length;++a<e;)(b=d[a])&&b();g=[];return c};c.create=a;c.raise=function(a){(c[a.type]||c.error).call(c,a.message)};c.convert=e;c.init=function(a){A=a._("Error");C=a._("Warning");s=a._("Notice");
|
105 |
-
r=a._("OK");setTimeout(h,1E3);return c};return c}({},w,y));m.register("$5",function(c,f,D){function l(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 b(a){return(a=a.split(/[\r\n]/)[0])?(a=a.replace(/ +in +\S+ on line \d+/,""),a=a.replace(/^[()! ]+Fatal error:\s*/,"")):t._("Server returned invalid data")}function e(a,b,d){a[b]=d}function a(a,b,d){a.push({name:b,value:d})}
|
106 |
-
function d(a,b,d){a.append(b,d)}function p(a,d,e,c){function q(d,c,q){if("abort"!==c){var z=g||{_:function(a){return a}},p=d.status,f=d.responseText,v=l(f),k=d.getResponseHeader("Content-Type")||"text/html",s=d.getResponseHeader("Content-Length")||f.length;"success"===c&&q?h.error(q):(h.error(b(v)+".\n"+z._("Check console output for debugging information")),h.debug("Ajax failure for "+a,{status:p,error:c,message:q,output:f}),"parsererror"===c&&(q="Response not JSON"),h.log([z._("Provide the following text when reporting a problem")+
|
107 |
-
":","----","Status "+p+' "'+(q||z._("Unknown error"))+'" ('+k+" "+s+" bytes)",v,"===="].join("\n")));e&&e.call&&e(d,c,q);n=d}}c.url=A;c.dataType="json";c.error=q;c.success=function(a,b,e){var c=a&&a.data,g=a&&a.notices,r=g&&g.length;for(!c||a.error?q(e,b,a&&a.error&&a.error.message):d&&d(c,b,e);r--;)h.raise(g[r])};var h=m.require("$4","notices.js").clear();return k.ajax(c)}var h={},g,n,A=f.ajaxurl||"/wp-admin/admin-ajax.php";c.init=function(a){h=a.nonces||h;return c};c.localise=function(a){g=a;return c};
|
108 |
-
c.xhr=function(){return n};c.strip=l;c.parse=b;c.submit=function(a,b,d){function e(){c.removeClass("loading");m.require("$19","forms.js").enable(c)}var c=k(a),g=c.serialize();c.addClass("loading");m.require("$19","forms.js").disable(c);return p(a.route.value,function(a,d,c){e();b&&b(a,d,c)},function(a,b,c){e();d&&d(a,b,c)},{type:a.method,data:g})};c.post=function(b,c,g,n){var q,B=!0;c=c||{};(q=h[b])||(f.console&&console.debug&&console.debug('No nonce for "'+b+'"'),q="");var E=q;f.FormData&&c instanceof
|
109 |
-
FormData?(B=!1,q=d):q=Array.isArray(c)?a:e;q(c,"action","loco_json");q(c,"route",b);q(c,"loco-nonce",E);return p(b,g,n,{type:"post",data:c,processData:B,contentType:B?"application/x-www-form-urlencoded; charset=UTF-8":!1})};c.setNonce=function(a,b){h[a]=b;return c};c.hasNonce=function(a){return!!h[a]};return c}({},w,y));m.register("$20",{arab:1,aran:1,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,
|
110 |
-
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});m.register("$6",function(c,f,k){function l(){}var b,e=m.require("$20","rtl.json");c.init=function(){return new l};c.cast=function(a){return a instanceof l?a:"string"===typeof a?c.parse(a):c.clone(a)};c.clone=function(a){var b,c=new l;for(b in a)c[b]=a[b];return c};c.parse=function(a){if(!(b||(b=/^([a-z]{2,3})(?:[-_]([a-z]{2}))?(?:[-_]([a-z0-9]{3,8}))?$/i)).exec(a))return null;var d=new l;d.lang=RegExp.$1.toLowerCase();if(a=
|
111 |
-
RegExp.$2)d.region=a.toUpperCase();if(a=RegExp.$3)d.variant=a.toLowerCase();return d};f=l.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.region)c+=a+b;if(b=this.variant)c+=a+b;return c};f.getIcon=function(){for(var a=3,b,c,e=["variant","region","lang"],g=[];0!==a--;)if(b=e[a],c=this[b])g.push(b),g.push(b+"-"+c.toLowerCase());return g.join(" ")};f.isRTL=function(){return!!e[String(this.lang).toLowerCase()]};
|
112 |
-
f=null;return c}({},w,y));m.register("$38",function(c,f,k){function l(){}var b,e,a=m.require("$20","rtl.json");c.init=function(){return new l};c.cast=function(a){return a instanceof l?a:"string"===typeof a?c.parse(a):c.clone(a)};c.clone=function(a){var b,c=new l;for(b in a)c[b]=a[b];return c};c.parse=function(a){b||(e=/[-_+]/,b=/^([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(e).join("-");if(!b.exec(a))return null;
|
113 |
-
var c=new l;c.lang=RegExp.$1.toLowerCase();if(a=RegExp.$2)c.script=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase();if(a=RegExp.$3)c.region=a.toUpperCase();if(a=RegExp.$4)c.variant=a.toLowerCase();if(a=RegExp.$5)c.extension=a;return c};f=l.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+=
|
114 |
-
a+b;return c};f.getIcon=function(){for(var a=4,b,c,e=["variant","region","script","lang"],n=[];0!==a--;)if(b=e[a],c=this[b])c.join&&(c=c.join("-")),1===a&&3===c.length?n.push("region-m49"):n=n.concat([b,b+"-"+c.toLowerCase()]);return n.join(" ")};f.isRTL=function(){return!!a[String(this.script||this.lang).toLowerCase()]};f=null;return c}({},w,y));m.register("$39",function(c,f,k){function l(a){f.console&&console.error&&console.error(a)}function b(){l("Method not implemented")}function e(){}function a(a){}
|
115 |
-
e.prototype.toString=function(){return"[Undefined]"};a.prototype._validate=function(a){var c,h,g=!0;for(c in this)h=this[c],h===b?(l(a+"."+c+"() must be implemented"),g=!1):h instanceof e&&(l(a+"."+c+" must be defined"),g=!1);return g};c.init=function(d,c){var h,g=new a;if(d)for(h=d.length;0!==h--;)g[d[h]]=b;if(c)for(h=c.length;0!==h--;)g[c[h]]=new e;return g};c.validate=function(a){var b=/function (\w+)\(/.exec(a.toString())?RegExp.$1:"";a.prototype._validate(b||"Object")};return c}({},w,y));m.register("$49",
|
116 |
-
function(c,f,k){var l=f.requestAnimationFrame,b=f.cancelAnimationFrame,e=0;if(!l||!b)for(var a in{ms:1,moz:1,webkit:1,o:1})if(l=f[a+"RequestAnimationFrame"])if(b=f[a+"CancelAnimationFrame"]||f[a+"CancelRequestAnimationFrame"])break;l&&b||(l=function(a){var b=d();timeToCall=Math.max(0,16-(b-e));nextTime=b+timeToCall;timerId=f.setTimeout(function(){a(nextTime)},timeToCall);e=nextTime;return timerId},b=function(a){clearTimeout(a)});var d=Date.now||function(){return(new Date).getTime()};c.loop=function(a,
|
117 |
-
d){function c(){f=l(c,d);a(e++)}var e=0,f;c();return{stop:function(){f&&b(f);f=null}}};return c}({},w,y));m.register("$45",function(c,f,k){function l(b,d,c,e){if(a){var g=c;c=function(a){if((a.MSPOINTER_TYPE_TOUCH||"touch")===a.pointerType)return g(a)}}b.addEventListener(d,c,e);return{unbind:function(){b.removeEventListener(d,c,e)}}}function b(a){a.preventDefault();a.stopPropagation();return!1}var e,a=!!f.navigator.msPointerEnabled,d=a?"MSPointerDown":"touchstart",p=a?"MSPointerMove":"touchmove",
|
118 |
-
h=a?"MSPointerUp":"touchend";c.ok=function(a){null==e&&(e="function"===typeof k.body.addEventListener);e&&a&&a(c);return e};c.ms=function(){return a};c.dragger=function(a,c){function e(b){a.addEventListener(b,n[b],!1)}function r(b){a.removeEventListener(b,n[b],!1)}var n={};n[d]=function(a){g(a,function(b,e){e.type=d;c(a,e,q)});e(p);e(h);return!0};n[h]=function(a){r(p);r(h);g(a,function(b,d){d.type=h;c(a,d,q)});return!0};n[p]=function(a){g(a,function(b,d){d.type=p;c(a,d,q)});return b(a)};e(d);var q=
|
119 |
-
{kill:function(){r(d);r(p);r(h);a=q=c=null}};return q};c.swiper=function(c,e,f){function r(a){c.addEventListener(a,u[a],!1)}function v(a){c.removeEventListener(a,u[a],!1)}function q(){k&&k.stop();k=null}var k,E,l,u={},z=[],F=[],K=[];u[d]=function(a){E=!1;q();var b=n();g(a,function(a,d){z[a]=b;F[a]=d.clientX;K[a]=d.clientY});l=c.scrollLeft;return!0};u[h]=function(a){g(a,function(a,b){var d=n()-z[a],c=F[a]-b.clientX,d=Math.abs(c)/d;e(d,c?0>c?-1:1:0)});l=null;return!0};u[p]=function(a){var d,e;null==
|
120 |
-
l||g(a,function(a,b){d=F[a]-b.clientX;e=K[a]-b.clientY});if(e&&Math.abs(e)>Math.abs(d))return E=!0;d&&(E=!0,c.scrollLeft=Math.max(0,l+d));return b(a)};if(!a||f)r(d),r(p),r(h),a&&(c.className+=" mstouch");return{kill:function(){v(d);v(p);v(h);q()},swiped:function(){return E},ms:function(){return a},snap:function(b){a&&!f&&(c.style["-ms-scroll-snap-points-x"]="snapInterval(0px,"+b+"px)",c.style["-ms-scroll-snap-type"]="mandatory",c.style["-ms-scroll-chaining"]="none")},scroll:function(a,b,d){q();var e=
|
121 |
-
c.scrollLeft,g=a>e?1:-1,r=Math[1===g?"min":"max"],z=Math.round(16*b*g);return k=m.require("$49","fps.js").loop(function(b){b&&(e=Math.max(0,r(a,e+z)),c.scrollLeft=e,a===e&&(q(),d&&d(e)))},c)}}};c.start=function(a,b){return l(a,d,b,!1)};c.move=function(a,b){return l(a,p,b,!1)};c.end=function(a,b){return l(a,h,b,!1)};var g=c.each=function(b,d){if(a)(b.MSPOINTER_TYPE_TOUCH||"touch")===b.pointerType&&d(0,b);else for(var c=-1,e=(b.originalEvent||b).changedTouches||[];++c<e.length;)d(c,e[c])},n=Date.now||
|
122 |
-
function(){return(new Date).getTime()};return c}({},w,y));m.register("$50",function(c,f,m){c.init=function(c){function b(){f.style.top=String(-c.scrollTop)+"px";return!0}function e(){var b=f;b.textContent=c.value;b.innerHTML=b.innerHTML.replace(/[ \t]/g,a).split(/(?:\n|\r\n?)/).join('<span class="eol crlf"></span>\r\n')+'<span class="eol eof"></span>';return!0}function a(a){return'<span class="x'+a.charCodeAt(0).toString(16)+'">'+a+"</span>"}var d=c.parentNode,f=d.insertBefore(m.createElement("div"),
|
123 |
-
c);k(c).on("input",e).on("scroll",b);k(d).addClass("has-mirror");f.className="ta-mirror";var h=c.offsetWidth-c.clientWidth;2<h&&(f.style.marginRight=String(h-2)+"px");e();b();return{kill:function(){k(c).off("input",e).off("scroll",b);d.removeChild(f);f=null;k(d).removeClass("has-mirror")}}};return c}({},w,y));m.register("$30",function(c,f,k){function l(a,d){for(var c=0,e=-1,g=d&&f[d],n=b[a]||[],k=n.length;++e<k;)callback=n[e],"function"===typeof callback&&(callback(g),c++);return c}var b={},e;c.load=
|
124 |
-
function(a,c,e){function h(){A&&(clearTimeout(A),A=null);m&&(m.onreadystatechange=null,m=m=m.onload=null);a&&(delete b[a],a=null)}function g(b,c){var d=m&&m.readyState;if(c||!d||"loaded"===d||"complete"===d)c||l(a,e),h()}function n(){if(0===l(a))throw Error('Failed to load "'+(e||a)+'"');h()}if(e&&f[e])"function"===typeof c&&c(f[e]);else if(null!=b[a])b[a].push(c);else{b[a]=[c];var A=setTimeout(n,4E3),m=k.createElement("script");m.setAttribute("src",a);m.setAttribute("async","true");m.onreadystatechange=
|
125 |
-
g;m.onload=g;m.onerror=n;m.onabort=h;k.getElementsByTagName("head")[0].appendChild(m)}};c.stat=function(a){var b;if(!(b=e)){for(var c,h,g=k.getElementsByTagName("script"),f=-1,l=g.length;++f<l;)if(b=g[f].getAttribute("src"))if(c=b.indexOf("/lib/vendor"),-1!==c){h=b.substr(0,c);break}b=e=h||"/static"}return b+a};return c}({},w,y));m.register("$15",function(c,f,D){function l(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",
|
126 |
-
function(){return b.blur()})}function b(a){a.off("change");a.off("focus");a.off("blur")}function e(a){b(a);a.setReadOnly(!0);a.setHighlightGutterLine(!1);a.setHighlightActiveLine(!1)}function a(a,b){function c(){this.HighlightRules=e}var e=d(b),g=a.require,h=g("ace/lib/oop");h.inherits(e,g("ace/mode/text_highlight_rules").TextHighlightRules);h.inherits(c,g("ace/mode/text").Mode);return new c}function d(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_:\\.-]+;)"},
|
127 |
-
{token:"constant.language",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=p(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]*[^{}]+)?)?}"},
|
128 |
{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]+",
|
129 |
-
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
|
130 |
-
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
|
131 |
-
function(
|
132 |
-
|
133 |
-
|
134 |
-
"</p>"===a.substr(-4);return a.replace(/(<\/?)script/ig,"$1loco:script")}function
|
135 |
-
|
136 |
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",
|
137 |
-
entities:"38,amp,60,lt,62,gt,160,nbsp",entity_encoding:"named",keep_styles:!1,init_instance_callback:
|
138 |
-
focus:function(){
|
139 |
-
|
140 |
-
|
141 |
-
TextAreaPrototype.fire=function(){this.l&&this.l.fire();return this};TextAreaPrototype.ping=function(){this.l&&this.l.ping();return this};TextAreaPrototype.focus=function(){var
|
142 |
-
function(){return!!this.l};TextAreaPrototype.enable=function(){var
|
143 |
-
function(a
|
144 |
-
!0),
|
145 |
-
function
|
146 |
-
b.ctrlKey||b.metaKey||b.altKey)return!0;a.selectNext(c);b.stopPropagation();b.preventDefault();return!1}}function
|
147 |
-
a||0;this.length=b.length}function
|
148 |
-
|
149 |
-
[],b=a.length;0!==b--;)a[b].destroy();this.pages=[];this.sy=this.mx=this.mn=this.vh=null;void 0;return this};
|
150 |
-
this.redrawDirty();this.redraw();null==
|
151 |
-
b.scrollTop,b=b.clientHeight;this.sy!==c&&(a=!0,this.sy=c);this.vh!==b&&(a=!0,this.vh=b);return a};
|
152 |
-
|
153 |
-
(
|
154 |
-
this.w.cells[1];
|
155 |
-
function(a){this._idxs||(this._idxs=this.idxs);this.idxs=this._sort(a);return this.clear().render()};
|
156 |
-
function(a,b){b?(this.s=b,b(a)):(b=this.s)&&b(a);return a};
|
157 |
-
return this};
|
158 |
-
this.rendered=!0;return this};
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
k(
|
164 |
-
k.Event(a);c.cell=this;k(this.el).trigger(c,b);return this};
|
165 |
-
this.css.indexOf(a);-1!==a&&this.css.splice(a,1);return this};
|
166 |
-
this.length++}this.dir=a;this.redraw();return this.cells};
|
167 |
-
this.field=null),this.table&&(this.table=null),a===
|
168 |
-
|
169 |
-
a.push("is-readonly"));a=a.join(" ");a!==this._css&&(this._css=a,this.el.className=a);return this};
|
170 |
-
d.el.style[
|
171 |
-
this.clear(),
|
172 |
-
return this};
|
173 |
-
b.firstChild;
|
174 |
-
this.header(a);return this.t};
|
175 |
-
e=
|
176 |
-
e.redraw();return a
|
177 |
-
b.push("po-comment"));return b.join(" ")}function
|
178 |
-
"html.js");
|
179 |
-
var b=[];b[
|
180 |
-
function(a,b){a.stopPropagation();
|
181 |
-
|
182 |
-
|
183 |
-
c;)
|
184 |
-
a.saved(b))this.dirty++,a.unsave(b),this.fire("poUnsaved",[a,b]);this.markUnsaved(a)}return c};
|
185 |
-
c[a]&&(c=c[a].apply(this,b||[]),!1===c))return!1;c=k.Event(a);this.$().trigger(c,b);return!c.isDefaultPrevented()};
|
186 |
-
a.listTable=
|
187 |
-
this.active&&this.unloadActive())};
|
188 |
-
(
|
189 |
-
|
190 |
-
c=!0):
|
191 |
-
"=
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
function(
|
203 |
-
|
204 |
-
a=a[1].header("Loading..");
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
function(
|
212 |
-
|
213 |
-
|
214 |
-
a
|
215 |
-
function(b){
|
216 |
-
|
217 |
-
d
|
218 |
-
|
219 |
-
""
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
(
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function(r,s,k,R){var n=function(){function f(d){throw Error("Failed to require "+d);}var d={};return{register:function(f,m){d[f]=m},require:function(k,m){return d[k]||f(m)},include:function(k,m,g){return d[k]||(g?f(m):null)}}}();n.register("$1",function(f,d,k){function m(g){var c=typeof g;if("string"===c)if(/[^ <>!=()%^&|?:n0-9]/.test(g))console.error("Invalid plural: "+g);else return new Function("n","return "+g);"function"!==c&&(g=function(b){return 1!=b});return g}f.init=function(g){function c(a,
|
2 |
+
l,c){return(a=b[a])&&a[c]?a[c]:l||""}g=m(g);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,e){e=Number(g(e));isNaN(e)&&(e=0);return c(a,e?b:a,e)},load:function(a){b=a||{};return this},pluraleq:function(a){g=m(a);return this}}};return f}({},r,s));n.register("$2",function(f,d,n){f.ie=function(){var d=k&&k.browser||{},g=d.msie&&11>Number(d.version),d=null;return function(){return g}}();f.init=function(){return f};return f}({},r,s));n.register("$3",
|
3 |
+
function(f,d,k){Number.prototype.format=function(d){d=Math.pow(10,d||0);var g=Math.round(d*this)/d;d=[];var g=String(g),c=g.split("."),g=c[0],c=c[1],b=g.length;do d.unshift(g.substring(b-3,b));while(0<(b-=3));g=d.join(",");if(d=c){d=c;for(var a,c=d.length;"0"===d.charAt(--c);)a=c;a&&(d=d.substring(0,a));d=c=d}d&&(g+="."+c);return g};Number.prototype.percent=function(d){var g=0,c=this&&d?100*(this/d):0;if(0===c)return"0";if(100===c)return"100";if(99<c)c=Math.min(c,99.9),d=c.format(++g);else if(0.5>
|
4 |
+
c){c=Math.max(c,1E-4);do d=c.format(++g);while("0"===d&&4>g);d=d.substr(1)}else d=c.format(0);return d};return f}({},r,s));n.register("$4",function(f,d,k){Array.prototype.indexOf||(Array.prototype.indexOf=function(d){if(null==this)throw new TypeError;var g,c=Object(this),b=c.length>>>0;if(0===b)return-1;g=0;1<arguments.length&&(g=Number(arguments[1]),g!=g?g=0:0!=g&&Infinity!=g&&-Infinity!=g&&(g=(0<g||-1)*Math.floor(Math.abs(g))));if(g>=b)return-1;for(g=0<=g?g:Math.max(b-Math.abs(g),0);g<b;g++)if(g in
|
5 |
+
c&&c[g]===d)return g;return-1});return f}({},r,s));n.register("$5",function(f,d,k){f.trim=function(d,g){for(g||(g=" \n");d&&-1!==g.indexOf(d.substr(0,1));)d=d.substr(1);for(;d&&-1!==g.indexOf(d.substr(-1));)d=d.substr(0,d.length-1);return d};f.sprintf=function(d){var g=0,c,b=[].slice.call(arguments,1);return d.replace(/%([sud%])/g,function(a,l){if("%"===l)return"%";c=b[g++];return String(c)||""})};return f}({},r,s));n.register("$20",function(f,d,k){function m(g){return function(c,b){for(var a=c[g]||
|
6 |
+
0;(c=c.offsetParent)&&c!==(b||k.body);)a+=c[g]||0;return a}}f.top=m("offsetTop");f.left=m("offsetLeft");f.el=function(g,c){var b=k.createElement(g||"div");c&&(b.className=c);return b};f.txt=function(g){return k.createTextNode(g||"")};return f}({},r,s));n.register("$6",function(f,d,E){function m(a,b,c){function l(){e();w=setTimeout(b,c)}function e(){w&&clearTimeout(w);w=null}var w;l();k(a).mouseenter(e).mouseleave(l);return{die:function(){e();k(a).off("mouseenter mouseleave")}}}function g(a,b){a.fadeTo(b,
|
7 |
+
0,function(){a.slideUp(b,function(){a.remove();k(d).triggerHandler("resize")})});return a}function c(a,b){function c(b){p[w]=null;g(k(a),250);e&&e.die();var l;if(l=b)b.stopPropagation(),b.preventDefault(),l=!1;return l}function l(b){e&&e.die();return e=m(a,c,b)}var e,w,v,B=k(a),q=B.find("button");0===q.length&&(B.addClass("is-dismissible"),q=k('<button type="button" class="notice-dismiss"> </a>').appendTo(B));q.off("click").click(c);k(d).triggerHandler("resize");h();w=p.length;p.push(c);b&&(e=l(b));
|
8 |
+
return{link:function(b,l){var c=l||b,e=k(a).find("nav"),c=k("<nav></nav>").append(k("<a></a>").attr("href",b).text(c));v?(v.push(c.html()),e.html(v.join("<span> | </span>"))):(v=[c.html()],k(a).addClass("has-nav").append(c));return this},stick:function(){e&&e.die();e=null;p[w]=null;return this},slow:function(a){l(a||1E4);return this}}}function b(a,b,c){var l=n.require("$20","dom.js").el;a=k('<div class="notice notice-'+a+' loco-notice inline"></div>').prependTo(k("#loco-notices"));var e=k(l("p"));
|
9 |
+
c=k(l("span")).text(c);b=k(l("strong","has-icon")).text(b+": ");e.append(b).append(c).appendTo(a);return a}function a(a,l,e,w){a=b(e,l,a).css("opacity","0").fadeTo(500,1);k(d).triggerHandler("resize");return c(a,w)}function l(b){return a(b,D,"warning")}function e(){k("#loco-notices").find("div.notice").each(function(a,b){if(-1===b.className.indexOf("jshide")){var l=-1===b.className.indexOf("notice-success")?null:5E3;c(b,l)}})}var p=[],h=Date.now||function(){return(new Date).getTime()},v,D,q,w;f.error=
|
10 |
+
function(b){return a(b,v,"error")};f.warn=l;f.info=function(b){return a(b,q,"info")};f.success=function(b){return a(b,w,"success",5E3)};f.warning=l;f.log=function(){d.console&&console.log&&console.log.apply(console,arguments)};f.debug=function(a,b){d.console&&console.error&&(console.error("Loco Error: "+a),b&&console.debug&&console.debug(b))};f.clear=function(){for(var a=-1,b,l=p,c=l.length;++a<c;)(b=l[a])&&b.call&&b();p=[];return f};f.create=b;f.raise=function(a){(f[a.type]||f.error).call(f,a.message)};
|
11 |
+
f.convert=c;f.init=function(a){v=a._("Error");D=a._("Warning");q=a._("Notice");w=a._("OK");setTimeout(e,1E3);return f};return f}({},r,s));n.register("$7",function(f,d,E){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 g(a){return(a=a.split(/[\r\n]/)[0])?(a=a.replace(/ +in +\S+ on line \d+/,""),a=a.replace(/^[()! ]+Fatal error:\s*/,"")):t._("Server returned invalid data")}
|
12 |
+
function c(a,b,l){a[b]=l}function b(a,b,l){a.push({name:b,value:l})}function a(a,b,l){a.append(b,l)}function l(a,b,l,c){function e(b,c,v){if("abort"!==c){var d=p||{_:function(a){return a}},B=b.status,u=b.responseText,A=m(u),q=b.getResponseHeader("Content-Type")||"text/html",f=b.getResponseHeader("Content-Length")||u.length;"success"===c&&v?z.error(v):(z.error(g(A)+".\n"+d._("Check console output for debugging information")),z.debug("Ajax failure for "+a,{status:B,error:c,message:v,output:u}),"parsererror"===
|
13 |
+
c&&(v="Response not JSON"),z.log([d._("Provide the following text when reporting a problem")+":","----","Status "+B+' "'+(v||d._("Unknown error"))+'" ('+q+" "+f+" bytes)",A,"===="].join("\n")));l&&l.call&&l(b,c,v);h=b}}c.url=v;c.dataType="json";var z=n.require("$6","notices.js").clear();h=null;return k.ajax(c).fail(e).done(function(a,l,c){var w=a&&a.data,h=a&&a.notices,v=h&&h.length;for(!w||a.error?e(c,l,a&&a.error&&a.error.message):b&&b(w,l,c);v--;)z.raise(h[v])})}var e={},p,h,v=d.ajaxurl||"/wp-admin/admin-ajax.php";
|
14 |
+
f.init=function(a){e=a.nonces||e;return f};f.localise=function(a){p=a;return f};f.xhr=function(){return h};f.strip=m;f.parse=g;f.submit=function(a,b,c){function e(a,b){b.disabled?b.setAttribute("data-was-disabled","true"):b.disabled=!0}function h(a,b){b.getAttribute("data-was-disabled")||(b.disabled=!1)}function v(a){a.find(".button-primary").removeClass("loading");a.find("button").each(h);a.find("input").each(h);a.find("select").each(h);a.find("textarea").each(h);a.removeClass("disabled loading")}
|
15 |
+
var g=k(a),p=g.serialize();(function(a){a.find(".button-primary").addClass("loading");a.find("button").each(e);a.find("input").each(e);a.find("select").each(e);a.find("textarea").each(e);a.addClass("disabled loading")})(g);return l(a.route.value,function(a,l,c){v(g);b&&b(a,l,c)},function(a,b,l){v(g);c&&c(a,b,l)},{type:a.method,data:p})};f.post=function(h,v,w,g){var p,z=!0;v=v||{};(p=e[h])||(d.console&&console.error&&console.error('No nonce for "'+h+'"'),p="");var H=p;d.FormData&&v instanceof FormData?
|
16 |
+
(z=!1,p=a):p=Array.isArray(v)?b:c;p(v,"action","loco_json");p(v,"route",h);p(v,"loco-nonce",H);return l(h,w,g,{type:"post",data:v,processData:z,contentType:z?"application/x-www-form-urlencoded; charset=UTF-8":!1})};f.setNonce=function(a,b){e[a]=b;return f};return f}({},r,s));n.register("$21",{arab:1,aran:1,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,
|
17 |
+
he:1,nqo:1,ps:1,ur:1,yi:1});n.register("$8",function(f,d,k){function m(){}var g,c=n.require("$21","rtl.json");f.init=function(){return new m};f.cast=function(b){return b instanceof m?b:"string"===typeof b?f.parse(b):f.clone(b)};f.clone=function(b){var a,l=new m;for(a in b)l[a]=b[a];return l};f.parse=function(b){if(!(g||(g=/^([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=
|
18 |
+
b.toLowerCase();return a};d=m.prototype;d.isValid=function(){return!!this.lang};d.isKnown=function(){var b=this.lang;return!(!b||"zxx"===b)};d.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};d.getIcon=function(){for(var b=3,a,l,c=["variant","region","lang"],p=[];0!==b--;)if(a=c[b],l=this[a])p.push(a),p.push(a+"-"+l.toLowerCase());return p.join(" ")};d.isRTL=function(){return!!c[String(this.lang).toLowerCase()]};d=null;return f}({},
|
19 |
+
r,s));n.register("$22",{"\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","\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",
|
20 |
+
"\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","\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",
|
21 |
+
"\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","\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",
|
22 |
+
"\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","\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",
|
23 |
+
"\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","\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",
|
24 |
+
"\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","\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",
|
25 |
+
"\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","\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",
|
26 |
+
"\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","\u03ac":"\u03b1","\u1f71":"\u03b1","\u1fb4":"\u03b1","\u1f70":"\u03b1","\u1fb2":"\u03b1","\u1fb0":"\u03b1","\u1fb6":"\u03b1","\u1fb7":"\u03b1","\u1fb1":"\u03b1","\u1fb3":"\u03b1","\u1f10":"\u03b5",
|
27 |
+
"\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","\u1f25":"\u03b7","\u1f95":"\u03b7","\u1f23":"\u03b7","\u1f93":"\u03b7","\u1f27":"\u03b7","\u1f97":"\u03b7","\u1f91":"\u03b7","\u03ae":"\u03b7","\u1f75":"\u03b7","\u1fc4":"\u03b7","\u1f74":"\u03b7",
|
28 |
+
"\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","\u03ca":"\u03b9","\u0390":"\u03b9","\u1fd3":"\u03b9","\u1fd2":"\u03b9","\u1fd7":"\u03b9","\u1fd1":"\u03b9","\u1f40":"\u03bf","\u1f44":"\u03bf","\u1f42":"\u03bf","\u1f41":"\u03bf","\u1f45":"\u03bf",
|
29 |
+
"\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","\u1fe0":"\u03c5","\u1fe6":"\u03c5","\u03cb":"\u03c5","\u03b0":"\u03c5","\u1fe3":"\u03c5","\u1fe2":"\u03c5","\u1fe7":"\u03c5","\u1fe1":"\u03c5","\u1f60":"\u03c9","\u1f64":"\u03c9","\u1fa4":"\u03c9",
|
30 |
+
"\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","\u1ff2":"\u03c9","\u1ff6":"\u03c9","\u1ff7":"\u03c9","\u1ff3":"\u03c9","\u0491":"\u0433","\u0450":"\u0435","\u0451":"\u0435","\u04c2":"\u0436","\u045d":"\u0438","\u04e3":"\u0438","\u04ef":"\u0443"});
|
31 |
+
n.register("$9",function(f,d,k){f.init=function(){function d(a){return h[a]||a}function g(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 g(String(a||"").toLowerCase().replace(e,d),p,[],{})}function b(a,b){for(var c=[],h={},A,u=b.length,z=p;0!==u--;)(A=b[u])&&g(String(A||"").toLowerCase().replace(e,d),z,c,h);l[a]=c}function a(a,b){var c=[],e=-1,h=l,p=h.length,g,d,C,f,k,B,I=a.length,L=b?!0:!1;a:for(;++e<p;)if(C=h[e],null!=C&&
|
32 |
+
(f=C.length)){k=0;b:for(;k<I;k++){B=a[k];for(g=0;g<f;g++)if(d=C[g],0===d.indexOf(B))continue b;continue a}c.push(L?b[e]:e)}return c}var l=[],e=/[^a-z0-9]/g,p=/[\-_\s.?!;:,*^+=~`"(){}<>\[\]\/\\\u00a0\u1680\u180e\u2000-\u206f\u2e00-\u2e7f\u3000-\u303f]+/,h=n.require("$22","flatten.json");return{split:c,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=
|
33 |
+
[]},remove:function(a){l[a]=null}}};return f}({},r,s));n.register("$10",function(f,d,n){f.listen=function(f,g){function c(){q[e?"show":"hide"]()}function b(a){D&&f.setAttribute("size",2+a.length);e=a;c();return a}function a(){p=null;g(e)}function l(){var c=f.value;v&&c===v&&(c="");c!==e&&(p&&clearTimeout(p),b(c),h?p=setTimeout(a,h):a())}f instanceof jQuery&&(f=f[0]);var e,p,h=150,v=d.attachEvent&&f.getAttribute("placeholder"),D=1===Number(f.size),q=k('<a href="#clear" tabindex="-1" class="icon clear"><span>clear</span></a>').click(function(){f.value=
|
34 |
+
"";l();return!1});b(f.value);k(f).on("input blur focus",function(){l();return!0}).after(q);c();return{delay:function(a){h=a},ping:function(c){c?(p&&clearTimeout(p),c=f.value,v&&c===v&&(c=""),b(c),a(),c=void 0):c=l();return c},val:function(a){if(null==a)return e;p&&clearTimeout(p);f.value=b(a);c()},el:function(){return f},blur:function(a){return k(f).on("blur",a)}}};return f}({},r,s));n.register("$11",function(f,d,n){function m(b,a){this.$element=k(b);this.options=a;this.enabled=!0;this.fixTitle()}
|
35 |
+
f.init=function(b,a){var l={fade:!0,offset:5,delayIn:g,delayOut:c,anchor:b.attr("data-anchor"),gravity:b.attr("data-gravity")||"s"};a&&(l=k.extend({},l,a));b.tipsy(l)};f.delays=function(b,a){g=b||150;c=a||100};f.kill=function(){k("div.tipsy").remove()};f.text=function(b,a){a.data("tipsy").setTitle(b)};var g,c;f.delays();k(n.body).on("overlayOpened overlayClosing",function(b){f.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?
|
36 |
+
"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,height:b[0].offsetHeight}),c=a[0].offsetWidth,e=a[0].offsetHeight,p="function"==typeof this.options.gravity?this.options.gravity.call(this.$element[0]):this.options.gravity,h;switch(p.charAt(0)){case "n":h={top:b.top+b.height+this.options.offset,left:b.left+b.width/2-c/2};break;case "s":h={top:b.top-
|
37 |
+
e-this.options.offset,left:b.left+b.width/2-c/2};break;case "e":h={top:b.top+b.height/2-e/2,left:b.left-c-this.options.offset};break;case "w":h={top:b.top+b.height/2-e/2,left:b.left+b.width+this.options.offset}}2==p.length&&("w"==p.charAt(1)?h.left=b.left+b.width/2-15:h.left=b.left+b.width/2-c+15);a.css(h).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]):
|
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"))&&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=
|
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?"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(),
|
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=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 e(){var c=a(this),l=b.delayOut;c.hoverState=
|
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 p=b.live?"live":"bind",h="hover"==b.trigger?"mouseleave":"blur";this[p]("hover"==b.trigger?"mouseenter":"focus",c)[p](h,e)}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};
|
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(n).scrollTop()+k(d).height()/2?"s":"n"};k.fn.tipsy.autoWE=function(){return k(this).offset().left>k(n).scrollLeft()+k(d).width()/2?"e":"w"};k.fn.tipsy.autoBounds=function(b,a){return function(){var c=a[0],e=1<a.length?a[1]:!1,p=k(n).scrollTop()+b,h=k(n).scrollLeft()+b,g=k(this);g.offset().top<p&&(c="n");g.offset().left<h&&(e="w");k(d).width()+k(n).scrollLeft()-
|
43 |
+
g.offset().left<b&&(e="e");k(d).height()+k(n).scrollTop()-g.offset().top<b&&(c="s");return c+(e?e:"")}};return f}({},r,s));n.register("$35",function(f,d,k){"".localeCompare||(String.prototype.localeCompare=function(){return 0});"".trim||(String.prototype.trim=function(){return n.require("$5","string.js").trim(this," \n\r\t")});f.html=function(){function d(){b=/[<>&]/g;a=/(\r\n|\n|\r)/g;l=/(?:https?):\/\/(\S+)/ig;e=location.hostname;d=null}function g(a){return"&#"+a.charCodeAt(0)+";"}function c(a,
|
44 |
+
b){return'<a href="'+a+'" target="'+(b.indexOf(e)?"_blank":"_top")+'">'+b+"</a>"}var b,a,l,e;return function(e,h){d&&d();var v=e.replace(b,g);h&&(v=v.replace(l,c).replace(a,"<br />"));return v}}();return f}({},r,s));n.register("$36",function(f,d,k){function m(){}var g,c,b=n.require("$21","rtl.json");f.init=function(){return new m};f.cast=function(a){return a instanceof m?a:"string"===typeof a?f.parse(a):f.clone(a)};f.clone=function(a){var b,c=new m;for(b in a)c[b]=a[b];return c};f.parse=function(a){g||
|
45 |
+
(c=/[-_+]/,g=/^([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(!g.exec(a))return null;var b=new m;b.lang=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};d=m.prototype;d.isValid=function(){return!!this.lang};d.isKnown=function(){var a=
|
46 |
+
this.lang;return!(!a||"zxx"===a)};d.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};d.getIcon=function(){for(var a=4,b,c,g=["variant","region","script","lang"],h=[];0!==a--;)if(b=g[a],c=this[b])c.join&&(c=c.join("-")),1===a&&3===c.length?h.push("region-m49"):h=h.concat([b,b+"-"+c.toLowerCase()]);return h.join(" ")};d.isRTL=function(){return!!b[String(this.script||this.lang).toLowerCase()]};
|
47 |
+
d=null;return f}({},r,s));n.register("$37",function(f,d,k){function m(a){d.console&&console.error&&console.error(a)}function g(){m("Method not implemented")}function c(){}function b(a){}c.prototype.toString=function(){return"[Undefined]"};b.prototype._validate=function(a){var b,e,p=!0;for(b in this)e=this[b],e===g?(m(a+"."+b+"() must be implemented"),p=!1):e instanceof c&&(m(a+"."+b+" must be defined"),p=!1);return p};f.init=function(a,l){var e,p=new b;if(a)for(e=a.length;0!==e--;)p[a[e]]=g;if(l)for(e=
|
48 |
+
l.length;0!==e--;)p[l[e]]=new c;return p};f.validate=function(a){var b=/function (\w+)\(/.exec(a.toString())?RegExp.$1:"";a.prototype._validate(b||"Object")};return f}({},r,s));n.register("$46",function(f,d,k){var m=d.requestAnimationFrame,g=d.cancelAnimationFrame,c=0;if(!m||!g)for(var b in{ms:1,moz:1,webkit:1,o:1})if(m=d[b+"RequestAnimationFrame"])if(g=d[b+"CancelAnimationFrame"]||d[b+"CancelRequestAnimationFrame"])break;m&&g||(m=function(b){var e=a();timeToCall=Math.max(0,16-(e-c));nextTime=e+timeToCall;
|
49 |
+
timerId=d.setTimeout(function(){b(nextTime)},timeToCall);c=nextTime;return timerId},g=function(a){clearTimeout(a)});var a=Date.now||function(){return(new Date).getTime()};f.loop=function(a,b){function c(){d=m(c,b);a(h++)}var h=0,d;c();return{stop:function(){d&&g(d);d=null}}};return f}({},r,s));n.register("$43",function(f,d,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,
|
50 |
+
e,l)}}}function g(a){a.preventDefault();a.stopPropagation();return!1}var c,b=!!d.navigator.msPointerEnabled,a=b?"MSPointerDown":"touchstart",l=b?"MSPointerMove":"touchmove",e=b?"MSPointerUp":"touchend";f.ok=function(a){null==c&&(c="function"===typeof k.body.addEventListener);c&&a&&a(f);return c};f.ms=function(){return b};f.dragger=function(b,c){function h(a){b.addEventListener(a,d[a],!1)}function w(a){b.removeEventListener(a,d[a],!1)}var d={};d[a]=function(b){p(b,function(e,h){h.type=a;c(b,h,u)});
|
51 |
+
h(l);h(e);return!0};d[e]=function(a){w(l);w(e);p(a,function(b,h){h.type=e;c(a,h,u)});return!0};d[l]=function(a){p(a,function(b,e){e.type=l;c(a,e,u)});return g(a)};h(a);var u={kill:function(){w(a);w(l);w(e);b=u=c=null}};return u};f.swiper=function(c,d,f){function w(a){c.addEventListener(a,k[a],!1)}function A(a){c.removeEventListener(a,k[a],!1)}function u(){z&&z.stop();z=null}var z,H,C,k={},m=[],B=[],I=[];k[a]=function(a){H=!1;u();var b=h();p(a,function(a,c){m[a]=b;B[a]=c.clientX;I[a]=c.clientY});C=
|
52 |
+
c.scrollLeft;return!0};k[e]=function(a){p(a,function(a,b){var c=h()-m[a],e=B[a]-b.clientX,c=Math.abs(e)/c;d(c,e?0>e?-1:1:0)});C=null;return!0};k[l]=function(a){var b,e;null==C||p(a,function(a,c){b=B[a]-c.clientX;e=I[a]-c.clientY});if(e&&Math.abs(e)>Math.abs(b))return H=!0;b&&(H=!0,c.scrollLeft=Math.max(0,C+b));return g(a)};if(!b||f)w(a),w(l),w(e),b&&(c.className+=" mstouch");return{kill:function(){A(a);A(l);A(e);u()},swiped:function(){return H},ms:function(){return b},snap:function(a){b&&!f&&(c.style["-ms-scroll-snap-points-x"]=
|
53 |
+
"snapInterval(0px,"+a+"px)",c.style["-ms-scroll-snap-type"]="mandatory",c.style["-ms-scroll-chaining"]="none")},scroll:function(a,b,e){u();var h=c.scrollLeft,l=a>h?1:-1,B=Math[1===l?"min":"max"],g=Math.round(16*b*l);return z=n.require("$46","fps.js").loop(function(b){b&&(h=Math.max(0,B(a,h+g)),c.scrollLeft=h,a===h&&(u(),e&&e(h)))},c)}}};f.start=function(b,c){return m(b,a,c,!1)};f.move=function(a,b){return m(a,l,b,!1)};f.end=function(a,b){return m(a,e,b,!1)};var p=f.each=function(a,c){if(b)(a.MSPOINTER_TYPE_TOUCH||
|
54 |
+
"touch")===a.pointerType&&c(0,a);else for(var e=-1,h=(a.originalEvent||a).changedTouches||[];++e<h.length;)c(e,h[e])},h=Date.now||function(){return(new Date).getTime()};return f}({},r,s));n.register("$47",function(f,d,n){f.init=function(d){function g(){l.style.top=String(-d.scrollTop)+"px";return!0}function c(){var a=l;a.textContent=d.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'+
|
55 |
+
a.charCodeAt(0).toString(16)+'">'+a+"</span>"}var a=d.parentNode,l=a.insertBefore(n.createElement("div"),d);k(d).on("input",c).on("scroll",g);k(a).addClass("has-mirror");l.className="ta-mirror";var e=d.offsetWidth-d.clientWidth;2<e&&(l.style.marginRight=String(e-2)+"px");c();g();return{kill:function(){k(d).off("input",c).off("scroll",g);a.removeChild(l);l=null;k(a).removeClass("has-mirror")}}};return f}({},r,s));n.register("$29",function(f,d,k){function m(b,a){for(var c=0,e=-1,p=a&&d[a],h=g[b]||[],
|
56 |
+
v=h.length;++e<v;)callback=h[e],"function"===typeof callback&&(callback(p),c++);return c}var g={},c;f.load=function(b,a,c){function e(){v&&(clearTimeout(v),v=null);f&&(f.onreadystatechange=null,f=f=f.onload=null);b&&(delete g[b],b=null)}function p(a,h){var g=f&&f.readyState;if(h||!g||"loaded"===g||"complete"===g)h||m(b,c),e()}function h(){if(0===m(b))throw Error('Failed to load "'+(c||b)+'"');e()}if(c&&d[c])"function"===typeof a&&a(d[c]);else if(null!=g[b])g[b].push(a);else{g[b]=[a];var v=setTimeout(h,
|
57 |
+
4E3),f=k.createElement("script");f.setAttribute("src",b);f.setAttribute("async","true");f.onreadystatechange=p;f.onload=p;f.onerror=h;f.onabort=e;k.getElementsByTagName("head")[0].appendChild(f)}};f.stat=function(b){var a;if(!(a=c)){for(var l,e,g=k.getElementsByTagName("script"),h=-1,d=g.length;++h<d;)if(a=g[h].getAttribute("src"))if(l=a.indexOf("/lib/vendor"),-1!==l){e=a.substr(0,l);break}a=c=e||"/static"}return a+b};return f}({},r,s));n.register("$15",function(f,d,E){function m(a,b){a.setReadOnly(!1);
|
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 g(a){a.off("change");a.off("focus");a.off("blur")}function c(a){g(a);a.setReadOnly(!0);a.setHighlightGutterLine(!1);a.setHighlightActiveLine(!1)}function b(b,c){function e(){this.HighlightRules=l}var l=a(c),g=b.require,d=g("ace/lib/oop");d.inherits(l,g("ace/mode/text_highlight_rules").TextHighlightRules);d.inherits(e,g("ace/mode/text").Mode);return new e}
|
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",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",
|
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 p:return e||"%%"}}var e,p="auto";f.init=function(a,e,l){var f,w=!1,A=l||p,u=a.parentNode,z=u.appendChild(E.createElement("div"));k(u).addClass("has-proxy has-ace");n.require("$29","remote.js").load("https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.1/ace.js",
|
64 |
+
function(l){if(z){if(!l)throw Error("Failed to load code editor");f=l.edit(z);var g=f.session,d=f.renderer;f.$blockScrolling=Infinity;f.setShowInvisibles(w);f.setWrapBehavioursEnabled(!1);f.setBehavioursEnabled(!1);f.setHighlightActiveLine(!1);g.setUseSoftTabs(!1);d.setShowGutter(!0);d.setPadding(10);d.setScrollMargin(8);g.setMode(b(l,A));f.setValue(a.value,-1);g.setUseWrapMode(!0);e?m(f,e):c(f)}},"ace");return{kill:function(){f&&(g(f),f.destroy(),f=null);z&&(u.removeChild(z),k(u).removeClass("has-proxy has-ace"),
|
65 |
+
z=null);return this},disable:function(){f&&c(f);e=null;return this},enable:function(a){e=a;f&&m(f,a);return this},resize:function(){f&&f.resize();return this},val:function(a){f&&a!==f.getValue()&&f.setValue(a,-1);return this},invs:function(a){a=a||!1;w!==a&&(w=a,f&&f.setShowInvisibles(a));return this},strf:function(a){a=a||p;a!==A&&(A=a,f&&f.session.setMode(b(d.ace,a)));return this},focus:function(){return this}}};f.strf=function(a,b){p=a;e=b;return f};return f}({},r,s));n.register("$48",function(f,
|
66 |
+
d,E){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 g(a){a.off("input");a.off("change");a.off("focus");a.off("blur")}function c(a){g(a);a.setMode("readonly")}var b=0;f.load=function(a){var b=n.require("$29","remote.js");b.load(b.stat("/lib/tinymce.min.js"),a,"tinymce");return f};f.init=function(a,l){function e(a){D=a;q="<p>"===a.substr(0,3)&&
|
67 |
+
"</p>"===a.substr(-4);return a.replace(/(<\/?)script/ig,"$1loco:script")}function d(a){h=a;a._getContent=a.getContent;a.getContent=function(a){a=this._getContent(a);a=a.replace(/(<\/?)loco:script/ig,"$1script");if(!q&&"<p>"===a.substr(0,3)&&"</p>"===a.substr(-4)){var b=a.substr(3,a.length-7);if(b===D||-1===b.indexOf("</p>"))a=b}return a};a._setContent=a.setContent;a.setContent=function(a,b){return this._setContent(e(a),b)};l?(m(a,l),l.reset()):c(a);k(u).removeClass("loading")}var h,v=!1,D="",q=!1,
|
68 |
+
w=a.parentNode,A=w.parentNode,u=w.appendChild(E.createElement("div")),z=A.insertBefore(E.createElement("nav"),w);z.id="_tb"+String(++b);k(w).addClass("has-proxy has-mce");k(u).addClass("mce-content-body loading").html(e(a.value));f.load(function(a){if(!a)throw Error("Failed to load HTML editor");u&&a.init({inline:!0,target:u,hidden_input:!1,theme:"modern",skin:!1,plugins:"link lists",browser_spellcheck:!0,menubar:!1,fixed_toolbar_container:"#"+z.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:d})});return{val:function(b){b=e(b);null==h?(a.value=b,k(u).html(b)):h.getContent()!==b&&h.setContent(b);l&&l.val(b);return this},kill:function(){h&&(l&&l.val(h.getContent()),g(h),h.destroy(),h=null);u&&(w.removeChild(u),k(w).removeClass("has-proxy has-mce"),u=null);z&&(A.removeChild(z),z=null);return this},enable:function(a){l=a;h&&m(h,a);return this},disable:function(){h&&c(h);l=null;return this},
|
71 |
+
focus:function(){h&&l&&h.focus();return this},invs:function(a){a=a||!1;v!==a&&(v=a,k(w)[a?"addClass":"removeClass"]("show-invs"));return this}}};return f}({},r,s));n.register("$44",function(f,d,E){function m(b){function a(){d&&(f.off("input",l),d=!1)}function l(){var a=b.value;a!==w&&(f.trigger("changing",[a,w]),w=a)}function e(){l();d&&A!==w&&f.trigger("changed",[w])}function g(){c=b;A=w;d||(f.on("input",l),d=!0);f.trigger("editFocus");q.addClass("has-focus");return!0}function h(){c===b&&(c=null);
|
72 |
+
f.trigger("editBlur");q.removeClass("has-focus");d&&(e(),a());return!0}var d=!1,f=k(b),q=k(b.parentNode),w=b.value,A;f.blur(h).focus(g);return{val:function(a){w!==a&&(b.value=a,f.triggerHandler("input"),w=a);return!0},kill:function(){a();f.off("blur",h).off("focus",g)},fire:function(){w=null;l()},ping:e,blur:h,focus:g,reset:function(){A=w=b.value}}}function g(b){this.e=b}var c;f._new=function(b){return new g(b)};f.init=function(b){var a=new g(b);b.disabled?(b.removeAttribute("disabled"),a.disable()):
|
73 |
+
b.readOnly?a.disable():a.enable();return a};TextAreaPrototype=g.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,e=this.p;e&&e.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("$47","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,g=this.i||!1;b!==(this.m||"")&&(this.m=b,a&&a.kill(),this.p=a="code"===b?n.require("$15","ace.js").init(this.e,this.l,this["%"]):"html"===b?n.require("$48","mce.js").init(this.e,this.l):null,this.setInvs(g,
|
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 f}({},r,s));n.register("$45",function(f,d,n){function m(a){var b=d.console;b&&b.error&&b.error(a)}
|
78 |
+
function g(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 e(a,b,c){function e(a){m("row["+a+"] disappeared");return{cellVal:function(){return""}}}return function(h){var g=b||0,d=c?-1:1,l=a.rows||[];h.sort(function(a,b){return d*(l[a]||e(a)).cellVal(g).localeCompare((l[b]||e(b)).cellVal(g))})}}function p(a){this.w=a}function h(a){this.t=a;this.length=0}function v(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 D(a){this.live=a;this.rows=[]}f.create=function(a){return new p(a)};var q=p.prototype;q.init=function(e){var h=this.w,d=h.id,p=h.splity(d+"-thead",d+"-tbody"),f=p[0],p=p[1],C=[],q=[],m=[],B=[];if(e)this.ds=e,this.idxs=q,this._idxs=null;else if(!(e=this.ds))throw Error("No datasource");f.css.push("wg-thead");p.css.push("wg-tbody");e.eachCol(function(a,b,c){m[a]=d+"-col-"+b;B[a]=c||b});for(var I=g(),L=-1,D=m.length,n=g("wg-cols"),J=f.splitx.apply(f,m);++L<D;)J[L].header(B[L]),
|
81 |
+
n.appendChild(I.cloneNode(!1)).setAttribute("for",m[L]);e.eachRow(function(a,b,c){C[a]=new v(a,b,c);q[a]=a});this.rows=C;this.cols=n;this.ww=null;this.root=I=p.body;this.head=f;f.redraw=c(this);f=p.fixed=J[0].bodyY()||20;h.lock().resize(f,p);h.css.push("is-table");h.restyle();this.sc?this._re_sort(D):e.sort&&e.sort(q);this.redrawDirty();this.render();k(I).attr("tabindex","-1").on("keydown",l(this)).on("mousedown",b(this)).on("scroll",a(this));return this};q.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};q.render=function(){for(var a,b,c=[],e=this.rows||[],h=-1,g,d=this.idxs,l=d.length,B=this.idxr={},p=this.r,f=this._r,v=this.root,k=this.cols;++h<l;){0===h%100&&(a=k.cloneNode(!0),b=new D(a),b.h=2200,b.insert(v),c.push(b));g=d[h];B[g]=h;a=e[g];if(null==a)throw Error("Render error, no data at ["+g+"]");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!=f&&(a=e[f])&&a.page&&(delete this._r,this.select(f,!0)):(a=e[p])&&a.page?this.select(p,!0):(this.deselect(),this._r=p);return this};q.resize=function(){var a=-1,b=this.ww||(this.ww=[]),c=this.w,e=c.cells[0],h=e.body.childNodes,g=h.length,d=this.pages||[],l=d.length;for(c.redraw.call(e);++a<g;)b[a]=h[a].style.width;if(l){c=this.mx;for(a=this.mn;a<=c;a++)d[a].widths(b);this.redrawDirty()&&this.redraw()}};q.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};q.redraw=function(){for(var a=0,b=-1,c=null,e=null,h=this.ww,g=this.sy,d=this.vh,l=this.mn,B=this.mx,p=Math.max(0,g-100),g=d+g+100,f=this.pages||[],v=f.length;++b<v&&!(a>g);)d=f[b],a+=d.height(),a<p||(null===c&&(c=b),e=b,d.rendered||d.render(h));if(l!==c){if(null!==l&&c>l)for(b=l;b<c;b++){d=f[b];if(!d)throw Error("Shit!");d.rendered&&d.sleep()}this.mn=c}if(B!==e){if(null!==B&&e<B)for(b=B;b>e;b--)d=f[b],
|
85 |
+
d.rendered&&d.sleep();this.mx=e}};q.selected=function(){return this.r};q.thead=function(){return this.w.cells[0]};q.tbody=function(){return this.w.cells[1]};q.tr=function(a){return(a=this.row(a))?a.cells():[]};q.row=function(a){return this.rows[a]};q.td=function(a,b){return this.tr(a)[b]};q.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};q.selectNext=function(a,b,c){a=this.next(a,b);null!=a&&this.r!==a&&this.select(a,c);return this};q.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};q.selectRow=function(a,b){return this.select(this.idxs[a])};q.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};q.unfilter=function(){this._idxs&&(this.idxs=this._sort(this._idxs),this._idxs=null,this.clear().render());return this};q.filter=
|
88 |
+
function(a){this._idxs||(this._idxs=this.idxs);this.idxs=this._sort(a);return this.clear().render()};q.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};q.sortable=function(a){var b=this.sc||(this.sc=new h(this));b.has(a)||b.add(a);return this};q._re_sort=function(a){var b=-1,c=this.sc,e=c.active;for(this.sc=c=new h(this);++b<a;)c.add(b);e&&(b=this.head.indexOf(e.id),-1===b&&(b=Math.min(e.idx,a-1)),this.sort(b,e.desc));return this};q._sort=
|
89 |
+
function(a,b){b?(this.s=b,b(a)):(b=this.s)&&b(a);return a};q.sort=function(a,b){this._sort(this.idxs,e(this,a,b));this.sc.activate(a,b);return this};q=null;q=h.prototype;q.has=function(a){return null!=this[a]};q.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};q.toggle=function(a){this.t.sort(a,!this[a].desc).clear().render();
|
90 |
+
return this};q.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};q=null;q=v.prototype;q.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};q.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};q.cells=function(){return this.c||[this._]};q.data=function(){for(var a=-1,b=[],c=this.length;++a<c;)b[a]=this.cellVal(a);return b};q.destroy=function(){this.page=null;this.rendered=!1};q.cellVal=function(a){a=this.d[a]()||"";return String(a.textContent||a)};q=null;q=D.prototype;q.size=function(){return this.rows.length};
|
92 |
+
q.insert=function(a){var b=this.h,c=g("wg-dead");c.style.height=String(b)+"px";a.appendChild(c);return this.dead=c};q.top=function(){return(this.rendered?this.live:this.dead).offsetTop};q.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};q.render=function(a){for(var b,c=-1,e=this.rows,d=e.length,h=this.dead,g=this.live,l=g.childNodes;++c<d;)b=e[c],b.rendered||b.render(l);d=a.length;for(c=0;c<
|
93 |
+
d;c++)l[c].style.width=a[c];h.parentNode.replaceChild(g,h);this.rendered=!0;this.h=null;return this};q.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};q.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};q.widths=function(a){for(var b=this.live.childNodes,c=a.length;0!==c--;)b[c].style.width=a[c];return this};
|
94 |
+
q.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()};q=null;return f}({},r,s));n.register("$38",function(f,d,s){function m(a,b){var c=a.id,e=c&&w[c],d=e&&e.parent();if(!e||!d)return null;var h=d.dir===q,c=h?"X":"Y",g="page"+c,h=h?D:v,l=h(d.el),c=b["offset"+c],p=d.el,f=p.className;null==c&&(c=b[g]-h(a));c&&(l+=c);p.className=f+" is-resizing";return{done:function(){p.className=f},move:function(a){d.resize(a[g]-l,
|
95 |
+
e);return!0}}}function g(a,c){function e(){k(s).off("mousemove",d);u&&(u.done(),u=null);return!0}function d(a){u?u.move(a):e();return!0}if(u)return!0;u=m(a.target,a);if(!u)return!0;k(s).one("mouseup",e).on("mousemove",d);return b(a)}function c(a,b){var c=b.type;"touchmove"===c?u&&u.move(b):"touchstart"===c?u=m(a.target,b):"touchend"===c&&u&&(u.done(),u=null)}function b(a){a.stopPropagation();a.preventDefault();return!1}function a(a){var b=A;b&&b.redraw();a&&a.redraw();return A=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 e(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;w[b]=this;this.clear()}var p=n.include("$42","html.js")||n.include("$2","html.js",!0),h=n.require("$20","dom.js"),v=h.top,D=h.left,q=1,w={},A,u=!1;f.init=function(a){var b=new e(a);b.redraw();n.require("$43","touch.js").ok(function(b){b.dragger(a,c)});k(a).mousedown(g);
|
97 |
+
return b};d=e.prototype;d.fire=function(a,b){var c=k.Event(a);c.cell=this;k(this.el).trigger(c,b);return this};d.each=function(a){for(var b=-1,c=this.cells,e=c.length;++b<e;)a(c[b],b);return this};d.indexOf=function(a){return(a=w[a.id||String(a)])&&a.pid===this.id?a.index:-1};d.on=function(){return this.$("on",arguments)};d.off=function(){return this.$("off",arguments)};d.find=function(a){return k(this.el).find(a)};d.$=function(a,b){k.fn[a].apply(k(this.el),b);return this};d.addClass=function(a){this.css.push(a);
|
98 |
+
return this};d.removeClass=function(a){a=this.css.indexOf(a);-1!==a&&this.css.splice(a,1);return this};d.parent=function(){return this.pid&&w[this.pid]};d.splitx=function(){return this._split(q,arguments)};d.splity=function(){return this._split(2,arguments)};d._split=function(a,b){(this.length||this.field)&&this.clear();for(var c=-1,d,g=b.length,l=1/g,p=0;++c<g;){d=h.el();this.body.appendChild(d);for(var f=d,v=b[c],k=v,q=1;w[v];)v=k+"-"+ ++q;f.id=v;d=new e(d);d.index=c;d.pid=this.id;d._locale(this.lang,
|
99 |
+
this.rtl);d.pos=p;p+=l;this.cells.push(d);this.length++}this.dir=a;this.redraw();return this.cells};d.destroy=function(){this.clear();delete w[this.id];var a=this.el;a.innerHTML="";this.body=null;a.className=this._cn||"";k(a).off();return this};d.exists=function(){return this===w[this.id]};d.clear=function(){for(var a=this.el,b=this.cells,c=this.field,e=this.body,d=this.nav,g=this.length||0;0!==g--;)delete w[b[g].destroy().id];this.cells=[];this.length=0;d&&(a.removeChild(d),this.nav=null);e&&(c&&
|
100 |
+
(p.ie()&&k(e).triggerHandler("blur"),c.destroy(),this.field=null),this.table&&(this.table=null),a===e.parentNode&&a.removeChild(e));this.body=a.appendChild(h.el("","wg-body"));this._h=null;return this};d.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===q?"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};d.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};d.distribution=function(){for(var a=[],b=0,c=this.cells,e=c.length-1;b<e;)a[b]=c[++b].pos;return a};d.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};d.redraw=function(a){this.restyle();var b=this.el,c=this.body,e=this.field;if(c){var d,h=b.clientWidth||0,g=b.clientHeight||0,l=c.offsetTop||0,g=l>g?0:g-l;this._h!==g&&(this._h=g,c.style.height=String(g)+"px",d=e);this._w!==h&&(this._w=h,d=e);d&&d.redraw()}c=this.length;h=1;g=this.nav;for(l=2===this.dir?"height":"width";0!==c--;)e=this.cells[c],g?d=1:(e.fixed&&
|
103 |
+
(e.pos=e.fixed/k(b)[l]()),d=h-e.pos,h=e.pos),e.el.style[l]=String(100*d)+"%",e.redraw(a);return this};d.contents=function(a,b){var c=this.el,e=this.body;if(null==a)return e.innerHTML;this.length?this.clear():e&&(c.removeChild(e),e=null);e||(this.body=e=c.appendChild(h.el("",b||"wg-content")),this._h=null,(c=this.lang)&&this._locale(c,this.rtl,!0));"string"===typeof a?k(e)._html(a):a&&this.append(a);this.redraw();return this};d.textarea=function(a,b){var c=this.field;if(c){var e=c.editable();c.reload(a,
|
104 |
+
b);e!==b&&this.restyle()}else this.length&&this.clear(),e=h.el("textarea"),e.setAttribute("wrap","virtual"),e.value=a,this.contents(e),c=n.require("$44","field.js")._new(e)[b?"enable":"disable"](),l(this,e),this.field=c,this.restyle();this.lang||this.locale("en");return c};d.locale=function(a){a=n.require("$36","locale.js").cast(a);return this._locale(String(a),a.isRTL())};d._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};d.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}};d.eachTextarea=function(a){var b=this.field;b?a(b):this.each(function(b){b.eachTextarea(a)});return this};d.append=function(a){a&&(a.nodeType?p.init(this.body.appendChild(a)):p.init(k(a).appendTo(this.body)));return this};d.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};d.before=function(a){var b=this.body;a.nodeType?p.init(this.el.insertBefore(a,b)):p.init(k(a).insertBefore(b));return this};d.header=function(a,b){if(null==a&&null==b)return this.el.getElementsByTagName("header")[0];this.t=h.txt(a||"");this.el.insertBefore(h.el("header",b),this.body).appendChild(this.t);this.redraw();return this};d.title=function(a){var b=this.t;if(b)return b.nodeValue=
|
107 |
+
a||"",b;this.header(a);return this.t};d.titled=function(){var a=this.t;return a&&a.nodeValue};d.bodyY=function(){return v(this.body,this.el)};d.scrollY=function(a){if(R===a)return this.body.scrollTop;this.body.scrollTop=a};d.tabulate=function(a){var b=this.table;b?b.clear():b=n.require("$45","wgtable.js").create(this);b.init(a);return this.table=b};d.lock=function(){this.body.className+=" locked";return this};d.scrollTo=function(a,b){var c,e=this.body;c=e.scrollTop;var d=v(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)};d.navigize=function(a,c){function e(a){var b=g[a],c=f[a],d=k(b.el).show();c.addClass("active");p=a;v.data("idx",a);b.fire("wgTabSelect",[a]);return d}var d=this,g=d.cells,l=d.nav,p,f=[];l&&d.el.removeChild(l);var l=d.nav=d.el.insertBefore(h.el("nav","wg-tabs"),d.body),v=k(l).on("click",function(a){var c=k(a.target).data("idx");if(null==c)return!0;if(null!=p){var h=f[p];k(g[p].el).hide();
|
109 |
+
h.removeClass("active")}e(c);d.redraw();return b(a)});null==c&&(c=v.data("idx")||0);d.each(function(b,c){f[c]=k('<a href="#'+b.id+'"></a>').data("idx",c).text(a[c]).appendTo(v);b.pos=0;k(b.el).hide()});e(g[c]?c:0);d.lock();d.redraw();return d};d.navigated=function(){var a=this.nav;if(a)return k(a).data("idx")};d=null;return f}({},r,s));n.register("$23",function(f,d,s){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 g(a,b,c){b=k(a.title(b).parentNode);var e=b.find("span.lang");c?(c=n.require("$36","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",e="changed",p=0,h=1,v=2,D=3,q=4,w=5,A=/^\s+/,u,z,r=n.require("$35","string.js").html,C=n.require("$5","string.js").sprintf;f.extend=function(a){return a.prototype=new b};f.localise=function(a){z=a;return f};var F=function(){var a=s.createElement("p");return function(b){a.innerHTML=b.replace("src=","x=");return a.textContent}}(),x=b.prototype=n.require("$37","abstract.js").init(["getListColumns","getListHeadings","getListEntry"],["editable","t"]);x.init=function(){this.localise();
|
112 |
+
this.editable={source:!0,target:!0};this.mode="";this.html=!1;return this};x.localise=function(a){a||(a=z||n.require("$1","t.js").init());var b=[];b[p]=a._x("Source text","Editor")+":";b[D]=a._x("%s translation","Editor")+":";b[q]=a._x("Context","Editor")+":";b[w]=a._x("Comments","Editor")+":";b[h]=a._x("Single","Editor")+":";b[v]=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]=a._x("Suggest translation","Editor");
|
113 |
+
this.labels=b;this.t=a;return this};x.setRootCell=function(a){function b(a){c.redraw(!0,a);return!0}var c=n.require("$38","wingrid.js").init(a);k(d).on("resize",b);this.redraw=b;k(a).on("wgFocus wgBlur",function(a,b){a.stopPropagation();u=b});this.destroy=function(){c.destroy();k(d).off("resize",b)};this.rootDiv=a;return c};x.$=function(){return k(this.rootDiv)};x.setListCell=function(a){var b=this;b.listCell=a;a.on("wgRowSelect",function(a,c){b.loadMessage(b.po.row(c));return!0}).on("wgRowDeselect",
|
114 |
+
function(a,c,e){e||b.loadNothing();return!0})};x.setSourceCell=function(a){this.sourceCell=a};x.setTargetCell=function(a){this.targetCell=a};x.next=function(a,b,c){for(var e=this.listTable,d=e.selected(),h=d,g,l=this.po;null!=(d=e.next(a,c,d));){if(h===d){d=null;break}if(b&&(g=l.row(d),g.translated(0)))continue;break}null!=d&&e.select(d,!0);return d};x.current=function(a){var b=this.active;if(null==a)return b;a?a.is(b)?this.reloadMessage(a):this.loadMessage(a):this.unloadActive();return this};x.getTargetOffset=
|
115 |
+
function(){if(this.active)return this.targetCell&&this.targetCell.navigated()||0};x.getTargetEditable=function(){return this.editable.target&&this.targetCell&&this.targetCell.editable()};x.getSourceEditable=function(){return this.editable.source&&this.sourceCell&&this.sourceCell.editable()};x.getContextEditable=function(){return this.editable.context&&this.contextCell&&this.contextCell.editable()};x.getFirstEditable=function(){return this.getTargetEditable()||this.getSourceEditable()||this.getContextEditable()};
|
116 |
+
x.searchable=function(a){a&&(this.dict=a,this.po&&this.rebuildSearch());return this.dict&&!0};x.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())};x.filtered=function(){return this.lastSearch||""};x.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:this.po.length;c?e.filter(c):
|
117 |
+
e.unfilter();b||this.fire("poFilter",[h,d]);return d};x.countFiltered=function(){return this.lastSearch?this.lastFound:this.po.length};x.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};x.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)}};x.save=function(a){var b=this.po;if(this.dirty||
|
118 |
+
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};x.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()};x.on=function(a,b){this.$().on(a,b);return this};x.getSorter=function(){return null};x.reload=function(){var a=this,b,c=a.listCell,e=a.listTable,d=a.po,h=d&&d.locale(),g=h&&h.isRTL(),l=d&&d.length||0;if(!d||
|
119 |
+
!d.row)return c&&c.clear().header("Error").contents("Invalid messages list"),!1;a.targetLocale=h;a.lastSearch&&(a.lastSearch="",a.lastFound=l,a.fire("poFilter",["",l]));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]);b&&e.thead().distribute(b);
|
120 |
+
e.tbody().$(g?"addClass":"removeClass",["is-rtl"]);a.fire("poLoad");return!!l};x.load=function(a,b){this.po=a;this.dict&&this.rebuildSearch();this.reload()&&(-1!==b?this.listTable.selectRow(b||0):this.active&&this.unloadActive())};x.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};x.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};x.setStatus=function(){return null};x.setSrcMeta=function(a,b){var e=[],d,h=!1,g=this.$smeta,l=this.labels,p=[],f=a.tags(),v=f&&f.length;if(d=a.context())p.push("<span>"+r(l[q])+"</span>"),
|
122 |
+
p.push("<mark>"+r(d)+"</mark>");if(v&&this.getTag)for(p.push("<span>Tagged:</span>");0<=--v;)(d=this.getTag(f[v]))&&p.push('<mark class="tag">'+r(d.mod_name)+"</mark>");p.length&&e.push(p.join(" "));if(this.getMono()&&(d=a.refs())&&(f=d.split(/\s/),v=f.length)){for(p=[];0<=--v;)d=f[v],p.push("<code>"+r(d)+"</code>");e.push('<p class="has-icon icon-file">'+p.join(" ")+"</p>")}(d=a.notes())&&e.push('<p class="has-icon icon-info">'+r(d,!0)+"</p>");e.length?(g||(g=b.find("div.meta"),g.length||(g=k('<div class="meta"></div>').insertAfter(b.header())),
|
123 |
+
c(this,g,"poMeta"),this.$smeta=g),g.html(e.join("\n")).show(),h=!0):g&&g.text()&&(g.text("").hide(),h=!0);return h};x.setTrgMeta=function(a,b,c){var e=[],d=!1,h=this.$tmeta;b=(a=a.errors(b))&&a.length;var g;if(b)for(g=0;g<b;g++)e.push('<p class="has-icon icon-warn">'+r(a[g],!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};x.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 d(a,e){var l=R,k=N[p];a.off();a.titled()!==k&&g(a,k,e||"en");k=!1;y.setSrcMeta(b,a)&&(k=!0);if(b.plural()){var k=-1,q=[],m=[],n=a.id+"-",D=b.sourceForms()||e&&e.plurals||["One","Other"],w=D.length;if(2!==w||"="===D[0].charAt(0)&&"=1"!==D[0])for(;++k<w;)q[k]=n+String(k),m[k]=
|
125 |
+
c(D[k])+":";else q=[n+"-0",n+"-1"],m=[N[h],N[v]];a.splity.apply(a,q);a.each(function(a,c){a.header(m[c]).textarea(b.source(null,c),l).setStrf(E).setMode(A).setInvs(z)});a.lock();l&&a.each(function(a,b){f(a,b)})}else k&&a.redraw(),a.textarea(b.source(),l).setStrf(E).setMode(A).setInvs(z),l&&f(a,0)}function f(c,d){c.on(l,function(a,c){b.source(c,d);0===d&&y.updateListCell(b,"source");y.unsave(b,d)}).on(e,function(){0===d&&y.po.reIndex(b);y.dict&&y.rebuildSearch();y.fire(a,[b])})}function k(a,e,d){O&&
|
126 |
+
a.eachTextarea(function(a){a.ping()});a.off();var h=e.isKnown()&&e.label||"Target",h=C(N[D],h);a.titled()!==h&&g(a,h,e);h=!1;!this.sourceCell&&y.setSrcMeta(b,a)&&(h=!0);y.setTrgMeta(b,d,a)&&(h=!0);y.setStatus(b,d);if(b.pluralized()){var l=[],p=[],f=a.id+"-",v=b.targetForms()||e.plurals||["One","Other"],h=v.length,q=function(a){var b=v[a];p.push(b?c(b,!0):"Form "+a);l.push(f+String(a))};for(b.each(q);(e=l.length)<h;)q(e);a.splitx.apply(a,l);a.each(function(a,c){var e=O&&!b.disabled(c);a.textarea(b.translation(c),
|
127 |
+
e).setStrf(E).setMode(A).setInvs(z);O&&m(a,c)});a.navigize(p,d||null).on("wgTabSelect",function(c,e){var d=O&&c.cell.editable();d&&d.focus();y.setTrgMeta(b,e,a);y.setStatus(b,e);y.fire("poTab",[e])})}else h&&a.redraw(),a.textarea(b.translation(),O&&!b.disabled(0)).setStrf(E).setMode(A).setInvs(z),O&&m(a,0)}function m(c,d){c.on(l,function(a,c,e){b.translate(c,d);0===d&&y.updateListCell(b,"target");b.fuzzy(d)?y.fuzzy(!1,b,d):y.unsave(b,d);""===c?(y.fire("poEmpty",[!0,b,d]),y.setStatus(b,d)):""===e&&
|
128 |
+
(y.fire("poEmpty",[!1,b,d]),y.setStatus(b,d))}).on(e,function(){y.dict&&y.rebuildSearch();y.fire(a,[b])})}function n(c){c.off();var d=N[q];c.titled()!==d&&(g(c,d),y.setStatus(null));c.textarea(b.context(),!0).setMode(A).setInvs(z);V&&c.on(l,function(a,c){b.context(c);y.updateListCell(b,"source");y.unsave(b,F)}).on(e,function(){y.po.reIndex(b);y.dict&&y.rebuildSearch();y.fire(a,[b])})}function x(a){var c=N[w];a.titled()!==c&&g(a,c);a.off().on(l,function(a,c){b.comment(c);y.fire("poComment",[b,c]);
|
129 |
+
y.unsave(b,F)}).textarea(b.comment(),!0)}var y=this,A=y.mode,s=b.isHTML(),z=y.inv||!1,r=this.fmt||null,E=b.format()||null,H=b.is(y.active),F=0,G=y.sourceCell,S=y.targetCell,K=y.contextCell,T=y.commentCell,O=y.editable.target,R=y.editable.source,V=y.editable.context,P=u,W=y.sourceLocale,U=y.targetLocale,N=y.labels;y.html!==s&&(y.html=s,"code"!==y.mode&&(A=s?"html":"",y.setMode(A)));y.active=b;G&&d(G,W);K&&n(K);S&&U&&(F=S.navigated()||0,k(S,U,F));T&&x(T);P&&(P.exists()||(P=P.parent()),(s=P.editable())&&
|
130 |
+
s.focus());r!==E&&(this.fmt=E);H||y.fire("poSelected",[b,F])};x.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};x.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])};x.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)};x.cellText=function(a){if(-1!==a.indexOf("<")||-1!==a.indexOf("&"))a=F(a);return a.replace(A,"")||"\u00a0"};x.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};x.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)||
|
133 |
+
!this.fire("poFlag",[b,d,c,e]))return!1;c.flag(b,e);this.fire(a,[c])&&this.unsave(c,e);this.setStatus(c,e);return!0};x.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};x.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(),
|
134 |
+
this.dict&&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))))}};x.setMono=function(a){return this.setMode(a?"code":this.html?"html":"")};x.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};x.getMono=function(){return"code"===
|
135 |
+
this.mode};x.setInvs=function(a){(this.inv||!1)!==a&&(this.inv=a,this.callTextareas(function(b){b.setInvs(a)}),this.fire("poInvs",[a]));return this};x.getInvs=function(){return this.inv||!1};x.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};x.focus=function(){var a=this.getTargetEditable();a&&a.focus();return this};x=null;return f}({},r,s));n.register("$12",function(f,d,s){function m(){this.init()._validate();
|
136 |
+
this.sourceLocale={lang:"en",label:"English",plurals:["One","Other"]}}function g(a){a=k('<button type="button" class="button button-small icon icon-'+a+' hastip"></button>');n.require("$11","tooltip.js").init(a);return a}function c(a){return g("cloud").attr("title",a.labels[8]+" (Ctrl-U)").click(function(b){b.preventDefault();a.focus().fuzzy(!a.fuzzy())})}function b(a){return g("robot").attr("title",a.labels[9]+" (Ctrl-J)").click(function(b){b.preventDefault();a.fire("poHint")})}d=n.require("$23",
|
137 |
+
"base.js");f.init=function(a){var b=new m;a=b.setRootCell(a);var c=a.splity("po-list","po-edit"),d=c[0],h=c[1],c=h.splitx("po-trans","po-comment"),g=c[0],f=c[1].header("Loading.."),c=g.splity("po-source","po-target"),g=c[0].header("Loading.."),c=c[1].header("Loading..");a.distribute([0.34]);h.distribute([0.8]);b.setListCell(d);b.setSourceCell(g);b.setTargetCell(c);b.commentCell=f;b.editable.source=!1;return b};d=m.prototype=d.extend(m);d.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};d.getListColumns=function(){var a={source:0};this.targetLocale&&(a.target=1);return a};d.getListEntry=function(a){var b=this.cellText,c=[function(){var c,e=b(a.source()||""),d=a.context();return d?(c=s.createElement("p"),c.appendChild(s.createElement("mark")).innerText=d,c.appendChild(s.createTextNode("\u00a0"+e)),c):e}];this.targetLocale&&(c[1]=function(){return b(a.translation()||"")});return c};d.stats=
|
139 |
+
function(){var a=this.po,b=a.length,c=0,d=0,h=0;a.each(function(a,b){b.fuzzy()?h++:b.translated()?c++:d++});return{t:b,p:c.percent(b)+"%",f:h,u:d}};d.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))};d.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))};d.locked=function(){return!this._unlocked};d.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 e=
|
141 |
+
[];a.translated()?a.fuzzy()&&e.push("po-fuzzy"):e.push("po-empty");d.attr("class",e.join(" "))}};d.getSorter=function(){function a(a,c){var e=a.weight(),d=c.weight();return e===d?b(a,c):e>d?-1:1}function b(a,c){return a.hash().localeCompare(c.hash())}var c=this;return function(d){var h=c.po,g=c.locked()?a:b;d.sort(function(a,b){return g(h.row(a),h.row(b))})}};return f}({},r,s));n.register("$13",function(f,d,n){var m={copy:66,clear:75,save:83,fuzzy:85,next:40,prev:38,enter:13,invis:73,hint:74},g={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())}};f.init=function(b,a){function l(a){if(a.isDefaultPrevented()||
|
143 |
+
!a.metaKey&&!a.ctrlKey)return!0;var d=a.which;if(!e[d])return!0;var l=c[d];if(!l)throw Error("command undefined #"+d);if(a.altKey||a.shiftKey&&!g[d]||!1===l(a,b))return!0;a.stopPropagation();a.preventDefault();return!1}var e={};k(a||d).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]],e[a]=!0;return this},disable:function(){k(a||d).off("keydown",l);b=a=e=null}}};return f}({},r,s));n.register("$24",function(f,d,k){function m(){this.reIndex([])}
|
144 |
+
f.init=function(){return new m};d=m.prototype;d.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};d.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};d.indexOf=function(d){d=this.ords[d];return null==d?-1:d};d.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};d.get=function(d){return this[this.ords[d]]};d.has=function(d){return null!=this.ords[d]};d.del=function(d){this.cut(this.ords[d],1)};d.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};d.each=function(d){for(var c=-1,b=this.keys,a=this.length;++c<a;)d(b[c],this[c],c);return this};d.sort=function(d){for(var c=-1,b=this.length,a,l=this.keys,e=this.ords,f=[];++c<b;)f[c]=[this[c],l[c]];f.sort(function(a,
|
146 |
+
b){return d(a[0],b[0])});for(c=0;c<b;c++)a=f[c],this[c]=a[0],a=a[1],l[c]=a,e[a]=c;return this};d.join=function(d){return[].join.call(this,d)};d=null;return f}({},r,s));n.register("$25",function(f,d,k){function m(d,c){var b=RegExp("^.{0,"+(d-1)+"}["+c+"]"),a=RegExp("^[^"+c+"]+");return function(c,e){for(var f=c.length,h;f>d;){h=b.exec(c)||a.exec(c);if(null==h)break;h=h[0];e.push(h);h=h.length;f-=h;c=c.substr(h)}0!==f&&e.push(c);return e}}f.create=function(d){function c(a){return h[a]||"\\"+a}var b,
|
147 |
+
a,l=/(?:\r\n|[\r\n\v\f\u2028\u2029])/g,e=/[ \r\n]+/g,f=/[\t\v\f\x07\x08\\\"]/g,h={"\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(f,c);var h=0;e=e.replace(l,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,s=m.length;++n<s;)a(m[n],k);else k=k.concat(m);
|
148 |
+
return k.join('"\n"')+'"'},prefix:function(a,b){var c=a.split(l);return b+c.join("\n"+b)},refs:function(a){a=a.replace(e," ",a);b&&(a=b(a,[]).join("\n#: "));return"#: "+a}}};return f}({},r,s));n.register("$39",function(f,d,k){function m(){this.length=0}f.init=function(){return new m};d=m.prototype;d.push=function(d){this[this.length++]=d;return this};d.sort=function(d){[].sort.call(this,d);return this};d.each=function(d){for(var c=-1,b=this.length;++c<b;)d(c,this[c]);return this};return f}({},r,s));
|
149 |
+
n.register("$26",function(f,d,k){function m(){}f.extend=function(d){return d.prototype=new m};d=m.prototype=n.require("$37","abstract.js").init(["add","load"]);d.row=function(d){return this.rows[d]};d.lock=function(d){return this.locale(d||{lang:"zxx",label:"Unknown",nplurals:1,pluraleq:"n!=1"})};d.unlock=function(){var d=this.loc;this.loc=null;return d};d.locale=function(d){null==d?d=this.loc:this.loc=d=n.require("$36","locale.js").cast(d);return d};d.each=function(d){this.rows.each(d);return this};
|
150 |
+
d.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};d.get=function(d){return this.rows&&this.rows.get(d)};d.has=function(d){return this.rows&&this.rows.has(d)};d.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}};d.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)};d.sort=function(d){this.rows.sort(d);return this};d["export"]=function(){for(var d=-1,c=this.rows,b=c.length,a=n.require("$39","list.js").init();++d<b;)a.push(c[d]);return a};d=null;return f}({},r,s));n.register("$27",function(f,d,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 e={},p={};return{add:function(a){var b=f(a.source());(e[b]||(e[b]=[])).push(a);p[a.hash()]=a},match:function(h){var k=f(h.source()),k=e[k],m;if(m=k){m=k.length;var q=k[0];if(1!==m)for(var n=7,A,u=h.source(),s=h.context(),r;0<=--m;)if(h=0,A=k[m],!(A.context()!==s&&++h>=n)){r=A.source();if(u!==r){if(++h>=n)continue;u=u.toLowerCase();r=r.toLowerCase();
|
153 |
+
if(u!==r){if(++h>=n)continue;u=c(u);r=c(r);if(u!==r){if(++h>=n)continue;u=d(u);r=d(r);if(u!==r){if(++h>=n)continue;u=b(u);r=b(r);if(u!==r){if(++h>=n)continue;u=a(u);r=a(r);if(u!==r&&++h>=n)continue}}}}}n=h;q=A;if(0===h)break}delete p[q.hash()];m=q.copy()}return m},unmatched:function(){var a,b,c=[];for(a in p)b=p[a],c.push(b);return c}}}f.merge=function(f,c){var b=f.rows,a=c.rows,l=[],e=[],p=[],h=m();b.each(function(b,c){a.has(b)||(c.translated()?h.add(c):p.push(c))});f.clear();a.each(function(a,c){try{var p=
|
154 |
+
b.get(a),k;p?(k=p.flagged(0),p.merge(c),p.flagged(0)!==k&&e.push(p)):(p=h.match(c))?(p.merge(c),e.push(p)):(p=c.copy(),l.push(p));f.add(p,"")}catch(m){d.console&&console.error(String(m))}});f.header("POT-Creation-Date",c.header("POT-Creation-Date")||f.now());return{add:l,fuz:e,del:p.concat(h.unmatched())}};return f}({},r,s));n.register("$28",function(f,d,k){function m(c,b,a){if(null==a)return c[b]||"";c[b]=a||"";return c}function g(){this._id=this.id=""}f.extend=function(c){return c.prototype=new g};
|
155 |
+
d=g.prototype;d.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};d.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};d.flags=function(){for(var c,b={},a=[],d=this.flg||[],e=d.length;0!==e--;)c=d[e],b[c]||(b[c]=!0,a.push(c));return a};d.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};d.fuzzy=function(c,b){var a=this.flaggedAs(4,c);null!=b&&this.flag(b?4:0,c);return a};d.source=function(c,b){if(null==c)return this.src[b||0]||"";this.src[b||0]=c;return this};d.plural=function(c,b){if(null==c)return this.src[b||1]||"";this.src[b||1]=c||"";return this};d.sourceForms=function(){return this.srcF};d.targetForms=function(){return this.msgF};d.each=function(c){for(var b=-1,a=this.src,d=this.msg,e=Math.max(a.length,d.length);++b<e;)c(b,a[b],d[b]);return this};
|
157 |
+
d.count=function(){return Math.max(this.src.length,this.msg.length)};d.pluralized=function(){return 1<this.src.length||1<this.msg.length};d.translate=function(c,b){this.msg[b||0]=c||"";return this};d.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};d.translation=function(c){return this.msg[c||0]||""};d.errors=function(c){return this.err&&this.err[c||0]||[]};d.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};d.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};d.comment=function(c){return m(this,"cmt",c)};d.notes=function(c){return m(this,"xcmt",c)};d.refs=function(c){return m(this,"rf",c)};d.format=function(c){return m(this,"fmt",c)};d.context=function(c){return m(this,"ctx",c)};d.tags=function(){return this.tg};d.toString=d.toText=function(){return this.src.concat(this.msg,this.id,
|
159 |
+
this.ctx).join(" ")};d.weight=function(){var c=0;this.translation()||(c+=2);this.fuzzy()&&(c+=1);return c};d.equals=function(c){return this===c||this.hash()===c.hash()};d.hash=function(){return this.id};d.normalize=function(){for(var c=this.msg.length;0!==c--;)this.msg[c]=this.src[c]||""};d.disabled=function(c){return!!(this.lck||[])[c||0]};d.disable=function(c){(this.lck||(this.lck=[]))[c||0]=!0;return this};d.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};d.unsave=function(c){(this.drt||(this.drt=[]))[c||0]=!0;return this};d.save=function(c){null==c?this.drt=null:(this.drt||(this.drt=[]))[c]=!1;return this};d.is=function(c){return c&&(c===this||c.idx===this.idx)};d.isHTML=function(c){if(null==c)return this.htm||!1;this.htm=c};d=null;return f}({},r,s));n.register("$14",function(f,d,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 g(a,b){var c=a||"";b&&(c+="\x00"+b);return c}function c(a){var b=d.console;b&&b.error&&b.error(a.message||String(a))}function b(a){return n.require("$25","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||""]}f.create=function(b){return new a(b)};
|
162 |
+
k=n.require("$26","messages.js").extend(a);k.clear=function(){this.rows=n.require("$24","collection.js").init();this.length=0};k.now=function(){function a(b,c){for(var d=String(b);d.length<c;)d="0"+d;return d}var b=new Date,c=b.getUTCFullYear(),d=b.getUTCMonth()+1,f=b.getUTCDate(),l=b.getUTCHours(),b=b.getUTCMinutes();return a(c,4)+"-"+a(d,2)+"-"+a(f,2)+" "+a(l,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=g(a,b);return this.rows.get(c)};k.add=function(a,b){a instanceof l||(a=new l(a));b&&a.context(b);var d=a.hash();this.rows.get(d)?c("Duplicate message at index "+this.indexOf(a)):(a.idx=this.rows.add(d,a),this.length=this.rows.length);return a};k.load=function(a){for(var b=-1,d,f,g,k,m,n,u=(g=this.locale())&&g.nplurals||2,r=[];++b<a.length;)d=a[b],null==d.parent?(f=d.source||d.id,g=d.target||"",k=d.context,f||k?(m=new l(f,
|
165 |
+
g),m._id=d._id,k&&m.context(k),d.flag&&m.flag(d.flag,0),d.comment&&m.comment(d.comment),d.notes&&m.notes(d.notes),d.refs&&m.refs(d.refs),m.format(d.format),d.message=m,this.add(m)):0===b&&"object"===typeof g&&(this.head=g,this.headcmt=d.comment)):r.push(d);for(b=-1;++b<r.length;)try{d=r[b];f=d.source||d.id;m=a[d.parent]&&a[d.parent].message;if(!m)throw Error("parent missing for plural "+f);n=d.plural;1===n&&m.plural(f);n>=u||(d.flag&&m.flag(d.flag,n),m.translate(d.target||"",n),d.format&&!m.format()&&
|
166 |
+
m.format(d.format))}catch(s){c(s)}return this};k.merge=function(a){return n.require("$27","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("$28","message.js").extend(l);k.hash=function(){return g(this.source(),this.context())};k.toString=function(){return this.cat(b())};k.cat=function(a,b,c){var d,f=[],l;(l=this.cmt)&&f.push(a.prefix(l,"# "));(l=this.xcmt)&&f.push(a.prefix(l,"#. "));d=this.rf;if(l=this._id)d+=(d?" ":"")+"loco:"+l;d&&/\S/.test(d)&&f.push(a.refs(d));!b&&this.fuzzy()&&f.push("#, fuzzy");(l=this.fmt)&&f.push("#, "+l+"-format");(l=this._ctx)&&f.push(a.prefix(a.pair("msgctxt",
|
168 |
+
l),"#| "));if(l=this._src)l[0]&&f.push(a.prefix(a.pair("msgid",l[0]),"#| ")),l[1]&&f.push(a.prefix(a.pair("msgid_plural",l[1]),"#| "));(l=this.ctx)&&f.push(a.pair("msgctxt",l));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])),l=this.msg||["",""],c=c||l.length;++d<c;)f.push(a.pair("msgstr["+d+"]",b?"":l[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 f}({},r,s));n.register("$16",function(f,d,n){f.init=function(d,f){function c(){return e||(e=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,e=b.length,
|
171 |
+
f=k("<ol></ol>").attr("class",a.type);++d<e;)k("<li></li>").html(b[d]).appendTo(f);f.find("li").eq(a.line-1).attr("class","highlighted");c().dialog("close").html("").dialog("option","title",a.path+":"+a.line).append(f).dialog("open")}}function l(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 e;return{load:function(e){c().html('<div class="loco-loading"></div>').dialog("option","title","Loading..").off("dialogopen").dialog("open").on("dialogopen",
|
172 |
+
l);e=k.extend({ref:e,path:f.popath},f.project||{});d.ajax.post("fsReference",e,a,b)}}};return f}({},r,s));n.register("$30",function(f,d,k){function m(d){this.api=d;this.chars=0}f.create=function(d){return new m(d)};d=m.prototype;d.init=function(d,c){function b(a){var b={length:0,html:a.html,sources:[]};q.push(b);return w[a.html?1:0]=b}function a(a,d){var g=a.source(null,d);if(g&&(a.untranslated(d)||c)){var q=n[g];if(q)q.push(a);else{var q=g.length,r=f.isHtml(g),r=w[r?1:0],s=r.sources;if(r.length+
|
173 |
+
q>m||s.length===h)r=b(r),s=r.sources;s.push(g);n[g]=[a];r.length+=q;e+=q;k+=1}}}var f=this.api,e=0,k=0,h=50,m=5E3,n={},q=[],w=[];b({html:!1});b({html:!0});d.each(function(b,c){a(c,0);a(c,1)});w=null;this.map=n;this.chars=e;this.length=k;this.batches=q;this.locale=d.locale()};d.abort=function(){this.state="abort";return this};d.dispatch=function(){function d(a,b){function e(c,d,l){b!==l&&(a===d||1<c&&f.source(null,1)===a)&&(f.translate(b,c),q++,z++);return q}if(!c())return!1;if(!b)return m.stderr("Empty translation returned for: "+
|
174 |
+
a),!0;var f,l=n[a]||[],h=l.length,g=-1,q;for(s++;++g<h;)if(f=l[g])q=0,f.each(e),q&&k("each",[f]);return!0}function c(){return"abort"===h.state?(m&&(m.abort(),e()),!1):!0}function b(){var b=q.shift(),c;b?(c=b.sources)&&c.length?m.batch(c,r,b.html,d).fail(a).always(f):f():e()}function a(){h.abort();e()}function f(){u++;k("prog",[u,C]);c()&&b()}function e(){m=q=null;k("done")}function k(a,b){for(var c=F[a]||[],d=c.length;0<=--d;)c[d].apply(null,b)}var h=this,m=h.api,n=h.map,q=h.batches||[],r=h.locale,
|
175 |
+
s=0,u=0,z=0,E=h.length,C=q.length,F={done:[],each:[],prog:[]};h.state="";b();return{done:function(a){F.done.push(a);return this},each:function(a){F.each.push(a);return this},prog:function(a){F.prog.push(a);return this},stat:function(){return{todo:function(){return Math.max(E-s,0)},did:function(){return s}}}}};return f}({},r,s));n.register("$31",function(f,d,k){function m(){}f.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?String(this)+" error "+c.code+": "+c.message:""};d.batch=function(c,b,a,d){function e(a){for(var e=c.length,f=-1;++f<e&&!1!==d(c[f],a[f]||"",b););}var f=this;return f._call({url:"https://translate.yandex.net/api/v1.5/tr.json/translate?format="+(a?"html":"plain")+"&lang="+b.lang,method:"POST",traditional:!0,data:{key:f.key(),text:c}}).done(function(a,b,c){a&&200===a.code?e(a.text||
|
177 |
+
[]):(f.stderr(f.parseError(a)||f.odderr(c)),e([]))}).fail(function(){e([])})};return new m};return f}({},r,s));n.register("$40",{zh:["zh","zh-TW"],he:["iw"],jv:["jw"]});n.register("$32",function(f,d,k){function m(){}f.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||[],d=a.length,e=-1;++e<d;)b.push(a[e].message||
|
178 |
+
"");return String(this)+" error "+c.error.code+": "+b.join(";")}return""};d.batch=function(c,b,a,d){function e(a){for(var e=c.length,f=-1,h;++f<e&&(h=a[f]||{},!1!==d(c[f],h.translatedText||"",b)););}var f=this;a=a?"html":"text";var h=f.mapLang(b,n.require("$40","google.json"));return f._call({url:"https://translation.googleapis.com/language/translate/v2?source=en&target="+h+"&format="+a,method:"POST",traditional:!0,data:{key:f.key(),q:c}}).done(function(a){a.data?e(a.data.translations||[]):(f.stderr(f.parseError(a)||
|
179 |
+
f.odderr(xhr)),e([]))}).fail(function(){e([])})};return new m};return f}({},r,s));n.register("$41",{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("$33",function(f,d,k){function m(){}f.create=function(d){d=m.prototype=new d;d.toString=function(){return"Microsoft Translator text API"};d.getId=function(){return"microsoft"};d.getUrl=function(){return"https://aka.ms/MicrosoftTranslatorAttribution"};
|
180 |
+
d.parseError=function(c){return c&&c.error?c.error.message:""};d.batch=function(c,b,a,d){function e(a){for(var e=-1,f;++e<g&&(f=a[e]||{},f=f.translations||[],f=f[0]||{},!1!==d(c[e],f.text||"",b)););}var f=this,h=[],g=c.length,k=-1;a=a?"html":"plain";for(var m=f.mapLang(b,n.require("$41","ms.json"));++k<g;)h.push({text:c[k]});return f._call({url:"https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&from=en&to="+m+"&textType="+a,method:"POST",data:JSON.stringify(h),headers:{"Content-Type":"application/json; charset=UTF-8",
|
181 |
+
"Ocp-Apim-Subscription-Key":this.key(),"Ocp-Apim-Subscription-Region":f.param("region")||"global"}}).done(function(a){a&&a.length?e(a):(f.stderr(f.parseError(a)||f.odderr(xhr)),e([]))}).fail(function(){e([])})};return new m};return f}({},r,s));n.register("$34",function(f,d,n){function m(){}f.create=function(f){(m.prototype=new f).batch=function(c,b,a,f){function e(a){for(var d=c.length,e=-1;++e<d&&!1!==f(c[e],a[e],b););}var g=d.locoScope.ajax;a={hook:this.getId(),type:a?"html":"text",locale:String(b),
|
182 |
+
sources:c};var h=k.Deferred();this.abortable(g.post("apis",a,function(a){e(a&&a.targets||[]);h.resolve()},function(){e([]);h.reject()}));return h.promise()};return new m};return f}({},r,s));n.register("$17",function(f,d,r){function m(){this.inf={}}function g(){var a=r.createElement("p"),b=/&(#\d+|#x[0-9a-f]|[a-z]+);/i,c=/<[a-z]+\s/i,d,f;return{sniff:function(g){if(g===d)return f;d=g;if(b.test(g)||c.test(g))if(a.innerHTML=g,a.textContent!==g)return f=!0;return f=!1}}}var c=m.prototype;c.init=function(a){this.inf=
|
183 |
+
a||{}};c.param=function(a){return this.inf[a]||""};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=(d.locoScope||{}).notices||d.console;b&&b.error&&b.error(String(a))};c.odderr=function(){return String(this)+": Unknown failure"};c.parseError=function(a){return""};c.mapLang=function(a,b){var c=String(a),d=a.lang,
|
184 |
+
f=b[c]||b[d]||[],g=f.length;if(0===g)return d;if(1<g)for(var c=c.toLowerCase(),d=-1,k;++d<g;)if(k=f[d],k.toLowerCase().replace("-","_")===c)return k;return f[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;a.cache=!0;a.dataType="json";a.error=function(a,c,d){try{var f=a.responseText,g=f&&k.parseJSON(f);d=g&&b.parseError(g)||d}catch(m){}b.stderr(String(b)+": "+d)};return b.abortable(k.ajax(a))};
|
185 |
+
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=g())).sniff(a)};c.createJob=function(){return n.require("$30","job.js").create(this)};f.create=function(a){var b;b=a.id;b="yandex"===b?n.require("$31","yandex.js").create(m):"google"===b?n.require("$32","google.js").create(m):"microsoft"===b?n.require("$33","ms.js").create(m):n.require("$34","custom.js").create(m);b.init(a);
|
186 |
+
return b};f.suggest=function(a,b,c,d){var f,g,k=a.length;for(f=0;f<k;f++)g=a[f],g.translate(b,c,d)};var b;return f}({},r,s));n.register("$18",function(f,d,n){f.init=function(f){function g(){M||(L.click(h),M=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&&k("#ssh-keys").toggleClass("hidden","ssh"!==k(this).val())}));return M}
|
187 |
+
function c(){G&&(b(k(u)),G=!1);if(C&&K){var a=K,c=k(Q);c.find("span.loco-msg").text(a);J||(c.removeClass("jshide").hide().fadeIn(500),J=!0)}else J&&(b(k(Q)),J=!1)}function b(a){a.slideUp(250).fadeOut(250,function(){k(this).addClass("jshide")})}function a(){if(C)return M&&M.dialog("close"),c(),k(f).find('button[type="submit"]').attr("disabled",!1),k(d).triggerHandler("resize"),A&&A(!0),!0;x&&M?(G||(k(u).removeClass("jshide").hide().fadeIn(500),G=!0),J&&(b(k(Q)),J=!1)):c();k(f).find('input[type="submit"]').attr("disabled",
|
188 |
+
!0);A&&A(!1);return!1}function l(a){var b,c,d=w||{};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 e(a){a.preventDefault();a=k(a.target).serializeArray();q(a);H=!0;return!1}function p(a){a.preventDefault();M.dialog("close");return!1}function h(a){a.preventDefault();M.dialog("open").find('input[name="connection_type"]').change();return!1}function r(b){C=b.authed;z=b.method;k(u).find("span.loco-msg").text(b.message||
|
189 |
+
"Something went wrong.");K=b.warning||"";b.notice&&F.notices.info(b.notice);if(C)"direct"!==z&&(w=b.creds,l(f),H&&b.success&&F.notices.success(b.success)),a();else if(b.reason)F.notices.info(b.reason);else if(b=b.prompt){var c=g();c.html(b).find("form").submit(e);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");a();k(d).triggerHandler("resize")}else F.notices.error("Server didn't return credentials, nor a prompt for credentials")}
|
190 |
+
function s(){a()}function q(a){H=!1;F.ajax.setNonce("fsConnect",I).post("fsConnect",a,r,s);return a}var w,A,u=f,z=null,H=!1,C=!1,F=d.locoScope,x=f.path.value,B=f.auth.value,I=f["loco-nonce"].value,L=k(u).find("button.button-primary"),Q=n.getElementById(u.id+"-warn"),G=!1,J=!1,K="",M;F.notices.convert(Q).stick();f.connection_type?(w={},w.connection_type=f.connection_type.value,C=!0):x&&B&&q({path:x,auth:B});a();return{applyCreds:function(a){if(a.nodeType)l(a);else{var b,c=w||{};for(b in c)c.hasOwnProperty(b)&&
|
191 |
+
(a[b]=c[b])}return this},setForm:function(b){f=b;a();l(b);return this},connect:function(){x=f.path.value;B=f.auth.value;q(k(f).serializeArray());return this},listen:function(a){A=a;C&&a(!0);return this}}};return f}({},r,s));n.register("$19",function(f,d,r){function m(d,e,f,h){e="n"===f?c(e):b(e);h&&(e=a(e));return g([].sort,[e])(d)}function g(a,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,
|
192 |
+
c){return(b&&b[a]||"").localeCompare(c&&c[a]||"")}}function a(a){return function(b,c){return-1*a(b,c)}}f.init=function(a){function b(a){var c=-1,d=a.length;for(k("tr",u).remove();++c<d;)u.appendChild(a[c].$)}function c(a){q=a?E.find(a,d):d.slice(0);s&&(a=f[s],q=m(q,s,a.type,a.desc));b(q)}var d=[],f=[],g=0,q,r,s,u=a.getElementsByTagName("tbody")[0],z=a.getElementsByTagName("thead")[0],E=n.require("$9","fulltext.js").init();z&&u&&(k("th",z).each(function(a,c){var l=c.getAttribute("data-sort-type");
|
193 |
+
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);q=m(q||d.slice(0),c,l,n);b(q);r&&r.removeClass("loco-desc loco-asc");r=k(g.$).addClass(n?"loco-desc":"loco-asc").removeClass(n?"loco-asc":"loco-desc");s=c;return!1}),f[g]={$:c,type:l});c.hasAttribute("colspan")?g+=Number(c.getAttribute("colspan")):g++}),k("tr",u).each(function(a,b){var c,e,g,k=[],l={_:a,$:b},m=b.getElementsByTagName("td");for(e in f){c=m[e];(g=c.textContent.replace(/(^\s+|\s+$)/g,
|
194 |
+
""))&&k.push(g);c.hasAttribute("data-sort-value")&&(g=c.getAttribute("data-sort-value"));switch(f[e].type){case "n":g=Number(g)}l[e]=g}d[a]=l;E.index(a,k)}),a=k('form.loco-filter input[type="text"]',a.parentNode),a.length&&(a=a[0],z=k(a.form),1<d.length?n.require("$10","LocoTextListener.js").listen(a,c):z.hide(),z.on("submit",function(a){a.preventDefault();return!1})))};return f}({},r,s));s=r.locoScope||(r.locoScope={});r=r.locoConf||(r.locoConf={});var G=n.require("$1","t.js").init(),K=r.wplang;
|
195 |
+
n.require("$2","html.js");n.require("$3","number.js");n.require("$4","array.js");s.l10n=G;G.load(r.wpl10n);K&&G.pluraleq(K.pluraleq);s.string=n.require("$5","string.js");s.notices=n.require("$6","notices.js").init(G);s.ajax=n.require("$7","ajax.js").init(r).localise(G);s.locale=n.require("$8","wplocale.js");s.fulltext=n.require("$9","fulltext.js");s.watchtext=n.require("$10","LocoTextListener.js").listen;s.tooltip=n.require("$11","tooltip.js");s.po={ed:n.require("$12","poedit.js"),kbd:n.require("$13",
|
196 |
+
"hotkeys.js"),init:n.require("$14","po.js").create,ace:n.require("$15","ace.js").strf("php"),ref:n.require("$16","refs.js")};s.apis=n.require("$17","apis.js");s.fs=n.require("$18","fsconn.js");k("#loco.wrap table.wp-list-table").each(function(f,d){n.require("$19","tables.js").init(d)})})(window,document,window.jQuery);
|
pub/js/min/config.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(n,e,c){function o(){var n=c("#loco-conf > div"),e=n.eq(0).clone(),o=n.length,t="["+o+"]";function i(n,e){var o=e.name.replace("[0]",t);c(e).attr("name",o).val("")}e.attr("id","loco-conf-"+o),e.find("input").each(i),e.find("textarea").each(i),e.find("h2").eq(0).html("New set <span>(untitled)</span>"),e.insertBefore("#loco-form-foot"),f(e.find("a.icon-del"),o),e.hide().slideDown(500),c("html, body").animate({scrollTop:function(n,e){for(var o=n.offsetTop;(n=n.offsetParent)&&n!==e;)o+=n.offsetTop;return o}(e[0])},500)}function f(n,e){return n.click(function(n){return n.preventDefault(),function(n){var e=c("#loco-conf-"+n);e.find('input[name="conf['+n+'][removed]"]').val("1"),e.slideUp(500,function(){c(this).hide().find("table").remove()})}(e),!1})}c("#loco-conf > div").each(function(n,e){f(c(e).find("a.icon-del"),n)}),c("#loco-add-butt").attr("disabled",!1).click(function(n){return n.preventDefault(),o(),!1})}(window,document,jQuery);
|
pub/js/min/debug.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(n,o,t){var a=t("#loco-utf8-check")[0].textContent;function c(o,a,e){"success"!==a&&(e=n.ajax.parse(n.ajax.strip(o.responseText))),t("#loco-ajax-check").text("FAILED: "+e).addClass("loco-danger")}1===a.length&&10003===a.charCodeAt(0)||n.notices.warn("This page has a problem rendering UTF-8").stick(),window.ajaxurl&&t("#loco-ajax-url").text(window.ajaxurl),n.ajax.post("ping",{echo:"ΟΚ ✓"},function(o,a,e){o&&o.ping?t("#loco-ajax-check").text(o.ping):c(e,a,o&&o.error&&o.error.message)},c);var e,r=o.apis,i=r.length,s=-1,l=n.locale.parse("fr");function d(o,a){return t("#loco-api-"+o).text(a)}function p(o){var e=o.getId();o.key()?o.translate("OK",l,function(o,a){a?d(e,"OK ✓"):d(e,"FAILED").addClass("loco-danger")}):d(e,"No API key")}for(;++s<i;){e=r[s];try{p(n.apis.create(e))}catch(o){d(e.id,String(o))}}}(window.locoScope,window.locoConf,window.jQuery);
|
pub/js/min/delete.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e,o){var t=o.getElementById("loco-fs"),n=o.getElementById("loco-del");t&&n&&e.locoScope.fs.init(t).setForm(n)}(window,document,jQuery);
|
pub/js/min/editor.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(w,S){var C,t,_,n,D=w.locoScope,i=w.locoConf,p=!!i.WP_DEBUG,r=D.po.ref.init(D,i),l=null,a=null,o=i.multipart,z=D.l10n,b=D.string.sprintf,T=i.locale,m=D.po.init(T).wrap(i.powrap),s=!T,e=document.getElementById("loco-actions"),c=i.popath,u=i.potpath,d=document.getElementById("loco-fs"),f=d&&D.fs.init(d),g=!i.readonly,v=document.getElementById("loco-editor-inner"),h=i.apis||[],I={};function y(d){D.ajax.post("sync",l,function(t){var n=[],o=m,e=t.po,a=t.pot,i=D.po.init().load(e),r=o.merge(i),l=r.add.length,s=r.del.length,c=r.fuz.length,u=z;C.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)),S(v).trigger("poUnsaved",[]),F(),p&&w.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")),D.notices.success(n.join(". ")),S(v).trigger("poMerge",[t]),d&&d()},d)}function j(){return t=t||function(){for(var t,n=-1,o=[],e=h,a=e.length;++n<a;)try{t=e[n],o.push(D.apis.create(t))}catch(t){D.notices.error(String(t))}return o}()}function x(){h.length?function(){var c=z,t=C.current(),n=C.getTargetOffset(),o=t&&t.source(null,n),u='lang="'+String(T)+'" dir="'+(T.isRTL()?"RTL":"LTR")+'"',d=99;if(!o)return;function e(t){return!t.isDefaultPrevented()&&(0<=(n=t.which-49)&&n<10&&(o=f&&f.find("button.button-primary").eq(n))&&1===o.length&&(t.stopPropagation(),o.click()),!0);var n,o}function a(t,n,o,e){var a=e.getId(),i=e.getUrl(),r=String(e),l=m&&m[a],s=S('<button class="button button-primary"></button>').attr("tabindex",String(++d)).text(c._("Use this translation")).on("click",function(e,a){return function(t){t.preventDefault(),t.stopPropagation(),p();var n=C.current(),o=C.getTargetOffset();n&&n.source(null,o)===e?(n.translate(a,o),C.focus().reloadMessage(n)):D.notices.warn("Source changed since suggestion")}}(t,n));l&&l.replaceWith(S('<div class="loco-api loco-api-'+a+'"></div>').append(S('<a class="loco-api-credit" target="_blank" tabindex="-1"></a>').attr("href",i).text(r)).append(S("<blockquote "+u+"></blockquote>").text(n||"FAILED")).append(s)),f.dialog("option","position",{my:"center",at:"center",of:w}),++y===v&&f&&f.dialog("option","title",c._("Suggested translations")+" — "+o.label),1===y&&s.focus(),s.attr("accesskey",String(y))}function p(t){f&&null==t&&f.dialog("close"),m=f=null,S(w).off("keydown",e)}function i(e){return function(t,n,o){a(t,b[e.getId()]=n,o,e)}}var f=(_=_||S('<div id="loco-hint"></div>').dialog({dialogClass:"loco-modal",modal:!0,autoOpen:!1,closeOnEscape:!0,resizable:!1,minHeight:400})).html("").append(S('<div class="loco-api"><p>Source text:</p></div>').append(S('<blockquote lang="en"></blockquote>').text(o))).dialog("option","title",c._("Loading suggestions")+"...").off("dialogclose").on("dialogclose",p).dialog("open"),r=t.translation(n);r&&S('<div class="loco-api"><p>Current translation:</p></div>').append(S("<blockquote "+u+"></blockquote>").text(r)).append(S('<button class="button"></button>').attr("tabindex",String(++d)).text(c._("Keep this translation")).on("click",function(t){t.preventDefault(),p()})).appendTo(f);var l,s,g=j(),v=g.length,h=-1,b=I[o]||(I[o]={}),m={},y=0;for(;++h<v;)l=g[h],f.append((x=l,void 0,k=S('<div class="loco-api loco-api-loading"></div>').text("Calling "+x+" ..."),m[x.getId()]=k)),s=l.getId(),b[s]?a(o,b[s],T,l):l.translate(o,T,i(l));var x,k;S(w).on("keydown",e)}():E()}function k(t){return t.preventDefault(),h.length?function(){var e,a,i,r=0,l=z,n=!1,s=M().dialog("open"),t=s.find("form"),c=t.find("button.button-primary"),o=S("#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=j(),e=o.length,a=-1;++a<e;)if((n=o[a]).getId()===t)return n;D.notices.error("No "+t+" client")}(S(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),C.pasteMessage(t),t===C.active&&C.setStatus(t),C.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&&D.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")),D.notices.success(n.join(". ")).slow(),i=e=null}r&&(F(),C.rebuildSearch()),s&&(s.off("dialogclose").dialog("close"),s=null),C.fire("poAuto")}d(),u(),D.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()})}():E(),!1}function M(){return n||(n=S("#loco-auto")).dialog({dialogClass:"loco-modal",appendTo:"#loco.wrap",title:n.attr("title"),modal:!0,closeOnEscape:!0,resizable:!1,position:{my:"top",at:"top",of:"#loco-content"}}),n}function E(){M().dialog("open")}function U(n){var t=S.extend({locale:String(m.locale()||"")},a||{});f&&f.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),D.ajax.post("save",t,function(t){n&&n(),C.save(!0),S("#loco-po-modified").text(t.datetime||"[datetime error]")},n)}function q(){return z._("Your changes will be lost if you continue without saving")}function B(e,a){return e.disabled=!1,S(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 L(t){return t.preventDefault(),!1}function F(){var t=z,n=C.stats(),o=n.t,e=n.f,a=n.u,i=b(t._n("1 string","%s strings",o),o.format(0)),r=[];T&&(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(", ")+")")),S("#loco-po-status").text(i)}!o||w.FormData&&w.Blob||(o=!1,D.notices.warn("Your browser doesn't support Ajax file uploads. Falling back to standard postdata"));var N,O,P=(O=parseInt(S(v).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}(v,document.body),n=w.innerHeight,o=Math.max(O,n-t-20);N!==o&&(v.style.height=String(o)+"px",N=o)});P(),S(w).resize(P),v.innerHTML="",C=D.po.ed.init(v).localise(z),D.po.kbd.init(C).add("save",function(){C.dirty&&U()}).add("hint",T&&g&&x||L).enable("copy","clear","enter","next","prev","fuzzy","save","invis","hint");var A={save:g&&function(n){function o(){n.disabled=!0}function t(){n.disabled=!1}function e(){t(),S(n).removeClass("loco-loading")}return n,C.on("poUnsaved",function(){t(),S(n).addClass("button-primary loco-flagged")}).on("poSave",function(){o(),S(n).removeClass("button-primary loco-flagged")}),a=S.extend({path:c},i.project||{}),S(n).click(function(t){return t.preventDefault(),o(),S(n).addClass("loco-loading"),U(e),!1}),!0},sync:g&&function(n){var t=i.project;if(t){function o(){n.disabled=!0}function e(){n.disabled=!1}function a(){e(),S(n).removeClass("loco-loading")}C.on("poUnsaved",function(){o()}).on("poSave",function(){e()}),l={bundle:t.bundle,domain:t.domain,type:s?"pot":"po",sync:u||""},S(n).click(function(t){return t.preventDefault(),o(),S(n).addClass("loco-loading"),y(a),!1}),e()}return!0},revert:function(t){return C.on("poUnsaved",function(){t.disabled=!1}).on("poSave",function(){t.disabled=!0}),S(t).click(function(t){return t.preventDefault(),location.reload(),!1}),!0},invs:function(t){var o=S(t);return t.disabled=!1,C.on("poInvs",function(t,n){o[n?"addClass":"removeClass"]("inverted")}),o.click(function(t){return t.preventDefault(),C.setInvs(!C.getInvs()),!1}),locoScope.tooltip.init(o),!0},code:function(t){var o=S(t);return t.disabled=!1,o.click(function(t){t.preventDefault();var n=!C.getMono();return o[n?"addClass":"removeClass"]("inverted"),C.setMono(n),!1}),locoScope.tooltip.init(o),!0},source:B,binary:s?null:B};s?(A.add=g&&function(t){return t.disabled=!1,S(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 C.add(n),!1}),!0},A.del=g&&function(t){return t.disabled=!1,S(t).click(function(t){return t.preventDefault(),C.del(),!1}),!0}):A.auto=function(t){function n(){t.disabled=!1}return C.on("poUnsaved",function(){t.disabled=!0}).on("poSave poAuto",function(){n()}),S(t).click(k),n(),!0},S("#loco-toolbar").find("button").each(function(t,n){var o=n.getAttribute("data-loco"),e=A[o];e&&e(n,o)||S(n).hide()}),S(e).submit(L),function(n){function e(t){S(n.parentNode)[t||null==t?"removeClass":"addClass"]("invalid")}C.searchable(D.fulltext.init()),n.disabled=!1,n.value="";var a=D.watchtext(n,function(t){e(C.filter(t,!0))});C.on("poFilter",function(t,n,o){a.val(n||""),e(o)}).on("poMerge",function(t,n){var o=a.val();o&&C.filter(o)})}(document.getElementById("loco-search")),C.on("poUnsaved",function(){w.onbeforeunload=q}).on("poSave",function(){F(),w.onbeforeunload=null}).on("poHint",x).on("poUpdate",F).on("poMeta",function(t,n){var o,e,a=(e="CODE",(o=n).tagName===e?o:o.getElementsByTagName(e)[0]);return!a||(r.load(a.textContent),t.preventDefault(),!1)}),m.load(i.podata),C.load(m),(T=C.targetLocale)?T.isRTL()&&S(v).addClass("trg-rtl"):C.unlock(),F(),delete w.locoConf,i=A=null}(window,jQuery);
|
pub/js/min/move.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e,t,o){var c,u,i=t.getElementById("loco-fs"),a=t.getElementById("loco-move"),l=a.path.value;function d(n){o(a).find("button.button-primary").each(function(e,t){t.disabled=n})}i&&a&&(c=e.locoScope.fs.init(i).setForm(a).listen(function(e){d(!(e&&u))}),o(a).change(function(e){var t,n=e.target||{};"dest"!==n.name||!n.checked&&"text"!==n.type||(t=n.value)&&t!==u&&(u=t,d(!0),l!==t&&(i.dest.value=t,c.connect()))}).submit(function(e){return!!u||(e.preventDefault(),!1)}))}(window,document,jQuery);
|
pub/js/min/podiff.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e,t,u){var i,o=[],n=e.locoConf,s=e.locoScope,a=0,r=n.paths.length-2,d=t.getElementById("loco-ui"),l=t.getElementById("loco-fs"),f=d.getElementsByTagName("form").item(0),c=d.getElementsByTagName("button"),m=u(d).find("div.diff-meta"),p=c.item(0),g=c.item(1);function h(){return u(d).removeClass("loading")}function v(e){return u(d).find("div.diff").html(e)}function C(e){return h(),u('<p class="error"></p>').text(e).appendTo(v(""))}function y(e,t){var n,a=t.getElementsByTagName("tr"),r=a.length,i=t.getAttribute("data-diff").split(/\D+/),o=i[0],s=i[1],d=i[2],l=i[3];function f(e,t,n){t<=n&&u("<span></span>").text(String(t)).prependTo(e)}for(e=0;e<r;e++)f((n=a[e].getElementsByTagName("td"))[0],o++,s),f(n[2],d++,l)}function j(a){i&&i.abort();var r=o[a];if(null!=r)return v(r),void h();v(""),u(d).addClass("loading"),i=s.ajax.post("diff",{lhs:n.paths[a],rhs:n.paths[a+1]},function(e,t,n){n===i&&((r=e&&e.html)?(v(o[a]=r).find("tbody").each(y),h()):C(e&&e.error||"Unknown error"))},function(e,t,n){e===i&&(i=null,C("Failed to generate diff"))})}function b(e){0<=e&&e<=r&&(j(a=e),function(){var e=a,t=e+1;p.disabled=r<=e,g.disabled=e<=0,m.addClass("jshide").removeClass("diff-meta-current"),m.eq(e).removeClass("jshide").addClass("diff-meta-current"),m.eq(t).removeClass("jshide")}())}l&&f&&s.fs.init(l).setForm(f),r&&(u(p).click(function(e){return e.preventDefault(),b(a+1),!1}).parent().removeClass("jshide"),u(g).click(function(e){return e.preventDefault(),b(a-1),!1}).parent().removeClass("jshide")),b(0)}(window,document,jQuery);
|
pub/js/min/poinit.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(t,e,c){var i,n,a,l,o,r,u,s=t.locoScope,f=e.getElementById("loco-fs"),d=e.getElementById("loco-poinit"),v=f&&s.fs.init(f),g=(a=(n=d)["select-locale"],l=n["custom-locale"],o=n["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 e=function(){var t=c(z).serializeArray()[0];return t&&t.value||null}();return e&&d[t+"["+e+"]"]}function w(n){c(d).find("button.button-primary").each(function(t,e){e.disabled=n})}function I(){var t=g&&g.val(),e=t&&t.isValid()&&"zxx"!==t.lang,n=A&&A.val(),a=e&&n;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(n){var t=c(d),e=n&&n.toString("_")||"",a=e?"zxx"===e?"<locale>":e:"<invalid>";t.find("code.path span").each(function(t,e){e.textContent=a}),t.find("span.lang").each(function(t,e){!function(t,e){e&&"zxx"!==e.lang?(t.setAttribute("lang",e.lang),t.setAttribute("class",e.getIcon())):(t.setAttribute("lang",""),t.setAttribute("class","lang nolang"))}(e,n)})}function B(t){var e=t&&t.redirect;e&&location.assign(e)}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/potinit.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(t,e,n){var o=t.locoScope,i=e.getElementById("loco-fs"),c=e.getElementById("loco-potinit");function r(t){var e=t&&t.redirect;e&&location.assign(e)}n(c).submit(function(t){return t.preventDefault(),o.ajax.submit(t.target,r),!1}),i&&o.fs.init(i).setForm(c)}(window,document,jQuery);
|
pub/js/min/poview.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(n,o,f){var a,c,i,l,r,p,e,s,u,t=n.locoConf,d=n.locoScope,h=d.po.ref.init(d,t),v=o.getElementById("loco-po");function g(){r.length&&(p.push([i,l]),c.push(r),r=[]),i=null}function m(t){return f('<ol class="msgcat"></ol>').attr("start",t).appendTo(a)}function x(t){e!==t&&(f("#loco-content")[t?"removeClass":"addClass"]("loco-invalid"),e=t)}a=v,c=d.fulltext.init(),r=[],p=[],s=!(e=!0),(u=f(a).find("li")).each(function(t,e){var n,o=f(e);o.find("span.po-none").length?g():(l=t,null==i&&(i=t),(n=o.find(".po-text").text())&&(r=r.concat(n.replace(/\\[ntvfab\\"]/g," ").split(" "))))}),g(),d.watchtext(f(a.parentNode).find("form.loco-filter")[0].q,function(t){t?function(t){var e,n,o,i=c.find(t),l=-1,r=i.length;if(f("ol",a).remove(),r){for(;++l<r;)for(o=m((e=(n=p[i[l]])[0])+1);e<=n[1];e++)o.append(u[e]);x(!0)}else x(!1),m(0).append(f("<li></li>").text(d.l10n._("Nothing matches the text filter")));s=!0,b()}(t):s&&(x(!0),s=!1,f("ol",a).remove(),m(1).append(u),b())}),f(v).removeClass("loco-loading");var C,y,b=(y=v.clientHeight-2,function(){var t=function(t,e){for(var n=t.offsetTop||0;(t=t.offsetParent)&&t!==e;)n+=t.offsetTop||0;return n}(v,o.body),e=n.innerHeight-t-20;C!==e&&(v.style.height=e<y?String(e)+"px":"",C=e)});b(),f(n).resize(b),f(v).click(function(t){var e=t.target;if(e.hasAttribute("href"))return t.preventDefault(),h.load(e.textContent),!1})}(window,document,jQuery);
|
pub/js/min/setup.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e,o,a){function n(e,o,n){function r(){i("Failed to contact remote API"),c=null}function u(){c&&(clearTimeout(c),c=null)}var c=setTimeout(r,3e3);return i(""),a.ajax({url:s.apiUrl+"/"+e+"/"+o+".jsonp?version="+encodeURIComponent(n),dataType:"jsonp",success:function(e,o,n){if(c){u();var t=e&&e.exact;o=e&&e.status;t?function(e){d["json-content"].value=e,a("#loco-remote-empty").hide(),a("#loco-remote-found").show()}(t):404===o?i("Sorry, we don't know a bundle by this name"):(l.notices.debug(e.error||"Unknown server error"),r())}},error:function(){c&&(u(),r())},cache:!0}),{abort:u}}function i(e){d["json-content"].value="",a("#loco-remote-empty").show().find("span").text(e),a("#loco-remote-found").hide().removeClass("jshide")}var t,l=e.locoScope,s=e.locoConf,d=o.getElementById("loco-remote");a(d).find('button[type="button"]').click(function(e){return e.preventDefault(),t&&t.abort(),t=n(d.vendor.value,d.slug.value,d.version.value),!1}),a(d).find('input[type="reset"]').click(function(e){return e.preventDefault(),i(""),!1});a.ajax({url:s.apiUrl+"/vendors.jsonp",dataType:"jsonp",success:function(e){for(var o,n,t=-1,r=e.length,u=a(d.vendor).html("");++t<r;)o=e[t][0],n=e[t][1],u.append(a("<option></option>").attr("value",o).text(n))},cache:!0})}(window,document,jQuery);
|
pub/js/move.js
DELETED
@@ -1,52 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Script for file move operation
|
3 |
-
*/
|
4 |
-
!function( window, document, $ ){
|
5 |
-
|
6 |
-
var fsConn,
|
7 |
-
destPath,
|
8 |
-
fsHook = document.getElementById('loco-fs'),
|
9 |
-
elForm = document.getElementById('loco-move'),
|
10 |
-
origPath = elForm.path.value
|
11 |
-
;
|
12 |
-
|
13 |
-
function setFormDisabled( disabled ){
|
14 |
-
$(elForm).find('button.button-primary').each( function(i,button){
|
15 |
-
button.disabled = disabled;
|
16 |
-
} );
|
17 |
-
}
|
18 |
-
|
19 |
-
function onFsConnect( valid ){
|
20 |
-
setFormDisabled( ! ( valid && destPath ) );
|
21 |
-
}
|
22 |
-
|
23 |
-
function validate(event){
|
24 |
-
var field = event.target||{}, value;
|
25 |
-
if( 'dest' === field.name && ( field.checked || 'text' === field.type ) ){
|
26 |
-
value = field.value;
|
27 |
-
if( value && value !== destPath ){
|
28 |
-
destPath = value;
|
29 |
-
setFormDisabled(true);
|
30 |
-
// check chosen target permissions
|
31 |
-
if( origPath !== value ){
|
32 |
-
fsHook.dest.value = value;
|
33 |
-
fsConn.connect();
|
34 |
-
}
|
35 |
-
}
|
36 |
-
}
|
37 |
-
}
|
38 |
-
|
39 |
-
function process( event ){
|
40 |
-
if( destPath ){
|
41 |
-
return true;
|
42 |
-
}
|
43 |
-
event.preventDefault();
|
44 |
-
return false;
|
45 |
-
}
|
46 |
-
|
47 |
-
if( fsHook && elForm ){
|
48 |
-
fsConn = window.locoScope.fs.init(fsHook).setForm(elForm).listen(onFsConnect);
|
49 |
-
$(elForm).change(validate).submit(process);
|
50 |
-
}
|
51 |
-
|
52 |
-
}( window, document, jQuery );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pub/js/podiff.js
DELETED
@@ -1,172 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Script for PO/POT file diff renderer and roll back function
|
3 |
-
*/
|
4 |
-
!function( window, document, $ ){
|
5 |
-
|
6 |
-
var xhr,
|
7 |
-
cache = [],
|
8 |
-
conf = window.locoConf,
|
9 |
-
loco = window.locoScope,
|
10 |
-
revOffset = 0,
|
11 |
-
maxOffset = conf.paths.length - 2,
|
12 |
-
elRoot = document.getElementById('loco-ui'),
|
13 |
-
fsHook = document.getElementById('loco-fs'),
|
14 |
-
elForm = elRoot.getElementsByTagName('form').item(0),
|
15 |
-
buttons = elRoot.getElementsByTagName('button'),
|
16 |
-
$metas = $(elRoot).find('div.diff-meta'),
|
17 |
-
prevBut = buttons.item(0),
|
18 |
-
nextBut = buttons.item(1)
|
19 |
-
;
|
20 |
-
|
21 |
-
if( fsHook && elForm ){
|
22 |
-
loco.fs
|
23 |
-
.init( fsHook )
|
24 |
-
.setForm( elForm );
|
25 |
-
}
|
26 |
-
|
27 |
-
|
28 |
-
function showLoading(){
|
29 |
-
return $(elRoot).addClass('loading');
|
30 |
-
}
|
31 |
-
|
32 |
-
|
33 |
-
function hideLoading(){
|
34 |
-
return $(elRoot).removeClass('loading');
|
35 |
-
}
|
36 |
-
|
37 |
-
|
38 |
-
function setContent( src ){
|
39 |
-
return $(elRoot).find('div.diff').html( src );
|
40 |
-
}
|
41 |
-
|
42 |
-
|
43 |
-
function setError( message ){
|
44 |
-
hideLoading();
|
45 |
-
return $('<p class="error"></p>').text( message ).appendTo( setContent('') );
|
46 |
-
}
|
47 |
-
|
48 |
-
|
49 |
-
// applying line numbers in JS is easier than hacking HTML on the back end, because dom is parsed
|
50 |
-
function applyLineNumbers( i, tbody ){
|
51 |
-
var i, cells,
|
52 |
-
rows = tbody.getElementsByTagName('tr'),
|
53 |
-
nrow = rows.length,
|
54 |
-
data = tbody.getAttribute('data-diff').split(/\D+/),
|
55 |
-
xmin = data[0], xmax = data[1],
|
56 |
-
ymin = data[2], ymax = data[3]
|
57 |
-
;
|
58 |
-
/*function lpad( n, max ){
|
59 |
-
var str = String( n ),
|
60 |
-
len = String(max).length;
|
61 |
-
while( str.length < len ){
|
62 |
-
str = '\xA0'+str;
|
63 |
-
}
|
64 |
-
return str;
|
65 |
-
}*/
|
66 |
-
function apply( td, num, max ){
|
67 |
-
if( num <= max ){
|
68 |
-
$('<span></span>').text( String(num) ).prependTo( td );
|
69 |
-
}
|
70 |
-
}
|
71 |
-
for( i = 0; i < nrow; i++ ){
|
72 |
-
cells = rows[i].getElementsByTagName('td');
|
73 |
-
apply( cells[0], xmin++, xmax );
|
74 |
-
apply( cells[2], ymin++, ymax );
|
75 |
-
}
|
76 |
-
}
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
function loadDiff( offset ){
|
81 |
-
if( xhr ){
|
82 |
-
xhr.abort();
|
83 |
-
}
|
84 |
-
// use in-code cache
|
85 |
-
var src = cache[offset];
|
86 |
-
if( null != src ){
|
87 |
-
setContent( src );
|
88 |
-
hideLoading();
|
89 |
-
return;
|
90 |
-
}
|
91 |
-
// remote load required
|
92 |
-
setContent('');
|
93 |
-
showLoading();
|
94 |
-
xhr = loco.ajax.post( 'diff',
|
95 |
-
{
|
96 |
-
lhs: conf.paths[offset],
|
97 |
-
rhs: conf.paths[offset+1]
|
98 |
-
},
|
99 |
-
function( r, state, _xhr ){
|
100 |
-
if( _xhr === xhr ){
|
101 |
-
if( src = r && r.html ){
|
102 |
-
cache[offset] = src;
|
103 |
-
setContent( src ).find('tbody').each( applyLineNumbers );
|
104 |
-
hideLoading();
|
105 |
-
}
|
106 |
-
else {
|
107 |
-
setError( r && r.error || 'Unknown error' );
|
108 |
-
}
|
109 |
-
}
|
110 |
-
},
|
111 |
-
function( _xhr, error, message ){
|
112 |
-
if( _xhr === xhr ){
|
113 |
-
xhr = null;
|
114 |
-
// ajax utilty should have extracted meaningful error
|
115 |
-
setError('Failed to generate diff');
|
116 |
-
}
|
117 |
-
}
|
118 |
-
);
|
119 |
-
}
|
120 |
-
|
121 |
-
|
122 |
-
/**
|
123 |
-
* Go to next revision (newer)
|
124 |
-
*/
|
125 |
-
function goNext( event ){
|
126 |
-
event.preventDefault();
|
127 |
-
go( revOffset - 1 );
|
128 |
-
return false;
|
129 |
-
}
|
130 |
-
|
131 |
-
|
132 |
-
/**
|
133 |
-
* Go to previous revision (older)
|
134 |
-
*/
|
135 |
-
function goPrev( event ){
|
136 |
-
event.preventDefault();
|
137 |
-
go( revOffset + 1 );
|
138 |
-
return false;
|
139 |
-
}
|
140 |
-
|
141 |
-
|
142 |
-
function go( offset ){
|
143 |
-
if( offset >=0 && offset <= maxOffset ){
|
144 |
-
revOffset = offset;
|
145 |
-
loadDiff( offset );
|
146 |
-
redraw();
|
147 |
-
}
|
148 |
-
}
|
149 |
-
|
150 |
-
|
151 |
-
function redraw(){
|
152 |
-
var i = revOffset, j = i + 1;
|
153 |
-
// lock navigation to available range
|
154 |
-
prevBut.disabled = i >= maxOffset;
|
155 |
-
nextBut.disabled = i <= 0;
|
156 |
-
//
|
157 |
-
$metas.addClass('jshide').removeClass('diff-meta-current');
|
158 |
-
$metas.eq(i).removeClass('jshide').addClass('diff-meta-current');
|
159 |
-
$metas.eq(j).removeClass('jshide');
|
160 |
-
}
|
161 |
-
|
162 |
-
// enable navigation if there is something to navigate to
|
163 |
-
if( maxOffset ){
|
164 |
-
$(prevBut).click( goPrev ).parent().removeClass('jshide');
|
165 |
-
$(nextBut).click( goNext ).parent().removeClass('jshide');
|
166 |
-
}
|
167 |
-
|
168 |
-
// load default diff, which is current version compared to most recent backup
|
169 |
-
go( 0 );
|
170 |
-
|
171 |
-
|
172 |
-
}( window, document, jQuery );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pub/js/poinit.js
DELETED
@@ -1,203 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Script for PO file initializing page
|
3 |
-
*/
|
4 |
-
!function( window, document, $ ){
|
5 |
-
|
6 |
-
var path,
|
7 |
-
loco = window.locoScope,
|
8 |
-
fsHook = document.getElementById('loco-fs'),
|
9 |
-
elForm = document.getElementById('loco-poinit'),
|
10 |
-
fsConn = fsHook && loco.fs.init( fsHook )
|
11 |
-
;
|
12 |
-
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Abstract selection of twin mode (Select/Custom) locale input
|
16 |
-
*/
|
17 |
-
var localeSelector = function( elForm ){
|
18 |
-
function isSelectMode(){
|
19 |
-
return elMode[0].checked;
|
20 |
-
}
|
21 |
-
function setSelectMode(){
|
22 |
-
elMode[0].checked = true;
|
23 |
-
redrawMode( true );
|
24 |
-
}
|
25 |
-
function setCustomMode(){
|
26 |
-
if( ! elCode.value ){
|
27 |
-
elCode.value = getValue();
|
28 |
-
}
|
29 |
-
elMode[1].checked = true;
|
30 |
-
//elOpts.selectedIndex = 0;
|
31 |
-
redrawMode( false );
|
32 |
-
}
|
33 |
-
function getValue(){
|
34 |
-
var data = $( isSelectMode() ? elOpts : elCode ).serializeArray();
|
35 |
-
return data[0] && data[0].value || '';
|
36 |
-
}
|
37 |
-
function getLocale(){
|
38 |
-
var value = getValue();
|
39 |
-
return value ? loco.locale.parse(value) : loco.locale.clone( {lang:'zxx'} );
|
40 |
-
}
|
41 |
-
function onModeChange(){
|
42 |
-
redrawMode( isSelectMode() );
|
43 |
-
return true;
|
44 |
-
}
|
45 |
-
function redrawMode( selectMode ){
|
46 |
-
elCode.disabled = selectMode;
|
47 |
-
elOpts.disabled = ! selectMode;
|
48 |
-
fsCode.className = selectMode ? 'disabled' : 'active';
|
49 |
-
fsOpts.className = selectMode ? 'active' : 'disabled';
|
50 |
-
validate();
|
51 |
-
}
|
52 |
-
|
53 |
-
var elOpts = elForm['select-locale'],
|
54 |
-
elCode = elForm['custom-locale'],
|
55 |
-
elMode = elForm['use-selector'],
|
56 |
-
fsOpts = $(elOpts).focus( setSelectMode ).closest('fieldset').click( setSelectMode )[0],
|
57 |
-
fsCode = $(elCode).focus( setCustomMode ).closest('fieldset').click( setCustomMode )[0];
|
58 |
-
|
59 |
-
$(elMode).change( onModeChange );
|
60 |
-
onModeChange();
|
61 |
-
loco.watchtext( elCode, function(v){ $(elCode.form).triggerHandler('change'); } );
|
62 |
-
|
63 |
-
return {
|
64 |
-
val: getLocale
|
65 |
-
};
|
66 |
-
|
67 |
-
}( elForm );
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Abstract selection of target directory
|
73 |
-
*/
|
74 |
-
var pathSelector = function(){
|
75 |
-
var elOpts = elForm['select-path'];
|
76 |
-
function getIndex(){
|
77 |
-
var pairs = $(elOpts).serializeArray(), pair = pairs[0];
|
78 |
-
return pair && pair.value || null;
|
79 |
-
}
|
80 |
-
function getSelected( name ){
|
81 |
-
var index = getIndex();
|
82 |
-
return index && elForm[name+'['+index+']'];
|
83 |
-
}
|
84 |
-
function getValue(){
|
85 |
-
var elField = getSelected('path');
|
86 |
-
return elField && elField.value;
|
87 |
-
}
|
88 |
-
function getLabel(){
|
89 |
-
var elField = getSelected('path');
|
90 |
-
return elField && $(elField.parentNode).find('code.path').text();
|
91 |
-
}
|
92 |
-
/*$(elForm['path[0]']).focus( function(){
|
93 |
-
elOpts[0].checked = true;
|
94 |
-
} );*/
|
95 |
-
return {
|
96 |
-
val: getValue,
|
97 |
-
txt: getLabel
|
98 |
-
};
|
99 |
-
}( elForm );
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
// enable disable form submission
|
104 |
-
|
105 |
-
function setFormDisabled( disabled ){
|
106 |
-
$(elForm).find('button.button-primary').each( function( i, button ){
|
107 |
-
button.disabled = disabled;
|
108 |
-
} );
|
109 |
-
}
|
110 |
-
|
111 |
-
|
112 |
-
// Recalculate form submission when any data changes
|
113 |
-
|
114 |
-
function validate(){
|
115 |
-
var locale = localeSelector && localeSelector.val(),
|
116 |
-
hasloc = locale && locale.isValid() && 'zxx' !== locale.lang,
|
117 |
-
hasdir = pathSelector && pathSelector.val(),
|
118 |
-
valid = hasloc && hasdir
|
119 |
-
;
|
120 |
-
redrawLocale( locale );
|
121 |
-
// disabled until back end validates file path
|
122 |
-
setFormDisabled( true );
|
123 |
-
// check calculated path against back end
|
124 |
-
if( valid ){
|
125 |
-
var newPath = pathSelector.txt();
|
126 |
-
if( newPath !== path ){
|
127 |
-
path = newPath;
|
128 |
-
fsHook.path.value = path;
|
129 |
-
fsConn.listen(onFsConnect).connect();
|
130 |
-
}
|
131 |
-
else {
|
132 |
-
setFormDisabled( false );
|
133 |
-
}
|
134 |
-
// connection back end won't warn about system files, so we'll toggle notice here
|
135 |
-
// actually no need as user will be warned when they go through to the edit screen
|
136 |
-
// $('#loco-fs-info')[ pathSelector.typ() ? 'removeClass' : 'addClass' ]('jshide');
|
137 |
-
}
|
138 |
-
}
|
139 |
-
|
140 |
-
|
141 |
-
// callback after file system connect has returned
|
142 |
-
function onFsConnect( valid ){
|
143 |
-
setFormDisabled( ! valid );
|
144 |
-
}
|
145 |
-
|
146 |
-
|
147 |
-
// show locale in all file paths (or place holder if empty)
|
148 |
-
|
149 |
-
function redrawLocale( locale ){
|
150 |
-
var $form = $(elForm),
|
151 |
-
loctag = locale && locale.toString('_') || '',
|
152 |
-
suffix = loctag ? ( 'zxx' === loctag ? '<locale>' : loctag ) : '<invalid>'
|
153 |
-
;
|
154 |
-
$form.find('code.path span').each( function( i, el ){
|
155 |
-
el.textContent = suffix;
|
156 |
-
} );
|
157 |
-
$form.find('span.lang').each( function( i, icon ){
|
158 |
-
setLocaleIcon( icon, locale );
|
159 |
-
} );
|
160 |
-
}
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
function setLocaleIcon( icon, locale ){
|
165 |
-
if( locale && 'zxx' !== locale.lang ){
|
166 |
-
icon.setAttribute('lang',locale.lang);
|
167 |
-
icon.setAttribute('class',locale.getIcon());
|
168 |
-
}
|
169 |
-
else {
|
170 |
-
icon.setAttribute('lang','');
|
171 |
-
icon.setAttribute('class','lang nolang');
|
172 |
-
}
|
173 |
-
}
|
174 |
-
|
175 |
-
|
176 |
-
// Submit form to Ajax end point when ..erm.. submitted
|
177 |
-
|
178 |
-
function onMsginitSuccess( data ){
|
179 |
-
var href = data && data.redirect;
|
180 |
-
if( href ){
|
181 |
-
// TODO show success panel and hide form instead of redirect?
|
182 |
-
// loco.notices.success('YES');
|
183 |
-
location.assign( href );
|
184 |
-
}
|
185 |
-
}
|
186 |
-
|
187 |
-
function process( event ){
|
188 |
-
event.preventDefault();
|
189 |
-
fsConn.applyCreds( elForm );
|
190 |
-
loco.ajax.submit( event.target, onMsginitSuccess );
|
191 |
-
// TODO some kind of loader?
|
192 |
-
return false;
|
193 |
-
}
|
194 |
-
|
195 |
-
|
196 |
-
$(elForm)
|
197 |
-
.change( validate )
|
198 |
-
.submit( process );
|
199 |
-
|
200 |
-
redrawLocale( localeSelector.val() );
|
201 |
-
|
202 |
-
|
203 |
-
}( window, document, jQuery );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pub/js/potinit.js
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Script for POT file initializing page
|
3 |
-
*/
|
4 |
-
!function( window, document, $ ){
|
5 |
-
|
6 |
-
var loco = window.locoScope,
|
7 |
-
fsHook = document.getElementById('loco-fs'),
|
8 |
-
elForm = document.getElementById('loco-potinit')
|
9 |
-
;
|
10 |
-
|
11 |
-
|
12 |
-
// enable disable form submission
|
13 |
-
|
14 |
-
/*function setFormDisabled( disabled ){
|
15 |
-
$(elForm).find('button.button-primary').each( function( i, button ){
|
16 |
-
button.disabled = disabled;
|
17 |
-
} );
|
18 |
-
}*/
|
19 |
-
|
20 |
-
|
21 |
-
// Submit form to Ajax end point when ..erm.. submitted
|
22 |
-
|
23 |
-
function onXgettextSuccess( data ){
|
24 |
-
var href = data && data.redirect;
|
25 |
-
if( href ){
|
26 |
-
location.assign( href );
|
27 |
-
}
|
28 |
-
}
|
29 |
-
|
30 |
-
function process( event ){
|
31 |
-
event.preventDefault();
|
32 |
-
loco.ajax.submit( event.target, onXgettextSuccess );
|
33 |
-
return false;
|
34 |
-
}
|
35 |
-
|
36 |
-
|
37 |
-
$(elForm)
|
38 |
-
.submit( process );
|
39 |
-
|
40 |
-
//setFormDisabled( false );
|
41 |
-
|
42 |
-
if( fsHook ){
|
43 |
-
loco.fs.init(fsHook).setForm( elForm );
|
44 |
-
}
|
45 |
-
|
46 |
-
|
47 |
-
}( window, document, jQuery );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pub/js/poview.js
DELETED
@@ -1,191 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Script for PO/POT source view screen
|
3 |
-
*/
|
4 |
-
!function( window, document, $ ){
|
5 |
-
|
6 |
-
var $modal,
|
7 |
-
loco = window.locoScope,
|
8 |
-
conf = window.locoConf,
|
9 |
-
view = document.getElementById('loco-po');
|
10 |
-
|
11 |
-
|
12 |
-
// index messages and enable text filter
|
13 |
-
! function( view, dict ){
|
14 |
-
var min, max,
|
15 |
-
texts = [],
|
16 |
-
blocks = [],
|
17 |
-
valid = true,
|
18 |
-
filtered = false,
|
19 |
-
items = $(view).find('li')
|
20 |
-
;
|
21 |
-
function flush(){
|
22 |
-
if( texts.length ){
|
23 |
-
blocks.push( [min,max] );
|
24 |
-
dict.push( texts );
|
25 |
-
texts = [];
|
26 |
-
}
|
27 |
-
min = null;
|
28 |
-
}
|
29 |
-
items.each( function( i, li ){
|
30 |
-
var text, $li = $(li);
|
31 |
-
// empty line indicates end of message
|
32 |
-
if( $li.find('span.po-none').length ) {
|
33 |
-
flush();
|
34 |
-
}
|
35 |
-
// context indexable if po-text present
|
36 |
-
else {
|
37 |
-
max = i;
|
38 |
-
if( null == min ){
|
39 |
-
min = i;
|
40 |
-
}
|
41 |
-
if( text = $li.find('.po-text').text() ){
|
42 |
-
texts = texts.concat( text.replace(/\\[ntvfab\\"]/g, ' ').split(' ') );
|
43 |
-
}
|
44 |
-
}
|
45 |
-
} );
|
46 |
-
flush();
|
47 |
-
// indexing done, enable filtering
|
48 |
-
// TODO for filtering to perform well, we must perform off-screen buffering of redundant <li> nodes
|
49 |
-
// TODO found text highlighting. (more complex than first thought)
|
50 |
-
function ol( start ){
|
51 |
-
return $('<ol class="msgcat"></ol>').attr('start',start).appendTo(view);
|
52 |
-
}
|
53 |
-
function filter(s){
|
54 |
-
var i, block, found = dict.find(s), f = -1, length = found.length, $ol;
|
55 |
-
$('ol',view).remove();
|
56 |
-
if( length ){
|
57 |
-
while( ++f < length ){
|
58 |
-
block = blocks[ found[f] ];
|
59 |
-
i = block[0];
|
60 |
-
$ol = ol( i+1 );
|
61 |
-
for( ; i <= block[1]; i++ ){
|
62 |
-
$ol.append( items[i]/*.cloneNode(true)*/ );
|
63 |
-
}
|
64 |
-
}
|
65 |
-
validate(true);
|
66 |
-
}
|
67 |
-
else {
|
68 |
-
validate(false);
|
69 |
-
// translators: When text filtering reduces to an empty view
|
70 |
-
ol(0).append( $('<li></li>').text( loco.l10n._('Nothing matches the text filter') ) );
|
71 |
-
}
|
72 |
-
filtered = true;
|
73 |
-
resize();
|
74 |
-
};
|
75 |
-
function unfilter(){
|
76 |
-
if( filtered ){
|
77 |
-
validate(true);
|
78 |
-
filtered = false;
|
79 |
-
$('ol',view).remove();
|
80 |
-
ol(1).append( items );
|
81 |
-
resize();
|
82 |
-
}
|
83 |
-
}
|
84 |
-
function validate( bool ){
|
85 |
-
if( valid !== bool ){
|
86 |
-
$('#loco-content')[ bool ? 'removeClass' : 'addClass' ]('loco-invalid');
|
87 |
-
valid = bool;
|
88 |
-
}
|
89 |
-
}
|
90 |
-
loco.watchtext( $(view.parentNode).find('form.loco-filter')[0].q, function(q){
|
91 |
-
q ? filter(q) : unfilter();
|
92 |
-
} );
|
93 |
-
|
94 |
-
}( view, loco.fulltext.init() );
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
// OK to show view now. may have taken a while to render and index
|
99 |
-
$(view).removeClass('loco-loading');
|
100 |
-
|
101 |
-
|
102 |
-
// resize function fits scrollable viewport, accounting for headroom and touching bottom of screen.
|
103 |
-
var resize = function(){
|
104 |
-
function top( el, ancestor ){
|
105 |
-
var y = el.offsetTop||0;
|
106 |
-
while( ( el = el.offsetParent ) && el !== ancestor ){
|
107 |
-
y += el.offsetTop||0;
|
108 |
-
}
|
109 |
-
return y;
|
110 |
-
}
|
111 |
-
var fixHeight,
|
112 |
-
maxHeight = view.clientHeight - 2
|
113 |
-
;
|
114 |
-
return function(){
|
115 |
-
var topBanner = top( view, document.body ),
|
116 |
-
winHeight = window.innerHeight,
|
117 |
-
setHeight = winHeight - topBanner - 20
|
118 |
-
;
|
119 |
-
if( fixHeight !== setHeight ){
|
120 |
-
if( setHeight < maxHeight ){
|
121 |
-
view.style.height = String(setHeight)+'px';
|
122 |
-
}
|
123 |
-
else {
|
124 |
-
view.style.height = '';
|
125 |
-
}
|
126 |
-
fixHeight = setHeight;
|
127 |
-
}
|
128 |
-
};
|
129 |
-
}();
|
130 |
-
|
131 |
-
resize();
|
132 |
-
$(window).resize( resize );
|
133 |
-
|
134 |
-
|
135 |
-
// enable file reference links to open modal to ajax service
|
136 |
-
$(view).click( function(event){
|
137 |
-
var link = event.target;
|
138 |
-
if( link.hasAttribute('href') ){
|
139 |
-
event.preventDefault();
|
140 |
-
getModal().html('<div class="loco-loading"></div>').dialog('option','title','Loading..').off('dialogopen').dialog('open').on('dialogopen',onModalOpen);
|
141 |
-
var postdata = $.extend( { ref:link.textContent, path:conf.popath }, conf.project||{} );
|
142 |
-
loco.ajax.post( 'fsReference', postdata, onRefSource, onRefError );
|
143 |
-
return false;
|
144 |
-
}
|
145 |
-
} );
|
146 |
-
// http://api.jqueryui.com/dialog/
|
147 |
-
function getModal(){
|
148 |
-
return $modal || ( $modal = $('<div id="loco-po-ref"></div>').dialog( {
|
149 |
-
dialogClass : 'loco-modal',
|
150 |
-
modal : true,
|
151 |
-
autoOpen : false,
|
152 |
-
closeOnEscape : true,
|
153 |
-
resizable : false,
|
154 |
-
height : 500
|
155 |
-
} ) );
|
156 |
-
}
|
157 |
-
// when reference pulling fails (e.g. file not found, or line nonexistant)
|
158 |
-
function onRefError( xhr, error, message ){
|
159 |
-
$error = $('<p></p>').text( message );
|
160 |
-
getModal().dialog('close').html('').dialog('option','title','Error').append($error).dialog('open');
|
161 |
-
}
|
162 |
-
// display reference source when received via ajax response
|
163 |
-
function onRefSource( result ){
|
164 |
-
var code = result && result.code;
|
165 |
-
if( ! code ){
|
166 |
-
return;
|
167 |
-
}
|
168 |
-
var i = -1,
|
169 |
-
length = code.length,
|
170 |
-
$ol = $('<ol></ol>').attr('class',result.type);
|
171 |
-
while( ++i < length ){
|
172 |
-
$('<li></li>').html( code[i] ).appendTo($ol);
|
173 |
-
}
|
174 |
-
// Highlight referenced line
|
175 |
-
$ol.find('li').eq( result.line - 1 ).attr('class','highlighted');
|
176 |
-
// TODO enable highlight toggling of other lines via click/drag etc..
|
177 |
-
getModal().dialog('close').html('').dialog('option','title', result.path+':'+result.line).append($ol).dialog('open');
|
178 |
-
}
|
179 |
-
|
180 |
-
// scroll to first highlighted line of code once modal open
|
181 |
-
function onModalOpen( event, ui ){
|
182 |
-
var div = event.target,
|
183 |
-
line = $(div).find('li.highlighted')[0],
|
184 |
-
yAbs = line && line.offsetTop || 0, // <- position of line relative to container
|
185 |
-
yVis = Math.floor( div.clientHeight / 2 ), // <- target position of line relative to view port
|
186 |
-
yAdj = Math.max( 0, yAbs - yVis ) // scroll required to move line to visual position
|
187 |
-
;
|
188 |
-
div.scrollTop = yAdj;
|
189 |
-
}
|
190 |
-
|
191 |
-
}( window, document, jQuery );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pub/js/setup.js
DELETED
@@ -1,129 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Script for bundle setup page
|
3 |
-
* TODO translations
|
4 |
-
*/
|
5 |
-
!function( window, document, $ ){
|
6 |
-
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Look up bundle configuration on remote server
|
10 |
-
*/
|
11 |
-
function find( vendor, slug, version ){
|
12 |
-
|
13 |
-
function onFailure(){
|
14 |
-
if( timer ){
|
15 |
-
destroy();
|
16 |
-
onTimeout();
|
17 |
-
}
|
18 |
-
};
|
19 |
-
|
20 |
-
function onResponse( data, status, obj ){
|
21 |
-
if( timer ){
|
22 |
-
destroy();
|
23 |
-
var match = data && data.exact,
|
24 |
-
status = data && data.status
|
25 |
-
;
|
26 |
-
if( match ){
|
27 |
-
setJson( match );
|
28 |
-
}
|
29 |
-
else if( 404 === status ){
|
30 |
-
unsetJson("Sorry, we don't know a bundle by this name");
|
31 |
-
}
|
32 |
-
else {
|
33 |
-
loco.notices.debug( data.error || 'Unknown server error' );
|
34 |
-
onTimeout();
|
35 |
-
}
|
36 |
-
}
|
37 |
-
};
|
38 |
-
|
39 |
-
function onTimeout(){
|
40 |
-
unsetJson('Failed to contact remote API');
|
41 |
-
timer = null;
|
42 |
-
}
|
43 |
-
|
44 |
-
function destroy(){
|
45 |
-
if( timer ){
|
46 |
-
clearTimeout( timer );
|
47 |
-
timer = null;
|
48 |
-
}
|
49 |
-
}
|
50 |
-
|
51 |
-
var timer = setTimeout( onTimeout, 3000 );
|
52 |
-
|
53 |
-
unsetJson('');
|
54 |
-
|
55 |
-
$.ajax( {
|
56 |
-
url: conf.apiUrl+'/'+vendor+'/'+slug+'.jsonp?version='+encodeURIComponent(version),
|
57 |
-
dataType: 'jsonp',
|
58 |
-
success: onResponse,
|
59 |
-
error: onFailure,
|
60 |
-
cache: true
|
61 |
-
} );
|
62 |
-
|
63 |
-
return {
|
64 |
-
abort: destroy
|
65 |
-
};
|
66 |
-
}
|
67 |
-
|
68 |
-
|
69 |
-
function setJson( json ){
|
70 |
-
elForm['json-content'].value = json;
|
71 |
-
$('#loco-remote-empty').hide();
|
72 |
-
//$('#loco-remote-query').hide();
|
73 |
-
$('#loco-remote-found').show();
|
74 |
-
}
|
75 |
-
|
76 |
-
|
77 |
-
function unsetJson( message ){
|
78 |
-
elForm['json-content'].value = '';
|
79 |
-
//$('#loco-remote-query').show();
|
80 |
-
$('#loco-remote-empty').show().find('span').text( message );
|
81 |
-
$('#loco-remote-found').hide().removeClass('jshide');
|
82 |
-
}
|
83 |
-
|
84 |
-
|
85 |
-
function onFindClick( event ){
|
86 |
-
event.preventDefault();
|
87 |
-
finder && finder.abort();
|
88 |
-
finder = find( elForm.vendor.value, elForm.slug.value, elForm.version.value );
|
89 |
-
return false;
|
90 |
-
}
|
91 |
-
|
92 |
-
function onCancelClick( event ){
|
93 |
-
event.preventDefault();
|
94 |
-
unsetJson('');
|
95 |
-
return false;
|
96 |
-
}
|
97 |
-
|
98 |
-
function setVendors( list ){
|
99 |
-
var i = -1,
|
100 |
-
value, label,
|
101 |
-
length = list.length,
|
102 |
-
$select = $(elForm.vendor).html('')
|
103 |
-
;
|
104 |
-
while( ++i < length ){
|
105 |
-
value = list[i][0];
|
106 |
-
label = list[i][1];
|
107 |
-
$select.append( $('<option></option>').attr('value',value).text(label) );
|
108 |
-
}
|
109 |
-
}
|
110 |
-
|
111 |
-
|
112 |
-
var loco = window.locoScope,
|
113 |
-
conf = window.locoConf,
|
114 |
-
|
115 |
-
finder,
|
116 |
-
elForm = document.getElementById('loco-remote'),
|
117 |
-
$findButt = $(elForm).find('button[type="button"]').click( onFindClick ),
|
118 |
-
$resetButt = $(elForm).find('input[type="reset"]').click( onCancelClick );
|
119 |
-
|
120 |
-
// pull vendor list
|
121 |
-
$.ajax( {
|
122 |
-
url: conf.apiUrl+'/vendors.jsonp',
|
123 |
-
dataType: 'jsonp',
|
124 |
-
success: setVendors,
|
125 |
-
cache: true
|
126 |
-
} );
|
127 |
-
|
128 |
-
|
129 |
-
}( window, document, jQuery );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
===
|
2 |
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.4.1
|
7 |
-
Stable tag: 2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -20,6 +20,7 @@ It also provides localization tools for developers, such as extracting strings a
|
|
20 |
Features include:
|
21 |
|
22 |
* Built-in translation editor within WordPress admin
|
|
|
23 |
* Create and update language files directly in your theme or plugin
|
24 |
* Extraction of translatable strings from your source code
|
25 |
* Native MO file compilation without the need for Gettext on your system
|
@@ -67,11 +68,13 @@ More information on using the plugin is [available here](https://localise.biz/wo
|
|
67 |
|
68 |
== Frequently Asked Questions ==
|
69 |
|
70 |
-
|
|
|
|
|
71 |
|
72 |
Try our [Guides and Tutorials](https://localise.biz/wordpress/plugin#guides).
|
73 |
|
74 |
-
= How do I get help? =
|
75 |
|
76 |
If you have a problem using Loco Translate, please try our [help pages](https://localise.biz/wordpress/plugin).
|
77 |
There's a lot of information there to help you understand how it works and the most common pitfalls to avoid.
|
@@ -97,6 +100,14 @@ We don't collect your data or snoop on you. See the [plugin privacy notice](http
|
|
97 |
|
98 |
== Changelog ==
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
= 2.3.4 =
|
101 |
* Updated translatable strings
|
102 |
* Added missing template recommendation
|
@@ -332,8 +343,8 @@ We don't collect your data or snoop on you. See the [plugin privacy notice](http
|
|
332 |
|
333 |
== Upgrade Notice ==
|
334 |
|
335 |
-
= 2.
|
336 |
-
* Various
|
337 |
|
338 |
|
339 |
|
@@ -351,5 +362,6 @@ The PO file editor supports the following keyboard shortcuts for faster translat
|
|
351 |
* Toggle Fuzzy: `Ctrl U`
|
352 |
* Save PO / compile MO: `Ctrl S`
|
353 |
* Toggle invisibles: `Shift Ctrl I`
|
|
|
354 |
|
355 |
Mac users can use ⌘ Cmd instead of Ctrl.
|
1 |
+
=== Loco Translate ===
|
2 |
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.4.1
|
7 |
+
Stable tag: 2.4.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
20 |
Features include:
|
21 |
|
22 |
* Built-in translation editor within WordPress admin
|
23 |
+
* Integration with automatic translation APIs
|
24 |
* Create and update language files directly in your theme or plugin
|
25 |
* Extraction of translatable strings from your source code
|
26 |
* Native MO file compilation without the need for Gettext on your system
|
68 |
|
69 |
== Frequently Asked Questions ==
|
70 |
|
71 |
+
Please visit the [FAQs page](https://localise.biz/wordpress/plugin/faqs) on our website for the most common issues.
|
72 |
+
|
73 |
+
= How do I use Loco Translate? =
|
74 |
|
75 |
Try our [Guides and Tutorials](https://localise.biz/wordpress/plugin#guides).
|
76 |
|
77 |
+
= How do I get more help? =
|
78 |
|
79 |
If you have a problem using Loco Translate, please try our [help pages](https://localise.biz/wordpress/plugin).
|
80 |
There's a lot of information there to help you understand how it works and the most common pitfalls to avoid.
|
100 |
|
101 |
== Changelog ==
|
102 |
|
103 |
+
= 2.4.0
|
104 |
+
* Added support for third party translation APIs
|
105 |
+
* Added file references to editor source pane in code view
|
106 |
+
* Added fuzzy matching during editor Sync operation
|
107 |
+
* Style changes including rearrangement of editor buttons
|
108 |
+
* Elevated warnings when scripts are tampered with
|
109 |
+
* Removed remnants of legacy version 1.x
|
110 |
+
|
111 |
= 2.3.4 =
|
112 |
* Updated translatable strings
|
113 |
* Added missing template recommendation
|
343 |
|
344 |
== Upgrade Notice ==
|
345 |
|
346 |
+
= 2.4.0 =
|
347 |
+
* Various improvements including automatic translation support
|
348 |
|
349 |
|
350 |
|
362 |
* Toggle Fuzzy: `Ctrl U`
|
363 |
* Save PO / compile MO: `Ctrl S`
|
364 |
* Toggle invisibles: `Shift Ctrl I`
|
365 |
+
* Suggest translation: `Ctrl J`
|
366 |
|
367 |
Mac users can use ⌘ Cmd instead of Ctrl.
|
src/Locale.php
CHANGED
@@ -51,6 +51,7 @@ class Loco_Locale implements JsonSerializable {
|
|
51 |
private $valid;
|
52 |
|
53 |
/**
|
|
|
54 |
* @return Loco_Locale
|
55 |
*/
|
56 |
public static function parse( $tag ){
|
@@ -70,6 +71,9 @@ class Loco_Locale implements JsonSerializable {
|
|
70 |
/**
|
71 |
* Construct from subtags NOT from composite tag. See self::parse
|
72 |
* Note that this skips normalization and validation steps
|
|
|
|
|
|
|
73 |
*/
|
74 |
public function __construct( $lang = '', $region = '', $variant = '' ){
|
75 |
$this->tag = compact('lang','region','variant');
|
51 |
private $valid;
|
52 |
|
53 |
/**
|
54 |
+
* @param string
|
55 |
* @return Loco_Locale
|
56 |
*/
|
57 |
public static function parse( $tag ){
|
71 |
/**
|
72 |
* Construct from subtags NOT from composite tag. See self::parse
|
73 |
* Note that this skips normalization and validation steps
|
74 |
+
* @param string
|
75 |
+
* @param string
|
76 |
+
* @param string
|
77 |
*/
|
78 |
public function __construct( $lang = '', $region = '', $variant = '' ){
|
79 |
$this->tag = compact('lang','region','variant');
|
src/admin/config/ApisController.php
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* API keys/settings screen
|
4 |
+
*/
|
5 |
+
class Loco_admin_config_ApisController extends Loco_admin_config_BaseController {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* {@inheritdoc}
|
9 |
+
*/
|
10 |
+
public function init(){
|
11 |
+
parent::init();
|
12 |
+
$this->set( 'title', __('API keys','loco-translate') );
|
13 |
+
|
14 |
+
// collect support API keys
|
15 |
+
$apis = array();
|
16 |
+
foreach( Loco_api_Providers::builtin() as $api ){
|
17 |
+
$apis[ $api['id'] ] = new Loco_mvc_ViewParams($api);
|
18 |
+
}
|
19 |
+
$this->set('apis',$apis);
|
20 |
+
|
21 |
+
// handle save action
|
22 |
+
$nonce = $this->setNonce('save-apis');
|
23 |
+
try {
|
24 |
+
if( $this->checkNonce($nonce->action) ){
|
25 |
+
$post = Loco_mvc_PostParams::get();
|
26 |
+
if( $post->has('api') ){
|
27 |
+
// Save only options in post. Avoids overwrite of missing site options
|
28 |
+
$data = array();
|
29 |
+
$filter = array();
|
30 |
+
foreach( $apis as $id => $api ){
|
31 |
+
$fields = $post->api[$id];
|
32 |
+
if( is_array($fields) ){
|
33 |
+
foreach( $fields as $prop => $value ){
|
34 |
+
$apis[$id][$prop] = $value;
|
35 |
+
$prop = $id.'_api_'.$prop;
|
36 |
+
$data[$prop] = $value;
|
37 |
+
$filter[] = $prop;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
}
|
41 |
+
if( $filter ){
|
42 |
+
Loco_data_Settings::get()->populate($data,$filter)->persistIfDirty();
|
43 |
+
Loco_error_AdminNotices::success( __('Settings saved','loco-translate') );
|
44 |
+
}
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
48 |
+
catch( Loco_error_Exception $e ){
|
49 |
+
Loco_error_AdminNotices::add($e);
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
|
54 |
+
/**
|
55 |
+
* {@inheritdoc}
|
56 |
+
*/
|
57 |
+
public function render(){
|
58 |
+
|
59 |
+
$title = __('Plugin settings','loco-translate');
|
60 |
+
$breadcrumb = new Loco_admin_Navigation;
|
61 |
+
$breadcrumb->add( $title );
|
62 |
+
|
63 |
+
return $this->view('admin/config/apis', compact('breadcrumb') );
|
64 |
+
}
|
65 |
+
|
66 |
+
}
|
src/admin/config/BaseController.php
CHANGED
@@ -16,8 +16,9 @@ abstract class Loco_admin_config_BaseController extends Loco_mvc_AdminController
|
|
16 |
$this->set( 'tabs', $tabs );
|
17 |
$actions = array (
|
18 |
'' => __('Site options','loco-translate'),
|
19 |
-
'user'
|
20 |
-
'
|
|
|
21 |
);
|
22 |
if( loco_debugging() ){
|
23 |
$actions['debug'] = __('Debug','loco-translate');
|
@@ -37,7 +38,8 @@ abstract class Loco_admin_config_BaseController extends Loco_mvc_AdminController
|
|
37 |
*/
|
38 |
public function getHelpTabs(){
|
39 |
return array (
|
40 |
-
__('Overview','default') => $this->viewSnippet('tab-
|
|
|
41 |
);
|
42 |
}
|
43 |
|
16 |
$this->set( 'tabs', $tabs );
|
17 |
$actions = array (
|
18 |
'' => __('Site options','loco-translate'),
|
19 |
+
'user' => __('User options','loco-translate'),
|
20 |
+
'apis' => __('API keys','loco-translate'),
|
21 |
+
'version' => __('Version','loco-translate'),
|
22 |
);
|
23 |
if( loco_debugging() ){
|
24 |
$actions['debug'] = __('Debug','loco-translate');
|
38 |
*/
|
39 |
public function getHelpTabs(){
|
40 |
return array (
|
41 |
+
__('Overview','default') => $this->viewSnippet('tab-config'),
|
42 |
+
__('API keys','loco-translate') => $this->viewSnippet('tab-config-apis'),
|
43 |
);
|
44 |
}
|
45 |
|
src/admin/config/DebugController.php
CHANGED
@@ -102,9 +102,22 @@ class Loco_admin_config_DebugController extends Loco_admin_config_BaseController
|
|
102 |
// Ajaxing:
|
103 |
$this->enqueueScript('debug');
|
104 |
$this->set( 'js', new Loco_mvc_ViewParams( array (
|
105 |
-
'nonces' => array( 'ping' => wp_create_nonce('ping') ),
|
106 |
) ) );
|
107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
// File system access
|
109 |
$dir = new Loco_fs_Directory( loco_constant('LOCO_LANG_DIR') ) ;
|
110 |
$ctx = new Loco_fs_FileWriter( $dir );
|
102 |
// Ajaxing:
|
103 |
$this->enqueueScript('debug');
|
104 |
$this->set( 'js', new Loco_mvc_ViewParams( array (
|
105 |
+
'nonces' => array( 'ping' => wp_create_nonce('ping'), 'apis' => wp_create_nonce('apis') ),
|
106 |
) ) );
|
107 |
|
108 |
+
// Third party API integrations:
|
109 |
+
$apis = array();
|
110 |
+
$jsapis = array();
|
111 |
+
foreach( Loco_api_Providers::export() as $api ){
|
112 |
+
$apis[] = new Loco_mvc_ViewParams($api);
|
113 |
+
$jsapis[] = $api;
|
114 |
+
}
|
115 |
+
if( $apis ){
|
116 |
+
$this->set('apis',$apis);
|
117 |
+
$jsconf = $this->get('js');
|
118 |
+
$jsconf['apis'] = $jsapis;
|
119 |
+
}
|
120 |
+
|
121 |
// File system access
|
122 |
$dir = new Loco_fs_Directory( loco_constant('LOCO_LANG_DIR') ) ;
|
123 |
$ctx = new Loco_fs_FileWriter( $dir );
|
src/admin/config/SettingsController.php
CHANGED
@@ -53,7 +53,6 @@ class Loco_admin_config_SettingsController extends Loco_admin_config_BaseControl
|
|
53 |
'attrs' => 'checked disabled'
|
54 |
) );
|
55 |
}
|
56 |
-
/* @var $role WP_Role */
|
57 |
foreach( $perms->getRoles() as $id => $role ){
|
58 |
$caps[$id] = new Loco_mvc_ViewParams( array(
|
59 |
'value' => '1',
|
53 |
'attrs' => 'checked disabled'
|
54 |
) );
|
55 |
}
|
|
|
56 |
foreach( $perms->getRoles() as $id => $role ){
|
57 |
$caps[$id] = new Loco_mvc_ViewParams( array(
|
58 |
'value' => '1',
|
src/admin/file/EditController.php
CHANGED
@@ -29,6 +29,38 @@ class Loco_admin_file_EditController extends Loco_admin_file_BaseController {
|
|
29 |
}
|
30 |
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
/**
|
33 |
* {@inheritdoc}
|
34 |
*/
|
@@ -94,15 +126,15 @@ class Loco_admin_file_EditController extends Loco_admin_file_BaseController {
|
|
94 |
if( $potfile->exists() ){
|
95 |
try {
|
96 |
$potdata = Loco_gettext_Data::load( $potfile );
|
|
|
|
|
|
|
97 |
}
|
98 |
catch( Exception $e ){
|
99 |
// translators: Where %s is the name of the invalid POT file
|
100 |
Loco_error_AdminNotices::warn( sprintf( __('Translation template is invalid (%s)','loco-translate'), $potfile->basename() ) );
|
101 |
$potfile = null;
|
102 |
}
|
103 |
-
if( $potfile && ! $potdata->equalSource($data) ){
|
104 |
-
Loco_error_AdminNotices::debug( sprintf( __("Translations don't match template. Run sync to update from %s",'loco-translate'), $potfile->basename() ) );
|
105 |
-
}
|
106 |
}
|
107 |
// else template doesn't exist, so sync will be done to source code
|
108 |
else {
|
@@ -159,10 +191,8 @@ class Loco_admin_file_EditController extends Loco_admin_file_BaseController {
|
|
159 |
'bundle' => $bundle->getId(),
|
160 |
'domain' => (string) $project->getId(),
|
161 |
) : null,
|
162 |
-
'nonces' => $readonly
|
163 |
-
|
164 |
-
'sync' => wp_create_nonce('sync'),
|
165 |
-
),
|
166 |
) ) );
|
167 |
$this->set( 'ui', new Loco_mvc_ViewParams( array(
|
168 |
// Translators: button for adding a new string when manually editing a POT file
|
@@ -176,8 +206,8 @@ class Loco_admin_file_EditController extends Loco_admin_file_BaseController {
|
|
176 |
'sync' => _x('Sync','Editor','loco-translate'),
|
177 |
// Translators: Button that reloads current screen
|
178 |
'revert' => _x('Revert','Editor','loco-translate'),
|
179 |
-
// Translators: Button that
|
180 |
-
'
|
181 |
// Translators: Button for downloading a PO, MO or POT file
|
182 |
'download' => _x('Download','Editor','loco-translate'),
|
183 |
// Translators: Placeholder text for text filter above editor
|
29 |
}
|
30 |
|
31 |
|
32 |
+
/**
|
33 |
+
* @param bool whether po files is in read-only mode
|
34 |
+
* @return array
|
35 |
+
*/
|
36 |
+
private function getNonces( $readonly ){
|
37 |
+
$nonces = array();
|
38 |
+
foreach( $readonly ? array('fsReference') : array('sync','save','fsReference','apis') as $name ){
|
39 |
+
$nonces[$name] = wp_create_nonce($name);
|
40 |
+
}
|
41 |
+
return $nonces;
|
42 |
+
}
|
43 |
+
|
44 |
+
|
45 |
+
/**
|
46 |
+
* @param bool whether po files is in read-only mode
|
47 |
+
* @return array
|
48 |
+
*/
|
49 |
+
private function getApiProviders( $readonly ){
|
50 |
+
return $readonly ? null : array_values( array_filter(Loco_api_Providers::export(),array(__CLASS__,'filterApiProvider') ) );
|
51 |
+
}
|
52 |
+
|
53 |
+
|
54 |
+
/**
|
55 |
+
* @internal
|
56 |
+
* @param string[]
|
57 |
+
* @return bool
|
58 |
+
*/
|
59 |
+
private static function filterApiProvider( array $api ){
|
60 |
+
return (bool) $api['key'];
|
61 |
+
}
|
62 |
+
|
63 |
+
|
64 |
/**
|
65 |
* {@inheritdoc}
|
66 |
*/
|
126 |
if( $potfile->exists() ){
|
127 |
try {
|
128 |
$potdata = Loco_gettext_Data::load( $potfile );
|
129 |
+
if( ! $potdata->equalSource($data) ){
|
130 |
+
Loco_error_AdminNotices::debug( sprintf( __("Translations don't match template. Run sync to update from %s",'loco-translate'), $potfile->basename() ) );
|
131 |
+
}
|
132 |
}
|
133 |
catch( Exception $e ){
|
134 |
// translators: Where %s is the name of the invalid POT file
|
135 |
Loco_error_AdminNotices::warn( sprintf( __('Translation template is invalid (%s)','loco-translate'), $potfile->basename() ) );
|
136 |
$potfile = null;
|
137 |
}
|
|
|
|
|
|
|
138 |
}
|
139 |
// else template doesn't exist, so sync will be done to source code
|
140 |
else {
|
191 |
'bundle' => $bundle->getId(),
|
192 |
'domain' => (string) $project->getId(),
|
193 |
) : null,
|
194 |
+
'nonces' => $this->getNonces($readonly),
|
195 |
+
'apis' => $locale ? $this->getApiProviders($readonly) : null,
|
|
|
|
|
196 |
) ) );
|
197 |
$this->set( 'ui', new Loco_mvc_ViewParams( array(
|
198 |
// Translators: button for adding a new string when manually editing a POT file
|
206 |
'sync' => _x('Sync','Editor','loco-translate'),
|
207 |
// Translators: Button that reloads current screen
|
208 |
'revert' => _x('Revert','Editor','loco-translate'),
|
209 |
+
// Translators: Button that opens window for auto-translating
|
210 |
+
'auto' => _x('Auto','Editor','loco-translate'),
|
211 |
// Translators: Button for downloading a PO, MO or POT file
|
212 |
'download' => _x('Download','Editor','loco-translate'),
|
213 |
// Translators: Placeholder text for text filter above editor
|
src/ajax/ApisController.php
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Ajax "apis" route, for handing off Ajax requests to hooked API integrations.
|
4 |
+
*/
|
5 |
+
class Loco_ajax_ApisController extends Loco_mvc_AjaxController {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* {@inheritdoc}
|
9 |
+
*/
|
10 |
+
public function render(){
|
11 |
+
$post = $this->validate();
|
12 |
+
|
13 |
+
// Fire an event so translation apis can register their hooks as lazily as possible
|
14 |
+
do_action('loco_api_ajax');
|
15 |
+
|
16 |
+
// API client id should be posted
|
17 |
+
$hook = (string) $post->hook;
|
18 |
+
|
19 |
+
// API client must be hooked in using loco_api_providers filter
|
20 |
+
// this normally filters on Loco_api_Providers::export() but should do the same with an empty array.
|
21 |
+
$config = null;
|
22 |
+
foreach( apply_filters('loco_api_providers', array() ) as $candidate ){
|
23 |
+
if( is_array($candidate) && array_key_exists('id',$candidate) && $candidate['id'] === $hook ){
|
24 |
+
$config = $candidate;
|
25 |
+
break;
|
26 |
+
}
|
27 |
+
}
|
28 |
+
if( is_null($config) ){
|
29 |
+
throw new Loco_error_Exception('API not registered: '.$hook );
|
30 |
+
}
|
31 |
+
|
32 |
+
// Get input texts to translate via registered hook. shouldn't be posted if empty.
|
33 |
+
$sources = $post->sources;
|
34 |
+
if( ! is_array($sources) || ! $sources ){
|
35 |
+
throw new Loco_error_Exception('Empty sources posted to '.$hook.' hook');
|
36 |
+
}
|
37 |
+
|
38 |
+
// The front end sends translations detected as HTML separately. This is to support common external apis.
|
39 |
+
// $isHtml = 'html' === $post->type;
|
40 |
+
|
41 |
+
// We need a locale too, which should be valid as it's the same one loaded into the front end.
|
42 |
+
$locale = Loco_Locale::parse( (string) $post->locale );
|
43 |
+
if( ! $locale->isValid() ){
|
44 |
+
throw new Loco_error_Exception('Invalid locale');
|
45 |
+
}
|
46 |
+
|
47 |
+
// Check if hook is registered, else sources will be returned as-is
|
48 |
+
$action = 'loco_api_translate_'.$hook;
|
49 |
+
if( ! has_filter($action) ){
|
50 |
+
throw new Loco_error_Exception('API not hooked. Use `add_filter('.var_export($action,1).',...)`');
|
51 |
+
}
|
52 |
+
|
53 |
+
// This is effectively a filter whereby the returned array should be a translation of the input array
|
54 |
+
// TODO might be useful for translation hooks to know the PO file this comes from
|
55 |
+
$targets = apply_filters( $action, $sources, $locale, $config );
|
56 |
+
if( count($targets) !== count($sources) ){
|
57 |
+
Loco_error_AdminNotices::warn('Number of translations does not match number of source strings');
|
58 |
+
}
|
59 |
+
|
60 |
+
// Response data doesn't need anything except the translations
|
61 |
+
$this->set('targets',$targets);
|
62 |
+
|
63 |
+
return parent::render();
|
64 |
+
}
|
65 |
+
|
66 |
+
|
67 |
+
}
|
src/ajax/SyncController.php
CHANGED
@@ -1,11 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Ajax "sync" route.
|
4 |
-
*
|
5 |
*/
|
6 |
class Loco_ajax_SyncController extends Loco_mvc_AjaxController {
|
7 |
-
|
8 |
-
|
9 |
/**
|
10 |
* {@inheritdoc}
|
11 |
*/
|
1 |
<?php
|
2 |
/**
|
3 |
* Ajax "sync" route.
|
4 |
+
* Extracts strings from source (POT or code) and returns to the browser for in-editor merge.
|
5 |
*/
|
6 |
class Loco_ajax_SyncController extends Loco_mvc_AjaxController {
|
7 |
+
|
|
|
8 |
/**
|
9 |
* {@inheritdoc}
|
10 |
*/
|
src/api/Providers.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Third party API helpers
|
4 |
+
*/
|
5 |
+
abstract class Loco_api_Providers {
|
6 |
+
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Export API credentials for all supported APIs
|
10 |
+
* @return array[]
|
11 |
+
*/
|
12 |
+
public static function export(){
|
13 |
+
return apply_filters( 'loco_api_providers', self::builtin() );
|
14 |
+
}
|
15 |
+
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @return array[]
|
19 |
+
*/
|
20 |
+
public static function builtin(){
|
21 |
+
$settings = Loco_data_Settings::get();
|
22 |
+
return array (
|
23 |
+
array (
|
24 |
+
'id' => 'google',
|
25 |
+
'name' => 'Google Translate',
|
26 |
+
'key' => $settings->offsetGet('google_api_key'),
|
27 |
+
),
|
28 |
+
array (
|
29 |
+
'id' => 'microsoft',
|
30 |
+
'name' => 'Microsoft Translator',
|
31 |
+
'key' => $settings->offsetGet('microsoft_api_key'),
|
32 |
+
'region' => $settings->offsetGet('microsoft_api_region'),
|
33 |
+
),
|
34 |
+
array (
|
35 |
+
'id' => 'yandex',
|
36 |
+
'name' => 'Yandex.Translate',
|
37 |
+
'key' => $settings->offsetGet('yandex_api_key'),
|
38 |
+
),
|
39 |
+
);
|
40 |
+
}
|
41 |
+
|
42 |
+
}
|
src/data/Serializable.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
abstract class Loco_data_Serializable extends ArrayObject {
|
6 |
|
7 |
/**
|
8 |
-
* Object version
|
9 |
* @var string|int|float
|
10 |
*/
|
11 |
private $v = 0;
|
5 |
abstract class Loco_data_Serializable extends ArrayObject {
|
6 |
|
7 |
/**
|
8 |
+
* Object/schema version (not plugin version) can be used for validation and migrations
|
9 |
* @var string|int|float
|
10 |
*/
|
11 |
private $v = 0;
|
src/data/Settings.php
CHANGED
@@ -17,6 +17,12 @@
|
|
17 |
* @property string $po_width PO/POT file maximum line width (wrapping) zero to disable
|
18 |
* @property bool $jed_pretty Whether to pretty print JSON JED files
|
19 |
* @property bool $ajax_files Whether to submit PO data as concrete files (requires Blob support in Ajax)
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
*/
|
21 |
class Loco_data_Settings extends Loco_data_Serializable {
|
22 |
|
@@ -25,7 +31,7 @@ class Loco_data_Settings extends Loco_data_Serializable {
|
|
25 |
* @var Loco_data_Settings
|
26 |
*/
|
27 |
private static $current;
|
28 |
-
|
29 |
|
30 |
/**
|
31 |
* Available options and their defaults
|
@@ -47,6 +53,10 @@ class Loco_data_Settings extends Loco_data_Serializable {
|
|
47 |
'po_width' => '79',
|
48 |
'jed_pretty' => false,
|
49 |
'ajax_files' => true,
|
|
|
|
|
|
|
|
|
50 |
);
|
51 |
|
52 |
|
@@ -164,39 +174,51 @@ class Loco_data_Settings extends Loco_data_Serializable {
|
|
164 |
public function migrate(){
|
165 |
$updated = false;
|
166 |
// Always update version number in settings after an upgrade
|
167 |
-
|
|
|
|
|
168 |
$this->persist();
|
169 |
$updated = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
}
|
171 |
return $updated;
|
172 |
}
|
173 |
|
174 |
|
175 |
/**
|
176 |
-
* Populate
|
177 |
* @param array posted setting values
|
|
|
178 |
* @return Loco_data_Settings
|
179 |
*/
|
180 |
-
public function populate( array $data ){
|
181 |
-
// set all keys present in
|
182 |
foreach( $data as $prop => $value ){
|
183 |
try {
|
184 |
-
|
|
|
|
|
185 |
}
|
186 |
catch( InvalidArgumentException $e ){
|
187 |
// skipping invalid key
|
188 |
}
|
189 |
}
|
190 |
-
// set missing boolean keys as false, because checkboxes
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
|
|
197 |
}
|
198 |
}
|
199 |
-
// enforce missing values that must have a default
|
200 |
foreach( array('php_alias','max_php_size','po_width') as $prop ){
|
201 |
if( isset($data[$prop]) && '' === $data[$prop] ){
|
202 |
parent::offsetSet( $prop, self::$defaults[$prop] );
|
@@ -205,8 +227,8 @@ class Loco_data_Settings extends Loco_data_Serializable {
|
|
205 |
|
206 |
return $this;
|
207 |
}
|
208 |
-
|
209 |
-
|
210 |
/**
|
211 |
* Map a file extension to registered types, defaults to "php"
|
212 |
* @param string
|
17 |
* @property string $po_width PO/POT file maximum line width (wrapping) zero to disable
|
18 |
* @property bool $jed_pretty Whether to pretty print JSON JED files
|
19 |
* @property bool $ajax_files Whether to submit PO data as concrete files (requires Blob support in Ajax)
|
20 |
+
*
|
21 |
+
* @property string $google_api_key API key for Google Translate
|
22 |
+
* @property string $yandex_api_key API key for Yandex.Translate
|
23 |
+
* @property string $microsoft_api_key API key for Microsoft Translator text API
|
24 |
+
* @property string $microsoft_api_region API region for Microsoft Translator text API
|
25 |
+
*
|
26 |
*/
|
27 |
class Loco_data_Settings extends Loco_data_Serializable {
|
28 |
|
31 |
* @var Loco_data_Settings
|
32 |
*/
|
33 |
private static $current;
|
34 |
+
|
35 |
|
36 |
/**
|
37 |
* Available options and their defaults
|
53 |
'po_width' => '79',
|
54 |
'jed_pretty' => false,
|
55 |
'ajax_files' => true,
|
56 |
+
'google_api_key' => '',
|
57 |
+
'yandex_api_key' => '',
|
58 |
+
'microsoft_api_key' => '',
|
59 |
+
'microsoft_api_region' => 'global',
|
60 |
);
|
61 |
|
62 |
|
174 |
public function migrate(){
|
175 |
$updated = false;
|
176 |
// Always update version number in settings after an upgrade
|
177 |
+
$old = $this->version;
|
178 |
+
$new = loco_plugin_version();
|
179 |
+
if( version_compare($old,$new,'<') ){
|
180 |
$this->persist();
|
181 |
$updated = true;
|
182 |
+
// feature alerts:
|
183 |
+
if( '2.4.' === substr($new,0,4) && '2.4.' !== substr($old,0,4) ){
|
184 |
+
Loco_error_AdminNotices::info( __('Loco Translate 2.4 supports third party translation providers. Set up your API keys in the plugin settings!','loco-translate') )
|
185 |
+
->addLink( Loco_mvc_AdminRouter::generate('config-apis'), __('Settings','loco-translate') )
|
186 |
+
->addLink( apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/providers'), __('Documentation','loco-translate') );
|
187 |
+
}
|
188 |
}
|
189 |
return $updated;
|
190 |
}
|
191 |
|
192 |
|
193 |
/**
|
194 |
+
* Populate ALL settings from raw postdata.
|
195 |
* @param array posted setting values
|
196 |
+
* @param array optional filter to restrict modifiable values
|
197 |
* @return Loco_data_Settings
|
198 |
*/
|
199 |
+
public function populate( array $data, $filter = null ){
|
200 |
+
// set all keys present in posted data
|
201 |
foreach( $data as $prop => $value ){
|
202 |
try {
|
203 |
+
if( is_null($filter) || in_array($prop,$filter,true) ) {
|
204 |
+
$this->offsetSet( $prop, $value );
|
205 |
+
}
|
206 |
}
|
207 |
catch( InvalidArgumentException $e ){
|
208 |
// skipping invalid key
|
209 |
}
|
210 |
}
|
211 |
+
// set missing boolean keys as false, because unchecked checkboxes won't post anything
|
212 |
+
$defaults = self::$defaults;
|
213 |
+
if( is_array($filter) ){
|
214 |
+
$defaults = array_intersect_key( array_flip($filter) ,$defaults);
|
215 |
+
}
|
216 |
+
foreach( array_diff_key($defaults,$data) as $prop => $default ){
|
217 |
+
if( is_bool($default) ){
|
218 |
+
parent::offsetSet( $prop, false );
|
219 |
}
|
220 |
}
|
221 |
+
// enforce missing values that must have a default, but were passed empty
|
222 |
foreach( array('php_alias','max_php_size','po_width') as $prop ){
|
223 |
if( isset($data[$prop]) && '' === $data[$prop] ){
|
224 |
parent::offsetSet( $prop, self::$defaults[$prop] );
|
227 |
|
228 |
return $this;
|
229 |
}
|
230 |
+
|
231 |
+
|
232 |
/**
|
233 |
* Map a file extension to registered types, defaults to "php"
|
234 |
* @param string
|
src/error/AdminNotices.php
CHANGED
@@ -142,7 +142,6 @@ class Loco_error_AdminNotices extends Loco_hooks_Hookable {
|
|
142 |
return $data;
|
143 |
}
|
144 |
|
145 |
-
|
146 |
|
147 |
/**
|
148 |
* @return void
|
@@ -150,7 +149,7 @@ class Loco_error_AdminNotices extends Loco_hooks_Hookable {
|
|
150 |
private function flush(){
|
151 |
if( $this->errors ){
|
152 |
$htmls = array();
|
153 |
-
/*
|
154 |
foreach( $this->errors as $error ){
|
155 |
$html = sprintf (
|
156 |
'<p><strong class="has-icon">%s:</strong> <span>%s</span></p>',
|
@@ -173,7 +172,6 @@ class Loco_error_AdminNotices extends Loco_hooks_Hookable {
|
|
173 |
}
|
174 |
|
175 |
|
176 |
-
|
177 |
/**
|
178 |
* admin_notices action handler.
|
179 |
*/
|
@@ -203,7 +201,6 @@ class Loco_error_AdminNotices extends Loco_hooks_Hookable {
|
|
203 |
}
|
204 |
|
205 |
|
206 |
-
|
207 |
/**
|
208 |
* @internal
|
209 |
* Make sure we always see notices if hooks didn't fire
|
142 |
return $data;
|
143 |
}
|
144 |
|
|
|
145 |
|
146 |
/**
|
147 |
* @return void
|
149 |
private function flush(){
|
150 |
if( $this->errors ){
|
151 |
$htmls = array();
|
152 |
+
/* @var Loco_error_Exception $error */
|
153 |
foreach( $this->errors as $error ){
|
154 |
$html = sprintf (
|
155 |
'<p><strong class="has-icon">%s:</strong> <span>%s</span></p>',
|
172 |
}
|
173 |
|
174 |
|
|
|
175 |
/**
|
176 |
* admin_notices action handler.
|
177 |
*/
|
201 |
}
|
202 |
|
203 |
|
|
|
204 |
/**
|
205 |
* @internal
|
206 |
* Make sure we always see notices if hooks didn't fire
|
src/hooks/AdminHooks.php
CHANGED
@@ -45,8 +45,7 @@ class Loco_hooks_AdminHooks extends Loco_hooks_Hookable {
|
|
45 |
if( isset($_GET['page']) && 'loco' === substr($_GET['page'],0,4) ){
|
46 |
Loco_package_Listener::create();
|
47 |
// trigger post-upgrade process if required
|
48 |
-
|
49 |
-
$opts->migrate();
|
50 |
}
|
51 |
}
|
52 |
}
|
45 |
if( isset($_GET['page']) && 'loco' === substr($_GET['page'],0,4) ){
|
46 |
Loco_package_Listener::create();
|
47 |
// trigger post-upgrade process if required
|
48 |
+
Loco_data_Settings::get()->migrate();
|
|
|
49 |
}
|
50 |
}
|
51 |
}
|
src/hooks/Hookable.php
CHANGED
@@ -20,8 +20,6 @@ abstract class Loco_hooks_Hookable {
|
|
20 |
|
21 |
$ref = new ReflectionClass( $this );
|
22 |
$reg = array();
|
23 |
-
|
24 |
-
/* @var $method ReflectionMethod */
|
25 |
foreach( $ref->getMethods( ReflectionMethod::IS_PUBLIC ) as $method ){
|
26 |
$func = $method->name;
|
27 |
// support filter_{filter_hook} methods
|
@@ -54,7 +52,6 @@ abstract class Loco_hooks_Hookable {
|
|
54 |
}
|
55 |
|
56 |
|
57 |
-
|
58 |
/**
|
59 |
* Deregister active hooks.
|
60 |
* We can't use __destruct because instances persist in WordPress hook registry
|
20 |
|
21 |
$ref = new ReflectionClass( $this );
|
22 |
$reg = array();
|
|
|
|
|
23 |
foreach( $ref->getMethods( ReflectionMethod::IS_PUBLIC ) as $method ){
|
24 |
$func = $method->name;
|
25 |
// support filter_{filter_hook} methods
|
52 |
}
|
53 |
|
54 |
|
|
|
55 |
/**
|
56 |
* Deregister active hooks.
|
57 |
* We can't use __destruct because instances persist in WordPress hook registry
|
src/js/Strings.php
CHANGED
@@ -20,23 +20,66 @@ class Loco_js_Strings extends Loco_hooks_TranslateBuffer {
|
|
20 |
// Message appears after sync operation
|
21 |
__("Merged from source code",'loco-translate');
|
22 |
|
23 |
-
|
|
|
24 |
_n("1 new string added","%s new strings added",0,'loco-translate');
|
25 |
|
26 |
-
|
|
|
27 |
_n("1 obsolete string removed","%s obsolete strings removed",0,'loco-translate');
|
28 |
|
29 |
-
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
* xgettext: javascript-format */
|
31 |
-
|
32 |
|
33 |
-
//
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
// Warning appears when user tries to refresh or navigate away when editor work is unsaved
|
37 |
__("Your changes will be lost if you continue without saving",'loco-translate');
|
38 |
|
39 |
-
|
|
|
40 |
_n("1 string","%s strings",0,'loco-translate');
|
41 |
|
42 |
/* Shows percentage translated at top of editor
|
@@ -102,7 +145,10 @@ class Loco_js_Strings extends Loco_hooks_TranslateBuffer {
|
|
102 |
_x("Translated","Editor",'loco-translate');
|
103 |
|
104 |
//
|
105 |
-
_x("Fuzzy","Editor",'loco-translate');
|
|
|
|
|
|
|
106 |
|
107 |
// Label for the source text window when no translation selected
|
108 |
_x("Source text not loaded","Editor",'loco-translate');
|
20 |
// Message appears after sync operation
|
21 |
__("Merged from source code",'loco-translate');
|
22 |
|
23 |
+
/* Summary of new strings after running in-editor Sync
|
24 |
+
* xgettext: javascript-format */
|
25 |
_n("1 new string added","%s new strings added",0,'loco-translate');
|
26 |
|
27 |
+
/* Summary of existing strings that no longer exist after running in-editor Sync
|
28 |
+
* xgettext: javascript-format */
|
29 |
_n("1 obsolete string removed","%s obsolete strings removed",0,'loco-translate');
|
30 |
|
31 |
+
/* Summary of existing translations where the source text has changed slightly
|
32 |
+
* xgettext: javascript-format */
|
33 |
+
_n("1 string marked Fuzzy","%s strings marked Fuzzy",0,'loco-translate');
|
34 |
+
|
35 |
+
/* Message appears after sync operation, where %s refers to a POT file.
|
36 |
+
* xgettext: javascript-format */
|
37 |
+
__("Strings up to date with %s",'loco-translate');
|
38 |
+
|
39 |
+
// Message appears after sync operation.
|
40 |
+
__("Strings up to date with source code",'loco-translate');
|
41 |
+
|
42 |
+
// xgettext: javascript-format
|
43 |
+
__("%s unique source strings.",'loco-translate');
|
44 |
+
|
45 |
+
/* characters meaning individual unicode characters of source text
|
46 |
+
* xgettext: javascript-format */
|
47 |
+
__("%s characters will be sent for translation.",'loco-translate');
|
48 |
+
|
49 |
+
/* %s%% is a percentage, e.g. 50%
|
50 |
+
* xgettext: javascript-format */
|
51 |
+
__("Translation progress %s%%",'loco-translate');
|
52 |
+
|
53 |
+
// xgettext: javascript-format
|
54 |
+
_n("Translation job aborted with one string remaining","Translation job aborted with %s strings remaining",0,'loco-translate');
|
55 |
+
|
56 |
+
/* e.g. via Google Translate
|
57 |
* xgettext: javascript-format */
|
58 |
+
_n("%s string translated via %s","%s strings translated via %s",0,'loco-translate');
|
59 |
|
60 |
+
// xgettext: javascript-format
|
61 |
+
_n("%s string updated","%s strings updated",0,'loco-translate');
|
62 |
+
|
63 |
+
//
|
64 |
+
__("Nothing needed updating",'loco-translate');
|
65 |
+
|
66 |
+
//
|
67 |
+
__("Use this translation",'loco-translate');
|
68 |
+
|
69 |
+
//
|
70 |
+
__("Suggested translations",'loco-translate');
|
71 |
+
|
72 |
+
//
|
73 |
+
__("Loading suggestions",'loco-translate');
|
74 |
+
|
75 |
+
//
|
76 |
+
__("Keep this translation",'loco-translate');
|
77 |
|
78 |
// Warning appears when user tries to refresh or navigate away when editor work is unsaved
|
79 |
__("Your changes will be lost if you continue without saving",'loco-translate');
|
80 |
|
81 |
+
/* Shows total string count at top of editor
|
82 |
+
* xgettext: javascript-format */
|
83 |
_n("1 string","%s strings",0,'loco-translate');
|
84 |
|
85 |
/* Shows percentage translated at top of editor
|
145 |
_x("Translated","Editor",'loco-translate');
|
146 |
|
147 |
//
|
148 |
+
_x("Toggle Fuzzy","Editor",'loco-translate');
|
149 |
+
|
150 |
+
//
|
151 |
+
_x("Suggest translation","Editor",'loco-translate');
|
152 |
|
153 |
// Label for the source text window when no translation selected
|
154 |
_x("Source text not loaded","Editor",'loco-translate');
|
src/mvc/AdminController.php
CHANGED
@@ -21,9 +21,15 @@ abstract class Loco_mvc_AdminController extends Loco_mvc_Controller {
|
|
21 |
*/
|
22 |
private $baseurl;
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
/**
|
25 |
* Pre-init call invoked by router
|
26 |
-
* @param
|
27 |
* @return Loco_mvc_AdminController
|
28 |
*/
|
29 |
final public function _init( array $args ){
|
@@ -74,7 +80,7 @@ abstract class Loco_mvc_AdminController extends Loco_mvc_Controller {
|
|
74 |
}
|
75 |
|
76 |
// core minimized admin.js loaded on all pages before any other Loco scripts
|
77 |
-
$this->enqueueScript('
|
78 |
|
79 |
$this->init();
|
80 |
return $this;
|
@@ -174,6 +180,8 @@ abstract class Loco_mvc_AdminController extends Loco_mvc_Controller {
|
|
174 |
|
175 |
/**
|
176 |
* Render template for echoing into admin screen
|
|
|
|
|
177 |
* @return string
|
178 |
*/
|
179 |
public function view( $tpl, array $args = array() ){
|
@@ -186,7 +194,7 @@ abstract class Loco_mvc_AdminController extends Loco_mvc_Controller {
|
|
186 |
}
|
187 |
// ensure JavaScript config always present
|
188 |
if( $view->has('js') ){
|
189 |
-
$jsConf = $view->js;
|
190 |
if( ! $jsConf instanceof Loco_mvc_ViewParams ){
|
191 |
throw new InvalidArgumentException('Bad "js" view parameter');
|
192 |
}
|
@@ -195,6 +203,11 @@ abstract class Loco_mvc_AdminController extends Loco_mvc_Controller {
|
|
195 |
$jsConf = new Loco_mvc_ViewParams;
|
196 |
$view->set( 'js', $jsConf );
|
197 |
}
|
|
|
|
|
|
|
|
|
|
|
198 |
// localize script if translations in memory
|
199 |
if( is_textdomain_loaded('loco-translate') ){
|
200 |
$strings = new Loco_js_Strings;
|
@@ -218,9 +231,9 @@ abstract class Loco_mvc_AdminController extends Loco_mvc_Controller {
|
|
218 |
}
|
219 |
|
220 |
|
221 |
-
|
222 |
/**
|
223 |
* Shortcut to render template without full page arguments as per view
|
|
|
224 |
* @return string
|
225 |
*/
|
226 |
public function viewSnippet( $tpl ){
|
@@ -228,42 +241,67 @@ abstract class Loco_mvc_AdminController extends Loco_mvc_Controller {
|
|
228 |
}
|
229 |
|
230 |
|
231 |
-
|
232 |
/**
|
233 |
* Add CSS to head
|
|
|
|
|
234 |
* @return Loco_mvc_Controller
|
235 |
*/
|
236 |
public function enqueueStyle( $name, array $deps = array() ){
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
wp_enqueue_style( 'loco-'.strtr($name,'/','-'), $href, $deps, $vers, 'all' );
|
241 |
-
return $this;
|
242 |
}
|
243 |
-
|
|
|
|
|
|
|
|
|
|
|
244 |
}
|
245 |
|
246 |
|
247 |
-
|
248 |
/**
|
249 |
* Add JavaScript to footer
|
|
|
|
|
250 |
* @return Loco_mvc_Controller
|
251 |
*/
|
252 |
public function enqueueScript( $name, array $deps = array() ){
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
$id = 'loco-js-'.strtr($name,'/','-');
|
257 |
-
// Currently allowing other plugins to break our scripts. Next version will not.
|
258 |
-
// Developers wishing to create unofficial add-ons should do so without removing our code.
|
259 |
-
if( wp_script_is($id,'enqueued') ){
|
260 |
-
Loco_error_AdminNotices::debug('Another plugin has attempted to modify scripts on this page. It may not work correctly.');
|
261 |
-
}
|
262 |
-
wp_enqueue_script( $id, $href, $deps, $vers, true );
|
263 |
-
return $this;
|
264 |
}
|
265 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
}
|
267 |
|
268 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
}
|
21 |
*/
|
22 |
private $baseurl;
|
23 |
|
24 |
+
/**
|
25 |
+
* @var string[]
|
26 |
+
*/
|
27 |
+
private $scripts = array();
|
28 |
+
|
29 |
+
|
30 |
/**
|
31 |
* Pre-init call invoked by router
|
32 |
+
* @param mixed[]
|
33 |
* @return Loco_mvc_AdminController
|
34 |
*/
|
35 |
final public function _init( array $args ){
|
80 |
}
|
81 |
|
82 |
// core minimized admin.js loaded on all pages before any other Loco scripts
|
83 |
+
$this->enqueueScript('admin', array('jquery-ui-dialog') );
|
84 |
|
85 |
$this->init();
|
86 |
return $this;
|
180 |
|
181 |
/**
|
182 |
* Render template for echoing into admin screen
|
183 |
+
* @param string template name
|
184 |
+
* @param array template arguments
|
185 |
* @return string
|
186 |
*/
|
187 |
public function view( $tpl, array $args = array() ){
|
194 |
}
|
195 |
// ensure JavaScript config always present
|
196 |
if( $view->has('js') ){
|
197 |
+
$jsConf = $view->get('js');
|
198 |
if( ! $jsConf instanceof Loco_mvc_ViewParams ){
|
199 |
throw new InvalidArgumentException('Bad "js" view parameter');
|
200 |
}
|
203 |
$jsConf = new Loco_mvc_ViewParams;
|
204 |
$view->set( 'js', $jsConf );
|
205 |
}
|
206 |
+
// deregister legacy scripts in case another plugin tried to hijack them
|
207 |
+
wp_deregister_script('loco-js-editor');
|
208 |
+
wp_deregister_script('loco-js-min-admin');
|
209 |
+
// TODO perhaps do some kind of in-script check validation check
|
210 |
+
// $jsConf->offsetSet('$v',loco_plugin_version() );
|
211 |
// localize script if translations in memory
|
212 |
if( is_textdomain_loaded('loco-translate') ){
|
213 |
$strings = new Loco_js_Strings;
|
231 |
}
|
232 |
|
233 |
|
|
|
234 |
/**
|
235 |
* Shortcut to render template without full page arguments as per view
|
236 |
+
* @param string
|
237 |
* @return string
|
238 |
*/
|
239 |
public function viewSnippet( $tpl ){
|
241 |
}
|
242 |
|
243 |
|
|
|
244 |
/**
|
245 |
* Add CSS to head
|
246 |
+
* @param string stem name of file, e.g "editor"
|
247 |
+
* @param string[] dependencies of this stylesheet
|
248 |
* @return Loco_mvc_Controller
|
249 |
*/
|
250 |
public function enqueueStyle( $name, array $deps = array() ){
|
251 |
+
$base = $this->baseurl;
|
252 |
+
if( ! $base ){
|
253 |
+
throw new Loco_error_Exception('Too early to enqueueStyle('.var_export($name,1).')');
|
|
|
|
|
254 |
}
|
255 |
+
$id = 'loco-translate-css-'.strtr($name,'/','-');
|
256 |
+
// css always minified. sass in build env only
|
257 |
+
$href = $base.'/pub/css/'.$name.'.css';
|
258 |
+
$vers = apply_filters( 'loco_static_version', loco_plugin_version(), $href );
|
259 |
+
wp_enqueue_style( $id, $href, $deps, $vers, 'all' );
|
260 |
+
return $this;
|
261 |
}
|
262 |
|
263 |
|
|
|
264 |
/**
|
265 |
* Add JavaScript to footer
|
266 |
+
* @param string stem name of file, e.g "editor"
|
267 |
+
* @param string[] dependencies of this script
|
268 |
* @return Loco_mvc_Controller
|
269 |
*/
|
270 |
public function enqueueScript( $name, array $deps = array() ){
|
271 |
+
$base = $this->baseurl;
|
272 |
+
if( ! $base ){
|
273 |
+
throw new Loco_error_Exception('Too early to enqueueScript('.var_export($name,1).')');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
274 |
}
|
275 |
+
// use minimized javascript file. hook into script_loader_src to point at development source
|
276 |
+
$href = $base.'/pub/js/min/'.$name.'.js';
|
277 |
+
$vers = apply_filters( 'loco_static_version', loco_plugin_version(), $href );
|
278 |
+
$id = 'loco-translate-js-'.strtr($name,'/','-');
|
279 |
+
wp_enqueue_script( $id, $href, $deps, $vers, true );
|
280 |
+
$this->scripts[$id] = $href;
|
281 |
+
return $this;
|
282 |
}
|
283 |
|
284 |
|
285 |
+
/**
|
286 |
+
* @internal
|
287 |
+
* @param string
|
288 |
+
* @param string
|
289 |
+
* @param string
|
290 |
+
* @return string
|
291 |
+
*/
|
292 |
+
public function filter_script_loader_tag( $tag, $handle, $src ){
|
293 |
+
if( array_key_exists($handle,$this->scripts) ) {
|
294 |
+
$base = $this->baseurl.'/pub/js/';
|
295 |
+
$snip = strlen($base);
|
296 |
+
if( substr($src,0,$snip) !== $base || false !== strpos($src,'..') ){
|
297 |
+
Loco_error_AdminNotices::warn('Another plugin attempted to modify scripts on this page. If you experience problems, please let us know.');
|
298 |
+
Loco_error_AdminNotices::debug( $src.' does not belong to this plugin. It could be a hack attempt' );
|
299 |
+
// this will lose any legitimate filters we've added ourselves. (likely only under local dev)
|
300 |
+
$tag = str_replace($src,$this->scripts[$handle],$tag);
|
301 |
+
}
|
302 |
+
}
|
303 |
+
return $tag;
|
304 |
+
}
|
305 |
+
|
306 |
+
|
307 |
}
|
src/mvc/AdminRouter.php
CHANGED
@@ -72,13 +72,6 @@ class Loco_mvc_AdminRouter extends Loco_hooks_Hookable {
|
|
72 |
add_submenu_page( 'loco', $title, __('Settings','loco-translate'), $cap, 'loco-config-user', $render );
|
73 |
}
|
74 |
}
|
75 |
-
|
76 |
-
// legacy link redirect from previous v1.x slug
|
77 |
-
if( isset($_GET['page']) && 'loco-translate' === $_GET['page'] ){
|
78 |
-
if( wp_redirect( self::generate('') ) ){
|
79 |
-
exit(0); // <- required to avoid page permissions being checked
|
80 |
-
}
|
81 |
-
}
|
82 |
}
|
83 |
|
84 |
|
@@ -183,6 +176,7 @@ class Loco_mvc_AdminRouter extends Loco_hooks_Hookable {
|
|
183 |
'debug' => 'Debug',
|
184 |
// site-wide plugin configurations
|
185 |
'config' => 'config_Settings',
|
|
|
186 |
'config-user' => 'config_Prefs',
|
187 |
'config-debug' => 'config_Debug',
|
188 |
'config-version' => 'config_Version',
|
72 |
add_submenu_page( 'loco', $title, __('Settings','loco-translate'), $cap, 'loco-config-user', $render );
|
73 |
}
|
74 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
}
|
76 |
|
77 |
|
176 |
'debug' => 'Debug',
|
177 |
// site-wide plugin configurations
|
178 |
'config' => 'config_Settings',
|
179 |
+
'config-apis' => 'config_Apis',
|
180 |
'config-user' => 'config_Prefs',
|
181 |
'config-debug' => 'config_Debug',
|
182 |
'config-version' => 'config_Version',
|
src/mvc/AjaxController.php
CHANGED
@@ -19,7 +19,8 @@ abstract class Loco_mvc_AjaxController extends Loco_mvc_Controller {
|
|
19 |
|
20 |
/**
|
21 |
* Pre-init call invoked by router
|
22 |
-
* @
|
|
|
23 |
*/
|
24 |
final public function _init( array $args ){
|
25 |
$this->auth();
|
19 |
|
20 |
/**
|
21 |
* Pre-init call invoked by router
|
22 |
+
* @param mixed[]
|
23 |
+
* @return void
|
24 |
*/
|
25 |
final public function _init( array $args ){
|
26 |
$this->auth();
|
src/mvc/AjaxRouter.php
CHANGED
@@ -54,13 +54,9 @@ class Loco_mvc_AjaxRouter extends Loco_hooks_Hookable {
|
|
54 |
// autoloader will throw error if controller class doesn't exist
|
55 |
$this->ctrl = new $class;
|
56 |
$this->ctrl->_init( $_REQUEST );
|
57 |
-
// hook name compatible with AdminRouter
|
58 |
do_action('loco_admin_init', $this->ctrl );
|
59 |
-
|
60 |
-
if( has_action('loco_controller_init') ){
|
61 |
-
Loco_error_AdminNotices::debug('`loco_controller_init` is deprecated, use `loco_admin_init`');
|
62 |
-
do_action('loco_controller_init', $this->ctrl );
|
63 |
-
}
|
64 |
}
|
65 |
catch( Loco_error_Exception $e ){
|
66 |
$this->ctrl = null;
|
@@ -70,6 +66,7 @@ class Loco_mvc_AjaxRouter extends Loco_hooks_Hookable {
|
|
70 |
|
71 |
|
72 |
/**
|
|
|
73 |
* @return string
|
74 |
*/
|
75 |
private static function routeToClass( $route ){
|
54 |
// autoloader will throw error if controller class doesn't exist
|
55 |
$this->ctrl = new $class;
|
56 |
$this->ctrl->_init( $_REQUEST );
|
57 |
+
// hook name compatible with AdminRouter, plus additional action for ajax hooks to set up
|
58 |
do_action('loco_admin_init', $this->ctrl );
|
59 |
+
do_action('loco_ajax_init', $this->ctrl );
|
|
|
|
|
|
|
|
|
60 |
}
|
61 |
catch( Loco_error_Exception $e ){
|
62 |
$this->ctrl = null;
|
66 |
|
67 |
|
68 |
/**
|
69 |
+
* @param string
|
70 |
* @return string
|
71 |
*/
|
72 |
private static function routeToClass( $route ){
|
src/mvc/Controller.php
CHANGED
@@ -12,12 +12,15 @@ abstract class Loco_mvc_Controller extends Loco_hooks_Hookable {
|
|
12 |
|
13 |
/**
|
14 |
* Get view parameter
|
|
|
15 |
* @return mixed
|
16 |
*/
|
17 |
abstract public function get( $prop );
|
18 |
|
19 |
/**
|
20 |
* Set view parameter
|
|
|
|
|
21 |
* @return Loco_mvc_Controller
|
22 |
*/
|
23 |
abstract public function set( $prop, $value );
|
12 |
|
13 |
/**
|
14 |
* Get view parameter
|
15 |
+
* @param string
|
16 |
* @return mixed
|
17 |
*/
|
18 |
abstract public function get( $prop );
|
19 |
|
20 |
/**
|
21 |
* Set view parameter
|
22 |
+
* @param string
|
23 |
+
* @param mixed
|
24 |
* @return Loco_mvc_Controller
|
25 |
*/
|
26 |
abstract public function set( $prop, $value );
|
src/mvc/View.php
CHANGED
@@ -134,7 +134,7 @@ class Loco_mvc_View implements IteratorAggregate {
|
|
134 |
|
135 |
|
136 |
/**
|
137 |
-
*
|
138 |
*/
|
139 |
public function getIterator(){
|
140 |
return $this->scope;
|
@@ -142,23 +142,38 @@ class Loco_mvc_View implements IteratorAggregate {
|
|
142 |
|
143 |
|
144 |
/**
|
|
|
|
|
145 |
* @return mixed
|
146 |
*/
|
147 |
public function __get( $prop ){
|
148 |
-
return
|
149 |
}
|
150 |
|
151 |
|
152 |
/**
|
|
|
153 |
* @return bool
|
154 |
*/
|
155 |
public function has( $prop ){
|
156 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
}
|
158 |
|
159 |
|
160 |
/**
|
161 |
* Set a view argument
|
|
|
|
|
162 |
* @return Loco_mvc_View
|
163 |
*/
|
164 |
public function set( $prop, $value ){
|
@@ -172,6 +187,7 @@ class Loco_mvc_View implements IteratorAggregate {
|
|
172 |
* Main entry to rendering complete template
|
173 |
* @param string template name excluding extension
|
174 |
* @param array extra arguments to set in view scope
|
|
|
175 |
* @return string
|
176 |
*/
|
177 |
public function render( $tpl, array $args = null, Loco_mvc_View $parent = null ){
|
@@ -246,6 +262,8 @@ class Loco_mvc_View implements IteratorAggregate {
|
|
246 |
|
247 |
/**
|
248 |
* Do actual runtime template include
|
|
|
|
|
249 |
*/
|
250 |
private function execTemplate( $template ){
|
251 |
$params = $this->scope;
|
@@ -256,11 +274,13 @@ class Loco_mvc_View implements IteratorAggregate {
|
|
256 |
|
257 |
/**
|
258 |
* Link generator
|
259 |
-
*
|
|
|
|
|
260 |
*/
|
261 |
-
public function route( $
|
262 |
-
return new Loco_mvc_ViewParams( array(
|
263 |
-
'href' => Loco_mvc_AdminRouter::generate( $
|
264 |
) );
|
265 |
}
|
266 |
|
134 |
|
135 |
|
136 |
/**
|
137 |
+
* {@inheritDoc}
|
138 |
*/
|
139 |
public function getIterator(){
|
140 |
return $this->scope;
|
142 |
|
143 |
|
144 |
/**
|
145 |
+
* @internal
|
146 |
+
* @param string
|
147 |
* @return mixed
|
148 |
*/
|
149 |
public function __get( $prop ){
|
150 |
+
return $this->has($prop) ? $this->get($prop) : null;
|
151 |
}
|
152 |
|
153 |
|
154 |
/**
|
155 |
+
* @param string
|
156 |
* @return bool
|
157 |
*/
|
158 |
public function has( $prop ){
|
159 |
+
return $this->scope->offsetExists($prop);
|
160 |
+
}
|
161 |
+
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Get property after checking with self::has
|
165 |
+
* @param string
|
166 |
+
* @return mixed
|
167 |
+
*/
|
168 |
+
public function get( $prop ){
|
169 |
+
return $this->scope[$prop];
|
170 |
}
|
171 |
|
172 |
|
173 |
/**
|
174 |
* Set a view argument
|
175 |
+
* @param string
|
176 |
+
* @param mixed
|
177 |
* @return Loco_mvc_View
|
178 |
*/
|
179 |
public function set( $prop, $value ){
|
187 |
* Main entry to rendering complete template
|
188 |
* @param string template name excluding extension
|
189 |
* @param array extra arguments to set in view scope
|
190 |
+
* @param Loco_mvc_View parent view rendering this view
|
191 |
* @return string
|
192 |
*/
|
193 |
public function render( $tpl, array $args = null, Loco_mvc_View $parent = null ){
|
262 |
|
263 |
/**
|
264 |
* Do actual runtime template include
|
265 |
+
* @param string
|
266 |
+
* @return void
|
267 |
*/
|
268 |
private function execTemplate( $template ){
|
269 |
$params = $this->scope;
|
274 |
|
275 |
/**
|
276 |
* Link generator
|
277 |
+
* @param string page route, e.g. "config"
|
278 |
+
* @param array optional page arguments
|
279 |
+
* @return Loco_mvc_ViewParams
|
280 |
*/
|
281 |
+
public function route( $route, array $args = array() ){
|
282 |
+
return new Loco_mvc_ViewParams( array (
|
283 |
+
'href' => Loco_mvc_AdminRouter::generate( $route, $args ),
|
284 |
) );
|
285 |
}
|
286 |
|
src/test/WordPressTestCase.php
CHANGED
@@ -163,7 +163,15 @@ abstract class Loco_test_WordPressTestCase extends WP_UnitTestCase {
|
|
163 |
$screen = get_current_screen();
|
164 |
$action = isset($_GET['action']) ? $_GET['action'] : null;
|
165 |
$router->initPage( $screen, $action );
|
166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
}
|
168 |
|
169 |
|
163 |
$screen = get_current_screen();
|
164 |
$action = isset($_GET['action']) ? $_GET['action'] : null;
|
165 |
$router->initPage( $screen, $action );
|
166 |
+
$html = get_echo( array($router,'renderPage') );
|
167 |
+
// ensure further hooks fired as WordPress continues to render admin footer
|
168 |
+
do_action('in_admin_footer');
|
169 |
+
do_action('admin_footer','');
|
170 |
+
get_echo( 'do_action', array('admin_print_footer_scripts') );
|
171 |
+
// Capture late errors flushed on destruct
|
172 |
+
// $data = Loco_error_AdminNotices::destroyAjax();
|
173 |
+
$html .= get_echo( array(Loco_error_AdminNotices::get(),'on_loco_admin_notices') );
|
174 |
+
return $html;
|
175 |
}
|
176 |
|
177 |
|
tpl/admin/config/apis.php
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* API keys/settings screen
|
4 |
+
*/
|
5 |
+
|
6 |
+
$this->extend('../layout');
|
7 |
+
/* @var Loco_mvc_ViewParams[] $apis */
|
8 |
+
/* @var Loco_mvc_ViewParams $nonce */
|
9 |
+
$help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/providers');
|
10 |
+
?>
|
11 |
+
|
12 |
+
<form action="" method="post" enctype="application/x-www-form-urlencoded">
|
13 |
+
<input type="hidden" name="<?php $nonce->e('name')?>" value="<?php $nonce->e('value')?>" />
|
14 |
+
<table class="form-table">
|
15 |
+
<tbody><?php
|
16 |
+
// GOOGLE
|
17 |
+
$api = $apis['google']?>
|
18 |
+
<tr>
|
19 |
+
<th scope="row"><?php $api->e('name')?></th>
|
20 |
+
<td>
|
21 |
+
<fieldset>
|
22 |
+
<legend class="screen-reader-text">
|
23 |
+
<span><?php esc_html_e(__('API key','loco-translate'))?></span>
|
24 |
+
</legend>
|
25 |
+
<p>
|
26 |
+
<label for="loco--google_api_key">
|
27 |
+
<?php esc_html_e(__('API key','loco-translate'))?>:
|
28 |
+
</label>
|
29 |
+
<input type="text" size="50" name="api[google][key]" id="loco--google_api_key" value="<?php $api->e('key')?>" spellcheck="false" />
|
30 |
+
</p>
|
31 |
+
<p>
|
32 |
+
<span class="description"><a href="https://cloud.google.com/translate/" target="_blank" tabindex="-1">https://cloud.google.com/translate</a></span>
|
33 |
+
</p>
|
34 |
+
</fieldset>
|
35 |
+
</td>
|
36 |
+
</tr><?php
|
37 |
+
// MICROSOFT
|
38 |
+
$api = $apis['microsoft']?>
|
39 |
+
<tr>
|
40 |
+
<th scope="row"><?php $api->e('name')?></th>
|
41 |
+
<td>
|
42 |
+
<fieldset>
|
43 |
+
<legend class="screen-reader-text">
|
44 |
+
<span><?php esc_html_e(__('API key','loco-translate'))?></span>
|
45 |
+
</legend>
|
46 |
+
<p>
|
47 |
+
<label for="loco--microsoft_api_key">
|
48 |
+
<?php esc_html_e(__('API key','loco-translate'))?>:
|
49 |
+
</label>
|
50 |
+
<input type="text" size="50" name="api[microsoft][key]" id="loco--microsoft_api_key" value="<?php $api->e('key')?>" spellcheck="false" />
|
51 |
+
</p>
|
52 |
+
<p>
|
53 |
+
<label for="loco--microsoft_api_region">
|
54 |
+
<?php esc_html_e(__('API region','loco-translate'))?>:
|
55 |
+
</label>
|
56 |
+
<input type="text" size="20" name="api[microsoft][region]" id="loco--microsoft_api_region" value="<?php $api->e('region')?>" spellcheck="false" placeholder="global" />
|
57 |
+
</p>
|
58 |
+
<p>
|
59 |
+
<span class="description"><a href="https://aka.ms/MicrosoftTranslator" target="_blank" tabindex="-1">https://aka.ms/MicrosoftTranslator</a></span>
|
60 |
+
</p>
|
61 |
+
</fieldset>
|
62 |
+
</td>
|
63 |
+
</tr><?php
|
64 |
+
// YANDEX
|
65 |
+
$api = $apis['yandex']?>
|
66 |
+
<tr>
|
67 |
+
<th scope="row"><?php $api->e('name')?></th>
|
68 |
+
<td>
|
69 |
+
<fieldset>
|
70 |
+
<legend class="screen-reader-text">
|
71 |
+
<span><?php esc_html_e(__('API key','loco-translate'))?></span>
|
72 |
+
</legend>
|
73 |
+
<p>
|
74 |
+
<label for="loco--yandex_api_key">
|
75 |
+
<?php esc_html_e(__('API key','loco-translate'))?>:
|
76 |
+
</label>
|
77 |
+
<input type="text" size="90" name="api[yandex][key]" id="loco--yandex_api_key" value="<?php $api->e('key')?>" spellcheck="false" />
|
78 |
+
</p>
|
79 |
+
<p>
|
80 |
+
<span class="description"><a href="https://tech.yandex.com/translate/" target="_blank" tabindex="-1">https://tech.yandex.com/translate/</a></span>
|
81 |
+
</p>
|
82 |
+
</fieldset>
|
83 |
+
</td>
|
84 |
+
</tr>
|
85 |
+
</tbody>
|
86 |
+
</table>
|
87 |
+
|
88 |
+
<div class="notice inline">
|
89 |
+
<p>
|
90 |
+
<strong class="has-icon"><?php esc_html_e('Important','loco-translate')?>:</strong>
|
91 |
+
<span>
|
92 |
+
<?php esc_html_e('Third party services are subject to their own terms of use and may incur costs from the provider','loco-translate')?>.
|
93 |
+
<a href="<?php self::e($help)?>#legal" target="_blank" tabindex="-1"><?php esc_html_e('See full disclaimer','loco-translate')?></a>.
|
94 |
+
</span>
|
95 |
+
</p>
|
96 |
+
</div>
|
97 |
+
|
98 |
+
<p class="submit">
|
99 |
+
<input type="submit" class="button-primary" value="<?php esc_html_e('Save settings','loco-translate')?>" />
|
100 |
+
<a class="button button-link" href="<?php self::e($help)?>" target="_blank"><?php esc_html_e('Documentation','loco-translate')?></a>
|
101 |
+
</p>
|
102 |
+
</form>
|
tpl/admin/config/debug.php
CHANGED
@@ -52,7 +52,21 @@ $this->extend('../layout');
|
|
52 |
<dd class="jsonly" id="loco-ajax-check"><span class="inline-spinner"> </span></dd>
|
53 |
</dl>
|
54 |
</div>
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
<div class="panel" id="loco-sizes">
|
57 |
<h3>
|
58 |
Limits
|
52 |
<dd class="jsonly" id="loco-ajax-check"><span class="inline-spinner"> </span></dd>
|
53 |
</dl>
|
54 |
</div>
|
55 |
+
|
56 |
+
<div class="panel" id="loco-apis">
|
57 |
+
<h3>
|
58 |
+
Translation APIs
|
59 |
+
<a href="#loco-apis" class="loco-anchor" aria-hidden="true"></a>
|
60 |
+
</h3>
|
61 |
+
<dl><?php
|
62 |
+
/* @var Loco_mvc_ViewParams[] $apis */
|
63 |
+
foreach( $apis as $api ):?>
|
64 |
+
<dt><?php $api->e('name')?>:</dt>
|
65 |
+
<dd class="jsonly" id="loco-api-<?php $api->e('id')?>"><span class="inline-spinner"> </span></dd><?php
|
66 |
+
endforeach?>
|
67 |
+
</dl>
|
68 |
+
</div>
|
69 |
+
|
70 |
<div class="panel" id="loco-sizes">
|
71 |
<h3>
|
72 |
Limits
|
tpl/admin/config/prefs.php
CHANGED
@@ -5,9 +5,11 @@
|
|
5 |
|
6 |
$this->extend('../layout');
|
7 |
/* @var Loco_data_Preferences $opts */
|
|
|
8 |
?>
|
9 |
|
10 |
<form action="" method="post" enctype="application/x-www-form-urlencoded">
|
|
|
11 |
<table class="form-table">
|
12 |
<tbody>
|
13 |
<tr>
|
@@ -27,6 +29,6 @@ $this->extend('../layout');
|
|
27 |
</table>
|
28 |
<p class="submit">
|
29 |
<input type="submit" class="button-primary" value="<?php esc_html_e('Save settings','loco-translate')?>" />
|
30 |
-
<
|
31 |
</p>
|
32 |
</form>
|
5 |
|
6 |
$this->extend('../layout');
|
7 |
/* @var Loco_data_Preferences $opts */
|
8 |
+
$help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/settings');
|
9 |
?>
|
10 |
|
11 |
<form action="" method="post" enctype="application/x-www-form-urlencoded">
|
12 |
+
<input type="hidden" name="<?php $nonce->e('name')?>" value="<?php $nonce->e('value')?>" />
|
13 |
<table class="form-table">
|
14 |
<tbody>
|
15 |
<tr>
|
29 |
</table>
|
30 |
<p class="submit">
|
31 |
<input type="submit" class="button-primary" value="<?php esc_html_e('Save settings','loco-translate')?>" />
|
32 |
+
<a class="button button-link" href="<?php self::e($help)?>#user" target="_blank"><?php esc_html_e('Documentation','loco-translate')?></a>
|
33 |
</p>
|
34 |
</form>
|
tpl/admin/config/settings.php
CHANGED
@@ -4,11 +4,14 @@
|
|
4 |
*/
|
5 |
|
6 |
$this->extend('../layout');
|
7 |
-
$
|
|
|
8 |
/* @var Loco_data_Settings $opts */
|
|
|
9 |
?>
|
10 |
|
11 |
<form action="" method="post" enctype="application/x-www-form-urlencoded">
|
|
|
12 |
<table class="form-table">
|
13 |
<tbody>
|
14 |
<tr>
|
@@ -141,7 +144,7 @@ $fs_help = esc_url( apply_filters('loco_external','https://localise.biz/wordpres
|
|
141 |
</p>
|
142 |
<p>
|
143 |
<span class="description">
|
144 |
-
<a href="<?php
|
145 |
esc_html_e('About file system access','loco-translate')?></a>
|
146 |
</span>
|
147 |
</p>
|
@@ -171,6 +174,6 @@ $fs_help = esc_url( apply_filters('loco_external','https://localise.biz/wordpres
|
|
171 |
</table>
|
172 |
<p class="submit">
|
173 |
<input type="submit" class="button-primary" value="<?php esc_html_e('Save settings','loco-translate')?>" />
|
174 |
-
<
|
175 |
</p>
|
176 |
</form>
|
4 |
*/
|
5 |
|
6 |
$this->extend('../layout');
|
7 |
+
$help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/settings');
|
8 |
+
$fs_help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/filesystem');
|
9 |
/* @var Loco_data_Settings $opts */
|
10 |
+
/* @var Loco_data_Settings $dflt */
|
11 |
?>
|
12 |
|
13 |
<form action="" method="post" enctype="application/x-www-form-urlencoded">
|
14 |
+
<input type="hidden" name="<?php $nonce->e('name')?>" value="<?php $nonce->e('value')?>" />
|
15 |
<table class="form-table">
|
16 |
<tbody>
|
17 |
<tr>
|
144 |
</p>
|
145 |
<p>
|
146 |
<span class="description">
|
147 |
+
<a href="<?php self::e($fs_help)?>" target="_blank"><?php
|
148 |
esc_html_e('About file system access','loco-translate')?></a>
|
149 |
</span>
|
150 |
</p>
|
174 |
</table>
|
175 |
<p class="submit">
|
176 |
<input type="submit" class="button-primary" value="<?php esc_html_e('Save settings','loco-translate')?>" />
|
177 |
+
<a class="button button-link" href="<?php self::e($help)?>" target="_blank"><?php esc_html_e('Documentation','loco-translate')?></a>
|
178 |
</p>
|
179 |
</form>
|
tpl/admin/file/diff.php
CHANGED
@@ -43,7 +43,7 @@ $dfmt = _x( 'j M @ H:i', 'revision date short format', 'default' );
|
|
43 |
</div>
|
44 |
</div>
|
45 |
|
46 |
-
|
47 |
<!--hr />
|
48 |
|
49 |
<h3>Advanced</h3>
|
@@ -62,7 +62,6 @@ $dfmt = _x( 'j M @ H:i', 'revision date short format', 'default' );
|
|
62 |
</tr>
|
63 |
</thead>
|
64 |
<tbody><?php
|
65 |
-
/* @var $file Loco_mvc_FileParams */
|
66 |
foreach( $files as $i => $file ):?>
|
67 |
<tr>
|
68 |
<td>
|
@@ -81,6 +80,6 @@ $dfmt = _x( 'j M @ H:i', 'revision date short format', 'default' );
|
|
81 |
<button type="submit" class="button button-danger"><?php esc_html_e('Restore selected','default')?></button>
|
82 |
</p>
|
83 |
<?php
|
84 |
-
/* @var $hidden Loco_mvc_HiddenFields */
|
85 |
$hidden->_e();?>
|
86 |
</form-->
|
|
43 |
</div>
|
44 |
</div>
|
45 |
|
46 |
+
<?php /*
|
47 |
<!--hr />
|
48 |
|
49 |
<h3>Advanced</h3>
|
62 |
</tr>
|
63 |
</thead>
|
64 |
<tbody><?php
|
|
|
65 |
foreach( $files as $i => $file ):?>
|
66 |
<tr>
|
67 |
<td>
|
80 |
<button type="submit" class="button button-danger"><?php esc_html_e('Restore selected','default')?></button>
|
81 |
</p>
|
82 |
<?php
|
|
|
83 |
$hidden->_e();?>
|
84 |
</form-->
|
85 |
+
*/
|
tpl/admin/file/edit-po.php
CHANGED
@@ -6,3 +6,64 @@ $this->extend('editor');
|
|
6 |
$this->start('header');
|
7 |
|
8 |
echo $this->render('../common/inc-po-header');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
tpl/admin/file/edit-pot.php
CHANGED
@@ -15,3 +15,8 @@ $this->start('header');
|
|
15 |
<span id="loco-po-status"></span>
|
16 |
</span>
|
17 |
</h3>
|
|
|
|
|
|
|
|
|
|
15 |
<span id="loco-po-status"></span>
|
16 |
</span>
|
17 |
</h3>
|
18 |
+
|
19 |
+
|
20 |
+
<div id="loco-auto" title="Error">
|
21 |
+
<p>Template files cannot be translated</p>
|
22 |
+
</div>
|
tpl/admin/file/editor.php
CHANGED
@@ -2,9 +2,14 @@
|
|
2 |
/**
|
3 |
* Editor layout for PO and POT files
|
4 |
*/
|
5 |
-
$this->extend('../layout');
|
6 |
|
|
|
7 |
echo $header;
|
|
|
|
|
|
|
|
|
|
|
8 |
?>
|
9 |
|
10 |
<div id="loco-editor">
|
@@ -15,17 +20,17 @@ echo $header;
|
|
15 |
<button class="button has-icon icon-save" data-loco="save" disabled>
|
16 |
<span><?php $ui->e('save')?></span>
|
17 |
</button>
|
18 |
-
<button class="button has-icon icon-sync" data-loco="sync" disabled>
|
19 |
-
<span><?php $ui->e('sync')?></span>
|
20 |
-
</button>
|
21 |
<button class="button has-icon icon-revert" data-loco="revert" disabled>
|
22 |
<span><?php $ui->e('revert')?></span>
|
23 |
</button>
|
|
|
|
|
|
|
24 |
</fieldset><?php
|
25 |
if( $locale ):?>
|
26 |
<fieldset>
|
27 |
-
<button class="button has-icon icon-
|
28 |
-
<span><?php $ui->e('
|
29 |
</button>
|
30 |
</fieldset><?php
|
31 |
else:?>
|
@@ -60,7 +65,6 @@ echo $header;
|
|
60 |
</button>
|
61 |
</fieldset>
|
62 |
<?php
|
63 |
-
/* @var $dlFields Loco_mvc_HiddenFields */
|
64 |
$dlFields->_e();?>
|
65 |
</form>
|
66 |
</nav>
|
@@ -69,4 +73,4 @@ echo $header;
|
|
69 |
<div class="loco-loading"></div>
|
70 |
</div>
|
71 |
|
72 |
-
</div>
|
2 |
/**
|
3 |
* Editor layout for PO and POT files
|
4 |
*/
|
|
|
5 |
|
6 |
+
$this->extend('../layout');
|
7 |
echo $header;
|
8 |
+
|
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">
|
20 |
<button class="button has-icon icon-save" data-loco="save" disabled>
|
21 |
<span><?php $ui->e('save')?></span>
|
22 |
</button>
|
|
|
|
|
|
|
23 |
<button class="button has-icon icon-revert" data-loco="revert" disabled>
|
24 |
<span><?php $ui->e('revert')?></span>
|
25 |
</button>
|
26 |
+
<button class="button has-icon icon-sync" data-loco="sync" disabled>
|
27 |
+
<span><?php $ui->e('sync')?></span>
|
28 |
+
</button>
|
29 |
</fieldset><?php
|
30 |
if( $locale ):?>
|
31 |
<fieldset>
|
32 |
+
<button class="button has-icon icon-robot" data-loco="auto" disabled>
|
33 |
+
<span><?php $ui->e('auto')?></span>
|
34 |
</button>
|
35 |
</fieldset><?php
|
36 |
else:?>
|
65 |
</button>
|
66 |
</fieldset>
|
67 |
<?php
|
|
|
68 |
$dlFields->_e();?>
|
69 |
</form>
|
70 |
</nav>
|
73 |
<div class="loco-loading"></div>
|
74 |
</div>
|
75 |
|
76 |
+
</div>
|
tpl/admin/file/info-po.php
CHANGED
@@ -4,6 +4,8 @@
|
|
4 |
*/
|
5 |
$this->extend('info');
|
6 |
$this->start('header');
|
|
|
|
|
7 |
?>
|
8 |
|
9 |
<div class="notice inline notice-info">
|
@@ -18,7 +20,7 @@ $this->start('header');
|
|
18 |
<dd><?php $file->e('size')?></dd>
|
19 |
|
20 |
<dt><?php self::e( __('File modified','loco-translate') )?>:</dt>
|
21 |
-
<dd><?php $file->date('mtime')?></dd>
|
22 |
|
23 |
<dt><?php self::e( __('Last translation','loco-translate') )?>:</dt>
|
24 |
<dd><?php $params->e('author')?> — <date><?php $params->date('potime')?></date></dd>
|
4 |
*/
|
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">
|
20 |
<dd><?php $file->e('size')?></dd>
|
21 |
|
22 |
<dt><?php self::e( __('File modified','loco-translate') )?>:</dt>
|
23 |
+
<dd><time><?php $file->date('mtime')?></time></dd>
|
24 |
|
25 |
<dt><?php self::e( __('Last translation','loco-translate') )?>:</dt>
|
26 |
<dd><?php $params->e('author')?> — <date><?php $params->date('potime')?></date></dd>
|
tpl/admin/file/info-pot.php
CHANGED
@@ -4,6 +4,8 @@
|
|
4 |
*/
|
5 |
$this->extend('info');
|
6 |
$this->start('header');
|
|
|
|
|
7 |
?>
|
8 |
|
9 |
<div class="notice inline notice-info">
|
@@ -13,12 +15,12 @@ $this->start('header');
|
|
13 |
<dd><?php $file->e('size')?></dd>
|
14 |
|
15 |
<dt><?php esc_html_e('File modified','loco-translate')?>:</dt>
|
16 |
-
<dd><?php $file->date('mtime')?></dd>
|
17 |
|
18 |
<dt><?php esc_html_e('Last extracted','loco-translate')?>:</dt>
|
19 |
-
<dd><
|
20 |
|
21 |
-
<dt><?php
|
22 |
<dd><?php echo esc_html( $meta->getTotalSummary() )?> <span>(<?php echo sprintf( _n('1 word','%s words', $words, 'loco-translate'), number_format_i18n($words) )?>)</span></dd>
|
23 |
</dl>
|
24 |
</div>
|
4 |
*/
|
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">
|
15 |
<dd><?php $file->e('size')?></dd>
|
16 |
|
17 |
<dt><?php esc_html_e('File modified','loco-translate')?>:</dt>
|
18 |
+
<dd><time><?php $file->date('mtime')?></time></dd>
|
19 |
|
20 |
<dt><?php esc_html_e('Last extracted','loco-translate')?>:</dt>
|
21 |
+
<dd><time><?php $params->date('potime')?></time></dd>
|
22 |
|
23 |
+
<dt><?php echo esc_html_x('Source text','Editor','loco-translate')?>:</dt>
|
24 |
<dd><?php echo esc_html( $meta->getTotalSummary() )?> <span>(<?php echo sprintf( _n('1 word','%s words', $words, 'loco-translate'), number_format_i18n($words) )?>)</span></dd>
|
25 |
</dl>
|
26 |
</div>
|
tpl/admin/file/move.php
CHANGED
@@ -23,7 +23,7 @@ $this->extend('../layout');
|
|
23 |
<p class="submit">
|
24 |
<button type="submit" class="button button-primary" disabled><?php esc_html_e('Move files','loco-translate')?></button><?php
|
25 |
if( $params->has('advanced') ):?>
|
26 |
-
<a href="<?php $params->e('advanced')?>" class="button button-link"
|
27 |
endif?>
|
28 |
</p>
|
29 |
</div>
|
23 |
<p class="submit">
|
24 |
<button type="submit" class="button button-primary" disabled><?php esc_html_e('Move files','loco-translate')?></button><?php
|
25 |
if( $params->has('advanced') ):?>
|
26 |
+
<a href="<?php $params->e('advanced')?>" class="button button-link"><?php esc_html_e('Advanced','loco-translate')?></a><?php
|
27 |
endif?>
|
28 |
</p>
|
29 |
</div>
|
tpl/admin/file/msgcat.php
CHANGED
@@ -18,7 +18,7 @@
|
|
18 |
if( '' !== $symbol ){
|
19 |
$line = substr($line,2);
|
20 |
if( ':' === $symbol ){
|
21 |
-
echo '<span class="po-refs">#:',preg_replace('/\\S+:\d+/', '<a href="
|
22 |
}
|
23 |
// parse out flags and formatting directives
|
24 |
else if( ',' === $symbol ){
|
18 |
if( '' !== $symbol ){
|
19 |
$line = substr($line,2);
|
20 |
if( ':' === $symbol ){
|
21 |
+
echo '<span class="po-refs">#:',preg_replace('/\\S+:\d+/', '<a href="#\\0" class="po-text">\\0</a>', $params->escape($line) ),'</span>';
|
22 |
}
|
23 |
// parse out flags and formatting directives
|
24 |
else if( ',' === $symbol ){
|
tpl/admin/help/tab-config-apis.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<h2>
|
2 |
+
<?php esc_html_e('API keys','loco-translate')?>
|
3 |
+
</h2>
|
4 |
+
<p>
|
5 |
+
Loco Translate supports integration with several third party machine translation services.
|
6 |
+
Each of these requires an account with the service provider and an API key for enabling access via the Loco Translate editor.
|
7 |
+
</p>
|
8 |
+
<p>
|
9 |
+
<a href="<?php echo esc_url(apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/providers'))?>" target="_blank"><?php esc_html_e('Full documentation','loco-translate')?></a>
|
10 |
+
</p>
|
tpl/admin/help/{tab-settings.php → tab-config.php}
RENAMED
File without changes
|