Fix translation loader on mac, updated Dutch translations

This commit is contained in:
Mark Watkins 2014-04-05 19:00:06 +10:00
parent 7c8eb35afd
commit b303d5816c
10 changed files with 4406 additions and 11182 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -3570,9 +3570,8 @@ void gGraphView::mouseMoveEvent(QMouseEvent * event)
for (int i=m_graph_index-1;i>=0;i--) {
if (m_graphs[i]->isPinned()!=m_graphs[m_graph_index]->isPinned()) {
m_graph_dragging=false;
// fix cursor
break;
continue;
}
empty=m_graphs[i]->isEmpty() || (!m_graphs[i]->visible());
// swapping upwards.
@ -3597,9 +3596,9 @@ void gGraphView::mouseMoveEvent(QMouseEvent * event)
//qDebug() << "Graph Reorder" << m_graph_index;
for (int i=m_graph_index+1;i<m_graphs.size();i++) {
if (m_graphs[i]->isPinned()!=m_graphs[m_graph_index]->isPinned()) {
m_graph_dragging=false;
//m_graph_dragging=false;
// fix cursor
break;
continue;
}
empty=m_graphs[i]->isEmpty() || (!m_graphs[i]->visible());
p=m_graphs[m_graph_index];

View File

@ -186,8 +186,9 @@ int main(int argc, char *argv[])
lang_layout.addWidget(&lang_combo,1);
lang_layout.addWidget(&lang_okbtn);
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
QString transdir=QDir::cleanPath(QCoreApplication::applicationDirPath()+"/../Resources/Translations/");
#else
const QString transdir=QCoreApplication::applicationDirPath()+"/Translations/";
#endif
@ -236,7 +237,11 @@ int main(int argc, char *argv[])
qDebug() << "Loading " << langname << " Translation" << langfile << "from" << transdir;
QTranslator translator;
translator.load(langfile,transdir);
if (!translator.load(langfile,transdir)) {
qDebug() << "Could not load translation" << langfile << "reverting to english :(";
}
a.installTranslator(&translator);
initializeStrings(); // Important, call this AFTER translator is installed.

View File

@ -96,6 +96,7 @@ Overview::Overview(QWidget *parent,gGraphView * shared) :
else
AHI=createGraph(STR_TR_AHI,tr("Apnea\nHypopnea\nIndex"));
UC=createGraph(tr("Usage"),tr("Usage\n(hours)"));
FL=createGraph(STR_TR_FlowLimit,STR_TR_FlowLimit);
@ -276,6 +277,9 @@ Overview::Overview(QWidget *parent,gGraphView * shared) :
SET->setRecMinY(0);
//SET->setRecMaxY(5);
AHI->setPinned(true);
}
Overview::~Overview()
{

View File

@ -219,8 +219,8 @@ win32 {
}
mac {
TransFiles.files = $$files(../Translations/*.qm)
TransFiles.path = Contents/Resources/Translations
TransFiles.files = $$files($$PWD/../Translations/*.qm)
TransFiles.path = ./Contents/Resources/Translations
QMAKE_BUNDLE_DATA += TransFiles
}