Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appdata and translation related patches #35

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>io.github.leolost2605.gradebook</id>

<name>Gradebook</name>
<summary>Keep track of your grades</summary>

<metadata_license>CC-BY-4.0</metadata_license>
<project_license>GPL-3.0-or-later</project_license>

<description>
<p>
Gradebook is a simple tool that helps you keep track of your grades. This way you always know how you are doing in your courses.
Expand All @@ -20,10 +20,11 @@
<li>Your average is calculated automatically taking the weighting of the different categories into account</li>
</ul>
</description>
<developer_name>Leonhard Kargl</developer_name>

<developer_name translatable="no">Leonhard Kargl</developer_name>

<launchable type="desktop-id">io.github.leolost2605.gradebook.desktop</launchable>
<translation type="gettext">io.github.leolost2605.gradebook</translation>
<screenshots>
<screenshot type="default">
<caption>The start page of the app</caption>
Expand All @@ -45,7 +46,7 @@

<releases>
<release version="1.2" date="2023-12-24" urgency="medium">
<description>
<description translatable="no">
<p>This release brings a completely refreshed UI, updating it to the latest GNOME 45 HIG. Huge thanks to skøldis ([email protected]) for making this possible! Since this is such a massive change be sure to report any issues you discover.</p>
<p>More improvements:</p>
<ul>
Expand All @@ -55,7 +56,7 @@
</description>
</release>
<release version="1.1.1" date="2022-12-25" urgency="medium">
<description>
<description translatable="no">
<p>Changes:</p>
<ul>
<li>Translations for additional languages were added</li>
Expand All @@ -66,6 +67,9 @@
</releases>

<url type="homepage">https://github.com/leolost2605/Gradebook</url>
<url type="bugtracker">https://github.com/leolost2605/Gradebook/issues</url>
<url type="vcs-browser">https://github.com/leolost2605/Gradebook</url>
<url type="translate">https://github.com/leolost2605/Gradebook/tree/main/po</url>

<content_rating type="oars-1.0" />
<content_rating type="oars-1.1" />
</component>
1 change: 1 addition & 0 deletions io.github.leolost2605.gradebook.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
{
"name": "gradebook",
"buildsystem": "meson",
"run-tests": true,
"sources": [
{
"type": "dir",
Expand Down
40 changes: 34 additions & 6 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# project name and programming language
project('io.github.leolost2605.gradebook', 'vala', 'c')

i18n = import('i18n')

subdir ('po')

conf = configuration_data()
Expand Down Expand Up @@ -51,16 +53,42 @@ executable(
install: true
)

install_data (
'data' / 'io.github.leolost2605.gradebook.desktop',
install_dir: get_option('datadir') / 'applications'
# Create desktop file
desktop_file = i18n.merge_file(
input: 'data/io.github.leolost2605.gradebook.desktop.in',
output: 'io.github.leolost2605.gradebook.desktop',
type: 'desktop',
po_dir: './po',
install: true,
install_dir: join_paths(get_option('datadir'), 'applications')
)

install_data (
'data' / 'io.github.leolost2605.gradebook.metainfo.xml',
install_dir: get_option('datadir') / 'metainfo'
# Validate desktop file
desktop_utils = find_program('desktop-file-validate', required: false)
if desktop_utils.found()
test('Validate desktop file', desktop_utils,
args: [desktop_file]
)
endif

# Create appdata file
appdata_file = i18n.merge_file(
input: 'data/io.github.leolost2605.gradebook.metainfo.xml.in',
output: 'io.github.leolost2605.gradebook.metainfo.xml',
po_dir: './po',
install: true,
install_dir: join_paths(get_option('datadir'), 'metainfo')
)

# Validate appdata file
appstreamcli = find_program('appstreamcli', required: false)
if appstreamcli.found()
test('Validate appdata file', appstreamcli,
args: ['validate', '--no-net', '--explain', appdata_file.full_path()],
workdir: meson.current_build_dir()
)
endif

# Install our icons in all the required sizes
icon_sizes = ['16', '24', '32', '48', '64', '128']

Expand Down
7 changes: 6 additions & 1 deletion po/LINGUAS
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
es it nl ru
de
es
it
nl
ru
tr
2 changes: 2 additions & 0 deletions po/POTFILES
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
data/io.github.leolost2605.gradebook.desktop.in
data/io.github.leolost2605.gradebook.metainfo.xml.in
src/add-category-dialog.vala
src/application.vala
src/category.vala
Expand Down
90 changes: 72 additions & 18 deletions po/io.github.leolost2605.gradebook.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: io.github.leolost2605.gradebook\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-12-24 12:50+0100\n"
"POT-Creation-Date: 2024-01-10 19:37+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -17,14 +17,72 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: data/io.github.leolost2605.gradebook.desktop.in:6
#: data/io.github.leolost2605.gradebook.metainfo.xml.in:5
#: src/application.vala:35 src/window.vala:12
msgid "Gradebook"
msgstr ""

#: data/io.github.leolost2605.gradebook.desktop.in:7
msgid "A simple tool to keep track of your grades"
msgstr ""

#: data/io.github.leolost2605.gradebook.metainfo.xml.in:6
msgid "Keep track of your grades"
msgstr ""

#: data/io.github.leolost2605.gradebook.metainfo.xml.in:12
msgid ""
"Gradebook is a simple tool that helps you keep track of your grades. This "
"way you always know how you are doing in your courses."
msgstr ""

#: data/io.github.leolost2605.gradebook.metainfo.xml.in:15
msgid "Features:"
msgstr ""

#: data/io.github.leolost2605.gradebook.metainfo.xml.in:17
msgid "Support for numerical and percentage systems"
msgstr ""

#: data/io.github.leolost2605.gradebook.metainfo.xml.in:18
msgid "Assign your grades to categories with different weighting"
msgstr ""

#: data/io.github.leolost2605.gradebook.metainfo.xml.in:19
msgid "Add notes to your grades so that you later know how you could improve"
msgstr ""

#: data/io.github.leolost2605.gradebook.metainfo.xml.in:20
msgid ""
"Your average is calculated automatically taking the weighting of the "
"different categories into account"
msgstr ""

#: data/io.github.leolost2605.gradebook.metainfo.xml.in:30
msgid "The start page of the app"
msgstr ""

#: data/io.github.leolost2605.gradebook.metainfo.xml.in:34
msgid "Example for a subject"
msgstr ""

#: data/io.github.leolost2605.gradebook.metainfo.xml.in:38
msgid "Menu for the addition of a subject"
msgstr ""

#: data/io.github.leolost2605.gradebook.metainfo.xml.in:42
msgid "Gradebook showing its adaptive mode"
msgstr ""

#: src/add-category-dialog.vala:7 src/edit-subject-dialog.vala:72
msgid "Add New Category"
msgstr ""

#. BUTTONS
#: src/add-category-dialog.vala:12 src/edit-subject-dialog.vala:26
#: src/edit-subject-dialog.vala:141 src/new-grade-dialog.vala:14
#: src/subject-page.vala:240
#: src/subject-page.vala:245
msgid "Cancel"
msgstr ""

Expand All @@ -44,10 +102,6 @@ msgstr ""
msgid "translator-credits"
msgstr ""

#: src/application.vala:35 src/window.vala:12
msgid "Gradebook"
msgstr ""

#: src/edit-subject-dialog.vala:12
msgid "New Subject"
msgstr ""
Expand Down Expand Up @@ -83,7 +137,7 @@ msgstr ""
msgid "If you delete %s, its information will be deleted permanently."
msgstr ""

#: src/edit-subject-dialog.vala:142 src/subject-page.vala:241
#: src/edit-subject-dialog.vala:142 src/subject-page.vala:246
msgid "Delete"
msgstr ""

Expand Down Expand Up @@ -115,49 +169,49 @@ msgstr ""
msgid "Toggle Sidebar"
msgstr ""

#: src/subject-page.vala:76
#: src/subject-page.vala:79
msgid "Average:"
msgstr ""

#: src/subject-page.vala:87
#: src/subject-page.vala:90
msgid "New Grade…"
msgstr ""

#: src/subject-page.vala:94
#: src/subject-page.vala:97
msgid "No Grades"
msgstr ""

#: src/subject-page.vala:95
#: src/subject-page.vala:98
msgid "Add new grades by clicking the “New Grade…” button."
msgstr ""

#: src/subject-page.vala:127
#: src/subject-page.vala:130
msgid "No Subjects"
msgstr ""

#: src/subject-page.vala:128
#: src/subject-page.vala:131
msgid "Add new subjects using the “+” button in the top left corner."
msgstr ""

#: src/subject-page.vala:204
#: src/subject-page.vala:209
msgid "Error"
msgstr ""

#: src/subject-page.vala:204
#: src/subject-page.vala:209
msgid ""
"This subject has no categories. Add at least one category in order to add a "
"grade."
msgstr ""

#: src/subject-page.vala:206
#: src/subject-page.vala:211
msgid "OK"
msgstr ""

#: src/subject-page.vala:237
#: src/subject-page.vala:242
msgid "Delete Grade?"
msgstr ""

#: src/subject-page.vala:238
#: src/subject-page.vala:243
msgid "If you delete this grade, its information will be deleted permanently."
msgstr ""

Expand Down
11 changes: 1 addition & 10 deletions po/meson.build
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
# Include the translations module
i18n = import('i18n')

# Set our translation domain
add_project_arguments('-DGETTEXT_PACKAGE="@0@"'.format (meson.project_name()), language:'c')

i18n.gettext(meson.project_name(),
args: '--directory=' + meson.source_root(),
preset: 'glib'
)
i18n.gettext('io.github.leolost2605.gradebook', preset: 'glib')
Loading
Loading