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

Implemented the bolt content translations #3378

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Spomsoree
Copy link
Contributor

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.

@bobdenotter
Copy link
Member

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. :-)

@Filoz
Copy link
Contributor

Filoz commented Jan 15, 2023

I really love this feature!
we had the same need

@Spomsoree
Copy link
Contributor Author

@Filoz were you able to test it already?

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

@Filoz
Copy link
Contributor

Filoz commented Jan 27, 2023

Unfortunately not yet.
I'd like to try soon

@Spomsoree
Copy link
Contributor Author

@Filoz did you find the time to test this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants