Skip to content
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

Leaving out or adding a variable in translated phrase #133

Open
mzrnsh opened this issue May 19, 2017 · 1 comment
Open

Leaving out or adding a variable in translated phrase #133

mzrnsh opened this issue May 19, 2017 · 1 comment

Comments

@mzrnsh
Copy link

mzrnsh commented May 19, 2017

When I am trying to save a translation but I am leaving out a variable used in original phrase, my translation is not saved. I have a use case when it should be allowed to save with a skipped variable, but I am sure there are solid arguments against it as well so I wonder what are those arguments against.

Example

Assuming we have a report model and several other models are reportable.

This:

already_reported: You have already reported this %{thing}

would give us sentences like this:

You have already reported this post
You have already reported this comment

But in many languages other than English, it would be too hard to have a dynamic value next to a word like 'this' as it changes based on the noun it's used with (for example: 'questo' or 'questa' in Italian).

And in some languages it would remove some layers of complexity to translate such phrases without the %{thing} variable.

This would be an acceptable translation in cases like that:

You have already reported this


As far as I know, i18n has no problems if you do not use a variable passed from view.

@thomasdarde
Copy link
Member

PR's welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants