blob: 91adff5e7536018705ece60475e07dbc68764050 [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 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 Diewaldab4d3ca2015-04-17 01:48:43 +000075 korap => {
76 -short => 'KorAP',
Nils Diewalda898dac2015-05-06 21:04:16 +000077 desc => 'KorAP - Korpusanalyseplattform der nächsten Generation',
Nils Diewald7148c6f2015-05-04 15:07:53 +000078 overview => 'KorAP - Übersicht',
79 },
Nils Diewalda898dac2015-05-06 21:04:16 +000080 template => {
81 intro => 'de/intro'
82 }
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000083 },
Nils Diewald7148c6f2015-05-04 15:07:53 +000084 -en => {
Nils Diewalda898dac2015-05-06 21:04:16 +000085 numf => sub {
86 shift;
87 my %val = @_;
88 my $num = $val{number} or return 0;
89 $num =~ s/$THOUSAND_SEP_RE/$1\,/g;
90 return $num;
91 },
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000092 about => 'About KorAP',
93 login => 'Login',
94 go => 'Go!',
Nils Diewald0ec142f2015-05-05 00:29:23 +000095 searchtitle => 'KorAP: Find "<%= $q %>" (<%= $ql %>)',
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000096 searchplaceholder => 'Find ...',
97 in => 'in',
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000098 by => 'by',
Nils Diewaldab4d3ca2015-04-17 01:48:43 +000099 with => 'with',
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000100 pubOn => 'published on',
101 matchCount => '<%= num($found, "match", "matches") %>',
Nils Diewalda898dac2015-05-06 21:04:16 +0000102 noMatches => 'There were no matches for <code><%= stash("q") %></code>.',
Nils Diewald709f52f2015-05-21 18:32:58 +0000103 notFound => '404 - Page not found',
Nils Diewalda31a5152015-04-17 21:05:23 +0000104 glimpse => 'Sample',
Nils Diewaldab4d3ca2015-04-17 01:48:43 +0000105 faq => 'F.A.Q.',
106 tutorial => 'Tutorial',
107 korap => {
108 -short => 'KorAP',
Nils Diewalda898dac2015-05-06 21:04:16 +0000109 desc => 'KorAP - Corpus Analysis Platform',
Nils Diewalda31a5152015-04-17 21:05:23 +0000110 overview => 'KorAP - Overview'
Nils Diewaldab4d3ca2015-04-17 01:48:43 +0000111 }
112 }
113 }
114 },
Nils Diewald4e9fbcb2014-07-15 11:45:09 +0000115 MailException => {
Nils Diewaldc46003b2015-05-07 15:55:35 +0000116 from => join('@', 'korap', 'ids-mannheim.de'),
117 to => join('@', 'korap', 'ids-mannheim.de'),
Nils Diewald4e9fbcb2014-07-15 11:45:09 +0000118 subject => '[KorAP] Testbed crashed'
Nils Diewaldc46003b2015-05-07 15:55:35 +0000119 },
120 # Doesn't make much sense when published, but who cares ...
121 'TagHelpers-MailToChiffre' => {
122 method_name => 'PArok',
123 pattern_rotate => 673
Nils Diewald5d1ffb42014-05-21 17:45:34 +0000124 }
125}