blob: ae026dc0634d3a81e788ffdac2f54526fe9547f4 [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 Diewald0ec142f2015-05-05 00:29:23 +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 Diewald7148c6f2015-05-04 15:07:53 +000073 jsFile => 'kalamar-<%= $Kalamar::VERSION %>-en.js',
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000074 korap => {
75 -short => 'KorAP',
Nils Diewalda898dac2015-05-06 21:04:16 +000076 desc => 'KorAP - Korpusanalyseplattform der nächsten Generation',
Nils Diewald7148c6f2015-05-04 15:07:53 +000077 overview => 'KorAP - Übersicht',
78 },
Nils Diewalda898dac2015-05-06 21:04:16 +000079 template => {
80 intro => 'de/intro'
81 }
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000082 },
Nils Diewald7148c6f2015-05-04 15:07:53 +000083 -en => {
Nils Diewalda898dac2015-05-06 21:04:16 +000084 numf => sub {
85 shift;
86 my %val = @_;
87 my $num = $val{number} or return 0;
88 $num =~ s/$THOUSAND_SEP_RE/$1\,/g;
89 return $num;
90 },
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000091 about => 'About KorAP',
92 login => 'Login',
93 go => 'Go!',
Nils Diewald0ec142f2015-05-05 00:29:23 +000094 searchtitle => 'KorAP: Find "<%= $q %>" (<%= $ql %>)',
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000095 searchplaceholder => 'Find ...',
96 in => 'in',
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000097 by => 'by',
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000098 with => 'with',
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000099 pubOn => 'published on',
100 matchCount => '<%= num($found, "match", "matches") %>',
Nils Diewalda898dac2015-05-06 21:04:16 +0000101 noMatches => 'There were no matches for <code><%= stash("q") %></code>.',
Nils Diewalda31a5152015-04-17 21:05:23 +0000102 glimpse => 'Sample',
Nils Diewaldab4d3ca2015-04-17 01:48:43 +0000103 faq => 'F.A.Q.',
104 tutorial => 'Tutorial',
Nils Diewald7148c6f2015-05-04 15:07:53 +0000105 jsFile => 'kalamar-<%= $Kalamar::VERSION %>-en.js',
Nils Diewaldab4d3ca2015-04-17 01:48:43 +0000106 korap => {
107 -short => 'KorAP',
Nils Diewalda898dac2015-05-06 21:04:16 +0000108 desc => 'KorAP - Corpus Analysis Platform',
Nils Diewalda31a5152015-04-17 21:05:23 +0000109 overview => 'KorAP - Overview'
Nils Diewaldab4d3ca2015-04-17 01:48:43 +0000110 }
111 }
112 }
113 },
Nils Diewald4e9fbcb2014-07-15 11:45:09 +0000114 MailException => {
115 from => 'korap@ids-mannheim.de',
116 to => 'diewald@ids-mannheim.de',
117 subject => '[KorAP] Testbed crashed'
Nils Diewald5d1ffb42014-05-21 17:45:34 +0000118 }
119}