8000 Note about translations in bundle inheritance by rdohms · Pull Request #1015 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Note about translations in bundle inheritance #1015

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

Closed
wants to merge 1 commit into from

Conversation

rdohms
Copy link
Contributor
@rdohms rdohms commented Jan 19, 2012

Added note to alert users that initializing a child bundle before the parent will cause translation override to happen the other way.

Discussed here: symfony/symfony#3148

… parent will cause translation override to happen the other way.
@weaverryan
Copy link
Member

Hi Rafael!

I believe you're 100% right, however I think this may not have anything to do with child/parent bundles, meaning we've just got some plain inaccurate information in this section on that topic.

The translation files are all loaded into one big array, and I believe that this is done in order of how the bundles are loaded. So, it ends up having nothing to do with child/parent bundles and everything to do with populating this big pool based on order.

But, I want to ping out to Twitter and see if we can get some verification on this. The behavior makes sense from a code standpoint, but it also feels a bit strange that this one situation doesn't respect the child-parent stuff.

Thanks!

@stof
Copy link
Member
stof commented Jan 22, 2012

@weaverryan indeed, translations have nothing to do with parent/child releationships. Any bundle can provide translation strings for any translation domain

@rdohms
Copy link
Contributor Author
rdohms commented Jan 22, 2012

@weaverryan yes that is the case, its all about order. But if there is a "parent/child" override in the framework, the least it should do i guarantee that for all functionality IMHO. Also, the fact that all translations are based on order of initialization should also be made clear in the docs, it is confusing to a user that does not know the core.

@weaverryan
Copy link
Member

Thanks guys - I've merged this in (sha: 001fa07) and also clarified things considerably. The previous description on this topic related to translations was just plain wrong - it should be much better now: sha: f1355d2

@rdohms I agree that the behavior for this one type of resource seems inconsistent. I see that you already have an issue on the topic. I agree with what you guys are saying there - doc is the easiest way, but it does make logical sense to re-order the translation files (though it may not actually happen).

Thanks for the report!

@weaverryan weaverryan closed this Feb 1, 2012
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

Successfully merging this pull request may close these issues.

3 participants
0