computerline1z / okapi

Automatically exported from code.google.com/p/okapi
0 stars 0 forks source link

Better id convention for properties + html subfilter #216

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I am using a properties file that looks like this:
   someKey1=<ul><li id="one">item 1</li><li id="two">item 2</li></ul>
   someKey2=<ul><li>item 1</li><li id="two">item 2</li></ul>
   someKey3=<ul><li>item 1</li><li>item 2</li></ul>

Processing it using okf_properties-html-subfilter (in rainbow, 16-SNAPSHOT) I 
get something like this (source and target removed for brevity:

    <group id="P31-1" resname="sub-filter:">
        <trans-unit id="tu1" resname="one-id" restype="x-li" />
        <trans-unit id="tu2" resname="two-id" restype="x-li" />
    </group>
    <group id="P32-1" resname="sub-filter:">
        <trans-unit id="tu1" resname="someKey2-1" restype="x-li" />
        <trans-unit id="tu2" resname="two-id" restype="x-li" />
    </group>
    <group id="P33-1" resname="sub-filter:">
        <trans-unit id="tu1" resname="someKey3-1" restype="x-li" />
        <trans-unit id="tu2" resname="someKey3-2" restype="x-li" />
    </group>

In group 1 "someKey1" is lost, in group 2 "someKey2" is lost for one of the 
entries, and in group 3 the IDs of the LIs are lost.

I would have expected something like this:

    <group id="someKey1" resname="sub-filter:">
        <trans-unit id="tu1" resname="one" restype="x-li" />
        <trans-unit id="tu2" resname="two" restype="x-li" />
    </group>
    <group id="someKey2" resname="sub-filter:">
        <trans-unit id="tu1" restype="x-li" />
        <trans-unit id="tu2" resname="two" restype="x-li" />
    </group>
    <group id="someKey2" resname="sub-filter:">
        <trans-unit id="tu1" restype="x-li" />
        <trans-unit id="tu2" restype="x-li" />
    </group>

Or even this

    <group id="P31-1" resname="sub-filter:">
        <trans-unit id="tu1" resname="someKey1-one-id" restype="x-li" />
        <trans-unit id="tu2" resname="someKey1-two-id" restype="x-li" />
    </group>
    <group id="P32-1" resname="sub-filter:">
        <trans-unit id="tu1" resname="someKey2-1" restype="x-li" />
        <trans-unit id="tu2" resname="someKey2-two-id" restype="x-li" />
    </group>
    <group id="P33-1" resname="sub-filter:">
        <trans-unit id="tu1" resname="someKey3-one-id" restype="x-li" />
        <trans-unit id="tu2" resname="someKey3-two-id" restype="x-li" />
    </group>

I am not bothered to much about the expectation, but this is a loss of context 
information.

Thank you,
Mihai

Original issue reported on code.google.com by mihn...@gmail.com on 12 Apr 2012 at 8:23

GoogleCodeExporter commented 9 years ago
That's a problem not very easy to solve.
We'll have to look at it.

Jim: I'm putting your name on it since yo're looking at the sub-filters 
currently.

Original comment by yves.sav...@gmail.com on 12 Apr 2012 at 8:35

GoogleCodeExporter commented 9 years ago
Sergei is now the Man!

Original comment by yves.sav...@gmail.com on 13 Apr 2012 at 3:10

GoogleCodeExporter commented 9 years ago
Thank you very much!

Original comment by mihn...@gmail.com on 16 Apr 2012 at 5:42