Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mandarin_chinese_inflections

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mandarin_chinese_inflections

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

🐼 Mandarin Chinese Inflections

This repository contains the complete and definitive set of Mandarin Chinese singularization and pluralization rules for Rails.

Installation

Add the following to your application's Gemfile:

gem 'mandarin_chinese_inflections'

And then execute:

$ bundle

Usage

To inflect strings in different locales:

'dumpling'.pluralize(:en) # => "dumplings"
'饺子'.pluralize(:zh) # => "饺子"

Is this really the complete set of inflection rules?

Yes, this is the complete and definitive set of inflection rules for Mandarin Chinese.

I am very upset that the English inflection file is still incomplete after all these years. They simply aren't trying hard enough!

If you are new to Mandarin Chinese, I have provided a short comparison of inflections in English and Mandarin Chinese below.

Inflection in English and Mandarin Chinese

English

🥢🍜🥟
Singularchopstickbowldumpling
Pluralchopsticksbowlsdumplings

Mandarin Chinese

🥢🍜🥟
Singular筷子饺子
Plural筷子饺子

Rails < 4.0.0

ActiveSupport 4 added the multilingual Inflector to Rails. If you are running an older version of ActiveSupport, you will need to upgrade your version of Rails to enjoy the joke.

Contributing

This is the complete and definitive inflection gem for Mandarin Chinese. No further contributions are required, thank you. 😛

Made by @dondonz. See more at failscasts.com.

FAQs

Package last updated on 26 Feb 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc