README.md in boty-0.1.0 vs README.md in boty-0.1.1
- old
+ new
@@ -640,11 +640,11 @@
You can write you own log adapter if you want. The `Multi` adapter
implementation is fairly simple. Let's use it as an example of how to write your
own adapter.
You can extend the ruby _Logger_ class and worry yourself on write the `#add`
-overrite:
+override:
```ruby
class Multi < ::Logger
def initialize(adapters)
@adapters = adapters
@@ -665,11 +665,11 @@
adapters passed as parameters for the constructor.
For more information on the `#add` parameters, [check the ruby doc](http://ruby-doc.org/stdlib-2.1.0/libdoc/logger/rdoc/Logger.html#method-i-add).
_Multi_ also allows you to change the level for all the underlying adapters at
-once, the `#level=` overrite implementation is like this:
+once, the `#level=` overriten implementation is like this:
```ruby
def level=(level)
@adapters.each do |adapter|
adapter.level = level
@@ -677,22 +677,58 @@
end
```
### I18n
- **todo: document**
+The descriptions for the commands and listeners that ship with `Boty` can be
+customized via the [I18n gem mechanics](https://github.com/svenfuchs/i18n).
+`Boty` ships with translations for `:en` and `:pt-br`. If you want to override
+those messages, you can take a look at the files on [`locale`](https://github.com/ricardovaleriano/boty/tree/master/locale).
+I'll recomend that you just copy and paste the file that you want to customize
+on the `locale` dir of your project, and them make the editions that you want.
+
+Of course, you can add translations for any language that you want on your
+`locale` dir. And even add any translation that you want for your own
+command descriptions.
+
+To instruct your bot about which language to use, set the `Boty.locale`
+configuration and you're done.
+
+The `bot` executable created on your project generated by `boty new` have the
+following line before the session start:
+
+```ruby
+Boty.locale = ARGV.pop || :en
+```
+
+This means that you can start your bot with a command line argument to tell
+which is the idiom that this session should use. This allows you to have the
+same bot running in different sessions with different idioms. The following
+usage is totally fine:
+
+ ./bot pt-br
+
## Development
After checking out the repo, run `bin/setup` to install dependencies. You can
also run `bin/console` for an interactive prompt that will allow you to
experiment.
To install this gem onto your local machine, run `bundle exec rake install`.
### The local ./bin/bot
+The project have a `./bin/bot` executable that should be the product of
+compiling the `template/project/bot.tt` erb file.
+This is an easy way to just run the bot using the same logic that a project
+generated by `bot new` will use to run the bot.
+It's highly recomendable that you test your changes using this approach before
+submit a `PR` or generate a new release. =)
+
### Code guidelines
+
+ **todo: add some**
## Contributing<a name="contributing" />
Bug reports and pull requests are very welcome on GitHub at
https://github.com/ricardovaleriano/boty. This project is intended to be a safe,