diff --git a/po/LINGUAS b/po/LINGUAS deleted file mode 100644 index 30b1cff..0000000 --- a/po/LINGUAS +++ /dev/null @@ -1,2 +0,0 @@ -# Set of available languages. -cs sk zh_CN ru uk zh_TW fr diff --git a/po/Makevars b/po/Makevars deleted file mode 100644 index b444d58..0000000 --- a/po/Makevars +++ /dev/null @@ -1,41 +0,0 @@ -# Makefile variables for PO directory in any package using GNU gettext. - -# Usually the message domain is the same as the package name. -DOMAIN = $(PACKAGE) - -# These two variables depend on the location of this directory. -subdir = po -top_builddir = .. - -# These options get passed to xgettext. -XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ - -# This is the copyright holder that gets inserted into the header of the -# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding -# package. (Note that the msgstr strings, extracted from the package's -# sources, belong to the copyright holder of the package.) Translators are -# expected to transfer the copyright for their translations to this person -# or entity, or to disclaim their copyright. The empty string stands for -# the public domain; in this case the translators are expected to disclaim -# their copyright. -COPYRIGHT_HOLDER = Free Software Foundation, Inc. - -# This is the email address or URL to which the translators shall report -# bugs in the untranslated strings: -# - Strings which are not entire sentences, see the maintainer guidelines -# in the GNU gettext documentation, section 'Preparing Strings'. -# - Strings which use unclear terms or require additional context to be -# understood. -# - Strings which make invalid assumptions about notation of date, time or -# money. -# - Pluralisation problems. -# - Incorrect English spelling. -# - Incorrect formatting. -# It can be your email address, or a mailing list address where translators -# can write to without being subscribed, or the URL of a web page through -# which the translators can contact you. -MSGID_BUGS_ADDRESS = dushistov@mail.ru - -# This is the list of locale categories, beyond LC_MESSAGES, for which the -# message catalogs shall be used. It is usually empty. -EXTRA_LOCALE_CATEGORIES = diff --git a/po/POTFILES.in b/po/POTFILES.in deleted file mode 100644 index 3a6c4a6..0000000 --- a/po/POTFILES.in +++ /dev/null @@ -1,3 +0,0 @@ -# Package source files -src/sdcv.cpp -src/libwrapper.cpp diff --git a/po/Rules-quot b/po/Rules-quot deleted file mode 100644 index 9c2a995..0000000 --- a/po/Rules-quot +++ /dev/null @@ -1,47 +0,0 @@ -# Special Makefile rules for English message catalogs with quotation marks. - -DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot - -.SUFFIXES: .insert-header .po-update-en - -en@quot.po-create: - $(MAKE) en@quot.po-update -en@boldquot.po-create: - $(MAKE) en@boldquot.po-update - -en@quot.po-update: en@quot.po-update-en -en@boldquot.po-update: en@boldquot.po-update-en - -.insert-header.po-update-en: - @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ - if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ - tmpdir=`pwd`; \ - echo "$$lang:"; \ - ll=`echo $$lang | sed -e 's/@.*//'`; \ - LC_ALL=C; export LC_ALL; \ - cd $(srcdir); \ - if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ - if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ - rm -f $$tmpdir/$$lang.new.po; \ - else \ - if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ - :; \ - else \ - echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ - exit 1; \ - fi; \ - fi; \ - else \ - echo "creation of $$lang.po failed!" 1>&2; \ - rm -f $$tmpdir/$$lang.new.po; \ - fi - -en@quot.insert-header: insert-header.sin - sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header - -en@boldquot.insert-header: insert-header.sin - sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header - -mostlyclean: mostlyclean-quot -mostlyclean-quot: - rm -f *.insert-header diff --git a/po/boldquot.sed b/po/boldquot.sed deleted file mode 100644 index 4b937aa..0000000 --- a/po/boldquot.sed +++ /dev/null @@ -1,10 +0,0 @@ -s/"\([^"]*\)"/“\1”/g -s/`\([^`']*\)'/‘\1’/g -s/ '\([^`']*\)' / ‘\1’ /g -s/ '\([^`']*\)'$/ ‘\1’/g -s/^'\([^`']*\)' /‘\1’ /g -s/“”/""/g -s/“/“/g -s/”/”/g -s/‘/‘/g -s/’/’/g diff --git a/po/insert-header.sin b/po/insert-header.sin deleted file mode 100644 index b26de01..0000000 --- a/po/insert-header.sin +++ /dev/null @@ -1,23 +0,0 @@ -# Sed script that inserts the file called HEADER before the header entry. -# -# At each occurrence of a line starting with "msgid ", we execute the following -# commands. At the first occurrence, insert the file. At the following -# occurrences, do nothing. The distinction between the first and the following -# occurrences is achieved by looking at the hold space. -/^msgid /{ -x -# Test if the hold space is empty. -s/m/m/ -ta -# Yes it was empty. First occurrence. Read the file. -r HEADER -# Output the file's contents by reading the next line. But don't lose the -# current line while doing this. -g -N -bb -:a -# The hold space was nonempty. Following occurrences. Do nothing. -x -:b -} diff --git a/po/quot.sed b/po/quot.sed deleted file mode 100644 index 0122c46..0000000 --- a/po/quot.sed +++ /dev/null @@ -1,6 +0,0 @@ -s/"\([^"]*\)"/“\1”/g -s/`\([^`']*\)'/‘\1’/g -s/ '\([^`']*\)' / ‘\1’ /g -s/ '\([^`']*\)'$/ ‘\1’/g -s/^'\([^`']*\)' /‘\1’ /g -s/“”/""/g diff --git a/po/remove-potcdate.sin b/po/remove-potcdate.sin deleted file mode 100644 index 2436c49..0000000 --- a/po/remove-potcdate.sin +++ /dev/null @@ -1,19 +0,0 @@ -# Sed script that remove the POT-Creation-Date line in the header entry -# from a POT file. -# -# The distinction between the first and the following occurrences of the -# pattern is achieved by looking at the hold space. -/^"POT-Creation-Date: .*"$/{ -x -# Test if the hold space is empty. -s/P/P/ -ta -# Yes it was empty. First occurrence. Remove the line. -g -d -bb -:a -# The hold space was nonempty. Following occurrences. Do nothing. -x -:b -} diff --git a/po/ru.po b/po/ru.po index bc05c79..c331beb 100644 --- a/po/ru.po +++ b/po/ru.po @@ -1,155 +1,126 @@ # Russian translations for sdcv package -# sdcv. +# Английские переводы для пакета sdcv. # Copyright (C) 2004 THE sdcv'S COPYRIGHT HOLDER # This file is distributed under the same license as the sdcv package. # , 2004. # msgid "" msgstr "" -"Project-Id-Version: sdcv 0.3\n" +"Project-Id-Version: sdcv 0.5\n" "Report-Msgid-Bugs-To: dushistov@mail.ru\n" "POT-Creation-Date: 2008-09-24 10:54+0200\n" -"PO-Revision-Date: 2013-07-06 18:20+0400\n" +"PO-Revision-Date: 2013-07-07 17:03+0400\n" "Last-Translator: Evgeniy Dushistov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=KOI8-R\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: src/sdcv.cpp:108 -#, fuzzy +#: src/sdcv.cpp:76 msgid "display version information and exit" -msgstr "-v, --version \n" +msgstr "показать номер версии и завершить работу" -#: src/sdcv.cpp:110 -#, fuzzy +#: src/sdcv.cpp:78 msgid "display list of available dictionaries and exit" -msgstr "" -"-l, --list-dicts " -"\n" +msgstr "показать список доступных словарей и завершить работу" -#: src/sdcv.cpp:112 -#, fuzzy +#: src/sdcv.cpp:80 msgid "for search use only dictionary with this bookname" -msgstr "" -"-u, --use-dict \n" +msgstr "для поиска использовать только этот словарь с таким именем" -#: src/sdcv.cpp:113 +#: src/sdcv.cpp:81 msgid "bookname" -msgstr "" +msgstr "имя_словаря" -#: src/sdcv.cpp:115 +#: src/sdcv.cpp:83 msgid "for use in scripts" -msgstr " " +msgstr "для использования в скриптах" -#: src/sdcv.cpp:117 -#, fuzzy +#: src/sdcv.cpp:85 msgid "output must be in utf8" -msgstr "--utf8-output utf8\n" +msgstr "вывод программы должен быть в utf8" -#: src/sdcv.cpp:119 -#, fuzzy +#: src/sdcv.cpp:87 msgid "input of sdcv in utf8" -msgstr "--utf8-input utf8\n" +msgstr "ввод программы в utf8" -#: src/sdcv.cpp:121 -#, fuzzy +#: src/sdcv.cpp:89 msgid "use this directory as path to stardict data directory" -msgstr " stardict data directory\n" +msgstr "использовать эту директорию в качестве пути к \"stardict data\" директории" -#: src/sdcv.cpp:122 +#: src/sdcv.cpp:90 msgid "path/to/dir" -msgstr "//" +msgstr "путь/до/директории" -#: src/sdcv.cpp:129 +#: src/sdcv.cpp:97 msgid " words" -msgstr "" +msgstr "слова" + +#: src/sdcv.cpp:103 +#, c-format +msgid "Invalid command line arguments: %s\n" +msgstr "Неправильный аргумент командой строки: %s\n" + +#: src/sdcv.cpp:109 +#, c-format +msgid "Console version of Stardict, version %s\n" +msgstr "Консольная версия StarDict, версия %s\n" #: src/sdcv.cpp:135 #, c-format -msgid "Invalid command line arguments: %s\n" -msgstr " : %s\n" - -#: src/sdcv.cpp:141 -#, c-format -msgid "Console version of Stardict, version %s\n" -msgstr " StarDict, %s\n" +msgid "Dictionary's name Word count\n" +msgstr "Название словаря Количество слов\n" #: src/sdcv.cpp:170 #, c-format -msgid "Dictionary's name Word count\n" -msgstr " \n" - -#: src/sdcv.cpp:192 -#, c-format msgid "g_mkdir failed: %s\n" -msgstr "g_mkdir : %s\n" +msgstr "g_mkdir завершился с ошибкой: %s\n" -#: src/sdcv.cpp:208 +#: src/sdcv.cpp:185 msgid "Enter word or phrase: " -msgstr " : " +msgstr "Введите слово или фразу: " -#: src/sdcv.cpp:216 +#: src/sdcv.cpp:193 #, c-format msgid "There are no words/phrases to translate.\n" -msgstr " / .\n" +msgstr "Не задано слова/фразы для перевода.\n" -#: src/libwrapper.cpp:248 +#: src/libwrapper.cpp:249 msgid "popen failed" -msgstr " popen " +msgstr "функция popen завершилась с ошибкой" -#: src/libwrapper.cpp:285 src/utils.cpp:67 +#: src/libwrapper.cpp:286 src/utils.cpp:67 #, c-format msgid "Can not convert %s to utf8.\n" -msgstr " %s utf8.\n" +msgstr "Не могу преобразовать %s в utf8.\n" -#: src/libwrapper.cpp:342 src/libwrapper.cpp:370 -#, fuzzy, c-format +#: src/libwrapper.cpp:340 src/libwrapper.cpp:367 +#, c-format msgid "Found %zu items, similar to %s.\n" -msgstr " %zu , %s.\n" +msgstr "Найдено %zu слов, похожих на %s.\n" -#: src/libwrapper.cpp:356 +#: src/libwrapper.cpp:353 msgid "Your choice[-1 to abort]: " -msgstr " [-1 - ]:" +msgstr "Ваш выбор[-1 - отмена]: " -#: src/libwrapper.cpp:365 -#, fuzzy, c-format +#: src/libwrapper.cpp:362 +#, c-format msgid "" "Invalid choice.\n" "It must be from 0 to %zu or -1.\n" msgstr "" -" .\n" -" 0 %zu -1.\n" +"Неправильный выбор.\n" +"Должно быть от 0 до %zu или -1.\n" -#: src/libwrapper.cpp:381 +#: src/libwrapper.cpp:378 #, c-format msgid "Nothing similar to %s, sorry :(\n" -msgstr " %s, :(\n" +msgstr "Ничего похожего на %s, извините :(\n" #: src/utils.cpp:45 #, c-format msgid "Can not convert %s to current locale.\n" -msgstr " %s .\n" - -#~ msgid "" -#~ "Unknown option.\n" -#~ "Try '%s --help' for more information.\n" -#~ msgstr "" -#~ " .\n" -#~ " '%s --help' .\n" - -#~ msgid "Usage: %s [OPTIONS] words\n" -#~ msgstr ": %s [] \n" - -#~ msgid "-h, --help display this help and exit\n" -#~ msgstr "" -#~ "-h, --help \n" - -#~ msgid "-n, --non-interactive for use in scripts\n" -#~ msgstr "-n, --non-interactive ''\n" - -#~ msgid "There is no dictionary with this bookname: %s.\n" -#~ msgstr " : %s.\n" +msgstr "Не могу преобразовать %s в локальную кодировку.\n" diff --git a/po/sdcv.pot b/po/sdcv.pot index 1d2912c..080b905 100644 --- a/po/sdcv.pot +++ b/po/sdcv.pot @@ -3,10 +3,9 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: sdcv 0.5\n" "Report-Msgid-Bugs-To: dushistov@mail.ru\n" "POT-Creation-Date: 2008-09-24 10:54+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" @@ -16,101 +15,101 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: src/sdcv.cpp:108 +#: src/sdcv.cpp:76 msgid "display version information and exit" msgstr "" -#: src/sdcv.cpp:110 +#: src/sdcv.cpp:78 msgid "display list of available dictionaries and exit" msgstr "" -#: src/sdcv.cpp:112 +#: src/sdcv.cpp:80 msgid "for search use only dictionary with this bookname" msgstr "" -#: src/sdcv.cpp:113 +#: src/sdcv.cpp:81 msgid "bookname" msgstr "" -#: src/sdcv.cpp:115 +#: src/sdcv.cpp:83 msgid "for use in scripts" msgstr "" -#: src/sdcv.cpp:117 +#: src/sdcv.cpp:85 msgid "output must be in utf8" msgstr "" -#: src/sdcv.cpp:119 +#: src/sdcv.cpp:87 msgid "input of sdcv in utf8" msgstr "" -#: src/sdcv.cpp:121 +#: src/sdcv.cpp:89 msgid "use this directory as path to stardict data directory" msgstr "" -#: src/sdcv.cpp:122 +#: src/sdcv.cpp:90 msgid "path/to/dir" msgstr "" -#: src/sdcv.cpp:129 +#: src/sdcv.cpp:97 msgid " words" msgstr "" -#: src/sdcv.cpp:135 +#: src/sdcv.cpp:103 #, c-format msgid "Invalid command line arguments: %s\n" msgstr "" -#: src/sdcv.cpp:141 +#: src/sdcv.cpp:109 #, c-format msgid "Console version of Stardict, version %s\n" msgstr "" -#: src/sdcv.cpp:170 +#: src/sdcv.cpp:135 #, c-format msgid "Dictionary's name Word count\n" msgstr "" -#: src/sdcv.cpp:192 +#: src/sdcv.cpp:170 #, c-format msgid "g_mkdir failed: %s\n" msgstr "" -#: src/sdcv.cpp:208 +#: src/sdcv.cpp:185 msgid "Enter word or phrase: " msgstr "" -#: src/sdcv.cpp:216 +#: src/sdcv.cpp:193 #, c-format msgid "There are no words/phrases to translate.\n" msgstr "" -#: src/libwrapper.cpp:248 +#: src/libwrapper.cpp:249 msgid "popen failed" msgstr "" -#: src/libwrapper.cpp:285 src/utils.cpp:67 +#: src/libwrapper.cpp:286 src/utils.cpp:67 #, c-format msgid "Can not convert %s to utf8.\n" msgstr "" -#: src/libwrapper.cpp:342 src/libwrapper.cpp:370 +#: src/libwrapper.cpp:340 src/libwrapper.cpp:367 #, c-format msgid "Found %zu items, similar to %s.\n" msgstr "" -#: src/libwrapper.cpp:356 +#: src/libwrapper.cpp:353 msgid "Your choice[-1 to abort]: " msgstr "" -#: src/libwrapper.cpp:365 +#: src/libwrapper.cpp:362 #, c-format msgid "" "Invalid choice.\n" "It must be from 0 to %zu or -1.\n" msgstr "" -#: src/libwrapper.cpp:381 +#: src/libwrapper.cpp:378 #, c-format msgid "Nothing similar to %s, sorry :(\n" msgstr "" diff --git a/po/stamp-po b/po/stamp-po deleted file mode 100644 index 9788f70..0000000 --- a/po/stamp-po +++ /dev/null @@ -1 +0,0 @@ -timestamp diff --git a/src/sdcv.cpp b/src/sdcv.cpp index a503cd4..d821c7b 100644 --- a/src/sdcv.cpp +++ b/src/sdcv.cpp @@ -59,7 +59,10 @@ int main(int argc, char *argv[]) { setlocale(LC_ALL, ""); #if ENABLE_NLS - bindtextdomain("sdcv", GETTEXT_TRANSLATIONS_PATH); + bindtextdomain("sdcv", + //"./locale"//< for testing + GETTEXT_TRANSLATIONS_PATH//< should be + ); textdomain("sdcv"); #endif @@ -71,7 +74,7 @@ int main(int argc, char *argv[]) gboolean utf8_input = FALSE; glib::CharStr opt_data_dir; - GOptionEntry entries[] = { + const GOptionEntry entries[] = { {"version", 'v', 0, G_OPTION_ARG_NONE, &show_version, _("display version information and exit"), nullptr }, {"list-dicts", 'l', 0, G_OPTION_ARG_NONE, &show_list_dicts, @@ -92,18 +95,16 @@ int main(int argc, char *argv[]) }; glib::Error error; - GOptionContext *context; - - context = g_option_context_new(_(" words")); - g_option_context_set_help_enabled(context, TRUE); - g_option_context_add_main_entries(context, entries, nullptr); - const gboolean parse_res = g_option_context_parse(context, &argc, &argv, get_addr(error)); - g_option_context_free(context); - if (!parse_res) { - fprintf(stderr, _("Invalid command line arguments: %s\n"), - error->message); - return EXIT_FAILURE; - } + GOptionContext *context = g_option_context_new(_(" words")); + g_option_context_set_help_enabled(context, TRUE); + g_option_context_add_main_entries(context, entries, nullptr); + const gboolean parse_res = g_option_context_parse(context, &argc, &argv, get_addr(error)); + g_option_context_free(context); + if (!parse_res) { + fprintf(stderr, _("Invalid command line arguments: %s\n"), + error->message); + return EXIT_FAILURE; + } if (show_version) { printf(_("Console version of Stardict, version %s\n"), gVersion);