Changeset 1020

Show
Ignore:
Timestamp:
01/11/07 07:04:43 (2 years ago)
Author:
fumiakiy
Message:

Fixed a bug so now the unsuccessful restore correctly results in an error. BugId: 46432

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/wheeljack/lib/MT/App/CMS.pm

    r1019 r1020  
    1124711247            if ($e) { 
    1124811248                $result = 0; 
    11249                 $error = 'Required modules (Archive::Tar and/or IO::Uncompress::Gunzip) are missing.'
     11249                $error = $app->translate('Required modules (Archive::Tar and/or IO::Uncompress::Gunzip) are missing.')
    1125011250            } else { 
    1125111251                my $temp_dir = $app->config('TempDir'); 
     
    1129211292            if ($@) { 
    1129311293                $result = 0; 
    11294                 $error = 'Required module (Archive::Zip) is missing.'
     11294                $error = $app->translate('Required module (Archive::Zip) is missing.')
    1129511295            } else { 
    1129611296                my $temp_dir = $app->config('TempDir'); 
     
    1159011590    my $asset; 
    1159111591    my @errors; 
     11592    my $error_assets = {}; 
    1159211593    require MT::BackupRestore; 
    1159311594    if ($is_asset) { 
    1159411595        $asset = shift @$assets; 
    11595         my $error_assets = {}; 
    1159611596        $asset->{fh} = $fh; 
    1159711597        MT::BackupRestore->restore_asset(undef, $asset, $objects, $error_assets, sub { $app->print(@_); }); 
    1159811598        if (defined($error_assets->{$asset->{asset_id}})) { 
    1159911599            $app->log({ 
    11600                 message => $app->translate('Restoring an actual file for an asset failed: [_1]', $error_assets->{$asset->{asset_id}})
     11600                message => $app->translate('Restoring an actual file for an asset failed: ') . $error_assets->{$asset->{asset_id}}
    1160111601                level => MT::Log::WARNING(), 
    1160211602                class => 'system', 
     
    1163611636            my $log_url = $app->uri(mode => 'view_log', args => {}); 
    1163711637            $param->{error} = $app->translate('Some objects were not restored because their parent objects were not restored.'); 
     11638            $param->{error_url} = $log_url; 
     11639        } elsif (scalar(keys %$error_assets)) { 
     11640            $param->{error} = $app->translate('Some of actual files for assets are not restored correctly.'); 
     11641            my $log_url = $app->uri(mode => 'view_log', args => {}); 
    1163811642            $param->{error_url} = $log_url; 
    1163911643        } else { 
  • branches/wheeljack/lib/MT/BackupRestore.pm

    r990 r1020  
    323323    if (!-w "$vol$dir") { 
    324324        my $voldir =  "$vol$dir"; 
    325         # we do need decode_utf8 here 
     325        # we do need utf8_off here 
    326326        $errors->{$id} = MT->translate('[_1] is not writable.', MT::I18N::utf8_off($voldir)); 
    327327    } else { 
  • branches/wheeljack/lib/MT/L10N/ja.pm

    r1019 r1020  
    317317ƒäž­...\n", 
    318318    "Restoring [_1] (ID: [_2]) was deferred because its parents objects have not been restored yet.\n" => "芪オブゞェクトが芋぀からないため[_1](ID: [_2])の埩å 
    319 ƒã¯å»¶æœŸã•れたした。", 
     319ƒã¯å»¶æœŸã•れたした。\n", 
    320320    "[_1] [_2] (ID: [_3]) has been restored successfully with new ID: [_4]\n" => "[_2](ID: [_3])が新しくID:[_4]で埩å 
    321321ƒã•れたした。\n", 
     
    11681168    'Please upload [_1] in this page.' => 'このペヌゞでは[_1]をアップロヌドしおください。', 
    11691169    'File was not uploaded.' => 'ファむルがアップロヌドされたせんでした。', 
    1170     'Restoring an actual file for an asset failed: [_1]' => 'アむテムの実際のファむルを埩å 
    1171 ƒã§ããŸã›ã‚“でした] [_1]', 
     1170    'Restoring an actual file for an asset failed: ' => 'アむテムの実際のファむルを埩å 
     1171ƒã§ããŸã›ã‚“でした。', 
     1172    'Some of actual files for assets are not restored correctly.' => '実際のファむルを埩å 
     1173ƒã§ããªã‹ã£ãŸã‚¢ã‚€ãƒ†ãƒ ãŒã‚りたす。', 
    11721174    'Some objects were not restored because their parent objects were not restored.' => '芪オブゞェクトが芋぀からないので埩å 
    11731175ƒã§ããªã‹ã£ãŸã‚ªãƒ–ゞェクトがありたす。', 
     
    11781180    'Select Weblog' => 'ブログを遞択', 
    11791181    'Selected Weblog' => '遞択されたブログ', 
    1180  
     1182    'Required modules (Archive::Tar and/or IO::Uncompress::Gunzip) are missing.' => 'Archive::TarたたはIO::Uncompress::Gunzipが芋぀からないので凊理できたせん。', 
     1183    'Required module (Archive::Zip) is missing.' => 'Archive::Zipが芋぀からないので凊理できたせん。', 
     1184     
    11811185    ## lib/MT/Asset.pm 
    11821186    'File' => 'ファむル',