Added Spanish translation

Changed the handling of FileView columns
FileView column order and sizes is now persisted in the settings






FossilOrigin-Name: 87b7bd70eec27bd136f17432d98dd313282fc3d1
This commit is contained in:
kostas 2012-12-15 10:50:34 +00:00
parent cba8c864b8
commit ca462c5ecd
7 changed files with 1315 additions and 54 deletions

View File

@ -68,6 +68,9 @@ CODECFORTR = UTF-8
TRANSLATIONS += \
intl/en_US.ts \
intl/el_GR.ts
intl/el_GR.ts \
intl/de_DE.ts \
intl/es_ES.ts

1237
intl/es_ES.ts Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +1,16 @@
C Added\sGerman\stranslation\n
D 2012-12-10T12:05:23.342
C Added\sSpanish\stranslation\nChanged\sthe\shandling\sof\sFileView\scolumns\nFileView\scolumn\sorder\sand\ssizes\sis\snow\spersisted\sin\sthe\ssettings\n\n\n\n\n
D 2012-12-15T10:50:34.083
F dist/arch/PKGBUILD dd21073c035af4e6a4ecb3842c1fd7ae45c5e93d
F dist/win/fuel.iss ef3558dbba409eb194938b930377fc9ee27d319e
F doc/Building.txt 7c0f1060d4a08ed330058d4a3a68905c05228381
F doc/Changes.txt f2999c99053d2bf2aeaaba5504eb96e228dbac58
F doc/License.txt 4cc77b90af91e615a64ae04893fdffa7939db84c
F fuel.pro e90e7f9bfba35668673bc45bd226f39225170282
F fuel.pro 3374e40d77a366de63f35f0c3bf48eb61ecbc979
F intl/convert.sh 5694496585ff5f4363c90ff8b6f48e19e0b6b4aa x
F intl/de_DE.ts 82873d85b3df5b204d6c41aa666ef88dd60583aa
F intl/el_GR.ts e7ba75d373804b715d23b86d289fb7b556079889
F intl/en_US.ts f403c29d85d104a3c64f8194bed4d995fcb458f2
F intl/es_ES.ts cbecdafbcfbb02dfd0ec72147347b496bab84d91
F intl/update.sh b5312e108eec47f9c8cb7d6790c57335e6b52829 x
F rsrc/fuel.desktop 43145556bc61f5a91b497c38a16aec44af271d29
F rsrc/fuel.rc 8e9ac966f283102c11a77cd7f936cdc09e09bd79
@ -168,7 +169,7 @@ F rsrc/icons/Zoom-01.png 67ca532922e9166325c5c75fce1ca3fbb0d2b6a6
F rsrc/icons/fuel.icns 81e535004b62db801a02f3e15d0a33afc9d4070b
F rsrc/icons/fuel.ico eb529ab3332a17b9302ef3e851db5b9ebce2a038
F rsrc/icons/fuel.png 40daf53b7f6bdcdd0d6aa5ef433d078ec5ea4342
F rsrc/resources.qrc 8fd65286d8d50bcaf392c92badc9faadb474ee86
F rsrc/resources.qrc 64f1e9ab75d3631ad65fac5c0653839e0cdda979
F src/CloneDialog.cpp 85bc6473d1e3a47d0f981e96357a376be63ab0bc
F src/CloneDialog.h 1c63da4346ca20b67d52016b7b64875b9c5b477f
F src/CommitDialog.cpp c62ce7fb234e43ca8641c16522c750e6419bf947
@ -179,9 +180,9 @@ F src/FileTableView.cpp 5ddf8c391c9a3ac449ec61fb1db837b577afeec2
F src/FileTableView.h 03e56d87c2d46411b9762b87f4d301619aaf18df
F src/LoggedProcess.cpp 2a1e5c94bc1e57c8984563e66c210e43a14dc60c
F src/LoggedProcess.h 85df7c635c807a5a0e8c4763f17a0752aaff7261
F src/MainWindow.cpp 1bf137068f79d3a1845c2911d4b6fab83dc8fb9c
F src/MainWindow.cpp e46c31b692b3d072a5f80aab9b910ab4524257f8
F src/MainWindow.h 3f3825cab25058666b6706b36f51269ad5f65f3e
F src/SettingsDialog.cpp 77f658e84f078a0155f33c260d0d0b15ed7360cb
F src/SettingsDialog.cpp 66e8ad0a01c58cd29f397d74f46274021abe34b8
F src/SettingsDialog.h d37dde23f698fbe6182b2e14234104a15468be3d
F src/Utils.cpp caca5268e3194abe77211040bf9511a82909d2e6
F src/Utils.h 5af911147390879176e587fc60fb662490bb9e97
@ -192,7 +193,7 @@ F ui/CommitDialog.ui 6200f6cabdcf40a20812e811be28e0793f82516f
F ui/FileActionDialog.ui 89bb4dc2d0b8adcd41adcb11ec65f2028a09a12d
F ui/MainWindow.ui 998f26c6fe75bd655cf3d4f0073e67dc0bf3b3d7
F ui/SettingsDialog.ui 7f578450cf01d6786ff2d91a2142505192446e3f
P f12aab3a403d0a1cab42eec7ddb476dd47cb5da3
R 7bd397fc75c54f40319d22d40f72d194
P 33305fed1383ad01dd5d66ef4cf379956508b0c8
R a1ac056afe9f31b4aa8bb64f43ff42ac
U kostas
Z b56973c86d77fcf3f468ad1873c85149
Z 520d9618aa62a70c2f7ef5b438253c9f

View File

@ -1 +1 @@
33305fed1383ad01dd5d66ef4cf379956508b0c8
87b7bd70eec27bd136f17432d98dd313282fc3d1

View File

@ -155,5 +155,6 @@
<qresource prefix="/intl">
<file>intl/el_GR.qm</file>
<file>intl/de_DE.qm</file>
<file>intl/es_ES.qm</file>
</qresource>
</RCC>

View File

@ -133,6 +133,16 @@ MainWindow::MainWindow(Settings &_settings, QWidget *parent, QString *workspaceP
SLOT( onFileViewDragOut() ),
Qt::DirectConnection );
QStringList header;
header << tr("Status") << tr("File") << tr("Ext") << tr("Modified") << tr("Path");
repoFileModel.setHorizontalHeaderLabels(header);
repoFileModel.horizontalHeaderItem(COLUMN_STATUS)->setTextAlignment(Qt::AlignCenter);
// Needed on OSX as the preset value from the GUI editor is not always reflected
ui->tableView->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
ui->tableView->horizontalHeader()->setMovable(true);
ui->tableView->horizontalHeader()->setStretchLastSection(true);
// TreeView
ui->treeView->setModel(&repoDirModel);
connect( ui->treeView->selectionModel(),
@ -851,31 +861,18 @@ void MainWindow::updateDirView()
//------------------------------------------------------------------------------
void MainWindow::updateFileView()
{
// File View
repoFileModel.clear();
// Clear content except headers
repoFileModel.removeRows(1, repoFileModel.rowCount()-1);
QStringList header;
header << tr("S") << tr("File") << tr("Ext") << tr("Modified");
bool multiple_dirs = selectedDirs.count()>1;
bool show_path = viewMode==VIEWMODE_LIST || multiple_dirs;
if(show_path)
header << tr("Path");
repoFileModel.setHorizontalHeaderLabels(header);
repoFileModel.horizontalHeaderItem(COLUMN_STATUS)->setTextAlignment(Qt::AlignCenter);
struct { RepoFile::EntryType type; const char *tag; const char *tooltip; const char *icon; }
struct { RepoFile::EntryType type; QString text; const char *icon; }
stats[] =
{
{ RepoFile::TYPE_EDITTED, "E", "Edited", ":icons/icons/Button Blank Yellow-01.png" },
{ RepoFile::TYPE_UNCHANGED, "U", "Unchanged", ":icons/icons/Button Blank Green-01.png" },
{ RepoFile::TYPE_ADDED, "A", "Added", ":icons/icons/Button Add-01.png" },
{ RepoFile::TYPE_DELETED, "D", "Deleted", ":icons/icons/Button Close-01.png" },
{ RepoFile::TYPE_RENAMED, "R", "Renamed", ":icons/icons/Button Reload-01.png" },
{ RepoFile::TYPE_MISSING, "M", "Missing", ":icons/icons/Button Help-01.png" },
{ RepoFile::TYPE_EDITTED, tr("Edited"), ":icons/icons/Button Blank Yellow-01.png" },
{ RepoFile::TYPE_UNCHANGED, tr("Unchanged"), ":icons/icons/Button Blank Green-01.png" },
{ RepoFile::TYPE_ADDED, tr("Added"), ":icons/icons/Button Add-01.png" },
{ RepoFile::TYPE_DELETED, tr("Deleted"), ":icons/icons/Button Close-01.png" },
{ RepoFile::TYPE_RENAMED, tr("Renamed"), ":icons/icons/Button Reload-01.png" },
{ RepoFile::TYPE_MISSING, tr("Missing"), ":icons/icons/Button Help-01.png" },
};
QFileIconProvider icon_provider;
@ -891,36 +888,29 @@ void MainWindow::updateFileView()
continue;
// Status Column
const char *tag = "?"; // Default Tag
const char *tooltip = "Unknown";
const char *status_icon= ":icons/icons/Button Blank Gray-01.png"; // Default icon
QString status_text = QString(tr("Unknown"));
const char *status_icon_path= ":icons/icons/Button Blank Gray-01.png"; // Default icon
for(size_t t=0; t<COUNTOF(stats); ++t)
{
if(e.getType() == stats[t].type)
{
tag = stats[t].tag;
tooltip = stats[t].tooltip;
status_icon = stats[t].icon;
status_text = stats[t].text;
status_icon_path = stats[t].icon;
break;
}
}
QStandardItem *status = new QStandardItem(QIcon(status_icon), tag);
status->setToolTip(tooltip);
QStandardItem *status = new QStandardItem(QIcon(status_icon_path), status_text);
status->setToolTip(status_text);
repoFileModel.setItem(item_id, COLUMN_STATUS, status);
QFileInfo finfo = e.getFileInfo();
QIcon icon = icon_provider.icon(finfo);
QStandardItem *filename_item = 0;
if(show_path)
{
repoFileModel.setItem(item_id, COLUMN_PATH, new QStandardItem(path));
filename_item = new QStandardItem(icon, QDir::toNativeSeparators(e.getFilePath()));
}
else // In Tree mode the path is implicit so the file name is enough
filename_item = new QStandardItem(icon, e.getFilename());
repoFileModel.setItem(item_id, COLUMN_PATH, new QStandardItem(path));
filename_item = new QStandardItem(icon, QDir::toNativeSeparators(e.getFilePath()));
Q_ASSERT(filename_item);
// Keep the path in the user data
@ -933,12 +923,7 @@ void MainWindow::updateFileView()
++item_id;
}
ui->tableView->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
ui->tableView->resizeColumnsToContents();
ui->tableView->horizontalHeader()->setMovable(true);
ui->tableView->resizeRowsToContents();
// Needed on OSX as the preset value from the GUI editor is not always reflected
ui->tableView->horizontalHeader()->setStretchLastSection(true);
}
//------------------------------------------------------------------------------
@ -1303,6 +1288,27 @@ void MainWindow::applySettings()
}
store->endArray();
store->beginReadArray("FileColumns");
for(int i=0; i<repoFileModel.columnCount(); ++i)
{
store->setArrayIndex(i);
if(store->contains("Width"))
{
int width = store->value("Width").toInt();
ui->tableView->setColumnWidth(i, width);
}
if(store->contains("Index"))
{
int index = store->value("Index").toInt();
int cur_index = ui->tableView->horizontalHeader()->visualIndex(i);
ui->tableView->horizontalHeader()->moveSection(cur_index, index);
}
}
store->endArray();
if(store->contains("WindowX") && store->contains("WindowY"))
{
QPoint _pos;
@ -1357,6 +1363,16 @@ void MainWindow::updateSettings()
}
store->endArray();
store->beginWriteArray("FileColumns", repoFileModel.columnCount());
for(int i=0; i<repoFileModel.columnCount(); ++i)
{
store->setArrayIndex(i);
store->setValue("Width", ui->tableView->columnWidth(i));
int index = ui->tableView->horizontalHeader()->visualIndex(i);
store->setValue("Index", index);
}
store->endArray();
store->setValue("WindowX", x());
store->setValue("WindowY", y());
store->setValue("WindowWidth", width());
@ -1941,7 +1957,9 @@ void MainWindow::on_actionAbout_triggered()
tr("Icons by Deleket - Jojo Mendoza\n"
"Available under the CC Attribution Noncommercial No Derivative 3.0 License") + "\n\n" +
tr("Translations with the help of:") + "\n"
"stayawake (German de_DE)\n" );
"stayawake (German de_DE)\n"
"djnavas (Spanish es_ES)\n"
);
}
//------------------------------------------------------------------------------

View File

@ -142,6 +142,7 @@ void SettingsDialog::on_btnClearMessageHistory_clicked()
void SettingsDialog::CreateLangMap()
{
langMap.append(LangMap("en_US", "English (US)"));
langMap.append(LangMap("es_ES", "Spanish (ES)"));
langMap.append(LangMap("de_DE", "German (DE)"));
langMap.append(LangMap("el_GR", "Greek"));
}