babel icon indicating copy to clipboard operation
babel copied to clipboard

Enclose white spaces in references

Open Dunedan opened this issue 1 year ago • 4 comments
trafficstars

Since version 0.22 gettext encloses file names in references which contain white spaces or tabs within First Strong Isolate (U+2068) and Pop Directional Isolate (U+2069). This commit adds the same behavior for Babel.

Fixes #654

Dunedan avatar Jul 22 '24 04:07 Dunedan

Hi! Thanks for the contribution – could you link to gettext changelog/code for this?

akx avatar Jul 23 '24 07:07 akx

Codecov Report

Attention: Patch coverage is 95.34884% with 2 lines in your changes missing coverage. Please review.

Project coverage is 91.26%. Comparing base (2f87363) to head (f9f15fa). Report is 13 commits behind head on master.

Files with missing lines Patch % Lines
babel/messages/pofile.py 95.34% 2 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1105      +/-   ##
==========================================
+ Coverage   91.09%   91.26%   +0.16%     
==========================================
  Files          26       27       +1     
  Lines        4470     4602     +132     
==========================================
+ Hits         4072     4200     +128     
- Misses        398      402       +4     
Flag Coverage Δ
macos-12-3.10 90.06% <95.34%> (+0.15%) :arrow_up:
macos-12-3.11 90.00% <95.34%> (+0.09%) :arrow_up:
macos-12-3.12 90.17% <95.34%> (-0.03%) :arrow_down:
macos-12-3.13-dev 89.70% <95.34%> (?)
macos-12-3.8 89.99% <95.34%> (+0.16%) :arrow_up:
macos-12-3.9 89.99% <95.34%> (+0.09%) :arrow_up:
macos-12-pypy3.10 90.06% <95.34%> (+0.15%) :arrow_up:
ubuntu-22.04-3.10 90.09% <95.34%> (+0.15%) :arrow_up:
ubuntu-22.04-3.11 90.02% <95.34%> (+0.09%) :arrow_up:
ubuntu-22.04-3.12 90.19% <95.34%> (-0.03%) :arrow_down:
ubuntu-22.04-3.13-dev 89.72% <95.34%> (?)
ubuntu-22.04-3.8 90.01% <95.34%> (+0.16%) :arrow_up:
ubuntu-22.04-3.9 90.01% <95.34%> (+0.09%) :arrow_up:
ubuntu-22.04-pypy3.10 90.09% <95.34%> (+0.15%) :arrow_up:
windows-2022-3.10 90.21% <95.34%> (-0.07%) :arrow_down:
windows-2022-3.11 90.14% <95.34%> (-0.14%) :arrow_down:
windows-2022-3.12 90.31% <95.34%> (-0.26%) :arrow_down:
windows-2022-3.13-dev 89.84% <95.34%> (?)
windows-2022-3.8 90.13% <95.34%> (-0.07%) :arrow_down:
windows-2022-3.9 90.13% <95.34%> (-0.14%) :arrow_down:
windows-2022-pypy3.10 90.21% <95.34%> (-0.07%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jul 23 '24 07:07 codecov[bot]

Hi! Thanks for the contribution – could you link to gettext changelog/code for this?

Sorry, of course. Here you go:

https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=4cacad44e67171ce136cf5c1ae01093aa8e7a7ad https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=blob;f=NEWS;h=4f126cab47b2eb462fbb844f5c785ab905661c3f;hb=HEAD#l68

Dunedan avatar Jul 23 '24 07:07 Dunedan

Beyond the inline comment – we should probably also strip these delimiters when parsing a .po file?

Yes of course. I didn't think about that initially, but this makes perfect sense. I added the necessary logic for that.

A roundtrip test would be neat.

I added a bunch of additional tests, including a roundtrip test.

Dunedan avatar Jul 26 '24 04:07 Dunedan

@akx in case you missed this ;)

tomasr8 avatar Aug 23 '24 08:08 tomasr8

@akx in case you missed this ;)

I was getting married and on holiday. Back in the proverbial office now :)

akx avatar Aug 28 '24 09:08 akx

@akx in case you missed this ;)

I was getting married and on holiday. Back in the proverbial office now :)

No worries then :) And Congrats! :tada:

tomasr8 avatar Aug 28 '24 11:08 tomasr8