docs icon indicating copy to clipboard operation
docs copied to clipboard

Ping relevant roles in `#docs-i18n` on Discord every “Translation Tuesday”.

Open yanthomasdev opened this issue 2 years ago • 5 comments

If there are new additions to the out-of-date pages list, ping the relevant roles in #docs-i18n on Discord. Suggestion to do this every “Translation Tuesday”.

yanthomasdev avatar Jul 20 '22 21:07 yanthomasdev

Can this be automated from the pinned status tracking issue @hippotastic ?

sarah11918 avatar Sep 07 '22 16:09 sarah11918

Adding a closed issue's content here, which is similar but different:

How can we notify tranlsators when English pages are changed, in case they have open PRs or are currently working on that page's translation? What will a translator need (or find convenient) in this case that we can provide? Is a "Tuesday Ping" enough or do we want something more instant?

Can this be related to Docs congratsbot somehow? Is DocsCongrats bot ENOUGH, if we document, remind translators to pay attention to it?

Original Message: "Can we post a message to open translation PRs when an English page they impact is updated? This avoids the scenario where a translation is proposed, the English page is changed, and the translation is then merged, missing the English changes. (h/t @Chrissdroid on Discord)"

sarah11918 avatar Sep 07 '22 20:09 sarah11918

Regarding the idea of sending a weekly Discord notification containing new additions to the out-of-date pages list: Yes, this can be automated, and I think it's not super hard to implement either! :)

All the information we need for this task should already be present in the JSON state data contained in the issue, and it should be possible to develop an additional script that gets triggered by a weekly GitHub automation and that extracts and processes this JSON state data to generate a Discord notification.

My rough idea on how to implement this would be as follows:

  • Get contents of our Translation Status issue through GitHub's API
  • Extract and parse JSON state data from the retrieved issue contents
  • Go through all English source pages in the state data object (= entries in pages.en), and do the following per page:
    • Go through all supported target languages, and do the following per language:
      • Check if there is a translated version of the English page.
        • If not, put the page into the "missing translation" bucket.
        • Otherwise, check if the translation's lastMajorChange is older than the English source page's value.
          • If so, put the page into the "outdated translation" bucket.
  • We could then filter the resulting buckets of missing & outdated translations to only include pages where the English page's lastMajorChange falls within the time period since the previous notification (e.g. the last 7 days). This would get us pretty close to the goal of only including new additions in the weekly notifications, with the only additional content being pages that were previously outdated already and got "more outdated" in the last 7 days. :)

The resulting data could then be passed to the Ilshidur/[email protected] GitHub action to send a notification to Discord through a newly created webhook (just like Congratsbot/Docsbot).

Okay, I did the technical part, now it's your turn - tag, you're it! :)

Big remaining question: What do you think should be contained in the notification?

  • Should it be one message per language, or a combined one?
  • Should it only list the total number of new outdated / untranslated pages, or their names, or maybe a combination of both (e.g. names of new pages in the list, as well as total count of all open todos per language)?
  • Should it ping the relevant roles?
  • Could you provide some example messages using your answers to the questions above for us to have a look at?

(The message length limit is 2000 characters.)

hippotastic avatar Sep 08 '22 08:09 hippotastic

The "automatically add a comment to open translation PRs when the English source page got changed mid-flight" part you copied over from the other issue is a completely different story, by the way. This would require a lot of additional API calls and I'd consider this out of scope for now.

hippotastic avatar Sep 08 '22 09:09 hippotastic

Haha... thanks Hippo! And, welcome to the "discovered the character limitation" club! 🥳

Yes, the automated comment in real-time was out of scope, but I wanted to simply capture that we considered the idea of having this happen automatically, but I think we already informally decided that would create too many pings (in addition to being a different technical challenge!) and that doing this on a regular time interval makes more sense.

So... gonna add the "help wanted" label? 😄

sarah11918 avatar Sep 08 '22 13:09 sarah11918

We still think this is a cool idea! 🤖

delucis avatar Nov 03 '22 14:11 delucis

We still think it's a good idea! 🤖🤖🤖

Jutanium avatar Mar 16 '23 15:03 Jutanium