Merge branch 'no-rcc'

This commit is contained in:
Adriaan de Groot 2017-07-03 05:48:50 -04:00
commit 43e7ea6265
4 changed files with 13 additions and 29 deletions

View File

@ -10,16 +10,22 @@ git config --global http.sslVerify false
export QT_SELECT=5 export QT_SELECT=5
tx pull --force --source --all tx pull --force --source --all
git add --verbose lang/calamares*.ts git add --verbose lang/calamares*.ts
git commit --author='Calamares CI <groot@kde.org>' --message='[core] Automatic merge of Transifex translations' | true git commit --author='Calamares CI <groot@kde.org>' --message='[core] Automatic merge of Transifex translations' | true
# Transifex updates the PO-Created timestamp also when nothing interesting
# has happened, so drop the files which have just 1 line changed (the
# PO-Created line). This applies only to modules which use po-files.
git diff --numstat src/modules | awk '($1==1 && $2==1){print $3}' | xargs git checkout --
for MODULE_DIR in `find src/modules -maxdepth 1 -mindepth 1 -type d`; do for MODULE_DIR in `find src/modules -maxdepth 1 -mindepth 1 -type d`; do
FILES=(${MODULE_DIR}/*.py) FILES=(${MODULE_DIR}/*.py)
if [ ${#FILES[@]} -gt 0 ]; then if [ ${#FILES[@]} -gt 0 ]; then
MODULE_NAME=$(basename ${MODULE_DIR}) MODULE_NAME=$(basename ${MODULE_DIR})
if [ -d ${MODULE_DIR}/lang ]; then if [ -d ${MODULE_DIR}/lang ]; then
# Convert PO files to MO files # Convert PO files to MO files
for POFILE in `find . -name "*.po"` ; do for POFILE in `find ${MODULE_DIR} -name "*.po"` ; do
msgfmt -o ${POFILE/.po/.mo} $POFILE msgfmt -o ${POFILE/.po/.mo} $POFILE
done done
git add --verbose ${MODULE_DIR}/lang/* git add --verbose ${MODULE_DIR}/lang/*

View File

@ -7,12 +7,6 @@ macro(add_calamares_translations language)
set( calamares_i18n_qrc_content "${calamares_i18n_qrc_content}<qresource prefix=\"/lang\">\n" ) set( calamares_i18n_qrc_content "${calamares_i18n_qrc_content}<qresource prefix=\"/lang\">\n" )
foreach( lang ${CALAMARES_LANGUAGES} ) foreach( lang ${CALAMARES_LANGUAGES} )
set( calamares_i18n_qrc_content "${calamares_i18n_qrc_content}<file>calamares_${lang}.qm</file>\n" ) set( calamares_i18n_qrc_content "${calamares_i18n_qrc_content}<file>calamares_${lang}.qm</file>\n" )
if( NOT lang STREQUAL "en" AND EXISTS ${QT_TRANSLATIONS_DIR}/qt_${lang}.qm )
file( COPY ${QT_TRANSLATIONS_DIR}/qt_${lang}.qm DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
set( calamares_i18n_qrc_content "${calamares_i18n_qrc_content}<file>qt_${lang}.qm</file>\n" )
endif()
# build explicitly enabled languages
list( APPEND TS_FILES "${CMAKE_SOURCE_DIR}/lang/calamares_${lang}.ts" ) list( APPEND TS_FILES "${CMAKE_SOURCE_DIR}/lang/calamares_${lang}.ts" )
endforeach() endforeach()

View File

@ -47,7 +47,6 @@ static bool s_isAppDataDirOverridden = false;
static QTranslator* s_brandingTranslator = nullptr; static QTranslator* s_brandingTranslator = nullptr;
static QTranslator* s_translator = nullptr; static QTranslator* s_translator = nullptr;
static QTranslator* s_qtTranslator = nullptr;
static QString s_translatorLocaleName; static QString s_translatorLocaleName;
@ -207,25 +206,6 @@ installTranslator( const QLocale& locale,
QCoreApplication::installTranslator( translator ); QCoreApplication::installTranslator( translator );
s_translator = translator; s_translator = translator;
// Qt translations
translator = new QTranslator( parent );
if ( translator->load( QString( ":/lang/qt_" ) + localeName ) )
{
qDebug() << "Translation: Qt: Using system locale:" << localeName;
}
else
{
qDebug() << "Translation: Qt: Using default locale, system locale one not found:" << localeName;
}
if ( s_qtTranslator )
{
QCoreApplication::removeTranslator( s_qtTranslator );
delete s_qtTranslator;
}
QCoreApplication::installTranslator( translator );
s_qtTranslator = translator;
s_translatorLocaleName = localeName; s_translatorLocaleName = localeName;
} }

View File

@ -94,12 +94,16 @@ ViewManager::ViewManager( QObject* parent )
if ( !( m_currentStep == m_steps.count() -1 && if ( !( m_currentStep == m_steps.count() -1 &&
m_steps.last()->isAtEnd() ) ) m_steps.last()->isAtEnd() ) )
{ {
int response = QMessageBox::question( m_widget, QMessageBox mb( QMessageBox::Question,
tr( "Cancel installation?" ), tr( "Cancel installation?" ),
tr( "Do you really want to cancel the current install process?\n" tr( "Do you really want to cancel the current install process?\n"
"The installer will quit and all changes will be lost." ), "The installer will quit and all changes will be lost." ),
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes | QMessageBox::No,
QMessageBox::No ); m_widget );
mb.setDefaultButton( QMessageBox::No );
mb.button( QMessageBox::Yes )->setText( tr( "&Yes" ) );
mb.button( QMessageBox::No )->setText( tr( "&No" ) );
int response = mb.exec();
if ( response == QMessageBox::Yes ) if ( response == QMessageBox::Yes )
qApp->quit(); qApp->quit();
} }