OSDN Git Service

メソッド名の誤字修正
[coroid/inqubus.git] / frontend / src / saccubus / converter / Converter.java
index 572cc2c..bda3956 100644 (file)
@@ -10,15 +10,15 @@ import saccubus.ConvertStopFlag;
 import saccubus.net.TextProgressListener;
 
 /**
- * <p>\83^\83C\83g\83\8b\82³\82«\82ã\82Î\82·</p>
+ * <p>タイトル: さきゅばす</p>
  *
- * <p>\90à\96¾: \83j\83R\83j\83R\93®\89æ\82Ì\93®\89æ\82ð\83R\83\81\83\93\83g\82Â\82«\82Å\95Û\91</p>
+ * <p>説明: ニコニコ動画の動画をコメントつきで保存</p>
  *
- * <p>\92\98\8dì\8c : Copyright (c) 2007 PSI</p>
+ * <p>著作権: Copyright (c) 2007 PSI</p>
  *
- * <p>\89ï\8eÐ\96¼: </p>
+ * <p>会社名: </p>
  *
- * @author \96¢\93ü\97Í
+ * @author 未入力
  * @version 1.0
  */
 public class Converter extends AbstractCommand implements Runnable, Callable<Boolean> {
@@ -60,7 +60,7 @@ public class Converter extends AbstractCommand implements Runnable, Callable<Boo
         try {
             call();
         } catch (Exception ex) {
-            String text = (ex.getMessage() != null) ? ex.getMessage() : "\97\\8aú\82µ\82È\82¢\83G\83\89\81[\94­\90\82Ì\82½\82ß\92\86\92f\82µ\82Ü\82µ\82½\81B";
+            String text = (ex.getMessage() != null) ? ex.getMessage() : "予期しないエラー発生のため中断しました。";
             sendText(text);
             ex.printStackTrace();
         }
@@ -68,14 +68,14 @@ public class Converter extends AbstractCommand implements Runnable, Callable<Boo
 
     private boolean runConvert() throws IOException, InterruptedException {
         if (!Setting.shouldRun()) {
-            sendText("\89½\82à\82·\82é\82±\82Æ\82ª\82 \82è\82Ü\82¹\82ñ");
+            sendText("何もすることがありません");
             return true;
         }
 
         validSetting();
         final FfmpegOption ov = Setting.getFfmpeg().getFfmpegOption();
 
-        sendText("\83\8d\83O\83C\83\93\92\86");
+        sendText("ログイン中");
 
         final FileInstanciator fi = createInstanciator();
 
@@ -92,17 +92,17 @@ public class Converter extends AbstractCommand implements Runnable, Callable<Boo
         File tcommFile = fi.getTcommFile(getListener());
 
         if (!Setting.needsConvert()) {
-            sendText("\93®\89æ\81E\83R\83\81\83\93\83g\82ð\95Û\91\82µ\81A\95Ï\8a·\82Í\8ds\82¢\82Ü\82¹\82ñ\82Å\82µ\82½\81B");
+            sendText("動画・コメントを保存し、変換は行いませんでした。");
             return true;
         }
 
         if (!videoFile.isFile()) {
-            throw new IOException("\93ü\97Í\93®\89æ\83t\83@\83C\83\8b\82ª\91\8dÝ\82µ\82Ü\82¹\82ñ:" + videoFile.getPath());
+            throw new IOException("入力動画ファイルが存在しません:" + videoFile.getPath());
         }
 
         if (Setting.getOutputFileSetting().isAddComment()) {
             if (!commentFile.isFile()) {
-                throw new IOException("\93ü\97Í\83R\83\81\83\93\83g\83t\83@\83C\83\8b\82ª\91\8dÝ\82µ\82Ü\82¹\82ñ:" + commentFile.getPath());
+                throw new IOException("入力コメントファイルが存在しません:" + commentFile.getPath());
             }
         } else {
             commentFile = null;
@@ -110,13 +110,13 @@ public class Converter extends AbstractCommand implements Runnable, Callable<Boo
 
         if (Setting.getOutputFileSetting().isAddTcomment()) {
             if (!tcommFile.isFile()) {
-                throw new IOException("\93ü\97Í\93\8a\8de\8eÒ\83R\83\81\83\93\83g\83t\83@\83C\83\8b\82ª\91\8dÝ\82µ\82Ü\82¹\82ñ" + tcommFile.getPath());
+                throw new IOException("入力投稿者コメントファイルが存在しません" + tcommFile.getPath());
             }
         } else {
             tcommFile = null;
         }
 
-        /*\83r\83f\83I\96¼\82Ì\8am\92è*/
+        /*ビデオ名の確定*/
         File convertedVideoFile;
         if (!Setting.getOutputFileSetting().getFile().isFile()) {
             String conv_name = fi.getVideoTitle();
@@ -157,7 +157,7 @@ public class Converter extends AbstractCommand implements Runnable, Callable<Boo
         FileInstanciator.InstanciationType videoType = new FileInstanciator.InstanciationType(Setting.getVideoSetting());
 
         FileInstanciator.CommentInstanciationType commentType = new FileInstanciator.CommentInstanciationType(Setting.
-                getCommentSetting(), Setting.getCommentGetInfo().isselfAdjustCommentNum(), Setting.getCommentGetInfo().
+                getCommentSetting(), Setting.getCommentGetInfo().isSelfAdjustCommentNum(), Setting.getCommentGetInfo().
                 getBackComment());
 
         FileInstanciator.InstanciationType tcommType = new FileInstanciator.InstanciationType(
@@ -168,35 +168,35 @@ public class Converter extends AbstractCommand implements Runnable, Callable<Boo
     }
 
     /**
-     * (\83l\83b\83g\83\8f\81[\83N\90Ý\92è\88È\8aO\82Ì)\90Ý\92è\82ð\8c\9f\8fØ\82·\82é.
-     * @throws IllegalArgumentException \90Ý\92è\82É\95s\94õ\82ª\82 \82é\8fê\8d\87.
+     * (ネットワーク設定以外の)設定を検証する.
+     * @throws IllegalArgumentException 設定に不備がある場合.
      */
     private void validSetting() {
         if (Setting.needsConvert()) {
             File a = Setting.getFfmpeg().getFfmpeg();
             if (!a.canRead()) {
-                throw new IllegalArgumentException("FFmpeg\82ª\8c©\82Â\82©\82è\82Ü\82¹\82ñ\81B");
+                throw new IllegalArgumentException("FFmpegが見つかりません。");
             }
             if (Setting.getFfmpeg().getVhook().getPath().indexOf(' ') >= 0) {
-                throw new IllegalArgumentException("\82·\82¢\82Ü\82¹\82ñ\81B\8c»\8dÝvhook\83\89\83C\83u\83\89\83\8a\82É\82Í\94¼\8ap\8bó\94\92\82Í\8eg\82¦\82Ü\82¹\82ñ\81B");
+                throw new IllegalArgumentException("すいません。現在vhookライブラリには半角空白は使えません。");
             }
             a = Setting.getFfmpeg().getVhook();
             if (!a.canRead()) {
-                throw new IllegalArgumentException("Vhook\83\89\83C\83u\83\89\83\8a\82ª\8c©\82Â\82©\82è\82Ü\82¹\82ñ\81B");
+                throw new IllegalArgumentException("Vhookライブラリが見つかりません。");
             }
             a = Setting.getFfmpeg().getFont();
             if (!a.canRead()) {
-                throw new IllegalArgumentException("\83t\83H\83\93\83g\82ª\8c©\82Â\82©\82è\82Ü\82¹\82ñ\81B");
+                throw new IllegalArgumentException("フォントが見つかりません。");
             }
         } else {
             if (Setting.getVideoSetting().isDelete()) {
-                throw new IllegalArgumentException("\95Ï\8a·\82µ\82È\82¢\82Ì\82É\81A\93®\89æ\8dí\8f\9c\82µ\82¿\82á\82Á\82Ä\97Ç\82¢\82ñ\82Å\82·\82©\81H");
+                throw new IllegalArgumentException("変換しないのに、動画削除しちゃって良いんですか?");
             }
             if (Setting.getCommentSetting().isDelete()) {
-                throw new IllegalArgumentException("\95Ï\8a·\82µ\82È\82¢\82Ì\82É\81A\83R\83\81\83\93\83g\8dí\8f\9c\82µ\82¿\82á\82Á\82Ä\97Ç\82¢\82ñ\82Å\82·\82©\81H");
+                throw new IllegalArgumentException("変換しないのに、コメント削除しちゃって良いんですか?");
             }
             if (Setting.getTcommentSetting().isDelete()) {
-                throw new IllegalArgumentException("\95Ï\8a·\82µ\82È\82¢\82Ì\82É\81A\93\8a\8de\8eÒ\83R\83\81\83\93\83g\8dí\8f\9c\82µ\82¿\82á\82Á\82Ä\97Ç\82¢\82ñ\82Å\82·\82©\81H");
+                throw new IllegalArgumentException("変換しないのに、投稿者コメント削除しちゃって良いんですか?");
             }
         }
     }