FlominatorTM / wikiblame

http://wikipedia.ramselehof.de/wikiblame.php
GNU General Public License v3.0
54 stars 13 forks source link

Default lang to user lang only in Wikimedia projects #41

Closed waldyrious closed 2 years ago

waldyrious commented 2 years ago

Fixes #40.

waldyrious commented 2 years ago

@FlominatorTM, in wikiblame.php there's code made to handle $lang=="blank":

https://github.com/FlominatorTM/wikiblame/blob/3415d8033f72310fed1f77ff38b04837ccb196aa/wikiblame.php#L285-L288

...but there doesn't seem to be any code setting the variable to that value.

Should I change the code in this PR to add an else clause and set $lang = "blank", or should I change the comparison itself?

-if($lang=="blank") 
+if($lang=="") 

I'd prefer the first option, but let me know what you think.

FlominatorTM commented 2 years ago

Oh right, I remember ... but doesn't "blank" then fix your initial problem?

https://wikipedia.ramselehof.de/wikiblame.php?user_lang=de&lang=blank&project=translatewiki&tld=net&article=Translating%3AMediaWiki&needle=powers+Wikipedia+and+many+o&skipversions=0&ignorefirst=0&limit=500&offtag=16&offmon=7&offjahr=2022&searchmethod=int&order=desc&user=

waldyrious commented 2 years ago

Ah! Good point, it does... but it feels even hackier than using "www" :P I'd rather have the code handle "" as it currently does "blank"; that would be more intuitive IMO.

Or, if we're to keep the default to "en" and simply document this option of writing "blank", as we did for "www" in #12, I would prefer if it was something like "[blank]" (i.e. with the brackets), to indicate that it's a special value.

And maybe use "[none] instead of [blank], which IMO works better in English.

WDYT?

FlominatorTM commented 2 years ago

Ah! Good point, it does... but it feels even hackier than using "www" :P I'd rather have the code handle "" as it currently does "blank"; that would be more intuitive IMO.

Or, if we're to keep the default to "en" and simply document this option of writing "blank", as we did for "www" in #12, I would prefer if it was something like "[blank]" (i.e. with the brackets), to indicate that it's a special value.

And maybe use "[none] instead of [blank], which IMO works better in English.

WDYT?

Sorry for not picking this up. I have way too many tasks at the moment and considered it a bit too unimportant to think deeper about it. Do you maybe want to have write access to the repository and the ability to upload new versions?

waldyrious commented 2 years ago

Sorry for not picking this up. I have way too many tasks at the moment and considered it a bit too unimportant to think deeper about it.

No worries, I understood that, and can sympathize with the plight :sweat_smile:.

Do you maybe want to have write access to the repository and the ability to upload new versions?

Write access to the git repo would be welcome in the sense that I generally support making open source projects more wiki-like, but I have to say that I don't really foresee having the availability to contribute a lot to the project in the near future — let alone maintain it. Still, I agree it makes sense to have more people with write access, if only to reduce the bus factor :)

As for the ability to upload new versions (to the server, I presume?), I'm not sure I'd like to take on the responsibility of doing such changes unilaterally — I'd rather they go through your approval first. That said, if it would make it easier for you to just approve a change and me to apply it (or, say, deploy changes made in PRs once they are merged), then sure. I appreciate the trust!

waldyrious commented 1 year ago

Thanks for the invitation, @FlominatorTM — I just accepted it! In any case, the open questions I raised above still stand :)

FlominatorTM commented 1 year ago

You mean about my intentions? I would have been willing to give you everything, just to put it into more motivated hands and to get rid of it ;)

waldyrious commented 1 year ago

Hmm. Assuming you mean giving me write access to the server where WikiBlame is hosted, I should say that I wouldn't want to take up the responsibility of maintaining this tool alone. I mean alone in the sense that it wouldn't (shouldn't) be up to me to, for example, take the decision to share write access with others who may show up willing to help maintaining it — I'd still have to seek your approval, since it's your server. In other words, giving me the "keys" could resolve the active maintenance issue, but not the bottleneck / low bus factor.

I would be more comfortable if the hosting of the tool was placed in Toolforge, just so that the community could at least have a recourse (via the abandoned tool policy) to adopt the tool should it become wholly abandoned in the future.

Note that even with moving the hosting to Toolforge it would still be possible to keep the source code on GitHub, and indeed use GitHub as the canonical home of the source code, with updates being automatically pushed to Toolforge without manual intervention (if we wish to set it up that way). I do that with Primerpedia, for example — see https://github.com/waldyrious/primerpedia/issues/50#issuecomment-493787080 — and documented the steps to do so here.

Would something along those lines be OK with you? There would of course be redirect rules set up in http://wikipedia.ramselehof.de/ so that existing links and bookmarks would continue to work.

tacsipacsi commented 1 year ago

There’s already https://blame.toolforge.org/wikiblame.php, but its output is buffered, which makes it much less usable (it’s likely to time out). I’m not sure if it can be changed, probably the actual server is behind several layers of reverse proxies.