Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
hallelujah-gettext_activerecord
Advanced tools
= gettext_activerecord
gettext_activerecord provides the localization for ActiveRecord-2.2 or later using Ruby-GetText-Package.
== Website
== Requirements
== Install #Uninstall old gettext if exists. (sudo/su on POSIX system) gem uninstall gettext
#from github (edge/unstable)
(sudo/su on POSIX system)
gem install locale
gem install mutoh-gettext -s http://gems.github.com/
#from rubyforge (stable)
(sudo/su on POSIX system)
gem install locale
gem install gettext
== Usage === without Rails ==== Rakefile require 'rubygems'
desc "Create mo files" task :makemo do require 'gettext_activerecord/tools' GetText.create_mofiles end
task :updatepo do require 'gettext_activerecord/tools' # Need to access DB to find Model table/column names. # Use config/database.yml which is the same style with rails. GetText.update_pofiles("sample_ar", ["topic.rb"], "sample AR 1.0.0") end
==== topic.rb
class Topic < ActiveRecord::Base
validates_length_of :title, :minimum => 10
end
==== sample.rb require 'gettext_activerecord' require 'topic'
config = YAML.load(IO.read("config/database.yml"))["development"] ActiveRecord::Base.establish_connection(config)
GetText.bindtextdomain_to(ActiveRecord, "sample_ar", :path => "locale")
GetText.set_locale "ja_JP.UTF-8" a = Topic.new a.title = "Foo" a.save puts a.errors.full_messages #puts Japanese error message.
==== Then ... $ rake updatepo $ cd po $ mkdir ja $ msginit -l ja_JP.UTF-8 -i sample_ar.pot -o ja/sample_ar.po $ Edit ja/sample_ar.po $ cd ../../ $ rake makemo $ ruby sample.rb
=== with Rails See gettext_rails [http://github.com/mutoh/gettext_rails/tree/master]
== Support matrix
== License This program is licenced under the same licence as Ruby. (See the file 'COPYING'.)
== Status of translations
== Maintainer Masao Mutoh
FAQs
Unknown package
We found that hallelujah-gettext_activerecord 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.