You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Should not change the line-wrapping of msgstr after .po files are updated #787
$ pythonPython3.9.1 (default, Dec122020, 22:52:49)
[Clang11.0.3 (clang-1103.0.32.62)] ondarwinType"help", "copyright", "credits"or"license"formoreinformation.
>>>msgid= ("Flask is flexible. It doesn't require you to use any particular project ""or code layout. However, when first starting, it's helpful to use a more ""structured approach. This means that the tutorial will require a bit of ""boilerplate up front, but it's done to avoid many common pitfalls that ""new developers encounter, and it creates a project that's easy to expand ""on. Once you become more comfortable with Flask, you can step out of this"" structure and take full advantage of Flask's flexibility.")
>>>msgstr= ("Flask 很灵活。它不需要你使用任何特定的项目或代码结构。然而,在刚起步的时候,""使用更结构化的代码组织方式会更好一些。这意味着这个教程将会在一开始花费一些""时间来创建项目结构和基础代码,不过这样做可以避免很多新手开发者容易遇到的""常见错误,而且这样会创建一个容易扩展的项目。一旦你更熟悉 Flask,你就可以""跳出这个结构并充分利用 Flask 的灵活性。")
>>>>>>frombabel.messagesimportCatalog>>>frombabel.messages.pofileimportwrite_po>>>frombabel._compatimportBytesIO>>>catalog=Catalog()
>>>catalog.add((msgid, msgstr))
<Message ("Flask is flexible. It doesn't require you to use any particular project or code layout. However, when first starting, it's helpful to use a more structured approach. This means that the tutorial will require a bit of boilerplate up front, but it's done to avoid many common pitfalls that new developers encounter, and it creates a project that's easy to expand on. Once you become more comfortable with Flask, you can step out of this structure and take full advantage of Flask's flexibility.", 'Flask 很灵活。它不需要你使用任何特定的项目或代码结构。然而,在刚起步的时候,使用更结构化的代码组织方式会更好一些。这意味着这个教程将会在一开始花费一些时间来创建项目结构和基础代码,不过这样做可以避免很多新手开发者容易遇到的常见错误,而且这样会创建一个容易扩展的项目。一旦你更熟悉 Flask,你就可以跳出这个结构并充分利用 Flask 的灵活性。') (flags: [])>>>>buf=BytesIO()
>>>write_po(buf, catalog, omit_header=True, width=80)
>>>print(buf.getvalue().decode("utf8"))
msgid"""Flask is flexible. It doesn't require you to use any particular project or ""code layout. However, when first starting, it's helpful to use a more ""structured approach. This means that the tutorial will require a bit of ""boilerplate up front, but it's done to avoid many common pitfalls that new ""developers encounter, and it creates a project that's easy to expand on. Once"" you become more comfortable with Flask, you can step out of this structure ""and take full advantage of Flask's flexibility."msgid_plural"""Flask ""很灵活。它不需要你使用任何特定的项目或代码结构。然而,在刚起步的时候,使用更结构化的代码组织方式会更好一些。这意味着这个教程将会在一开始花费一些时间来创建项目结构和基础代码,不过这样做可以避免很多新手开发者容易遇到的常见错误,而且这样会创建一个容易扩展的项目。一旦你更熟悉"" Flask,你就可以跳出这个结构并充分利用 Flask 的灵活性。"msgstr[0] ""msgstr[1] ""
>>>buf=BytesIO()
>>>write_po(buf, catalog, omit_header=True, width=120)
>>>print(buf.getvalue().decode("utf8"))
msgid"""Flask is flexible. It doesn't require you to use any particular project or code layout. However, when first starting,"" it's helpful to use a more structured approach. This means that the tutorial will require a bit of boilerplate up ""front, but it's done to avoid many common pitfalls that new developers encounter, and it creates a project that's ""easy to expand on. Once you become more comfortable with Flask, you can step out of this structure and take full ""advantage of Flask's flexibility."msgid_plural"""Flask ""很灵活。它不需要你使用任何特定的项目或代码结构。然而,在刚起步的时候,使用更结构化的代码组织方式会更好一些。这意味着这个教程将会在一开始花费一些时间来创建项目结构和基础代码,不过这样做可以避免很多新手开发者容易遇到的常见错误,而且这样会创建一个容易扩展的项目。一旦你更熟悉"" Flask,你就可以跳出这个结构并充分利用 Flask 的灵活性。"msgstr[0] ""msgstr[1] ""
Activity
greyli commentedon May 29, 2021
Here is the way to reproduce this issue: