FEATURE: Topic slow mode. (PR #10904)

I’m curious why we check this on the client side, when the server is returning the error (and that should be displayed.) ?

Excellent work. This is going to be great.

          if Time.zone.now < threshold

We prefer this in our codebase.

      it "creates the topic if the user's last post is older than the slow mode interval" do

Since we already know that the post can be submitted, I chose to show the error earlier. I’m fine with displaying the error from the backend, do you prefer that instead?

Hi! This message slipped: current: "Current duration is %{hours} hours, %{minutes} minutes, and %{seconds} seconds."

It can’t be translated properly as it doesn’t support any plural forms. Perhaps it can use message format and allow things like: Current duration is 5 hours. Current duration is 30 minutes. Current duration is 5 hours and 15 minutes. etc?

Good catch. I’ll try to replace it with the moment.js duration helper.