diff --git a/sphinx/locale/fr/LC_MESSAGES/sphinx.po b/sphinx/locale/fr/LC_MESSAGES/sphinx.po index a73068897..dab9b52ca 100644 --- a/sphinx/locale/fr/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/fr/LC_MESSAGES/sphinx.po @@ -128,12 +128,12 @@ msgstr "Paramètres" #: sphinx/domains/c.py:61 sphinx/domains/cpp.py:4060 #: sphinx/domains/javascript.py:128 sphinx/domains/python.py:161 msgid "Returns" -msgstr "Retourne" +msgstr "Renvoie" #: sphinx/domains/c.py:63 sphinx/domains/javascript.py:130 #: sphinx/domains/python.py:163 msgid "Return type" -msgstr "Type retourné" +msgstr "Type renvoyé" #: sphinx/domains/c.py:177 #, python-format diff --git a/tests/path.py b/tests/path.py index 3c574f0c8..6af9ae105 100755 --- a/tests/path.py +++ b/tests/path.py @@ -123,6 +123,12 @@ class path(text_type): """ os.unlink(self) + def stat(self): + """ + Returns a stat of the file. + """ + return os.stat(self) + def utime(self, arg): os.utime(self, arg) diff --git a/tests/test_intl.py b/tests/test_intl.py index c182d8dc3..ad9af81d0 100644 --- a/tests/test_intl.py +++ b/tests/test_intl.py @@ -501,7 +501,8 @@ def test_gettext_dont_rebuild_mo(make_app, app_params, build_mo): assert get_number_of_update_targets(app0) == 0 # When rewriting the timestamp of mo file, the number of documents to be # updated will be changed. - (app0.srcdir / 'xx' / 'LC_MESSAGES' / 'bom.mo').utime(None) + mtime = (app0.srcdir / 'xx' / 'LC_MESSAGES' / 'bom.mo').stat().st_mtime + (app0.srcdir / 'xx' / 'LC_MESSAGES' / 'bom.mo').utime((mtime + 5, mtime + 5)) assert get_number_of_update_targets(app0) == 1 # Because doctree for gettext builder can not be shared with other builders, @@ -516,7 +517,7 @@ def test_gettext_dont_rebuild_mo(make_app, app_params, build_mo): assert get_number_of_update_targets(app) == 0 # Even if the timestamp of the mo file is updated, the number of documents # to be updated is 0. gettext builder does not rebuild because of mo update. - (app0.srcdir / 'xx' / 'LC_MESSAGES' / 'bom.mo').utime(None) + (app0.srcdir / 'xx' / 'LC_MESSAGES' / 'bom.mo').utime((mtime + 10, mtime + 10)) assert get_number_of_update_targets(app) == 0 @@ -670,7 +671,8 @@ def test_html_rebuild_mo(app): updated = app.env.update(app.config, app.srcdir, app.doctreedir, app) assert len(updated) == 0 - (app.srcdir / 'xx' / 'LC_MESSAGES' / 'bom.mo').utime(None) + mtime = (app.srcdir / 'xx' / 'LC_MESSAGES' / 'bom.mo').stat().st_mtime + (app.srcdir / 'xx' / 'LC_MESSAGES' / 'bom.mo').utime((mtime + 5, mtime + 5)) updated = app.env.update(app.config, app.srcdir, app.doctreedir, app) assert len(updated) == 1