Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
update okapi to version 0.18
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmason committed Sep 14, 2012
1 parent f97d37a commit caf2b9a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion zanata-model/pom.xml
Expand Up @@ -70,7 +70,7 @@
<dependency>
<groupId>net.sf.okapi.steps</groupId>
<artifactId>okapi-step-wordcount</artifactId>
<version>0.17</version>
<version>0.18</version>
<!-- see latest version at http://repository-okapi.forge.cloudbees.com/snapshot/net/sf/okapi/steps/okapi-step-wordcount/ -->
</dependency>

Expand Down
4 changes: 2 additions & 2 deletions zanata-war/pom.xml
Expand Up @@ -916,13 +916,13 @@
<dependency>
<groupId>net.sf.okapi.filters</groupId>
<artifactId>okapi-filter-dtd</artifactId>
<version>0.17</version>
<version>0.18</version>
</dependency>

<dependency>
<groupId>net.sf.okapi.filters</groupId>
<artifactId>okapi-filter-openoffice</artifactId>
<version>0.17</version>
<version>0.18</version>
</dependency>


Expand Down
Expand Up @@ -74,8 +74,6 @@ public enum IdSource {
private final IdSource idSource;
private boolean requireFileOutput;

private final GenericContent converter;

/**
* Create an adapter that will use filter-provided id as TextFlow id.
*
Expand Down Expand Up @@ -109,8 +107,6 @@ public GenericOkapiFilterAdapter(IFilter filter, IdSource idSource, boolean requ
this.idSource = idSource;
this.requireFileOutput = requireFileOutput;

this.converter = new GenericContent();

log = LoggerFactory.getLogger(GenericOkapiFilterAdapter.class);
}

Expand Down Expand Up @@ -149,7 +145,7 @@ else if (event.getEventType() == EventType.TEXT_UNIT)
{
TextFlow tf = new TextFlow(getIdFor(tu, subDocName), sourceLocale);
tf.setPlural(false);
tf.setContents(converter.fromFragmentToLetterCoded(tu.getSource().getFirstContent()));
tf.setContents(GenericContent.fromFragmentToLetterCoded(tu.getSource().getFirstContent(), true));
resources.add(tf);
}
}
Expand Down Expand Up @@ -212,7 +208,7 @@ else if (event.getEventType() == EventType.TEXT_UNIT)
if (tu.isTranslatable())
{
TextFlowTarget tft = new TextFlowTarget(getIdFor(tu, subDocName));
tft.setContents(converter.fromFragmentToLetterCoded(tu.getSource().getFirstContent()));
tft.setContents(GenericContent.fromFragmentToLetterCoded(tu.getSource().getFirstContent(), true));
tft.setState(ContentState.Approved);
translations.add(tft);
}
Expand Down Expand Up @@ -311,7 +307,7 @@ else if (event.getEventType() == EventType.TEXT_UNIT)
TextFlowTarget tft = translations.get(getIdFor(tu, subDocName));
if (tft != null)
{
tu.setTargetContent(localeId, converter.fromLetterCodedToFragment(tft.getContents().get(0), tu.getSource().getFirstContent().clone(), true));
tu.setTargetContent(localeId, GenericContent.fromLetterCodedToFragment(tft.getContents().get(0), tu.getSource().getFirstContent().clone(), true, true));
}
}
writer.handleEvent(event);
Expand Down

0 comments on commit caf2b9a

Please sign in to comment.