summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2016-01-16 09:49:06 +0100
committerYorhel <git@yorhel.nl>2016-01-16 09:50:20 +0100
commitca1a9c48c24a436babd30ad9e315db2781364879 (patch)
tree76061fd02d94e55e71b11d5115d8327df53119cb /lib
parent0f9b6a13621adfe7d7410bfecab86ab2ee85877c (diff)
L10N: Remove all translations
TODO: Intern strings again to simplify the code. The immediate effect of this commit is that starting the util/vndb.pl script and generating the JS file is much faster now and that vndb.pl uses less memory. Translations have already been disabled on the main VNDB for a week now.
Diffstat (limited to 'lib')
-rw-r--r--lib/VNDB/L10N.pm92
-rw-r--r--lib/VNDB/Util/LayoutHTML.pm7
2 files changed, 3 insertions, 96 deletions
diff --git a/lib/VNDB/L10N.pm b/lib/VNDB/L10N.pm
index edc22532..2e6a32bd 100644
--- a/lib/VNDB/L10N.pm
+++ b/lib/VNDB/L10N.pm
@@ -11,7 +11,7 @@ use warnings;
# used for the language switch interface, language tags must
# be the same as in the languages hash in global.pl
- sub languages { qw{ cs de en es hu it nl ru tr uk } }
+ sub languages { qw{ en } }
sub maketext {
my $r = eval { shift->SUPER::maketext(@_) };
@@ -126,95 +126,5 @@ use warnings;
sub br { return '<br />' }
}
-
-
-{
- package VNDB::L10N::cs;
- use base 'VNDB::L10N::en';
- our %Lexicon;
-
- sub quant {
- my($self, $num, $single, $couple, $lots) = @_;
- return $lots if ($num % 100) >= 11 && ($num % 100) <= 14;
- return $single if ($num % 10) == 1;
- return $couple if ($num % 10) >= 2 && ($num % 10) <= 4;
- return $lots;
- }
-}
-
-
-
-{
- package VNDB::L10N::de;
- use base 'VNDB::L10N::en';
- our %Lexicon;
-}
-
-
-
-{
- package VNDB::L10N::hu;
- use base 'VNDB::L10N::en';
- our %Lexicon;
-}
-
-
-
-{
- package VNDB::L10N::nl;
- use base 'VNDB::L10N::en';
- our %Lexicon;
-}
-
-
-
-{
- package VNDB::L10N::ru;
- use base 'VNDB::L10N::en';
- our %Lexicon;
-
- sub quant {
- my($self, $num, $single, $couple, $lots) = @_;
- return $single if ($num % 10) == 1 && ($num % 100) != 11;
- return $couple if ($num % 10) >= 2 && ($num % 10) <= 4 && !(($num % 100) >= 12 && ($num % 100) <= 14);
- return $lots;
- }
-}
-
-
-
-{
- package VNDB::L10N::uk;
- use base 'VNDB::L10N::en';
- our %Lexicon;
- *quant = \&VNDB::L10N::ru::quant;
-}
-
-
-
-{
- package VNDB::L10N::es;
- use base 'VNDB::L10N::en';
- our %Lexicon;
-}
-
-
-
-{
- package VNDB::L10N::it;
- use base 'VNDB::L10N::en';
- our %Lexicon;
-}
-
-
-
-{
- package VNDB::L10N::tr;
- use base 'VNDB::L10N::en';
- our %Lexicon;
-}
-
-
-
1;
diff --git a/lib/VNDB/Util/LayoutHTML.pm b/lib/VNDB/Util/LayoutHTML.pm
index f2344fc5..42b582e8 100644
--- a/lib/VNDB/Util/LayoutHTML.pm
+++ b/lib/VNDB/Util/LayoutHTML.pm
@@ -18,7 +18,7 @@ sub htmlHeader { # %options->{ title, noindex, search, feeds, svg }
# heading
lit '<!DOCTYPE HTML>';
- tag 'html', lang => $self->{l10n}->language_tag();
+ tag 'html', lang => 'en';
head;
title $o{title};
Link rel => 'shortcut icon', href => '/favicon.ico', type => 'image/x-icon';
@@ -53,9 +53,6 @@ sub _menu {
div class => 'menubox';
h2;
- a href => "#", id => 'lang_select';
- cssicon "lang ".$self->{l10n}->language_tag(), mt "_lang_".$self->{l10n}->language_tag();
- end;
txt mt '_menu';
end;
div;
@@ -160,7 +157,7 @@ sub htmlFooter { # %options => { pref_code => 1 }
# Abuse an empty noscript tag for the formcode to update a preference setting, if the page requires one.
noscript id => 'pref_code', title => $self->authGetCode('/xml/prefs.xml'), ''
if $o{pref_code} && $self->authInfo->{id};
- script type => 'text/javascript', src => $self->{url_static}.'/f/js/'.$self->{l10n}->language_tag().'.js?'.$self->{version}, '';
+ script type => 'text/javascript', src => $self->{url_static}.'/f/js/en.js?'.$self->{version}, '';
end 'body';
end 'html';