Skip to content

Conversation

jmoraleda
Copy link

@jmoraleda jmoraleda commented Jun 13, 2025

This PR adds an option to extract_from_dir and frontend to follow symbolic links when traversing a directory. This was a missing feature. The rationale for it is in the issue description and comments: #1211 (comment)

Fixes #1211

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for following symbolic links when traversing directories during message extraction, addressing a missing feature. Key changes include:

  • A new CLI test to verify the --follow-links option.
  • Documentation updates for the CLI to inform users about the follow-links flag.
  • Code modifications in both the frontend and extraction modules to enable following symbolic links.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
tests/messages/test_frontend.py Adds a test case for the follow-links CLI option.
docs/cmdline.rst Updates CLI documentation to include the follow-links flag.
babel/messages/frontend.py Adds follow-links as a command-line option and initializes its value.
babel/messages/extract.py Passes the follow-links parameter to os.walk in extract_from_dir.

Copy link

codecov bot commented Jun 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.98%. Comparing base (d7a7589) to head (e1762b0).
Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1212      +/-   ##
==========================================
+ Coverage   91.71%   91.98%   +0.27%     
==========================================
  Files          27       27              
  Lines        4685     4694       +9     
==========================================
+ Hits         4297     4318      +21     
+ Misses        388      376      -12     
Flag Coverage Δ
macos-14-3.10 91.03% <100.00%> (+0.27%) ⬆️
macos-14-3.11 90.96% <100.00%> (+0.27%) ⬆️
macos-14-3.12 91.18% <100.00%> (+0.27%) ⬆️
macos-14-3.13 91.18% <100.00%> (+0.27%) ⬆️
macos-14-3.8 90.89% <100.00%> (+0.27%) ⬆️
macos-14-3.9 90.96% <100.00%> (+0.27%) ⬆️
macos-14-pypy3.10 91.03% <100.00%> (+0.27%) ⬆️
ubuntu-24.04-3.10 91.05% <100.00%> (+0.27%) ⬆️
ubuntu-24.04-3.11 90.98% <100.00%> (+0.27%) ⬆️
ubuntu-24.04-3.12 91.20% <100.00%> (+0.27%) ⬆️
ubuntu-24.04-3.13 91.20% <100.00%> (+0.27%) ⬆️
ubuntu-24.04-3.8 90.91% <100.00%> (+0.27%) ⬆️
ubuntu-24.04-3.9 90.98% <100.00%> (+0.27%) ⬆️
ubuntu-24.04-pypy3.10 91.05% <100.00%> (+0.48%) ⬆️
windows-2022-3.10 91.04% <100.00%> (+0.27%) ⬆️
windows-2022-3.11 90.97% <100.00%> (+0.27%) ⬆️
windows-2022-3.12 91.19% <100.00%> (+0.27%) ⬆️
windows-2022-3.13 91.19% <100.00%> (+0.27%) ⬆️
windows-2022-3.8 91.01% <100.00%> (+0.27%) ⬆️
windows-2022-3.9 90.97% <100.00%> (+0.27%) ⬆️
windows-2022-pypy3.10 91.04% <100.00%> (+0.27%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Successfully merging this pull request may close these issues.

symbolic links not followed during extract
2 participants