
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
A Rails plugin that generates the I18n locale files with automatic translation. Supporting Rails 6.0, 5.2.x, 5.1.x, 5.0.x, 4.2.x, 4.1.x, 4.0.x, 3.2.x, 3.1.x, 3.0.x, 2.3.x, and 2.2.x.
Here's an example of generating a translation file (the example model is taken from the Rails Girls app).
% rails g scaffold idea name description:text picture
% rails g i18n ja
This gem/plugin provides following three generator commands.
% rails g i18n_locale ja (de-AT, pt-BR, etc.)
Downloads the .yml file for the specified locale from the official rails-i18n repository: https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale
Then the generator sets the application default locale to the specified locale.
This will generate following locale file.
config/locales/ja.yml
% rails g i18n_translation ja (de-AT, pt-BR, etc.)
This will generate following YAML file.
config/locales/translation_ja.yml
The generator scans your app/models directory, and generates a YAML file with all the AR model names and attributes so that you don't have to write the YAML skeleton manually. In addition, the generator tries to translate each of them into the specified language. The generator doesn't overwrite the existing value so that you can rerun the generator again and again.
The #g mark in the generated YAML means that the line is generated by the generator.
% rails g i18n ja (de-AT, pt-BR, etc.)
Executes 1 and 2 at once.
Add 'i18n_generators' to your Gemfile, then bundle
. Restricting the group to
:development would be a good idea, since the generator would probably be used
only in development mode.
Use 'i18n_generators' version '< 1.2'.
Copyright (c) 2008 Akira Matsuda, released under the MIT license
FAQs
Unknown package
We found that i18n_generators demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.