pax_global_header 0000666 0000000 0000000 00000000064 11615346516 0014522 g ustar 00root root 0000000 0000000 52 comment=2f251ed1a7f8356aee64d71eaebdbcb8b06547d8
omegat-2.3.0.1+dfsg/ 0000775 0000000 0000000 00000000000 11615346516 0014056 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/ 0000775 0000000 0000000 00000000000 11615346516 0015326 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/javahelp-filters/ 0000775 0000000 0000000 00000000000 11615346516 0020566 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/javahelp-filters/build.xml 0000664 0000000 0000000 00000006471 11615346516 0022417 0 ustar 00root root 0000000 0000000
Builds, tests, and runs the project javahelp-filters.
omegat-2.3.0.1+dfsg/addons/javahelp-filters/manifest.mf 0000664 0000000 0000000 00000000306 11615346516 0022717 0 ustar 00root root 0000000 0000000 Manifest-Version: 1.0
OmegaT-Plugin: true
Name: org.omegat.filters2.javahelp.helpset.HelpSetFilter
OmegaT-Filter: true
Name: org.omegat.filters2.javahelp.toc.TOCFilter
OmegaT-Filter: true
omegat-2.3.0.1+dfsg/addons/javahelp-filters/nbproject/ 0000775 0000000 0000000 00000000000 11615346516 0022554 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/javahelp-filters/nbproject/build-impl.xml 0000664 0000000 0000000 00000056351 11615346516 0025346 0 ustar 00root root 0000000 0000000
Must set src.dir
Must set build.dir
Must set dist.dir
Must set build.classes.dir
Must set dist.javadoc.dir
Must set build.test.classes.dir
Must set build.test.results.dir
Must set build.classes.excludes
Must set dist.jar
Must select some files in the IDE or set javac.includes
Must select one file in the IDE or set run.class
Must select one file in the IDE or set debug.class
Must set fix.includes
Must select some files in the IDE or set javac.includes
Some tests failed; see details above.
Must select some files in the IDE or set test.includes
Some tests failed; see details above.
Must select one file in the IDE or set test.class
Must select one file in the IDE or set applet.url
Must select one file in the IDE or set applet.url
omegat-2.3.0.1+dfsg/addons/javahelp-filters/nbproject/genfiles.properties 0000664 0000000 0000000 00000000707 11615346516 0026472 0 ustar 00root root 0000000 0000000 build.xml.data.CRC32=9eab5f91
build.xml.script.CRC32=0147d762
build.xml.stylesheet.CRC32=e2435cb5
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=9eab5f91
nbproject/build-impl.xml.script.CRC32=6f286c58
nbproject/build-impl.xml.stylesheet.CRC32=3b89b5a6
omegat-2.3.0.1+dfsg/addons/javahelp-filters/nbproject/project.properties 0000664 0000000 0000000 00000003446 11615346516 0026347 0 ustar 00root root 0000000 0000000 file.reference.xerces-2.6.2.jar=lib/xerces-2.6.2.jar
manifest.file=manifest.mf
application.args=
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/javahelp-filters.jar
dist.javadoc.dir=${dist.dir}/javadoc
jar.compress=false
javac.classpath=\
${reference.OmegaT.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.source=${default.javac.source}
javac.target=${default.javac.target}
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
${libs.junit.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
platform.active=default_platform
project.OmegaT=../../../omegat
reference.OmegaT.jar=${project.OmegaT}/dist/OmegaT.jar
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
# or test-sys-prop.name=value to set system properties for unit tests):
run.jvmargs=
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
src.dir=src
omegat-2.3.0.1+dfsg/addons/javahelp-filters/nbproject/project.xml 0000664 0000000 0000000 00000001662 11615346516 0024751 0 ustar 00root root 0000000 0000000
org.netbeans.modules.java.j2seproject
javahelp-filters
1.6
OmegaT
jar
jar
clean
jar
omegat-2.3.0.1+dfsg/addons/javahelp-filters/src/ 0000775 0000000 0000000 00000000000 11615346516 0021355 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/javahelp-filters/src/org/ 0000775 0000000 0000000 00000000000 11615346516 0022144 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/javahelp-filters/src/org/omegat/ 0000775 0000000 0000000 00000000000 11615346516 0023420 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/javahelp-filters/src/org/omegat/filters2/ 0000775 0000000 0000000 00000000000 11615346516 0025152 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/javahelp-filters/src/org/omegat/filters2/javahelp/ 0000775 0000000 0000000 00000000000 11615346516 0026744 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/javahelp-filters/src/org/omegat/filters2/javahelp/helpset/ 0000775 0000000 0000000 00000000000 11615346516 0030410 5 ustar 00root root 0000000 0000000 HelpSetFilter.java 0000664 0000000 0000000 00000002422 11615346516 0033706 0 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/javahelp-filters/src/org/omegat/filters2/javahelp/helpset /*
* HelpSetFilter.java
*
* Created on 5 Íîÿáðü 2005 ã., 5:10
*
* To change this template, choose Tools | Options and locate the template under
* the Source Creation and Management node. Right-click the template and choose
* Open. You can then make changes to the template in the Source Editor.
*/
package org.omegat.filters2.javahelp.helpset;
import org.omegat.filters2.Instance;
import org.omegat.filters2.TranslationException;
import org.omegat.filters2.xml2.XMLFilter2;
/**
* Filter for JavaHelp Helpset files (*.hs).
*
* @author Maxym Mykhalchuk
*/
public class HelpSetFilter extends XMLFilter2
{
/** Creates a new instance of HelpSetFilter */
public HelpSetFilter()
throws TranslationException
{
super("helpset");
addTranslatableTag("title");
addTranslatableTag("label");
}
/** Human-readable name of the File Format this filter supports. */
public String getFileFormatName()
{
return "Java HelpSet files";
}
/** The default list of filter instances that this filter class has. */
public Instance[] getDefaultInstances()
{
return new Instance[]
{
new Instance("*.hs", null, "UTF-8")
};
}
}
omegat-2.3.0.1+dfsg/addons/javahelp-filters/src/org/omegat/filters2/javahelp/toc/ 0000775 0000000 0000000 00000000000 11615346516 0027531 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/javahelp-filters/src/org/omegat/filters2/javahelp/toc/TOCFilter.java 0000664 0000000 0000000 00000002136 11615346516 0032171 0 ustar 00root root 0000000 0000000 /*
* TOCFilter.java
*
* Created on 5 Íîÿáðü 2005 ã., 5:11
*
* To change this template, choose Tools | Options and locate the template under
* the Source Creation and Management node. Right-click the template and choose
* Open. You can then make changes to the template in the Source Editor.
*/
package org.omegat.filters2.javahelp.toc;
import org.omegat.filters2.Instance;
import org.omegat.filters2.TranslationException;
import org.omegat.filters2.xml2.XMLFilter2;
/**
* JavaHelp TOC (Table of Contents) filter.
*
* @author Maxym Mykhalchuk
*/
public class TOCFilter extends XMLFilter2
{
/** Creates a new instance of TOCFilter */
public TOCFilter()
throws TranslationException
{
super("toc");
addTranslatableAttribute("text", "tocitem");
}
public String getFileFormatName()
{
return "JavaHelp Table of Contents files";
}
public Instance[] getDefaultInstances()
{
return new Instance[]
{
new Instance("*.xml", null, "UTF-8")
};
}
}
omegat-2.3.0.1+dfsg/addons/javahelp-filters/src/org/omegat/filters2/xml2/ 0000775 0000000 0000000 00000000000 11615346516 0026034 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/javahelp-filters/src/org/omegat/filters2/xml2/XMLFilter2.java 0000664 0000000 0000000 00000021073 11615346516 0030572 0 ustar 00root root 0000000 0000000 /*
* XMLFilter2.java
*
* Created on 5 Íîÿáðü 2005 ã., 5:10
*
* To change this template, choose Tools | Options and locate the template under
* the Source Creation and Management node. Right-click the template and choose
* Open. You can then make changes to the template in the Source Editor.
*/
package org.omegat.filters2.xml2;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.omegat.filters2.AbstractFilter;
import org.omegat.filters2.TranslationException;
import org.omegat.filters2.xml.XMLWriter;
import org.omegat.util.AntiCRReader;
import org.omegat.util.EncodingAwareReader;
import org.omegat.util.OConsts;
import org.omegat.util.StaticUtils;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
/**
* Next Generation Filter for XML Files.
* It uses SAX Parser to process XML file.
*
* @author Maxym Mykhalchuk
*/
public abstract class XMLFilter2 extends AbstractFilter
{
/** SAX Parser to parse XML file. */
SAXParser parser;
/**
* Root Element of the handled XML file.
* It's used to differentiate between filters so that a filter doesn't
* handle the XML file that is not his to handle.
*/
String rootElement;
/**
* Creates a new instance of XMLFilter2.
*
* Needs a root element of the XML file that it should handle.
* Root element is used to differentiate between filters so that a filter
* doesn't handle the XML file that is not his to handle.
* If root element is null, all the files are handled.
*
* Subclasses have to setup translatable tags and attributes
* by calling {@link #addTranslatableTag(String)} and
* {@link #addTranslatableAttribute(String,String)}.
*/
public XMLFilter2(String rootElement)
throws TranslationException
{
try
{
this.rootElement = rootElement;
SAXParserFactory factory = SAXParserFactory.newInstance();
parser = factory.newSAXParser();
}
catch( Exception e )
{
throw new TranslationException(e.getLocalizedMessage());
}
}
/**
* Returns whether the file is supported by the filter.
*
* XMLFilter2 uses supplied rootElement to tell whether it's his file or no.
*/
public boolean isFileSupported(BufferedReader reader)
{
if( rootElement==null )
return true;
try
{
char[] buf = new char[OConsts.READ_AHEAD_LIMIT];
int len = reader.read(buf);
String s = new String(buf, 0, len);
int pos = -1;
while( (pos=s.indexOf('<', pos+1))>=0 )
{
char ch = s.charAt(pos+1);
if( ch=='!' )
{
// skipping comments and DTD
char ch2 = s.charAt(pos+2);
if( ch2=='-' )
pos = s.indexOf("-->", pos)+2; // comment
else
pos = s.indexOf('>', pos); // DTD
if( pos<0 )
break;
}
else if( Character.isJavaIdentifierStart(ch) )
{
// found <"english", testing
int pos2 = pos+1;
while( Character.isJavaIdentifierPart(s.charAt(pos2)) )
pos2++;
String id = s.substring(pos+1, pos2);
return id.equals(rootElement);
}
}
return false;
}
catch( Exception e )
{
return false;
}
}
/** Tags with translatable content. */
private HashSet translatableTags = new HashSet();
/** Tags whose attributes are translatable. */
private HashMap translatableAttributes = new HashMap();
/**
* Adds a tag, whose content is translatable.
*
* For example, in XHTML the text in
* <h1>Something here</h1>
* needs to be translated,
* so XHTML filter should call
* addTranslatableTag("h1");
.
*/
protected void addTranslatableTag(String tag)
{
translatableTags.add(tag);
}
/**
* Adds an attribute, whose content is translatable.
*
* For example, in XHTML the alternative text of an image
* <img src="..." alt="image description">
* needs to be translated,
* so XHTML filter should call
* addTranslatableAttribute("alt", "img");
.
*/
protected void addTranslatableAttribute(String attribute, String tag)
{
HashSet hs = (HashSet)translatableAttributes.get(tag);
if( hs==null )
hs = new HashSet();
hs.add(attribute);
translatableAttributes.put(tag, hs);
}
/**
* Package private processEntry to give it to XMLHandler2
*/
String privateProcessEntry(String entry)
{
return processEntry(entry);
}
/** Processes a single file. */
public void processFile(BufferedReader infile, BufferedWriter outfile)
throws IOException, TranslationException
{
XMLHandler2 handler;
handler = new XMLHandler2(this, outfile, translatableTags, translatableAttributes);
InputSource is = new InputSource(infile);
try
{
XMLReader reader = parser.getXMLReader();
reader.setContentHandler(handler);
reader.setDTDHandler(handler);
reader.setEntityResolver(handler);
reader.setErrorHandler(handler);
reader.setProperty("http://xml.org/sax/properties/lexical-handler", handler);
reader.setProperty("http://xml.org/sax/properties/declaration-handler", handler);
parser.parse(is, handler);
}
catch( SAXException saxe )
{
saxe.printStackTrace(StaticUtils.getLogStream());
throw new TranslationException(saxe.getLocalizedMessage());
}
}
/**
* Whether source encoding can be varied by the user.
*
* Default is true, but note that user-supplied encoding will be used
* only if XML reader class fails to find encoding declaration in XML file.
*/
public boolean isSourceEncodingVariable()
{
return true;
}
/**
* Whether target encoding can be varied by the user.
*
* Default is true. XML writer class will write out encoding declaration.
*/
public boolean isTargetEncodingVariable()
{
return true;
}
/**
* Creates a reader of an input file.
*
* By default creates an encoding-aware reader, that is a reader that
* finds and uses encoding declaration in XML file.
*/
public BufferedReader createReader(File infile, String encoding)
throws UnsupportedEncodingException, IOException
{
return new BufferedReader(
new AntiCRReader(
new EncodingAwareReader(
infile.getAbsolutePath(),
EncodingAwareReader.ST_XML,
encoding)));
}
/**
* Creates a writer of the translated file.
*
* By default creates a writer that will write out encoding declaration.
*/
public BufferedWriter createWriter(File outfile, String encoding)
throws UnsupportedEncodingException, IOException
{
return new BufferedWriter(
new XMLWriter(outfile.getAbsolutePath(),
encoding));
}
/**
* Returns the hint displayed while the user edits the filter.
*
* By default returns a note stating that user-supplied encoding will be used
* only if XML reader class fails to find encoding declaration in XML file.
*/
public String getHint()
{
return "Note: Source File Encoding setting will be used only if the file does not have an encoding declaration.";
}
}
omegat-2.3.0.1+dfsg/addons/javahelp-filters/src/org/omegat/filters2/xml2/XMLHandler2.java 0000664 0000000 0000000 00000015144 11615346516 0030724 0 ustar 00root root 0000000 0000000 /*
* XMLHandler2.java
*
* Created on 5 Íîÿáðü 2005 ã., 5:37
*
* To change this template, choose Tools | Options and locate the template under
* the Source Creation and Management node. Right-click the template and choose
* Open. You can then make changes to the template in the Source Editor.
*/
package org.omegat.filters2.xml2;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.HashSet;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.ext.DefaultHandler2;
/**
* Callback to be called by SAX Parser.
* Does the real job of feeding strings to OmegaT core.
*
* @author Maxym Mykhalchuk
*/
public class XMLHandler2 extends DefaultHandler2
{
/** My parent XML Filter. */
XMLFilter2 filter;
/** The writer I write translated file into. */
BufferedWriter writer;
/** Tags with translatable content. */
private HashSet translatableTags;
/** Tags whose attributes are translatable. */
private HashMap translatableAttributes;
/**
* Creates a new instance of XMLHandler2
*/
public XMLHandler2(XMLFilter2 filter, BufferedWriter writer,
HashSet translatableTags, HashMap translatableAttributes)
{
this.filter = filter;
this.writer = writer;
this.translatableTags = translatableTags;
this.translatableAttributes = translatableAttributes;
}
/** Utility Method: Writes some data into the supplied writer. */
private void write(char[] ch, int start, int length) throws SAXException
{
try
{
writer.write(ch, start, length);
}
catch( IOException ioe )
{
throw new SAXException(ioe);
}
}
/** Utility Method: Writes some data into the supplied writer. */
private void write(String s) throws SAXException
{
try
{
writer.write(s);
}
catch( IOException ioe )
{
throw new SAXException(ioe);
}
}
/** A buffer to collect a translatable string. */
StringBuffer collected;
/** If a collectable element started. */
boolean started = false;
/** The collectable element. */
String element;
/** Receive notification of the start of an element. */
public void startElement(String uri, String localName, String qName,
Attributes attributes) throws SAXException
{
if(weAreInEntity)
return;
if( translatableTags.contains(qName) && !started )
{
started = true;
element = qName;
collected = new StringBuffer();
}
write("<"+qName);
for(int i=0; i");
}
/** Receive notification of character data inside an element. */
public void characters(char[] ch, int start, int length)
throws SAXException
{
if(weAreInEntity)
return;
if( started )
collected.append(ch, start, length);
else
write(ch, start, length);
}
/** Receive notification of the end of an element. */
public void endElement(String uri, String localName, String qName)
throws SAXException
{
if(weAreInEntity)
return;
if( started && element.equals(qName) )
{
started = false;
write(filter.privateProcessEntry(collected.toString()));
}
write(""+qName+">");
}
/** Resolve an external entity to work offline or behind proxy. */
public InputSource resolveEntity(String publicId, String systemId)
throws IOException, SAXException
{
String orig = systemId;
int lastslash = systemId.lastIndexOf('/');
if( lastslash>=0 )
{
String name = orig.substring(lastslash+1);
String res = "/org/omegat/filters2/javahelp/resources/"+name;
InputStream stream = getClass().getResourceAsStream(res);
return new InputSource(stream);
}
return null;
}
/** The older {@link #resolveEntity} method is overridden to call this one. */
public InputSource resolveEntity(String name, String publicId, String baseURI, String systemId)
throws SAXException, IOException
{
return resolveEntity(publicId, systemId);
}
/** Receive notification of ignorable whitespace in element content.*/
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
{
if(!weAreInEntity)
write(ch, start, length);
}
/** Receive notification of the beginning of the document. */
public void startDocument() throws SAXException
{
write("\n");
}
/** Receive notification of the comments in XML file. */
public void comment(char[] ch, int start, int length) throws SAXException
{
if (!weAreInEntity)
{
write("");
}
}
public void startDTD(String name, String publicId, String systemId) throws SAXException
{
if(!weAreInEntity)
{
write("\n\n");
}
}
boolean weAreInEntity = false;
String entityName;
public void startEntity(String name) throws SAXException
{
weAreInEntity = true;
entityName = name;
}
public void endEntity(String name) throws SAXException
{
if (entityName.equals(name))
weAreInEntity = false;
}
public void endDocument() throws SAXException
{
super.endDocument();
}
}
omegat-2.3.0.1+dfsg/addons/nbedge-filter/ 0000775 0000000 0000000 00000000000 11615346516 0020035 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/nbedge-filter/build.xml 0000664 0000000 0000000 00000001101 11615346516 0021647 0 ustar 00root root 0000000 0000000
Builds, tests, and runs the project nbedge-filter.
omegat-2.3.0.1+dfsg/addons/nbedge-filter/manifest.mf 0000664 0000000 0000000 00000000162 11615346516 0022166 0 ustar 00root root 0000000 0000000 Manifest-Version: 1.0
OmegaT-Plugin: true
Name: org.omegat.filters2.xml.edge.NBEdgeFilter
OmegaT-Filter: true omegat-2.3.0.1+dfsg/addons/nbedge-filter/nbproject/ 0000775 0000000 0000000 00000000000 11615346516 0022023 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/nbedge-filter/nbproject/build-impl.xml 0000664 0000000 0000000 00000056346 11615346516 0024621 0 ustar 00root root 0000000 0000000
Must set src.dir
Must set build.dir
Must set dist.dir
Must set build.classes.dir
Must set dist.javadoc.dir
Must set build.test.classes.dir
Must set build.test.results.dir
Must set build.classes.excludes
Must set dist.jar
Must select some files in the IDE or set javac.includes
Must select one file in the IDE or set run.class
Must select one file in the IDE or set debug.class
Must set fix.includes
Must select some files in the IDE or set javac.includes
Some tests failed; see details above.
Must select some files in the IDE or set test.includes
Some tests failed; see details above.
Must select one file in the IDE or set test.class
Must select one file in the IDE or set applet.url
Must select one file in the IDE or set applet.url
omegat-2.3.0.1+dfsg/addons/nbedge-filter/nbproject/genfiles.properties 0000664 0000000 0000000 00000000707 11615346516 0025741 0 ustar 00root root 0000000 0000000 build.xml.data.CRC32=d67b6303
build.xml.script.CRC32=3daf673e
build.xml.stylesheet.CRC32=e2435cb5
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=1520cbf5
nbproject/build-impl.xml.script.CRC32=b0d9e943
nbproject/build-impl.xml.stylesheet.CRC32=3b89b5a6
omegat-2.3.0.1+dfsg/addons/nbedge-filter/nbproject/project.properties 0000664 0000000 0000000 00000003524 11615346516 0025613 0 ustar 00root root 0000000 0000000 application.args=
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/nbedge-filter.jar
dist.javadoc.dir=${dist.dir}/javadoc
file.reference.nbedge-filter-src=src
jar.compress=false
javac.classpath=\
${reference.OmegaT.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.source=${default.javac.source}
javac.target=${default.javac.target}
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
${libs.junit.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
main.class=
manifest.file=manifest.mf
no.dependencies=true
platform.active=default_platform
project.OmegaT=../../../omegat
reference.OmegaT.jar=${project.OmegaT}/dist/OmegaT.jar
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
# or test-sys-prop.name=value to set system properties for unit tests):
run.jvmargs=
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
src.dir=${file.reference.nbedge-filter-src}
omegat-2.3.0.1+dfsg/addons/nbedge-filter/nbproject/project.xml 0000664 0000000 0000000 00000001657 11615346516 0024224 0 ustar 00root root 0000000 0000000
org.netbeans.modules.java.j2seproject
nbedge-filter
1.6
OmegaT
jar
jar
clean
jar
omegat-2.3.0.1+dfsg/addons/nbedge-filter/src/ 0000775 0000000 0000000 00000000000 11615346516 0020624 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/nbedge-filter/src/org/ 0000775 0000000 0000000 00000000000 11615346516 0021413 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/nbedge-filter/src/org/omegat/ 0000775 0000000 0000000 00000000000 11615346516 0022667 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/nbedge-filter/src/org/omegat/filters2/ 0000775 0000000 0000000 00000000000 11615346516 0024421 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/nbedge-filter/src/org/omegat/filters2/xml/ 0000775 0000000 0000000 00000000000 11615346516 0025221 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/nbedge-filter/src/org/omegat/filters2/xml/edge/ 0000775 0000000 0000000 00000000000 11615346516 0026125 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/nbedge-filter/src/org/omegat/filters2/xml/edge/NBEdgeFilter.java 0000664 0000000 0000000 00000006433 11615346516 0031230 0 ustar 00root root 0000000 0000000 /*
* NBEdgeFilter.java
* Created on 27 April 2005
* Last modified on 8 October 2005
*
* License: Public Domain
* Author: Maxym Mykhalchuk
*/
package org.omegat.filters2.xml.edge;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import org.omegat.filters2.Instance;
import org.omegat.filters2.xml.DefaultEntityFilter;
import org.omegat.filters2.xml.XMLAbstractFilter;
import org.omegat.filters2.xml.XMLWriter;
import org.omegat.filters2.xml.XMLReader;
/**
* Filter for NetBeans EDGE Newsletter.
*
* Is an example of filter plugin for OmegaT.
*
* @author Maxym Mykhalchuk
*/
public class NBEdgeFilter extends XMLAbstractFilter
{
/** Creates a new instance of NBEdgeFilter */
public NBEdgeFilter()
{
defineFormatTag("a", "a");
defineFormatTag("abbr", "abbr");
defineFormatTag("acronym", "acronym");
defineFormatTag("b", "b");
defineFormatTag("big", "big");
defineFormatTag("code", "code");
defineFormatTag("cite", "cite");
defineFormatTag("em", "em");
defineFormatTag("font", "f");
defineFormatTag("i", "i");
defineFormatTag("kbd", "k");
defineFormatTag("samp", "samp");
defineFormatTag("strike", "strike");
defineFormatTag("s", "s");
defineFormatTag("small", "small");
defineFormatTag("span", "span");
defineFormatTag("sub", "sub");
defineFormatTag("sup", "sup");
defineFormatTag("strong", "strong");
defineFormatTag("tt", "tt");
defineFormatTag("u", "u");
defineFormatTag("var", "var");
setEntityFilter(new DefaultEntityFilter());
}
/**
* Whether target encoding can be varied by the user.
*/
public boolean isTargetEncodingVariable()
{
return false;
}
/**
* Whether source encoding can be varied by the user.
*/
public boolean isSourceEncodingVariable()
{
return true;
}
/**
* Human-readable name of the File Format this filter supports.
*/
public String getFileFormatName()
{
return "NetBeans EDGE Newsletters";
}
/**
* The default list of filter instances that this filter class has.
*/
public Instance[] getDefaultInstances()
{
return new Instance[]
{
new Instance("*.xml", null, null,
TFP_NAMEONLY+"_"+TFP_TARGET_LOCALE+"."+TFP_EXTENSION),
};
}
/**
* Creates a reader of an input file.
*/
public BufferedReader createReader(java.io.File infile, String encoding)
throws UnsupportedEncodingException, IOException
{
return new BufferedReader(new XMLReader(infile.getAbsolutePath(), encoding));
}
/**
* Creates a writer of the translated file.
*/
public BufferedWriter createWriter(File outfile, String encoding)
throws UnsupportedEncodingException, IOException
{
return new BufferedWriter(new XMLWriter(outfile.getAbsolutePath(), "UTF-8"));
}
}
omegat-2.3.0.1+dfsg/addons/properties-import/ 0000775 0000000 0000000 00000000000 11615346516 0021032 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/properties-import/build.xml 0000664 0000000 0000000 00000001434 11615346516 0022655 0 ustar 00root root 0000000 0000000
Builds, tests, and runs the project properties-import.
omegat-2.3.0.1+dfsg/addons/properties-import/gpl-2.0.txt 0000664 0000000 0000000 00000043626 11615346516 0022665 0 ustar 00root root 0000000 0000000 GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
omegat-2.3.0.1+dfsg/addons/properties-import/manifest.mf 0000664 0000000 0000000 00000000164 11615346516 0023165 0 ustar 00root root 0000000 0000000 Manifest-Version: 1.0
Class-Path: lib/lib-mnemonics.jar
Main-Class: org.omegat.tools.align.bundles.ImportBundles
omegat-2.3.0.1+dfsg/addons/properties-import/nbproject/ 0000775 0000000 0000000 00000000000 11615346516 0023020 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/properties-import/nbproject/build-impl.xml 0000664 0000000 0000000 00000056370 11615346516 0025613 0 ustar 00root root 0000000 0000000
Must set src.dir
Must set build.dir
Must set dist.dir
Must set build.classes.dir
Must set dist.javadoc.dir
Must set build.test.classes.dir
Must set build.test.results.dir
Must set build.classes.excludes
Must set dist.jar
Must select some files in the IDE or set javac.includes
Must select one file in the IDE or set run.class
Must select one file in the IDE or set debug.class
Must set fix.includes
Must select some files in the IDE or set javac.includes
Some tests failed; see details above.
Must select some files in the IDE or set test.includes
Some tests failed; see details above.
Must select one file in the IDE or set test.class
Must select one file in the IDE or set applet.url
Must select one file in the IDE or set applet.url
omegat-2.3.0.1+dfsg/addons/properties-import/nbproject/genfiles.properties 0000664 0000000 0000000 00000000707 11615346516 0026736 0 ustar 00root root 0000000 0000000 build.xml.data.CRC32=a78e934c
build.xml.script.CRC32=7acbf7b6
build.xml.stylesheet.CRC32=e2435cb5
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=c748df97
nbproject/build-impl.xml.script.CRC32=8069193c
nbproject/build-impl.xml.stylesheet.CRC32=3b89b5a6
omegat-2.3.0.1+dfsg/addons/properties-import/nbproject/project.properties 0000664 0000000 0000000 00000003647 11615346516 0026616 0 ustar 00root root 0000000 0000000 javac.debug=true
application.args=
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=properties-import.jar
dist.javadoc.dir=${dist.dir}/javadoc
file.reference.properties-import-src=src
jar.compress=false
javac.classpath=\
${reference.lib-mnemonics.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.source=${default.javac.source}
javac.target=${default.javac.target}
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
${libs.junit.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
main.class=org.omegat.tools.align.bundles.ImportBundles
manifest.file=manifest.mf
platform.active=default_platform
project.lib-mnemonics=../../lib-mnemonics
reference.lib-mnemonics.jar=${project.lib-mnemonics}/dist/lib-mnemonics.jar
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
# or test-sys-prop.name=value to set system properties for unit tests):
run.jvmargs=
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
src.dir=${file.reference.properties-import-src}
omegat-2.3.0.1+dfsg/addons/properties-import/nbproject/project.xml 0000664 0000000 0000000 00000001672 11615346516 0025216 0 ustar 00root root 0000000 0000000
org.netbeans.modules.java.j2seproject
properties-import
1.6
lib-mnemonics
jar
jar
clean
jar
omegat-2.3.0.1+dfsg/addons/properties-import/readme.txt 0000664 0000000 0000000 00000001576 11615346516 0023041 0 ustar 00root root 0000000 0000000 .properties Import 1.4 ReadMe file
This import tool supplements OmegaT in the following way:
If there's an existing translation of Java application, usually done using
Java(TM) Resource Bundles (.properties files), then in order not to loose the
existing work, while migrating to OmegaT, translator is given an opportunity
to import his work into OmegaT-compatible TMX file.
To run from a terminal or DOS window, change to this directory
and type
java -jar properties_import.jar
The sources are supplied inside the OmegaT sources distribution.
----------------------------------------------------------------------
version 1.4_1: Corrected the Japanese localization
version 1.4: Added the Japanese localization
Version 1.3: Fixed a filecase bug (occuring only on Unixes)
Version 1.2: Make it look nicer
Version 1.1: Some bugs fixed
Verison 1.0: Initial release
omegat-2.3.0.1+dfsg/addons/properties-import/src/ 0000775 0000000 0000000 00000000000 11615346516 0021621 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/properties-import/src/org/ 0000775 0000000 0000000 00000000000 11615346516 0022410 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/properties-import/src/org/omegat/ 0000775 0000000 0000000 00000000000 11615346516 0023664 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/properties-import/src/org/omegat/tools/ 0000775 0000000 0000000 00000000000 11615346516 0025024 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/properties-import/src/org/omegat/tools/align/ 0000775 0000000 0000000 00000000000 11615346516 0026116 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/properties-import/src/org/omegat/tools/align/bundles/ 0000775 0000000 0000000 00000000000 11615346516 0027552 5 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/properties-import/src/org/omegat/tools/align/bundles/Bundle.properties 0000664 0000000 0000000 00000004330 11615346516 0033101 0 ustar 00root root 0000000 0000000 #/**************************************************************************
# OmegaT Addon - Import of legacy translations of Java(TM) Resource Bundles
# Copyright (C) 2004-05 Maxym Mykhalchuk
# mihmax@gmail.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#**************************************************************************/
#
# Resources file for Properties Import Tool
#
# @author Maxym Mykhalchuk
# @version 1.3
#
# ImportBundles
IB_TITLE=Legacy Java\u2122 Resource Bundles Import
IB_DESCRIPTION=\
Here you may import existing translation from .properties files.\n\
In order to use this importer you need to have both original and translated \
bundles in the same folder and with names of the form .properties \
and _xx_YY.properties, where xx is the language code and YY is \
the optional country code.
IB_BUTTON_IMPORT=&Import
IB_SOURCE_LANGUAGE_LABEL=Language of the default bundle\:
IB_TARGET_LANGUAGE_LABEL=Localization language:
IB_RESOURCES_LABEL=Folder with resource bundles:
IB_NOTE_RECURSIVE=Note: This folder will be scanned recursively
IB_LEGACYTMX_LABEL=Where to save the TMX file:
IB_TMX_FILES=TMX Files (.tmx)
IB_STATUS_IMPORTING=Importing...
IB_STATUS_COMPLETE=Importing complete
IB_STATUS_ERROR=Error while importing
IB_LEGACYFOLDER_BROWSE_BUTTON=&Browse...
IB_LEGACYTMX_BROWSE_BUTTON=B&rowse...
IB_DEFAULT_SRC_LANG=en-US
IB_DEFAULT_TAR_LANG=fr-CA
IB_BUTTON_CLOSE=&Close
IB_CANNOT_INIT_LF=Cannot Init Look and Feel
BundleImportCore.java 0000664 0000000 0000000 00000003271 11615346516 0033556 0 ustar 00root root 0000000 0000000 omegat-2.3.0.1+dfsg/addons/properties-import/src/org/omegat/tools/align/bundles /**************************************************************************
OmegaT Addon - Import of legacy translations of Java(TM) Resource Bundles
Copyright (C) 2004-05 Maxym Mykhalchuk
mihmax@gmail.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**************************************************************************/
package org.omegat.tools.align.bundles;
import java.io.IOException;
import org.omegat.util.Language;
/**
* The main static launch point
*
* @author Maxym Mykhalchuk
*/
public class BundleImportCore
{
public static void doImport(String sourcelang, String targetlang, String folder, String tmxfile) throws IOException
{
Language source = new Language(sourcelang);
Language target = new Language(targetlang);
TMXSaver saver = new TMXSaver(source.getLanguage(), target.getLanguage(), tmxfile);
FolderScanner scanner = new FolderScanner(folder, target.getLocale(), saver);
scanner.scan();
saver.save();
}
}
omegat-2.3.0.1+dfsg/addons/properties-import/src/org/omegat/tools/align/bundles/Bundle_ja.properties0000664 0000000 0000000 00000006467 11615346516 0033570 0 ustar 00root root 0000000 0000000 #/**************************************************************************
# OmegaT Addon - Import of legacy translations of Java(TM) Resource Bundles
# Copyright (C) 2004-05 Maxym Mykhalchuk
# mihmax@gmail.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#**************************************************************************/
#
# Resources file for Properties Import Tool
#
# @author Maxym Mykhalchuk
# @version 1.3
#
# ImportBundles
IB_TITLE=Legacy Java\u2122 Resource Bundles \u30a4\u30f3\u30dd\u30fc\u30c8\u30c4\u30fc\u30eb
IB_DESCRIPTION=\u3053\u306e\u30c4\u30fc\u30eb\u3092\u4f7f\u7528\u3059\u308b\u3068, \u65e2\u5b58\u306e.properties\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u7ffb\u8a33\u6587\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3066\u7ffb\u8a33\u30e1\u30e2\u30ea(.tmx)\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059.\n\u540c\u3058\u30d5\u30a9\u30eb\u30c0\u306b\u539f\u8a9e\u3068\u7ffb\u8a33\u5f8c\u306e\u8a00\u8a9e\u306b\u5bfe\u5fdc\u3057\u305f.properties\u30d5\u30a1\u30a4\u30eb\u3092\u7f6e\u304d, \u30d5\u30a1\u30a4\u30eb\u540d\u3092\u305d\u308c\u305e\u308c\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u307e\u3059: [ \u539f\u8a9e: .properties / \u7ffb\u8a33\u5f8c\u306e\u8a00\u8a9e: _xx_YY.properties ] \u00a5n xx \u306f\u8a00\u8a9e\u30b3\u30fc\u30c9(en\u3084ja\u306a\u3069)\u3001YY\u306f\u56fd\u30b3\u30fc\u30c9(FR\u3084JP\u306a\u3069, \u5fc5\u8981\u306a\u5834\u5408)\u3092\u8868\u3057\u307e\u3059.
IB_BUTTON_IMPORT=\u30a4\u30f3\u30dd\u30fc\u30c8(&I)
IB_SOURCE_LANGUAGE_LABEL=\u7ffb\u8a33\u5143\u306e\u8a00\u8a9e:
IB_TARGET_LANGUAGE_LABEL=\u7ffb\u8a33\u5f8c\u306e\u8a00\u8a9e:
IB_RESOURCES_LABEL=.properties\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308b\u30d5\u30a9\u30eb\u30c0:
IB_NOTE_RECURSIVE=\u203b\u5b50\u30d5\u30a9\u30eb\u30c0\u3082\u691c\u7d22\u3057\u307e\u3059
IB_LEGACYTMX_LABEL=.tmx\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3059\u308b\u30d5\u30a9\u30eb\u30c0\u3068\u30d5\u30a1\u30a4\u30eb\u540d
IB_TMX_FILES=\u7ffb\u8a33\u30e1\u30e2\u30ea\u30d5\u30a1\u30a4\u30eb (.tmx)
IB_STATUS_IMPORTING=\u30a4\u30f3\u30dd\u30fc\u30c8\u4e2d...
IB_STATUS_COMPLETE=\u30a4\u30f3\u30dd\u30fc\u30c8\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f
IB_STATUS_ERROR=\u30a4\u30f3\u30dd\u30fc\u30c8\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f
IB_LEGACYFOLDER_BROWSE_BUTTON=\u53c2\u7167(&B)...
IB_LEGACYTMX_BROWSE_BUTTON=\u53c2\u7167(&r)...
IB_DEFAULT_SRC_LANG=en-US
IB_DEFAULT_TAR_LANG=ja
IB_BUTTON_CLOSE=\u9589\u3058\u308b(&C)
IB_CANNOT_INIT_LF=\u30eb\u30c3\u30af&\u30d5\u30a3\u30fc\u30eb\u3092\u521d\u671f\u5316\u3067\u304d\u307e\u305b\u3093
omegat-2.3.0.1+dfsg/addons/properties-import/src/org/omegat/tools/align/bundles/FileScanner.java 0000664 0000000 0000000 00000005436 11615346516 0032616 0 ustar 00root root 0000000 0000000 /**************************************************************************
OmegaT Addon - Import of legacy translations of Java(TM) Resource Bundles
Copyright (C) 2004-05 Maxym Mykhalchuk
mihmax@gmail.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**************************************************************************/
package org.omegat.tools.align.bundles;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Enumeration;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;
/**
* Class that scans Bundle.properties / Bundle_ru.properties pairs
* and passes found legacy translations to TMXSaver.
*
* @author Maxym Mykhalchuk
*/
public class FileScanner
{
private String filename, locale;
private TMXSaver saver;
/** Creates a new instance of FileScanner */
public FileScanner(String filename, String locale, TMXSaver saver)
{
this.filename = filename;
this.locale = locale;
this.saver = saver;
}
public void scan() throws IOException
{
String name = filename.substring(0, filename.lastIndexOf('.'));
String locfilename = name + '_' + locale + ".properties";
ResourceBundle parent = new PropertyResourceBundle(new FileInputStream(filename));
ResourceBundle bundle;
try
{
bundle = new PropertyResourceBundle(new FileInputStream(locfilename));
}
catch( IOException ioe )
{
return;
}
Enumeration keys = bundle.getKeys();
while( keys.hasMoreElements() )
{
String key = (String) keys.nextElement();
try
{
String locvalue = bundle.getString(key);
String srcvalue = parent.getString(key);
saver.add(srcvalue, locvalue);
}
catch( MissingResourceException mre )
{
mre.printStackTrace();
}
}
}
}
omegat-2.3.0.1+dfsg/addons/properties-import/src/org/omegat/tools/align/bundles/FolderScanner.java 0000664 0000000 0000000 00000005761 11615346516 0033153 0 ustar 00root root 0000000 0000000 /**************************************************************************
OmegaT Addon - Import of legacy translations of Java(TM) Resource Bundles
Copyright (C) 2004-05 Maxym Mykhalchuk
mihmax@gmail.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**************************************************************************/
package org.omegat.tools.align.bundles;
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
/**
* Class that recursively scans the directories and
* passes found files for scan with FileScanner.
*
* @author Maxym Mykhalchuk
*/
public class FolderScanner
{
private String folder;
private String locale;
private TMXSaver saver;
/** Creates a new instance of FolderScanner */
public FolderScanner(String folder, String locale, TMXSaver saver)
{
this.folder = folder;
this.locale = locale;
this.saver = saver;
}
public void scan() throws IOException
{
final File thisfolder = new File(folder);
File childfolders[] = thisfolder.listFiles(new FileFilter()
{
public boolean accept(File pathname)
{
return pathname.isDirectory();
}
}
);
for(int i=0; i