Browse Source

+ CMTD::I18N::*

master
Alex 'AdUser' Z 7 years ago
parent
commit
8ca0ff513b
  1. 1
      lib/CMTD.pm
  2. 9
      lib/CMTD/I18N.pm
  3. 11
      lib/CMTD/I18N/en.pm
  4. 21
      lib/CMTD/I18N/ru.pm

1
lib/CMTD.pm

@ -10,6 +10,7 @@ sub startup {
$self->plugin('CMTD::Helpers');
$self->plugin(Config => {file => 'cmtd.conf'});
$self->plugin(I18N => {namespace => 'CMTD::I18N', default => 'en'});
if (my $s = $self->app->config->{secret}) {
$self->app->secrets([ $s ]);
} else {

9
lib/CMTD/I18N.pm

@ -0,0 +1,9 @@
package CMTD::I18N;
use strict;
use warnings;
use utf8;
use Mojo::Base 'Locale::Maketext';
1;

11
lib/CMTD/I18N/en.pm

@ -0,0 +1,11 @@
package CMTD::I18N::en;
use strict
use warnings;
use utf8;
use Mojo::Base 'CMTD::I18N';
our %Lexicon = ( _AUTO => 1 );
1;

21
lib/CMTD/I18N/ru.pm

@ -0,0 +1,21 @@
package CMTD::I18N::ru;
use strict;
use warnings;
use utf8;
use Mojo::Base 'CMTD::I18N';
our %Lexicon = (
_AUTO => 1, # enable fallback
Comments => 'Комментарии',
Name => 'Имя',
Date => 'Дата',
Reply => 'Ответ',
Send => 'Отправить',
Add => 'Добавить',
'No comments' => 'Нет комментариев',
);
1;
Loading…
Cancel
Save