Skip to main content

Helping translators to find differences in msgids between versions

Project description

pypi Python >= 3.10 MIT licence

What is it ?

Pofuzzy-helper shows diffs of .po file entries associated to a fuzzy flag.

Installation

pip install pofuzzy-helper

Terminal usage example

In the french CPython documentation translation run:

$ potodo tutorial/ 
1 directory  85.34% done
└── tutorial/  85.34% done
    ├── appendix.po                       70.0% translated   17/24,  3 fuzzy
    ├── controlflow.po                    96.0% translated 146/152,  5 fuzzy
    ├── datastructures.po                 85.0% translated   78/91, 12 fuzzy
    ├── errors.po                         94.0% translated   66/70,  3 fuzzy
    ├── floatingpoint.po                  41.0% translated   20/48, 26 fuzzy
    ├── index.po                          77.0% translated     7/9,  1 fuzzy
    ├── inputoutput.po                    88.0% translated   62/70,  7 fuzzy
    ├── interactive.po                    71.0% translated     5/7,  2 fuzzy
    ├── introduction.po                   89.0% translated   68/76,  3 fuzzy
    ├── modules.po                        83.0% translated   69/83, 13 fuzzy
    ├── stdlib.po                         93.0% translated   43/46,  2 fuzzy
    ├── stdlib2.po                        91.0% translated   41/45,  4 fuzzy
    └── venv.po                           93.0% translated   28/30,  2 fuzzy

Let's run pofuzzy-helper on stdlib2.po:

$ pofuzzy-helper tutorial/interactive.po
319b063d01216961795cef8b82685334b294ace5 2024-10-29 21:59:51+01:00 by Julien Palard
line: 42
  Completion of variable and module names is :ref:`automatically enabled
  <rlcompleter-config>` at interpreter startup so that the :kbd:`Tab` key
  invokes the completion function; it looks at Python statement names, the
  current local variables, and the available module names.  For dotted
  expressions such as ``string.a``, it will evaluate the expression up to the
  final ``'.'`` and then suggest completions from the attributes of the
  resulting object.  Note that this may execute application-defined code if an
- object with a :meth:`__getattr__` method is part of the expression.  The
?                                                                    -----

+ object with a :meth:`~object.__getattr__` method is part of the expression.
?                      ++++++++

- default configuration also saves your history into a file named
+ The default configuration also saves your history into a file named
? ++++

  :file:`.python_history` in your user directory. The history will be available
  again during the next interactive interpreter session.

d7dacbde03452a1258c38b16364a703ab87d706b 2025-10-17 09:58:44+02:00 by Julien Palard
line: 75
  This facility is an enormous step forward compared to earlier versions of the
  interpreter; however, some wishes are left: It would be nice if the proper
  indentation were suggested on continuation lines (the parser knows if an
- indent token is required next).  The completion mechanism might use the
? ^^ ^^ ^                                                        --------

+ :data:`~token.INDENT` token is required next).  The completion mechanism might
? ^ ^ ^^^^     ++++++++++++++

- interpreter's symbol table.  A command to check (or even suggest) matching
?                                                                  ---------

+ use the interpreter's symbol table.  A command to check (or even suggest)
? ++++++++

- parentheses, quotes, etc., would also be useful.
+ matching parentheses, quotes, etc., would also be useful.
? +++++++++

Interactive mode

The interactive mode shows one diff at a time and asks whether to move on next diff, previous diff or to quit.

$ pofuzzy-helper --interactive tutorial/interactive.po
319b063d01216961795cef8b82685334b294ace5 2024-10-29 21:59:51+01:00 by Julien Palard
line: 42
  Completion of variable and module names is :ref:`automatically enabled
  <rlcompleter-config>` at interpreter startup so that the :kbd:`Tab` key
  invokes the completion function; it looks at Python statement names, the
  current local variables, and the available module names.  For dotted
  expressions such as ``string.a``, it will evaluate the expression up to the
  final ``'.'`` and then suggest completions from the attributes of the
  resulting object.  Note that this may execute application-defined code if an
- object with a :meth:`__getattr__` method is part of the expression.  The
?                                                                    -----

+ object with a :meth:`~object.__getattr__` method is part of the expression.
?                      ++++++++

- default configuration also saves your history into a file named
+ The default configuration also saves your history into a file named
? ++++

  :file:`.python_history` in your user directory. The history will be available
  again during the next interactive interpreter session.

diff 1/2 -> (N)ext - (P)rev - (W)idth - (Q)uit ? [N]

GUI mode

pofuzzy-helper-gui provides a tkinter/html display, side by side, of the diffs.

$ pofuzzy-helper-gui tutorial/interactive.po

Development setup

Create a virtual environment:

python3 -m venv .venv

Activate it:

source .venv/bin/activate

Install the dev requirements:

pip install -e .[dev]

Release History

  • v0.1.0
    • first release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pofuzzy_helper-0.1.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pofuzzy_helper-0.1.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file pofuzzy_helper-0.1.0.tar.gz.

File metadata

  • Download URL: pofuzzy_helper-0.1.0.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pofuzzy_helper-0.1.0.tar.gz
Algorithm Hash digest
SHA256 66a5bc6f99abea15d6a8a681b2f88a1dab1540fcf5955bef3cbc9b6fea6f186b
MD5 985036b62c1f5fdfe391ae18da39c9d5
BLAKE2b-256 4c00cc58a60f3c6530a1394140555a157f4b21f1fadda21ceeecfd76a438b90c

See more details on using hashes here.

File details

Details for the file pofuzzy_helper-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pofuzzy_helper-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pofuzzy_helper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0d3e5e758cdcbc8cbacd585e43225565d2c60f8d55f80c4462b2e9924e0ac5d
MD5 f5830b1595fafdb327863f485b08ab57
BLAKE2b-256 f0332211a7b5380093dcf5410ffee0f5b74c029c30dd8ca474cebd3560ebf868

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page