Skip to content

Commit

Permalink
Add translatable error messages for individual file errors.
Browse files Browse the repository at this point in the history
The error messages coming out of the csync updater and were
string based before which could not be translated.
  • Loading branch information
dragotin committed Dec 4, 2013
1 parent a6dfc0a commit 861de89
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/mirall/csyncthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,21 @@ int CSyncThread::treewalkFile( TREE_WALK_FILE *file, bool remote )
// record the seen files to be able to clean the journal later
_seenFiles[item._file] = QString();

if(file->error_string) {
item._errorString = QString::fromUtf8(file->error_string);
switch(file->error_status) {
case CSYNC_STATUS_OK:
break;
case CSYNC_STATUS_INDIVIDUAL_IS_SYMLINK:
item._errorString = tr("Symbolic links are not supported in syncing.");
break;
case CSYNC_STATUS_INDIVIDUAL_IGNORE_LIST:
item._errorString = tr("File is listed on the ignore list.");
break;
case CSYNC_STATUS_INDIVIDUAL_IS_INVALID_CHARS:
item._errorString = tr("File contains invalid characters that can not be synced cross platform.");
break;
default:
Q_ASSERT("Non handled error-status");
/* No error string */
}

item._isDirectory = file->type == CSYNC_FTW_TYPE_DIR;
Expand Down

0 comments on commit 861de89

Please sign in to comment.