
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
= TrueUnits
The TrueUnits gem provides a simple way to display correct suffix for a noun depending on the number.
It's most important for russian, ukrainian, etc. languages.
=== Examples
1 день, 2 дня, 25 дней
1 дерево, 2 дерева, 25 деревьев.
== Installation
Add one string to the Gemfile
gem 'true_units'
and run bundle install
== Usage
It's very simple.
If you need a correct translation for hours then you should add few lines to your locale yml file under the true_units key
true_units: hours: v1: час v2: часа v3: часов
So now you can write foo.tu_hours where foo is a numerical variable.
=== More examples:
true_units:
minutes:
v1: минута
v2: минуты
v3: минут
seconds:
v1: секунда
v2: секунды
v3: секунд
days:
v1: день
v2: дня
v3: дней
wins:
v1: победа
v2: победы
v3: побед
guards:
v1: охранник
v2: охранника
v3: охранников
tickets:
v1: билет
v2: билета
v3: билетов
=== usage
puts 1.tu_guards puts 34.tu_tickets puts 7.tu_days
== Author
Alexander Dedusenko
== Copyright
This gem is released under the MIT License.
FAQs
Unknown package
We found that true_units 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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.