blob: b5964f5fc98d963d84fd809b6b8f8003861244bb [file] [log] [blame]
Akroncddd1642015-06-10 21:31:53 +02001# 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
13{
14 _ => sub { $_->locale },
15 de => {
16 numf => sub {
17 shift;
18 my %val = @_;
19 my $num = $val{number} or return 0;
20 $num =~ s/$THOUSAND_SEP_RE/$1\./g;
21 return $num;
22 },
23 about => 'Über KorAP',
24 login => 'Anmelden',
Akron7716f012015-07-01 20:38:32 +020025 searchtitle => 'KorAP: Finde »<%== $q %>« <% if (param("collection-name")) { %>in <%== param("collection-name") %><% } %> mit <%== loc("QL_" . $ql, "unbekannter Anfragesprache") %>',
Akroncddd1642015-06-10 21:31:53 +020026 searchplaceholder => 'Finde ...',
27 go => 'Los!',
28 in => 'in',
29 by => 'von',
30 with => 'mit',
31 glimpse => {
32 -short => 'Stichprobe',
33 desc => 'Zeige nur die ersten Treffer in beliebiger Reihenfolge'
34 },
35 faq => 'Häufige Fragen',
36 tutorial => 'Einführung',
37 pubOn => 'veröffentlicht am',
38 matchCount => 'Treffer',
39 noMatches => 'Es wurden keine Treffer für <code><%= stash("q") %></code> gefunden.',
40 notFound => '404 - Seite nicht gefunden',
41 jsFile => 'kalamar-<%= $Kalamar::VERSION %>-de.js',
42 underConstruction => 'In Vorbereitung!',
43 korap => {
44 -short => 'KorAP',
45 desc => 'KorAP - Korpusanalyseplattform der nächsten Generation',
46 overview => 'KorAP - Übersicht',
47 },
48 template => {
49 intro => 'de/intro'
50 }
51 },
52 -en => {
53 numf => sub {
54 shift;
55 my %val = @_;
56 my $num = $val{number} or return 0;
57 $num =~ s/$THOUSAND_SEP_RE/$1\,/g;
58 return $num;
59 },
60 about => 'About KorAP',
61 login => 'Login',
62 go => 'Go!',
Akron7716f012015-07-01 20:38:32 +020063 searchtitle => 'KorAP: Find »<%== $q %>« <% if (param("collection-name")) { %>in <%== param("collection-name") %><% } %> with <%== loc("QL_". $ql, "unknown query language") %>)',
Akroncddd1642015-06-10 21:31:53 +020064 searchplaceholder => 'Find ...',
65 in => 'in',
66 by => 'by',
67 with => 'with',
68 pubOn => 'published on',
69 matchCount => '<%= num($found, "match", "matches") %>',
70 noMatches => 'There were no matches for <code><%= stash("q") %></code>.',
71 notFound => '404 - Page not found',
72 glimpse => {
73 -short => 'Sample',
74 desc => 'Just show the first matches in arbitrary order'
75 },
76 faq => 'F.A.Q.',
77 underConstruction => 'Under Construction!',
78 tutorial => 'Tutorial',
79 korap => {
80 -short => 'KorAP',
81 desc => 'KorAP - Corpus Analysis Platform',
82 overview => 'KorAP - Overview'
Akron7716f012015-07-01 20:38:32 +020083 },
84 QL => {
85 poliqarp => 'Poliqarp',
86 cosmas2 => 'Cosmas II',
87 annis => 'Annis QL',
88 cql => 'CQL v1.2'
Akroncddd1642015-06-10 21:31:53 +020089 }
90 }
91};