Usage of storage size with xml-its filter

6 views
Skip to first unread message

Marc Mittag

unread,
Jun 3, 2024, 4:39:37 PMJun 3
to okapi-users
Dear all,

there is a second question today:

I tried to use the extraction of the storage size with the
xml-its-filter as described here:

https://www.w3.org/TR/its20/#storagesize

Works like a charm.

The only issue, that astonishes me is, that the extracted xliff fragment
looks like this

<source xml:lang="en-US" its:storageSize="30">Interesse geweckt?</source>

instead like this

<source xml:lang="en-US" maxwidth="30" size-unit="char">Interesse
geweckt?</source>

Since Okapi always tries to work with the standards as far as possible,
I would have expected, that no additional name space is added to the
xliff, if something exists in the standard, that does the job.

Is there a way to make Okapi do so? If I uncheck the option "Include ITS
mark-up, when available" in the "Generic xliff settings" of the
translation kit step, nothing is added to the xliff that shows the
length restriction. I would have expected a fallback to what the
standard offers in that case.

best

Marc

Chase Tingley

unread,
Jun 3, 2024, 5:04:23 PMJun 3
to Marc Mittag, okapi-users
Without looking at the code, I think this is an oversight that needs to be fixed in the filter. IIRC the ITS annotations are all serialized to XLIFF as a special case because this is a desirable thing to do for annotations like LQI, Provenance, etc. In this case, the filter needs to map the storage-size annotation to the standard maxwidth property that will serialize correctly.

--
You received this message because you are subscribed to the Google Groups "okapi-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to okapi-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/okapi-users/c6b81f8c-b760-4ccb-a684-d656cf5ce115%40marcmittag.de.

Marc Mittag

unread,
Jun 3, 2024, 5:15:09 PMJun 3
to Chase Tingley, Marc Mittag, okapi-users

this means, I understand it correctly, that if the option "Include ITS  mark-up, when available" in the "Generic xliff settings" is checked, it should look like

<source xml:lang="en-US" its:storageSize="30">Interesse geweckt?</source>

and it is a bug, that if it is unchecked it does not look like this?



<source xml:lang="en-US" maxwidth="30" size-unit="char">Interesse
geweckt?</source>

best

Marc

Chase Tingley

unread,
Jun 3, 2024, 5:21:28 PMJun 3
to Marc Mittag, okapi-users
I think it’s a bug that there’s no way to write this out as maxwidth. I’m wondering if we should *always* write out maxwidth, and then also redundantly wrote out its:storageSize if the ITS option is set. Doing one or the other seems like maybe it’s being clever at the expense of making it harder to use.

Marc Mittag

unread,
Jun 3, 2024, 5:24:33 PMJun 3
to Chase Tingley, okapi-users

Would make sense for me.

How can we go forward with a fix?

Should I ask Denis to implement it?

best

Marc

Jim Hargrave

unread,
Jun 3, 2024, 6:28:54 PMJun 3
to Chase Tingley, Marc Mittag, okapi-users

>> we should *always* write out maxwidth, and then also redundantly wrote out its:storageSize if the ITS option is set

+1

Looking at XmlWriter this is exactly what we do. The issue is the XML ITS filter not populating a Property for maxsize (Property.MAX_WIDTH) etc..

Jim


This e-mail and any attachments are confidential and intended solely for the intended addressee. If you are not the intended addressee or have received this e-mail in error, please notify Straker immediately, delete it from your system and do not copy, disclose, distribute or otherwise act in reliance upon any part of this e-mail or its attachments. Straker will not be held liable for any damage caused by the message.
Is it necessary to print this email? If you care about the environment like we do, please refrain from printing emails. It helps to keep the environment forested and litter-free.

Chase Tingley

unread,
Jun 3, 2024, 8:30:52 PMJun 3
to Marc Mittag, okapi-users
Sure, if you could reach out to Denis, that would be great.  Hopefully this should not be too hard.

Marc Mittag

unread,
Jun 4, 2024, 4:30:00 AMJun 4
to Chase Tingley, okapi-users

ok, will do :-)

best

Marc

Reply all
Reply to author
Forward
0 new messages