| # Based on Mojolicious::Plugin::Number::Commify |
| my $THOUSAND_SEP_RE = qr/( |
| ^[-+]? # beginning of number. |
| \d+? # first digits before first comma |
| (?= # followed by, (but not included in the match) : |
| (?>(?:\d{3})+) # some positive multiple of three digits. |
| (?!\d) # an *exact* multiple, not x * 3 + 1 or whatever. |
| )| # or: |
| \G\d{3} # after the last group, get three digits |
| (?=\d) # but they have to have more digits after them. |
| )/x; |
| |
| { |
| _ => sub { $_->locale }, |
| de => { |
| numf => sub { |
| shift; |
| my %val = @_; |
| my $num = $val{number} or return 0; |
| $num =~ s/$THOUSAND_SEP_RE/$1\./g; |
| return $num; |
| }, |
| about => 'Über KorAP', |
| login => 'Anmelden', |
| searchtitle => 'KorAP: Finde "<%== $q %>" (<%= $ql %>)', |
| searchplaceholder => 'Finde ...', |
| go => 'Los!', |
| in => 'in', |
| by => 'von', |
| with => 'mit', |
| glimpse => { |
| -short => 'Stichprobe', |
| desc => 'Zeige nur die ersten Treffer in beliebiger Reihenfolge' |
| }, |
| faq => 'Häufige Fragen', |
| tutorial => 'Einführung', |
| pubOn => 'veröffentlicht am', |
| matchCount => 'Treffer', |
| noMatches => 'Es wurden keine Treffer für <code><%= stash("q") %></code> gefunden.', |
| notFound => '404 - Seite nicht gefunden', |
| jsFile => 'kalamar-<%= $Kalamar::VERSION %>-de.js', |
| underConstruction => 'In Vorbereitung!', |
| korap => { |
| -short => 'KorAP', |
| desc => 'KorAP - Korpusanalyseplattform der nächsten Generation', |
| overview => 'KorAP - Übersicht', |
| }, |
| template => { |
| intro => 'de/intro' |
| } |
| }, |
| -en => { |
| numf => sub { |
| shift; |
| my %val = @_; |
| my $num = $val{number} or return 0; |
| $num =~ s/$THOUSAND_SEP_RE/$1\,/g; |
| return $num; |
| }, |
| about => 'About KorAP', |
| login => 'Login', |
| go => 'Go!', |
| searchtitle => 'KorAP: Find "<%== $q %>" (<%= $ql %>)', |
| searchplaceholder => 'Find ...', |
| in => 'in', |
| by => 'by', |
| with => 'with', |
| pubOn => 'published on', |
| matchCount => '<%= num($found, "match", "matches") %>', |
| noMatches => 'There were no matches for <code><%= stash("q") %></code>.', |
| notFound => '404 - Page not found', |
| glimpse => { |
| -short => 'Sample', |
| desc => 'Just show the first matches in arbitrary order' |
| }, |
| faq => 'F.A.Q.', |
| underConstruction => 'Under Construction!', |
| tutorial => 'Tutorial', |
| korap => { |
| -short => 'KorAP', |
| desc => 'KorAP - Corpus Analysis Platform', |
| overview => 'KorAP - Overview' |
| } |
| } |
| }; |