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

Unable to find a way to remove some metadata from the .po file #21

Open
intiocean opened this issue Aug 24, 2022 · 3 comments
Open

Unable to find a way to remove some metadata from the .po file #21

intiocean opened this issue Aug 24, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@intiocean
Copy link

intiocean commented Aug 24, 2022

I would like to remove some un-needed metadata from the .po file that just makes diffs longer and conflicts more likely when various branches touch a .po file.

The pre-commit config I tried in order to remove the POT-Creation-Date metadata. (I'm also happy to leave it in and just set it to a blank or fixed date).

  - repo: https://github.com/mondeja/pre-commit-po-hooks
    rev: v1.7.3
    hooks:
      - id: check-metadata
        args: ["--header=POT-Creation-Date", "value=''"]

But I get the following error

check-metadata...........................................................Failed
- hook id: check-metadata
- exit code: 2

usage: check-po-metadata-hook
       [-h]
       [-n]
       [-r]
       [-s]
       [-q]
       [filenames ...]
check-po-metadata-hook: error: unrecognized arguments: --header=POT-Creation-Date

I've had a play around and can't identify the issue. Is this something I should be able to do with this hook?

@mondeja
Copy link
Owner

mondeja commented Sep 5, 2022

Currently is not possible because I've not found a way to make it consistent as an empty string for --value could mean an empty string rather than the metadata field being removed.

@mondeja mondeja added the enhancement New feature or request label Sep 5, 2022
@petrprikryl
Copy link

It would be awesome, we have a lot conflicts in our projects because of this.

@mondeja
Copy link
Owner

mondeja commented Nov 5, 2024

Probably a new hook would be worth. PRs welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants