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