# 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;

{
  Kalamar => {
    'api-0.1' => 'http://10.0.10.13:7070/api/v0.1/'
  },
  Notifications => {
    Alertify => {
      base_timeout => 10_000
    },
    JSON => 1
  },
  Search => {
    engine => 'Kalamar::API',
    api => 'http://10.0.10.13:7070/api/v0.1/'
  },
  CHI => {
    default => {
      driver => 'FastMmap',
      root_dir => app->home . '/cache/data',
      cache_size => '12m'
    }
  },
  hypnotoad => {
    listen => ['http://*:6666', 'http://*:5555'],
    workers => 5,
    inactivity_timeout => 120,
    proxy => 1
  },
  'TagHelpers-Pagination' => {
    prev      => '<span><span>&lt;</span></span>',
    next      => '<span><span>&lt;</span></span>',
    ellipsis  => '<a class="ellipsis"><span><span>...</span></span></a>',
    separator => '',
    current   => '<span>{current}</span>',
    page      => '<span>{page}</span>'
  },
  Localize => {
    dict => {
      _ => 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 => 'Stichprobe',
	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 => 'Sample',
	faq => 'F.A.Q.',
	underConstruction => 'Under Construction!',
	tutorial => 'Tutorial',
	korap => {
	  -short => 'KorAP',
	  desc => 'KorAP - Corpus Analysis Platform',
	  overview => 'KorAP - Overview'
	}
      }
    }
  },
  MailException => {
    from => join('@', 'korap', 'ids-mannheim.de'),
    to => join('@', 'korap', 'ids-mannheim.de'),
    subject => '[KorAP] Testbed crashed'
  },
  # Doesn't make much sense when published, but who cares ...
  'TagHelpers-MailToChiffre' => {
    method_name => 'PArok',
    pattern_rotate => 673
  }
}
