-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
About __n & plural argument #86
Comments
The current behavior only updates the cache and the language file if the singular is not found and updateFiles is So this might be a few different enhancements:
@leandrojdl did I interpret your suggestion correctly? |
@leandrojdl thanks for the suggestion 👍 Would happily accept a patch to fix this, otherwise let's keep this open until someone can address. |
Im sorry for the delay. It has happened a lot due the Covid and because of other organisations deprecating on purposes to delay my work and fooling around with the Atom program. |
Hi, first at all, this is a great & simpler package, it's very useful.
I'm thinking about the use of second/plural argument in
__n
function. Making some checks and viewing your tests and implementation, the second argument seems to be meaningless except for keeping it in a file if it doesn't exist. For example:Here I can write
__n('%d cat', 'foo bar', 3)
and still get3 land catfishes
.unknown
Perhaps it might be more useful (sometimes at least) to have another method
y18n.__p(key, number, ...args)
to use without worrying about updateFiles feature or maybe with a default "unknown" value.I don't know... It's just a practical suggestion.
The text was updated successfully, but these errors were encountered: