Today modules/ext.templateDataGenerator.editPage.js loads the name of the expected documentation subpage from the i18n string templatedata-doc-subpage.
This however assumes that the subpage used for documentation is only governed by language. In practice there is no reason why en.wikipedia.org, en.wikisource.org and en.weHateAbbreviations.com would all use doc as the name for their documentation subpages.
Moving this from an i18n to a config variable (with fall-back to the i18n if we want to keep that) would acknowledge the fact that not all wikis are Wikipedia.