Skip to content

feat: Add .po file pseudolocalization to example web app#24

Open
RomanPszonka wants to merge 1 commit intomainfrom
feature/po-file-pseudolocalization
Open

feat: Add .po file pseudolocalization to example web app#24
RomanPszonka wants to merge 1 commit intomainfrom
feature/po-file-pseudolocalization

Conversation

@RomanPszonka
Copy link
Owner

This update enhances the example web application by adding support for pseudolocalizing Gettext PO (.po) files.

Key changes include:

  • I modified the web UI (pseudolocalize_template.html) to include a new form for uploading .po files.
  • I updated the Flask application (app.py) with a new endpoint (/pseudol10nutil/po_upload) that:
    • Accepts .po file uploads.
    • Uses POFileUtil from the pseudol10nutil library to perform pseudolocalization on the file content.
    • Returns the processed .po file to you for download.
    • Includes error handling for invalid file types or processing issues.
  • I added comprehensive unit tests (test_app.py) for the new file upload functionality, covering success cases and various error scenarios. Existing tests were also refactored to use Flask's test client.

This addresses the TODO item "Add support for pseudolocalizing files through the web app" by leveraging the POFileUtil class already present in the pseudol10nutil library.

This update enhances the example web application by adding support for
pseudolocalizing Gettext PO (.po) files.

Key changes include:

- I modified the web UI (`pseudolocalize_template.html`) to include a new
  form for uploading `.po` files.
- I updated the Flask application (`app.py`) with a new endpoint
  (`/pseudol10nutil/po_upload`) that:
    - Accepts `.po` file uploads.
    - Uses `POFileUtil` from the `pseudol10nutil` library to perform
      pseudolocalization on the file content.
    - Returns the processed `.po` file to you for download.
    - Includes error handling for invalid file types or processing issues.
- I added comprehensive unit tests (`test_app.py`) for the new file upload
  functionality, covering success cases and various error scenarios.
  Existing tests were also refactored to use Flask's test client.

This addresses the TODO item "Add support for pseudolocalizing files
through the web app" by leveraging the `POFileUtil` class already
present in the `pseudol10nutil` library.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant