Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Nov 26, 2018

Conversation

thewilkybarkid
Copy link
Contributor

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 #20076 (comment). 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.)

@thewilkybarkid thewilkybarkid changed the title Use XLIFF source rather than resname when there's no target [Translation] Use XLIFF source rather than resname when there's no target Nov 24, 2018
@nicolas-grekas nicolas-grekas added this to the 2.8 milestone Nov 25, 2018
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

@fabpot
Copy link
Member

fabpot commented Nov 26, 2018

Thank you @thewilkybarkid.

@fabpot fabpot merged commit 8633ebb into symfony:2.8 Nov 26, 2018
fabpot added a commit that referenced this pull request Nov 26, 2018
…ere'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 #20076 (comment). 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
-------

8633ebb Use XLIFF source rather than resname when there's no target
@thewilkybarkid thewilkybarkid deleted the xliff-resname-source branch November 26, 2018 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants