mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-08-14 06:54:43 -05:00
grammar fix: 'multibyte filename' is ambiguous. They are replaced with 'non-ASCII filename'. refs #703
This commit is contained in:
@@ -18,7 +18,7 @@ Bugs fixed
|
|||||||
a named target.
|
a named target.
|
||||||
* A wrong condition broke the search feature on first page that is usually
|
* A wrong condition broke the search feature on first page that is usually
|
||||||
index.rst. This issue was introduced in 1.2b1.
|
index.rst. This issue was introduced in 1.2b1.
|
||||||
* #703: When Sphinx can't decode filenames with multibyte characters, Sphinx now
|
* #703: When Sphinx can't decode filenames with non-ASCII characters, Sphinx now
|
||||||
catches UnicodeError and will continue if possible instead of raising the
|
catches UnicodeError and will continue if possible instead of raising the
|
||||||
exception.
|
exception.
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ Bugs fixed
|
|||||||
* #1189: "Title underline is too short" WARNING is given when using fullwidth
|
* #1189: "Title underline is too short" WARNING is given when using fullwidth
|
||||||
characters to "Project name" on quickstart.
|
characters to "Project name" on quickstart.
|
||||||
* #1190: Output TeX/texinfo/man filename has no basename (only extension)
|
* #1190: Output TeX/texinfo/man filename has no basename (only extension)
|
||||||
when using multibyte characters in the "Project name" on quickstart.
|
when using non-ASCII characters in the "Project name" on quickstart.
|
||||||
* #1192: Fix escaping problem for hyperlinks in the manpage writer.
|
* #1192: Fix escaping problem for hyperlinks in the manpage writer.
|
||||||
* #1193: Fix i18n: multiple link references in the same line return the same
|
* #1193: Fix i18n: multiple link references in the same line return the same
|
||||||
link.
|
link.
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ def walk(top, topdown=True, followlinks=False):
|
|||||||
fullpath = path.join(top, name)
|
fullpath = path.join(top, name)
|
||||||
except UnicodeError:
|
except UnicodeError:
|
||||||
print >>sys.stderr, (
|
print >>sys.stderr, (
|
||||||
'%s:: ERROR: multibyte filename not supported on this '
|
'%s:: ERROR: non-ASCII filename not supported on this '
|
||||||
'filesystem encoding %r, skipped.' % (name, fs_encoding))
|
'filesystem encoding %r, skipped.' % (name, fs_encoding))
|
||||||
continue
|
continue
|
||||||
if path.isdir(fullpath):
|
if path.isdir(fullpath):
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ def test_events(app):
|
|||||||
|
|
||||||
|
|
||||||
@with_app()
|
@with_app()
|
||||||
def test_emit_with_multibyte_name_node(app):
|
def test_emit_with_nonascii_name_node(app):
|
||||||
node = nodes.section(names=[u'\u65e5\u672c\u8a9e'])
|
node = nodes.section(names=[u'\u65e5\u672c\u8a9e'])
|
||||||
app.emit('my_event', node)
|
app.emit('my_event', node)
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -73,7 +73,7 @@ def test_pseudoxml(app):
|
|||||||
app.builder.build_all()
|
app.builder.build_all()
|
||||||
|
|
||||||
@with_app(buildername='html', srcdir='(temp)')
|
@with_app(buildername='html', srcdir='(temp)')
|
||||||
def test_multibyte_path(app):
|
def test_nonascii_path(app):
|
||||||
srcdir = path(app.srcdir)
|
srcdir = path(app.srcdir)
|
||||||
mb_name = u'\u65e5\u672c\u8a9e'
|
mb_name = u'\u65e5\u672c\u8a9e'
|
||||||
try:
|
try:
|
||||||
@@ -81,7 +81,7 @@ def test_multibyte_path(app):
|
|||||||
except UnicodeEncodeError:
|
except UnicodeEncodeError:
|
||||||
from path import FILESYSTEMENCODING
|
from path import FILESYSTEMENCODING
|
||||||
raise SkipTest(
|
raise SkipTest(
|
||||||
'multibyte filename not supported on this filesystem encoding: '
|
'nonascii filename not supported on this filesystem encoding: '
|
||||||
'%s', FILESYSTEMENCODING)
|
'%s', FILESYSTEMENCODING)
|
||||||
|
|
||||||
(srcdir / mb_name / (mb_name + '.txt')).write_text(dedent("""
|
(srcdir / mb_name / (mb_name + '.txt')).write_text(dedent("""
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ def test_lineblock(app):
|
|||||||
|
|
||||||
|
|
||||||
@with_text_app()
|
@with_text_app()
|
||||||
def test_multibyte_title_line(app):
|
def test_nonascii_title_line(app):
|
||||||
title = u'\u65e5\u672c\u8a9e'
|
title = u'\u65e5\u672c\u8a9e'
|
||||||
underline = u'=' * column_width(title)
|
underline = u'=' * column_width(title)
|
||||||
content = u'\n'.join((title, underline, u''))
|
content = u'\n'.join((title, underline, u''))
|
||||||
@@ -101,7 +101,7 @@ def test_multibyte_title_line(app):
|
|||||||
|
|
||||||
|
|
||||||
@with_text_app()
|
@with_text_app()
|
||||||
def test_multibyte_table(app):
|
def test_nonascii_table(app):
|
||||||
text = u'\u65e5\u672c\u8a9e'
|
text = u'\u65e5\u672c\u8a9e'
|
||||||
contents = (u"\n.. list-table::"
|
contents = (u"\n.. list-table::"
|
||||||
"\n"
|
"\n"
|
||||||
@@ -122,7 +122,7 @@ def test_multibyte_table(app):
|
|||||||
|
|
||||||
|
|
||||||
@with_text_app()
|
@with_text_app()
|
||||||
def test_multibyte_maxwidth(app):
|
def test_nonascii_maxwidth(app):
|
||||||
sb_text = u'abc' #length=3
|
sb_text = u'abc' #length=3
|
||||||
mb_text = u'\u65e5\u672c\u8a9e' #length=3
|
mb_text = u'\u65e5\u672c\u8a9e' #length=3
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ def test_do_prompt():
|
|||||||
raises(AssertionError, qs.do_prompt, d, 'k6', 'Q6', validator=qs.boolean)
|
raises(AssertionError, qs.do_prompt, d, 'k6', 'Q6', validator=qs.boolean)
|
||||||
|
|
||||||
|
|
||||||
def test_do_prompt_with_multibyte():
|
def test_do_prompt_with_nonascii():
|
||||||
d = {}
|
d = {}
|
||||||
answers = {
|
answers = {
|
||||||
'Q1': u'\u30c9\u30a4\u30c4',
|
'Q1': u'\u30c9\u30a4\u30c4',
|
||||||
@@ -118,7 +118,7 @@ def test_do_prompt_with_multibyte():
|
|||||||
qs.do_prompt(d, 'k1', 'Q1', default=u'\u65e5\u672c')
|
qs.do_prompt(d, 'k1', 'Q1', default=u'\u65e5\u672c')
|
||||||
except UnicodeEncodeError:
|
except UnicodeEncodeError:
|
||||||
raise SkipTest(
|
raise SkipTest(
|
||||||
'multibyte console input not supported on this encoding: %s',
|
'non-ASCII console input not supported on this encoding: %s',
|
||||||
qs.TERM_ENCODING)
|
qs.TERM_ENCODING)
|
||||||
assert d['k1'] == u'\u30c9\u30a4\u30c4'
|
assert d['k1'] == u'\u30c9\u30a4\u30c4'
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ def test_build_sphinx(pkgroot, proc):
|
|||||||
|
|
||||||
|
|
||||||
@with_setup_command(root)
|
@with_setup_command(root)
|
||||||
def test_build_sphinx_with_multibyte_path(pkgroot, proc):
|
def test_build_sphinx_with_nonascii_path(pkgroot, proc):
|
||||||
mb_name = u'\u65e5\u672c\u8a9e'
|
mb_name = u'\u65e5\u672c\u8a9e'
|
||||||
srcdir = (pkgroot / 'doc')
|
srcdir = (pkgroot / 'doc')
|
||||||
try:
|
try:
|
||||||
@@ -67,7 +67,7 @@ def test_build_sphinx_with_multibyte_path(pkgroot, proc):
|
|||||||
except UnicodeEncodeError:
|
except UnicodeEncodeError:
|
||||||
from path import FILESYSTEMENCODING
|
from path import FILESYSTEMENCODING
|
||||||
raise SkipTest(
|
raise SkipTest(
|
||||||
'multibyte filename not supported on this filesystem encoding: '
|
'non-ASCII filename not supported on this filesystem encoding: '
|
||||||
'%s', FILESYSTEMENCODING)
|
'%s', FILESYSTEMENCODING)
|
||||||
|
|
||||||
(srcdir / mb_name / (mb_name + '.txt')).write_text(dedent("""
|
(srcdir / mb_name / (mb_name + '.txt')).write_text(dedent("""
|
||||||
|
|||||||
Reference in New Issue
Block a user