Hello together!
On an IRC talk i saw a link to our coding convention [1] with the hint, that we use tabs for indentings, so far so good. Now i was wondering, why our en.json language file (the only one) uses whitespaces, instead of tabs, and if there was a special reason for this? If not, can we change these to tabs?
Background: My favourite editor doesnt show any difference between tabs and whitespaces (sure, more a setting or a problem of the editor), so i had sometimes the problem, that i forget, that there are whitespaces, instead of tabs, which ends in a new patchset for a change :) All our files, including our language files (excluding en.json) uses tabs instead of whitespaces. Now i suggest to be consistent in en.json, too (if there is no special reason for it dont do it) :) Opinions?
[1] https://www.mediawiki.org/wiki/Mobile_web/Coding_conventions
Freundliche Grüße / Kind regards Florian
On 23 September 2014 13:54, Florian Schmidt < florian.schmidt.welzow@t-online.de> wrote:
Hello together!
On an IRC talk i saw a link to our coding convention [1] with the hint, that we use tabs for indentings, so far so good. Now i was wondering, why our en.json language file (the only one) uses whitespaces, instead of tabs, and if there was a special reason for this? If not, can we change these to tabs?
Background: My favourite editor doesn’t show any difference between tabs and whitespaces (sure, more a setting or a „problem“ of the editor), so i had sometimes the problem, that i forget, that there are whitespaces, instead of tabs, which ends in a new patchset for a change :) All our files, including our language files (excluding en.json) uses tabs instead of whitespaces. Now i suggest to be consistent in en.json, too (if there is no special reason for it don’t do it) :) Opinions?
[1] https://www.mediawiki.org/wiki/Mobile_web/Coding_conventions
The conversion script to create the JSON files done using an MW function that output spaces rather than tabs; we fixed this after it was done, but it was too late. All non-en.json i18n files were re-exported from TranslateWiki in correct (tabs) format, but fixing en.json in each of hundreds of repos manually to convert from spaces to tabs wasn't done.
J.
But, if i place a change in gerrit, an dit (maybe) get’s merged, there is no „problem“ after this (e.g. with twn.net?)?
Freundliche Grüße / Kind regards Florian
Von: James Forrester [mailto:jforrester@wikimedia.org] Gesendet: Dienstag, 23. September 2014 23:10 An: Florian Schmidt Cc: mobile-l Betreff: Re: [WikimediaMobile] [MobileFrontend] en.json with spaces: Special reason?
On 23 September 2014 13:54, Florian Schmidt florian.schmidt.welzow@t-online.de wrote: Hello together!
On an IRC talk i saw a link to our coding convention [1] with the hint, that we use tabs for indentings, so far so good. Now i was wondering, why our en.json language file (the only one) uses whitespaces, instead of tabs, and if there was a special reason for this? If not, can we change these to tabs?
Background: My favourite editor doesn’t show any difference between tabs and whitespaces (sure, more a setting or a „problem“ of the editor), so i had sometimes the problem, that i forget, that there are whitespaces, instead of tabs, which ends in a new patchset for a change :) All our files, including our language files (excluding en.json) uses tabs instead of whitespaces. Now i suggest to be consistent in en.json, too (if there is no special reason for it don’t do it) :) Opinions?
[1] https://www.mediawiki.org/wiki/Mobile_web/Coding_conventions
The conversion script to create the JSON files done using an MW function that output spaces rather than tabs; we fixed this after it was done, but it was too late. All non-en.json i18n files were re-exported from TranslateWiki in correct (tabs) format, but fixing en.json in each of hundreds of repos manually to convert from spaces to tabs wasn't done.
J.
On 23 September 2014 14:12, Florian Schmidt < florian.schmidt.welzow@t-online.de> wrote:
But, if i place a change in gerrit, an dit (maybe) get’s merged, there is no „problem“ after this (e.g. with twn.net?)?
Lots of repos have been manually converted, yeah. Ultimately it's up to the repo's maintainers whether they're happy to merge that. J.
Florian Schmidt, 23/09/2014 22:54:
en.json language file (the only one) uses whitespaces, instead of tabs, and if there was a special reason for this? If not, can we change these to tabs?
Yes, just submit a patch. :-) https://bugzilla.wikimedia.org/show_bug.cgi?id=63444#c18
Nemo