python-babel / babel

The official repository for Babel, the Python Internationalization Library
http://babel.pocoo.org/
BSD 3-Clause "New" or "Revised" License
1.29k stars 433 forks source link

Support 't' specifier in keywords #1015

Closed jeanas closed 9 months ago

jeanas commented 1 year ago

Fixes #1014

jeanas commented 1 year ago

Note that there is a test for parse_keywords but no test for the actual extraction as I didn't really understand how that was supposed to be tested. There seems to be a mixture of pytest and unittest, setuptools integration and not. Which should I use? Or should I just write a test that exercises the inner function directly? Help is welcome.

jeanas commented 1 year ago

CI fails with a seemingly unrelated error.

akx commented 1 year ago

There seems to be a mixture of pytest and unittest, setuptools integration and not.

For new tests, prefer plain pytest style. Don't worry about the setuptools integration, it's... a bit of a mess.

Or should I just write a test that exercises the inner function directly? Help is welcome.

You can write a test that uses exercises the extraction function with a bespoke keywords directly, that's fine!

jeanas commented 1 year ago

(Rebasing on master)

jeanas commented 1 year ago

Thank you. I've added a test and fixed the bug that it caught.

tox -e py311 passes for me locally. I'm not sure what to do about the CI.

jeanas commented 12 months ago

Anything else needed?

codecov[bot] commented 11 months ago

Codecov Report

Merging #1015 (be33f02) into master (9ef53c6) will increase coverage by 0.03%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1015      +/-   ##
==========================================
+ Coverage   90.91%   90.94%   +0.03%     
==========================================
  Files          25       25              
  Lines        4358     4375      +17     
==========================================
+ Hits         3962     3979      +17     
  Misses        396      396              
Files Changed Coverage ฮ”
babel/messages/extract.py 95.31% <100.00%> (+0.12%) :arrow_up:
babel/messages/frontend.py 87.61% <100.00%> (+0.20%) :arrow_up:

:mega: Weโ€™re building smart automated test selection to slash your CI/CD build times. Learn more

jeanas commented 11 months ago

Thank you for your review, @akx. The PR should be improved quite a bit now, especially with regard to documentation and code clarity.

jeanas commented 10 months ago

@akx Gentle ping?

akx commented 10 months ago

@jeanas Sorry, I was on holiday and all that ๐Ÿ˜Š

jeanas commented 10 months ago

A couple requests remaining. Thanks for your patience ๐Ÿ˜…

Now addressed.

jeanas commented 9 months ago

Ping?

jeanas commented 9 months ago

@akx Gentle ping.

jeanas commented 9 months ago

Thank you!