GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — github-docs/script/backfill-missing-localizations.js at main · 0xdevalias/github-docs Expand file tree/ Copy pathbackfill-missing-localizations.jsMore file actions executable file ·38 lines (33 loc) · 1.19 KB / Copy pathbackfill-missing-localizations.jsFile metadata and controlsexecutable file ·38 lines (33 loc) · 1.19 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 #!/usr/bin/env node const fs = require('fs') const path = require('path') const walk = require('walk-sync') const mkdirp = require('mkdirp').sync const languages = require('../lib/languages') const dirs = ['content', 'data'] // [start-readme] // // This script copies any English files that are missing from the translations directory into the translations directory. // We only need to run this if problems occur with Crowdin's automatic sync. // // [end-readme] dirs.forEach(dir => { const englishPath = path.join(__dirname, `../${dir}`) const filenames = walk(englishPath) .filter(filename => { return (filename.endsWith('.yml') || filename.endsWith('.md')) && !filename.endsWith('README.md') }) filenames.forEach(filename => { Object.values(languages).forEach(language => { if (language.code === 'en') return const fullPath = path.join(__dirname, '..', language.dir, dir, filename) if (!fs.existsSync(fullPath)) { console.log('missing', fullPath) const englishFullPath = path.join(__dirname, '..', dir, filename) mkdirp(path.dirname(fullPath)) fs.writeFileSync(fullPath, fs.readFileSync(englishFullPath)) } }) }) }) |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |