Skip to content

Commit

Permalink
Added comment for translators in X-Plane logbook import.
Browse files Browse the repository at this point in the history
Added mile to NM conversion.
albar965/littlenavmap#346
  • Loading branch information
albar965 committed Jul 8, 2019
1 parent 6097420 commit 1b5c97c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fs/userdata/logdatamanager.cpp
Expand Up @@ -385,7 +385,8 @@ int LogdataManager::importXplane(const QString& filepath,
insertQuery.bindValue(":simulator", "X-Plane 11");

// Description ===================================================================
QString description(tr("Imported from %1\n"
/*: The text "Imported from X-Plane logbook" has to match the one in LogdataController::importXplane */
QString description(tr("Imported from X-Plane logbook %1\n"
"Number of landings: %2\n"
"Cross country time: %3\n"
"IFR time: %4\n"
Expand Down
8 changes: 8 additions & 0 deletions src/geo/calculations.h
Expand Up @@ -318,6 +318,14 @@ Q_DECL_CONSTEXPR TYPE nmToMi(TYPE value)
static_cast<TYPE>(static_cast<double>(value) * 1852.216 / 1609.3426);
}

/* Distance from statue miles to nautical miles */
template<typename TYPE>
Q_DECL_CONSTEXPR TYPE miToNm(TYPE value)
{
return (value > std::numeric_limits<TYPE>::max() / 2) ? value :
static_cast<TYPE>(static_cast<double>(value) * 1609.3426 / 1852.216);
}

/* Distance from meter to statue miles */
template<typename TYPE>
Q_DECL_CONSTEXPR TYPE meterToMi(TYPE value)
Expand Down
2 changes: 2 additions & 0 deletions src/logging/loggingutil.cpp
Expand Up @@ -49,6 +49,8 @@ void LoggingUtil::logSystemInformation()

qInfo() << "Default text codec" << QTextCodec::codecForLocale()->name();
qInfo() << "Locale name" << QLocale::system().bcp47Name();
qInfo() << "Locale decimal point" << QLocale::system().decimalPoint();
qInfo() << "Locale group separator" << QLocale::system().groupSeparator();
qInfo() << "UI languages" << QLocale().uiLanguages();

qInfo() << "ABI" << QSysInfo::buildAbi();
Expand Down

0 comments on commit 1b5c97c

Please sign in to comment.