The ruby-lsp-i18n
gem provides internationalization support for Ruby Lsp.
Add to the following line to your application's development Gemfile:
gem 'ruby-lsp-i18n', git: 'https://github.com/bukhr/ruby-lsp-i18n', require: false
Then run the following command to install the gem:
bundle install
-
Inlay Hints for translations
- Show value as inlay hint for translation keys
- Hover with the translation value
- Hover with the file path of the translation
-
Autocompletion for translation keys
-
Synchronization of yml translation files
The addon is enabled by default but can be disabled using the .vscode/settings.json file in your project.
{
"rubyLsp.addonSettings": {
"Ruby LSP I18n": {
"enabled": false
}
}
}
- Clone the repository
- Install dependencies with
bundle install
- Run the tests with
bundle exec rake test
- Check types with
bundle exec srb tc
- Run the linter with
bundle exec rubocop
- Make a PR and wait for aproval
- Merge the PR
To install this gem onto your local machine, run bundle exec rake install
.
It is important to maintain this gem up to date with the latest version of Ruby Lsp. So the users of the gem have the updated features of the core LSP. To do so update the Ruby LSP version in the ruby-lsp-i18n.gemspec
file. Then run the tests and make sure everything is working as expected.
Bug reports and pull requests are welcome on GitHub at https://github.com/bukhr/ruby-lsp-i18n. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the RubyLspI18n project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.