
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
= Gem currency_to_words
Provides a view helper for Rails that translate a currency amount to words (eg. to_words(200) => 'dvě stě').
This helper comes with two supported locales (Czech and Polish) but it is possible and easy to implement your own (see "Implementing a new locale").
== Installation
Add the gem to your Gemfile.
gem 'currency_to_words'
== Usage
Install gem and create locale file in your project where you want to provide translation from currency to words. You can use locale file from I18n files below section or create your own.
== Examples
In your views write for example: currency_to_words(235.58)
== I18n files
=== Czech locale
cs: number: currency_in_words: format: '%n' options_precision: precision: 2 delimiter: '' significant: false strip_insignificant_zeros: false separator: '.' raise: false connector: ' a ' negative_format: '(%n)' skip_and: true ones: [nula, jedna, dvě, tři, čtyři, pět, šest, sedm, osm, devět] teens: [deset, jedenáct, dvanáct, třináct, čtrnáct, patnáct, šestnáct, sedmnáct, osmnáct, devatenáct] tens: [nil, nil,'dvacet','třicet','čtyřicet','padesát','šedesát','sedmdesát', 'osmdesát','devadesát'] hundreds: [sto, dvě stě, tři sta, čtyři sta, pět set, šest set, sedm set, osm set, devět set] thousands_ones: [, jeden, dva, tři, čtyři, pět, šest, sedm, osm, devět] megs: [, thousand, milion, bilion, trilion] thousand: one: 'tisíc' few: 'tisíce' other: 'tisíc' milion: one: 'milion' few: 'miliony' other: 'milionů' bilion: one: 'bilion' few: 'biliony' other: 'bilionů' trilion: one: 'trilion' few: 'triliony' other: 'trilionů' currencies: integer: one: 'koruna' few: 'koruny' other: 'korun' decimal: one: 'haléř' few: 'haléře' other: 'haléřů'
== Missing locale?
If you need locale that is not supported yet, you can easily add one. All you need to do is translated locale file and create class in /lib. Convention is that the class has to be named [locale]Currency.
So for example EnCurrency or FrCurrency. So override or duplicate the existing class and add diffrences of your language. Thats it!
== Inspiration
This project is heavily inspirated by {bcarrere/currency-in-words}[https://github.com/bcarrere/currency-in-words] and uses blocks of code from this repository.
Reason for creating my own repository was requirement to use I18n gem for "currency to words" translation and also for settings. This means, that this gem can be configured from locale file and translation is not hardcoded to source of library.
== Contribution
Did you created locales that is not supported here yet? Please write me e-mail if you want contribute at majak108@gmail.com.
== Copyright
Copyright (c) 2014 Jakub Malina. See LICENSE.txt for further details.
FAQs
Unknown package
We found that currency_to_words 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.