Re: Adrian Bunk 2018-10-27 
<154067546369.20678.16027981767936779592.reportbug@localhost>
> Some recent change in unstable makes flask-wtf FTBFS:
> Traceback (most recent call last):
>   File 
> "/build/1st/flask-wtf-0.14.2/.pybuild/cpython2_2.7_flaskext.wtf/build/tests/test_i18n.py",
>  line 32, in test_i18n_enabled
>     assert '\u8be5\u5b57\u6bb5\u662f' in to_unicode(response.data)

I recently updated wtforms which is probably the culprit here. The
unicode string it is looking for is "该字段是" which is the
translation of "This field is required." (see tests/test_i18n.py).
The string is still in wtforms' wtforms/locale/zh/LC_MESSAGES/wtforms.po
file, though.

It looks like translations are busted:

        foo = response.data
        print (foo)
        assert '\u8be5\u5b57\u6bb5\u662f' in to_unicode(foo)

AssertionError:
-------------------- >> begin captured stdout << ---------------------

<!DOCTYPE html>

<html>
    <body>


        {&#39;name&#39;: [u&#39;This field is required.&#39;]}
        <form method="POST" enctype="multipart/form-data">

            <p>
                <label for="name">Name</label>
                <input id="name" name="name" required type="text" value="">
            </p>
            <p>
                <input id="submit" name="submit" type="submit" value="Submit">
            </p>
        </form>
    </body>
</html>

--------------------- >> end captured stdout << ----------------------

Christoph

Reply via email to