-
Notifications
You must be signed in to change notification settings - Fork 451
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
Extraction check for CI integration #1034
Comments
You can just |
I did not thought about this but this would be even simpler, thanks. However, in any cases the Would a PR for adding options like |
Hm there is actually something for But maybe not for |
Also there is |
This command might do it? git diff --exit-code --ignore-matching-lines '^"(POT-Creation-Date|Generated-By):' |
But I think I'd like to have a way to avoid updating Just note that I'm not a contributor to this project, I'm just making random comments 😅 |
Thank your for your investigation and your workaround. I will try to test this soon. |
Strangely enough, the git clone https://github.com/numerique-gouv/b3desk.git
cd b3desk
make install-dev
make translation-extract
git diff -I "POT-Creation-Date"
# expected result, POT-Creation-Date diff is hidden
git diff -I "Generated-By"
# unexpectedly, Generated-By diff is NOT hidden
git diff -I "#:"
# Most location comments are hidden, but not everyone. It feels like a bug in git though and not related to python-babel. |
Yes it is like that, it's not a bug in Git but instead it's a stupid but documented behavior. The behavior is: show diff hunks where at least one line still differs after filtering undesired lines. So: If instead there is still some diff Not ideal for sure. |
I would like to setup a CI job that would check if users have forgotten to extract the catalogs. The idea is that the CI would extract the catalogs, and fail if there was differences.
I was thinking a simple way to achieve this was to add a
--dry-run
forpybabel extract
, that would return 0 if nothing changed and 1 elsewise. I suppose the return code would need to ignore some fields in the header that would always be updated (POT-Creation-Date or Generated-By).What do you think?
Related to #910 and #725
The text was updated successfully, but these errors were encountered: