Server Handbook live check: run log ------------------------------------------------------------------------------ Tool https://serverhandbook.com/tools/ojs-back-issue-importer Check scripts/live/checks/tool-ojs-back-issue-importer.mjs (sha256 b427cf2baa85903a8d0baefe02bece6e3b0fe0354f105cb7ad513030fa9fda67) Ran at 2026-12-04T16:00:26Z (516 s) Result PASS, all 26 claims held Tested on System Ubuntu 24.04.5 LTS Kernel 6.8.0-151-generic Package nginx 1.24.0-2ubuntu7.21 Package mariadb-server 1:10.11.14-0ubuntu0.24.04.1 Package php-fpm 2:8.3+93ubuntu2 Package libxml2-utils 2.9.14+dfsg-1.3ubuntu3.10 Package ojs 3.5.0.6 Setup A fresh Ubuntu 24.04 server (4 GB of memory) with OJS 3.5.0.6 installed as lesson 1 of the OJS course installs it (Nginx, PHP-FPM, MariaDB, the files folder in /var/www/files; done by the check before the first step shown; the site name journal.example.com points to it through an /etc/hosts line, as your DNS would), reached over SSH as a sudo user. The installer was also given Urdu and Chinese (Simplified) as additional languages. Every version above was read from the server at run time. Passwords used on the throwaway test server are shown as [password]. How we test: https://serverhandbook.com/how-we-test ------------------------------------------------------------------------------ What the steps changed on the server (recorded before the first step and after the last) Packages added (1) libxml2-utils 2.9.14+dfsg-1.3ubuntu3.10 Packages upgraded (0) Packages removed (0) Services enabled at boot (0) Services disabled (0) Listening sockets opened (0) Listening sockets closed (0) Files added in /etc (0) Files changed in /etc (0) Files removed from /etc (0) Disk used on / (includes logs written during the run): +4.1 MB ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Claims (26), each with what the run saw ------------------------------------------------------------------------------ 1. ok a bare Ubuntu 24.04 server box (web-server) starts 2. ok the tool refuses every broken spreadsheet with its reason, renamed language codes included (local check: all pass) | PASS the fixture builds with no errors | PASS one note only: the row with no galley | PASS two issues (Vol. 3 No. 1 and No. 2), with 3 and 2 articles | PASS Vol. 3 No. 1 has two sections (ART, REV) | SKIP schema validation (pass --xsd=) | PASS issues: Vol. 3 No. 1 2019 (2019-06-30) and No. 2 (2019-12-31), neither made current | PASS two authors, family and given names, emails, in order | PASS the abstract keeps its quotes and comma, inside

| PASS the Urdu article: locale ur, Urdu title first, English title second, Urdu author and file name, its PDF embedded | PASS the Chinese article: locale zh_Hans, a one-part name as the given name, its PDF embedded | PASS the review is in section REV, with no galley | PASS splitName: "Khan, Sara" → family Khan, given Sara; "王芳" → given only | PASS refused: only a header | PASS refused: no title column | PASS refused: no issue_date column | PASS refused: a column the tool does not know | PASS refused: a language on a column that cannot have one | PASS refused: a bad language code | PASS refused: a language code OJS 3.5 renamed (zh_CN), with the new one | PASS refused: a renamed code in a column header (title[sr@latin]) | PASS refused: a date that is not YYYY-MM-DD | PASS refused: one issue with two dates | PASS refused: a row with no title | PASS refused: a row with no author | PASS refused: fewer emails than authors | PASS refused: an email that is not one | PASS refused: a galley file that was not added | PASS refused: the same galley on two rows | PASS refused: one section abbreviation with two titles | PASS refused: a row that names no issue | PASS refused: an unquoted comma (more cells than columns) | PASS refused: a hidden control character | | all checks pass 3. ok (setup) the site name points to this server 4. ok (setup) Nginx, MariaDB, PHP-FPM and the PHP extensions 5. ok (setup) database and user ojs 6. ok (setup) OJS 3.5.0-6 from pkp.sfu.ca into /var/www/ojs 7. ok (setup) cache/, public/, config.inc.php for www-data 8. ok (setup) the Nginx server block 9. ok (setup) /var/www/files for www-data, mode 750 10. ok (setup) the web installer (posted with curl) 11. ok (setup) config.inc.php root:www-data 640 (the installer set allowed_hosts) 12. ok (setup) OJS is installed and its sign-in page answers | installed = On | 200 13. ok the installer installed Urdu and Chinese (Simplified) next to English: ["en","ur","zh_Hans"] (order may differ) | installed_locales supported_locales | ["ur","zh_Hans","en"] ["ur","zh_Hans","en"] 14. ok (setup) the journal "Example Journal" (/example) created through the API | {"_href":"http:\/\/journal.example.com\/index.php\/example\/api\/v1\/contexts\/1","abbreviation":{"en":"","ur":"","zh_Hans":""},"about":{"en":"","ur":"","zh_Hans":""},"acronym":{"en":"EJ","ur":"","zh_Hans":""},"additionalHomeContent":{"en":"","ur":"","zh_Hans":""},"agencies":null,"announcementsIntroduction":{"en":"","ur":"","zh_Hans":""},"authorGuidelines":{"en":"

Authors are invited to make a submission to this journal. All submissions will be assessed by an editor to determine whether they meet the aims and scope of this journal. Those considered to be a good fit will be sent for peer revi 15. ok the journal has the three languages for its forms and its submissions | setting_name setting_value | supportedAddedSubmissionLocales ["en","ur","zh_Hans"] | supportedFormLocales ["en","ur","zh_Hans"] | supportedLocales ["en","ur","zh_Hans"] | supportedSubmissionLocales ["en","ur","zh_Hans"] | supportedSubmissionMetadataLocales ["en","ur","zh_Hans"] 16. ok xmllint: the XML validates against OJS’s own native.xsd | /tmp/back-issues.xml validates 17. ok importExport.php: "The import completed successfully", five submissions and two issues | The import completed successfully. The following items were imported: | | Submission | -"1" - "Soil moisture in dry seasons" | -"2" - "Groundwater recharge on terraced farms" | -"3" - "Rainfall records 1990 to 2020: a review" | -"4" - "Water use in Punjab villages" | -"5" - "Irrigation water in rice fields" | Issue | -"1" - "Vol. 3 No. 1 (2019)" | -"2" - "Vol. 3 No. 2 (2019)" 18. ok each article in its language: the Urdu one has locale ur with its Urdu and English titles | id locale title_locale title | 1 en en Soil moisture in dry seasons | 2 en en Groundwater recharge on terraced farms | 3 en en Rainfall records 1990 to 2020: a review | 4 ur en Water use in Punjab villages | 4 ur ur پنجاب کے دیہات میں پانی کا استعمال | 5 zh_Hans en Irrigation water in rice fields | 5 zh_Hans zh_Hans 稻田灌溉用水研究 19. ok the Chinese one has locale zh_Hans with its Chinese and English titles | id locale title_locale title | 1 en en Soil moisture in dry seasons | 2 en en Groundwater recharge on terraced farms | 3 en en Rainfall records 1990 to 2020: a review | 4 ur en Water use in Punjab villages | 4 ur ur پنجاب کے دیہات میں پانی کا استعمال | 5 zh_Hans en Irrigation water in rice fields | 5 zh_Hans zh_Hans 稻田灌溉用水研究 20. ok two authors from one cell (Sara Khan | Kwame Osei); "Plato" and 王芳 as a given name alone | id authors | 1 Sara Khan | Kwame Osei | 2 Ana Lopez | 3 Plato | 4 بلال احمد | 5 王芳 21. ok the article pages show the Urdu and Chinese titles; the archive lists both back issues | پنجاب کے دیہات میں پانی کا استعمال | 稻田灌溉用水研究 | Vol. 3 No. 1 (2019) | Vol. 3 No. 2 (2019) 22. ok the four PDFs download from the journal byte for byte (SHA-256 equal to the files given to the tool) | 0d2326a81154ce71e175ffa24a42946716d6bc1491be457a69a6ec986814b6b5 | 49edd7039a978f56e1d495af27897488cd5a3b53a4cff6353fe49ab00541b0d6 | 4d5c3628ede0d20fea7e7f40c785562d11e4f0ee09d6235cf0f0ca7e9739234e | 64a40a65576c631c91589687be477f3027d9f5d1f466bf565655e1b2ccaf719f | want: | 0d2326a81154ce71e175ffa24a42946716d6bc1491be457a69a6ec986814b6b5 | 49edd7039a978f56e1d495af27897488cd5a3b53a4cff6353fe49ab00541b0d6 | 4d5c3628ede0d20fea7e7f40c785562d11e4f0ee09d6235cf0f0ca7e9739234e | 64a40a65576c631c91589687be477f3027d9f5d1f466bf565655e1b2ccaf719f 23. ok OJS 3.5 has zh_Hans and zh_Hant, and no zh_CN: not a locale folder, not in its language list | zh_Hans | zh_Hant | {'zh_CN': None, 'zh_Hans': 'Chinese (Simplified)', 'zh_Hant': 'Chinese (Traditional)'} 24. ok (setup) the journal "Second Journal" (/second) created through the API | {"_href":"http:\/\/journal.example.com\/index.php\/second\/api\/v1\/contexts\/2","abbreviation":{"en":""},"about":{"en":""},"acronym":{"en":"EJ"},"additionalHomeContent":{"en":""},"agencies":null,"announcementsIntroduction":{"en":""},"authorGuidelines":{"en":"

Authors are invited to make a submission to this journal. All submissions will be assessed by an editor to determine whether they meet the aims and scope of this journal. Those considered to be a good fit will be sent for peer review before determining whether they will be accepted or rejected.<\/p>

Before making a submission, author 25. ok yet the same XML with "zh_CN" imports without a word, and the article is stored as zh_CN | The import completed successfully. The following items were imported: | | Submission | locale | en | ur | zh_CN 26. ok (tested on) the box reports its OS, kernel and the version of 5 package(s) | PRETTY_NAME="Ubuntu 24.04.5 LTS" | VIRT=none | KERNEL=6.8.0-151-generic | PKG libxml2-utils 2.9.14+dfsg-1.3ubuntu3.10 | PKG mariadb-server 1:10.11.14-0ubuntu0.24.04.1 | PKG nginx 1.24.0-2ubuntu7.21 | PKG php-fpm 2:8.3+93ubuntu2 | ojs: 3.5.0.6 ------------------------------------------------------------------------------ Commands and what they printed (10) ------------------------------------------------------------------------------ $ sudo mariadb -B ojs -e "SELECT installed_locales, supported_locales FROM site" installed_locales supported_locales ["ur","zh_Hans","en"] ["ur","zh_Hans","en"] $ sudo mariadb -B ojs -e "SELECT setting_name, setting_value FROM journal_settings WHERE setting_name LIKE 'supported%Locales' ORDER BY 1" setting_name setting_value supportedAddedSubmissionLocales ["en","ur","zh_Hans"] supportedFormLocales ["en","ur","zh_Hans"] supportedLocales ["en","ur","zh_Hans"] supportedSubmissionLocales ["en","ur","zh_Hans"] supportedSubmissionMetadataLocales ["en","ur","zh_Hans"] $ cd /var/www/ojs && xmllint --noout --schema plugins/importexport/native/native.xsd /tmp/back-issues.xml /tmp/back-issues.xml validates $ cd /var/www/ojs && sudo -u www-data php tools/importExport.php NativeImportExportPlugin import /tmp/back-issues.xml example admin 2>&1 | grep -v 'PHP Notice: tempnam' The import completed successfully. The following items were imported: Submission -"1" - "Soil moisture in dry seasons" -"2" - "Groundwater recharge on terraced farms" -"3" - "Rainfall records 1990 to 2020: a review" -"4" - "Water use in Punjab villages" -"5" - "Irrigation water in rice fields" Issue -"1" - "Vol. 3 No. 1 (2019)" -"2" - "Vol. 3 No. 2 (2019)" $ sudo mariadb -B ojs -e "SELECT s.submission_id AS id, s.locale, ps.locale AS title_locale, ps.setting_value AS title FROM submissions s JOIN publications p ON p.publication_id = s.current_publication_id JOIN publication_settings ps ON ps.publication_id = p.publication_id AND ps.setting_name = 'title' ORDER BY s.submission_id, ps.locale" id locale title_locale title 1 en en Soil moisture in dry seasons 2 en en Groundwater recharge on terraced farms 3 en en Rainfall records 1990 to 2020: a review 4 ur en Water use in Punjab villages 4 ur ur پنجاب کے دیہات میں پانی کا استعمال 5 zh_Hans en Irrigation water in rice fields 5 zh_Hans zh_Hans 稻田灌溉用水研究 $ sudo mariadb -B ojs -e "SELECT a.submission_id AS id, GROUP_CONCAT(CONCAT_WS(' ', g.setting_value, f.setting_value) ORDER BY a.seq SEPARATOR ' | ') AS authors FROM (SELECT au.author_id, p.submission_id, au.seq FROM authors au JOIN publications p ON p.publication_id = au.publication_id) a LEFT JOIN author_settings g ON g.author_id = a.author_id AND g.setting_name = 'givenName' LEFT JOIN author_settings f ON f.author_id = a.author_id AND f.setting_name = 'familyName' GROUP BY a.submission_id ORDER BY 1" id authors 1 Sara Khan | Kwame Osei 2 Ana Lopez 3 Plato 4 بلال احمد 5 王芳 $ curl -sL http://journal.example.com/index.php/example/ur/article/view/4 | grep -o 'پنجاب کے دیہات میں پانی کا استعمال' | head -n 1 $ curl -sL http://journal.example.com/index.php/example/zh_Hans/article/view/5 | grep -o '稻田灌溉用水研究' | head -n 1 $ curl -sL http://journal.example.com/index.php/example/en/issue/archive | grep -oE 'Vol\. 3 No\. [12] \(2019\)' | sort -u پنجاب کے دیہات میں پانی کا استعمال 稻田灌溉用水研究 Vol. 3 No. 1 (2019) Vol. 3 No. 2 (2019) $ sudo mariadb -B ojs -e "SELECT p.submission_id, g.galley_id, g.submission_file_id FROM publication_galleys g JOIN publications p ON p.publication_id = g.publication_id ORDER BY 1" | tail -n +2 | while read s g f; do $ curl -sL http://journal.example.com/index.php/example/en/article/download/$s/$g/$f | sha256sum | cut -c1-64 $ done | sort 0d2326a81154ce71e175ffa24a42946716d6bc1491be457a69a6ec986814b6b5 49edd7039a978f56e1d495af27897488cd5a3b53a4cff6353fe49ab00541b0d6 4d5c3628ede0d20fea7e7f40c785562d11e4f0ee09d6235cf0f0ca7e9739234e 64a40a65576c631c91589687be477f3027d9f5d1f466bf565655e1b2ccaf719f $ cd /var/www/ojs && ls locale | grep -E '^zh' ; python3 -c "import json; d = json.load(open('lib/pkp/lib/weblateLanguages/languages.json')); print({k: d.get(k) for k in ('zh_CN', 'zh_Hans', 'zh_Hant')})" zh_Hans zh_Hant {'zh_CN': None, 'zh_Hans': 'Chinese (Simplified)', 'zh_Hant': 'Chinese (Traditional)'} $ cd /var/www/ojs && sudo -u www-data php tools/importExport.php NativeImportExportPlugin import /tmp/back-issues-zh_CN.xml second admin 2>&1 | grep -v 'PHP Notice: tempnam' | head -n 3 $ sudo mariadb -B ojs -e "SELECT DISTINCT s.locale FROM submissions s JOIN journals j ON j.journal_id = s.context_id WHERE j.path = 'second' ORDER BY 1" The import completed successfully. The following items were imported: Submission locale en ur zh_CN ------------------------------------------------------------------------------ The check's source (scripts/live/checks/tool-ojs-back-issue-importer.mjs) As it ran. ------------------------------------------------------------------------------ /** * TOOL proof (plan07 §2): /tools/ojs-back-issue-importer. Rented build server (LIVE_VPS + LIVE_VPS_NODOMAIN=1, 4 GB), * per release. Hidden setup: OJS as lesson 1 installs it (ojs-base.mjs), with Urdu and Chinese (Simplified) ticked as * additional languages in the installer, and a journal with those languages made through OJS's API. * * What it proves: the XML the tool makes, built by the tool's OWN module (lib/tools/ojs-back-issue-importer, through * scripts/tools/check-ojs-back-issue-importer.ts --out) from the sample spreadsheet the page offers (two back issues, * five articles: two authors in one cell, an author with one name, a review with no galley, an Urdu article and a * Chinese one with English titles too, Urdu and Chinese PDF names), validates against OJS's own native.xsd, is imported * by OJS's own `tools/importExport.php NativeImportExportPlugin import`, and the journal then shows every title in its * language and serves each PDF byte for byte. * And the refusal the tool adds for an old language code: OJS 3.5 has no "zh_CN" (its own language list and locale * folders), yet its import stores it as it is (the same XML with zh_CN, imported into a second journal). * The tool's checks BEFORE an import (a missing PDF, a bad column, a renamed code …) run on this computer: * `npx tsx scripts/tools/check-ojs-back-issue-importer.ts`, part of this run (hidden, its result is a claim). */ import { createHash } from 'node:crypto' import { execFileSync } from 'node:child_process' import { mkdtempSync, readFileSync, readdirSync, writeFileSync } from 'node:fs' import { tmpdir } from 'node:os' import { join } from 'node:path' import { bareBox, reportBox } from '../lib.mjs' import { putFile } from '../box.mjs' import { basePackages, baseSetup, createJournal, installOjs, SITE } from '../ojs-base.mjs' export const meta = { box: 'vps' } const RELEASE = process.env.LIVE_BOX_RELEASE || '24.04' const DB_PASS = '[password]' const ADMIN_PASS = '[password]' const TOOL = 'scripts/tools/check-ojs-back-issue-importer.ts' const FILES = ['soil-moisture.pdf', 'groundwater.pdf', 'تحقیق-۱.pdf', '论文-2.pdf'] const H = `http://${SITE}/index.php/example` const IMPORT = (xml, journal) => `cd /var/www/ojs && sudo -u www-data php tools/importExport.php NativeImportExportPlugin import ${xml} ${journal} admin 2>&1 | grep -v 'PHP Notice: tempnam'` const DB = (sql) => `sudo mariadb -B ojs -e "${sql}"` const check = (ctx) => bareBox(ctx, async ({ sudoUser }) => { const sh = sudoUser() const { run, L } = sh // hidden, on this computer: the tool's own refusals, then the XML from the sample spreadsheet with four small PDFs const local = execFileSync('npx', ['tsx', TOOL], { encoding: 'utf8' }) ctx.check('the tool refuses every broken spreadsheet with its reason, renamed language codes included (local check: all pass)', /all checks pass/.test(local) && !/^FAIL/m.test(local), local) const dir = mkdtempSync(join(tmpdir(), 'ojs-back-issues-')) const pdfs = join(dir, 'pdfs') execFileSync('mkdir', [pdfs]) for (const f of FILES) writeFileSync(join(pdfs, f), `%PDF-1.4\n% ${f}\n1 0 obj << /Type /Catalog /Pages 2 0 R >> endobj\n2 0 obj << /Type /Pages /Kids [] /Count 0 >> endobj\ntrailer << /Root 1 0 R >>\n%%EOF\n`) const sums = readdirSync(pdfs).map((f) => createHash('sha256').update(readFileSync(join(pdfs, f))).digest('hex')).sort() const xml = join(dir, 'back-issues.xml') execFileSync('npx', ['tsx', TOOL, `--out=${xml}`, `--files=${pdfs}`], { encoding: 'utf8' }) // the same file with the old Chinese code, for the second journal (the tool itself refuses to write it) const oldXml = join(dir, 'back-issues-zh_CN.xml') writeFileSync(oldXml, readFileSync(xml, 'utf8').replaceAll('"zh_Hans"', '"zh_CN"')) installOjs(ctx, sh, { dbPass: DB_PASS, adminPass: ADMIN_PASS, additionalLocales: ['ur', 'zh_Hans'] }) const site = run(DB('SELECT installed_locales, supported_locales FROM site'), { id: 'site-locales' }) ctx.check('the installer installed Urdu and Chinese (Simplified) next to English: ["en","ur","zh_Hans"] (order may differ)', ['en', 'ur', 'zh_Hans'].every((l) => (site.out.match(new RegExp(`"${l}"`, 'g')) ?? []).length === 2), site.out) createJournal(ctx, sh, { adminPass: ADMIN_PASS, locales: ['en', 'ur', 'zh_Hans'] }) const jl = run(DB("SELECT setting_name, setting_value FROM journal_settings WHERE setting_name LIKE 'supported%Locales' ORDER BY 1"), { id: 'journal-locales' }) ctx.check('the journal has the three languages for its forms and its submissions', /supportedFormLocales\s+\["en","ur","zh_Hans"\]/.test(jl.out) && /supportedSubmissionLocales\s+\["en","ur","zh_Hans"\]/.test(jl.out), jl.out) // ── the file the tool made ──────────────────────────────────────────────────────────── if (!putFile(xml, '/tmp/back-issues.xml') || !putFile(oldXml, '/tmp/back-issues-zh_CN.xml')) throw new Error('could not copy the XML to the box') L('sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -q libxml2-utils > /dev/null') const xsd = run('cd /var/www/ojs && xmllint --noout --schema plugins/importexport/native/native.xsd /tmp/back-issues.xml', { id: 'xmllint' }) ctx.check('xmllint: the XML validates against OJS’s own native.xsd', xsd.exit === 0 && /\/tmp\/back-issues\.xml validates/.test(xsd.out), xsd.out) // ── OJS's own import ────────────────────────────────────────────────────────────────── const imp = run(IMPORT('/tmp/back-issues.xml', 'example'), { id: 'import', timeout: 600000 }) ctx.check('importExport.php: "The import completed successfully", five submissions and two issues', /The import completed successfully/.test(imp.out) && (imp.out.match(/^-"\d+" - "/gm) ?? []).length === 7 && imp.out.includes('"Vol. 3 No. 1 (2019)"') && imp.out.includes('"Vol. 3 No. 2 (2019)"'), imp.out) const titles = run(DB("SELECT s.submission_id AS id, s.locale, ps.locale AS title_locale, ps.setting_value AS title FROM submissions s JOIN publications p ON p.publication_id = s.current_publication_id JOIN publication_settings ps ON ps.publication_id = p.publication_id AND ps.setting_name = 'title' ORDER BY s.submission_id, ps.locale"), { id: 'titles' }) const t = titles.out ctx.check('each article in its language: the Urdu one has locale ur with its Urdu and English titles', /\tur\tur\tپنجاب کے دیہات میں پانی کا استعمال$/m.test(t) && /\tur\ten\tWater use in Punjab villages$/m.test(t), t) ctx.check('the Chinese one has locale zh_Hans with its Chinese and English titles', /\tzh_Hans\tzh_Hans\t稻田灌溉用水研究$/m.test(t) && /\tzh_Hans\ten\tIrrigation water in rice fields$/m.test(t), t) const people = run(DB("SELECT a.submission_id AS id, GROUP_CONCAT(CONCAT_WS(' ', g.setting_value, f.setting_value) ORDER BY a.seq SEPARATOR ' | ') AS authors FROM (SELECT au.author_id, p.submission_id, au.seq FROM authors au JOIN publications p ON p.publication_id = au.publication_id) a LEFT JOIN author_settings g ON g.author_id = a.author_id AND g.setting_name = 'givenName' LEFT JOIN author_settings f ON f.author_id = a.author_id AND f.setting_name = 'familyName' GROUP BY a.submission_id ORDER BY 1"), { id: 'authors' }) ctx.check('two authors from one cell (Sara Khan | Kwame Osei); "Plato" and 王芳 as a given name alone', /Sara Khan \| Kwame Osei/.test(people.out) && /\tPlato$/m.test(people.out) && /\t王芳$/m.test(people.out), people.out) // ── what a reader sees ──────────────────────────────────────────────────────────────── const ids = Object.fromEntries([...t.matchAll(/^(\d+)\t(ur|zh_Hans)\t\2\t/gm)].map((m) => [m[2], m[1]])) const pages = run( [ `curl -sL ${H}/ur/article/view/${ids.ur} | grep -o 'پنجاب کے دیہات میں پانی کا استعمال' | head -n 1`, `curl -sL ${H}/zh_Hans/article/view/${ids.zh_Hans} | grep -o '稻田灌溉用水研究' | head -n 1`, `curl -sL ${H}/en/issue/archive | grep -oE 'Vol\\. 3 No\\. [12] \\(2019\\)' | sort -u`, ].join('\n'), { id: 'reader-pages' }, ) ctx.check('the article pages show the Urdu and Chinese titles; the archive lists both back issues', pages.out.includes('پنجاب کے دیہات میں پانی کا استعمال') && pages.out.includes('稻田灌溉用水研究') && pages.out.includes('Vol. 3 No. 1 (2019)') && pages.out.includes('Vol. 3 No. 2 (2019)'), pages.out) const dl = run( [ `${DB('SELECT p.submission_id, g.galley_id, g.submission_file_id FROM publication_galleys g JOIN publications p ON p.publication_id = g.publication_id ORDER BY 1')} | tail -n +2 | while read s g f; do`, ` curl -sL ${H}/en/article/download/$s/$g/$f | sha256sum | cut -c1-64`, 'done | sort', ].join('\n'), { id: 'galley-downloads' }, ) const got = dl.out.split('\n').map((l) => l.trim()).filter((l) => /^[0-9a-f]{64}$/.test(l)) ctx.check('the four PDFs download from the journal byte for byte (SHA-256 equal to the files given to the tool)', JSON.stringify(got) === JSON.stringify(sums), `${dl.out}\nwant:\n${sums.join('\n')}`) // ── the old code the tool refuses ───────────────────────────────────────────────────── const langs = run("cd /var/www/ojs && ls locale | grep -E '^zh' ; python3 -c \"import json; d = json.load(open('lib/pkp/lib/weblateLanguages/languages.json')); print({k: d.get(k) for k in ('zh_CN', 'zh_Hans', 'zh_Hant')})\"", { id: 'zh-codes' }) ctx.check('OJS 3.5 has zh_Hans and zh_Hant, and no zh_CN: not a locale folder, not in its language list', /^zh_Hans$/m.test(langs.out) && /^zh_Hant$/m.test(langs.out) && !/^zh_CN$/m.test(langs.out) && /'zh_CN': None/.test(langs.out) && /'zh_Hans': 'Chinese \(Simplified\)'/.test(langs.out), langs.out) createJournal(ctx, sh, { adminPass: ADMIN_PASS, path: 'second', name: 'Second Journal' }) const old = run(`${IMPORT('/tmp/back-issues-zh_CN.xml', 'second')} | head -n 3\n${DB("SELECT DISTINCT s.locale FROM submissions s JOIN journals j ON j.journal_id = s.context_id WHERE j.path = 'second' ORDER BY 1")}`, { id: 'import-zh_CN' }) ctx.check('yet the same XML with "zh_CN" imports without a word, and the article is stored as zh_CN', /The import completed successfully/.test(old.out) && /^zh_CN$/m.test(old.out), old.out) ctx.stepsDone() const { packages, extra } = basePackages() reportBox(ctx, L, `${baseSetup(RELEASE)} The installer was also given Urdu and Chinese (Simplified) as additional languages.`, [...packages, 'libxml2-utils'], extra) }) export default check