GithubHelp home page GithubHelp logo

msgcheck's People

Contributors

amureki avatar codingjoe avatar flashcode avatar rimrul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

msgcheck's Issues

Make pyenchant an optional dependency

Since pyenchant is no longer maintained, I would recommend to make it an optional dependency via extras_require.
That would mean you would need to run pip install msgcheck[pyenchant] or pip install msgcheck[spelling] to install pyenchant and spell checking support.

What do you think @flashcode ? Currently I can't install this package on travis-ci because of the hard pyenchant dependency.

Feature request: Ignoring message strings

Hi Sébastien, thank you for a lovely project! I like that it's both useful and the code is so well written.

We want to add msgcheck to our linting at Thermondo as part of a pre-commit hook. But for that to work, we need the option to exclude certain messages from linting - sometimes the trailing dot only does make sense in the source string.

My suggestion would be to exclude any source string and translation which is prefixed with # noqa, as is common in Python land for other linters.

What do you think? I don't want to promise anything, but there's a good chance we might be able to dedicate time for this if you'd be willing to merge this feature.

Feature request: Support several personal files with wordlists

Hey @flashcode, thank you for a nice package!

I have a proposal for -P <file>, --pwl argument to support several values (comma separated, for example).

In my project, I have several files with exclude words (separate for each language) and selecting all of them would be very handy to be able to work with this check.

What do you think?
I probably, can spend some time, implementing this feature, if you up for it!

Punctuation in far east languages

Hi @flashcode,

it's been a while. Still a waving fan of this package. That being said, I am currently translating things into Japanese and Simplified Chinese. In those languages it is common to use a different character. E.G. in Japanese you would use a .

Would you be interested in a patch adding support for punctuation for individual locales?

Best,
Joe

DictWithPWL unusable: the underlying C-library object has been freed.

When I run something like

msgcheck -s str -d de,en --pwl spelling_wordlist/de $(MSGLANGS)

with MSGLANGS being multiple .po-files, I get the following error:

Traceback (most recent call last):
  File "env/bin/msgcheck", line 11, in <module>
    sys.exit(main())
  File "env/lib/python3.6/site-packages/msgcheck/msgcheck.py", line 124, in main
    result = po_check.check_files(args.file)
  File "env/lib/python3.6/site-packages/msgcheck/po.py", line 523, in check_files
    result.append((po_file.filename, self.check_pofile(po_file)))
  File "env/lib/python3.6/site-packages/msgcheck/po.py", line 494, in check_pofile
    self.spelling, checker + self.extra_checkers)
  File "env/lib/python3.6/site-packages/msgcheck/po.py", line 276, in check_spelling
    for err in checkers[0]:
  File "env/lib/python3.6/site-packages/enchant/checker/__init__.py", line 230, in __next__
    return self.next()
  File "env/lib/python3.6/site-packages/enchant/checker/__init__.py", line 254, in next
    if self.dict.check(word):
  File "env/lib/python3.6/site-packages/enchant/__init__.py", line 869, in check
    if Dict.check(self,word):
  File "env/lib/python3.6/site-packages/enchant/__init__.py", line 646, in check
    self._check_this()
  File "env/lib/python3.6/site-packages/enchant/__init__.py", line 844, in _check_this
    Dict._check_this(self,msg)
  File "env/lib/python3.6/site-packages/enchant/__init__.py", line 618, in _check_this
    _EnchantObject._check_this(self,msg)
  File "env/lib/python3.6/site-packages/enchant/__init__.py", line 176, in _check_this
    raise Error(msg)
enchant.errors.Error: DictWithPWL unusable: the underlying C-library object has been freed.
make: *** [msgcheck] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.