mirror of
https://github.com/logseq/logseq.git
synced 2026-04-29 16:36:27 +00:00
Merge branch 'feat/db' into refactor/page-parent
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
(ns logseq.tasks.lang
|
||||
"Tasks related to language translations"
|
||||
(:require [clojure.set :as set]
|
||||
(:require [babashka.cli :as cli]
|
||||
[babashka.fs :as fs]
|
||||
[babashka.process :refer [shell]]
|
||||
[borkdude.rewrite-edn :as rewrite]
|
||||
[clojure.set :as set]
|
||||
[clojure.string :as string]
|
||||
[frontend.dicts :as dicts]
|
||||
[logseq.tasks.util :as task-util]
|
||||
[babashka.cli :as cli]
|
||||
[babashka.process :refer [shell]]
|
||||
[babashka.fs :as fs]
|
||||
[borkdude.rewrite-edn :as r]))
|
||||
[logseq.tasks.util :as task-util]))
|
||||
|
||||
(defn- get-dicts
|
||||
[]
|
||||
@@ -78,10 +78,10 @@
|
||||
[invalid-keys-by-lang]
|
||||
(doseq [[lang invalid-keys] invalid-keys-by-lang]
|
||||
(let [path (fs/path "src/resources/dicts" (str (name lang) ".edn"))
|
||||
result (r/parse-string (String. (fs/read-all-bytes path)))
|
||||
result (rewrite/parse-string (String. (fs/read-all-bytes path)))
|
||||
new-content (str (reduce
|
||||
(fn [result k]
|
||||
(r/dissoc result k))
|
||||
(rewrite/dissoc result k))
|
||||
result invalid-keys))]
|
||||
(spit (fs/file path) new-content))))
|
||||
|
||||
@@ -148,10 +148,10 @@
|
||||
[invalid-keys]
|
||||
(let [paths (fs/list-dir "src/resources/dicts")]
|
||||
(doseq [path paths]
|
||||
(let [result (r/parse-string (String. (fs/read-all-bytes path)))
|
||||
(let [result (rewrite/parse-string (String. (fs/read-all-bytes path)))
|
||||
new-content (str (reduce
|
||||
(fn [result k]
|
||||
(r/dissoc result k))
|
||||
(rewrite/dissoc result k))
|
||||
result invalid-keys))]
|
||||
(spit (fs/file path) new-content)))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user