flashcode / msgcheck Goto Github PK
View Code? Open in Web Editor NEWGettext file checker.
License: GNU General Public License v3.0
Gettext file checker.
License: GNU General Public License v3.0
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.
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.
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!
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.