# 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',
    logout => 'Abmelden',
    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',
    userormail => 'Benutzername oder 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!',
    loginExplanation => 'Anmeldung mit einem registrierten Cosmas-II-Konto',
    korap => {
      -short => 'KorAP',
      desc => 'KorAP - Korpusanalyseplattform der nächsten Generation',
      overview => 'KorAP - Übersicht',
    },
    template => {
      intro => 'de/intro'
    },
    Auth => {
      loginSuccess => 'Anmeldung erfolgreich',
      loginFail => 'Anmeldung fehlgeschlagen',
      logoutSuccess => 'Abmeldung erfolgreich',
      logoutFail => 'Abmeldung fehlgeschlagen'
    },
    Template => {
      doc => {
        ql => {
          'poliqarp-plus' => 'de/doc/ql/poliqarp-plus'
        }
      }
    }
  },
  -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',
    logout => 'Abmelden',
    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',
    userormail => 'Username or 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!',
    loginExplanation => 'Login with a registered Cosmas-II account',
    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'
    },
    Auth => {
      loginSuccess => 'Login successful',
      loginFail => 'Access denied',
      logoutSuccess => 'Logout successful',
      logoutFail => 'Logout failed'
    },
    Template => {
      doc => {
        ql => {
#          'annis' => 'doc/ql/annis',
#          'cosmas-2' => 'doc/ql/cosmas-2',
#          'cql' => 'doc/ql/cql',
          'poliqarp-plus' => 'doc/ql/poliqarp-plus',
#          'regexp' => 'doc/ql/regexp',
#          'wildcards' => 'doc/ql/wildcards'
        }
      }
    }
  }
};
