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

Commit

Permalink
allow setting of sourceLang
Browse files Browse the repository at this point in the history
  • Loading branch information
seanf committed Jun 8, 2011
1 parent 6fddd92 commit e3df2c0
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -70,8 +70,7 @@ public Set<String> findDocNames(File srcDir) throws IOException
{
String fileName = f.getPath();
String baseName = removeDotProperties(fileName);
String pathSeparator = "/";
String relativeName = PathUtil.getRelativePath(baseName, srcDir.getPath(), pathSeparator);
String relativeName = PathUtil.getRelativePath(baseName, srcDir.getPath());
localDocNames.add(relativeName);
}
return localDocNames;
Expand Down Expand Up @@ -106,7 +105,8 @@ private Resource loadResource(String docName, File propFile) throws IOException
for (String key : props.keySet())
{
String content = props.getProperty(key);
TextFlow textflow = new TextFlow(key, LocaleId.EN_US, content);
LocaleId sourceLoc = new LocaleId(opts.getSourceLang());
TextFlow textflow = new TextFlow(key, sourceLoc, content);
String comment = props.getComment(key);
if (comment != null)
{
Expand Down Expand Up @@ -146,9 +146,9 @@ private TranslationsResource loadTranslationsResource(File transFile) throws IOE
return targetDoc;
}

private String removeDotProperties(String fileName)
private String removeDotProperties(String propFileName)
{
return fileName.substring(0, fileName.length() - ".properties".length());
return propFileName.substring(0, propFileName.length() - ".properties".length());
}

@Override
Expand Down

0 comments on commit e3df2c0

Please sign in to comment.