diff options
author | i026e <klev.paul@gmail.com> | 2016-12-15 10:23:35 +0300 |
---|---|---|
committer | i026e <klev.paul@gmail.com> | 2016-12-15 10:23:35 +0300 |
commit | 862654ef9dda3522f5e8282e8b5c50e891198f01 (patch) | |
tree | d3ad7ae10d526737c9a972474be0667d955d3cc6 | |
parent | translations (diff) | |
download | mime_types_editor-862654ef9dda3522f5e8282e8b5c50e891198f01.tar.gz mime_types_editor-862654ef9dda3522f5e8282e8b5c50e891198f01.tar.bz2 mime_types_editor-862654ef9dda3522f5e8282e8b5c50e891198f01.zip |
translations
-rw-r--r-- | po/ru.po | 196 | ||||
-rw-r--r-- | src/common/mime_categories.py | 33 | ||||
-rw-r--r-- | src/mime_editor.py | 7 |
3 files changed, 217 insertions, 19 deletions
diff --git a/po/ru.po b/po/ru.po new file mode 100644 index 0000000..c58d17e --- /dev/null +++ b/po/ru.po @@ -0,0 +1,196 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE mime-editor-gui'S COPYRIGHT HOLDER +# This file is distributed under the same license as the mime-editor-gui package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: mime-editor-gui \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-15 10:22+0300\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" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/cat_mode/ui_cat_mode.glade:275 +msgid "..." +msgstr "..." + +#: src/cat_mode/ui_cat_mode.glade:124 +msgid "... or enter custom command" +msgstr "... или введите свою команду" + +#: src/app_mode/ui_app_mode.glade:213 +msgid "Add association" +msgstr "Добавить ассоциацию" + +#: src/app_mode/ui_app_mode.glade:60 +msgid "Add new app" +msgstr "Добавить приложение" + +#: src/app_mode/ui_app_mode.glade:192 +msgid "Add new mime type" +msgstr "Добавить тип" + +#: src/common/mime_categories.py:12 +msgid "All" +msgstr "Все" + +#: src/app_mode/mime_editor_app_mode.py:73 +#: src/cat_mode/mime_editor_cat_mode.py:188 src/common/mime_categories.py:21 +msgid "Application" +msgstr "Приложение" + +#: src/app_mode/ui_app_mode.glade:571 +msgid "Application command" +msgstr "Команда" + +#: src/app_mode/ui_app_mode.glade:490 +msgid "Application name" +msgstr "Имя" + +#: src/common/mime_categories.py:22 +msgid "Audio" +msgstr "Аудио" + +#: src/cat_mode/mime_editor_cat_mode.py:48 +msgid "Categories" +msgstr "Категории" + +#: src/app_mode/mime_editor_app_mode.py:227 +#: src/cat_mode/mime_editor_cat_mode.py:135 +msgid "Choose an application" +msgstr "Выберите приложение" + +#: src/app_mode/ui_app_mode.glade:105 +msgid "Command" +msgstr "Команда" + +#: src/cat_mode/mime_editor_cat_mode.py:193 +msgid "Command line" +msgstr "Командная строка" + +#: src/app_mode/ui_app_mode.glade:303 +msgid "Delete" +msgstr "Удалить" + +#: src/cat_mode/ui_cat_mode.glade:159 +msgid "Edit" +msgstr "Правка" + +#: src/common/mime_view.py:116 +msgid "File Type" +msgstr "Тип файла" + +#: src/ui_main_window.glade:124 +msgid "Group by applications" +msgstr "Группировать по приложению" + +#: src/ui_main_window.glade:116 +msgid "Group by categories" +msgstr "Группировать по категории" + +#: src/app_mode/ui_app_mode.glade:399 +msgid "Hide invisible" +msgstr "Скрыть невидимые" + +#: src/common/mime_categories.py:23 +msgid "Image" +msgstr "Изображение" + +#: src/app_mode/ui_app_mode.glade:279 +msgid "Mark" +msgstr "Отметить" + +#: src/app_mode/mime_view_app_mode.py:103 +msgid "Mime Type" +msgstr "Тип" + +#: src/app_mode/ui_app_mode.glade:83 +msgid "Name" +msgstr "Имя" + +#: src/app_mode/ui_app_mode.glade:422 src/app_mode/ui_app_mode.glade:673 +msgid "Options" +msgstr "Опции" + +#: src/cat_mode/mime_view_cat_mode.py:81 +msgid "Program" +msgstr "Программа" + +#: src/app_mode/ui_app_mode.glade:318 +msgid "Reset" +msgstr "Сброс" + +#: src/cat_mode/ui_cat_mode.glade:168 +msgid "Revert" +msgstr "Отменить" + +#: src/cat_mode/ui_cat_mode.glade:178 +msgid "Select" +msgstr "Выбрать" + +#: src/cat_mode/ui_cat_mode.glade:7 +msgid "Select Application" +msgstr "Выберите приложение" + +#: src/cat_mode/ui_cat_mode.glade:252 +msgid "Select default application for following filetype(s):" +msgstr "Установить приложение для следующих типов" + +#: src/cat_mode/ui_cat_mode.glade:64 +msgid "Select from list ..." +msgstr "Выберите из списка" + +#: src/app_mode/ui_app_mode.glade:230 +msgid "Set default application" +msgstr "Установить приложение по умолчанию" + +#: src/app_mode/ui_app_mode.glade:639 +msgid "Show all for" +msgstr "Показать все" + +#: src/cat_mode/ui_cat_mode.glade:409 +msgid "Show only associated types" +msgstr "Показать только имеющие приложение" + +#: src/app_mode/ui_app_mode.glade:624 +msgid "Show only registered" +msgstr "Показать только зарегистрированные" + +#: src/common/mime_categories.py:24 +msgid "Text" +msgstr "Текст" + +#: src/app_mode/ui_app_mode.glade:288 +msgid "Unmark" +msgstr "Снять отметку" + +#: src/common/mime_categories.py:25 +msgid "Video" +msgstr "Видео" + +#: src/app_mode/ui_app_mode.glade:383 +msgid "With file support only" +msgstr "Только с поддержкой файлов" + +#: src/ui_main_window.glade:56 +msgid "_Edit" +msgstr "_Правка" + +#: src/ui_main_window.glade:26 +msgid "_File" +msgstr "_Файл" + +#: src/ui_main_window.glade:137 +msgid "_Help" +msgstr "_Справка" + +#: src/ui_main_window.glade:106 +msgid "_View" +msgstr "_Вид" diff --git a/src/common/mime_categories.py b/src/common/mime_categories.py index 0d4481e..d092982 100644 --- a/src/common/mime_categories.py +++ b/src/common/mime_categories.py @@ -5,24 +5,25 @@ Created on Tue Dec 6 14:51:39 2016 @author: pavel """ +from locale import gettext as _ ANY_CATEGORY = "any" -ANY_CATEGORY_ID = 0 -ANY_CATEGORY_NAME = "All" +ANY_CATEGORY_ID = 0 +ANY_CATEGORY_NAME = _("All") ANY_CATEGORY_ICON = "unknown" CATEGORY_IDS = {"application" : 1, - "audio" : 2, + "audio" : 2, "image" : 3, - "text" : 4, + "text" : 4, "video" : 5, } -CATEGORY_NAMES = { "application" : "Application" , - "audio" : "Audio", - "image" : "Image", - "text" : "Text", - "video" : "Video"} - +CATEGORY_NAMES = { "application" : _("Application") , + "audio" : _("Audio"), + "image" : _("Image"), + "text" : _("Text"), + "video" : _("Video")} + # name, icon CATEGORY_ICONS = {"application" : "application-x-executable", "audio" : "audio-x-generic", @@ -33,22 +34,22 @@ CATEGORY_ICONS = {"application" : "application-x-executable", def get_category_id(mime_type): if mime_type is None: return ANY_CATEGORY_ID - + slash_ind = mime_type.find("/") - + if slash_ind <= 0: return ANY_CATEGORY_ID - + top_level = mime_type[:slash_ind] return CATEGORY_IDS.get(top_level, ANY_CATEGORY_ID) def get_category_name(cat): return CATEGORY_NAMES.get(cat, ANY_CATEGORY_NAME) - + def get_known_categories(): """ list of (category, category name, id) """ - return [(cat , get_category_name(cat), id_) for cat, id_ + return [(cat , get_category_name(cat), id_) for cat, id_ in CATEGORY_IDS.items()] def get_icon_name(cat) : - return CATEGORY_ICONS.get(cat, ANY_CATEGORY_ICON)
\ No newline at end of file + return CATEGORY_ICONS.get(cat, ANY_CATEGORY_ICON) diff --git a/src/mime_editor.py b/src/mime_editor.py index eb8931f..a555720 100644 --- a/src/mime_editor.py +++ b/src/mime_editor.py @@ -6,6 +6,7 @@ Created on Wed Dec 7 15:11:32 2016 @author: pavel """ import os +APP = "mime-editor-gui" DIR = os.path.dirname(os.path.realpath(__file__)) import sys @@ -19,8 +20,8 @@ from gi.repository import Gtk import locale locale.setlocale(locale.LC_ALL, '') -if os.path.isdir("./locale"): - locale.bindtextdomain(APP, "./locale") +if os.path.isdir("../locale"): + locale.bindtextdomain(APP, "../locale") locale.textdomain(APP) from locale import gettext as _ @@ -30,7 +31,7 @@ signal.signal(signal.SIGINT, signal.SIG_DFL) #handle Ctrl-C import mime_editor_app_mode import mime_editor_cat_mode -APP = os.path.join(DIR, "mime-editor-gui") + GLADE_FILE = "ui_main_window.glade" editor_modes = { "app_mode" : mime_editor_app_mode.MainWidget, |