From b80f46bcf48b55848ad5cb8868cc454ff29e6f62 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sat, 23 May 2015 13:55:33 +0200 Subject: [PATCH 1/4] [WIP] [Translation] Add note about how to override translation in child Bundle #5193 --- cookbook/bundles/override.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cookbook/bundles/override.rst b/cookbook/bundles/override.rst index 70ba6786dde..c28a79f864b 100644 --- a/cookbook/bundles/override.rst +++ b/cookbook/bundles/override.rst @@ -191,7 +191,10 @@ can override the translations from any translation file, as long as it is in The last translation file always wins. That means that you need to make sure that the bundle containing *your* translations is loaded after any bundle whose translations you're overriding. This is done in ``AppKernel``. - + Translation files are not aware of the inheritance tree and therefore + unaware of their parent. If you want to override translations from the + parent bundle be sure the loading order in ``AppKernel`` is parent > child. + The file that always wins is the one that is placed in ``app/Resources/translations``, as those files are always loaded last. From 13e335173eb546260cdf7ddf8bf43cba2f98569a Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sat, 23 May 2015 16:03:28 +0200 Subject: [PATCH 2/4] Update override.rst Minor editing. --- cookbook/bundles/override.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cookbook/bundles/override.rst b/cookbook/bundles/override.rst index c28a79f864b..99bbec011fd 100644 --- a/cookbook/bundles/override.rst +++ b/cookbook/bundles/override.rst @@ -191,9 +191,10 @@ can override the translations from any translation file, as long as it is in The last translation file always wins. That means that you need to make sure that the bundle containing *your* translations is loaded after any bundle whose translations you're overriding. This is done in ``AppKernel``. - Translation files are not aware of the inheritance tree and therefore - unaware of their parent. If you want to override translations from the - parent bundle be sure the loading order in ``AppKernel`` is parent > child. + Translation files are not aware of the inheritance tree and therefore + unaware of their parent. If you want to override translations from the + parent bundle, be sure that the parent bundle is loaded before the child + bundle in the ``AppKernel`` class. The file that always wins is the one that is placed in ``app/Resources/translations``, as those files are always loaded last. From f91e424c5cb896c17ff1c9e3bb3035e27e1d89bb Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sat, 23 May 2015 16:37:07 +0200 Subject: [PATCH 3/4] Update override.rst Minor change. --- cookbook/bundles/override.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/bundles/override.rst b/cookbook/bundles/override.rst index 99bbec011fd..854a28c02db 100644 --- a/cookbook/bundles/override.rst +++ b/cookbook/bundles/override.rst @@ -195,7 +195,7 @@ can override the translations from any translation file, as long as it is in unaware of their parent. If you want to override translations from the parent bundle, be sure that the parent bundle is loaded before the child bundle in the ``AppKernel`` class. - + The file that always wins is the one that is placed in ``app/Resources/translations``, as those files are always loaded last. From 32d8203a03f8f72f61b0c218910c06f153fb1ea3 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sat, 23 May 2015 16:45:24 +0200 Subject: [PATCH 4/4] Update override.rst Tackling the new line... --- cookbook/bundles/override.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/cookbook/bundles/override.rst b/cookbook/bundles/override.rst index 854a28c02db..b67ae24c656 100644 --- a/cookbook/bundles/override.rst +++ b/cookbook/bundles/override.rst @@ -198,5 +198,4 @@ can override the translations from any translation file, as long as it is in The file that always wins is the one that is placed in ``app/Resources/translations``, as those files are always loaded last. - .. _`the Doctrine documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/inheritance-mapping.html#overrides