Changes imported from DeReKo-KorAP-Release 2026-I on instance-main-docker
Change-Id: Ia1ffa2c6bfcf17cdea02febae91404cd76dda6f5
diff --git a/kalamar.ids-mannheim.conf b/kalamar.ids-mannheim.conf
index 36890b0..e61bfda 100644
--- a/kalamar.ids-mannheim.conf
+++ b/kalamar.ids-mannheim.conf
@@ -1,20 +1,19 @@
use Mojo::ByteStream 'b';
-$main::ENV{MOJO_MAX_LINE_SIZE} = 65536;
+# $main::ENV{MOJO_MAX_LINE_SIZE} = 65536;
-my $api = 'http://10.0.10.51:9000/api/';
{
- Search => {
- engine => 'Kalamar::API'
- },
'Kalamar-Auth' => {
- client_id => b($app->home->child('.client_id')->slurp)->trim,
- client_secret => b($app->home->child('.client_secret')->slurp)->trim,
+ # client_id => b($app->home->child('.client_id')->slurp)->trim,
+ # client_secret => b($app->home->child('.client_secret')->slurp)->trim,
+ # Optimized for docker usage:
+ client_file => '/kalamar/super_client_info',
oauth2 => 1,
experimental_client_registration => 1
},
Kalamar => {
- api_path => $api,
+ # Removed for docker compliance
+ # api_path => 'http://10.0.10.51:9000/api/',
log_path => $app->home . '/log',
secure_cookie => 1,
https_only => 1,
@@ -56,13 +55,17 @@
"id" => "news"
},
],
+ defaults => {
+ alignment => 'center' # or 'right' or 'center'
+ },
},
CSP => {
'frame-src' => 'self',
'frame-ancestors' => ['self','http://*.ids-mannheim.de/','https://*.ids-mannheim.de/','http://klinux10/']
},
'Kalamar-Plugins' => {
- default_plugins => 'default.plugins.json'
+ # Optimized for docker usage:
+ default_plugins => '/kalamar/default.plugins.json'
},
Piwik => {
url => 'https://stats.ids-mannheim.de',
@@ -76,12 +79,8 @@
inactivity_timeout => 120,
proxy => 1
},
- MailException => {
- from => join('@', 'diewald', 'ids-mannheim.de'),
- to => join('@', 'diewald', 'ids-mannheim.de'),
- subject => '[KorAP] Kalamar crashed'
- },
Localize => {
+ override => 1,
dict => {
de_loginExplanation => 'Anmeldung mit einem registrierten <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %>-Konto',
en_loginExplanation => 'Login with a registered <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %> account',
@@ -89,6 +88,8 @@
de_Nav_privacy => 'Datenschutz',
de_Nav_corpora => 'Korpora',
en_Nav_corpora => 'Corpora',
+ de_Nav_corpus => 'Korpus',
+ en_Nav_corpus => 'Corpus',
en_howToCite => 'Citation Help',
de_howToCite => 'Zitierhilfe',
en_recentCorpusPub => 'Recent publications to refer to DeReKo as linguistic research data',
@@ -101,8 +102,8 @@
en_currentdb => 'Current data set: Virtual corpus <%= t code => stash("vc") %>',
de_compositionbysource => 'Zusammensetzung nach Quelle',
en_compositionbysource => 'Composition by source',
- de_Title_composition => 'Korpus-Zusammensetzung',
- en_Title_composition => 'Corpus Composition',
+ #de_Title_composition => 'Korpus-Zusammensetzung',
+ #en_Title_composition => 'Corpus Composition',
en_Nav_composition => 'Composition',
de_Nav_composition => 'Zusammensetzung',
en_Nav_useful_subcorpora => 'Useful subcorpora',
@@ -118,6 +119,10 @@
position => 70
},
{
+ inline => '<%= link_to loc("news") => url_for(doc => {page => "news" }) %>',
+ position => 72
+ },
+ {
inline => '<%= link_to loc("howToCite") => url_for(doc => { page => "faq", scope => undef })->fragment("howToCite") %>',
position => 75
},
@@ -158,26 +163,26 @@
}
]
},
-
# See Mojolicious::Plugin::CHI
- CHI => {
- default => {
- driver => 'FastMmap',
- root_dir => app->home . '/cache/data',
- cache_size => '500m',
- max_size => '500m'
- },
- user => {
- l1_cache => {
- driver => 'FastMmap',
- root_dir => app->home . '/cache/usermap',
- cache_size => '50m',
- max_size => '50m'
- },
- driver => 'File',
- root_dir => app->home . '/cache/userfile',
- max_key_length => 64,
- max_size => '500m'
- }
- }
+ # Could be optimized to use the data folder in docker scenarios:
+# CHI => {
+# default => {
+# driver => 'FastMmap',
+# root_dir => app->home . '/cache/data',
+# cache_size => '500m',
+# max_size => '500m'
+# },
+# user => {
+# l1_cache => {
+# driver => 'FastMmap',
+# root_dir => app->home . '/cache/usermap',
+# cache_size => '50m',
+# max_size => '50m'
+# },
+# driver => 'File',
+# root_dir => app->home . '/cache/userfile',
+# max_key_length => 64,
+# max_size => '500m'
+# }
+# }
};
\ No newline at end of file
diff --git a/templates/custom/doc/corpus.html.ep b/templates/custom/doc/corpus.html.ep
index 4751515..b343873 100644
--- a/templates/custom/doc/corpus.html.ep
+++ b/templates/custom/doc/corpus.html.ep
@@ -1,11 +1,13 @@
% layout 'main', title => 'KorAP: ' . loc('Nav_corpus');
% my $corpus = 'DeReKo-KorAP-2026-I';
%= page_title
+
<style>
section { max-width: 50em; }
dl dt { margin-top: 1em; font-weight: bold; }
dl dd { margin-left: 1.5em; }
</style>
+
<section>
% my $lang = c(@{$c->localize->locale})->first(qr!^(?i:de|en)$!) // 'en';
% if ($lang eq 'de') {
diff --git a/templates/custom/doc/corpus/composition.html.ep b/templates/custom/doc/corpus/composition.html.ep
index 61906c1..f43886f 100644
--- a/templates/custom/doc/corpus/composition.html.ep
+++ b/templates/custom/doc/corpus/composition.html.ep
@@ -1,5 +1,7 @@
-% layout 'main', title => 'KorAP: ' . loc('Title_composition');
+% layout 'main', title => loc('Nav_corpus') . ': ' . loc('Nav_composition');
+
%= page_title
+
<section>
<h3>DeReKo-KorAP-2026-I</h3>
<iframe src="https://korap.ids-mannheim.de/data/dereko-korap-2026-I.html" sandbox="allow-forms allow-same-origin allow-scripts allow-popups" style="position: relative; border-width: 0; min-height: 90vh" height="90%" width="100%"></iframe>
diff --git a/templates/custom/doc/corpus/named_vc.html.ep b/templates/custom/doc/corpus/named_vc.html.ep
index 6023ea8..d9fa061 100644
--- a/templates/custom/doc/corpus/named_vc.html.ep
+++ b/templates/custom/doc/corpus/named_vc.html.ep
@@ -1,5 +1,12 @@
-% layout 'main', title => 'KorAP: ' . loc('Nav_named_vc');
+% layout 'main', title => loc('Nav_corpus') . ': ' . loc('Nav_named_vc');
+
%= page_title
<section>
+% my $lang = $c->localize->preference;
+% if ($lang eq 'de') {
+<p>Persistent definierte, in der Regel auch über COSMAS II zugängliche virtuelle Subkorpora.</p>
+% } else {
+<p>Persistently defined virtual subcorpora, usually also accessible via COSMAS II.</p>
+% }
<iframe src="https://korap.ids-mannheim.de/data/named_vc.html" sandbox="allow-forms allow-same-origin allow-scripts allow-popups" style="position: relative; border-width: 0; min-height: 90vh" height="90%" width="100%"></iframe>
</section>
diff --git a/templates/custom/doc/corpus/useful_subcorpora.html.ep b/templates/custom/doc/corpus/useful_subcorpora.html.ep
index edd7120..8b4440c 100644
--- a/templates/custom/doc/corpus/useful_subcorpora.html.ep
+++ b/templates/custom/doc/corpus/useful_subcorpora.html.ep
@@ -1,7 +1,9 @@
-% layout 'main', title => 'KorAP: ' . loc('Nav_useful_subcorpora');
+% layout 'main', title => loc('Nav_corpus') . ': ' . loc('Nav_useful_subcorpora');
+
%= page_title
+
<section>
-% my $lang = c(@{$c->localize->locale})->first(qr!^(?i:de|en)$!) // 'en';
+% my $lang = $c->localize->preference;
% if ($lang eq 'de') {
<iframe src="https://korap.ids-mannheim.de/data/useful_dereko_corpora.html" sandbox="allow-forms allow-same-origin allow-scripts allow-popups" style="position: relative; border-width: 0; min-height: 90vh" height="90%" width="100%"></iframe>
% } else {
diff --git a/templates/custom/partial/citation.html.ep b/templates/custom/partial/citation.html.ep
index 70de637..4635843 100644
--- a/templates/custom/partial/citation.html.ep
+++ b/templates/custom/partial/citation.html.ep
@@ -1,7 +1,7 @@
<section>
<h4><%= loc 'recentCorpusPub' %></h4>
- <p class="bibentry">IDS (2023): <cite><a href="https://www.ids-mannheim.de/digspra/kl/projekte/korpora/">Deutsches Referenzkorpus / Archiv der Korpora geschriebener Gegenwartssprache</a></cite> 2023-I (Release vom 31.03.2023).<br />Mannheim: Leibniz-Institut für Deutsche Sprache.
+ <p class="bibentry">IDS (2026): <cite><a href="https://www.ids-mannheim.de/digspra/kl/projekte/korpora/">Deutsches Referenzkorpus / Archiv der Korpora geschriebener Gegenwartssprache</a></cite> 2026-I (Release vom 19.01.2026).<br />Mannheim: Leibniz-Institut für Deutsche Sprache.
</p>
<p class="bibentry">Kupietz, Marc/Lüngen, Harald/Diewald, Nils (2023): <cite><a href="https://nbn-resolving.org/urn:nbn:de:bsz:mh39-115951">Das Gesamtkonzept des Deutschen Referenzkorpus DeReKo. Vom Design bis zur Verwendung und darüber hinaus</a></cite><br/>In: Deppermann, Arnulf/Fandrych, Christian/Kupietz, Marc/Schmidt, Thomas (Hrsg.): Korpora in der germanistischen Sprachwissenschaft. Mündlich, schriftlich, multimedial. Jahrbuch des Instituts für Deutsche Sprache 2022. (= Jahrbuch des Instituts für Deutsche Sprache 2022). Berlin/Boston: de Gruyter, 1-28.