Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use rspolib instead of polib #225

Open
1 task done
mondeja opened this issue Mar 9, 2022 · 3 comments
Open
1 task done

Use rspolib instead of polib #225

mondeja opened this issue Mar 9, 2022 · 3 comments
Labels
enhancement New feature or request performance

Comments

@mondeja
Copy link
Owner

mondeja commented Mar 9, 2022

Looks like possible and should improve performance. See https://launchpad.net/pygettextpo

  • How to know if libgettextpo is available? Run ctypes.util.find_library("gettextpo") in setup.py. If returns None is not available.

To read PO files without defined charset "MIME-Version: 1.0\\n"\n"Content-Type: text/plain; charset=utf-8\\n" must be added to the headers or the next error will be raised:

Error
>>> gettextpo.PoFile('example.po')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
gettextpo.error: Charset missing in header.
Message conversion to user's charset will not work.
@mondeja mondeja added enhancement New feature or request performance labels Mar 9, 2022
@mondeja
Copy link
Owner Author

mondeja commented Oct 14, 2022

I've done some tests in a local branch. Seems that the current implementation of the library is not enough complete. Create the same interface of polib using the library at C level would be the greatest improvement.

@mondeja
Copy link
Owner Author

mondeja commented Feb 19, 2023

After the developing of md-ulb-pwrap I'm thinking that the best option to optimize the usage of polib is rewriting the library as a CPython extension with Rust.

@mondeja mondeja changed the title Use pygettextpo instead of polib if libgettextpo is available Use an optimized low level PO parser library Feb 19, 2023
@mondeja mondeja added this to the v1.2.0 milestone Mar 7, 2023
@mondeja mondeja removed this from the v1.2.0 milestone Mar 7, 2024
@mondeja
Copy link
Owner Author

mondeja commented Mar 7, 2024

I've written rspolib some months ago, so use that.

@mondeja mondeja changed the title Use an optimized low level PO parser library Use rspolib instead of polib Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance
Projects
None yet
Development

No branches or pull requests

1 participant