JSON textunits should have a global ID

Description

The textunit resIds for JSON are generated with contentHash, which means the TextFlowTargets for:

will be the same.
This may not be desirable, as there is no context or convention that says they are they same in the way of translatable text.

There should be a means of getting the global id, e.g. thing.title, and using that in the resID.
See test JSONAdapterTest:testDuplicateContent.

Activity

Show:
Sean Flanigan
February 14, 2017, 7:25 AM

For arrays, we should probably use indices, eg

.

If we make the resIds based on a unique path, we should probably avoid using a content hash entirely. This would allow us to track the identity of a string over time, even with changes in the English text, as we do for properties files (where the property key is the resId). This would allow for smarter translation memory logic.

Damian Jansen
May 28, 2018, 1:53 PM

It appears that, by using the parameter

I can get a decent path that for

I get

This makes it easy to handle things well enough, though I either need to have some magic with standalone strings (First, Second) or take them out of consideration.

Ready for Release

Assignee

Damian Jansen

Reporter

Damian Jansen

Labels

Tested Version/s

None

Components

Fix versions

Priority

High
Configure