From a2aae628a0a1a6c95664ace01960b3656cdce13c Mon Sep 17 00:00:00 2001 From: Yen Chi Hsuan Date: Sun, 17 Jan 2016 16:33:26 +0800 Subject: [PATCH] [i18n] New extractor for I18N testing --- po/youtube_dl.pot | 6 +++++- po/zh_TW.po | 6 +++++- youtube_dl/extractor/__init__.py | 1 + youtube_dl/extractor/i18ntest.py | 13 +++++++++++++ 4 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 youtube_dl/extractor/i18ntest.py diff --git a/po/youtube_dl.pot b/po/youtube_dl.pot index b29b329c5..199819e02 100644 --- a/po/youtube_dl.pot +++ b/po/youtube_dl.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-12-13 03:32+0800\n" +"POT-Creation-Date: 2016-01-17 16:08+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -46,6 +46,10 @@ msgstr "" msgid "%s: Downloading webpage" msgstr "" +#: youtube_dl/extractor/i18ntest.py:13 +msgid "I18N test message" +msgstr "" + #: youtube_dl/extractor/testurl.py:65 #, python-format msgid "Test URL: %s" diff --git a/po/zh_TW.po b/po/zh_TW.po index 567e77d01..99484cec3 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-12-13 00:33+0800\n" +"POT-Creation-Date: 2016-01-17 16:08+0800\n" "PO-Revision-Date: 2015-12-13 01:04+0800\n" "Last-Translator: yan12125@gmail.com\n" "Language-Team: Chinese (traditional)\n" @@ -47,6 +47,10 @@ msgstr "[下載] " msgid "%s: Downloading webpage" msgstr "%s: 下載網頁" +#: youtube_dl/extractor/i18ntest.py:13 +msgid "I18N test message" +msgstr "I18N測試訊息" + #: youtube_dl/extractor/testurl.py:65 #, python-format msgid "Test URL: %s" diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py index 3cd95ba01..541b329c4 100644 --- a/youtube_dl/extractor/__init__.py +++ b/youtube_dl/extractor/__init__.py @@ -251,6 +251,7 @@ from .howcast import HowcastIE from .howstuffworks import HowStuffWorksIE from .huffpost import HuffPostIE from .hypem import HypemIE +from .i18ntest import I18NTestIE from .iconosquare import IconosquareIE from .ign import IGNIE, OneUPIE from .imdb import ( diff --git a/youtube_dl/extractor/i18ntest.py b/youtube_dl/extractor/i18ntest.py new file mode 100644 index 000000000..858db723b --- /dev/null +++ b/youtube_dl/extractor/i18ntest.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +from __future__ import unicode_literals + +from .common import InfoExtractor +from ..utils import tr + + +class I18NTestIE(InfoExtractor): + _VALID_URL = 'i18n:test' + + def _real_extract(self, url): + self._downloader.to_screen(tr('I18N test message'))