Akron | cddd164 | 2015-06-10 21:31:53 +0200 | [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 | |
| 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', |
Akron | 43a7309 | 2016-02-11 21:52:27 +0100 | [diff] [blame] | 25 | searchjob => '»<%== $q %>« <% if (param("collection-name")) { %>in »<%== param("collection-name") %>«<% } elsif (param("collection")) { %>im definierten Korpus<% } %> mit <%== loc("QL_" . $ql, "unbekannter Anfragesprache") %>', |
Akron | 656c5d9 | 2015-11-13 21:17:03 +0100 | [diff] [blame] | 26 | searchtitle => 'KorAP: Finde <%== loc("searchjob") %>', |
Akron | cddd164 | 2015-06-10 21:31:53 +0200 | [diff] [blame] | 27 | searchplaceholder => 'Finde ...', |
| 28 | go => 'Los!', |
| 29 | in => 'in', |
| 30 | by => 'von', |
Akron | 189b359 | 2016-01-04 20:56:46 +0100 | [diff] [blame] | 31 | pwd => 'Passwort', |
| 32 | email => 'Email', |
Akron | cddd164 | 2015-06-10 21:31:53 +0200 | [diff] [blame] | 33 | with => 'mit', |
| 34 | glimpse => { |
| 35 | -short => 'Stichprobe', |
| 36 | desc => 'Zeige nur die ersten Treffer in beliebiger Reihenfolge' |
| 37 | }, |
| 38 | faq => 'Häufige Fragen', |
| 39 | tutorial => 'Einführung', |
| 40 | pubOn => 'veröffentlicht am', |
| 41 | matchCount => 'Treffer', |
Akron | 656c5d9 | 2015-11-13 21:17:03 +0100 | [diff] [blame] | 42 | noMatches => 'Es wurden keine Treffer für <%== loc("searchjob") %> gefunden.', |
Akron | cddd164 | 2015-06-10 21:31:53 +0200 | [diff] [blame] | 43 | notFound => '404 - Seite nicht gefunden', |
| 44 | jsFile => 'kalamar-<%= $Kalamar::VERSION %>-de.js', |
| 45 | underConstruction => 'In Vorbereitung!', |
| 46 | korap => { |
| 47 | -short => 'KorAP', |
| 48 | desc => 'KorAP - Korpusanalyseplattform der nächsten Generation', |
| 49 | overview => 'KorAP - Übersicht', |
| 50 | }, |
| 51 | template => { |
| 52 | intro => 'de/intro' |
| 53 | } |
| 54 | }, |
| 55 | -en => { |
Akron | 43a7309 | 2016-02-11 21:52:27 +0100 | [diff] [blame] | 56 | jsFile => 'kalamar-<%= $Kalamar::VERSION %>-en.js', |
Akron | cddd164 | 2015-06-10 21:31:53 +0200 | [diff] [blame] | 57 | numf => sub { |
| 58 | shift; |
| 59 | my %val = @_; |
| 60 | my $num = $val{number} or return 0; |
| 61 | $num =~ s/$THOUSAND_SEP_RE/$1\,/g; |
| 62 | return $num; |
| 63 | }, |
| 64 | about => 'About KorAP', |
| 65 | login => 'Login', |
| 66 | go => 'Go!', |
Akron | 43a7309 | 2016-02-11 21:52:27 +0100 | [diff] [blame] | 67 | searchjob => '»<%== $q %>« <% if (param("collection-name")) { %>in »<%== param("collection-name") %>«<% } elsif (param("collection")) { %>in the defined corpus<% } %> with <%== loc("QL_". $ql, "unknown query language") %>', |
Akron | 656c5d9 | 2015-11-13 21:17:03 +0100 | [diff] [blame] | 68 | searchtitle => 'KorAP: Find <%== loc("searchjob") %>', |
Akron | cddd164 | 2015-06-10 21:31:53 +0200 | [diff] [blame] | 69 | searchplaceholder => 'Find ...', |
| 70 | in => 'in', |
| 71 | by => 'by', |
Akron | 189b359 | 2016-01-04 20:56:46 +0100 | [diff] [blame] | 72 | pwd => 'Password', |
| 73 | email => 'Email', |
Akron | cddd164 | 2015-06-10 21:31:53 +0200 | [diff] [blame] | 74 | with => 'with', |
| 75 | pubOn => 'published on', |
Akron | cf29b22 | 2016-10-12 16:53:32 +0200 | [diff] [blame] | 76 | matchCount => '<%= quant($found, "match", "matches") %>', |
Akron | 656c5d9 | 2015-11-13 21:17:03 +0100 | [diff] [blame] | 77 | noMatches => 'There were no matches found for <%== loc("searchjob") %>.', |
Akron | cddd164 | 2015-06-10 21:31:53 +0200 | [diff] [blame] | 78 | notFound => '404 - Page not found', |
| 79 | glimpse => { |
| 80 | -short => 'Sample', |
| 81 | desc => 'Just show the first matches in arbitrary order' |
| 82 | }, |
| 83 | faq => 'F.A.Q.', |
| 84 | underConstruction => 'Under Construction!', |
| 85 | tutorial => 'Tutorial', |
| 86 | korap => { |
| 87 | -short => 'KorAP', |
| 88 | desc => 'KorAP - Corpus Analysis Platform', |
| 89 | overview => 'KorAP - Overview' |
Akron | 7716f01 | 2015-07-01 20:38:32 +0200 | [diff] [blame] | 90 | }, |
| 91 | QL => { |
| 92 | poliqarp => 'Poliqarp', |
| 93 | cosmas2 => 'Cosmas II', |
| 94 | annis => 'Annis QL', |
| 95 | cql => 'CQL v1.2' |
Akron | cddd164 | 2015-06-10 21:31:53 +0200 | [diff] [blame] | 96 | } |
| 97 | } |
| 98 | }; |