Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(#16): raise error when fuzzy detected#17

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
angryfoxx wants to merge1 commit intoflashcode:main
base:main
Choose a base branch
Loading
fromangryfoxx:main

Conversation

@angryfoxx
Copy link

No description provided.

@flashcode
Copy link
Owner

flashcode commentedJan 21, 2026
edited
Loading

Hello@angryfoxx,

Thanks for your PR!

Fuzzy strings are not really "errors" in the file, as they are not used at runtime (it's like if strings were not translated).

But I agree it's nice to know we have fuzzy strings in the translations.

By the way you have some other easy ways to find them, for example withmsgfmt:

$ msgfmt --statistics --output-file=/dev/null de.po3849 translated messages, 4 fuzzy translations.

Or withpocount:

$ pocount de.poProcessing file : de.poType               Strings      Words (source)    Words (translation)Translated:    3849 ( 99%)      37112 ( 99%)           40811Fuzzy:            4 (  0%)         18 (  0%)             n/aUntranslated:     0 (  0%)          0 (  0%)             n/aTotal:         3853             37130                  40811Unreviewed:    3849 ( 99%)      37112 ( 99%)           40811Needs-Work:       4 (  0%)         18 (  0%)               0

It could be added in msgcheck as well, but this should be an optional check disabled by default (with a new command line option), as msgcheck is really focused on "errors" in translations, ie typos, punctuation, etc., not on translation progress (number of fuzzy or untranslated strings).

@angryfoxx
Copy link
Author

ok i will work on this, i think this tool would be great after this implemantation thx for your review@flashcode

@angryfoxx
Copy link
Author

hi @flashcode could u rw again

Copy link

CopilotAI 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 a newerror_on_fuzzy option that raises an error when fuzzy strings are detected in PO files, addressing issue#16. Unlike the existingfuzzy check which processes fuzzy strings for validation, this new option treats the presence of fuzzy strings as an error condition.

Changes:

  • Added--error-on-fuzzy /-F CLI flag to report fuzzy strings as errors
  • Implemented fuzzy detection logic that reports each fuzzy string found
  • Added comprehensive test coverage for both positive and negative cases
  • Updated .gitignore with standard Python development artifacts

Reviewed changes

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

FileDescription
tests/test_msgcheck.pyAdded two test functions validating the error_on_fuzzy option with and without fuzzy strings present
src/msgcheck/po.pyAdded error_on_fuzzy check option and implementation to detect and report fuzzy strings
src/msgcheck/msgcheck.pyAdded CLI argument for error-on-fuzzy flag and integrated it into option processing
.gitignoreAdded common Python development directories and cache files

💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@angryfoxx@flashcode

[8]ページ先頭

©2009-2026 Movatter.jp