Skip to content

Commit 00d4559

Browse files
committed
Make Config.cldr_data_dir/0 a runtime result, not compile time
1 parent 1301429 commit 00d4559

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/cldr/config/config.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ defmodule Cldr.Config do
5656

5757
@app_name Mix.Project.config()[:app]
5858
@cldr_data_dir [:code.priv_dir(@app_name), "/cldr"] |> :erlang.iolist_to_binary()
59+
@external_resource Path.join(@cldr_data_dir, "/cldr/version.json")
5960

6061
@root_locale_name :und
6162
@default_locale_name :"en-001"
@@ -245,7 +246,7 @@ defmodule Cldr.Config do
245246
246247
"""
247248
def cldr_data_dir do
248-
@cldr_data_dir
249+
[:code.priv_dir(@app_name), "/cldr"] |> :erlang.iolist_to_binary()
249250
end
250251

251252
@doc """
@@ -309,9 +310,8 @@ defmodule Cldr.Config do
309310

310311
@doc """
311312
Returns the version string of the CLDR data repository
312-
"""
313-
@external_resource Path.join(@cldr_data_dir, "/cldr/version.json")
314313
314+
"""
315315
def version do
316316
cldr_data_dir()
317317
|> Path.join("version.json")

mix.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ defmodule Cldr.Mixfile do
3232
defp description do
3333
"""
3434
Common Locale Data Repository (CLDR) functions for Elixir to localize and format numbers,
35-
dates, lists and units with support for over 600 locales for internationalized (i18n) and
36-
localized (L10N) applications.
35+
dates, lists, messages, languages, territories and units with support for over 700 locales
36+
for internationalized (i18n) and localized (L10N) applications.
3737
"""
3838
end
3939

0 commit comments

Comments
 (0)