blob: 926d8161f8b70dad6db947d5819d036c729250e9 [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',
Akron229bd412015-05-28 19:01:19 +020067 glimpse => {
68 -short => 'Stichprobe',
69 desc => 'Zeige nur die ersten Treffer in beliebiger Reihenfolge'
70 },
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000071 faq => 'Häufige Fragen',
72 tutorial => 'Einführung',
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000073 pubOn => 'veröffentlicht am',
74 matchCount => 'Treffer',
Nils Diewalda898dac2015-05-06 21:04:16 +000075 noMatches => 'Es wurden keine Treffer für <code><%= stash("q") %></code> gefunden.',
Nils Diewald709f52f2015-05-21 18:32:58 +000076 notFound => '404 - Seite nicht gefunden',
Nils Diewaldc2826192015-05-07 19:23:44 +000077 jsFile => 'kalamar-<%= $Kalamar::VERSION %>-de.js',
Nils Diewald023c6712015-05-21 20:12:30 +000078 underConstruction => 'In Vorbereitung!',
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000079 korap => {
80 -short => 'KorAP',
Nils Diewalda898dac2015-05-06 21:04:16 +000081 desc => 'KorAP - Korpusanalyseplattform der nächsten Generation',
Nils Diewald7148c6f2015-05-04 15:07:53 +000082 overview => 'KorAP - Übersicht',
83 },
Nils Diewalda898dac2015-05-06 21:04:16 +000084 template => {
85 intro => 'de/intro'
86 }
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000087 },
Nils Diewald7148c6f2015-05-04 15:07:53 +000088 -en => {
Nils Diewalda898dac2015-05-06 21:04:16 +000089 numf => sub {
90 shift;
91 my %val = @_;
92 my $num = $val{number} or return 0;
93 $num =~ s/$THOUSAND_SEP_RE/$1\,/g;
94 return $num;
95 },
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000096 about => 'About KorAP',
97 login => 'Login',
98 go => 'Go!',
Nils Diewald023c6712015-05-21 20:12:30 +000099 searchtitle => 'KorAP: Find "<%== $q %>" (<%= $ql %>)',
Nils Diewaldab4d3ca2015-04-17 01:48:43 +0000100 searchplaceholder => 'Find ...',
101 in => 'in',
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000102 by => 'by',
Nils Diewaldab4d3ca2015-04-17 01:48:43 +0000103 with => 'with',
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000104 pubOn => 'published on',
105 matchCount => '<%= num($found, "match", "matches") %>',
Nils Diewalda898dac2015-05-06 21:04:16 +0000106 noMatches => 'There were no matches for <code><%= stash("q") %></code>.',
Nils Diewald709f52f2015-05-21 18:32:58 +0000107 notFound => '404 - Page not found',
Akron229bd412015-05-28 19:01:19 +0200108 glimpse => {
109 -short => 'Sample',
110 desc => 'Just show the first matches in arbitrary order'
111 },
Nils Diewaldab4d3ca2015-04-17 01:48:43 +0000112 faq => 'F.A.Q.',
Nils Diewald023c6712015-05-21 20:12:30 +0000113 underConstruction => 'Under Construction!',
Nils Diewaldab4d3ca2015-04-17 01:48:43 +0000114 tutorial => 'Tutorial',
115 korap => {
116 -short => 'KorAP',
Nils Diewalda898dac2015-05-06 21:04:16 +0000117 desc => 'KorAP - Corpus Analysis Platform',
Nils Diewalda31a5152015-04-17 21:05:23 +0000118 overview => 'KorAP - Overview'
Nils Diewaldab4d3ca2015-04-17 01:48:43 +0000119 }
120 }
121 }
122 },
Nils Diewald4e9fbcb2014-07-15 11:45:09 +0000123 MailException => {
Nils Diewaldc46003b2015-05-07 15:55:35 +0000124 from => join('@', 'korap', 'ids-mannheim.de'),
125 to => join('@', 'korap', 'ids-mannheim.de'),
Nils Diewald4e9fbcb2014-07-15 11:45:09 +0000126 subject => '[KorAP] Testbed crashed'
Nils Diewaldc46003b2015-05-07 15:55:35 +0000127 },
128 # Doesn't make much sense when published, but who cares ...
129 'TagHelpers-MailToChiffre' => {
130 method_name => 'PArok',
131 pattern_rotate => 673
Nils Diewald5d1ffb42014-05-21 17:45:34 +0000132 }
133}