Nils Diewald | a898dac | 2015-05-06 21:04:16 +0000 | [diff] [blame] | 1 | # Based on Mojolicious::Plugin::Number::Commify |
| 2 | my $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 Diewald | 5d1ffb4 | 2014-05-21 17:45:34 +0000 | [diff] [blame] | 13 | { |
Nils Diewald | 2fe12e1 | 2015-03-06 16:47:06 +0000 | [diff] [blame] | 14 | Kalamar => { |
Nils Diewald | 1d2903f | 2014-11-03 22:31:20 +0000 | [diff] [blame] | 15 | 'api-0.1' => 'http://10.0.10.13:7070/api/v0.1/' |
Nils Diewald | dd2d4e8 | 2014-05-31 17:08:33 +0000 | [diff] [blame] | 16 | }, |
| 17 | Notifications => { |
Nils Diewald | 2ef057e | 2014-11-04 16:04:17 +0000 | [diff] [blame] | 18 | Alertify => { |
| 19 | base_timeout => 10_000 |
| 20 | }, |
Nils Diewald | 02df991 | 2014-06-03 16:08:07 +0000 | [diff] [blame] | 21 | JSON => 1 |
Nils Diewald | dd2d4e8 | 2014-05-31 17:08:33 +0000 | [diff] [blame] | 22 | }, |
| 23 | Search => { |
Nils Diewald | 2fe12e1 | 2015-03-06 16:47:06 +0000 | [diff] [blame] | 24 | engine => 'Kalamar::API', |
Nils Diewald | 996aa55 | 2014-12-02 03:26:44 +0000 | [diff] [blame] | 25 | api => 'http://10.0.10.13:7070/api/v0.1/' |
Nils Diewald | 2329e1d | 2014-06-12 16:07:57 +0000 | [diff] [blame] | 26 | }, |
| 27 | CHI => { |
| 28 | default => { |
| 29 | driver => 'FastMmap', |
Nils Diewald | 94bae91 | 2014-09-22 13:40:31 +0000 | [diff] [blame] | 30 | root_dir => app->home . '/cache/data', |
Nils Diewald | 2329e1d | 2014-06-12 16:07:57 +0000 | [diff] [blame] | 31 | cache_size => '12m' |
| 32 | } |
Nils Diewald | 1eba657 | 2014-06-17 19:49:53 +0000 | [diff] [blame] | 33 | }, |
| 34 | hypnotoad => { |
Nils Diewald | dd9d8d7 | 2014-06-23 15:09:37 +0000 | [diff] [blame] | 35 | listen => ['http://*:6666', 'http://*:5555'], |
Nils Diewald | f2e02a9 | 2014-11-12 18:31:05 +0000 | [diff] [blame] | 36 | workers => 5, |
Nils Diewald | d2b5737 | 2015-03-10 20:09:48 +0000 | [diff] [blame] | 37 | inactivity_timeout => 120, |
| 38 | proxy => 1 |
Nils Diewald | 002e8fb | 2014-06-22 14:27:01 +0000 | [diff] [blame] | 39 | }, |
| 40 | 'TagHelpers-Pagination' => { |
Nils Diewald | a898dac | 2015-05-06 21:04:16 +0000 | [diff] [blame] | 41 | prev => '<span><span><</span></span>', |
| 42 | next => '<span><span><</span></span>', |
| 43 | ellipsis => '<a class="ellipsis"><span><span>...</span></span></a>', |
Nils Diewald | 002e8fb | 2014-06-22 14:27:01 +0000 | [diff] [blame] | 44 | separator => '', |
Nils Diewald | a898dac | 2015-05-06 21:04:16 +0000 | [diff] [blame] | 45 | current => '<span>{current}</span>', |
| 46 | page => '<span>{page}</span>' |
Nils Diewald | 4e9fbcb | 2014-07-15 11:45:09 +0000 | [diff] [blame] | 47 | }, |
Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 48 | Localize => { |
| 49 | dict => { |
| 50 | _ => sub { $_->locale }, |
| 51 | de => { |
Nils Diewald | a898dac | 2015-05-06 21:04:16 +0000 | [diff] [blame] | 52 | 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 Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 59 | about => 'Über KorAP', |
| 60 | login => 'Anmelden', |
Nils Diewald | 023c671 | 2015-05-21 20:12:30 +0000 | [diff] [blame] | 61 | searchtitle => 'KorAP: Finde "<%== $q %>" (<%= $ql %>)', |
Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 62 | searchplaceholder => 'Finde ...', |
Nils Diewald | 0ec142f | 2015-05-05 00:29:23 +0000 | [diff] [blame] | 63 | go => 'Los!', |
Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 64 | in => 'in', |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 65 | by => 'von', |
Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 66 | with => 'mit', |
Akron | 229bd41 | 2015-05-28 19:01:19 +0200 | [diff] [blame] | 67 | glimpse => { |
| 68 | -short => 'Stichprobe', |
| 69 | desc => 'Zeige nur die ersten Treffer in beliebiger Reihenfolge' |
| 70 | }, |
Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 71 | faq => 'Häufige Fragen', |
| 72 | tutorial => 'Einführung', |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 73 | pubOn => 'veröffentlicht am', |
| 74 | matchCount => 'Treffer', |
Nils Diewald | a898dac | 2015-05-06 21:04:16 +0000 | [diff] [blame] | 75 | noMatches => 'Es wurden keine Treffer für <code><%= stash("q") %></code> gefunden.', |
Nils Diewald | 709f52f | 2015-05-21 18:32:58 +0000 | [diff] [blame] | 76 | notFound => '404 - Seite nicht gefunden', |
Nils Diewald | c282619 | 2015-05-07 19:23:44 +0000 | [diff] [blame] | 77 | jsFile => 'kalamar-<%= $Kalamar::VERSION %>-de.js', |
Nils Diewald | 023c671 | 2015-05-21 20:12:30 +0000 | [diff] [blame] | 78 | underConstruction => 'In Vorbereitung!', |
Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 79 | korap => { |
| 80 | -short => 'KorAP', |
Nils Diewald | a898dac | 2015-05-06 21:04:16 +0000 | [diff] [blame] | 81 | desc => 'KorAP - Korpusanalyseplattform der nächsten Generation', |
Nils Diewald | 7148c6f | 2015-05-04 15:07:53 +0000 | [diff] [blame] | 82 | overview => 'KorAP - Übersicht', |
| 83 | }, |
Nils Diewald | a898dac | 2015-05-06 21:04:16 +0000 | [diff] [blame] | 84 | template => { |
| 85 | intro => 'de/intro' |
| 86 | } |
Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 87 | }, |
Nils Diewald | 7148c6f | 2015-05-04 15:07:53 +0000 | [diff] [blame] | 88 | -en => { |
Nils Diewald | a898dac | 2015-05-06 21:04:16 +0000 | [diff] [blame] | 89 | 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 Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 96 | about => 'About KorAP', |
| 97 | login => 'Login', |
| 98 | go => 'Go!', |
Nils Diewald | 023c671 | 2015-05-21 20:12:30 +0000 | [diff] [blame] | 99 | searchtitle => 'KorAP: Find "<%== $q %>" (<%= $ql %>)', |
Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 100 | searchplaceholder => 'Find ...', |
| 101 | in => 'in', |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 102 | by => 'by', |
Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 103 | with => 'with', |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 104 | pubOn => 'published on', |
| 105 | matchCount => '<%= num($found, "match", "matches") %>', |
Nils Diewald | a898dac | 2015-05-06 21:04:16 +0000 | [diff] [blame] | 106 | noMatches => 'There were no matches for <code><%= stash("q") %></code>.', |
Nils Diewald | 709f52f | 2015-05-21 18:32:58 +0000 | [diff] [blame] | 107 | notFound => '404 - Page not found', |
Akron | 229bd41 | 2015-05-28 19:01:19 +0200 | [diff] [blame] | 108 | glimpse => { |
| 109 | -short => 'Sample', |
| 110 | desc => 'Just show the first matches in arbitrary order' |
| 111 | }, |
Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 112 | faq => 'F.A.Q.', |
Nils Diewald | 023c671 | 2015-05-21 20:12:30 +0000 | [diff] [blame] | 113 | underConstruction => 'Under Construction!', |
Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 114 | tutorial => 'Tutorial', |
| 115 | korap => { |
| 116 | -short => 'KorAP', |
Nils Diewald | a898dac | 2015-05-06 21:04:16 +0000 | [diff] [blame] | 117 | desc => 'KorAP - Corpus Analysis Platform', |
Nils Diewald | a31a515 | 2015-04-17 21:05:23 +0000 | [diff] [blame] | 118 | overview => 'KorAP - Overview' |
Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 119 | } |
| 120 | } |
| 121 | } |
| 122 | }, |
Nils Diewald | 4e9fbcb | 2014-07-15 11:45:09 +0000 | [diff] [blame] | 123 | MailException => { |
Nils Diewald | c46003b | 2015-05-07 15:55:35 +0000 | [diff] [blame] | 124 | from => join('@', 'korap', 'ids-mannheim.de'), |
| 125 | to => join('@', 'korap', 'ids-mannheim.de'), |
Nils Diewald | 4e9fbcb | 2014-07-15 11:45:09 +0000 | [diff] [blame] | 126 | subject => '[KorAP] Testbed crashed' |
Nils Diewald | c46003b | 2015-05-07 15:55:35 +0000 | [diff] [blame] | 127 | }, |
| 128 | # Doesn't make much sense when published, but who cares ... |
| 129 | 'TagHelpers-MailToChiffre' => { |
| 130 | method_name => 'PArok', |
| 131 | pattern_rotate => 673 |
Nils Diewald | 5d1ffb4 | 2014-05-21 17:45:34 +0000 | [diff] [blame] | 132 | } |
| 133 | } |