[Scummvm-git-logs] scummvm master -> 60eca29f3da694f35f661ab5ea3d2797eb34cfde

dreammaster dreammaster at scummvm.org
Fri Oct 13 02:05:26 CEST 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
60eca29f3d TITANIC: DE: Fix saying 'ja' to Deskbot during checkin


Commit: 60eca29f3da694f35f661ab5ea3d2797eb34cfde
    https://github.com/scummvm/scummvm/commit/60eca29f3da694f35f661ab5ea3d2797eb34cfde
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-10-12T20:05:24-04:00

Commit Message:
TITANIC: DE: Fix saying 'ja' to Deskbot during checkin

Changed paths:
    engines/titanic/true_talk/tt_parser.cpp


diff --git a/engines/titanic/true_talk/tt_parser.cpp b/engines/titanic/true_talk/tt_parser.cpp
index 2331cbe..5c48de4 100644
--- a/engines/titanic/true_talk/tt_parser.cpp
+++ b/engines/titanic/true_talk/tt_parser.cpp
@@ -30,6 +30,7 @@
 #include "titanic/true_talk/tt_sentence.h"
 #include "titanic/true_talk/tt_word.h"
 #include "titanic/titanic.h"
+#include "titanic/translation.h"
 
 namespace Titanic {
 
@@ -64,7 +65,7 @@ void TTparser::loadArrays() {
 	loadArray(_replacements1, "TEXT/REPLACEMENTS1");
 	loadArray(_replacements2, "TEXT/REPLACEMENTS2");
 	loadArray(_replacements3, "TEXT/REPLACEMENTS3");
-	if (g_vm->isGerman())
+	if (g_language == Common::DE_DEU)
 		loadArray(_replacements4, "TEXT/REPLACEMENTS4");
 	loadArray(_phrases, "TEXT/PHRASES");
 	loadArray(_pronouns, "TEXT/PRONOUNS");
@@ -85,12 +86,13 @@ int TTparser::preprocess(TTsentence *sentence) {
 	if (normalize(sentence))
 		return 0;
 
-	if (g_vm->isGerman())
+	if (g_language == Common::DE_DEU) {
 		preprocessGerman(sentence->_normalizedLine);
-
-	// Scan for and replace common slang and contractions with verbose versions
-	searchAndReplace(sentence->_normalizedLine, _replacements1);
-	searchAndReplace(sentence->_normalizedLine, _replacements2);
+	} else {
+		// Scan for and replace common slang and contractions with verbose versions
+		searchAndReplace(sentence->_normalizedLine, _replacements1);
+		searchAndReplace(sentence->_normalizedLine, _replacements2);
+	}
 
 	// Check entire normalized line against common phrases to replace
 	for (uint idx = 0; idx < _phrases.size(); idx += 2) {
@@ -98,6 +100,12 @@ int TTparser::preprocess(TTsentence *sentence) {
 			sentence->_normalizedLine = _phrases[idx + 1];
 	}
 
+	if (g_language == Common::DE_DEU) {
+		// Scan for and replace common slang and contractions with verbose versions
+		searchAndReplace(sentence->_normalizedLine, _replacements1);
+		searchAndReplace(sentence->_normalizedLine, _replacements2);
+	}
+
 	// Do a further search and replace of roman numerals to decimal
 	searchAndReplace(sentence->_normalizedLine, _replacements3);
 





More information about the Scummvm-git-logs mailing list