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

lint: Add lint rule to warn people making changes to static/locale. #8215

Open
rishig opened this issue Jan 29, 2018 · 6 comments
Open

lint: Add lint rule to warn people making changes to static/locale. #8215

rishig opened this issue Jan 29, 2018 · 6 comments

Comments

@rishig
Copy link
Member

rishig commented Jan 29, 2018

We occasionally get PRs with translations or other fixes to the files in static/locale, due to a reasonable misunderstanding of how our translation system works. It would be great to add some sort of warning that points people either to transifex or to our translation documentation.

@zulipbot
Copy link
Member

Hello @zulip/server-i18n, @zulip/server-testing members, this issue was labeled with the area: i18n, area: testing-infrastructure labels, so you may want to check it out!

@timabbott
Copy link
Sponsor Member

I wish .gitattributes supported controlling git grep, but it doesn't (just checked), since that's what we really want here. We could try adding a static/locale/README.md. I think the next most natural thing after that would be to have a zulipbot feature to complain about diffs touching that directory.

@synicalsyntax would that be hard to do?

@synicalsyntax
Copy link
Member

@timabbott Personally I think it might be better to have file diffs checked in a testing suite, but it should be possible with zulipbot; can you open an issue?

@timabbott
Copy link
Sponsor Member

The thing which is tricky here is that we don't really have test suites that look at the Git history (as opposed to the current state of the repo). I guess we could look at using gitlint for this if it supports inspecting the commit file list? @tommyip do you know if that's possible?

@tommyip
Copy link
Member

tommyip commented Apr 23, 2018

@timabbott gitlint only checks the commit messages by default. There is a command to inspect the commit file list, git diff-tree --no-commit-id --name-only -r upstream/master..HEAD^, we could add this as a custom gitlint rule or just put it somewhere in tools/lint.

@zulipbot
Copy link
Member

Hello @zulip/server-i18n, @zulip/server-testing, @zulip/server-tooling members, this issue was labeled with the "area: i18n", "area: testing-infrastructure", "area: tooling" labels, so you may want to check it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants