Skip to content

Feature Request: Support for Parsing and Storing Raw Comments in PO Files #120

@algol2302

Description

@algol2302

Hello,

First of all, thank you for your work on the gotext project.

I would like to kindly suggest an enhancement regarding the handling of comments in PO files. As detailed in the https://www.gnu.org/software/gettext/manual/html_node/PO-File-Entries.html#What-an-entry-looks-like, comments in PO files can provide valuable context for translators and are an important part of the translation workflow.

As far as I understand, reference comments (#:) are already supported. However, I believe it would be beneficial to include support for all other types of comments as well.

Proposed Enhancement

  • Comprehensive Comment Parsing:
    Enhance the parser to capture all comment types in PO files (e.g., translator comments #, extracted comments #., reference comments #:, flag comments #,, previous-untranslated-string comments #|, and obsolete entries #~) in their original, unaltered form.

  • Data Structure Update:
    Extend the data structure representing PO file translation entries by including a dedicated field to store the raw comments associated with each entry.

  • Programmatic Access:
    Ensure that these raw comments are accessible through the API, so developers and translators can retrieve and utilize this context during translation or review processes.

Benefits

  • Provides translators with essential context, improving translation accuracy and quality.
  • Aligns with best practices as outlined in the GNU gettext documentation.
  • Enhances the overall usability of the gotext library for translation projects.

Thank you very much for considering this request. I believe this feature would be a valuable addition to the project. Please let me know if any further clarification or information is needed.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions