Skip to content

Commit

Permalink
Switch to using preprocessed files from cldr-staging repository
Browse files Browse the repository at this point in the history
  • Loading branch information
ak-coram committed Jul 18, 2023
1 parent e586fdf commit 95bfba8
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "cldr"]
path = cldr
url = https://github.com/unicode-org/cldr.git
[submodule "cldr-staging"]
path = cldr-staging
url = https://github.com/unicode-org/cldr-staging.git
17 changes: 11 additions & 6 deletions chronogram-dist.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
(asdf:system-relative-pathname system "CLDR_RELEASE"))))

(defun get-archive-url (tag)
(format nil "https://github.com/unicode-org/cldr/archive/refs/tags/~a.zip" tag))
(format nil
"https://github.com/unicode-org/cldr-staging/archive/refs/tags/~a.zip"
tag))

(defun make-chronogram-info (contents dist-dir name)
(with-open-file (stream (format nil "~a~a.lisp" dist-dir name)
Expand All @@ -27,7 +29,8 @@
(dist-dir (asdf:system-relative-pathname system "chronogram-dist/"))
(cldr-submodule-available
(uiop:file-exists-p
(asdf:system-relative-pathname system "cldr/unicode-license.txt")))
(asdf:system-relative-pathname system
"cldr-staging/LICENSE.txt")))
(tag (when (or force-download (not cldr-submodule-available))
(get-cldr-release-tag system)))
(names '("en" "de" "hu" "ko")))
Expand All @@ -52,14 +55,16 @@
dist-dir
name)
:do (format t "DONE~%"))))
(loop :with cldr-dir := (asdf:system-relative-pathname system "cldr/")
(loop :with cldr-dir
:= (asdf:system-relative-pathname system "cldr-staging/")
:for name :in names
:do (format t "Writing ~a~a.lisp... " dist-dir name)
:do (force-output)
:do (make-chronogram-info
(uiop:read-file-string (format nil "~a/common/main/~a.xml"
cldr-dir
name))
(uiop:read-file-string
(format nil "~a/production/common/main/~a.xml"
cldr-dir
name))
dist-dir
name)
:do (format t "DONE~%")))))
1 change: 0 additions & 1 deletion cldr
Submodule cldr deleted from 37d524
1 change: 1 addition & 0 deletions cldr-staging
Submodule cldr-staging added at aa6f5a
2 changes: 1 addition & 1 deletion set-cldr-release.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

git submodule update --init --recursive
cd cldr
cd cldr-staging
git checkout $1
cd ../
echo $1 > CLDR_RELEASE

0 comments on commit 95bfba8

Please sign in to comment.