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
Fabien Potencier c0bfdeb5c5 bug #29308 [Translation] Use XLIFF source rather than resname when there's no target (thewilkybarkid)
This PR was merged into the 2.8 branch.

Discussion
----------

[Translation] Use XLIFF source rather than resname when there's no target

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Relates to https://github.com/symfony/symfony/issues/20076#issuecomment-251552328. If there's no `<target>` in an XLIFF but there is a `@resname` then that's used rather than the `<source>`.

If I'm using translation keys and my source locale is `en`, then it's a bit redundant to duplicate the `<source>` in the `<target>` in the `en` file (since there is no translation).

This isn't changing the behaviour when `<target>` is present but empty.

(Caveat: I'm definitely not an expert on XLIFF.)

Commits
-------

8633ebbca0 Use XLIFF source rather than resname when there's no target
2018-11-26 08:01:16 +01:00
..
Bridge [PhpUnitBridge] Fix typo 2018-11-12 19:05:42 +01:00
Bundle bug #28731 [Form] invalidate forms on transformation failures (xabbuh) 2018-11-12 08:14:53 +01:00
Component bug #29308 [Translation] Use XLIFF source rather than resname when there's no target (thewilkybarkid) 2018-11-26 08:01:16 +01:00