New translations, fixed build.
This commit is contained in:
parent
8a99258b8d
commit
ed2e9e2ce6
6 changed files with 721 additions and 709 deletions
File diff suppressed because it is too large
Load diff
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 906 B After Width: | Height: | Size: 906 B |
|
@ -56,7 +56,7 @@
|
|||
<file>graphics/misc/flags/de.png</file>
|
||||
<file>graphics/misc/flags/en_GB.png</file>
|
||||
<file>graphics/misc/flags/en_US.png</file>
|
||||
<file>graphics/misc/flags/es.png</file>
|
||||
<file>graphics/misc/flags/es_ES.png</file>
|
||||
<file>graphics/misc/flags/fi.png</file>
|
||||
<file>graphics/misc/flags/fr.png</file>
|
||||
<file>graphics/misc/flags/gl.png</file>
|
||||
|
@ -70,7 +70,7 @@
|
|||
<file>graphics/misc/flags/pt_BR.png</file>
|
||||
<file>graphics/misc/flags/pt_PT.png</file>
|
||||
<file>graphics/misc/flags/ru.png</file>
|
||||
<file>graphics/misc/flags/sv.png</file>
|
||||
<file>graphics/misc/flags/sv_SE.png</file>
|
||||
<file>graphics/misc/flags/uk.png</file>
|
||||
<file>graphics/misc/flags/zh_CN.png</file>
|
||||
<file>graphics/misc/flags/zh_TW.png</file>
|
||||
|
@ -94,26 +94,26 @@
|
|||
|
||||
<file>desktop/rssguard.desktop.in</file>
|
||||
|
||||
<file>../localization/rssguard_cs_CZ.qm</file>
|
||||
<file>../localization/rssguard_da_DK.qm</file>
|
||||
<file>../localization/rssguard_de_DE.qm</file>
|
||||
<file>../localization/rssguard_cs.qm</file>
|
||||
<file>../localization/rssguard_da.qm</file>
|
||||
<file>../localization/rssguard_de.qm</file>
|
||||
<file>../localization/rssguard_en_GB.qm</file>
|
||||
<file>../localization/rssguard_en_US.qm</file>
|
||||
<file>../localization/rssguard_es_ES.qm</file>
|
||||
<file>../localization/rssguard_fi_FI.qm</file>
|
||||
<file>../localization/rssguard_fr_FR.qm</file>
|
||||
<file>../localization/rssguard_gl_ES.qm</file>
|
||||
<file>../localization/rssguard_id_ID.qm</file>
|
||||
<file>../localization/rssguard_it_IT.qm</file>
|
||||
<file>../localization/rssguard_ja_JP.qm</file>
|
||||
<file>../localization/rssguard_lt_LT.qm</file>
|
||||
<file>../localization/rssguard_nl_NL.qm</file>
|
||||
<file>../localization/rssguard_pl_PL.qm</file>
|
||||
<file>../localization/rssguard_es.qm</file>
|
||||
<file>../localization/rssguard_fi.qm</file>
|
||||
<file>../localization/rssguard_fr.qm</file>
|
||||
<file>../localization/rssguard_gl.qm</file>
|
||||
<file>../localization/rssguard_id.qm</file>
|
||||
<file>../localization/rssguard_it.qm</file>
|
||||
<file>../localization/rssguard_ja.qm</file>
|
||||
<file>../localization/rssguard_lt.qm</file>
|
||||
<file>../localization/rssguard_nl.qm</file>
|
||||
<file>../localization/rssguard_pl.qm</file>
|
||||
<file>../localization/rssguard_pt.qm</file>
|
||||
<file>../localization/rssguard_pt_BR.qm</file>
|
||||
<file>../localization/rssguard_pt_PT.qm</file>
|
||||
<file>../localization/rssguard_ru_RU.qm</file>
|
||||
<file>../localization/rssguard_sv_SE.qm</file>
|
||||
<file>../localization/rssguard_uk_UA.qm</file>
|
||||
<file>../localization/rssguard_ru.qm</file>
|
||||
<file>../localization/rssguard_sv.qm</file>
|
||||
<file>../localization/rssguard_uk.qm</file>
|
||||
<file>../localization/rssguard_zh_CN.qm</file>
|
||||
<file>../localization/rssguard_zh_TW.qm</file>
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include "definitions/definitions.h"
|
||||
|
||||
#include <QLocale>
|
||||
|
||||
ProgressBarWithText::ProgressBarWithText(QWidget* parent) : QProgressBar(parent) {}
|
||||
|
||||
QString ProgressBarWithText::text() const {
|
||||
|
@ -12,20 +14,20 @@ QString ProgressBarWithText::text() const {
|
|||
QLocale locale;
|
||||
|
||||
locale.setNumberOptions(locale.numberOptions() | QLocale::OmitGroupSeparator);
|
||||
result.replace(QLatin1String("%m"), locale.toString(total_steps));
|
||||
result.replace(QLatin1String("%v"), locale.toString(value()));
|
||||
result.replace(QL1S("%m"), locale.toString(total_steps));
|
||||
result.replace(QL1S("%v"), locale.toString(value()));
|
||||
|
||||
// If max and min are equal and we get this far, it means that the
|
||||
// progress bar has one step and that we are on that step. Return
|
||||
// 100% here in order to avoid division by zero further down.
|
||||
if (total_steps == 0) {
|
||||
result.replace(QLatin1String("%p"), locale.toString(100));
|
||||
result.replace(QL1S("%p"), locale.toString(100));
|
||||
return result;
|
||||
}
|
||||
|
||||
const auto progress = static_cast<int>((qint64(value()) - minimum()) * 100.0 / total_steps);
|
||||
|
||||
result.replace(QLatin1String("%p"), locale.toString(progress));
|
||||
result.replace(QL1S("%p"), locale.toString(progress));
|
||||
|
||||
// Now, shorten the text to fit the widget.
|
||||
bool elide = false;
|
||||
|
|
|
@ -74,7 +74,7 @@ QList<Language> Localization::installedLanguages() const {
|
|||
if (translator.load(file.absoluteFilePath())) {
|
||||
Language new_language;
|
||||
|
||||
new_language.m_code = translator.language();
|
||||
new_language.m_code = translator.language().replace(QSL("-"), QSL("_"));
|
||||
new_language.m_author = translator.translate("QObject", "LANG_AUTHOR");
|
||||
new_language.m_name = QLocale(new_language.m_code).nativeLanguageName();
|
||||
languages << new_language;
|
||||
|
|
Loading…
Add table
Reference in a new issue