[Scummvm-git-logs] scummvm master -> cf31643c7f5cf78bea5849c7db08d8d91e9b8363

sev- noreply at scummvm.org
Mon Mar 2 00:51:20 UTC 2026


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

Summary:
cf31643c7f COMMON: Fix crash in TraslationManager when non-English is selected


Commit: cf31643c7f5cf78bea5849c7db08d8d91e9b8363
    https://github.com/scummvm/scummvm/commit/cf31643c7f5cf78bea5849c7db08d8d91e9b8363
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2026-03-02T01:51:08+01:00

Commit Message:
COMMON: Fix crash in TraslationManager when non-English is selected

It is incorrect at this moment as it ignores context. But it is a
temporary patch to fix a hard crash.

Changed paths:
    common/translation.cpp


diff --git a/common/translation.cpp b/common/translation.cpp
index a5932ea1553..1107088cb39 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -133,6 +133,9 @@ U32String TranslationManager::getPoTranslation(const char* message) const {
 }
 
 U32String TranslationManager::getTranslation(const char *message, const char *context) const {
+	if (_usingPo)
+		return getPoTranslation(message);
+
 	// If no language is set or message is empty, return msgid as is
 	if (_currentTranslationMessages.empty() || *message == '\0')
 		return U32String(message);
@@ -368,7 +371,7 @@ void TranslationManager::loadLanguageDat(int index) {
 		return;
 	}
 
-	
+
 	// If po directory exists and loading the specific language .po succeeds we can skip loading the dat
 	if (_havePoDirectory && loadLanguagePo(index))
 		return;




More information about the Scummvm-git-logs mailing list