summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/global.pl1
-rw-r--r--data/lang.txt41
-rw-r--r--lib/VNDB/Handler/Misc.pm4
-rw-r--r--lib/VNDB/L10N.pm9
-rw-r--r--lib/VNDB/Util/LayoutHTML.pm22
-rwxr-xr-xutil/vndb.pl8
6 files changed, 65 insertions, 20 deletions
diff --git a/data/global.pl b/data/global.pl
index 5f9ba892..13a0c926 100644
--- a/data/global.pl
+++ b/data/global.pl
@@ -17,7 +17,6 @@ our %S = (%S,
version => `cd $VNDB::ROOT; git describe` =~ /^(.+)$/ && $1,
url => 'http://vndb.org',
url_static => 'http://s.vndb.org',
- site_title => 'Yet another VNDB clone',
skin_default => 'angel',
cookie_domain => '.vndb.org',
global_salt => 'any-private-string-here',
diff --git a/data/lang.txt b/data/lang.txt
index eb6774b8..0f6ace6a 100644
--- a/data/lang.txt
+++ b/data/lang.txt
@@ -40,6 +40,45 @@ indicate that it has been checked.
/intro
+
+# Main title of the site, used on header of each page and as title on the homepage
+:The Visual Novel Database
+ru : База Данных Интерактивных Новелл
+
+
+# Main menu
+
:Menu
-ru : ~[Menu in russian~]
+ru : Меню
+
+:Home
+ru : Домой
+
+:Visual novels
+ru : Интерактивные новеллы
+
+:Releases
+ru : Выпуски
+
+:Producers
+ru : Издатели
+
+:Tags
+ru : Тэги
+
+:Users
+ru : Пользователи
+
+:Recent changes
+ru : Последние изменения
+
+:Discussion board
+ru : Форум
+
+:FAQ
+ru : ЧаВо
+
+:webchat
+ru : Веб-чат
+
diff --git a/lib/VNDB/Handler/Misc.pm b/lib/VNDB/Handler/Misc.pm
index 8cbe2ed9..6033b97d 100644
--- a/lib/VNDB/Handler/Misc.pm
+++ b/lib/VNDB/Handler/Misc.pm
@@ -36,10 +36,10 @@ YAWF::register(
sub homepage {
my $self = shift;
- $self->htmlHeader(title => $self->{site_title});
+ $self->htmlHeader(title => mt 'The Visual Novel Database');
div class => 'mainbox';
- h1 $self->{site_title};
+ h1 mt 'The Visual Novel Database';
p class => 'description';
lit qq|
VNDB.org strives to be a comprehensive database for information about visual novels and
diff --git a/lib/VNDB/L10N.pm b/lib/VNDB/L10N.pm
index 5540c710..d71a72dc 100644
--- a/lib/VNDB/L10N.pm
+++ b/lib/VNDB/L10N.pm
@@ -12,6 +12,13 @@ use warnings;
# be the same as in the languages hash in global.pl
sub languages { ('en', 'ru') }
+ sub maketext {
+ my $r = eval { shift->SUPER::maketext(@_) };
+ return $r if defined $r;
+ warn "maketext failed for '@_': $@\n";
+ return $_[0]||''; # not quite sure we want this
+ }
+
# can be called as either a subroutine or a method
sub loadfile {
my %lang = (
@@ -60,7 +67,7 @@ use warnings;
next;
}
# something we didn't expect
- die "Don't know what to do with line $line\n";
+ die "Don't know what to do with line $line\n" unless /^([a-z_-]{2,7})[ *]:/;
}
close $F;
diff --git a/lib/VNDB/Util/LayoutHTML.pm b/lib/VNDB/Util/LayoutHTML.pm
index a932c5a1..7b908ee1 100644
--- a/lib/VNDB/Util/LayoutHTML.pm
+++ b/lib/VNDB/Util/LayoutHTML.pm
@@ -38,7 +38,7 @@ sub htmlHeader { # %options->{ title, js, noindex, search }
div id => 'bgright', ' ';
div id => 'header';
h1;
- a href => '/', lc $self->{site_title};
+ a href => '/', lc mt 'The Visual Novel Database';
end;
end;
@@ -65,17 +65,17 @@ sub _menu {
txt mt 'Menu';
end;
div;
- a href => '/', 'Home'; br;
- a href => '/v/all', 'Visual novels'; br;
- a href => '/r', 'Releases'; br;
- a href => '/p/all', 'Producers'; br;
- a href => '/g', 'Tags'; br;
- a href => '/u/all', 'Users'; br;
- a href => '/hist', 'Recent changes'; br;
- a href => '/t', 'Discussion board'; br;
- a href => '/d6', 'FAQ'; br;
+ a href => '/', mt 'Home'; br;
+ a href => '/v/all', mt 'Visual novels'; br;
+ a href => '/r', mt 'Releases'; br;
+ a href => '/p/all', mt 'Producers'; br;
+ a href => '/g', mt 'Tags'; br;
+ a href => '/u/all', mt 'Users'; br;
+ a href => '/hist', mt 'Recent changes'; br;
+ a href => '/t', mt 'Discussion board'; br;
+ a href => '/d6', mt 'FAQ'; br;
a href => 'irc://irc.synirc.net/vndb', '#vndb';
- lit ' (<a href="http://cgiirc.synirc.net/?chan=%23vndb">webchat</a>)';
+ lit ' (<a href="http://cgiirc.synirc.net/?chan=%23vndb">'.mt('webchat').'</a>)';
end;
form action => '/v/all', method => 'get', id => 'search';
fieldset;
diff --git a/util/vndb.pl b/util/vndb.pl
index b7c83393..ed74a92f 100755
--- a/util/vndb.pl
+++ b/util/vndb.pl
@@ -28,14 +28,14 @@ our(%O, %S);
$S{skins} = readskins();
-# load settings from global.pl
-require $ROOT.'/data/global.pl';
-
-
# load lang.dat
VNDB::L10N::loadfile();
+# load settings from global.pl
+require $ROOT.'/data/global.pl';
+
+
YAWF::init(
%O,
namespace => 'VNDB',