mirror of
https://github.com/Tha14/toxic.git
synced 2024-12-23 11:03:25 +01:00
Add localization system (gettext)
This commit is contained in:
parent
0a2ad23c15
commit
737d29864b
@ -596,7 +596,8 @@ void chat_onStarting (ToxWindow *self, ToxAV *av, uint32_t friend_number, int st
|
||||
self->is_call = true;
|
||||
|
||||
init_infobox(self);
|
||||
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Call started! Type: \"/hangup\" to end it.");
|
||||
|
||||
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, gettext("Call started! Type: \"%s\" to end it."), "/hangup");
|
||||
|
||||
#ifdef SOUND_NOTIFY
|
||||
stop_sound(self->ringing_sound);
|
||||
|
Binary file not shown.
@ -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"
|
||||
|
@ -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.im\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"
|
||||
|
@ -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
|
||||
|
@ -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.im" \
|
||||
--package-name="Toxic" \
|
||||
--package-version="$v" \
|
||||
--output="toxic.pot" \
|
||||
../src/*
|
||||
|
@ -1,14 +1,14 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# Copyright (C) YEAR Toxic Team
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 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.im\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 <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
Loading…
Reference in New Issue
Block a user