/
japanize_data.php
1227 lines (1180 loc) · 53.9 KB
/
japanize_data.php
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
<?php
// +---------------------------------------------------------------------------+
// | Japanize Plugin for Geeklog - The Ultimate Weblog |
// +---------------------------------------------------------------------------+
// | geeklog/plugins/japanize/japanize_data.php |
// +---------------------------------------------------------------------------+
// | Copyright (C) 2009-2022 by the following authors: |
// | |
// | Authors: Tsuchi - tsuchi AT geeklog DOT jp |
// | mystral-kk - geeklog AT mystral-kk DOT net |
// +---------------------------------------------------------------------------+
// | This program is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU General Public License |
// | as published by the Free Software Foundation; either version 2 |
// | of the License, or (at your option) any later version. |
// | |
// | This program is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with this program; if not, write to the Free Software Foundation, |
// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
// | |
// +---------------------------------------------------------------------------+
if (stripos($_SERVER['PHP_SELF'], basename(__FILE__)) !== false) {
die('This file cannot be used on its own.');
}
global $_PLUGINS, $_TABLES, $_DB_dbms;
$isPgsql = ($_DB_dbms === 'pgsql');
// Prepares locale data
$locale = array();
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$locale['ja'] = array(
'locale' => (version_compare(VERSION, '2.1.2', '>=') ? 'ja_JP' : 'C'),
'date' => '%Y年%m月%d日 %H:%M',
'daytime' => '%m月%d日 %H:%M',
'shortdate' => '%d日',
'dateonly' => '%m月%d日',
'timeonly' => '%H:%M',
);
} else {
$locale['ja'] = array(
'locale' => ((strtoupper(substr(PHP_OS, 0, 7)) === 'FREEBSD')
? 'ja_JP'
: 'ja_JP.UTF-8'
),
'date' => '%Y年%B%e日(%a) %H:%M %Z',
'daytime' => '%m/%d %H:%M %Z',
'shortdate' => '%Y年%B%e日',
'dateonly' => '%B%e日',
'timeonly' => '%H:%M %Z',
);
}
$locale['en'] = array(
'locale' => 'en_GB',
'date' => '%A, %B %d %Y @ %I:%M %p %Z',
'daytime' => '%m/%d %I:%M%p',
'shortdate' => '%x',
'dateonly' => '%d-%b',
'timeonly' => '%I:%M %p %Z',
);
$htmlfilter = array();
$htmlfilter['ja'] = array(
'user' => array(
'a' => array('href' => 1, 'title' => 1, 'rel' => 1),
'b' => array(),
'blockquote' => array(),
'br' => array('clear' => 1),
'code' => array(),
'div' => array('class' => 1),
'em' => array(),
'font' => array('color' => 1),
'h' => array(),
'hr' => array(),
'i' => array(),
'li' => array(),
'ol' => array(),
'p' => array('lang' => 1),
'pre' => array(),
'strong' => array(),
'tt' => array(),
'ul' => array(),
),
'admin' => array(
'a' => array(
'href' => 1, 'title' => 1, 'id' => 1, 'lang' => 1,
'name' => 1, 'type' => 1, 'rel' => 1,
),
'br' => array('clear' => 1, 'style' => 1,),
'caption' => array('style' => 1,),
'div' => array('class' => 1, 'id' => 1, 'style' => 1,),
'embed' => array(
'src' => 1, 'loop' => 1, 'quality' => 1, 'width' => 1,
'height' => 1, 'type' => 1, 'pluginspage' => 1,
'align' => 1,
),
'h1' => array('class' => 1, 'id' => 1, 'style' => 1,),
'h2' => array('class' => 1, 'id' => 1, 'style' => 1,),
'h3' => array('class' => 1, 'id' => 1, 'style' => 1,),
'h4' => array('class' => 1, 'id' => 1, 'style' => 1,),
'h5' => array('class' => 1, 'id' => 1, 'style' => 1,),
'h6' => array('class' => 1, 'id' => 1, 'style' => 1,),
'hr' => array('class' => 1, 'id' => 1, 'align' => 1,),
'img' => array(
'src' => 1, 'width' => 1, 'height' => 1, 'vspace' => 1,
'hspace' => 1, 'dir' => 1, 'align' => 1, 'valign' => 1,
'border' => 1, 'lang' => 1, 'longdesc' => 1,
'title' => 1, 'id' => 1, 'alt' => 1, 'style' => 1,
),
'noscript' => array(),
'object' => array(
'type' => 1, 'data' => 1, 'classid' => 1,
'codebase' => 1, 'width' => 1, 'height' => 1,
'align' => 1,
),
'ol' => array('class' => 1, 'style' => 1,),
'p' => array('class' => 1, 'id' => 1, 'align' => 1, 'lang' => 1,),
'param' => array('name' => 1, 'value' => 1,),
'script' => array('src' => 1, 'language' => 1, 'type' => 1,),
'span' => array('class' => 1, 'id' => 1, 'lang' => 1,),
'table' => array(
'class' => 1, 'id' => 1, 'width' => 1, 'border' => 1,
'cellspacing' => 1, 'cellpadding' => 1,
),
'tbody' => array(),
'td' => array(
'class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1,
'colspan' => 1, 'rowspan' => 1,
),
'th' => array(
'class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1,
'colspan' => 1, 'rowspan' => 1,
),
'tr' => array(
'class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1,
),
'ul' => array('class' => 1, 'style' => 1,),
),
);
$htmlfilter['en'] = array(
'user' => array(
'p' => array(),
'b' => array(),
'strong' => array(),
'i' => array(),
'a' => array('href' => 1, 'title' => 1, 'rel' => 1),
'em' => array(),
'br' => array(),
'tt' => array(),
'hr' => array(),
'li' => array(),
'ol' => array(),
'ul' => array(),
'code' => array(),
'pre' => array(),
),
'admin' => array(
'p' => array('class' => 1, 'id' => 1, 'align' => 1),
'div' => array('class' => 1, 'id' => 1),
'span' => array('class' => 1, 'id' => 1),
'table' => array(
'class' => 1, 'id' => 1, 'width' => 1, 'border' => 1, 'cellspacing' => 1,
'cellpadding' => 1,
),
'tr' => array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1),
'th' => array(
'class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1, 'colspan' => 1,
'rowspan' => 1,
),
'td' => array(
'class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1, 'colspan' => 1,
'rowspan' => 1,
),
),
);
$_JAPANIZE_DATA = array();
// 1. テーブル構造とデータを変更する
$_JAPANIZE_DATA[1] = array(
0 => array(
'ja' => "ALTER TABLE {$_TABLES['syndication']} "
. "MODIFY language VARCHAR(20) NOT NULL DEFAULT 'ja' ",
'en' => "ALTER TABLE {$_TABLES['syndication']} "
. "MODIFY language VARCHAR(20) NOT NULL DEFAULT 'en-gb' ",
),
1 => array(
'ja' => "UPDATE {$_TABLES['syndication']} "
. "SET language = 'ja' ",
'en' => "UPDATE {$_TABLES['syndication']} "
. "SET language = 'en-gb' ",
),
2 => array(
'ja' => "UPDATE {$_TABLES['syndication']} "
. "SET charset = 'utf8' ",
'en' => "UPDATE {$_TABLES['syndication']} "
. "SET charset = '" . COM_getCharset() . "' ",
),
3 => array(
'ja' => "ALTER TABLE {$_TABLES['users']} "
. "MODIFY username VARCHAR(108) NOT NULL DEFAULT '' ",
'en' => "ALTER TABLE {$_TABLES['users']} "
. "MODIFY username VARCHAR(16) NOT NULL DEFAULT '' ",
),
4 => array(
'ja' => "UPDATE {$_TABLES['users']} "
. "SET username = '" . DB_escapeString('ゲストユーザー') . "', "
. " fullname = '" . DB_escapeString('ゲストユーザー') . "' "
. "WHERE (uid = 1) ",
'en' => "UPDATE {$_TABLES['users']} "
. "SET username = 'Anonymous', fullname = 'Anonymous' "
. "WHERE (uid = 1) ",
),
5 => array(
'ja' => "UPDATE {$_TABLES['users']} "
. "SET fullname= '" . DB_escapeString('サイト管理者') . "', homepage='"
. DB_escapeString($_CONF['site_url']) . "' "
. "WHERE (uid = 2) ",
'en' => "UPDATE {$_TABLES['users']} "
. "SET fullname= 'Geeklog SuperUser', homepage='https://www.geeklog.net/' "
. "WHERE (uid = 2) ",
),
6 => array(
'ja' => "UPDATE {$_TABLES['stories']} "
. "SET title = '" . DB_escapeString('Geeklogへようこそ!') . "', "
. "introtext = '" . DB_escapeString("<p>無事インストールが完了したようですね。おめでとうございます。できれば、<a href=\"docs/japanese/index.html\">docs ディレクトリ</a>のすべての文書に一通り目を通しておいてください。Geeklogはユーザーを中心としたセキュリティモデルを実装しています。Geeklogを管理・運用するにはこの仕組みを理解する必要があります。</p>\n<p>サイトにログインするには、次のアカウントを使用してください:</p>\n<p>ユーザー名: <strong>Admin</strong><br />\nパスワード: <strong>password</strong></p><p><strong>ログインしたら、忘れずに<a href=\"{$_CONF['site_url']}/usersettings.php?mode=edit\">パスワードを変更</a>してください。</strong></p><p>Geeklogのサポートは、<a href=\"https://www.geeklog.jp\">Geeklog Japanese</a>へ。追加ドキュメントは <a href=\"https://wiki.geeklog.jp\">Geeklog Wiki ドキュメント</a>をどうぞ。</p>") . "' "
. "WHERE (sid = 'welcome') ",
'en' => "UPDATE {$_TABLES['stories']} "
. "SET title = 'Welcome to Geeklog!', "
. "introtext = '" . DB_escapeString("<p>Welcome and let me be the first to congratulate you on installing Geeklog. Please take the time to read everything in the <a href=\"docs/english/index.html\">docs directory</a>. Geeklog now has enhanced, user-based security. You should thoroughly understand how these work before you run a production Geeklog Site.</p>\n<p>To log into your new Geeklog site, please use this account:</p>\n<p>Username: <b>Admin</b><br />\nPassword: <b>password</b></p><p><b>And don't forget to <a href=\"{$_CONF['site_url']}/usersettings.php?mode=edit\">change your password</a> after logging in!</b></p>") . "' "
. "WHERE (sid = 'welcome') ",
),
7 => array(
'ja' => "UPDATE {$_TABLES['storysubmission']} "
. "SET title = '" . DB_escapeString('セキュリティを確認してください。') . "', "
. "introtext = '" . DB_escapeString("<p>インストールが終了したら、次のことを実行してセキュリティを高めてください。</p><ol>\n<li>Adminアカウントのパスワードを変更する。</li>\n<li>installディレクトリを削除する(もう必要ありません)。</li>\n</ol>") . "' "
. "WHERE (sid = 'security-reminder') ",
'en' => "UPDATE {$_TABLES['storysubmission']} "
. "SET title = 'Are you secure?', "
. "introtext = '" . DB_escapeString("<p>This is a reminder to secure your site once you have Geeklog up and running. What you should do:</p>\n\n<ol>\n<li>Change the default password for the Admin account.</li>\n<li>Remove the install directory (you won't need it any more).</li>\n</ol>") . "' "
. "WHERE (sid = 'security-reminder') ",
),
8 => array(
'ja' => "UPDATE {$_TABLES['topics']} "
. "SET topic = '" . DB_escapeString('おしらせ') . "' "
. "WHERE (tid = 'General') ",
'en' => "UPDATE {$_TABLES['topics']} "
. "SET topic = '" . DB_escapeString('General News') . "' "
. "WHERE (tid = 'General') ",
),
9 => array(
'ja' => "UPDATE {$_TABLES['events']} "
. "SET title = '" . DB_escapeString('カレンダープラグインをインストール') . "', "
. "description = '" . DB_escapeString('カレンダープラグインをインストールしました。') . "', "
. "location = '" . DB_escapeString('あなたのWebサーバー') . "' "
. "WHERE (eid = '2008050110130162') ",
'en' => "UPDATE {$_TABLES['events']} "
. "SET title = 'Installed the Calendar plugin', "
. "description = 'Today, you successfully installed the Calendar plugin.', "
. "location = 'Your webserver' "
. "WHERE (eid = '2008050110130162') ",
),
);
if ($isPgsql) {
$_JAPANIZE_DATA[1][0] = array(
'ja' => "ALTER TABLE {$_TABLES['syndication']} "
. "ALTER COLUMN language SET DEFAULT 'ja' ",
'en' => "ALTER TABLE {$_TABLES['syndication']} "
. "ALTER COLUMN language SET DEFAULT 'en-gb' ",
);
$_JAPANIZE_DATA[1][3] = array(
'ja' => "ALTER TABLE {$_TABLES['users']} "
. "ALTER COLUMN username TYPE VARCHAR(108) ",
'en' => "ALTER TABLE {$_TABLES['users']} "
. "ALTER COLUMN username TYPE VARCHAR(16) ",
);
}
if (in_array('calendar', $_PLUGINS) && DB_checkTableExists('events')) {
// イベントの郵便番号を16桁に
if ($isPgsql) {
$_JAPANIZE_DATA[1][] = array(
'ja' => "ALTER TABLE {$_TABLES['events']} ALTER COLUMN zipcode TYPE VARCHAR(16) ",
'en' => "SELECT 1", // Dummy
);
$_JAPANIZE_DATA[1][] = array(
'ja' => "ALTER TABLE {$_TABLES['eventsubmission']} ALTER COLUMN zipcode TYPE VARCHAR(16) ",
'en' => "SELECT 1", // Dummy
);
$_JAPANIZE_DATA[1][] = array(
'ja' => "ALTER TABLE {$_TABLES['personal_events']} ALTER COLUMN zipcode TYPE VARCHAR(16) ",
'en' => "SELECT 1", // Dummy
);
} else {
$_JAPANIZE_DATA[1][] = array(
'ja' => "ALTER TABLE {$_TABLES['events']} MODIFY zipcode VARCHAR(16)",
'en' => "SELECT 1", // Dummy
);
$_JAPANIZE_DATA[1][] = array(
'ja' => "ALTER TABLE {$_TABLES['eventsubmission']} MODIFY zipcode VARCHAR(16)",
'en' => "SELECT 1", // Dummy
);
$_JAPANIZE_DATA[1][] = array(
'ja' => "ALTER TABLE {$_TABLES['personal_events']} MODIFY zipcode VARCHAR(16)",
'en' => "SELECT 1", // Dummy
);
}
}
if (in_array('links', $_PLUGINS) && DB_checkTableExists('linkcategories')) {
$_JAPANIZE_DATA[1][] = array(
'ja' => "UPDATE {$_TABLES['linkcategories']} "
. "SET description = '" . DB_escapeString('Geeklog関係のサイト') . "' "
. "WHERE (cid = '" . DB_escapeString('geeklog-sites') . "') ",
'en' => "UPDATE {$_TABLES['linkcategories']} "
. "SET description = '"
. DB_escapeString('Sites using or related to the Geeklog CMS') . "' "
. "WHERE (cid = '" . DB_escapeString('geeklog-sites') . "') ",
);
}
if (in_array('links', $_PLUGINS) && DB_checkTableExists('links')) {
if (DB_count($_TABLES['links'], 'lid', 'geeklog.jp') == 0) {
$group_id = DB_getItem($_TABLES['groups'], 'grp_id', "grp_name = 'Links Admin'");
$_JAPANIZE_DATA[1][] = array(
'ja' => "INSERT INTO {$_TABLES['links']} "
. "(lid, cid, url, description, title, hits, date, "
. "owner_id, group_id, perm_owner, perm_group, "
. "perm_members, perm_anon) "
. "VALUES ('geeklog.jp', 'geeklog-sites', 'https://www.geeklog.jp/', "
. "'" . DB_escapeString('Geeklog日本公式サイト') . "', '"
. DB_escapeString('Geeklog Japanese') . "', 0, NOW(), 1, {$group_id}, "
. "3, 3, 2, 2) ",
'en' => "DELETE FROM {$_TABLES['links']} "
. "WHERE (lid = 'geeklog.jp')",
);
} else {
$_JAPANIZE_DATA[1][] = array(
'ja' => "SELECT 1", // Dummy
'en' => "DELETE FROM {$_TABLES['links']} "
. "WHERE (lid = 'geeklog.jp')",
);
}
}
// 2. グループ詳細を変更する
//
// UPDATE {$_TABLES['groups']}
// SET grp_descr = '{en/ja}'
// WHERE (grp_name = '{group}')
$_JAPANIZE_DATA[2] = array(
array(
'en' => 'Has full access to the site',
'ja' => 'サイト管理者',
'group' => 'Root',
),
array(
'en' => 'Group that a typical user is added to',
'ja' => 'すべてのユーザー',
'group' => 'All Users',
),
array(
'en' => 'Has full access to story features',
'ja' => '記事管理者',
'group' => 'Story Admin',
),
array(
'en' => 'Has full access to block features',
'ja' => 'ブロック管理者',
'group' => 'Block Admin',
),
array(
'en' => 'Has full access to topic features',
'ja' => '話題管理者',
'group' => 'Topic Admin',
),
array(
'en' => 'Has full access to topic features',
'ja' => 'ユーザー管理者',
'group' => 'User Admin',
),
array(
'en' => 'Has full access to plugin features',
'ja' => 'プラグイン管理者',
'group' => 'Plugin Admin',
),
array(
'en' => 'Has full access to plugin features',
'ja' => 'グループ管理者兼ユーザー管理者',
'group' => 'Group Admin',
),
array(
'en' => 'Can use Mail Utility',
'ja' => 'メール管理者',
'group' => 'Mail Admin',
),
array(
'en' => 'All registered members',
'ja' => 'すべての登録ユーザー',
'group' => 'Logged-in Users',
),
array(
'en' => 'Users in this group can have authenticated against a remote server.',
'ja' => 'リモートユーザー',
'group' => 'Remote Users',
),
array(
'en' => 'Can create and modify web feeds for the site',
'ja' => 'フィード管理者',
'group' => 'Syndication Admin',
),
array(
'en' => 'Has full access to configuration',
'ja' => 'コンフィギュレーション管理者',
'group' => 'Configuration Admin',
),
array(
'en' => 'Has full access to calendar features',
'ja' => 'カレンダー管理者',
'group' => 'Calendar Admin',
),
array(
'en' => 'Has full access to links features',
'ja' => 'リンク管理者',
'group' => 'Links Admin',
),
array(
'en' => 'Has full access to polls features',
'ja' => 'アンケート管理者',
'group' => 'Polls Admin',
),
array(
'en' => 'Users in this group can administer the Spam-x plugin',
'ja' => 'スパム管理者',
'group' => 'spamx Admin',
),
array(
'en' => 'Can administer static pages',
'ja' => '静的ページ管理者',
'group' => 'Static Page Admin',
),
array(
'en' => 'Has full access to japanize features',
'ja' => 'Japanizeプラグイン管理者',
'group' => 'Japanize Admin',
),
array(
'en' => 'Users in this group can administer the filemgmt plugin',
'ja' => 'ファイル管理者',
'group' => 'filemgmt Admin',
),
array(
'en' => 'Users in this group can administer the forum plugin',
'ja' => '掲示板管理者',
'group' => 'forum Admin',
),
array(
'en' => 'Can use the Webservices API (if restricted)',
'ja' => 'WebサービスAPIユーザー',
'group' => 'Webservices Users',
),
array(
'en' => 'Can moderate comments',
'ja' => 'コメント管理者',
'group' => 'Comment Admin',
),
array(
'en' => 'Can submit comments',
'ja' => 'コメント承認者',
'group' => 'Comment Submitters',
),
array(
'en' => 'Has full access to File Manager',
'ja' => 'ファイルマネージャー管理者',
'group' => 'Filemanager Admin',
),
array(
'en' => 'Users in this group can administer the ReCAPTCHA plugin',
'ja' => 'reCAPTCHAプラグイン管理者',
'group' => 'reCAPTCHA Admin',
),
array(
'en' => 'Has full access to XMLSitemap features',
'ja' => 'XMLSitemapプラグイン管理者',
'group' => 'XMLSitemap Admin',
),
array(
'en' => 'Has full access to language',
'ja' => '翻訳言語管理者',
'group' => 'Language Admin',
),
array(
'en' => 'Has full access to themes',
'ja' => 'テーマ管理者',
'group' => 'Theme Admin',
),
array(
'en' => 'Users in this group can administer the Autotags plugin',
'ja' => 'Autotagsプラグイン管理者',
'group' => 'Autotags Admin',
),
array(
'en' => 'Has full access to custommenu features',
'ja' => 'カスタムメニュー管理者',
'group' => 'CustomMenu Admin',
),
array(
'en' => 'Has full access to DataProxy features',
'ja' => 'DataProxyプラグイン管理者',
'group' => 'DataProxy Admin',
),
array(
'en' => 'Users in this group can administer the sitemap plugin',
'ja' => 'Sitemapプラグイン管理者',
'group' => 'Sitemap Admin',
),
array(
'en' => 'Users in this group can administer the dbman plugin',
'ja' => 'Dbmanプラグイン管理者',
'group' => 'dbman Admin',
),
array(
'en' => 'Has full access to Mycaljp features',
'ja' => 'Mycaljpプラグイン管理者',
'group' => 'Mycaljp Admin',
),
// array(
// 'en' => 'nmoxqrblock Admin',
// 'ja' => 'nmoxqrblockプラグイン管理者',
// 'group' => 'nmoxqrblock Admin',
// ),
array(
'en' => 'Users in this group can administer the nmoxtopicown plugin',
'ja' => '話題譲渡プラグイン管理者',
'group' => 'nmoxtopicown Admin',
),
array(
'en' => 'Users in this group can administer the themedit plugin',
'ja' => 'テーマエディタプラグイン管理者',
'group' => 'themedit Admin',
),
array(
'en' => 'Users in this group can administer the Messenger plugin',
'ja' => 'メッセンジャープラグイン管理者',
'group' => 'Messenger Admin',
),
// array(
// 'en' => 'Has full access to GoogleMaps features',
// 'ja' => 'GoogleMapsプラグイン管理者',
// 'group' => 'GoogleMaps Admin',
// ),
);
// 3. 初期ブロックタイトル等を変更する
//
// UPDATE {$_TABLES['blocks']}
// SET title = '{en/ja}'
// WHERE (name = '{name}')
$_JAPANIZE_DATA[3] = array(
array(
'en' => 'User Functions',
'ja' => 'ユーザー情報',
'name' => 'user_block',
),
array(
'en' => 'Admins Only',
'ja' => '管理者専用メニュー',
'name' => 'admin_block',
),
array(
'en' => 'Topics',
'ja' => '記事カテゴリ',
'name' => 'section_block',
),
array(
'en' => 'Poll',
'ja' => 'アンケート',
'name' => 'polls_block',
),
array(
'en' => 'Events',
'ja' => 'イベント',
'name' => 'events_block',
),
array(
'en' => 'What\'s New',
'ja' => '新着情報',
'name' => 'whats_new_block',
),
array(
'en' => 'Who\'s Online',
'ja' => 'オンラインユーザー',
'name' => 'whosonline_block',
),
array(
'en' => 'Older Stories',
'ja' => '過去の記事',
'name' => 'older_stories',
),
array(
'type' => 'sql',
'en' => "UPDATE {$_TABLES['blocks']} "
. "SET title = 'About Geeklog', content = '" . DB_escapeString('<p><strong>Welcome to Geeklog!</strong></p><p>If you\'re already familiar with Geeklog - and especially if you\'re not: There have been many improvements to Geeklog since earlier versions that you might want to read up on. Please read the <a href="docs/changes.html">release notes</a>. If you need help, please see the <a href="docs/support.html">support options</a>.</p>') . "' "
. "WHERE (name = 'first_block') ",
'ja' => "UPDATE {$_TABLES['blocks']} "
. "SET title = 'Geeklogについて', content = '" . DB_escapeString('<p><strong>ようこそ、Geeklogへ!</strong><p>Geeklogについてのサポートは、 <a href="https://www.geeklog.jp">Geeklog Japanese</a>へ。ドキュメントは <a href="https://wiki.geeklog.jp">Geeklog Wiki ドキュメント</a>をどうぞ。') . "' "
. "WHERE (name = 'first_block') ",
),
);
// 4. コンフィギュレーションを変更する
$_JAPANIZE_DATA[4] = array(
'set' => array(
'Core' => array(
// サイト・・・無効のメッセージまたはURL
'site_disabled_msg' => array(
'ja' => $_CONF['site_url'] . '/japanize/disabledmsg.html', 'Core',
'en' => 'Geeklog Site is down. Please come back soon.',
),
// シンジケーション・・・フィードの言語
'rdf_language' => array(
'ja' => 'ja',
'en' => 'en-gb',
),
// 管理者ブロック・・・リンクをソートする=false
'sort_admin' => array(
'ja' => false,
'en' => true,
),
// 話題ブロック・・・記事投稿数を表示する=いいえ
'showsubmissioncount' => array(
'ja' => false,
'en' => true,
),
// 話題ブロック・・・Homeへのリンクを表示しない=はい
'hide_home_link' => array(
'ja' => true,
'en' => false,
),
// コメント・・・コメント形状=flat
'comment_mode' => array(
'ja' => 'flat',
'en' => 'nested',
),
// 画像ライブラリ・・・画像ライブラリ=GD
'image_lib' => array(
'ja' => (is_callable('gd_info') ? 'gdlib' : 'none'),
'en' => 'none',
),
// 画像ライブラリ・・・記事の画像高さの最大値=120ピクセル
'max_image_height' => array(
'ja' => 120,
'en' => 160,
),
// ロケール・・・ロケール
'locale' => array(
'ja' => $locale['ja']['locale'],
'en' => $locale['en']['locale'],
),
// ロケール・・・日付
'date' => array(
'ja' => $locale['ja']['date'],
'en' => $locale['en']['date'],
),
// ロケール・・・日時
'daytime' => array(
'ja' => $locale['ja']['daytime'],
'en' => $locale['en']['daytime'],
),
// ロケール・・・日付短表記
'shortdate' => array(
'ja' => $locale['ja']['shortdate'],
'en' => $locale['en']['shortdate'],
),
// ロケール・・・日付けのみ
'dateonly' => array(
'ja' => $locale['ja']['dateonly'],
'en' => $locale['en']['dateonly'],
),
// ロケール・・・時間のみ
'timeonly' => array(
'ja' => $locale['ja']['timeonly'],
'en' => $locale['en']['timeonly'],
),
// hour_mode・・・時間制
'hour_mode' => array(
'ja' => 24,
'en' => 12,
),
// decimal_count・・・小数点以下の桁数
'decimal_count' => array(
'ja' => 0,
'en' => 2,
),
// timezone タイムゾーン
'timezone' => array(
'ja' => 'Asia/Tokyo',
'en' => 'UTC',
),
// アドバンストエディタ
'advanced_editor' => array(
'ja' => true,
'en' => false,
),
// HTMLフィルタ・・・ユーザーHTML
'user_html' => array(
'ja' => $htmlfilter['ja']['user'],
'en' => $htmlfilter['en']['user'],
),
// HTMLフィルタ・・・管理者HTML
'admin_html' => array(
'ja' => $htmlfilter['ja']['admin'],
'en' => $htmlfilter['en']['admin'],
),
// HTMLフィルタ・・・RootユーザーはHTMLフィルタを無効にする
'skip_html_filter_for_root' => array(
'ja' => 1,
'en' => 0,
),
// バッドワードチェック・・・チェックモード いいえ
'censormode' => array(
'ja' => 0,
'en' => 1,
),
// コメントフィード・・・記事のタグ
'comment_feeds_article_tag' => array(
'ja' => "<p>[元の記事: <a href=\"%s\">%s</a>%s%s]\n",
'en' => "<p>[Original Article: <a href=\"%s\">%s</a>%s%s]\n",
),
// コメントフィード・・・コメントの投稿者のタグ
'comment_feeds_comment_author_tag' => array(
'ja' => ", Comment By: <a href=\"%s\">%s</a>",
'en' => ", コメント投稿者: <a href=\"%s\">%s</a>",
),
),
'calendar' => array(
'event_types' => array(
'ja' => array(
'記念日', '約束', '誕生日', '打ち合わせ',
'セミナー', '休日', '会議', '用事', '個人の用事',
'電話', '特別な行事', '旅行', '休暇',
),
'en' => array(
'Anniversary', 'Appointment', 'Birthday',
'Business', 'Education', 'Holiday', 'Meeting',
'Miscellaneous', 'Personal', 'Phone Call',
'Special Occasion', 'Travel', 'Vacation',
),
),
),
),
'set_default' => array(
'Core' => array(
'rdf_language' => array(
'ja' => 'ja',
'en' => 'en-gb',
),
),
),
);
// 5. 更新Pingサーバーを変更する
$_JAPANIZE_DATA[5] = array(
array(
'site_url' => 'http://ping.bloggers.jp/',
'sql' => "INSERT INTO {$_TABLES['pingservice']} (name, site_url, ping_url, method, is_enabled) "
. "VALUES ('ping.bloggers.jp', 'http://ping.bloggers.jp/', "
. "'http://ping.bloggers.jp/rpc/', 'weblogUpdates.ping', 1) ",
),
);
// 6. 権限のツールチップを変更する
$_JAPANIZE_DATA[6] = array(
// 権限名の降順
'block.delete' => array(
'ja' => 'ブロックを削除する権限',
'en' => 'Ability to delete a block',
),
'block.edit' => array(
'ja' => 'ブロックを編集する権限',
'en' => 'Access to block editor',
),
'calendar.edit' => array(
'ja' => 'イベントを編集する権限',
'en' => 'Access to event editor',
),
'calendar.moderate' => array(
'ja' => '承認待ちのイベントを承認・却下する権限',
'en' => 'Ability to moderate pending events',
),
'calendar.submit' => array(
'ja' => '承認待ちなしでイベントを掲載する権限',
'en' => 'May skip the event submission queue',
),
'comment.moderate' => array(
'ja' => '承認待ちのコメントを承認・却下する権限',
'en' => 'Ability to moderate comments',
),
'comment.submit' => array(
'ja' => '承認待ちなしでコメントを投稿する権限',
'en' => 'Comments are automatically published',
),
'filemanager.admin' => array(
'ja' => 'ファイルマネージャーを使用する権限',
'en' => 'Ability to use File Manager',
),
'group.assign' => array(
'ja' => 'ユーザーをグループに加入させる権限',
'en' => 'Ability to assign users to groups',
),
'group.delete' => array(
'ja' => 'グループを削除する権限',
'en' => 'Ability to delete groups',
),
'group.edit' => array(
'ja' => 'グループを編集する権限',
'en' => 'Ability to edit groups',
),
'htmlfilter.skip' => array(
'ja' => 'HTMLフィルターをバイパスする権限',
'en' => 'Skip filtering posts for HTML',
),
'japanize.edit' => array(
'ja' => 'Japanizeプラグインを管理する権限',
'en' => 'Access to Japanize editor',
),
'links.edit' => array(
'ja' => 'リンクを編集する権限',
'en' => 'Access to links editor',
),
'links.moderate' => array(
'ja' => '承認待ちのリンクを承認・却下する権限',
'en' => 'Ability to moderate pending links',
),
'links.submit' => array(
'ja' => '承認待ちなしでリンクを掲載する権限',
'en' => 'May skip the links submission queue',
),
'ogp.edit' => array(
'ja' => 'OGP (Open Graph Protocol)プラグインを管理する権限',
'en' => 'Access to Open Graph Protocol editor',
),
'plugin.edit' => array(
'ja' => 'プラグインを編集する権限',
'en' => 'Access to plugin editor',
),
'polls.edit' => array(
'ja' => 'アンケートを編集する権限',
'en' => 'Access to polls editor',
),
'plugin.install' => array(
'ja' => 'プラグインをインストール・アンインストールする権限',
'en' => 'Can install/uninstall plugins',
),
'plugin.upload' => array(
'ja' => 'プラグインを新規にアップロードする権限',
'en' => 'Can upload new plugins',
),
'spamx.admin' => array(
'ja' => 'Spam-xプラグインを管理する権限',
'en' => 'Full access to Spam-x plugin',
),
'spamx.skip' => array(
'ja' => 'スパムチェックをバイパスする権限',
'en' => 'Skip checking posts for Spam',
),
'staticpages.delete' => array(
'ja' => '静的ページを削除する権限',
'en' => 'Ability to delete a static page',
),
'staticpages.edit' => array(
'ja' => '静的ページを編集する権限',
'en' => 'Ability to edit a static page',
),
'staticpages.PHP' => array(
'ja' => '静的ページでPHPを使用する権限',
'en' => 'Ability use PHP in static pages',
),
'story.edit' => array(
'ja' => '記事を編集する権限',
'en' => 'Access to story editor',
),
'story.moderate' => array(
'ja' => '承認待ちの記事を承認・却下する権限',
'en' => 'Ability to moderate pending stories',
),
'story.ping' => array(
'ja' => '記事の更新ピング、ピングバック、トラックバックを送信する権限',
'en' => 'Ability to send pings, pingbacks, or trackbacks for stories',
),
'story.submit' => array(
'ja' => '承認待ちなしで記事を掲載する権限',
'en' => 'May skip the story submission queue',
),
'syndication.edit' => array(
'ja' => 'フィードを管理する権限',
'en' => 'Access to Content Syndication',
),
'topic.edit' => array(
'ja' => '話題を編集する権限',
'en' => 'Access to topic editor',
),
'user.delete' => array(
'ja' => 'ユーザーを削除する権限',
'en' => 'Ability to delete a user',
),
'user.edit' => array(
'ja' => 'ユーザーを編集する権限',
'en' => 'Access to user editor',
),
'user.mail' => array(
'ja' => 'メンバーにメールを送信する権限',
'en' => 'Ability to send email to members',
),
'webservices.atompub' => array(
'ja' => 'Atompubウェブサービスを使用する権限',
'en' => 'May use Atompub Webservices (if restricted)',
),
// コンフィギュレーションのタブ
'config.Core.tab_site' => array(
'ja' => 'コンフィギュレーションの「サイト」タブにアクセスする権限',
'en' => 'Access to configure site',
),
'config.Core.tab_mail' => array(
'ja' => 'コンフィギュレーションの「メール」タブにアクセスする権限',
'en' => 'Access to configure mail',
),
'config.Core.tab_syndication' => array(
'ja' => 'コンフィギュレーションの「フィード」タブにアクセスする権限',
'en' => 'Access to configure syndication',
),
'config.Core.tab_paths' => array(
'ja' => 'コンフィギュレーションの「パス」タブにアクセスする権限',
'en' => 'Access to configure paths',
),
'config.Core.tab_pear' => array(
'ja' => 'コンフィギュレーションの「PEAR」タブにアクセスする権限',
'en' => 'Access to configure PEAR',
),
'config.Core.tab_mysql' => array(
'ja' => 'コンフィギュレーションの「MySQL」タブにアクセスする権限',
'en' => 'Access to configure MySQL',
),
'config.Core.tab_search' => array(
'ja' => 'コンフィギュレーションの「検索」タブにアクセスする権限',
'en' => 'Access to configure search',
),
'config.Core.tab_story' => array(
'ja' => 'コンフィギュレーションの「記事」タブにアクセスする権限',
'en' => 'Access to configure story',
),
'config.Core.tab_trackback' => array(
'ja' => 'コンフィギュレーションの「トラックバック」タブにアクセスする権限',
'en' => 'Access to configure trackback',
),
'config.Core.tab_pingback' => array(
'ja' => 'コンフィギュレーションの「ピングバック」タブにアクセスする権限',
'en' => 'Access to configure pingback',
),
'config.Core.tab_theme' => array(
'ja' => 'コンフィギュレーションの「テーマ」タブにアクセスする権限',