Closed (fixed)
Project:
Translation Management Tool
Version:
8.x-1.x-dev
Component:
Translator: File
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 May 2018 at 15:20 UTC
Updated:
30 May 2018 at 14:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
berdirWe didn't do it for the previous change of supporting reading from strings but I think this is a perfect use case for using plugin configurations and passing it to getInstance().
This is specific to XLIFF and does not need to result in a change on the data we accept/return.
There have been discussions in the past about also supporting to send an existing translation. While we don't have the API in place for that yet on Job/JobItem/data level, we could already prepare for it by not making it a bool but support multiple values, e.g. 'target' => empty|source|existing_translation or something like that (for now just the first two)
Also wondering about test coverage, we probably want to expose that setting in the file translator too. We could go all the way with configurable/form plugins and embed the selected plugin configuration inside the translator settings. Or we just special case that setting for now. But we could already store the configuration so that we can expand it, e.g. 'format_configuration' => ['translate' => 'source'].
Comment #3
mbovan commentedUpdated the proposed resolution.
Comment #4
mbovan commentedUpdated File translator Xliff implementation as suggested in #2.
Comment #5
berdirthis isn't a sequence, it is a map of specific keys.
title: Target content
description: Defines what the <target> in the XLIFF file should contain, either empty or the same as the source text.
inheritdoc is wrong because this doesn't implement an interface, so we need a "Creates Xliff instance + params docblock"
"Helper function" is IMHO a useless prefix, just write what it does: "Writes text according to the XLIFF export settings." ?
Comment #6
mbovan commentedThanks for the review.
Addressed all the points.
Comment #7
berdirIt wasn't visible in my text, but I actually escaped the tag so it is actually visible as one in the description.. this will not actually be visible I think :)
Comment #8
mbovan commentedYes, you are right. :)
Comment #10
berdirCommitted, thanks.