blob: 4544334d412fd60f7080edab89e7ab9894a5925b [file] [log] [blame]
Nils Diewalda898dac2015-05-06 21:04:16 +00001# Based on Mojolicious::Plugin::Number::Commify
2my $THOUSAND_SEP_RE = qr/(
3 ^[-+]? # beginning of number.
4 \d+? # first digits before first comma
5 (?= # followed by, (but not included in the match) :
6 (?>(?:\d{3})+) # some positive multiple of three digits.
7 (?!\d) # an *exact* multiple, not x * 3 + 1 or whatever.
8 )| # or:
9 \G\d{3} # after the last group, get three digits
10 (?=\d) # but they have to have more digits after them.
11)/x;
12
Nils Diewald5d1ffb42014-05-21 17:45:34 +000013{
Nils Diewald2fe12e12015-03-06 16:47:06 +000014 Kalamar => {
Nils Diewald1d2903f2014-11-03 22:31:20 +000015 'api-0.1' => 'http://10.0.10.13:7070/api/v0.1/'
Nils Diewalddd2d4e82014-05-31 17:08:33 +000016 },
17 Notifications => {
Nils Diewald2ef057e2014-11-04 16:04:17 +000018 Alertify => {
19 base_timeout => 10_000
20 },
Nils Diewald02df9912014-06-03 16:08:07 +000021 JSON => 1
Nils Diewalddd2d4e82014-05-31 17:08:33 +000022 },
23 Search => {
Nils Diewald2fe12e12015-03-06 16:47:06 +000024 engine => 'Kalamar::API',
Nils Diewald996aa552014-12-02 03:26:44 +000025 api => 'http://10.0.10.13:7070/api/v0.1/'
Nils Diewald2329e1d2014-06-12 16:07:57 +000026 },
27 CHI => {
28 default => {
29 driver => 'FastMmap',
Nils Diewald94bae912014-09-22 13:40:31 +000030 root_dir => app->home . '/cache/data',
Nils Diewald2329e1d2014-06-12 16:07:57 +000031 cache_size => '12m'
32 }
Nils Diewald1eba6572014-06-17 19:49:53 +000033 },
34 hypnotoad => {
Nils Diewalddd9d8d72014-06-23 15:09:37 +000035 listen => ['http://*:6666', 'http://*:5555'],
Nils Diewaldf2e02a92014-11-12 18:31:05 +000036 workers => 5,
Nils Diewaldd2b57372015-03-10 20:09:48 +000037 inactivity_timeout => 120,
38 proxy => 1
Nils Diewald002e8fb2014-06-22 14:27:01 +000039 },
40 'TagHelpers-Pagination' => {
Nils Diewalda898dac2015-05-06 21:04:16 +000041 prev => '<span><span>&lt;</span></span>',
42 next => '<span><span>&lt;</span></span>',
43 ellipsis => '<a class="ellipsis"><span><span>...</span></span></a>',
Nils Diewald002e8fb2014-06-22 14:27:01 +000044 separator => '',
Nils Diewalda898dac2015-05-06 21:04:16 +000045 current => '<span>{current}</span>',
46 page => '<span>{page}</span>'
Nils Diewald4e9fbcb2014-07-15 11:45:09 +000047 },
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000048 Localize => {
49 dict => {
50 _ => sub { $_->locale },
51 de => {
Nils Diewalda898dac2015-05-06 21:04:16 +000052 numf => sub {
53 shift;
54 my %val = @_;
55 my $num = $val{number} or return 0;
56 $num =~ s/$THOUSAND_SEP_RE/$1\./g;
57 return $num;
58 },
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000059 about => 'Über KorAP',
60 login => 'Anmelden',
Nils Diewald023c6712015-05-21 20:12:30 +000061 searchtitle => 'KorAP: Finde "<%== $q %>" (<%= $ql %>)',
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000062 searchplaceholder => 'Finde ...',
Nils Diewald0ec142f2015-05-05 00:29:23 +000063 go => 'Los!',
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000064 in => 'in',
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000065 by => 'von',
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000066 with => 'mit',
Nils Diewalda31a5152015-04-17 21:05:23 +000067 glimpse => 'Stichprobe',
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000068 faq => 'Häufige Fragen',
69 tutorial => 'Einführung',
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000070 pubOn => 'veröffentlicht am',
71 matchCount => 'Treffer',
Nils Diewalda898dac2015-05-06 21:04:16 +000072 noMatches => 'Es wurden keine Treffer für <code><%= stash("q") %></code> gefunden.',
Nils Diewald709f52f2015-05-21 18:32:58 +000073 notFound => '404 - Seite nicht gefunden',
Nils Diewaldc2826192015-05-07 19:23:44 +000074 jsFile => 'kalamar-<%= $Kalamar::VERSION %>-de.js',
Nils Diewald023c6712015-05-21 20:12:30 +000075 underConstruction => 'In Vorbereitung!',
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000076 korap => {
77 -short => 'KorAP',
Nils Diewalda898dac2015-05-06 21:04:16 +000078 desc => 'KorAP - Korpusanalyseplattform der nächsten Generation',
Nils Diewald7148c6f2015-05-04 15:07:53 +000079 overview => 'KorAP - Übersicht',
80 },
Nils Diewalda898dac2015-05-06 21:04:16 +000081 template => {
82 intro => 'de/intro'
83 }
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000084 },
Nils Diewald7148c6f2015-05-04 15:07:53 +000085 -en => {
Nils Diewalda898dac2015-05-06 21:04:16 +000086 numf => sub {
87 shift;
88 my %val = @_;
89 my $num = $val{number} or return 0;
90 $num =~ s/$THOUSAND_SEP_RE/$1\,/g;
91 return $num;
92 },
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000093 about => 'About KorAP',
94 login => 'Login',
95 go => 'Go!',
Nils Diewald023c6712015-05-21 20:12:30 +000096 searchtitle => 'KorAP: Find "<%== $q %>" (<%= $ql %>)',
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000097 searchplaceholder => 'Find ...',
98 in => 'in',
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000099 by => 'by',
Nils Diewaldab4d3ca2015-04-17 01:48:43 +0000100 with => 'with',
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000101 pubOn => 'published on',
102 matchCount => '<%= num($found, "match", "matches") %>',
Nils Diewalda898dac2015-05-06 21:04:16 +0000103 noMatches => 'There were no matches for <code><%= stash("q") %></code>.',
Nils Diewald709f52f2015-05-21 18:32:58 +0000104 notFound => '404 - Page not found',
Nils Diewalda31a5152015-04-17 21:05:23 +0000105 glimpse => 'Sample',
Nils Diewaldab4d3ca2015-04-17 01:48:43 +0000106 faq => 'F.A.Q.',
Nils Diewald023c6712015-05-21 20:12:30 +0000107 underConstruction => 'Under Construction!',
Nils Diewaldab4d3ca2015-04-17 01:48:43 +0000108 tutorial => 'Tutorial',
109 korap => {
110 -short => 'KorAP',
Nils Diewalda898dac2015-05-06 21:04:16 +0000111 desc => 'KorAP - Corpus Analysis Platform',
Nils Diewalda31a5152015-04-17 21:05:23 +0000112 overview => 'KorAP - Overview'
Nils Diewaldab4d3ca2015-04-17 01:48:43 +0000113 }
114 }
115 }
116 },
Nils Diewald4e9fbcb2014-07-15 11:45:09 +0000117 MailException => {
Nils Diewaldc46003b2015-05-07 15:55:35 +0000118 from => join('@', 'korap', 'ids-mannheim.de'),
119 to => join('@', 'korap', 'ids-mannheim.de'),
Nils Diewald4e9fbcb2014-07-15 11:45:09 +0000120 subject => '[KorAP] Testbed crashed'
Nils Diewaldc46003b2015-05-07 15:55:35 +0000121 },
122 # Doesn't make much sense when published, but who cares ...
123 'TagHelpers-MailToChiffre' => {
124 method_name => 'PArok',
125 pattern_rotate => 673
Nils Diewald5d1ffb42014-05-21 17:45:34 +0000126 }
127}