prepare for i18n
This commit is contained in:
parent
5b938722f9
commit
7dbcb4ccaf
@ -20,7 +20,7 @@ include(ECMPoQmTools)
|
||||
include(KDECompilerSettings NO_POLICY_SCOPE)
|
||||
|
||||
find_package(Qt5 REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui Svg QuickControls2 Sql)
|
||||
find_package(KF5 REQUIRED COMPONENTS CoreAddons Syndication Config)
|
||||
find_package(KF5 REQUIRED COMPONENTS CoreAddons Syndication Config I18n)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
|
@ -12,6 +12,6 @@ set(alligator_SRCS
|
||||
kconfig_add_kcfg_files(alligator_SRCS alligatorsettings.kcfgc GENERATE_MOC)
|
||||
|
||||
add_executable(alligator ${alligator_SRCS})
|
||||
target_link_libraries(alligator Qt5::Core Qt5::Qml Qt5::Quick Qt5::Svg Qt5::Sql KF5::Syndication KF5::CoreAddons KF5::ConfigGui)
|
||||
target_link_libraries(alligator Qt5::Core Qt5::Qml Qt5::Quick Qt5::Svg Qt5::Sql KF5::Syndication KF5::CoreAddons KF5::ConfigGui KF5::I18n)
|
||||
|
||||
install(TARGETS alligator ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
|
3
src/Messages.sh
Normal file
3
src/Messages.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#! /usr/bin/env bash
|
||||
$XGETTEXT `find -name \*.cpp -o -name \*.qml -o -name \*.js` -o $podir/alligator.pot
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <QQmlContext>
|
||||
|
||||
#include <KAboutData>
|
||||
#include <KLocalizedString>
|
||||
|
||||
#include "entryListModel.h"
|
||||
#include "feedListModel.h"
|
||||
@ -46,9 +47,9 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
|
||||
KAboutData about(QStringLiteral("alligator"), QStringLiteral("Alligator"), QStringLiteral("0.1"), QStringLiteral("Feed Reader"),
|
||||
KAboutLicense::GPL, QStringLiteral("© 2020 KDE Community"));
|
||||
about.addAuthor(QStringLiteral("Tobias Fella"), QString(), QStringLiteral("fella@posteo.de"));
|
||||
KAboutData about(QStringLiteral("alligator"), i18n("Alligator"), QStringLiteral("0.1"), i18n("Feed Reader"),
|
||||
KAboutLicense::GPL, i18n("© 2020 KDE Community"));
|
||||
about.addAuthor(i18n("Tobias Fella"), QString(), QStringLiteral("fella@posteo.de"));
|
||||
KAboutData::setApplicationData(about);
|
||||
|
||||
engine.rootContext()->setContextProperty(QStringLiteral("_aboutData"), QVariant::fromValue(about));
|
||||
|
@ -32,7 +32,7 @@ Kirigami.ScrollablePage {
|
||||
|
||||
contextualActions: [
|
||||
Kirigami.Action {
|
||||
text: "Details"
|
||||
text: i18n("Details")
|
||||
visible: feed.url != "all"
|
||||
onTriggered: ;//pageStack.push("qrc:/qml/FeedDetailsPage.qml", {"modelData": atomModel})
|
||||
}
|
||||
@ -74,7 +74,7 @@ Kirigami.ScrollablePage {
|
||||
actions: [
|
||||
Kirigami.Action {
|
||||
icon.name: model.bookmark ? "bookmark-remove" : "bookmark-new"
|
||||
text: "Bookmark"
|
||||
text: i18n("Bookmark")
|
||||
onTriggered: {
|
||||
model.bookmark = !model.bookmark
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ Kirigami.ScrollablePage {
|
||||
|
||||
contextualActions: [
|
||||
Kirigami.Action {
|
||||
text: "Add feed"
|
||||
text: i18n("Add feed")
|
||||
onTriggered: {
|
||||
addSheet.open()
|
||||
}
|
||||
@ -49,7 +49,7 @@ Kirigami.ScrollablePage {
|
||||
Kirigami.FormData.label: "Url"
|
||||
}
|
||||
Controls.Button {
|
||||
text: "Add"
|
||||
text: i18n("Add")
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||
enabled: urlField.text
|
||||
onClicked: {
|
||||
@ -70,7 +70,7 @@ Kirigami.ScrollablePage {
|
||||
header:
|
||||
Kirigami.AbstractListItem {
|
||||
Controls.Label {
|
||||
text: "All feeds"
|
||||
text: i18n("All feeds")
|
||||
}
|
||||
|
||||
width: parent.width;
|
||||
|
@ -3,7 +3,7 @@ import org.kde.kirigami 2.8 as Kirigami
|
||||
import QtQuick.Controls 2.10 as Controls
|
||||
|
||||
Kirigami.ScrollablePage {
|
||||
title: "Settings"
|
||||
title: i18n("Settings")
|
||||
|
||||
property QtObject settings
|
||||
|
||||
@ -12,15 +12,15 @@ Kirigami.ScrollablePage {
|
||||
Controls.TextField {
|
||||
id: deleteAfterCount
|
||||
text: settings.deleteAfterCount
|
||||
Kirigami.FormData.label: "Delete posts after:"
|
||||
Kirigami.FormData.label: i18n("Delete posts after:")
|
||||
}
|
||||
Controls.ComboBox {
|
||||
id: deleteAfterType
|
||||
currentIndex: settings.deleteAfterType
|
||||
model: ["Posts", "Days", "Weeks", "Months"]
|
||||
model: [i18n("Posts"), i18n("Days"), i18n("Weeks"), i18n("Months")]
|
||||
}
|
||||
Controls.Button {
|
||||
text: "Save"
|
||||
text: i18n("Save")
|
||||
onClicked: {
|
||||
settings.deleteAfterCount = deleteAfterCount.text
|
||||
settings.deleteAfterType = deleteAfterType.currentIndex
|
||||
|
@ -34,12 +34,12 @@ Kirigami.ApplicationWindow {
|
||||
isMenu: true
|
||||
actions: [
|
||||
Kirigami.Action {
|
||||
text: "Settings"
|
||||
text: i18n("Settings")
|
||||
iconName: "settings-configure"
|
||||
onTriggered: pageStack.push("qrc:/SettingsPage.qml", {"settings": _settings})
|
||||
},
|
||||
Kirigami.Action {
|
||||
text: "About"
|
||||
text: i18n("About")
|
||||
iconName: "help-about"
|
||||
onTriggered: root.pageStack.push(aboutPage)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user