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

Commit

Permalink
prevent empty string from being saved as fuzzy
Browse files Browse the repository at this point in the history
  • Loading branch information
seanf committed Sep 23, 2011
1 parent 155e9df commit d2768c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Expand Up @@ -488,8 +488,12 @@ else if (cellValue.getStatus() == ContentState.New)
*/
protected void acceptFuzzyEdit()
{
cellValue.setStatus(ContentState.NeedReview);
cellValue.setTarget(textArea.getText());
String text = textArea.getText();
cellValue.setTarget(text);
if (text == null || text.isEmpty())
cellValue.setStatus(ContentState.New);
else
cellValue.setStatus(ContentState.NeedReview);
curCallback.onComplete(curCellEditInfo, cellValue);
}

Expand Down
Expand Up @@ -188,7 +188,7 @@ else if (action.getContentState() != ContentState.New && StringUtils.isEmpty(act
TransUnit tu = new TransUnit(action.getTransUnitId(), hTextFlow.getResId(),
locale, hTextFlow.getContent(),
CommentsUtil.toString(hTextFlow.getComment()),
action.getContent(), action.getContentState(),
action.getContent(), target.getState(),
authenticatedAccount.getPerson().getName(),
SIMPLE_FORMAT.format(new Date()));
// @formatter:on
Expand Down

0 comments on commit d2768c7

Please sign in to comment.