GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use pospell · Issue #75 · python/python-docs-pl

Use pospell #75

New issue
Copy link
New issue
Copy link
Open
#153
Open
Use pospell#75
#153
Copy link
Labels
enhancementNew feature or requestNew feature or requestworkflowsAnything to do with workflowsAnything to do with workflows

Description

@m-aciek
m-aciek
opened on Apr 30, 2025
Issue body actions

https://pypi.org/project/pospell/

There are Polish dictionaries available for hunspell (pospell), we could leverage it to improve the quality of the translation. It would require some configuration (extra custom dictionary and skipping code blocks). We could look at the other languages' setups.

% pospell --language pl tutorial/*.po
…
tutorial/stdlib2.po:701:heappop
tutorial/stdlib2.po:778:wywnioskowując
tutorial/stdlib2.po:778:Decimal
tutorial/stdlib2.po:791:modulo
tutorial/venv.po:35:Pythonowe
tutorial/venv.po:146:bash
tutorial/venv.po:187:deaktywować
tutorial/venv.po:199:pragramu
tutorial/venv.po:210:podkomend
tutorial/venv.po:210:install
tutorial/venv.po:210:uninstall
tutorial/venv.po:210:freeze
tutorial/venv.po:239:podajac
tutorial/whatnow.po:43:tutorial
tutorial/whatnow.po:77:Szegółowe
tutorial/whatnow.po:100:Cheese
tutorial/whatnow.po:111:Cookbook
tutorial/whatnow.po:111:Wydawnicto
tutorial/whatnow.po:111:Reilly
tutorial/whatnow.po:130:Scientific
tutorial/whatnow.po:172:Cheese
Reacted by Stan Ulbrych

Activity

  1. m-aciek
    added
    enhancementNew feature or requestNew feature or request
    on Apr 30, 2025
  2. StanFromIreland commented on Apr 30, 2025

    @StanFromIreland
    StanFromIreland
    on Apr 30, 2025
    Member
    More actions

    It looks good though it may be annoying with Polishized words like Pythonowe and words like heappop? I will look into the other repos.

  3. rffontenelle commented on May 19, 2025

    @rffontenelle
    rffontenelle
    on May 19, 2025
    Contributor
    More actions

    python-docs-es has a nice solution: a Python script that merges (in runtime) a base dictionary (with common words for all docs) and per-doc dictionary, which reduce the duplication if you want a dictionary file per-doc and avoid a huge single-file dictionary.

    Reacted by Stan Ulbrych
    Reacted by Maciej Olko
  4. StanFromIreland
    added
    workflowsAnything to do with workflowsAnything to do with workflows
    on May 20, 2025
  5. StanFromIreland commented on May 29, 2025

    @StanFromIreland
    StanFromIreland
    on May 29, 2025
    Member
    More actions

    Bigger issue, pospell crash on a codeblock, how do we exclude them?:

    <rst-doc>:7: (ERROR/3) Unexpected indentation. while parsing: class Parrot:
        def __init__(self):
            self._voltage = 100000
        @property
        def voltage(self):
            """Uzyska aktualne napięcie.""
            return self._voltage
    Traceback (most recent call last):
    <rst-doc>:3: (ERROR/3) Unexpected indentation. while parsing: # punkt to dwukrotka (x, y)
    match point:
        case (0, 0):
            print("Początek")
        case (0, y):
            print(f"Y={y}")
        case (x, 0):
            print(f"X={x}")
        case (x, y):
            print(f"X={x}, Y={y}")
        case _:
            raise ValueError("Nie punkt")
      File "/opt/hostedtoolcache/Python/3.13.3/x64/bin/pospell", line 8, in <module>
        sys.exit(main())
                 ~~~~^^
      File "/opt/hostedtoolcache/Python/3.13.3/x64/lib/python3.13/site-packages/pospell.py", line 480, in main
        errors = spell_check(
            args.po_file,
        ...<4 lines>...
            args.jobs,
        )
      File "/opt/hostedtoolcache/Python/3.13.3/x64/lib/python3.13/site-packages/pospell.py", line 384, in spell_check
        errors = flatten(
            pool.map(
        ...<2 lines>...
            )
        )
      File "/opt/hostedtoolcache/Python/3.13.3/x64/lib/python3.13/site-packages/pospell.py", line 342, in flatten
        return [element for a_list in list_of_lists for element in a_list]
                                                                   ^^^^^^
    TypeError: 'int' object is not iterable
    
  6. m-aciek commented on May 29, 2025

    @m-aciek
    m-aciek
    on May 29, 2025
    CollaboratorAuthor
    More actions

    I believe Sphinx should be adding code-block flag to msgids made from code blocks in gettext builder. Then pospell should enable us to filter out those msgids from checking.

    Reacted by Rafael Fontenelle
  7. rffontenelle commented on Jun 12, 2025

    @rffontenelle
    rffontenelle
    on Jun 12, 2025
    Contributor
    More actions

    Bigger issue, pospell crash on a codeblock, how do we exclude them?:

    In python-docs-pt-br, when I was having tons of sphinx-lint errors because of literal-blocks being extracted, my work-around was the following: 1) make gettext disabling literal blocks to generate POT without it; 2) 'sphinx-intl update' to update PO files with the newly generated POT files; 3) run pospell; 4) discard changes to PO files (or simply don't commit).

    Reacted by Stan Ulbrych and Maciej Olko
  8. rffontenelle commented on Jun 23, 2025

    @rffontenelle
    rffontenelle
    on Jun 23, 2025
    Contributor
    More actions

    I believe Sphinx should be adding code-block flag to msgids made from code blocks in gettext builder.

    @m-aciek Do you know whether there is an issued filed for this in Sphinx?

  9. m-aciek commented on Jun 23, 2025

    @m-aciek
    m-aciek
    on Jun 23, 2025
    CollaboratorAuthor
    More actions

    I believe Sphinx should be adding code-block flag to msgids made from code blocks in gettext builder.

    @m-aciek Do you know whether there is an issued filed for this in Sphinx?

    There isn't yet, as far as I'm concerned.

  10. StanFromIreland commented on Jun 23, 2025

    @StanFromIreland
    StanFromIreland
    on Jun 23, 2025
    Member
    More actions

    I could not find anything either. pospell has been recently improved to display multi-line msgs better tough, but still a lot to be done.

  11. rffontenelle commented on Jun 30, 2025

    @rffontenelle
    rffontenelle
    on Jun 30, 2025
    Contributor
    More actions

    Christmas came earlier this year: Gettext is implementing a custom sticky flag, which could be used to tell "this is a code-block". See https://lists.gnu.org/archive/html/bug-gettext/2025-06/msg00018.html

    I already notified Transifex to support it. Should it be reported to pybabel, Sphinx or both to add support to this new feature?

    Reacted by Stan Ulbrych
  12. m-aciek commented on Jun 30, 2025

    @m-aciek
    m-aciek
    on Jun 30, 2025
    CollaboratorAuthor
    More actions

    Thanks for sharing. Hm, so motivation to introduce second prefix is to increase reliability in tooling. I think it's definitely worth sharing with projects! Sphinx writes PO files directly, and uses gettext afaic, so rather doesn't need changes to support it. Pybabel parse files to update them, so probably should be changed.

    By the way, current tooling should also correctly handle our custom flag, yet without this new syntax. Edit: hm, or not?

    Reacted by Stan Ulbrych
  13. m-aciek commented on Jul 10, 2025

    @m-aciek
    m-aciek
    on Jul 10, 2025
    CollaboratorAuthor
    More actions

    Do you know whether there is an issued filed for this in Sphinx?

    For the reference: sphinx-doc/sphinx#13722

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestNew feature or requestworkflowsAnything to do with workflowsAnything to do with workflows

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.