Page MenuHomePhabricator

Switch i18n JSON files to use tabs instead of spaces
Closed, ResolvedPublic

Description

Pretty much all MediaWiki code (except Python) uses tabs instead of spaces for indentation. If we change the new i18n JSON files to also use tabs, it will make life easier for MediaWiki developers :)

See this wikitech-l thread for more discussion:
http://lists.wikimedia.org/pipermail/wikitech-l/2014-April/075587.html


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=72132

Details

Reference
bz63444

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:08 AM
bzimport set Reference to bz63444.
bzimport added a subscriber: Unknown Object (MLST).
kaldari created this task.Apr 2 2014, 7:41 PM

Should we change FormatJson::encode to use tabs?

(In reply to James Forrester from comment #1)

Should we change FormatJson::encode to use tabs?

We probably should just pass an optional "indent" parameter and use that for localization. Doesn't look like the native json_encode function supports custom indent, though, which is a little silly, but maybe that's something to try to push upstream later.

Change 123518 had a related patch set uploaded by PleaseStand:
FormatJson: Make it possible to change the indent string

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

Change 123518 merged by jenkins-bot:
FormatJson: Make it possible to change the indent string

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

Change 126253 had a related patch set uploaded by Siebrand:
FormatJson: Make it possible to change the indent string

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

Change 126253 merged by jenkins-bot:
FormatJson: Make it possible to change the indent string

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

Change 126266 had a related patch set uploaded by Jforrester:
Remove bug 63444 RELEASE-NOTES-1.24 duplicate of RELEASE-NOTES-1.23

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

Change 126266 merged by jenkins-bot:
Remove bug 63444 RELEASE-NOTES-1.24 duplicate of RELEASE-NOTES-1.23

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

Change 126664 had a related patch set uploaded by Anomie:
Actually put release note for bug 63444 in RELEASE-NOTES-1.23 in master

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

@siebrand: Is the bug actually fixed with this merge? Or does other stuff need to be changed to actually switch all the i18n files yet?

(In reply to Brad Jorsch from comment #10)

@siebrand: Is the bug actually fixed with this merge? Or does other stuff
need to be changed to actually switch all the i18n files yet?

That export is running now, apparently.

Change 126664 merged by jenkins-bot:
Actually put release note for bug 63444 in RELEASE-NOTES-1.23 in master

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

Change 127791 had a related patch set uploaded by PleaseStand:
generateJsonI18n.php: Use tabs for indentation

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

Change 127791 merged by jenkins-bot:
generateJsonI18n.php: Use tabs for indentation

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

Change 127880 had a related patch set uploaded by Siebrand:
generateJsonI18n.php: Use tabs for indentation

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

Change 127880 merged by jenkins-bot:
generateJsonI18n.php: Use tabs for indentation

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

[Patch merged a while ago, so resetting Status and Assignee fields]

In core, space indents were changed to tabs on master (in separate changes) though not on REL1_23.

Siebrand, is there a plan to do this for the en.json files of the various extensions?

(In reply to Kevin Israel (PleaseStand) from comment #17)

is there a plan to do this for the en.json files of the various
extensions?

No. When I come across a file I have to make changes to, I change it. I haven't planned addressing it in bulk.

I've created bug 72132 with narrower scope to reflect what has already been done.

is there a plan to do this for the en.json files of the various extensions?

Done now for all extension repositories.