User:SpBot/How to make SpBot archive your wiki

{{Autoarchive resolved section}} and the related bot service is available on many wikis as you can see here. If you want to add your wiki to that, there are some steps to do. Please note, I (User:Euku) only understand German, English and Russian - so, you are the one who needs to translate. :)

Notify EukuEdit

You should inform me about your idea. Is there any similar project or language that is already operated by SpBot? If yes, this can answer many questions. If you need to send some texts to me, is a good and fast tool for that.

Import templates from other wikisEdit

First off: the service and functions will only be translated. There are no special functions or features for certain wiki projects, except for technical reasons. Especially, parameters or template names are the same for one language, like the German Wikipedia, Wikisource and Wiktionary or Meta, Commons and Wikidata...

You should think of a good name for these main templates in your local wiki:

Template:Autoarchive resolved section
Template:Section resolved: Some wikis already use some kind of "resolved" template. This one can use one and two parameters.

You should not reuse templates that are already used for other purposes as this confuses people. Also, these templates use some programming to validate the given parameters and to generate error lists.

If SpBot is not already operating in a different project with the same language, you should better start from the templates on Commons. That means:

Unfortunately - for now - all English projects use automatic translation. So, you will see a lot of these templates in the source code. If they are not available in your wiki, there is no other way than to exclude the most important parts.

One part is to translate the descriptions used in the documentation. But the more important part for me/the bot are the translations of:

  • the template parameters. Don't forget timecompare = resolved. It is also very helpful to leave <!-- comments --> with the English original names, as we did for example for the Korean Wikipedia.
  • “Archive” parameter variables: Same applies here.
    • Does your language and country use the en:ISO week date? ISO 8601 means: Weeks start with Monday. Each week's year is the Gregorian year in which the Thursday falls. If not, what comes close?
    • How should I abbreviate months for ((month:short))?
  • Signature format: Is your timestamp format self-explanatory? I also need to know all the abbreviation of the month names in the timestamp, if they are not the same as above. Do they vary for the same month?

At the end, please add the new templates to d:Q15818920 and d:Q15818852.

Translate the bot messagesEdit

The bot also needs to learn the new language for the messages and edit comments. Please translate the following fragments (%s is a place holder for the context):

  • What template should be used for the head of a new archive? For Commons it is: {{Talkarchive}}.
  • If the bot finds an error, it will write the error message to the page.
    • Please translate the message itself:
    self.errorText = "== Archiving could not be finished ==\n"
    self.errorText += "The bot-run at ~~~~~ was not successful, because the template " + self.archiveTemplateName + " contains incorrect parameters. %s"
    self.errorText += "Please have a look at the [[" + self.archiveTemplateName + "|documentation]] and fix the mistake. Regards --~~~~"
    self.errorText += "\n\n[[" + self.errorCategory + "]]<!-- remove this line, if the problem was resolved -->"
  • Edit comments:
    self.archiveSumTargetS = "archiving 1 section from [[%s]]"
    self.archiveSumTargetP = "archiving %d sections from [[%s]]"
    self.archiveSumOriginS = "1 section"
    self.archiveSumOriginP = "%d sections"
    self.archiveSumOriginMulti = "%d to [[%s]]"
    self.archiveSumLastEdit= " - previous edit: [[User:%s|%s]], %s"
    self.archiveSumArchive = "archive %s: %s"
  • The note that will replace the {{Section resolved|1=\\1}} template while archiving:
    self.sectResolved1P = ":<small>This section was archived on a request by: \\1</small>"
    self.sectResolved2P = ":<small>This section was archived on a request by: \\1 \\7</small>"

Is there any {{DNAU}}? Does it work in the same way?

Ready to startEdit

If (in the meantime) my request for a bot flag was successful, I will start the bot to operate automatically at night.