diff --git a/data/locale/characters.dat b/data/locale/characters.dat index 9d09bd6..32a4940 100644 --- a/data/locale/characters.dat +++ b/data/locale/characters.dat @@ -1 +1 @@ -&|_# POfileorTBFS:handWCpygt2015-6,JwsbuGNUL3.Emj@c/"IV\RMD8+v?x;=%!AYq()'kH[]KzQX4Z79*àéí¡Çóè·úïçüºòÉÒÍÀ°æåøÆÅØ<>öÄäßÜá¿ñÁÊûâîôÈêùœÙìëęąłćżńśźŻŚŁĆÖ +Ö&|_# POfileorTBFS:handWCpygt2015-6,JwsbuGNUL3.Emj@c/"IV\RMD8+v?x;=%!AYq()'kH[]KzQX4Z79*àéí¡Çóè·úïçüºòÉÒÍÀ°æåøÆÅØ<>öÄäßÜá¿ñÁÊûâîôÈêùœÙìëęąłćżńśźŻŚŁĆÖ diff --git a/locale/fr.po b/locale/fr.po index 57dff3f..367ad32 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -81,7 +81,7 @@ msgid "Missiles" msgstr "Missiles" msgid "Missiles (%d)" -msgstr "Missiles ( %d )" +msgstr "Missiles (%d)" msgid "Target: %.2fkm" msgstr "Cible:% .2fkm" diff --git a/src/galaxy/mission.c b/src/galaxy/mission.c index 542e90d..c31f3bd 100644 --- a/src/galaxy/mission.c +++ b/src/galaxy/mission.c @@ -46,7 +46,7 @@ Mission *loadMissionMeta(char *filename) mission = malloc(sizeof(Mission)); memset(mission, 0, sizeof(Mission)); - STRNCPY(mission->name, cJSON_GetObjectItem(root, "name")->valuestring, MAX_NAME_LENGTH); + STRNCPY(mission->name, _(cJSON_GetObjectItem(root, "name")->valuestring), MAX_NAME_LENGTH); STRNCPY(mission->description, _(cJSON_GetObjectItem(root, "description")->valuestring), MAX_DESCRIPTION_LENGTH); STRNCPY(mission->filename, filename, MAX_DESCRIPTION_LENGTH); diff --git a/src/system/text.c b/src/system/text.c index f0712f1..3bfb68a 100644 --- a/src/system/text.c +++ b/src/system/text.c @@ -29,7 +29,6 @@ void useFont(char *name); static void initChars(Font *f); static char *nextCharacter(const char *str, int *i); static Glyph *findGlyph(char *c); -static int strlenMB(char *text); static SDL_Color white = {255, 255, 255, 255}; static char drawTextBuffer[1024]; @@ -187,7 +186,7 @@ static void drawTextLines(int x, int y, int size, int align, SDL_Color color) memset(&line, '\0', sizeof(line)); memset(&token, '\0', sizeof(token)); - len = strlenMB(drawTextBuffer); + len = strlen(drawTextBuffer); n = currentWidth = 0; @@ -365,7 +364,7 @@ int getWrappedTextHeight(char *text, int size) y = 0; h = 0; currentWidth = 0; - len = strlenMB(drawTextBuffer); + len = strlen(drawTextBuffer); memset(word, 0, MAX_WORD_LENGTH); for (i = 0 ; i < len ; i++) @@ -421,23 +420,3 @@ static char *nextCharacter(const char *str, int *i) *i = *i + 1; } } - -static int strlenMB(char *text) -{ - int i, n; - unsigned char bit; - - n = 0; - - for (i = 0 ; i < strlen(text) ; i++) - { - bit = (unsigned char)text[i]; - - if ((bit >= ' ' && bit <= '~') || bit >= 0xC0) - { - n++; - } - } - - return n; -}