Skip to content

PhpExtractor translations always extracts with "messages" domain #20135

@muxahuk

Description

@muxahuk

Hey.
I'v been making some translations gui bundle and found a bug in PhpExtractor:
Every message that found by PhpExtractor is with "messages" domain.

So, for unit tests i did:

added line to FrameworkBundle/Tests/Fixtures/Views/translation.html.php

<?php echo $view['translator']->trans( 'other-domain-test', [], 'not_messages' ); ?>

and modified tests file ( FrameworkBundle/Tests/Translation/PhpExtractorTest.php )

// Assert
        $expectedCatalogue = array('messages' => array(
            'single-quoted key' => 'prefixsingle-quoted key',
            'double-quoted key' => 'prefixdouble-quoted key',
            'heredoc key' => 'prefixheredoc key',
            'nowdoc key' => 'prefixnowdoc key',
            "double-quoted key with whitespace and escaped \$\n\" sequences" => "prefixdouble-quoted key with whitespace and escaped \$\n\" sequences",
            'single-quoted key with whitespace and nonescaped \$\n\' sequences' => 'prefixsingle-quoted key with whitespace and nonescaped \$\n\' sequences',
            'single-quoted key with "quote mark at the end"' => 'prefixsingle-quoted key with "quote mark at the end"',
            $expectedHeredoc => 'prefix'.$expectedHeredoc,
            $expectedNowdoc => 'prefix'.$expectedNowdoc,
            '{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples' => 'prefix{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples',
        ), 'not_messages' => array(
            'other-domain-test' => 'prefixother-domain-test'
        ) );

added 'not_messages' key and values array

And it fails!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy