Changeset 1672

Show
Ignore:
Timestamp:
01/04/08 14:39:15 (6 months ago)
Author:
Geert
Message:
  • Fixed #302 (Translators: update validation file please)
  • Some minor (whitespace) cleanups
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/system/i18n/en_US/validation.php

    r1522 r1672  
    2929        'max_width'     => 'The %s file has a maximum allowed width of %s is %spx.', 
    3030        'max_height'    => 'The %s file has a maximum allowed image height of %s is %spx.', 
     31 
     32        // Field types 
     33        'alpha'         => 'alphabetical', 
     34        'alpha_dash'    => 'alphabetical, dash, and underscore', 
     35        'digit'         => 'digit', 
     36        'numeric'       => 'numeric', 
    3137); 
  • trunk/system/i18n/nl_NL/validation.php

    r1524 r1672  
    2929        'max_width'     => 'Het %s bestand heeft een maximum toegelaten breedte van %spx.', 
    3030        'max_height'    => 'Het %s bestand heeft een maximum toegelaten hoogte van %spx.', 
     31 
     32        // Field types 
     33        'alpha'         => 'alfabetisch', 
     34        'alpha_dash'    => 'alfabetisch, streepje, en underscore', 
     35        'digit'         => 'cijfers', 
     36        'numeric'       => 'getal', 
    3137); 
  • trunk/system/libraries/Input.php

    r1630 r1672  
    172172 
    173173                // Return the global value 
    174                 return $return_array ? $data : current($data); 
     174                return ($return_array) ? $data : current($data); 
    175175        } 
    176176 
     
    347347                        return $data; 
    348348                } 
    349                  
     349 
    350350                // It is a string 
    351351                $string = $data; 
  • trunk/system/libraries/URI.php

    r1664 r1672  
    6969                return isset(self::$rsegments[$index]) ? self::$rsegments[$index] : $default; 
    7070        } 
    71          
     71 
    7272        /** 
    7373         * Method: argument 
     
    156156                return $segment_array_assoc; 
    157157        } 
    158          
     158 
    159159        /** 
    160160         * Method: argument_array 
     
    186186                return $argument_array_assoc; 
    187187        } 
    188          
     188 
    189189        /** 
    190190         * Method: string 
     
    234234                return count(self::$rsegments); 
    235235        } 
    236          
     236 
    237237        /** 
    238238         * Method: total_arguments 
     
    258258                if ($this->total_segments() < 1) 
    259259                        return $default; 
    260                  
     260 
    261261                return end(self::$segments); 
    262262        } 
     
    273273                if ($this->total_rsegments() < 1) 
    274274                        return $default; 
    275                  
     275 
    276276                return end(self::$rsegments); 
    277277        } 
  • trunk/system/libraries/Validation.php

    r1646 r1672  
    936936                        return TRUE; 
    937937 
    938                 $this->add_error('valid_type', $this->current_field, 'alphabetical'); 
     938                $this->add_error('valid_type', $this->current_field, Kohana::lang('validation.alpha')); 
    939939                return FALSE; 
    940940        } 
     
    955955                        return TRUE; 
    956956 
    957                 $this->add_error('valid_type', $this->current_field, 'alphabetical'); 
     957                $this->add_error('valid_type', $this->current_field, Kohana::lang('validation.alpha')); 
    958958                return FALSE; 
    959959        } 
     
    974974                        return TRUE; 
    975975 
    976                 $this->add_error('valid_type', $this->current_field, 'alphabetical'); 
     976                $this->add_error('valid_type', $this->current_field, Kohana::lang('validation.alpha')); 
    977977                return FALSE; 
    978978        } 
     
    993993                        return TRUE; 
    994994 
    995                 $this->add_error('valid_type', $this->current_field, 'alphabetical'); 
     995                $this->add_error('valid_type', $this->current_field, Kohana::lang('validation.alpha')); 
    996996                return FALSE; 
    997997        } 
     
    10121012                        return TRUE; 
    10131013 
    1014                 $this->add_error('valid_type', $this->current_field, 'alphabetical, dash, and underscore'); 
     1014                $this->add_error('valid_type', $this->current_field, Kohana::lang('validation.alpha_dash')); 
    10151015                return FALSE; 
    10161016        } 
     
    10311031                        return TRUE; 
    10321032 
    1033                 $this->add_error('valid_type', $this->current_field, 'alphabetical, dash, and underscore'); 
     1033                $this->add_error('valid_type', $this->current_field, Kohana::lang('validation.alpha_dash')); 
    10341034                return FALSE; 
    10351035        } 
     
    10501050                        return TRUE; 
    10511051 
    1052                 $this->add_error('valid_type', $this->current_field, 'digit'); 
     1052                $this->add_error('valid_type', $this->current_field, Kohana::lang('validation.digit')); 
    10531053                return FALSE; 
    10541054        } 
     
    10691069                        return TRUE; 
    10701070 
    1071                 $this->add_error('valid_type', $this->current_field, 'digit'); 
     1071                $this->add_error('valid_type', $this->current_field, Kohana::lang('validation.digit')); 
    10721072                return FALSE; 
    10731073        } 
     
    10881088                    return TRUE; 
    10891089 
    1090                 $this->add_error('valid_type', $this->current_field, 'numeric'); 
     1090                $this->add_error('valid_type', $this->current_field, Kohana::lang('validation.numeric')); 
    10911091                return FALSE; 
    10921092        }