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

Check strings using dennis #1252

Closed
jayvdb opened this issue Oct 12, 2016 · 7 comments
Closed

Check strings using dennis #1252

jayvdb opened this issue Oct 12, 2016 · 7 comments
Assignees
Labels
enhancement Adding or requesting a new feature. undecided These features might not be implemented. Can be prioritized by sponsorship.
Milestone

Comments

@jayvdb
Copy link
Contributor

jayvdb commented Oct 12, 2016

dennis (github) provides some linting of translation strings.

phpmyadmin/localized_docs#2 shows some of the problems which can be caught either at the initial data entry, or maybe weblate should allow the problematic translation to be saved and then include these strings in the "Strings to check" UI.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@nijel
Copy link
Member

nijel commented Oct 13, 2016

Weblate does already have it's own checks framework (which in some things overlap with dennis). I'm not really sure how to mix these together. Weblate checks do rely on the database as well to get some metadata or to look at other translations in same project...

Also some checks are intentionally not there (URL difference) as this is really something for manual review rather than automated check. For example it is perfectly okay if https://docs.phpmyadmin.net/en/latest/ is translated as https://docs.phpmyadmin.net/pt_BR/latest/.

Checking rst syntax is definitely something we lack right now, but that does not seem to be existing in dennis as well.

@nijel nijel added the enhancement Adding or requesting a new feature. label Oct 13, 2016
@jayvdb
Copy link
Contributor Author

jayvdb commented Oct 13, 2016

I've created two dennis bugs about the main problems you've identified.

Allow translated URLs is mozilla/dennis#80
RST syntax support is mozilla/dennis#81

However even without those fixes, most dennis errors could be warnings in weblate that a human should review.

It would be good if the validation of translation messages is done in an external package, which can be used outside of weblate. If not dennis, perhaps another one? translate-toolkit? (does weblate use the pofilter tests ?

Or maybe the existing weblate checkers can be separated from the webapp into a new package? So then a linter CLI can be wrapped around them.

@nijel
Copy link
Member

nijel commented Oct 13, 2016

Weblate uses separate set of checks and does not use pofilter ones. The reason was that in time I wrote this, several checks there were broken in way I didn't want to use them and they didn't accept contributions back then (PRs were stuck for year or so). That's why I've written own framework what allowed us to use database stored metadata.

The database access is one of things where Weblate checks do not fit into other modules, but maybe the code could be written in a way usable in Weblate and separately as well.

@willkg
Copy link

willkg commented Nov 6, 2016

If it helps, Dennis is both a commandline as well as a library. I built it with the intention that it'd be used by other systems. I had similar issues with pofilter and translate toolkit which pushed me into writing Dennis.

@nijel nijel added the wontfix Nobody will work on this. label Aug 26, 2018
@nijel
Copy link
Member

nijel commented Aug 26, 2018

Going though old issues and I'm still not sure this is good idea. However the main question before I start considering this again is: Is Dennis still maintained? Last commit seems to be more than one year old...

@stale stale bot removed the wontfix Nobody will work on this. label Aug 26, 2018
@nijel nijel added undecided These features might not be implemented. Can be prioritized by sponsorship. wontfix Nobody will work on this. labels Aug 26, 2018
@willkg
Copy link

willkg commented Aug 26, 2018

Dennis is still maintained. It hasn't had a release in a while because not much work has been done on it. It pretty much does what it needs to.

If there are things you're interested in working on, I'm happy to review PRs.

@stale stale bot removed the wontfix Nobody will work on this. label Aug 26, 2018
@nijel
Copy link
Member

nijel commented Apr 24, 2020

I finally found some time to look at Dennis and I don't think it's much useful for Weblate:

  • It supports only python-format and python-brace-format, while Weblate already supports much more variants
  • There doesn't seem to be anything which already not covered by Weblate for the translations
  • It seems to be bound only to PO files, pulling in polib as a dependency

On the other side, it has some useful source checks which we do not have right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature. undecided These features might not be implemented. Can be prioritized by sponsorship.
Projects
None yet
Development

No branches or pull requests

3 participants