summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-08-15 17:29:42 +0200
committerYorhel <git@yorhel.nl>2009-08-17 16:27:15 +0200
commit9e0d927405b2eb82b7f518fa1f7f28b3fa1e53ca (patch)
tree6db85729ad5d20bc78484044be0ecb4d971184d9
parent23ccb76f75433c49c79c7d45f0e7c9716251a4ab (diff)
L10N: Converted everything in Util::LayoutHTML and use non-English keys
I just can't believe using the English text as keys actually works, English is useless without context.
-rw-r--r--data/lang.txt135
-rw-r--r--lib/VNDB/Util/LayoutHTML.pm66
2 files changed, 153 insertions, 48 deletions
diff --git a/data/lang.txt b/data/lang.txt
index 0f6ace6a..1a46fe97 100644
--- a/data/lang.txt
+++ b/data/lang.txt
@@ -40,6 +40,10 @@ indicate that it has been checked.
/intro
+#############################################################################
+## Main website layout ##
+#############################################################################
+
# Main title of the site, used on header of each page and as title on the homepage
:The Visual Novel Database
@@ -48,37 +52,146 @@ ru : База Данных Интерактивных Новелл
# Main menu
-:Menu
+:_menu
+en : Menu
ru : Меню
-:Home
+:_menu_home
+en : Home
ru : Домой
-:Visual novels
+:_menu_vn
+en : Visual novels
ru : Интерактивные новеллы
-:Releases
+:_menu_releases
+en : Releases
ru : Выпуски
-:Producers
+:_menu_producers
+en : Producers
ru : Издатели
-:Tags
+:_menu_tags
+en : Tags
ru : Тэги
-:Users
+:_menu_users
+en : Users
ru : Пользователи
-:Recent changes
+:_menu_recent_changes
+en : Recent changes
ru : Последние изменения
-:Discussion board
+:_menu_discussion_board
+en : Discussion board
ru : Форум
-:FAQ
+:_menu_faq
+en : FAQ
ru : ЧаВо
-:webchat
+:_menu_webchat
+en : webchat
ru : Веб-чат
+:_menu_emptysearch
+en : search
+ru*:
+
+
+
+# User menu
+
+:_menu_myprofile
+en : My Profile
+ru*:
+
+:_menu_myvnlist
+en : My Visual Novel List
+ru*:
+
+:_menu_mywishlist
+en : My Wishlist
+ru*:
+
+# [_1] = number of messages
+:_menu_mymessages
+en : My Messages ([_1])
+ru*:
+
+:_menu_mychanges
+en : My Recent Changes
+ru*:
+
+:_menu_mytags
+en : My Tags
+ru*:
+
+:_menu_addvn
+en : Add Visual Novel
+ru*:
+
+:_menu_addproducer
+en : Add Producer
+ru*:
+
+:_menu_logout
+en : Logout
+ru*:
+
+# used for both the box title and submit button
+:_menu_login
+en : Login
+ru*:
+
+# HTML
+:_menu_loginmsg
+en : Need to <a href="[_1]">register</a>,<br />
+ or <a href="[_2]">forgot your password</a>?
+ru*:
+
+
+# database statistics
+
+:_menu_dbstats
+en : Database Statistics
+ru*:
+
+:_menu_stat_vn
+en : Visual Novels
+ru*:
+
+:_menu_stat_releases
+en : Releases
+ru*:
+
+:_menu_stat_producers
+en : Producers
+ru*:
+
+:_menu_stat_users
+en : Users
+ru*:
+
+:_menu_stat_threads
+en : Threads
+ru*:
+
+:_menu_stat_posts
+en : Posts
+ru*:
+
+
+# Footer
+
+:_footer_aboutus
+en : abous us
+ru*:
+
+:_footer_source
+en : source
+ru*:
+
diff --git a/lib/VNDB/Util/LayoutHTML.pm b/lib/VNDB/Util/LayoutHTML.pm
index 7b908ee1..e0333b93 100644
--- a/lib/VNDB/Util/LayoutHTML.pm
+++ b/lib/VNDB/Util/LayoutHTML.pm
@@ -62,25 +62,25 @@ sub _menu {
end;
}
end;
- txt mt 'Menu';
+ txt mt '_menu';
end;
div;
- 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 => '/', mt '_menu_home'; br;
+ a href => '/v/all', mt '_menu_vn'; br;
+ a href => '/r', mt '_menu_releases'; br;
+ a href => '/p/all', mt '_menu_producers'; br;
+ a href => '/g', mt '_menu_tags'; br;
+ a href => '/u/all', mt '_menu_users'; br;
+ a href => '/hist', mt '_menu_recent_changes'; br;
+ a href => '/t', mt '_menu_discussion_board'; br;
+ a href => '/d6', mt '_menu_faq'; br;
a href => 'irc://irc.synirc.net/vndb', '#vndb';
- lit ' (<a href="http://cgiirc.synirc.net/?chan=%23vndb">'.mt('webchat').'</a>)';
+ lit ' (<a href="http://cgiirc.synirc.net/?chan=%23vndb">'.mt('_menu_webchat').'</a>)';
end;
form action => '/v/all', method => 'get', id => 'search';
fieldset;
legend 'Search';
- input type => 'text', class => 'text', id => 'sq', name => 'sq', value => $o{search}||'search';
+ input type => 'text', class => 'text', id => 'sq', name => 'sq', value => $o{search}||mt('_menu_emptysearch');
input type => 'submit', class => 'submit', value => 'Search';
end;
end;
@@ -91,24 +91,25 @@ sub _menu {
my $uid = sprintf '/u%d', $self->authInfo->{id};
h2;
a href => $uid, ucfirst $self->authInfo->{username};
+ # note: user ranks aren't TL'ed (but might be in the future, hmm)
txt ' ('.$self->{user_ranks}[$self->authInfo->{rank}][0].')';
end;
div;
- a href => "$uid/edit", 'My Profile'; br;
- a href => "$uid/list", 'My Visual Novel List'; br;
- a href => "$uid/wish", 'My Wishlist'; br;
- a href => "/t$uid", sprintf 'My Messages (%d)', $self->authInfo->{mymessages}; br;
- a href => "$uid/hist", 'My Recent Changes'; br;
- a href => "$uid/tags", 'My Tags'; br;
+ a href => "$uid/edit", mt '_menu_myprofile'; br;
+ a href => "$uid/list", mt '_menu_myvnlist'; br;
+ a href => "$uid/wish", mt '_menu_mywishlist'; br;
+ a href => "/t$uid", mt '_menu_mymessages', $self->authInfo->{mymessages}; br;
+ a href => "$uid/hist", mt '_menu_mychanges'; br;
+ a href => "$uid/tags", mt '_menu_mytags'; br;
br;
- a href => '/v/new', 'Add Visual Novel'; br;
- a href => '/p/new', 'Add Producer'; br;
+ a href => '/v/new', mt '_menu_addvn'; br;
+ a href => '/p/new', mt '_menu_addproducer'; br;
br;
- a href => '/u/logout', 'Logout';
+ a href => '/u/logout', mt '_menu_logout';
end;
} else {
h2;
- a href => '/u/login', 'Login';
+ a href => '/u/login', mt '_menu_login';
end;
div;
form action => '/nospam?/u/login', id => 'loginform', method => 'post';
@@ -116,32 +117,23 @@ sub _menu {
legend 'Login';
input type => 'text', class => 'text', id => 'username', name => 'usrname';
input type => 'password', class => 'text', id => 'userpass', name => 'usrpass';
- input type => 'submit', class => 'submit', value => 'Login';
+ input type => 'submit', class => 'submit', value => mt '_menu_login';
end;
end;
p;
- lit 'Need to <a href="/u/register">register</a>,<br />';
- lit 'or <a href="/u/newpass">forgot your password?</a>';
+ lit mt '_menu_loginmsg', '/u/register', '/u/newpass';
end;
end;
}
end;
- my @stats = (
- [ vn => 'Visual Novels' ],
- [ releases => 'Releases' ],
- [ producers => 'Producers' ],
- [ users => 'Users' ],
- [ threads => 'Threads' ],
- [ posts => 'Posts' ],
- );
div class => 'menubox';
- h2 'Database Statistics';
+ h2 mt '_menu_dbstats';
div;
dl;
- for (@stats) {
- dt $$_[1];
- dd $self->{stats}{$$_[0]};
+ for (qw|vn releases producers users threads posts|) {
+ dt mt "_menu_stat_$_";
+ dd $self->{stats}{$_};
}
end;
clearfloat;