Skip to content

Commit

Permalink
Removing ids
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Jan 17, 2024
1 parent dabc739 commit 1005e8a
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 9 deletions.
7 changes: 7 additions & 0 deletions test/create-xliff1-translate-no/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@
replace="id="" translate"
/>

<replaceregexp
file="${basedir}/out/translate2.xlf"
flags="gi"
match="ctype=&quot;x-dita-p&quot; id=\&quot;.*\&quot;"
replace="ctype=&quot;x-dita-p&quot; id=&quot;&quot;"
/>

<compare-output
expectation="${basedir}/expected.xlf"
result="${basedir}/out/translate2.xlf"
Expand Down
4 changes: 2 additions & 2 deletions test/create-xliff1-translate-no/expected.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
</trans-unit>
<trans-unit approved="no" id="2885" xml:space="preserve">
<source xml:lang="en">
<x ctype="x-dita-p" id="d8e26">To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it?</x>
<x ctype="x-dita-p" id="d8e28">But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?</x>
<x ctype="x-dita-p" id="">To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it?</x>
<x ctype="x-dita-p" id="">But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?</x>
</source>
<target xml:lang="de"></target>
</trans-unit>
Expand Down
19 changes: 19 additions & 0 deletions test/create-xliff2-glossentry/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,25 @@
<delete dir="${basedir}/temp" failonerror="false"/>
<exec-transtype transtype="xliff-create"/>
<order-xliff file="${basedir}/out/translate.xlf"/>

<replaceregexp
file="${basedir}/out/translate.xlf"
flags="gi"
match="id=\&quot;.*\&quot;"
replace="id=&quot;&quot;"
/>
<replaceregexp
file="${basedir}/out/translate.xlf"
flags="gi"
match="dataRefEnd=\&quot;.*\&quot;"
replace="dataRefEnd=&quot;&quot;"
/>
<replaceregexp
file="${basedir}/out/translate.xlf"
flags="gi"
match="dataRefStart=\&quot;.*\&quot;"
replace="dataRefStart=&quot;&quot;"
/>
<compare-output
expectation="${basedir}/expected.xlf"
result="${basedir}/out/translate.xlf"
Expand Down
14 changes: 7 additions & 7 deletions test/create-xliff2-glossentry/expected.xlf
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<xliff srcLang="en" trgLang="de" version="2.0" xmlns="urn:oasis:names:tc:xliff:document:2.0">
<file id="1" original="/glossary.dita">
<file id="">
<skeleton href="./skl/glossary.dita.skl"></skeleton>
<unit id="57004">
<unit id="">
<segment state="initial">
<source xml:lang="en" xml:space="preserve">Mnemonics</source>
<target xml:lang="de"></target>
</segment>
</unit>
<unit id="29470">
<unit id="">
<originalData>
<data id="sd5e7">&lt;term&gt;</data>
<data id="ed5e7">&lt;/term&gt;</data>
<data id="">&lt;term&gt;</data>
<data id="">&lt;/term&gt;</data>
</originalData>
<segment state="initial">
<source xml:lang="en" xml:space="preserve">
<pc dataRefEnd="ed5e7" dataRefStart="sd5e7" fs:fs="code" id="d5e7" xmlns:fs="urn:oasis:names:tc:xliff:fs:2.0">
<mrk id="md5e7" translate="no" type="term">Mnemonics</mrk>
<pc dataRefEnd="">
<mrk id="">Mnemonics</mrk>
</pc>are keywords by which each of the instrument's subsystems is referred to.</source>
<target xml:lang="de"></target>
</segment>
Expand Down

0 comments on commit 1005e8a

Please sign in to comment.