Giter VIP home page Giter VIP logo

loctools / plurr Goto Github PK

View Code? Open in Web Editor NEW
82.0 4.0 11.0 321 KB

Cross-platform format specification + libraries for handling plurals/genders/conditionals for Go, Java, JS, Obj-C, Perl, PHP, Python, and Rust

License: MIT License

JavaScript 7.80% Perl 10.54% PHP 10.57% HTML 3.10% Java 12.39% Python 10.34% Go 14.32% Objective-C 13.35% Rust 17.59%
pluralization format named-placeholders gender plurals multi-language plurr go golang java

plurr's People

Contributors

iafan avatar julen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

plurr's Issues

Comparison table with GNU gettext

I browsed the repo, and besides nicer syntax, I think most of what I've seen can be done with GNU gettext. A comparison table could help people familiar with gettext (such as me) deciding weather to integrate with Plurr.

Avoid mutating `params` in `format()` call

The format() call mutates the object passed as params, which is unexpected for the caller.

IMHO, when not an exception, format() should just return a formatted string value for the passed parameters, and have no side-effects such as mutating the passed arguments.

Grammar mistake in example

{GENDER:He|She|They} will see it when {GENDER:logs|logs|log} in.

should be

{GENDER:He|She|They} will see it when {GENDER:he|she|they} {GENDER:logs|logs|log} in.

right?

.format is undocumented

The Plurr.format() method, which is basically the API this library is offering, lacks docs.

There are just a couple examples in the README which makes one guess the first argument is the text to be formatted, the second one being the parameters for the text. However it also accepts an object of several options.

None of this is documented, and one has to dive into the source code/demo to guess these.

Add README.md in js/

The lack of a README.md file in the js/ directory (or more specifically, not having it side-by-side with package.json), makes npm to display no relevant information for the library.

I don't believe it's possible to re-publish a package that already exists in the registry, so I'm not sure there's a way to add a readme file without publishing a new version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.