From 7910d2185f790b0637714c566866fa6b775adeea Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Fri, 8 Sep 2017 15:30:00 +0100 Subject: [PATCH 1/5] Upversioned to 1.0.3-SNAPSHOT --- project.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.clj b/project.clj index 8a7c2ec..a325af0 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject org.clojars.simon_brooke/internationalisation "1.0.2" +(defproject org.clojars.simon_brooke/internationalisation "1.0.3-SNAPSHOT" :description "Internationalisation library for Clojure" :url "https://github.com/simon-brooke/internationalisation" :license {:name "Eclipse Public License" From 8f45bee76311a236f14b56135ee700ebb6156628 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Fri, 8 Sep 2017 15:54:59 +0100 Subject: [PATCH 2/5] All tests pass again, and this time I'm in the right branch! Two silly bugs, one in core, one in test. --- src/scot/weft/i18n/core.clj | 13 +++++++------ test/scot/weft/i18n/test/core.clj | 6 +++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/scot/weft/i18n/core.clj b/src/scot/weft/i18n/core.clj index 479d554..0a0e4ce 100644 --- a/src/scot/weft/i18n/core.clj +++ b/src/scot/weft/i18n/core.clj @@ -160,12 +160,13 @@ (acceptable-languages accept-language-header))))] (timbre/debug (str "Found i18n file at '" file-path "'")) (try - (slurp-resource - (or - file-path - (join java.io.File/separator - [resource-path - (str default-locale ".edn")]))) + (read-string + (slurp-resource + (or + file-path + (join java.io.File/separator + [resource-path + (str default-locale ".edn")])))) (catch Exception any (timbre/error (str "Failed to load internationalisation because " (.getMessage any))) nil)))) diff --git a/test/scot/weft/i18n/test/core.clj b/test/scot/weft/i18n/test/core.clj index 49621de..8992988 100644 --- a/test/scot/weft/i18n/test/core.clj +++ b/test/scot/weft/i18n/test/core.clj @@ -199,11 +199,11 @@ (is (= "This is not a pipe" - (:pipe (get-messages "en-GB, fr-FR;q=0.9" "resources/i18n" "en-GB")))) + (:pipe (get-messages "en-GB, fr-FR;q=0.9" "i18n" "en-GB")))) (is (= "Ceci n'est pas une pipe." - (:pipe (get-messages "en-GB;q=0.9, fr-FR" "resources/i18n" "en-GB")))) + (:pipe (get-messages "en-GB;q=0.9, fr-FR" "i18n" "en-GB")))) (is - (= nil (get-messages "xx-XX;q=0.5, yy-YY" "resources/i18n" "zz-ZZ")) + (= nil (get-messages "xx-XX;q=0.5, yy-YY" "i18n" "zz-ZZ")) "If no usable file is found, an exception should not be thrown."))) From 96f1879095eb6265417acfe178eceb17ff87ad1f Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Fri, 8 Sep 2017 16:24:27 +0100 Subject: [PATCH 3/5] Version 1.0.3 --- project.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.clj b/project.clj index a325af0..9c641b0 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject org.clojars.simon_brooke/internationalisation "1.0.3-SNAPSHOT" +(defproject org.clojars.simon_brooke/internationalisation "1.0.3" :description "Internationalisation library for Clojure" :url "https://github.com/simon-brooke/internationalisation" :license {:name "Eclipse Public License" From fd55b989af96a97e81032d2f677ff8accb3c5d57 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Fri, 8 Sep 2017 16:33:14 +0100 Subject: [PATCH 4/5] Added signing key detail to project.clj, to see if that will get lein release working --- project.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/project.clj b/project.clj index 9c641b0..ecdc09d 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject org.clojars.simon_brooke/internationalisation "1.0.3" +(defproject org.clojars.simon_brooke/internationalisation "1.0.3-SNAPSHOT" :description "Internationalisation library for Clojure" :url "https://github.com/simon-brooke/internationalisation" :license {:name "Eclipse Public License" @@ -9,4 +9,5 @@ :plugins [[lein-codox "0.10.3"]] :profiles {:dev {:resource-paths ["resources"]}} :lein-release {:deploy-via :clojars} + :signing {:gpg-key "Simon Brooke (Stultus in monte) "} ) From 90397d839ce090181f7a7e6f928eac8f8c3115e7 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Fri, 8 Sep 2017 16:34:12 +0100 Subject: [PATCH 5/5] Version 1.0.3 --- project.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.clj b/project.clj index ecdc09d..227868c 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject org.clojars.simon_brooke/internationalisation "1.0.3-SNAPSHOT" +(defproject org.clojars.simon_brooke/internationalisation "1.0.3" :description "Internationalisation library for Clojure" :url "https://github.com/simon-brooke/internationalisation" :license {:name "Eclipse Public License"