update README
This commit is contained in:
parent
902de3d7f9
commit
2d01b67749
52
README.md
52
README.md
|
@ -33,10 +33,62 @@ puts QuestionGenerator.generate locale: :de
|
|||
# => "Was war das letzte, das du gegessen hast?"
|
||||
```
|
||||
|
||||
## How it works
|
||||
|
||||
The question generator uses a simple branching structure inside the specified locale to generate questions from it, here is a quick example:
|
||||
|
||||
```yml
|
||||
Can:
|
||||
you:
|
||||
- swim
|
||||
- speak:
|
||||
- different:
|
||||
- languages
|
||||
- play:
|
||||
- any:
|
||||
- sports
|
||||
- the:
|
||||
- piano
|
||||
- guitar
|
||||
- trumpet
|
||||
- baseball
|
||||
- ski
|
||||
- cook
|
||||
- dance
|
||||
|
||||
# The following example outputs:
|
||||
# Can you swim?
|
||||
# Can you speak different languages?
|
||||
# Can you play any sports?
|
||||
# Can you play the piano?
|
||||
# ...guitar?
|
||||
# ...trumpet?
|
||||
# Can you play baseball?
|
||||
# Can you ski?
|
||||
# Can you cook?
|
||||
# Can you dance?
|
||||
```
|
||||
|
||||
If you can't break sentences in parts in your language, you can also specify the entire question in one line.
|
||||
```yml
|
||||
- Can you swim?
|
||||
|
||||
# The following example outputs:
|
||||
# Can you swim?
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
The files for questions are located in `lib/questions/`
|
||||
|
||||
If you want to add a new language, create a new file and name it with the [ISO-639-1 language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) of it (just like `en.yml`)
|
||||
|
||||
1. Fork it ( https://github.com/retrospring/questiongenerator/fork )
|
||||
2. Create your feature branch (`git checkout -b my-new-feature`)
|
||||
3. Commit your changes (`git commit -am 'Add some feature'`)
|
||||
4. Push to the branch (`git push origin my-new-feature`)
|
||||
5. Create a new Pull Request
|
||||
|
||||
Please don't add harassing, scaring or upsetting content to the questions or content that otherwise violates the [Retrospring Terms of Service](https://retrospring.net/terms).
|
||||
|
||||
If you add questions in another language to the questiongenerator and purposely add wrong translations, further Pull Requests will be ignored.
|
||||
|
|
Loading…
Reference in New Issue