[LIB-13] Locale resource settings
[chesshog-scanner.git] / src / main / java / org / hedgecode / chess / scanner / portal / Chess2700Scanner.java
index ac0c8f3..e90b66d 100644 (file)
@@ -22,6 +22,8 @@ import org.hedgecode.chess.scanner.StringUtils;
 import org.hedgecode.chess.scanner.entity.PGNGame;
 import org.hedgecode.chess.scanner.entity.PGNTournament;
 
+import static org.hedgecode.chess.scanner.ScannerConstants.*;
+
 /**
  * Chess2700Scanner
  *
@@ -39,14 +41,14 @@ public class Chess2700Scanner extends AbstractSettingsScanner implements Scanner
     @Override
     public PGNTournament scanTournament(String tournamentId) throws ScannerException {
         throw new ScannerException(
-                "2700Chess does not support searching for a tournament by ID!"
+                "scanner.portal.search.unavailable.tournament.id", DOMAIN_2700CHESS
         );
     }
 
     @Override
     public PGNTournament findTournament(String tournamentName) throws ScannerException {
         throw new ScannerException(
-                "2700Chess does not support searching for a tournament by name!"
+                "scanner.portal.search.unavailable.tournament.name", DOMAIN_2700CHESS
         );
     }
 
@@ -70,13 +72,13 @@ public class Chess2700Scanner extends AbstractSettingsScanner implements Scanner
         );
         if (pgn == null) {
             throw new ScannerException(
-                    String.format("Failed to get PGN for requesting URL: %s", gameUrl)
+                    "scanner.failed.request.url", gameUrl
             );
         }
         pgn = StringUtils.formatCrlf(pgn);
         if (!StringUtils.isPgn(pgn)) {
             throw new ScannerException(
-                    String.format("Incorrect PGN for requesting URL: %s", gameUrl)
+                    "scanner.incorrect.pgn.url", gameUrl
             );
         }
         return new PGNGame(