Fixed small bug with parsing plurals
This commit is contained in:
@@ -219,7 +219,6 @@ errorret_t assetLocaleGetString(
|
||||
sizeof(msgidPluralBuffer)
|
||||
);
|
||||
msgidPluralFound = true;
|
||||
printf("Found plural ID: %s\n", msgidPluralBuffer);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -252,8 +251,17 @@ errorret_t assetLocaleGetString(
|
||||
|
||||
int32_t index = atoi(ptr);
|
||||
if(index != pluralIndex) {
|
||||
// Not the plural form we want, skip
|
||||
errorChain(assetFileLineReaderNext(&reader));
|
||||
// Not the plural form we want, skip to the next useable line
|
||||
while(!reader.eof) {
|
||||
errorChain(assetFileLineReaderNext(&reader));
|
||||
errorChain(assetLocaleLineSkipBlanks(&reader, lineBuffer));
|
||||
if(
|
||||
lineBuffer[0] == '\"' ||
|
||||
lineBuffer[0] == '\0' ||
|
||||
lineBuffer[0] == '#'
|
||||
) continue;
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -273,6 +281,5 @@ errorret_t assetLocaleGetString(
|
||||
errorThrow("Failed to find msgstr for message ID: %s", messageId);
|
||||
}
|
||||
|
||||
printf("Found translation: %s\n", stringBuffer);
|
||||
errorOk();
|
||||
}
|
||||
Reference in New Issue
Block a user