# 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',
    register => 'Registrieren',
    pwdforgotten => 'Password vergessen?',
    searchjob => '»<%== $q %>« <% if (param("collection-name")) { %>in »<%== param("collection-name") %>«<% } elsif (param("collection")) { %>im definierten Korpus<% } %> mit <%== loc("QL_" . $ql, "unbekannter Anfragesprache") %>',
    searchtitle => 'KorAP: Finde <%== loc("searchjob") %>',
    searchplaceholder => 'Finde ...',
    go => 'Los!',
    in => 'in',
    by => 'von',
    pwd => 'Passwort',
    email => 'Email',
    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 <%== loc("searchjob") %> 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 => {
    jsFile => 'kalamar-<%= $Kalamar::VERSION %>-en.js',
    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',
    register => 'Register',
    pwdforgotten => 'Password forgotten?',
    go => 'Go!',
    searchjob => '»<%== $q %>« <% if (param("collection-name")) { %>in »<%== param("collection-name") %>«<% } elsif (param("collection")) { %>in the defined corpus<% } %> with <%== loc("QL_". $ql, "unknown query language") %>',
    searchtitle => 'KorAP: Find <%== loc("searchjob") %>',
    searchplaceholder => 'Find ...',
    in => 'in',
    by => 'by',
    pwd => 'Password',
    email => 'Email',
    with => 'with',
    pubOn => 'published on',
    matchCount => '<%= quant($found, "match", "matches") %>',
    noMatches => 'There were no matches found for <%== loc("searchjob") %>.',
    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'
    },
    QL => {
      poliqarp => 'Poliqarp',
      cosmas2 => 'Cosmas II',
      annis => 'Annis QL',
      cql => 'CQL v1.2'
    }
  }
};
