Skip to content

Commit

Permalink
v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Schultzer committed Nov 25, 2018
1 parent c7e528e commit 7b7f101
Show file tree
Hide file tree
Showing 11 changed files with 922 additions and 403 deletions.
64 changes: 3 additions & 61 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,9 @@
# Changelog

## Cldr Territories v1.4.0 October 21st, 2018
## Cldr Territories v2.0.0 November 25st, 2018

### Enhancements

* Updates [ex_cldr](https://hex,pm/packages/ex_cldr) to version 1.8.0 which uses CLDR data release 34.0.0

## Cldr Territories v1.3.1 May 10, 2018

### Bug fix

* Fixed a bug introduced in 1.3.0 where a function with `!` and `as_option` resulted in `{:ok, result}` instead of `result`

## Cldr Territories v1.3.0 May 8, 2018

### Enhancements

* Added options `[as: :atom]`, `[as: :binary]` and `[as: :charlist]` to following functions the defualt is `[as: :atom]`
* `parent/2` and `parent!/2`
* `children/2` and `children!/2`
* `to_currency_code/2` and `to_currency_code!/2`
* `to_currency_codes/2` and `to_currency_codes!/2`
* `country_codes/1`
* Improved specs
* Relaxed posion and jason dependency

## Cldr Territories v1.2.0 Marts 28, 2018

### Enhancements

* Update `ex_cldr` dependency to version 1.5 which uses CLDR data version 33

## Cldr Territories v1.1.2 January 11, 2018

### Enhancements

* Relax `ex_cldr` requirement

## Cldr Territories v1.1.1 December 13, 2017

### Bug fix

* Load data on compile

## Cldr Territories v1.1.0 December 8, 2017

Following helper method has been added

### Enhancements

* `to_currency_code/1` and `to_currency_code!/1`
* `to_currency_codes/1` and `to_currency_codes!/1`
* `country_codes/0`


## Cldr Territories v1.0.0 December 8, 2017

### Enhancements

* Release

## Cldr Territories v1.0.0-rc.0 November 17, 2017
This is the changelog for Cldr Territories v2.0.0 released on November 25th, 2018. For older changelogs please consult the release tag on [GitHub](https://github.com/kipcole9/cldr_territories/tags)

### Enhancements

* Release candidate
* Move to a backend module structure with [ex_cldr](https://hex.pm/packages/ex_cldr) version 2.0
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@
## Examples

```elixir
iex> Cldr.Territory.from_territory_code(:GB)
iex> MyCldr.Territory.from_territory_code(:GB)
{:ok, "United Kingdom"}

iex> Cldr.Territory.translate_territory("Reino Unido", "pt", "en")
iex> MyCldr.Territory.translate_territory("Reino Unido", "pt", "en")
{:ok, "UK"}

iex> Cldr.Territory.contains?(:EU, :GB)
iex> MyCldr.Territory.contains?(:EU, :GB)
true

iex> Cldr.Territory.parent(:GB)
iex> MyCldr.Territory.parent(:GB)
{:ok, [:"154", :EU, :UN]}

iex> Cldr.Territory.children(:EU)
iex> MyCldr.Territory.children(:EU)
{:ok,
[:AT, :BE, :CY, :CZ, :DE, :DK, :EE, :ES, :FI, :FR, :GB, :GR, :HR, :HU, :IE,
:IT, :LT, :LU, :LV, :MT, :NL, :PL, :PT, :SE, :SI, :SK, :BG, :RO]}

iex> Cldr.Territory.info(:GB)
iex> MyCldr.Territory.info(:GB)
{:ok,
%{currency: [GBP: %{from: ~D[1694-07-27]}], gdp: 2788000000000,
language_population: %{"bn" => %{population_percent: 0.67},
Expand All @@ -46,17 +46,17 @@ iex> Cldr.Territory.info(:GB)
measurement_system: "UK", paper_size: "A4", population: 64769500,
telephone_country_code: 44, temperature_measurement: "metric"}}

iex> Cldr.Territory.to_unicode_flag(:US)
iex> MyCldr.Territory.to_unicode_flag(:US)
{:ok, "🇺🇸"}

iex> Cldr.Territory.to_currency_code(:US)
iex> MyCldr.Territory.to_currency_code(:US)
{:ok, :USD}
```

For help in `iex`:

```elixir
iex> h Cldr.Territory.from_territory_code
iex> h MyCldr.Territory.from_territory_code
```

## Documentation
Expand All @@ -74,7 +74,7 @@ Add `ex_cldr_territories` as a dependency to your `mix` project:
```elixir
defp deps do
[
{:ex_cldr_territories, "~> 1.1"}
{:ex_cldr_territories, "~> 2.0"}
]
end
```
Expand Down
11 changes: 5 additions & 6 deletions config/dev.exs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use Mix.Config

config :ex_cldr,
default_locale: "en-001",
locales: ["root", "fr", "zh", "zh-Hant", "en", "bs", "pl", "ru", "th", "he", "af", "af-NA"],
gettext: Cldr.Gettext,
precompile_number_formats: ["¤¤#,##0.##"],
precompile_transliterations: [{:latn, :arab}, {:arab, :thai}]
# config :ex_cldr,
# locales: ["root", "fr", "zh", "zh-Hant", "en", "bs", "pl", "ru", "th", "he", "af", "af-NA"],
# gettext: Cldr.Gettext,
# precompile_number_formats: ["¤¤#,##0.##"],
# precompile_transliterations: [{:latn, :arab}, {:arab, :thai}]
Empty file added config/release.exs
Empty file.
6 changes: 0 additions & 6 deletions config/test.exs
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
use Mix.Config

config :ex_cldr,
default_locale: "en-001",
locales: :all,
gettext: Cldr.Gettext,
precompile_transliterations: [{:latn, :arab}, {:arab, :thai}, {:arab, :latn}]

config :ex_unit,
case_load_timeout: 220_000,
timeout: 120_000
Loading

0 comments on commit 7b7f101

Please sign in to comment.