summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-08-15 15:19:35 +0200
committerYorhel <git@yorhel.nl>2009-08-17 16:27:14 +0200
commit23ccb76f75433c49c79c7d45f0e7c9716251a4ab (patch)
treee4cb7503b72deff837a17dd55b3bb04644a4223f /lib
parentc000490dcdf208e235a05358668dbb6fb70d5168 (diff)
L10N: Russian TL for site title and main menu
Things are looking good so far.
Diffstat (limited to 'lib')
-rw-r--r--lib/VNDB/Handler/Misc.pm4
-rw-r--r--lib/VNDB/L10N.pm9
-rw-r--r--lib/VNDB/Util/LayoutHTML.pm22
3 files changed, 21 insertions, 14 deletions
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;