Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
weaverryan merged 8 commits intosymfony:2.3fromraulfraile:translation_custom_loaders
Sep 16, 2014
Merged

Translation custom loaders#4166

weaverryan merged 8 commits intosymfony:2.3fromraulfraile:translation_custom_loaders
Sep 16, 2014

Conversation

@raulfraile
Copy link
Contributor

QA
Doc fix?no
New docs?yes
Applies toall
Fixed tickets#4156

This PR adds a documentation section for creating custom loaders and dumpers to support other formats.

Copy link
Member

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
Copy link
Member

the new page should be added to the map.rst.inc in the components folder.

And in the DIC tag reference presenting thetranslation.loader tag, you should add a link to this page

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
Copy link
Member

@raulfraile thanks for completing the documentation of the translator component. I really like it!

@xabbuh
Copy link
Member

Does it make sense to have this in the components part? What about moving this to the cookbook?

@raulfraile
Copy link
ContributorAuthor

@stof@javiereguiluz just pushed some changes based on your comments, but I am not sure about linking it from thetranslation.loader DIC tag. Should we remove the small introduction about custom loaders from there and just link here?

@xabbuh
Copy link
Member

@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.

Copy link
Member

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
Copy link
Member

@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. 👍

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
Copy link
ContributorAuthor

@xabbuh thank you for the suggestions! I fixed all the issues (except the DIC tag docs, waiting what others think).

@xabbuh
Copy link
Member

We also have atranslation.dumper tag which can also be linked the same way liketranslation.loader.

@wouterj
Copy link
Member

+1 for keeping this in the component section: It is related to the component, not the framework.

Copy link
Member

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?

Copy link
Member

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
Copy link
Member

apart from some minor comments, it looks good.

Thank you for submitting!

@raulfraile
Copy link
ContributorAuthor

@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
Copy link
Member

@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 thetranslation.dumper tag too)?

Copy link
Member

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
Copy link
Member

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!

@weaverryanweaverryan merged commit69491ae intosymfony:2.3Sep 16, 2014
weaverryan added a commit that referenced this pull requestSep 16, 2014
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
weaverryan added a commit that referenced this pull requestSep 16, 2014
weaverryan added a commit that referenced this pull requestSep 16, 2014
* 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
weaverryan added a commit that referenced this pull requestSep 16, 2014
* 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_  ...
weaverryan added a commit that referenced this pull requestSep 16, 2014
* 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_  ...
weaverryan added a commit that referenced this pull requestSep 22, 2014
…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
daFish pushed a commit to daFish/symfony-docs that referenced this pull requestSep 28, 2014
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@raulfraile@stof@javiereguiluz@xabbuh@wouterj@weaverryan@ggam

[8]ページ先頭

©2009-2025 Movatter.jp