Page MenuHomePhabricator

Prohibit trailing whitespace in messages
Open, LowPublic

Description

Problem

Developers sometimes unintentionally add a message with trailing whitespace. This can confuse translator community in translatewiki.net (translatewiki software adds a backslash as an indicator to not trim the message). Since trailing whitespace is never meaningful in those messages, it's safe to prohibit them.

Proposed solution

Add a test that prohibits trailing whitespace in messages (django.pot/djangojs.pot and also all other .pot files which may be added in the future).

Student is expected to send a patch for wikimedia-cz/tracker repository, hosted at Wikimedia Gerrit. When claiming task on GCI website, student should claim a respective Phabricator task as well.

Materials

Event Timeline

Urbanecm triaged this task as Medium priority.Dec 16 2018, 8:21 PM

I couldn't find Grunt plugin for this.
Maybe I could try to make one?
This is maybe a good option: JSON.parse(messageFile) and then JSON.stringify(result, null, 4) <-- indent value
or using Regex?

JSON.parse(messageFile) - I don't know what's messageFile in this context, but django.pot isn't JSON.

Anyway, feel free to try to complete those tasks, I'm not working on them (unless I claim them) :).

Urbanecm renamed this task from Prohibit trailing spaces in messages to Prohibit trailing whitespace in messages.Aug 26 2019, 4:00 PM
Urbanecm added a project: Google-Code-in-2019.
Urbanecm updated the task description. (Show Details)

Change 563686 had a related patch set uploaded (by RishabhL; owner: RishabhL):
[wikimedia-cz/tracker@master] Prohibit trailing whitespace in messages

https://gerrit.wikimedia.org/r/563686

Urbanecm lowered the priority of this task from Medium to Low.Jul 21 2020, 10:25 PM
Userring unsubscribed.