I have been thinking more about segmented translations since playing around with Pootle and Virtaal. Using a PO editor can be very helpful and it is neat to see old translation work automatically make itself useful again with the translation memory.
Segmented translations are totally different from the TEI Lite XML files I have been using, though, and also totally different from normal HTML files. Basically, segmentation has to happen, and it has to be retained, along with the parallel source text.
The part that bothers me at this point is the workflow. Segmenting plain Chinese text and converting into PO, then converting PO into plain text and then formatting it into XML is easy enough. The problem is that once they are in XML, there is no simply way to pull them back again without jumping through hoops. Perhaps the problem is that XML and HTML simply are not conducive to translation work like this.
I have seen some example PO files from Bhante Sujato, and these use PO comments to store HTML tags, for easy conversion in and out of PO. I like that approach, but I think the PO format is a bit awkward and antiquated, mostly just something created for software translation teams. Then I read something about JSON being used instead.
I have been playing around with some possible formats, but I wanted to ask what your experience has been with segmented translations, and if you have any advice on the matter?
Well in any case, currently I am looking at keeping most translation metadata in a separate file from the actual text contents. For the text segments, Iām looking at a simple format like the following:
The data is still fairly flat (rather than nested), and allows any number of target languages and output file formats. For example, formatting directives could be added for Markdown, TeX, etc.
What advantage do you see in this approach rather than using the PO format?
Why is the HTML repeated for each language? Do you anticipate using different markup for different languages?
Given that the quantity of languages may (hopefully!) blossom, wonāt this become clumsy? Currently thereās 36 languages on SC. Would it not be better to keep each language in separate files, coordinated via ids?
Mainly robustness and flexibility, but also the representation seems a bit cleaner, and JSON is trivial to read and write. Formatting information can also be encoded by just adding key-value pairs.
Possibly! Iāve gone back and forth on this issue, but I tend to think it may be nice to have that type of flexibility. For example, keeping the source text in the original received formatting, while carefully formatting and organizing the translated text.
For SuttaCentral, stuffing all those translations into one file would definitely be clumsy and messy. But at least for my site, I like the flexibility of being able to store variants in one file (even if I never actually use it). Itās mostly for flexibility. In the example above I used āzh-Hansā and āzh-Hant,ā technically the same language, but two different representations.
I didnāt mean to propose that this format is for SC, though. It is something I have been thinking about for my site, and I thought if SC has started going down this route of storing segmented translations, you guys might have some ideas.
I just started with a PO file, and rewrote the contents in JSON, and then took out some of the artificial restrictions, like tying it to two languages, and then added some conventions for storing markup for different formats.
For editing the files, a script could easily extract the relevant language pairs into a temporary PO file, load the file in a PO editor, and then automatically update the language pairs after the editor has closed.
Fair enough. There is certainly a clarity to keeping markup in a separated form. I suspect, though, that youāll encounter the "overlapping hierarchiesā problem. For example, what to do about inline references? Perhaps your text doesnāt have them, but we have vol/page references at random places in the text. This is the hard problem that standoff properties aim to solve.
Yes, this is something I have thought of too. As I work with the Pali texts, I am aware that often the paragraphing, for example, is not what Iād want to use in an English translation. The most common convention in English is for each speaker in a conversation to start with a new paragraph. Should I edit the Pali text to do this? I can, but what if I want to change it later? Or what if we translate into another language that uses a different convention?
If I understand the idea of standoff properties, they rely on a readable plain text document in one file, and a set of properties in another. Using segmented translations, the plain text could simply be one output format. If the standoff properties are used to generate other file formats, then the extra formatting in the JSON file could simply be removed. For example:
Right. Often I just grab a text from CBETA, pipe it through my reformatting program, and then use that directly. I want to format the English translation nicely, but if I apply those same tags to the source text, that would also require changing the source text (punctuation, etc.).