Changeset 408
- Timestamp:
- 09/12/07 22:48:24 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
DuplicateEntries/trunk/DuplicateEntries/DuplicateEntries.pl
r407 r408 75 75 76 76 my @entry_ids = $app->param('id') 77 or return $app-> trans_error('No entry was selected to duplicate.');77 or return $app->error($plugin->translate('No entry was selected to duplicate.')); 78 78 for my $entry_id (@entry_ids) { 79 79 my $entry = $class->load($entry_id) 80 or return $app-> trans_error('Invalid entry_id');80 or return $app->error($plugin->translate('Invalid entry_id')); 81 81 my $entry_cloned = $entry->clone({ 82 82 except => { … … 91 91 92 92 $entry_cloned->save 93 or return $app-> trans_error('Error saving entry: [_1]', $entry_cloned->errstr);93 or return $app->error($plugin->translate('Saving entry failed: [_1]', $entry_cloned->errstr)); 94 94 95 95 my @places = MT::Placement->load({ entry_id => $entry->id }); … … 102 102 $place_cloned->entry_id($entry_cloned->id); 103 103 $place_cloned->save 104 or return $app-> trans_error('Saving placement failed: [_1]', $place_cloned->errstr);104 or return $app->error($plugin->translate('Saving placement failed: [_1]', $place_cloned->errstr)); 105 105 } 106 106 } … … 119 119 120 120 my @tmpl_ids = $app->param('id') 121 or return $app-> trans_error('No template was selected to duplicate.');121 or return $app->error($plugin->translate('No template was selected to duplicate.')); 122 122 for my $tmpl_id (@tmpl_ids) { 123 123 my $tmpl = $class->load($tmpl_id) 124 or return $app-> trans_error('Invalid template_id');124 or return $app->error($plugin->translate('Invalid template_id')); 125 125 my $tmpl_cloned = $tmpl->clone({ 126 126 except => { … … 143 143 144 144 $tmpl_cloned->save 145 or return $app-> trans_error('Error saving template: [_1]', $tmpl_cloned->errstr);145 or return $app->error($plugin->translate('Saving template failed: [_1]', $tmpl_cloned->errstr)); 146 146 } 147 147 DuplicateEntries/trunk/DuplicateEntries/lib/DuplicateEntries/L10N/ja.pm
r407 r408 11 11 'Duplicate Pages' => 'ウェブページの複製', 12 12 'Duplicate Templates' => 'テンプレートの複製', 13 'Saving entry failed: [_1]' => 'ブログ記事の保存に失敗しました: [_1]', 14 'Saving placement failed: [_1]' => 'ブログ記事とカテゴリの関連付けを設定できませんでした: [_1]', 15 'Saving template failed: [_1]' => 'テンプレートの保存に失敗しました: [_1]', 16 'No entry was selected to duplicate.' => '複製するブログ記事が選択されていません。', 17 'No template was selected to duplicate.' => '複製するテンプレートが選択されていません。', 18 'Invalid entry_id' => '不正なentry_idです。', 19 'Invalid template_id' => '不正なtemplate_idです。', 13 20 ); 14 21
