Skip to content

Commit 366e50a

Browse files
author
Natalie Lung
committed
first commit of zh.py, test_zh.py, zh.pm, added chinese dictionaries, enabled zh support in Language.pm
1 parent 650bac7 commit 366e50a

File tree

15 files changed

+119768
-1832
lines changed

15 files changed

+119768
-1832
lines changed

cpanfile.snapshot

+209-268
Large diffs are not rendered by default.

lib/Catalyst/Action/MC_REST.pm

+5-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use base 'Catalyst::Action::REST';
1111
use Moose;
1212
use namespace::autoclean;
1313

14-
1514
=head1 NAME Catalyst::Action::MC_REST
1615
1716
Media Cloud Rest Action
@@ -31,7 +30,8 @@ Dispath method using Catalyst::Action::REST after converting foo_POST to foo_GET
3130
3231
=cut
3332

34-
sub dispatch {
33+
sub dispatch
34+
{
3535
my $self = shift;
3636
my $c = shift;
3737

@@ -44,14 +44,15 @@ sub dispatch {
4444
return $self->SUPER::_dispatch_rest_method( $c, $rest_method );
4545
}
4646

47-
sub get_allowed_methods {
47+
sub get_allowed_methods
48+
{
4849
my ( $self, $controller, $c, $name ) = @_;
4950

5051
my $methods = $self->SUPER::get_allowed_methods( $controller, $c, $name );
5152

5253
push( @{ $methods }, 'POST' ) unless ( grep { $_ eq 'POST' } @{ $methods } );
5354

5455
return $methods;
55-
};
56+
}
5657

5758
1;

lib/Catalyst/Authentication/Credential/MediaWords/UsernamePassword.pm

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ sub authenticate
4343
my $username = $authinfo->{ $USERNAME_FIELD };
4444
my $password = $authinfo->{ $PASSWORD_FIELD };
4545

46-
if ( $username and $password ) {
46+
if ( $username and $password )
47+
{
4748

4849
my $user;
4950
eval { $user = MediaWords::DBI::Auth::Login::login_with_email_password( $c->dbis, $username, $password ); };

lib/MediaWords/DB.pm

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use MediaWords::CommonLibs;
99
use MediaWords::DB::HandlerProxy;
1010

1111
{
12+
1213
package MediaWords::DB::PythonConnectToDB;
1314

1415
use strict;

lib/MediaWords/DBI/Auth/User/NewOrModifyUser.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extends 'MediaWords::DBI::Auth::User::AbstractUser';
1515

1616
use MediaWords::DBI::Auth::Password;
1717

18-
has 'role_ids' => ( is => 'rw', isa => 'Maybe[ArrayRef[Int]]' );
18+
has 'role_ids' => ( is => 'rw', isa => 'Maybe[ArrayRef[Int]]' );
1919
has 'password' => ( is => 'rw', isa => 'Maybe[Str]' );
2020
has 'password_repeat' => ( is => 'rw', isa => 'Maybe[Str]' );
2121

lib/MediaWords/DBI/t/Feeds.t

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use Test::NoWarnings;
1414
use MediaWords::Test::DB;
1515
use MediaWords::DBI::Feeds;
1616

17-
1817
# test feed checksumming
1918
sub test_stories_checksum_matches_feed
2019
{

lib/MediaWords/Languages/Language.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ my @_enabled_languages = (
5252
'tr', # Turkish
5353

5454
# Chinese disabled because of poor word segmentation
55-
#'zh', # Chinese
55+
'zh', # Chinese
5656
);
5757

5858
#

0 commit comments

Comments
 (0)