Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Translation custom loaders#4166
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I don't think listing the methods of the interface is needed in this paragraph. Implementing an inteface involves implementing all its methods.
stof commentedAug 23, 2014
the new page should be added to the map.rst.inc in the components folder. And in the DIC tag reference presenting the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Using:: at the end of this paragraph would make the code listing be interpreted as PHP code. Maybe its better to create a proper code listing:
[...]message. A translation file would look like this:.. code-block:: text (welcome)(Bienvenido) (goodbye)(Adios) (hello)(Hola)javiereguiluz commentedAug 23, 2014
@raulfraile thanks for completing the documentation of the translator component. I really like it! |
xabbuh commentedAug 23, 2014
Does it make sense to have this in the components part? What about moving this to the cookbook? |
raulfraile commentedAug 23, 2014
@stof@javiereguiluz just pushed some changes based on your comments, but I am not sure about linking it from the |
xabbuh commentedAug 23, 2014
@raulfraile I would remove everything after the first sentence there and add a link to your new article instead. So, it would then look something like this: translation.loader------------------**Purpose**: To register a custom service that loads translationsBy default, translations are loaded from the filesystem in a variety of differentformats (YAML, XLIFF, PHP, etc)...seealso:: Learn how to:doc:`load custom formats</components/translation/custom_format>` in the components section. But let's wait what the others think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I would not mention the custom loaders here, but add a sentence after the list of default loaders instead.
xabbuh commentedAug 23, 2014
@raulfraile I didn't meant to shock you. The things I commented on are mainly minor issues. I basically really like the work you did. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Little type: adiós ;)
raulfraile commentedAug 24, 2014
@xabbuh thank you for the suggestions! I fixed all the issues (except the DIC tag docs, waiting what others think). |
xabbuh commentedAug 24, 2014
We also have a |
wouterj commentedAug 24, 2014
+1 for keeping this in the component section: It is related to the component, not the framework. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
and what about an extractor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
totally unrelated. The extractor does not care about the format of your translation files. It relies on the loader and dumper for it (it would be great to add a cookbook about adding extractors though)
wouterj commentedAug 24, 2014
apart from some minor comments, it looks good. Thank you for submitting! |
raulfraile commentedAug 26, 2014
@wouterj I pushed some changes based on your comments, except for the extractor, as I would need to do some additional research. Can we leave it for another PR? |
xabbuh commentedAug 26, 2014
@raulfraile As@stof mentionedhere, the extractor is not really related to this article and I agree with him in that. @wouterj What do you think about theproposed change in the reference (I think something like that should be added for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
... these kind of files ...
weaverryan commentedSep 16, 2014
Hey Raul! I've decided to merge this because it's very nice! There is one little type that I just commented on and will fix myself.@xabbuh, if you'd like to create the note on the DI tags page, that would be great - I agree that it's a good idea. Thanks everyone! |
This PR was merged into the 2.3 branch.Discussion----------Translation custom loaders| Q | A| ------------- | ---| Doc fix? | no| New docs? | yes| Applies to | all| Fixed tickets |#4156This PR adds a documentation section for creating custom loaders and dumpers to support other formats.Commits-------69491ae Improved custom formats article based on commentsc0f3b0a Fixed wrong indentation629a008 Extra improvements based on commentsbfd78b3 Improvements based on comments105a168 Cleanupse2fd5fa Small fixesdee7fb2 Link from introduction section8b6c584 Added custom format page to translation component
* 2.3: (29 commits) [#4166] Fixing small typo Fixed all the errors found by Ryan Removed two highlight formats which are "experimental" and not used by end users Reworded the explanation about the limitation of enablin PHP templates Improved the explanation thanks to@stof comments More and more fixes and improvements Added another bunch of fixes suggested by reviewers Added lots of fixes suggested by reviewers Added a note about not using relative internal links in the doc Switched another relative link into an absolute reference lways use absolute links instead of relative for internal doc links Added missing link Revamped the documentation about "Contributing Docs" do not reference services in parameters Fix reference label Add label book-security-roles Add formatting, links, and clarity Added a note about the side effects of enabling both PHP and Twig Caution that roles should start with ROLE_ Added note about exporting SYMFONY_ENV ...Conflicts:components/translation/introduction.rst
* 2.4: (30 commits) [#4166] Fixing small typo caution on `null` values in Expression constraint Fixed all the errors found by Ryan Removed two highlight formats which are "experimental" and not used by end users Reworded the explanation about the limitation of enablin PHP templates Improved the explanation thanks to@stof comments More and more fixes and improvements Added another bunch of fixes suggested by reviewers Added lots of fixes suggested by reviewers Added a note about not using relative internal links in the doc Switched another relative link into an absolute reference lways use absolute links instead of relative for internal doc links Added missing link Revamped the documentation about "Contributing Docs" do not reference services in parameters Fix reference label Add label book-security-roles Add formatting, links, and clarity Added a note about the side effects of enabling both PHP and Twig Caution that roles should start with ROLE_ ...
* 2.5: (30 commits) [#4166] Fixing small typo caution on `null` values in Expression constraint Fixed all the errors found by Ryan Removed two highlight formats which are "experimental" and not used by end users Reworded the explanation about the limitation of enablin PHP templates Improved the explanation thanks to@stof comments More and more fixes and improvements Added another bunch of fixes suggested by reviewers Added lots of fixes suggested by reviewers Added a note about not using relative internal links in the doc Switched another relative link into an absolute reference lways use absolute links instead of relative for internal doc links Added missing link Revamped the documentation about "Contributing Docs" do not reference services in parameters Fix reference label Add label book-security-roles Add formatting, links, and clarity Added a note about the side effects of enabling both PHP and Twig Caution that roles should start with ROLE_ ...
…on (xabbuh)This PR was merged into the 2.3 branch.Discussion----------[Reference] link translation DIC tags to components section| Q | A| ------------- | ---| Doc fix? | yes| New docs? | no| Applies to | all| Fixed tickets |The `translation.loader` and `translation.dumper` DIC tags link to the respective sections in the Translation component documentation (in addition to the changes done in#4166).Commits-------9790975 link translation DIC tags to components section
This PR adds a documentation section for creating custom loaders and dumpers to support other formats.