Skip to content

Support for fuzzy translations #9618

@topogps

Description

@topogps

Problem

Entries in po files that are currently marked as "fuzzy" are not used in "mo" files. The original source language is used instead of the translated language. Fuzzy translations are translations that in general need to be reviewed by a translator. For example all machine translations could be marked as fuzzy. It would be desirable to let the user decide whether to include these fuzzy translations in the generated documentation.

Proposed solution

Add a new configuration parameter "use_fuzzy_translations".

Change in line 72 of the file sphinx/sphinx/util/i18n.py

write_mo(file_mo, po)

to

write_mo(file_mo, po, use_fuzzy_translations)

Writing mo files with fuzzy translations is supported by the babel package, as can be seen in the documentation:

http://babel.pocoo.org/en/latest/api/messages/mofile.html

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions