Skip to content

Commit

Permalink
close #571 -- more modal window translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Nagle committed Feb 2, 2012
1 parent fe9db86 commit fc38024
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
Binary file modified locale/mtv-es_ES.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion locale/mtv-es_ES.po
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ msgstr "Por favor ingresa tu nombre de usuario o dirección de correo electróni


#: wp/models.php:531 #: wp/models.php:531
msgid "Please enter your password." msgid "Please enter your password."
msgstr "Por ravor ingresa tu contraseña" msgstr "Por favor ingresa tu contraseña"


#: wp/models.php:584 wp/models.php:662 #: wp/models.php:584 wp/models.php:662
msgid "I don't know that email address" msgid "I don't know that email address"
Expand Down
26 changes: 13 additions & 13 deletions wp/models.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function save() {
if ( is_wp_error( $postid ) ) if ( is_wp_error( $postid ) )
throw new WPException( $postid ); throw new WPException( $postid );
else if ( $postid == 0 ) else if ( $postid == 0 )
throw new JsonableException(__("Couldn't update the post")); throw new JsonableException(__("Couldn't update the post", 'mtv'));


if ( ! empty( $meta ) ) { if ( ! empty( $meta ) ) {
foreach ( $meta as $key => $val ) foreach ( $meta as $key => $val )
Expand All @@ -141,12 +141,12 @@ public function save() {


public function fetch() { public function fetch() {
if ( empty($this->attributes['blogid']) || empty($this->attributes['id']) ) if ( empty($this->attributes['blogid']) || empty($this->attributes['id']) )
throw new BadMethodCallException(__("Need a blogid and post id to fetch a post")); throw new BadMethodCallException(__("Need a blogid and post id to fetch a post", 'mtv'));
switch_to_blog( $this->attributes['blogid'] ); switch_to_blog( $this->attributes['blogid'] );
$post = get_post( $this->attributes['id'] ); $post = get_post( $this->attributes['id'] );
if ( $post === NULL ) { if ( $post === NULL ) {
restore_current_blog(); restore_current_blog();
throw new ModelNotFound("Post", __("Post not found")); throw new ModelNotFound("Post", __("Post not found", 'mtv'));
} }
$this->reload( $post ); $this->reload( $post );


Expand Down Expand Up @@ -371,7 +371,7 @@ public function parse( &$postdata ) {


# If this isn't an attachment, we haven't found what we're looking for # If this isn't an attachment, we haven't found what we're looking for
if ( $ret['post_type'] != "attachment" ) if ( $ret['post_type'] != "attachment" )
throw new ModelParseException(__("Post is not an attachment")); throw new ModelParseException(__("Post is not an attachment", 'mtv'));


# Add some special fields depending on the post type # Add some special fields depending on the post type
$ret['url'] = wp_get_attachment_url($ret['id']); $ret['url'] = wp_get_attachment_url($ret['id']);
Expand Down Expand Up @@ -555,9 +555,9 @@ public static function signon( $kwargs ) {
$collection = static::$collection; $collection = static::$collection;
$user = $collection::get_by( array( 'user_email' => $kwargs['user_email'] ) ); $user = $collection::get_by( array( 'user_email' => $kwargs['user_email'] ) );
$creds['user_login'] = $user->user_login; $creds['user_login'] = $user->user_login;
} else throw new JsonableException(__("Please enter your user name or email address.")); } else throw new JsonableException(__("Please enter your user name or email address.", 'mtv'));


if ( empty( $kwargs['user_pass'] ) ) throw new JsonableException(__('Please enter your password.')); if ( empty( $kwargs['user_pass'] ) ) throw new JsonableException(__('Please enter your password.', 'mtv'));


$creds['user_password'] = $kwargs['user_pass']; $creds['user_password'] = $kwargs['user_pass'];


Expand Down Expand Up @@ -610,10 +610,10 @@ class UserCollection extends Collection {
public static function get_by( $kwargs ) { public static function get_by( $kwargs ) {
if ( isset($kwargs['user_email']) ) { if ( isset($kwargs['user_email']) ) {
$userid = get_user_id_from_string($kwargs['user_email']); $userid = get_user_id_from_string($kwargs['user_email']);
if ( $userid === 0 ) throw new JsonableException(__("I don't know that email address")); if ( $userid === 0 ) throw new JsonableException(__("I don't know that email address", 'mtv'));
} else if ( isset($kwargs['user_login']) ) { } else if ( isset($kwargs['user_login']) ) {
$userid = get_user_id_from_string($kwargs['user_login']); $userid = get_user_id_from_string($kwargs['user_login']);
if ( $userid === 0 ) throw new JsonableException(__("I don't know that user name")); if ( $userid === 0 ) throw new JsonableException(__("I don't know that user name", 'mtv'));
} else throw new NotImplementedException(); } else throw new NotImplementedException();


$user = new static::$model( array( 'id'=>$userid ) ); $user = new static::$model( array( 'id'=>$userid ) );
Expand Down Expand Up @@ -688,10 +688,10 @@ public static function for_user( $kwargs ) {
$userid = $kwargs['user_id']; $userid = $kwargs['user_id'];
} else if ( isset($kwargs['user_email']) ) { } else if ( isset($kwargs['user_email']) ) {
$userid = get_user_id_from_string($kwargs['user_email']); $userid = get_user_id_from_string($kwargs['user_email']);
if ( $userid === 0 ) throw new JsonableException(__("I don't know that email address")); if ( $userid === 0 ) throw new JsonableException(__("I don't know that email address", 'mtv'));
} else if ( isset($kwargs['user_login']) ) { } else if ( isset($kwargs['user_login']) ) {
$userid = get_user_id_from_string($kwargs['user_login']); $userid = get_user_id_from_string($kwargs['user_login']);
if ( $userid === 0 ) throw new JsonableException(__("I don't know that username")); if ( $userid === 0 ) throw new JsonableException(__("I don't know that username", 'mtv'));
} else throw new NotImplementedException(); } else throw new NotImplementedException();


$class = get_called_class(); $class = get_called_class();
Expand Down Expand Up @@ -753,10 +753,10 @@ function activate_signup($key) {
); );


if (empty($signup)) if (empty($signup))
return new \WP_Error('invalid_key', __('Invalid activation key.')); return new \WP_Error('invalid_key', __('Invalid activation key.', 'mtv'));


if ($signup->active) if ($signup->active)
return new \WP_Error('already_active', __('This account is already activated.'), $signup ); return new \WP_Error('already_active', __('This account is already activated.', 'mtv'), $signup );


$user_meta = unserialize($signup->meta); $user_meta = unserialize($signup->meta);
$user_login = $wpdb->escape($signup->user_login); $user_login = $wpdb->escape($signup->user_login);
Expand All @@ -768,7 +768,7 @@ function activate_signup($key) {
$user_id = wpmu_create_user($user_login, wp_generate_password( 12, false ), $user_email); $user_id = wpmu_create_user($user_login, wp_generate_password( 12, false ), $user_email);


if (!$user_id) if (!$user_id)
return new \WP_Error('create_user', __('Could not create user'), $signup); return new \WP_Error('create_user', __('Could not create user', 'mtv'), $signup);


// Be sure to unset the user pass because // Be sure to unset the user pass because
// we don't want to store it as meta once // we don't want to store it as meta once
Expand Down

0 comments on commit fc38024

Please sign in to comment.