Lots of fixes to pagination, l10n, tutorial, css ...
diff --git a/kalamar.conf b/kalamar.conf
index 2375936..ae026dc 100644
--- a/kalamar.conf
+++ b/kalamar.conf
@@ -1,6 +1,17 @@
+# 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:8888/api/v0.1/'
'api-0.1' => 'http://10.0.10.13:7070/api/v0.1/'
},
Notifications => {
@@ -14,11 +25,6 @@
api => 'http://10.0.10.13:7070/api/v0.1/'
},
CHI => {
-# session_cache => {
-# driver => 'FastMmap',
-# root_dir => app->home . '/cache/session',
-# cache_size => '3m'
-# },
default => {
driver => 'FastMmap',
root_dir => app->home . '/cache/data',
@@ -32,17 +38,24 @@
proxy => 1
},
'TagHelpers-Pagination' => {
- prev => '<span><i class="fa fa-caret-left"></i></span>',
- next => '<span><i class="fa fa-caret-right"></i></span>',
- ellipsis => '<span><i class="fa fa-ellipsis-h"></i></span>',
+ prev => '<span><span><</span></span>',
+ next => '<span><span><</span></span>',
+ ellipsis => '<a class="ellipsis"><span><span>...</span></span></a>',
separator => '',
- current => '<span>{current}</span>',
- page => '<span>{page}</span>'
+ 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 %>)',
@@ -56,14 +69,25 @@
tutorial => 'Einführung',
pubOn => 'veröffentlicht am',
matchCount => 'Treffer',
+ noMatches => 'Es wurden keine Treffer für <code><%= stash("q") %></code> gefunden.',
jsFile => 'kalamar-<%= $Kalamar::VERSION %>-en.js',
korap => {
-short => 'KorAP',
- long => 'KorAP - Korpusanalyseplattform der nächsten Generation',
+ 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!',
@@ -74,13 +98,14 @@
with => 'with',
pubOn => 'published on',
matchCount => '<%= num($found, "match", "matches") %>',
+ noMatches => 'There were no matches for <code><%= stash("q") %></code>.',
glimpse => 'Sample',
faq => 'F.A.Q.',
tutorial => 'Tutorial',
jsFile => 'kalamar-<%= $Kalamar::VERSION %>-en.js',
korap => {
-short => 'KorAP',
- long => 'KorAP - Corpus Analysis Platform',
+ desc => 'KorAP - Corpus Analysis Platform',
overview => 'KorAP - Overview'
}
}