diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 42eaf2a26..e3d21d849 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -272,33 +272,27 @@ jobs: exit 1 fi - # The two ends of the sequence get one link rather than two, which the old shape could not - # spell: a lone argument was the next step, so the last page had no way to say it had none. - # - # Matched on the div rather than the class name. TemplateStyles inlines prevnext/styles.css - # into every page that has a row, so both class names appear in the page's own stylesheet - # whether or not either link was rendered -- which is what the first draft of this check - # tripped over. - if grep -q 'class="wikven-prevnext-prev"' dist/Why_wikitext.html; then - echo "::error::Why wikitext heads the sequence and should have no previous link" - exit 1 - fi - if grep -q 'class="wikven-prevnext-next"' dist/Licenses.html; then - echo "::error::Licenses ends the sequence and should have no next link" - exit 1 - fi - # A prevnext link is labelled with the target page's own title, so on a translated page it # must carry the translated one. The label is not in the calling page's source: the call # sits outside the translate tags and passes a page name, and the template reads the # title from the target's own title unit, which is the whole point -- a label restated in # the caller would be a second copy of a string that is already translated once. # Searching/ko is the fixture, and the expectation is read from the source rather than - # written here: any Korean at all would pass a string pinned in this file. + # written here: any Korean at all would pass a string pinned in this file. Which page + # follows Searching is read from the sidebar for the same reason the row itself is -- + # naming it here would make this a check of a particular order rather than of the label. + following=$(sed -n 's@^\*\* *Special:MyLanguage/\([^|]*\).*@\1@p' 'docs/MediaWiki:Sidebar.wikitext' \ + | awk '/^Searching$/ { if ((getline) > 0) print; exit }') + # Checked before the file is read: awk on docs//ko.wikitext would abort the step with its + # own error, which says nothing about the sidebar being what went wrong. + if [ -z "$following" ]; then + echo "::error::MediaWiki:Sidebar names no page after Searching, so this check has no pair to make" + exit 1 + fi want=$(awk '/^ * sidebar-docs -** Special:MyLanguage/Why wikitext|sidebar-why-wikitext ** Special:MyLanguage/Installation|sidebar-installation ** Special:MyLanguage/Getting Started|sidebar-getting-started ** Special:MyLanguage/Pages|sidebar-pages -** Special:MyLanguage/Editing sidebar|sidebar-editing-sidebar ** Special:MyLanguage/Images|sidebar-images ** Special:MyLanguage/Skins|sidebar-skins +** Special:MyLanguage/Searching|sidebar-searching ** Special:MyLanguage/Extensions|sidebar-extensions ** Special:MyLanguage/Lua modules|sidebar-lua-modules ** Special:MyLanguage/JavaScript|sidebar-javascript -** Special:MyLanguage/Searching|sidebar-searching ** Special:MyLanguage/Translating|sidebar-translating +** Special:MyLanguage/Editing sidebar|sidebar-editing-sidebar ** Special:MyLanguage/Deploying|sidebar-deploying ** Special:MyLanguage/Troubleshooting|sidebar-troubleshooting * sidebar-references ** Special:MyLanguage/Limitations|sidebar-limitations +** Special:MyLanguage/Why wikitext|sidebar-why-wikitext ** Special:MyLanguage/Configuration|sidebar-configuration ** Special:MyLanguage/Standalone binary|sidebar-standalone-binary ** Special:MyLanguage/Commands|sidebar-commands -** Special:MyLanguage/Development|sidebar-development ** Special:MyLanguage/Writing an extension|sidebar-writing-an-extension +** Special:MyLanguage/Development|sidebar-development ** Special:MyLanguage/Licenses|sidebar-licenses