« get me outta code hell

upd8, readme: adapt to new hsmusic-lang repo - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-02-19 14:05:34 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-02-19 14:05:34 -0400
commitf0691a8aee179023e26e9edffc7b8b7e4d5f93c6 (patch)
tree81aced0ed05d12195440e2124a838c0ffa10c1ad
parent6c9b3692b0262680ba1c09c90e36d1ca3d0d3648 (diff)
upd8, readme: adapt to new hsmusic-lang repo
-rw-r--r--README.md5
-rwxr-xr-xsrc/upd8.js12
2 files changed, 8 insertions, 9 deletions
diff --git a/README.md b/README.md
index 0e4ed907..06480dee 100644
--- a/README.md
+++ b/README.md
@@ -107,8 +107,8 @@ HSMusic works using a number of repositories in tandem:
   - The data repo also contains all the metadata which makes one wiki unique from another: layout info, static pages (like "About & Credits"), whether or not certain site features are enabled (like "Flashes & Games" or UI for browsing groups), and so on.
   - All data is written and accessed in the YAML format, and every file follows a specific structure described within this (code) repository. See below and the `src/data` directory for details.
 - [`hsmusic-media`][github-media]: The media repository, holding all album, track, and layout media used across the site in one place. Media and organization directly corresponds to entries in the data repository; generally the data and media repositories go together and are swapped out for another together.
-- *Language repo:* The language repository, holding up-to-date strings and other localization info for HSMusic. NB: This repo isn't currently online as its structure and tooling haven't been polished or properly put together yet, but it's not required for building the site.
-  - Strings and language info are stored in top-level JSON files within this repository. They're based off the `src/strings-default.json` file within the code repo (and don't need to provide translations for all strings to be used for site building).
+- [`hsmusic-lang`][github-lang]: The language repository, holding up-to-date strings and other localization info for HSMusic.
+  - Strings and language info are stored in top-level YAML files within this repository. They're based off the `src/strings-default.yaml` file within the code repo (and don't need to provide translations for all strings to be used for site building).
 
 The code repository as well as the data and media repositories are require for site building, with the language repo optionally provided to add localization support to the wiki build.
 
@@ -177,6 +177,7 @@ As ever, feedback is always welcome, and may be shared via the usual links. Than
   [github]: https://github.com/hsmusic/hsmusic-wiki
   [github-code]: https://github.com/hsmusic/hsmusic-wiki
   [github-data]: https://github.com/hsmusic/hsmusic-data
+  [github-lang]: https://github.com/hsmusic/hsmusic-lang
   [github-media]: https://github.com/hsmusic/hsmusic-media
   [hsmusic]: https://hsmusic.wiki
   [nsnd]: https://homestuck.net/music/references.html
diff --git a/src/upd8.js b/src/upd8.js
index 836ff6b2..4c790075 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -32,7 +32,7 @@
 // node.js and you'll 8e fine. ...Within the project root. O8viously.
 
 import {execSync} from 'node:child_process';
-import {readFile} from 'node:fs/promises';
+import {readdir, readFile} from 'node:fs/promises';
 import * as path from 'node:path';
 import {fileURLToPath} from 'node:url';
 
@@ -1359,12 +1359,10 @@ async function main() {
       });
     }
 
-    const languageDataFiles = await traverse(langPath, {
-      filterFile: name =>
-        path.extname(name) === '.json' ||
-        path.extname(name) === '.yaml',
-      pathStyle: 'device',
-    });
+    const languageDataFiles =
+      (await readdir(langPath))
+        .filter(name => ['.json', '.yaml'].includes(path.extname(name)))
+        .map(name => path.join(langPath, name));
 
     let errorLoadingCustomLanguages = false;