diff --git a/src/dusk/asset/loader/locale/assetlocaleloader.c b/src/dusk/asset/loader/locale/assetlocaleloader.c index 4c7d62a..1111484 100644 --- a/src/dusk/asset/loader/locale/assetlocaleloader.c +++ b/src/dusk/asset/loader/locale/assetlocaleloader.c @@ -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(); } \ No newline at end of file diff --git a/src/dusk/engine/engine.c b/src/dusk/engine/engine.c index 280ae1a..0f39f45 100644 --- a/src/dusk/engine/engine.c +++ b/src/dusk/engine/engine.c @@ -41,13 +41,14 @@ errorret_t engineInit(const int32_t argc, const char_t **argv) { char_t buffer[256]; errorChain(localeManagerGetText( - "error.upload_failed.long", + "user.invite_status", buffer, sizeof(buffer), - 0, - "Test File Name" + 2, + "Dominic", + 2 )); - printf("Retrieved localized string: %s\n", buffer); + assertUnreachable(buffer); // Run the initial script. scriptcontext_t ctx;