core icon indicating copy to clipboard operation
core copied to clipboard

Implemented the bolt content translations

Open Spomsoree opened this issue 2 years ago • 5 comments

This feature adds the Content-Translation page:

image

This page allows to export content in the xlf format, which is the default format for translation agencies.

After translating the files, they can be imported again and will replace localized text with the given file.

If content cannot be found by their id (which happens if content is changed between import and exporting), the controller searches for the original text and adds the translation to the found content field.

This also works with custom fields that are stored as json. On export the controller even splits json content, so translation agencies do not need to read in between the json overhead:

    <unit id="fZD0nJb" name="DE TITLE">
      <notes>
        <note category="id">9</note>
        <note category="type">generic</note>
        <note category="original">{"title":"DE TITLE","size":"h2"}</note>
        <note category="part">title</note>
      </notes>
      <segment>
        <source>DE TITLE</source>
        <target>EN TITLE</target>
      </segment>
    </unit>
    <unit id="_Zj_Bq_" name="h2">
      <notes>
        <note category="id">9</note>
        <note category="type">generic</note>
        <note category="original">{"title":"DE TITLE","size":"h2"}</note>
        <note category="part">size</note>
      </notes>
      <segment>
        <source>h2</source>
        <target>h2</target>
      </segment>
    </unit>

HTML on the other side is not extracted, which was not a problem for the company that translated our last project (their tool was able to do it on its own).

This was tested on one project so far (without the fallback to the content query, if id's changed). This has also been successfully tested on all supported databases: mysql, sqlite and postgresql.

Spomsoree avatar Dec 22 '22 14:12 Spomsoree

Cool! I've not needed this functionality myself, but I can imagine it's pretty useful for a bunch of other people.

I'm out-of-town until January 2nd, so i'll do a proper review in the first week of January. :-)

bobdenotter avatar Dec 23 '22 09:12 bobdenotter

I really love this feature! we had the same need

Filoz avatar Jan 15 '23 14:01 Filoz

@Filoz were you able to test it already?

Let me know if you ran into any kind of problems with that.

Spomsoree avatar Jan 16 '23 08:01 Spomsoree

Unfortunately not yet. I'd like to try soon

Filoz avatar Jan 27 '23 11:01 Filoz

@Filoz did you find the time to test this?

Spomsoree avatar Jun 05 '23 15:06 Spomsoree