10591 Commits

Author SHA1 Message Date
Yen Chi Hsuan
04546db7b0 [setup.py] Fix for Python 3.2 2016-01-17 17:39:09 +08:00
Yen Chi Hsuan
b42444d38b [utils] I18N: fix for Python 2.6
Using zipfile directly as a context manager is not supported until
Python 2.7
2016-01-17 17:09:39 +08:00
Yen Chi Hsuan
1aee79da3e [test_i18n] Correctly skip tests in non-virtualenv 2016-01-17 16:58:38 +08:00
Yen Chi Hsuan
5ebbe780fe [test_i18n] Add a test case for zipped app 2016-01-17 16:53:44 +08:00
Yen Chi Hsuan
fecfb0554c [utils] Load translations from zipped app 2016-01-17 16:53:21 +08:00
Yen Chi Hsuan
216c21f532 [Makefile] Create zipped app with *.mo file 2016-01-17 16:51:05 +08:00
Yen Chi Hsuan
8843ac8c54 [test_i18n] Add a test case for I18N 2016-01-17 16:33:47 +08:00
Yen Chi Hsuan
a2aae628a0 [i18n] New extractor for I18N testing 2016-01-17 16:33:26 +08:00
Yen Chi Hsuan
3242f7edd2 [options] Rename --default-language to --lang 2016-01-02 01:13:26 +08:00
Yen Chi Hsuan
ca28223111 [devscripts/i18n] Remove -j when regenerating youtube_dl.pot
This option leave unnecessary comments in youtube_dl.pot
2015-12-29 03:35:55 +08:00
Yen Chi Hsuan
bf3a04bc00 [__init__] Disable localization if --verbose given
--verbose is used for debugging, and we don't want to receive
non-English bug reports.
2015-12-29 03:29:23 +08:00
Yen Chi Hsuan
7bdc9cc044 [utils] Remove a redundant check in I18N 2015-12-27 21:56:57 +08:00
Yen Chi Hsuan
8a54fa704f Generate .mo files before running test 2015-12-26 15:28:41 +08:00
Yen Chi Hsuan
cedf7b1510 [utils] Add a cache for translations 2015-12-26 05:47:51 +08:00
Yen Chi Hsuan
312bfeca77 [utils] Also search .mo files in sys.prefix 2015-12-26 05:29:52 +08:00
Yen Chi Hsuan
af9c89ba07 [test_utils] Add a basic test for i18n 2015-12-26 05:13:50 +08:00
Yen Chi Hsuan
a5f07800dd [utils] Check .mo files instead of directories in root dirs
For example, nosetests imports yuotube_dl, get_root_dir() returns /usr
and the current directory. /usr/share/locale is picked in the original
implementation.
2015-12-26 05:05:19 +08:00
Yen Chi Hsuan
163f0a511c [devscripts/i18n] unicode_literals 2015-12-26 05:00:54 +08:00
Yen Chi Hsuan
e556aa643d [utils] Preliminary fix for Python2 with non-ASCII paths 2015-12-20 18:57:14 +08:00
Yen Chi Hsuan
c0450e2014 [utils] Capture the error that mo files not found in LOCALE_DATA.ZIP 2015-12-13 05:09:41 +08:00
Yen Chi Hsuan
7da2b9e3bc [options/utils] Add --default-language 2015-12-13 05:00:26 +08:00
Yen Chi Hsuan
7969009f00 [setup.py] Windows resource names are always capitalized 2015-12-13 03:40:55 +08:00
Yen Chi Hsuan
638a4d8689 Revert "Drop Windows EXE support for gettext"
This reverts commit 995f5036ca0eee575f5a8e15c62766f690ce10e2.
2015-12-13 03:40:09 +08:00
Yen Chi Hsuan
d8257c57d8 [i18n] Use tr() instead of g() 2015-12-13 03:33:40 +08:00
Yen Chi Hsuan
4fe08dc18d Remove an extra blank line 2015-12-13 01:18:21 +08:00
Yen Chi Hsuan
d13823ec7c [po/zh_TW] Update comments for zh_TW translation 2015-12-13 01:16:00 +08:00
Yen Chi Hsuan
b8feb749b0 Ignore .pot.old files as well 2015-12-13 01:12:40 +08:00
Yen Chi Hsuan
3f0b6207f8 [po/zh_TW] Use halfwidth colons 2015-12-13 01:09:33 +08:00
Yen Chi Hsuan
efd28c9cd5 [devscripts/i18n] Keep youtube_dl.pot metadata in update-pot 2015-12-13 00:58:55 +08:00
Yen Chi Hsuan
37ee86e29a [devscripts/i18n] Remove an unused line 2015-12-13 00:45:55 +08:00
Yen Chi Hsuan
6730d3da38 [po] Add descriptive comments to youtube_dl.pot 2015-12-13 00:45:10 +08:00
Yen Chi Hsuan
1574e2ba64 [devscripts/i18n] Sorted POT file 2015-12-13 00:42:53 +08:00
Yen Chi Hsuan
995f5036ca Drop Windows EXE support for gettext 2015-12-13 00:22:37 +08:00
Yen Chi Hsuan
89442a0e26 [utils] Get root dir from root module's __file__ 2015-12-13 00:15:11 +08:00
Yen Chi Hsuan
8b92b7fb8d Include mo files in pip installations 2015-12-13 00:15:11 +08:00
Yen Chi Hsuan
840f6d04b6 [Makefile] Shortcuts for handling mo files 2015-12-13 00:15:11 +08:00
Yen Chi Hsuan
bbfacce13c [utils] Load .mo in easy_install installation and Windows EXE 2015-12-13 00:15:11 +08:00
Yen Chi Hsuan
f344e796f8 Bundle .mo files into a Windows EXE resource 2015-12-13 00:15:11 +08:00
Yen Chi Hsuan
7309cee4a0 [utils] Remove unused codes 2015-12-13 00:15:11 +08:00
Yen Chi Hsuan
ef95dc7816 [devscripts/i18n] Fix rename for Windows 2015-12-13 00:15:11 +08:00
Yen Chi Hsuan
bf8c5886ed [utils] Detect language on Windows 2015-12-13 00:15:11 +08:00
Yen Chi Hsuan
3719a34a22 [utils] Fix gettext in Python2
In Python 2, gettext() returns bytes
2015-12-13 00:15:11 +08:00
Yen Chi Hsuan
22be0be224 Use Python scripts for better portability 2015-12-13 00:15:11 +08:00
Yen Chi Hsuan
ddd2737be5 Add po template and and zh_TW translation 2015-12-13 00:15:11 +08:00
Yen Chi Hsuan
e88797e463 Use gettext for some strings 2015-12-13 00:15:11 +08:00
Yen Chi Hsuan
0712751165 Introduce GNU gettext infrastructure 2015-12-13 00:15:11 +08:00
Yen Chi Hsuan
deb1e8d20e [youku] Put the missing item to get_hd 2015-12-12 15:49:19 +08:00
Yen Chi Hsuan
174964a7bc Credit @Celthi for fixing Youku extractor 2015-12-12 15:34:40 +08:00
Yen Chi Hsuan
9c568178fb Merge branch 'Celthi-youku_bugfix' 2015-12-12 15:26:43 +08:00
Yen Chi Hsuan
dbb7d7e26c [youku] Reorder format items 2015-12-12 15:24:58 +08:00