« get me outta code hell

client: client modules - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static/js/localization-nonsense.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-06-19 19:50:55 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-06-20 10:01:05 -0300
commitdf5f6048e6a177b5ce3920d10a1249129c669a1f (patch)
treef94c984a6f21069c02e33a8b9184580916606041 /src/static/js/localization-nonsense.js
parente254ad385d33739d3e6b4a04d79325e2bca840b8 (diff)
client: client modules
Diffstat (limited to 'src/static/js/localization-nonsense.js')
-rw-r--r--src/static/js/localization-nonsense.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/static/js/localization-nonsense.js b/src/static/js/localization-nonsense.js
new file mode 100644
index 00000000..8b6d1ef0
--- /dev/null
+++ b/src/static/js/localization-nonsense.js
@@ -0,0 +1,30 @@
+// Another old, unused chunk of code.
+
+/*
+const language = document.documentElement.getAttribute('lang');
+
+let list;
+if (typeof Intl === 'object' && typeof Intl.ListFormat === 'function') {
+  const getFormat = (type) => {
+    const formatter = new Intl.ListFormat(language, {type});
+    return formatter.format.bind(formatter);
+  };
+
+  list = {
+    conjunction: getFormat('conjunction'),
+    disjunction: getFormat('disjunction'),
+    unit: getFormat('unit'),
+  };
+} else {
+  // Not a gr8 mock we've got going here, 8ut it's *mostly* language-free.
+  // We use the same mock for every list 'cuz we don't have any of the
+  // necessary CLDR info to appropri8tely distinguish 8etween them.
+  const arbitraryMock = (array) => array.join(', ');
+
+  list = {
+    conjunction: arbitraryMock,
+    disjunction: arbitraryMock,
+    unit: arbitraryMock,
+  };
+}
+*/