This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config
Fabien Potencier 8ca8aef151 merged branch stof/gettext_loader (PR #2412)
Commits
-------

d974a4a Merge pull request #4 from stealth35/test_mo_loader
cf05646 delete useless tests
19f9de9 [Translation] fix gettext tests
965f2bf Merge pull request #3 from stealth35/test_mo_loader
9c2a26d [Translation] add Mo loader tests
9af2342 [Translation] Added the gettext loaders

Discussion
----------

[Translation] Added the gettext loaders

This is the squashed version of the work done by @xaav in #634.

@stealth35 you said you will work on the dumpers. do you have some stuff on it ?

---------------------------------------------------------------------------

by drak at 2011/10/24 19:28:43 -0700

Is there any more progress with this?

---------------------------------------------------------------------------

by stealth35 at 2011/10/25 00:57:19 -0700

I work on the dumpers, but the Po loader is wrong, caus' the Po ressource can be multiline,

     msgid ""
     "Here is an example of how one might continue a very long string\n"
     "for the common case the string represents multi-line output.\n"

http://www.gnu.org/software/gettext/manual/gettext.html#PO-Files

Anyway the Po format is an intermediate format to Mo file, (like .txt to .res file for ICU), IMO we can just support the real gettext format : Mo

---------------------------------------------------------------------------

by stealth35 at 2011/11/03 02:00:24 -0700

@stof The MO Dumper is ready (stealth35/symfony@f2d1d5b4de), should we keep the PO format ?

---------------------------------------------------------------------------

by fabpot at 2011/11/07 08:50:59 -0800

@stealth35: The PO is what people will use for their translations. They will then dump it to MO. So, we need both PO and MO loaders and dumpers.

---------------------------------------------------------------------------

by stealth35 at 2011/11/08 01:25:39 -0800

@fabpot, I'm ready for both dumpers, you can merge this, and I'll open a PR for the dumpers

---------------------------------------------------------------------------

by fabpot at 2011/11/08 22:37:47 -0800

I've just had a look at this PR code again and I see that the unit tests are pretty slim. Is it possible to add some tests for the mo loader?

---------------------------------------------------------------------------

by stealth35 at 2011/11/09 01:15:25 -0800

@fabpot test send to @stof ✌️

---------------------------------------------------------------------------

by stof at 2011/11/09 02:22:55 -0800

and merged in this branch

---------------------------------------------------------------------------

by fabpot at 2011/11/09 02:39:09 -0800

The tests do not pass for me:

    There was 1 error:

    1) Symfony\Tests\Component\Translation\Loader\MoFileLoaderTest::testLoadDoesNothingIfEmpty
    InvalidArgumentException: MO stream content has an invalid format.

    /Users/fabien/work/symfony/git/symfony/src/Symfony/Component/Translation/Loader/MoFileLoader.php:79
    /Users/fabien/work/symfony/git/symfony/src/Symfony/Component/Translation/Loader/MoFileLoader.php:46
    /Users/fabien/work/symfony/git/symfony/tests/Symfony/Tests/Component/Translation/Loader/MoFileLoaderTest.php:34

    --

    There was 1 failure:

    1) Symfony\Tests\Component\Translation\Loader\PoFileLoaderTest::testLoad
    Failed asserting that two arrays are equal.
    --- Expected
    +++ Actual
    @@ @@
     Array (
    -    'foo' => 'bar'
     )

    /Users/fabien/work/symfony/git/symfony/tests/Symfony/Tests/Component/Translation/Loader/PoFileLoaderTest.php:25
2011-11-09 22:00:02 +01:00
..
routing [FrameworkBundle] fixed _internal route when the path contains dots 2011-07-07 17:25:53 +02:00
schema moved management of the locale from the Session class to the Request class 2011-10-08 18:34:49 +02:00
annotations.xml Disable call to AnnotationReader::setAutoloadAnnotations() 2011-07-03 16:21:52 +02:00
collectors.xml [FrameworkBundle] added a command to help debugging route matching problems 2011-10-24 09:08:38 +02:00
debug.xml added Stopwatch support in debug mode, added a timeline representing the stopwatch events in the web profiler 2011-10-21 07:45:12 +02:00
esi.xml updated all HttpKernel event listeners to implement EventSubscriberInterface 2011-10-10 14:54:49 +02:00
form_csrf.xml fixed form configuration when no session is available (closes #841) 2011-05-18 12:54:16 +02:00
form.xml [Form] removed the file upload temporary storage feature 2011-06-09 12:44:36 +02:00
profiling.xml [FrameworkBundle] fixed priority to be consistent with 2.1 2011-10-23 09:50:45 +02:00
routing.xml fix a typo in the routing dependency injection configuration. the request_context service is named router, not routing 2011-10-22 16:07:33 +02:00
services.xml moved ErrorHandler management to the distributions 2011-05-05 08:53:13 +02:00
session.xml moved management of the locale from the Session class to the Request class 2011-10-08 18:34:49 +02:00
templating_debug.xml Added monolog tags to create all core channels 2011-03-18 12:29:20 +01:00
templating_php.xml [FrameworkBundle] Assets templating helper does not need request scope 2011-09-26 19:54:05 -04:00
templating.xml added missing change from previous commit (sorry :() 2011-06-07 11:57:30 +02:00
test.xml Renamed core.* events to kernel.* and CoreEvents to KernelEvents 2011-06-21 16:35:14 +02:00
translation.xml merged branch stof/gettext_loader (PR #2412) 2011-11-09 22:00:02 +01:00
validator.xml fixed validation of Doctrine proxy objects 2011-07-06 13:03:38 +02:00
web.xml updated all HttpKernel event listeners to implement EventSubscriberInterface 2011-10-10 14:54:49 +02:00