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