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

Appearance settings

[Translation] translation:update remove all notes from '+intl-icu' file. #37490

Copy link
Copy link
Closed
@kulishkin

Description

@kulishkin
Issue body actions

Symfony version(s) affected: 4.4 and above

Description
translation:update remove all notes from '+intl-icu' file

How to reproduce

  1. enable intl extension
  2. add service:
<?php

declare(strict_types=1);

namespace App\Service;

use Symfony\Contracts\Translation\TranslatorInterface;

final class TestService
{
    private TranslatorInterface $translator;

    public function __construct(TranslatorInterface $translator)
    {
        $this->translator = $translator;
    }

    public function test()
    {
        $this->translator->trans('Some translated text');
    }
}
  1. enable service in configuration:
services:
    App\Service\TestService:
        public: true
        arguments:
            $translator: '@translator'
  1. update the translation file ./bin/console translation:update ru_RU --force
  2. add notes to file messages+intl-icu.ru_RU.xlf:
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
  <file source-language="en" target-language="ru-RU" datatype="plaintext" original="file.ext">
    <header>
      <tool tool-id="symfony" tool-name="Symfony"/>
    </header>
    <body>
      <trans-unit id="aHhXfmK" resname="Some translated text">
        <source>Some translated text</source>
        <target>__Some translated text</target>
        <note priority="1">Comment for translator</note>
      </trans-unit>
    </body>
  </file>
</xliff>
  1. update the translation file again ./bin/console translation:update ru_RU --force
  2. all notes was removed.

Possible Solution
fix method \Symfony\Component\Translation\Catalogue\MergeOperation::processDomain.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.