Skip to content

Commit

Permalink
fix i18n usage (#122)
Browse files Browse the repository at this point in the history
* Updated AppImagehub api url

* #119 Update app name

* [ci skip] Fix typo in label (#120)

* fix i18n usage

Co-authored-by: Probal Basak <probal31@gmail.com>
Co-authored-by: faveoled <85760289+faveoled@users.noreply.github.com>
Co-authored-by: Camilo Higuita <chiguitar@unal.edu.co>
  • Loading branch information
4 people authored Dec 1, 2022
1 parent 6e1017a commit a105a38
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,6 @@ ecm_setup_version(${NX_SC_VERSION}
add_subdirectory(tests)
add_subdirectory(src)

ki18n_install(po)

feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
3 changes: 2 additions & 1 deletion nx-software-center-appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ AppDir:
path: ./AppDir
app_info:
id: nx-software-center
name: nx-software-center
name: NX Software Center
icon: nx-software-center
version: latest
exec: usr/bin/nx-software-center
Expand Down Expand Up @@ -120,4 +120,5 @@ AppDir:

AppImage:
arch: x86_64
file_name: nx-software-center-latest-x86_64.AppImage
update-information: gh-releases-zsync|Nitrux|nx-software-center|latest|*x86_64.AppImage.zsync
6 changes: 4 additions & 2 deletions src/NXSCApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "../nx_sc_version.h"

// libraries
#include <KLocalizedString>
#include <KI18n/KLocalizedString>
#include <MauiKit/FileBrowsing/thumbnailer.h>
#include <QCommandLineParser>
#include <QDate>
Expand Down Expand Up @@ -32,7 +32,6 @@ NXSCApp::NXSCApp(int &argc, char **argv)
{
setOrganizationName(QStringLiteral("Nitrux"));
setWindowIcon(QIcon(":/nx-software-center.svg"));
MauiApp::instance()->setIconName("qrc:/nx-software-center.svg");

QObject::connect(&_updateService,
&UpdateService::applicationUpdateDataChanged,
Expand Down Expand Up @@ -69,6 +68,7 @@ void NXSCApp::setKDEApplicationData()
_aboutData.setProgramLogo(windowIcon());

KAboutData::setApplicationData(_aboutData);
MauiApp::instance()->setIconName("qrc:/nx-software-center.svg");
}
void NXSCApp::parseCommands()
{
Expand Down Expand Up @@ -107,6 +107,8 @@ void NXSCApp::setup()
qmlRegisterSingletonInstance("org.maui.nxsc", 1, 0, "DeleteService", &_deleteService);
QObject::connect(&_applicationsRegistry, &ApplicationsRegistry::applicationUpdated, &_deleteService, &DeleteService::onApplicationUpdated);

_engine.rootContext()->setContextObject(new KLocalizedContext(&_engine));

registerUpdateService();
setupCacheService();
setupBundlesDirsWatcher();
Expand Down
2 changes: 1 addition & 1 deletion src/stores/appimagehubstore.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "appimagehubstore.h"

AppImageHubStore::AppImageHubStore(QObject *parent)
: OpenDesktopStore(parent, "https://www.appimagehub.com/ocs/v1") {}
: OpenDesktopStore(parent, "https://api.appimagehub.com/ocs/v1") {}

const QString AppImageHubStore::name() { return "AppImageHub"; }
2 changes: 1 addition & 1 deletion src/ui/templates/AppPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Maui.Page
iconSource: "license"
iconSizeHint: Maui.Style.iconSizes.medium
labelSizeHint: 22
label1.text: appInfo.license || i18n("Unkown")
label1.text: appInfo.license || i18n("Unknown")
label1.font.bold: true
label1.font.weight: Font.Bold
label1.font.pointSize: Maui.Style.fontSizes.big
Expand Down

0 comments on commit a105a38

Please sign in to comment.