diff --git a/src/groupchat.c b/src/groupchat.c index 1c8f990..ec97ebb 100644 --- a/src/groupchat.c +++ b/src/groupchat.c @@ -142,7 +142,7 @@ int init_groupchat_win(ToxWindow *prompt, Tox *m, int groupnum, uint8_t type) || groupchats[i].peer_name_lengths == NULL || groupchats[i].oldpeer_name_lengths == NULL) exit_toxic_err(gettext("failed in init_groupchat_win"), FATALERR_MEMORY); - memcpy(&groupchats[i].oldpeer_names[0], UNKNOWN_NAME, sizeof(UNKNOWN_NAME)); + memcpy(&groupchats[i].oldpeer_names[0], UNKNOWN_NAME, strlen(UNKNOWN_NAME)); groupchats[i].oldpeer_name_lengths[0] = (uint16_t) strlen(UNKNOWN_NAME); #ifdef AUDIO diff --git a/translations/en.po b/translations/en.po index d30b394..e9dc748 100644 --- a/translations/en.po +++ b/translations/en.po @@ -1,10 +1,14 @@ +# English translations for Toxic package. +# Copyright (C) 2015 Toxic Team +# This file is distributed under the same license as the Toxic package. +# Automatically generated, 2015. # msgid "" msgstr "" "Project-Id-Version: Toxic 0.6.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-05-28 15:47+0200\n" -"PO-Revision-Date: 2015-05-26 11:37+0200\n" +"Report-Msgid-Bugs-To: JFreegman@tox.im\n" +"POT-Creation-Date: 2015-05-30 11:30+0200\n" +"PO-Revision-Date: 2015-05-30 11:30+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" "MIME-Version: 1.0\n" @@ -695,14 +699,9 @@ msgid "No pending friend request with that ID." msgstr "No pending friend request with that ID." #: ../src/global_commands.c:75 -#, fuzzy, c-format -#| msgid "" -#| "Failed to add friend (error %d\n" -#| ")" +#, c-format msgid "Failed to add friend (error %d)\n" -msgstr "" -"Failed to add friend (error %d\n" -")" +msgstr "Failed to add friend (error %d)\n" #: ../src/global_commands.c:78 msgid "Friend request accepted." @@ -1585,13 +1584,11 @@ msgstr "WARNING: Failed to save to data file" #: ../src/toxic.h:43 msgid "Anonymous" -msgstr "" +msgstr "Anonymous" #: ../src/toxic.h:44 -#, fuzzy -#| msgid "Toxic User" msgid "Tox User" -msgstr "Toxic User" +msgstr "Tox User" #: ../src/windows.c:368 msgid "failed in set_next_window" diff --git a/translations/it.po b/translations/it.po index 57f305e..d7d7190 100644 --- a/translations/it.po +++ b/translations/it.po @@ -1,7 +1,12 @@ +# Italian translations for Toxic package. +# Copyright (C) 2015 Toxic Team +# This file is distributed under the same license as the Toxic package. +# Automatically generated, 2015. +# msgid "" msgstr "" "Project-Id-Version: Toxic 0.6.0\n" -"Report-Msgid-Bugs-To: \n" +"Report-Msgid-Bugs-To: JFreegman@tox.chat\n" "POT-Creation-Date: 2015-05-28 15:47+0200\n" "PO-Revision-Date: 2015-05-26 11:37+0200\n" "Last-Translator: Automatically generated\n" diff --git a/translations/tools/create_po.sh b/translations/tools/create_po.sh index 05b8747..6a884a6 100755 --- a/translations/tools/create_po.sh +++ b/translations/tools/create_po.sh @@ -15,8 +15,9 @@ if [ -e "$loc.po" ]; then echo "The translation file must not exist" exit 1 else - msginit --no-translator -l $loc -o $loc.po -i toxic.pot v=$(grep TOXIC_VERSION ../cfg/global_vars.mk | head -1 | cut -d "=" -f 2 | tr -d " ") - sed -e '1,5{/^#/d;}' $loc.po > $loc.po.tmp && mv $loc.po.tmp $loc.po - sed -e 's/.*Project-Id-Version:.*/"Project-Id-Version: Toxic '"$v"'\\n"/' $loc.po > $loc.po.tmp && mv $loc.po.tmp $loc.po + echo "PACKAGE_NAME=Toxic" > configure + echo "PACKAGE_VERSION=$v" >> configure + msginit --no-translator -l $loc -o $loc.po -i toxic.pot + rm -f configure fi diff --git a/translations/tools/update_pot.sh b/translations/tools/update_pot.sh index c9acc2b..3b595f4 100755 --- a/translations/tools/update_pot.sh +++ b/translations/tools/update_pot.sh @@ -1,4 +1,12 @@ #!/bin/bash cd $(dirname $0)/.. -xgettext -d toxic -o toxic.pot ../src/* +v=$(grep TOXIC_VERSION ../cfg/global_vars.mk | head -1 | cut -d "=" -f 2 | tr -d " ") +xgettext --default-domain="toxic" \ + --from-code="UTF-8" \ + --copyright-holder="Toxic Team" \ + --msgid-bugs-address="JFreegman@tox.chat" \ + --package-name="Toxic" \ + --package-version="$v" \ + --output="toxic.pot" \ + ../src/* diff --git a/translations/toxic.pot b/translations/toxic.pot index f7fa00d..843ca16 100644 --- a/translations/toxic.pot +++ b/translations/toxic.pot @@ -1,14 +1,14 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# Copyright (C) 2015 Toxic Team # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-05-28 15:47+0200\n" +"Project-Id-Version: Toxic 0.6.0\n" +"Report-Msgid-Bugs-To: JFreegman@tox.chat\n" +"POT-Creation-Date: 2015-05-30 11:30+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n"