Skip to content

Commit

Permalink
Added Spanish to list of supported languages (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosPaunovic authored May 27, 2022
1 parent 187a6f9 commit 86e57e1
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [1.2.0](https://github.com/MilosPaunovic/random-words/compare/1.1.0...1.2.0)

* Added Spanish to list of supported languages, closes [#14](https://github.com/MilosPaunovic/random-words/issues/3).

## [1.1.0](https://github.com/MilosPaunovic/random-words/compare/1.0.1...1.1.0)

* Added English to list of supported languages, closes [#3](https://github.com/MilosPaunovic/random-words/issues/3).
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Currently available country codes and variations:
| :------------ | :----------: | :--------: |
| Serbia | `rs` | `cyrillic` |
| United States | `us` | |
| Spain | `es` | |

## Methods

Expand Down
1 change: 1 addition & 0 deletions dictionaries/countries/es/es.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { initialize } from './lib/index.js';

const RANDOM = initialize({ countryCode: 'es' });

console.log(RANDOM.word());
console.log(RANDOM.words());
4 changes: 4 additions & 0 deletions lib/helpers/languages.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { WORDS as sr } from '../../dictionaries/countries/rs/sr.js';
import { WORDS as srCyrl } from '../../dictionaries/countries/rs/sr-Cyrl.js';
import { WORDS as en } from '../../dictionaries/countries/us/en.js';
import { WORDS as es } from '../../dictionaries/countries/es/es.js';

export const LANGUAGES = Object.freeze({
rs: {
Expand All @@ -10,4 +11,7 @@ export const LANGUAGES = Object.freeze({
us: {
default: en,
},
es: {
default: es,
},
});
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@paunovic/random-words",
"version": "1.1.0",
"version": "1.2.0",
"type": "module",
"description": "Serving random words in any language has never been this easy.",
"author": {
Expand Down Expand Up @@ -30,6 +30,7 @@
"keywords": [
"random-words",
"english-words",
"spanish-words",
"serbian-words"
]
}

0 comments on commit 86e57e1

Please sign in to comment.