Mailing List Archive

Enabling translating RCFeed log entry messages(IRC log entry messages)
TLDR: I don't think the system messages for IRC are just for IRC. So I hope to change it.

Hi,
I am an extension developer and I am recently developing an extension[1] that provides a custom RCFeedEngine and an RCFeedFormatter. The purpose of the extension is to stream the recent changes in a wiki to a given Discord webhook.*

The RC feed engines send messages in a freely configurable format to an engine set in $wgRCEngines[2] and every RC log entry has a system message for RC feed output. For instance, logs for moving a page have a message named "1movedto2" which is represented "moved [[$1]] to [[$2]]" in English.

Disappointingly, I have found [[MediaWiki:1movedto2/qqq]] and similar messages on translatewiki include {{ignored}} template that says "This message is ignored on export for MediaWiki. Translating it is a waste of your effort!" and it seems to be true. The main cause of this is probably that the messages are only for irc.wikimedia.org and irc.wikimedia.org will be replaced with EventStreams? I couldn't find the exact reason.

In my opinion, the log entry messages are not just for IRC. IRC is an implementation of RCFeed and RCFeed is a general interface and can be extended in many ways as even the core includes multiple RCFeedEngines. So, if I'm not wrong, I'd like to create a ticket for enabling translation and request your opinions.

Regards.
-User:Lens0021

* There are a few extensions with a similar purpose. But the extensions are not RCFeedEngines and define their own system messages and use them instead of using the log entry messages.

---
[1] https://www.mediawiki.org/wiki/Extension:DiscordRCFeed
[2] https://www.mediawiki.org/wiki/Manual:$wgRCEngines
_______________________________________________
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
Re: Enabling translating RCFeed log entry messages(IRC log entry messages) [ In reply to ]
I can't help you with your problem, but:

> The main cause of this is probably that the messages are only for
irc.wikimedia.org and irc.wikimedia.org will be replaced with EventStreams?

I don't think this is the cause. We'd love to deprecate irc.wikimedia.org,
but doing so is probably practically impossible I'm not aware of any work
to remove irc.wikimedia.org. There has been talk about replacing its
backend <https://phabricator.wikimedia.org/T234234>, but the frontend IRC
channels would remain.

On Thu, Sep 23, 2021 at 3:01 PM lens0021 lens0021 <lorentz0021@gmail.com>
wrote:

> TLDR: I don't think the system messages for IRC are just for IRC. So I
> hope to change it.
>
> Hi,
> I am an extension developer and I am recently developing an extension[1]
> that provides a custom RCFeedEngine and an RCFeedFormatter. The purpose of
> the extension is to stream the recent changes in a wiki to a given Discord
> webhook.*
>
> The RC feed engines send messages in a freely configurable format to an
> engine set in $wgRCEngines[2] and every RC log entry has a system message
> for RC feed output. For instance, logs for moving a page have a message
> named "1movedto2" which is represented "moved [[$1]] to [[$2]]" in English.
>
> Disappointingly, I have found [[MediaWiki:1movedto2/qqq]] and similar
> messages on translatewiki include {{ignored}} template that says "This
> message is ignored on export for MediaWiki. Translating it is a waste of
> your effort!" and it seems to be true. The main cause of this is probably
> that the messages are only for irc.wikimedia.org and irc.wikimedia.org
> will be replaced with EventStreams? I couldn't find the exact reason.
>
> In my opinion, the log entry messages are not just for IRC. IRC is an
> implementation of RCFeed and RCFeed is a general interface and can be
> extended in many ways as even the core includes multiple RCFeedEngines. So,
> if I'm not wrong, I'd like to create a ticket for enabling translation and
> request your opinions.
>
> Regards.
> -User:Lens0021
>
> * There are a few extensions with a similar purpose. But the extensions
> are not RCFeedEngines and define their own system messages and use them
> instead of using the log entry messages.
>
> ---
> [1] https://www.mediawiki.org/wiki/Extension:DiscordRCFeed
> [2] https://www.mediawiki.org/wiki/Manual:$wgRCEngines
> _______________________________________________
> Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
> To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org
> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
>
Re: Enabling translating RCFeed log entry messages(IRC log entry messages) [ In reply to ]
Messages like "1movedto2" are preserved for compatibility reasons and
should not be used. Long time ago they were used on Special:Log (and the
non-special pages before them). The problem with them is that they are not
full sentences, so translating them into other languages correctly is not
possible. 10 years ago I rewrote the log formatting
<https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/4ac56c2466594875a0bee5086b4028dc53e6753b>
code to allow using full sentences. It uses messages of the format
logentry-*-*. However, changing the messages in the IRC output would have
been breaking change for all bots parsing that output, so the feed system
was intentionally changed to use the legacy messages and new translations
for the legacy messages were disabled.

The way forward would be to decouple the formatting so that you can choose
to use the new messages in the output.
-Niklas

to 23. syysk. 2021 klo 22.01 lens0021 lens0021 (lorentz0021@gmail.com)
kirjoitti:
>
> TLDR: I don't think the system messages for IRC are just for IRC. So I
hope to change it.
>
> Hi,
> I am an extension developer and I am recently developing an extension[1]
that provides a custom RCFeedEngine and an RCFeedFormatter. The purpose of
the extension is to stream the recent changes in a wiki to a given Discord
webhook.*
>
> The RC feed engines send messages in a freely configurable format to an
engine set in $wgRCEngines[2] and every RC log entry has a system message
for RC feed output. For instance, logs for moving a page have a message
named "1movedto2" which is represented "moved [[$1]] to [[$2]]" in English.
>
> Disappointingly, I have found [[MediaWiki:1movedto2/qqq]] and similar
messages on translatewiki include {{ignored}} template that says "This
message is ignored on export for MediaWiki. Translating it is a waste of
your effort!" and it seems to be true. The main cause of this is probably
that the messages are only for irc.wikimedia.org and irc.wikimedia.org will
be replaced with EventStreams? I couldn't find the exact reason.
>
> In my opinion, the log entry messages are not just for IRC. IRC is an
implementation of RCFeed and RCFeed is a general interface and can be
extended in many ways as even the core includes multiple RCFeedEngines. So,
if I'm not wrong, I'd like to create a ticket for enabling translation and
request your opinions.
>
> Regards.
> -User:Lens0021
>
> * There are a few extensions with a similar purpose. But the extensions
are not RCFeedEngines and define their own system messages and use them
instead of using the log entry messages.
>
> ---
> [1] https://www.mediawiki.org/wiki/Extension:DiscordRCFeed
> [2] https://www.mediawiki.org/wiki/Manual:$wgRCEngines
> _______________________________________________
> Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
> To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org
>
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
Re: Enabling translating RCFeed log entry messages(IRC log entry messages) [ In reply to ]
Thank you, all. Now I understand why the messages I mentioned should be ignored and know \LogFormatter::newFromRow( $attribs )->getPlainActionText(); call in \RCFeedFormatter::getLine() gives what I want. Thanks!

Best
--Lens0021
_______________________________________________
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/