summaryrefslogtreecommitdiff
path: root/src/strgen
diff options
context:
space:
mode:
Diffstat (limited to 'src/strgen')
-rw-r--r--src/strgen/strgen.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp
index 032905066..e8f8de50b 100644
--- a/src/strgen/strgen.cpp
+++ b/src/strgen/strgen.cpp
@@ -806,7 +806,10 @@ static void ParseFile(const char *file, bool english)
FILE *in;
char buf[2048];
- _translation = strcmp(file, _file) != 0;
+ /* Only look at the final filename to determine whether it's be base language or not */
+ const char *cur_file = strrchr(_file, PATHSEPCHAR);
+ const char *next_file = strrchr(file, PATHSEPCHAR);
+ _translation = next_file != NULL && cur_file != NULL && strcmp(cur_file, next_file) != 0;
_file = file;
/* For each new file we parse, reset the genders, and language codes */