-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1239 lines (1173 loc) · 64 KB
/
index.html
File metadata and controls
1239 lines (1173 loc) · 64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html style="background:#0e0e10">
<head>
<meta charset="UTF-8">
<title>LB</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<!-- ═══ LOADING SCREEN (outside #app to avoid padding offset) ═══ -->
<div id="loading-screen" class="loading-screen">
<div class="loading-bg-glow"></div>
<div class="loading-content">
<div class="loading-logo-wrap">
<span class="loading-logo-l">L</span><span class="loading-logo-b">B</span>
</div>
<div class="loading-line"></div>
<div class="loading-subtitle">Localization Editor</div>
<div class="loading-progress-track">
<div class="loading-progress-bar"></div>
</div>
<div class="loading-label">ЗАВАНТАЖЕННЯ</div>
</div>
</div>
<div id="app">
<!-- ═══ WELCOME SCREEN ═══ -->
<div id="welcome-screen" class="welcome-screen">
<div class="welcome-inner">
<div class="welcome-header">
<h1 class="welcome-title">LB</h1>
<p class="welcome-subtitle">Localization Editor</p>
</div>
<div class="welcome-open-row">
<button class="welcome-card" id="welcome-open-other">
<span class="welcome-card-icon">📁</span>
<span class="welcome-card-label">Відкрити теку</span>
<span class="welcome-card-hint">.txt файли</span>
</button>
<button class="welcome-card" id="welcome-open-json">
<span class="welcome-card-icon">📄</span>
<span class="welcome-card-label">Відкрити JSON</span>
<span class="welcome-card-hint">Авт. визначення</span>
</button>
</div>
<div class="welcome-drop-zone">
<div class="welcome-drop-icon">⇩</div>
<div class="welcome-drop-text">Перетягніть файл або теку сюди</div>
<div class="welcome-drop-hint">.txt .json .csv .xlsx .xls .ods</div>
</div>
<div class="welcome-recent-section">
<h2 class="welcome-section-title">Останні файли</h2>
<div class="welcome-recent-list" id="welcome-recent-list">
<div class="welcome-empty">Немає останніх файлів</div>
</div>
</div>
</div>
</div>
<div id="split-container" class="hidden">
<!-- ═══ LEFT PANEL ═══ -->
<div id="left-panel">
<div class="search-box">
<span class="search-icon">⌕</span>
<input type="text" id="search-input" placeholder="Фільтр записів...">
<span id="search-match-nav" class="search-match-nav hidden">
<span class="search-match-label">0 / 0</span>
<button class="search-match-btn" id="search-match-prev" title="Попередній (Shift+Enter)">▲</button>
<button class="search-match-btn" id="search-match-next" title="Наступний (Enter)">▼</button>
</span>
<button class="search-clear" id="search-clear">×</button>
</div>
<div id="status-filter-row" class="status-filter-row">
<button class="sf-btn active" data-sf="all">Всі</button>
<button class="sf-btn" data-sf="untranslated">Не перекл.</button>
<button class="sf-btn" data-sf="translated">Перекл.</button>
<button class="sf-btn" data-sf="edited">Зредаг.</button>
</div>
<div id="entry-list-row">
<div id="entry-list-container" tabindex="-1">
<div id="entry-list"></div>
</div>
<canvas id="minimap" title="Мінімапа"></canvas>
</div>
<div id="count-label">Записів: 0</div>
<div class="progress-compact">
<div class="progress-section" id="progress-section-trans" title="">
<div class="progress-bar-track">
<div class="progress-bar-fill" id="progress-bar"></div>
<div class="progress-milestone" style="left:25%"></div>
<div class="progress-milestone" style="left:50%"></div>
<div class="progress-milestone" style="left:75%"></div>
</div>
<div class="progress-labels">
<span id="prog-label-entries">—</span>
<span class="progress-pct" id="progress-pct">0%</span>
<span id="prog-label-lines">—</span>
<button class="schema-btn" id="schema-btn" title="Схема підрахунку"></button>
</div>
</div>
<div class="progress-section progress-section-edit" id="progress-section-edit" title="">
<div class="progress-bar-track">
<div class="progress-bar-fill progress-edit-fill" id="progress-edit-bar"></div>
<div class="progress-milestone progress-milestone-edit" style="left:25%"></div>
<div class="progress-milestone progress-milestone-edit" style="left:50%"></div>
<div class="progress-milestone progress-milestone-edit" style="left:75%"></div>
</div>
<div class="progress-labels">
<span id="prog-edit-files">—</span>
<span class="progress-edit-pct" id="progress-edit-pct">0%</span>
<span id="prog-edit-lines">—</span>
</div>
</div>
</div>
</div>
<!-- ═══ SPLIT HANDLE ═══ -->
<div id="split-handle"></div>
<!-- ═══ RIGHT PANEL ═══ -->
<div id="right-panel">
<div class="meta-line">
<span class="meta-file" id="meta-file">—</span>
<span class="meta-sep">·</span>
<span id="meta-text-n">text: —</span>
<span class="meta-sep">·</span>
<span id="meta-sp-n">sp: —</span>
<span class="meta-sep meta-chars-sep">·</span>
<span id="meta-words" class="meta-chars"></span>
<span class="meta-sep meta-chars-sep">·</span>
<span id="meta-chars" class="meta-chars" title="Символи: усього / без розмітки"></span>
<span id="meta-dirty"></span>
<span class="meta-shortcut-hint" id="meta-hint"></span>
</div>
<div class="editor-toolbar" id="editor-toolbar">
<button class="tb-btn tb-icon-save" id="tb-save" title="Зберегти (Ctrl+S)"></button>
<button class="tb-btn tb-icon-save-as" id="tb-save-as" title="Зберегти як... (Ctrl+Shift+S)"></button>
<span class="tb-sep"></span>
<button class="tb-btn tb-icon-find" id="tb-find" title="Знайти (Ctrl+F)"></button>
<button class="tb-btn tb-icon-replace" id="tb-replace" title="Замінити (Ctrl+H)"></button>
<span class="tb-sep"></span>
<button class="tb-btn tb-icon-wrap" id="tb-wrap" title="Автоперенос тексту (Ctrl+Shift+W)"></button>
<span class="tb-sep"></span>
<button class="tb-btn tb-icon-migrate" id="tb-migrate" title="Перенесення"></button>
<span class="tb-sep"></span>
<button class="tb-btn tb-icon-show-all" id="tb-show-all" title="Показати всі символи"></button>
<span class="tb-sep"></span>
<button class="tb-btn tb-icon-undo" id="tb-undo" title="Скасувати (Ctrl+Z)"></button>
<button class="tb-btn tb-icon-redo" id="tb-redo" title="Повторити (Ctrl+Y)"></button>
<span class="tb-sep"></span>
<button class="tb-btn tb-icon-side-panel" id="tb-side-panel" title="Відкрити збоку"></button>
<button class="tb-btn" id="tb-original" title="Оригінал збоку" style="font-size:10px;padding:0 4px;">A|Б</button>
<button class="tb-btn" id="tb-table-view" title="Табличний вигляд" style="font-size:10px;padding:0 4px;">☷</button>
<button class="tb-btn" id="tb-schema-view" title="Режим схеми" style="font-size:10px;padding:0 4px;display:none;">{T}</button>
</div>
<div id="tab-bar"></div>
<div id="editor-area">
<!-- Dock zones (shown during find-dialog drag) -->
<div id="dock-zone-overlay" class="dock-zone-overlay hidden">
<div class="dock-zone dock-zone-bottom" data-dock="bottom"></div>
<div class="dock-zone dock-zone-right" data-dock="right"></div>
<div class="dock-zone dock-zone-left" data-dock="left"></div>
</div>
<div id="editor-main">
<div class="side-panel-header hidden" id="editor-main-header">
<span class="side-panel-title" id="editor-main-title"></span>
</div>
<!-- Spreadsheet grid view for xlsx/csv -->
<div id="spreadsheet-container" style="display:none;">
<div class="ss-toolbar" id="ss-toolbar">
<div class="ss-toolbar-left">
<span class="ss-toolbar-info" id="ss-toolbar-info"></span>
</div>
<div class="ss-toolbar-right">
<span class="ss-toolbar-badge" id="ss-encoding-badge">UTF-8</span>
<span class="ss-toolbar-badge" id="ss-delim-badge">COMMA</span>
<label class="ss-header-toggle">
<input type="checkbox" id="ss-header-check" />
<span>Header</span>
</label>
</div>
</div>
<div class="ss-scroll">
<table class="ss-table" id="ss-table">
<thead id="ss-thead"></thead>
<tbody id="ss-tbody"></tbody>
</table>
</div>
<div id="ss-sheet-tabs-bar" class="ss-sheet-tabs-bar" style="display:none;"></div>
<div class="ss-statusbar" id="ss-statusbar">
<span id="ss-status-selection">Selection: —</span>
<span id="ss-status-rows"></span>
</div>
</div>
<div id="flat-editor-container">
<div id="flat-monaco" class="monaco-container"></div>
</div>
<div id="split-editor-container" style="display:none;">
<label class="editor-label">Text</label>
<div id="text-monaco" class="monaco-container" style="flex:3;"></div>
<label class="editor-label">Speakers</label>
<div id="sp-monaco" class="monaco-container" style="flex:1;"></div>
</div>
<!-- Table view for parse keys -->
<div id="table-view-container" style="display:none;">
<div class="table-view-toolbar">
<span class="table-view-info" id="table-view-info"></span>
<button class="btn-sm btn-secondary" id="table-view-back">↩ Редактор</button>
</div>
<div class="table-view-split">
<div class="table-view-scroll">
<table class="table-view" id="table-view">
<thead>
<tr>
<th style="width:40px">#</th>
<th style="width:100px">Ключ</th>
<th style="width:35%">Оригінал</th>
<th style="width:35%">Переклад</th>
<th style="width:55px">Рядок</th>
</tr>
</thead>
<tbody id="table-view-body"></tbody>
</table>
</div>
<div class="table-view-editor" id="table-view-editor">
<div class="tve-header">
<span class="tve-label" id="tve-label">Оберіть рядок</span>
<button class="btn-sm btn-secondary" id="tve-copy">⧉ Копіювати</button>
</div>
<div class="tve-original" id="tve-original"></div>
<label class="tve-tr-label">Переклад:</label>
<textarea class="tve-translation" id="tve-translation" placeholder="Введіть переклад..."></textarea>
</div>
</div>
</div>
</div>
<!-- Sheet tabs for multi-sheet spreadsheets -->
<div id="sheet-tabs-bar" class="sheet-tabs-bar" style="display:none;"></div>
<div id="side-panel-handle" class="hidden"></div>
<div id="side-panel" class="hidden">
<div class="side-panel-header">
<span class="side-panel-title" id="side-panel-title"></span>
<button class="side-panel-close" id="side-panel-close" title="Закрити">×</button>
</div>
<div id="side-panel-monaco" class="monaco-container"></div>
</div>
</div>
</div>
</div>
<!-- Status Bar -->
<div id="status-bar" class="hidden">
<span id="status-text">Готово. Ctrl+O відкрити · F1 клавіші</span>
<span id="status-cursor" class="status-cursor"></span>
<span id="status-encoding" class="status-encoding"></span>
<span id="status-hint">F1 — клавіші</span>
</div>
</div>
<!-- ═══════════════════════════════════════════════════════
MODALS
═══════════════════════════════════════════════════════ -->
<!-- Ask / Confirm -->
<div id="modal-overlay" class="modal-overlay hidden">
<div id="ask-modal" class="modal hidden">
<div class="modal-header">
<h3 id="ask-title">Підтвердження</h3>
<button class="modal-close" data-modal-close>×</button>
</div>
<div class="modal-body">
<div class="ask-text" id="ask-text"></div>
</div>
<div class="modal-footer ask-buttons" id="ask-buttons"></div>
</div>
</div>
<!-- Settings -->
<div id="settings-overlay" class="modal-overlay hidden">
<div id="settings-modal" class="modal hidden">
<div class="modal-header">
<h3>Налаштування</h3>
<button class="modal-close" id="settings-close">×</button>
</div>
<div class="modal-body">
<div class="tab-bar">
<button class="tab-btn active" data-tab="look">Вигляд</button>
<button class="tab-btn" data-tab="editor">Редактор</button>
<button class="tab-btn" data-tab="save">Збереження</button>
<button class="tab-btn" data-tab="parsekeys">Ключі</button>
<button class="tab-btn" data-tab="formats">Формати</button>
<button class="tab-btn" data-tab="plugins">Плагіни</button>
<button class="tab-btn" data-tab="themes">Теми</button>
</div>
<!-- Tab: Вигляд -->
<div class="tab-content active" data-tab="look">
<select id="set-theme" class="hidden">
<option value="dark">Темна</option>
<option value="light">Світла</option>
<option value="blue-night">Синя ніч</option>
<option value="green-forest">Зелений ліс</option>
<option value="warm-amber">Тепла амбра</option>
<option value="rose">Рожева</option>
<option value="github-dark">GitHub Dark</option>
<option value="notepadpp">Notepad++</option>
<option value="dracula">Dracula</option>
<option value="alucard">Alucard</option>
<option value="nier">NieR: Automata</option>
<option value="nier-replicant">NieR Replicant</option>
</select>
<div class="form-row">
<label>Шрифт:</label>
<select id="set-font">
<option>Consolas</option>
<option>Cascadia Code</option>
<option>Cascadia Mono</option>
<option>Courier New</option>
<option>JetBrains Mono</option>
<option>Fira Code</option>
<option>Source Code Pro</option>
<option>Lucida Console</option>
<option>DejaVu Sans Mono</option>
<option>Ubuntu Mono</option>
<option>Noto Sans Mono</option>
</select>
</div>
<div class="form-row">
<label>Розмір шрифту:</label>
<input type="number" id="set-font-size" min="8" max="32" value="11">
<span style="color:var(--text-muted)">пт</span>
</div>
<div class="form-row">
<label>Перенос рядків:</label>
<label><input type="checkbox" id="set-wrap"> Увімкнено</label>
</div>
<div class="form-row">
<label>Візуальні ефекти:</label>
<select id="set-visual-fx">
<option value="full">Повні</option>
<option value="reduced">Зменшені</option>
<option value="minimal">Мінімальні</option>
</select>
</div>
<div class="form-row">
<label>Розкладка:</label>
<select id="set-layout">
<option value="list-left">Список ліворуч</option>
<option value="list-right">Список праворуч</option>
<option value="list-top">Список зверху</option>
<option value="editor-only">Тільки редактор</option>
</select>
</div>
<div class="form-row">
<label>Закладки:</label>
<label><input type="checkbox" id="set-show-bookmarks" checked> Відображати</label>
</div>
</div>
<!-- Tab: Редактор -->
<div class="tab-content" data-tab="editor">
<div class="form-row">
<label>Розділювач:</label>
<label><input type="checkbox" id="set-sep-default" checked> Між text / speakers</label>
</div>
<div class="form-row">
<label>Режим:</label>
<label><input type="checkbox" id="set-split-default"> Роздільний (Ctrl+T)</label>
</div>
<div class="form-row">
<label>Підтвердження:</label>
<label><input type="checkbox" id="set-confirm" checked> При переході</label>
</div>
<div class="form-row">
<label>Орфографія:</label>
<label><input type="checkbox" id="set-spellcheck"> Перевіряти (UA)</label>
</div>
<div class="form-row">
<label>Розширення (теки):</label>
<input type="text" id="set-other-ext" placeholder=".txt .json .csv" style="width:180px" title="Розширення файлів для режиму «Інші» (через пробіл)">
</div>
<div class="form-row">
<label>Одиниця прогресу:</label>
<select id="set-progress-unit" style="width:180px">
<option value="lines">Рядки</option>
<option value="words">Слова</option>
</select>
</div>
<div class="form-row" style="align-items:flex-start">
<label>Кодові слова:</label>
<textarea id="set-code-words" rows="3" style="width:180px;resize:vertical;font-size:11px" placeholder="Одне слово/фраза на рядок" title="Рядки що збігаються з кодовими словами рахуються як перекладені"></textarea>
</div>
</div>
<!-- Tab: Ключі парсингу -->
<div class="tab-content" data-tab="parsekeys">
<p style="color:var(--fg-dim);font-size:11px;margin:0 0 10px;">
Regex-ключі для парсингу файлів у таблицю. Група тексту — номер capture group з перекладним текстом.
</p>
<div id="parse-keys-list"></div>
<button class="btn-secondary btn-sm" id="parse-keys-add" style="margin-top:8px;">+ Додати ключ</button>
</div>
<!-- Tab: Формати -->
<div class="tab-content" data-tab="formats">
<p style="color:var(--fg-dim);font-size:11px;margin:0 0 10px;">
Налаштування форматів CSV / Excel. Роздільник за замовчуванням використовується при відкритті нових файлів.
</p>
<div class="form-row">
<label>Роздільник за замовчуванням:</label>
<select id="set-csv-delim-default" style="width:160px">
<option value="auto">Авто-визначення</option>
<option value=",">, (кома)</option>
<option value=";">; (крапка з комою)</option>
<option value="	">Tab (табуляція)</option>
<option value="|">| (вертикальна риска)</option>
</select>
</div>
<div class="form-row">
<label>Заголовки:</label>
<select id="set-csv-headers-default" style="width:160px">
<option value="auto">Авто-визначення</option>
<option value="yes">Завжди є</option>
<option value="no">Немає</option>
</select>
</div>
<div style="margin-top:14px;border-top:1px solid var(--border);padding-top:10px;">
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;">
<label style="font-size:12px;font-weight:600;">Роздільник для окремих файлів</label>
</div>
<p style="color:var(--fg-dim);font-size:11px;margin:0 0 8px;">
Оберіть файли зі списку та задайте їм інший роздільник. Це перевизначає роздільник за замовчуванням.
</p>
<div id="csv-format-overrides" style="max-height:180px;overflow-y:auto;"></div>
<div style="display:flex;gap:6px;margin-top:8px;">
<button class="btn-secondary btn-sm" id="csv-format-add">+ Задати для файлу</button>
<button class="btn-secondary btn-sm" id="csv-format-clear" style="color:var(--text-muted);">Очистити все</button>
</div>
</div>
</div>
<!-- Tab: Збереження -->
<div class="tab-content" data-tab="save">
<div class="form-row">
<label>Автозбереження:</label>
<label><input type="checkbox" id="set-autosave"> Увімкнено</label>
</div>
<div class="form-row">
<label>Інтервал (сек):</label>
<input type="number" id="set-interval" min="10" value="30">
</div>
<div class="form-row">
<label>Періодичний бекап:</label>
<label><input type="checkbox" id="set-periodic-backup"> Увімкнено</label>
</div>
<div class="form-row">
<label>Інтервал (сек):</label>
<input type="number" id="set-periodic-interval" min="60" value="300">
</div>
<div class="power-schedule">
<div class="power-schedule-header">
<label>Графік світла:</label>
<div class="power-brush-bar">
<button class="power-brush active" data-brush="on" title="Є світло">⚡</button>
<button class="power-brush" data-brush="off" title="Немає світла"><span class="power-icon-off">💡</span></button>
<button class="power-brush" data-brush="maybe" title="Можливе відключення">?</button>
</div>
</div>
<div class="power-days" id="power-days">
<button class="power-day" data-day="0">Пн</button>
<button class="power-day" data-day="1">Вт</button>
<button class="power-day" data-day="2">Ср</button>
<button class="power-day" data-day="3">Чт</button>
<button class="power-day" data-day="4">Пт</button>
<button class="power-day" data-day="5">Сб</button>
<button class="power-day" data-day="6">Нд</button>
</div>
<div class="power-grid" id="power-grid"></div>
<div class="power-legend">
<span class="pl-item"><span class="pl-dot pl-current"></span> поточний час</span>
<span class="pl-item"><span class="pl-dot pl-on"></span> є світло</span>
<span class="pl-item"><span class="pl-dot pl-off"></span> немає світла</span>
<span class="pl-item"><span class="pl-dot pl-maybe"></span> можливе відключення</span>
</div>
</div>
</div>
<!-- Tab: Плагіни -->
<div class="tab-content" data-tab="plugins">
<div class="plugin-card">
<div class="plugin-header">
<div class="plugin-info">
<span class="plugin-name">Словник</span>
<span class="plugin-desc">Підсвітка термінів, підказки та автозаміна зі словника</span>
</div>
<label class="plugin-toggle">
<input type="checkbox" id="set-plugin-glossary" checked>
<span class="plugin-toggle-label">Увімкнено</span>
</label>
</div>
</div>
</div>
<!-- Tab: Теми -->
<div class="tab-content" data-tab="themes">
<div id="theme-editor-list">
<div style="margin-bottom:10px">
<button class="btn-primary" id="theme-create-btn">+ Створити тему</button>
</div>
<div id="theme-presets-list"></div>
</div>
<div id="theme-editor-panel" class="hidden">
<div class="theme-editor-header">
<button class="theme-editor-back" id="theme-editor-back">←</button>
<input type="text" id="theme-editor-name" placeholder="Назва теми..." maxlength="40">
<select id="theme-editor-base">
<option value="dark">Темна</option>
<option value="light">Світла</option>
<option value="blue-night">Синя ніч</option>
<option value="green-forest">Зелений ліс</option>
<option value="warm-amber">Тепла амбра</option>
<option value="rose">Рожева</option>
<option value="github-dark">GitHub Dark</option>
<option value="notepadpp">Notepad++</option>
<option value="dracula">Dracula</option>
<option value="alucard">Alucard</option>
<option value="nier">NieR: Automata</option>
<option value="nier-replicant">NieR Replicant</option>
</select>
</div>
<div class="theme-editor-groups" id="theme-editor-groups"></div>
<div class="theme-editor-actions">
<button class="btn-primary" id="theme-editor-save">Зберегти тему</button>
<button id="theme-editor-delete" class="hidden">Видалити</button>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn-primary" id="settings-save">Зберегти</button>
<button id="settings-cancel">Скасувати</button>
</div>
</div>
</div>
<!-- Glossary -->
<div id="glossary-overlay" class="modal-overlay hidden">
<div id="glossary-modal" class="modal hidden">
<div class="modal-header" id="glossary-titlebar">
<h3>Словник</h3>
<div style="display:flex;gap:4px;align-items:center;">
<button class="modal-dock-btn hidden" id="glossary-undock" title="Від'єднати">↗</button>
<button class="modal-dock-btn" id="glossary-dock" title="Вбудувати збоку">⬜</button>
<button class="modal-close" id="glossary-close">×</button>
</div>
</div>
<div class="modal-body">
<div style="display:flex;gap:8px;align-items:center;margin-bottom:10px;">
<select id="gloss-dict-select" style="flex:1;padding:4px 8px;background:var(--input-bg);color:var(--text);border:1px solid var(--border);border-radius:4px;">
<option value="global">Глобальний словник</option>
</select>
<button id="gloss-import" style="padding:4px 10px;font-size:12px;white-space:nowrap;" title="Імпортувати з іншого словника">Імпорт...</button>
<button id="gloss-export" style="padding:4px 10px;font-size:12px;white-space:nowrap;" title="Експортувати словник у JSON">Експорт...</button>
</div>
<div class="search-box" style="margin-bottom:10px;">
<span class="search-icon">⌕</span>
<input type="text" id="gloss-search" placeholder="Пошук у словнику...">
</div>
<div id="gloss-table-container">
<table id="gloss-table">
<thead style="display:none;">
<tr><th></th><th></th></tr>
</thead>
<tbody id="gloss-tbody"></tbody>
</table>
</div>
<div class="gloss-btn-row">
<button id="gloss-add">+ Додати</button>
<button id="gloss-delete">Видалити</button>
<span id="gloss-count">0</span>
</div>
</div>
<div class="modal-footer">
<button class="btn-primary" id="glossary-save">Зберегти</button>
<button id="glossary-cancel">Скасувати</button>
</div>
</div>
</div>
<!-- Diff -->
<div id="diff-overlay" class="modal-overlay hidden">
<div id="diff-modal" class="modal hidden">
<div class="modal-header">
<h3 id="diff-title">Diff</h3>
<button class="modal-close" id="diff-close">×</button>
</div>
<div class="modal-body">
<div id="diff-content"></div>
</div>
<div class="modal-footer">
<button id="diff-close-btn">Закрити</button>
</div>
</div>
</div>
<!-- Compare (side-by-side) -->
<div id="compare-overlay" class="modal-overlay hidden">
<div id="compare-modal" class="modal hidden">
<div class="modal-header">
<h3 id="compare-title">Порівняння</h3>
<div class="compare-nav">
<button id="compare-prev" title="Попередня зміна">↑</button>
<span id="compare-pos">0/0</span>
<button id="compare-next" title="Наступна зміна">↓</button>
</div>
<button class="modal-close" id="compare-close">×</button>
</div>
<div class="modal-body" style="padding:0;">
<div id="compare-panels">
<div class="compare-panel" id="compare-left">
<div class="compare-panel-header" id="compare-left-title"></div>
<div class="compare-panel-content" id="compare-left-content"></div>
</div>
<div class="compare-panel" id="compare-right">
<div class="compare-panel-header" id="compare-right-title"></div>
<div class="compare-panel-content" id="compare-right-content"></div>
</div>
</div>
<div id="compare-log">
<div class="compare-log-header" id="compare-log-toggle">Лог змін ▾</div>
<div id="compare-log-content"></div>
</div>
</div>
</div>
</div>
<!-- Migrate (Translation Transfer) -->
<div id="migrate-overlay" class="modal-overlay hidden">
<div id="migrate-modal" class="modal hidden">
<div class="modal-header">
<h3>Перенесення</h3>
<button class="modal-close" id="migrate-close">×</button>
</div>
<div class="modal-body">
<div class="migrate-slots">
<div class="migrate-slot" id="migrate-slot-old" data-key="old">
<div class="migrate-slot-icon">📄</div>
<div class="migrate-slot-hint">Перетягніть або клікніть</div>
<div class="migrate-slot-file" id="migrate-old-file"></div>
<div class="migrate-slot-label">Старий текст</div>
</div>
<div class="migrate-slot" id="migrate-slot-new" data-key="new">
<div class="migrate-slot-icon">📄</div>
<div class="migrate-slot-hint">Перетягніть або клікніть</div>
<div class="migrate-slot-file" id="migrate-new-file"></div>
<div class="migrate-slot-label">Новий текст</div>
</div>
<div class="migrate-slot" id="migrate-slot-ua" data-key="ua">
<div class="migrate-slot-icon">📄</div>
<div class="migrate-slot-hint">Перетягніть або клікніть</div>
<div class="migrate-slot-file" id="migrate-ua-file"></div>
<div class="migrate-slot-label">Український текст</div>
</div>
</div>
<div class="migrate-actions">
<button class="btn-primary" id="migrate-run" disabled>Перенести</button>
</div>
<div id="migrate-results" class="hidden">
<div id="migrate-stats"></div>
<div id="migrate-preview"></div>
</div>
</div>
<div class="modal-footer">
<button class="btn-primary hidden" id="migrate-save">Зберегти результат</button>
<button id="migrate-close-btn">Закрити</button>
</div>
</div>
</div>
<!-- Info -->
<div id="info-overlay" class="modal-overlay hidden">
<div id="info-modal" class="modal hidden">
<div class="modal-header">
<h3 id="info-title">Інформація</h3>
<button class="modal-close" id="info-close">×</button>
</div>
<div class="modal-body">
<div class="info-text" id="info-text"></div>
</div>
<div class="modal-footer">
<button id="info-close-btn">OK</button>
</div>
</div>
</div>
<!-- Find Dialog (floating, Notepad++ style) -->
<div id="find-dialog" class="find-dialog hidden">
<div class="find-dialog-titlebar" id="find-dialog-titlebar">
<span class="find-dialog-title" id="find-dialog-title">Пошук</span>
<button class="find-dialog-undock hidden" id="find-dialog-undock" title="Від'єднати (зробити плаваючим)">↗</button>
<button class="find-dialog-close" id="find-dialog-close">×</button>
</div>
<div class="find-dialog-tabs">
<button class="find-tab-btn active" data-find-tab="find" id="find-tab-find">Знайти</button>
<button class="find-tab-btn" data-find-tab="replace" id="find-tab-replace">Замінити</button>
<button class="find-tab-btn" data-find-tab="goto" id="find-tab-goto">Рядок</button>
</div>
<!-- Tab: Знайти -->
<div class="find-tab-content active" data-find-tab="find">
<div class="find-field-row">
<label>Що знайти:</label>
<div class="find-input-wrapper">
<input type="text" id="find-input" placeholder="Текст для пошуку...">
<button class="find-history-btn" data-history="find" tabindex="-1" title="Історія пошуку">▾</button>
</div>
</div>
<div class="find-options">
<label><input type="checkbox" id="find-match-case"> Враховувати регістр</label>
<label><input type="checkbox" id="find-whole-words"> Лише цілі слова</label>
<label><input type="checkbox" id="find-wrap-around" checked> Циклічний пошук</label>
</div>
<div class="find-mode">
<label><input type="radio" name="find-mode" value="normal" checked> Звичайний</label>
<label><input type="radio" name="find-mode" value="regex"> Регулярний вираз</label>
</div>
<div class="find-regex-hint hidden" id="find-regex-hint">
<code>.</code> будь-який <code>\d</code> цифра <code>\w</code> слово <code>.*</code> будь-що <code>()</code> група <code>$1</code> підстановка
</div>
<div class="find-buttons">
<button class="btn-primary" id="find-next-btn">Знайти далі</button>
<button id="find-prev-btn">Знайти попередній</button>
<button id="find-count-btn">Підрахунок</button>
<button id="find-all-btn">Знайти все в документі</button>
</div>
<div class="find-result" id="find-result"></div>
</div>
<!-- Tab: Замінити -->
<div class="find-tab-content" data-find-tab="replace">
<div class="find-field-row">
<label>Що знайти:</label>
<div class="find-input-wrapper">
<input type="text" id="find-replace-input" placeholder="Текст для пошуку...">
<button class="find-history-btn" data-history="find" tabindex="-1" title="Історія пошуку">▾</button>
</div>
</div>
<div class="find-field-row">
<label>Замінити на:</label>
<div class="find-input-wrapper">
<input type="text" id="find-replace-with" placeholder="Замінити на...">
<button class="find-history-btn" data-history="replace" tabindex="-1" title="Історія замін">▾</button>
</div>
</div>
<div class="find-options">
<label><input type="checkbox" id="find-replace-match-case"> Враховувати регістр</label>
<label><input type="checkbox" id="find-replace-whole-words"> Лише цілі слова</label>
<label><input type="checkbox" id="find-replace-wrap-around" checked> Циклічний пошук</label>
</div>
<div class="find-mode">
<label><input type="radio" name="find-replace-mode" value="normal" checked> Звичайний</label>
<label><input type="radio" name="find-replace-mode" value="regex"> Регулярний вираз</label>
</div>
<div class="find-regex-hint hidden" id="find-replace-regex-hint">
<code>.</code> будь-який <code>\d</code> цифра <code>\w</code> слово <code>.*</code> будь-що <code>()</code> група <code>$1</code> підстановка
</div>
<div class="find-replace-scope">
<label><input type="radio" name="find-replace-scope" value="current" checked> Поточний запис</label>
<label><input type="radio" name="find-replace-scope" value="all"> Усі записи</label>
</div>
<div class="find-options">
<label><input type="checkbox" id="find-replace-names-only"> Лише імена (словник)</label>
</div>
<div class="find-buttons">
<button class="btn-primary" id="find-replace-next-btn">Знайти далі</button>
<button id="find-replace-one-btn">Замінити</button>
<button id="find-replace-all-btn">Замінити все</button>
</div>
<div class="find-result" id="find-replace-result"></div>
</div>
<!-- Tab: Рядок -->
<div class="find-tab-content" data-find-tab="goto">
<div class="find-field-row">
<label>Номер рядка:</label>
<input type="number" id="goto-line-input" min="1" placeholder="Наприклад, 2466">
</div>
<div class="goto-line-info" id="goto-line-info"></div>
<div class="find-buttons">
<button class="btn-primary" id="goto-line-btn">Перейти</button>
</div>
</div>
<!-- Results panel (Find All) -->
<div id="find-results-panel" class="find-results-panel hidden">
<div class="find-results-header">
<span id="find-results-title">Результати</span>
<button class="find-results-close" id="find-results-close">×</button>
</div>
<div class="find-results-list" id="find-results-list"></div>
</div>
</div>
<!-- Frequent Words Analysis -->
<div id="freq-overlay" class="modal-overlay hidden">
<div id="freq-modal" class="modal hidden">
<div class="modal-header">
<h3>Часті слова</h3>
<button class="modal-close" id="freq-close">×</button>
</div>
<div class="modal-body">
<div class="freq-options">
<label>Мін. повторів: <input type="number" id="freq-min" min="2" value="3" style="width:60px;"></label>
<label><input type="checkbox" id="freq-case"> Враховувати регістр</label>
<label><input type="checkbox" id="freq-whole-line"> Враховувати рядок</label>
<button id="freq-scan-btn" class="btn-primary">Сканувати</button>
</div>
<div id="freq-result-container" style="max-height:400px; overflow-y:auto; margin-top:10px;">
<div id="freq-result" style="font-size:12px; color:var(--text-secondary);"></div>
</div>
</div>
<div class="modal-footer">
<button id="freq-close-btn">Закрити</button>
</div>
</div>
</div>
<!-- Extended Stats -->
<div id="stats-overlay" class="modal-overlay hidden">
<div id="stats-modal" class="modal hidden" style="max-width:480px;">
<div class="modal-header">
<h3>Статистика перекладу</h3>
<button class="modal-close" id="stats-close">×</button>
</div>
<div class="modal-body">
<div class="stats-grid" id="stats-grid">
<div class="stats-section">
<div class="stats-section-title">Загальна</div>
<div class="stats-row"><span>Записів (файлів):</span><span id="st-total-entries" class="stats-val">—</span></div>
<div class="stats-row"><span>Рядків (непустих):</span><span id="st-total-lines" class="stats-val">—</span></div>
<div class="stats-row"><span>Слів:</span><span id="st-total-words" class="stats-val">—</span></div>
<div class="stats-row"><span>Символів:</span><span id="st-total-chars" class="stats-val">—</span></div>
<div class="stats-row" style="opacity:0.6"><span>Нейтральних (числа, теги):</span><span id="st-neutral-lines" class="stats-val">—</span></div>
</div>
<div class="stats-section stats-ua">
<div class="stats-section-title">🇺🇦 Українська</div>
<div class="stats-row"><span>Рядків:</span><span id="st-ua-lines" class="stats-val">—</span></div>
<div class="stats-row"><span>Слів:</span><span id="st-ua-words" class="stats-val">—</span></div>
<div class="stats-row"><span>Символів:</span><span id="st-ua-chars" class="stats-val">—</span></div>
<div class="stats-row stats-pct-row"><span>Готовність:</span><span id="st-ua-pct" class="stats-val stats-pct">—</span></div>
</div>
<div class="stats-section stats-en">
<div class="stats-section-title">🇬🇧 Англійська / Інше</div>
<div class="stats-row"><span>Рядків:</span><span id="st-en-lines" class="stats-val">—</span></div>
<div class="stats-row"><span>Слів:</span><span id="st-en-words" class="stats-val">—</span></div>
<div class="stats-row"><span>Символів:</span><span id="st-en-chars" class="stats-val">—</span></div>
<div class="stats-row stats-pct-row"><span>Залишилось:</span><span id="st-en-pct" class="stats-val stats-pct-en">—</span></div>
</div>
<div class="stats-section stats-edit">
<div class="stats-section-title">✎ Редагування</div>
<div class="stats-row"><span>Файлів зредаговано:</span><span id="st-edit-files" class="stats-val">—</span></div>
<div class="stats-row"><span>Рядків зредаговано:</span><span id="st-edit-lines" class="stats-val">—</span></div>
<div class="stats-row stats-pct-row"><span>Готовність:</span><span id="st-edit-pct" class="stats-val stats-pct-edit">—</span></div>
</div>
</div>
</div>
<div class="modal-footer">
<button id="stats-close-btn">Закрити</button>
</div>
</div>
</div>
<!-- Schema Selector -->
<div id="schema-overlay" class="modal-overlay hidden">
<div id="schema-modal" class="modal hidden" style="max-width:520px;">
<div class="modal-header">
<h3>Схема підрахунку</h3>
<button class="modal-close" id="schema-close">×</button>
</div>
<div class="modal-body">
<div class="schema-info" id="schema-info"></div>
<div class="schema-parse-row">
<label class="schema-parse-label">Тип даних:</label>
<select id="schema-parse-type" class="schema-parse-select">
<option value="auto">Авто</option>
<option value="json">JSON</option>
<option value="xml">XML</option>
<option value="keyvalue">Key=Value</option>
<option value="csv">CSV</option>
</select>
<button id="schema-reparse-btn" class="schema-reparse-btn" title="Перечитати з обраним типом">↻</button>
</div>
<div class="schema-custom-section" id="schema-custom-section">
<div class="schema-custom-header">
<span class="schema-custom-title">Власні схеми (regex):</span>
<button id="schema-custom-add" class="btn-sm" title="Додати regex-схему">+</button>
</div>
<div id="schema-custom-list"></div>
<div id="schema-custom-editor" class="schema-custom-editor hidden">
<div class="schema-custom-row">
<label>Назва:</label>
<input type="text" id="schema-custom-name" placeholder="Напр. Key=Value" maxlength="40">
</div>
<div class="schema-custom-row">
<label>Regex:</label>
<input type="text" id="schema-custom-regex" placeholder="^[^=]+=(.*)$" style="font-family:monospace">
</div>
<div class="schema-custom-row">
<label>Capture group:</label>
<input type="number" id="schema-custom-group" value="1" min="0" max="9" style="width:60px">
</div>
<div id="schema-custom-preview" class="schema-custom-preview hidden"></div>
<div class="schema-custom-actions">
<button class="btn-primary btn-sm" id="schema-custom-save-btn">Зберегти схему</button>
<button class="btn-sm" id="schema-custom-cancel-btn">Скасувати</button>
</div>
</div>
<div id="schema-custom-apply-row" class="schema-custom-apply hidden">
<label>Застосувати до файлу:</label>
<select id="schema-custom-select">
<option value="">— не обрано —</option>
</select>
<button class="btn-sm btn-primary" id="schema-custom-apply-btn">Застосувати</button>
</div>
</div>
<div class="schema-hint">Оберіть поля, які містять текст для перекладу:</div>
<input type="text" id="schema-search" class="schema-search" placeholder="Пошук ключа...">
<div class="schema-tree" id="schema-tree"></div>
</div>
<div class="modal-footer" style="gap:8px;">
<button id="schema-save-btn" class="btn-primary">Зберегти</button>
<button id="schema-reset-btn">Скинути</button>
<button id="schema-close-btn">Закрити</button>
</div>
</div>
</div>
<!-- Translator Reference -->
<div id="ref-overlay" class="modal-overlay hidden">
<div id="ref-modal" class="modal hidden" style="max-width:620px;">
<div class="modal-header">
<h3>Довідка перекладача</h3>
<button class="modal-close" id="ref-close">×</button>
</div>
<div class="modal-body" style="max-height:70vh; overflow-y:auto; font-size:13px; line-height:1.6;">
<h4 style="margin:0 0 6px;">Підказки</h4>
<ul style="margin:0 0 12px; padding-left:20px;">
<li>Назви існуючих коктейлів — транслітерацією у лапках «»</li>
<li>Назви закладів (ресторани, бари тощо) — транслітерація у лапках «»</li>
<li>Використовуємо українські лапки-ялинки «» замість англійських</li>
</ul>
<h4 style="margin:0 0 6px;">Графічні скорочення</h4>
<ul style="margin:0 0 12px; padding-left:20px;">
<li>Після скорочення ставимо крапку. Скорочуємо після приголосного. Не скорочуємо на голосний (крім початкового) і на ь.</li>
<li>Збіг однакових приголосних — скорочуємо після першого: настін. календар, ден. норма</li>
<li>Збіг різних приголосних — можна після першого або останнього: власноруч. або власноручн., але тільки власт.</li>
</ul>
<h4 style="margin:0 0 6px;">Поширені скорочення</h4>
<div style="columns:2; column-gap:16px; margin-bottom:12px;">
<div>авт. — автор; арк. — аркуш; бібл. — бібліотечний</div>
<div>буд. — будинок; бульв. — бульвар; вид. — видання</div>
<div>вип. — випуск; вул. — вулиця; гр. — громадянин</div>
<div>д. — доктор; див. — дивись; дол. — долар</div>
<div>доц. — доцент; журн. — журнал; зб. — збірник</div>
<div>ім. — імені; ін. — інші; кв. — квартира</div>
<div>м. — місто; напр. — наприклад; нац. — національний</div>
<div>н. е. — нашої ери; обл. — область; пл. — площа</div>
<div>проф. — професор; р. — рік; ред. — редактор</div>
<div>с. — село/сторінка; св. — святий; ст. — станція/стаття</div>
<div>т. — том; тис. — тисяча; укр. — український</div>
<div>і т. д. — і так далі; і т. ін. — і таке інше</div>
<div>т. зв. — так званий; у т. ч. — у тому числі</div>
</div>
<h4 style="margin:0 0 6px;">Одиниці вимірювання (без крапок)</h4>
<div style="margin-bottom:12px;">
г, кг, т, м, см, мм, км, дм, га, л, Вт, кВт, Б, кБ, грн, млн, млрд, трлн, смт
</div>
<h4 style="margin:0 0 6px;">Дефіс і скісна риска</h4>