aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
authorPaul Gilbert2017-10-12 20:05:24 -0400
committerPaul Gilbert2017-10-12 20:05:24 -0400
commit60eca29f3da694f35f661ab5ea3d2797eb34cfde (patch)
treebb451a3f91178d81e05e1eb7c00f650fa74f3390 /engines/titanic
parentea53605365ac4f09db3955e36cc29b734af65f8e (diff)
downloadscummvm-rg350-60eca29f3da694f35f661ab5ea3d2797eb34cfde.tar.gz
scummvm-rg350-60eca29f3da694f35f661ab5ea3d2797eb34cfde.tar.bz2
scummvm-rg350-60eca29f3da694f35f661ab5ea3d2797eb34cfde.zip
TITANIC: DE: Fix saying 'ja' to Deskbot during checkin
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/true_talk/tt_parser.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/engines/titanic/true_talk/tt_parser.cpp b/engines/titanic/true_talk/tt_parser.cpp
index 2331cbebde..5c48de4182 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);