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

Commit

Permalink
Modify copyTrans message when author is unknown
Browse files Browse the repository at this point in the history
  • Loading branch information
seanf committed Feb 9, 2012
1 parent 9db4b05 commit 3de0c42
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -92,21 +92,21 @@ public void execute(Long docId, String project, String iterationSlug)

private String createComment(HTextFlowTarget target)
{
String authorname;
String author;
HDocument document = target.getTextFlow().getDocument();
String projectname = document.getProjectIteration().getProject().getName();
String version = document.getProjectIteration().getSlug();
String documentid = document.getDocId();
if (target.getLastModifiedBy() != null)
{
authorname = target.getLastModifiedBy().getName();
author = ", author " + target.getLastModifiedBy().getName();
}
else
{
authorname = "";
author = "";
}

return "translation auto-copied from project " + projectname + ", version " + version + ", document " + documentid + ", author " + authorname;
return "translation auto-copied from project " + projectname + ", version " + version + ", document " + documentid + author;
}

// TODO unit testing for this method
Expand Down

0 comments on commit 3de0c42

Please sign in to comment.