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

Do you have plan to support bundle or namespace on translating? #240

Closed
bruceman opened this issue Nov 2, 2015 · 3 comments
Closed

Do you have plan to support bundle or namespace on translating? #240

bruceman opened this issue Nov 2, 2015 · 3 comments

Comments

@bruceman
Copy link

bruceman commented Nov 2, 2015

Hi Ruben,
Do you have plan to support bundle or namespace on translating?
You know there are maybe have multiple same string but have different translated string in big project.
One solution for this case is using bundle name or namespace to get suitable string resource.
For example:

  1. for directive
    <span translate="mybundle" ..>
  2. for filter
    {{ msg | translate:"mybundle"}}

Thanks,

@rubenv
Copy link
Owner

rubenv commented Nov 2, 2015

Have a look at translation contexts, those solve the problem you're
mentioning.
On Nov 2, 2015 05:53, "bruceman" [email protected] wrote:

Hi Ruben,
Do you have plan to support bundle or namespace on translating?
You know there are maybe have multiple same string but have different
translated string in big project.
One solution for this case is using bundle name or namespace to get
suitable string resource.
For example:

  1. for directive
  2. for filter
    {{ msg | translate:"mybundle"}}

Thanks,


Reply to this email directly or view it on GitHub
#240.

@bruceman
Copy link
Author

bruceman commented Nov 2, 2015

Thanks Ruben,
But as i understood, the context is just for accessing nested properties. i can not find a way to isolate the translated string from multiple i18n files.

@rubenv
Copy link
Owner

rubenv commented Nov 2, 2015

i can not find a way to isolate the translated string from multiple i18n files.

You shouldn't the whole point of gettext is that same source strings can be combined. In the rare event of clashes (noun vs. verb etc), contexts are what helps you.

As mentioned in #241: we probably won't add this, it makes things needlessly complex. More details in #115 and linked issues.

@rubenv rubenv closed this as completed Nov 2, 2015
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