Skip to content

Commit

Permalink
WIP Part 19: Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Vysp3r committed Feb 1, 2025
1 parent 8ef42cf commit dbe2a31
Show file tree
Hide file tree
Showing 61 changed files with 696 additions and 861 deletions.
6 changes: 3 additions & 3 deletions com.vysp3r.ProtonPlus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ build-options:
cleanup:
- /include
- /lib/pkgconfig
- /share/pkgconfig
- /share/aclocal
- /man
- /share/man
- /share/gtk-doc
- /share/man
- /share/pkgconfig
- /share/vala
- '*.la'
- '*.a'
modules:
Expand Down
35 changes: 25 additions & 10 deletions data/com.vysp3r.ProtonPlus.metainfo.xml.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>com.vysp3r.ProtonPlus</id>
<metadata_license>FSFAP</metadata_license>
<project_license>GPL-3.0-or-later</project_license>

<name>ProtonPlus</name>
<summary>Modern compatibility tools manager</summary>
Expand Down Expand Up @@ -38,25 +40,38 @@
</ul>
</description>

<developer id="com.vysp3r">
<name>Vysp3r</name>
</developer>

<keywords>
<keyword>Proton</keyword>
<keyword>Wine</keyword>
<keyword>Steam Tinker Launch</keyword>
</keywords>

<launchable type="desktop-id">com.vysp3r.ProtonPlus.desktop</launchable>
<!-- Requered: Should be a link to the upstream homepage for the component -->
<url type="homepage">https://github.com/Vysp3r/ProtonPlus</url>
<!-- Recommended: It is highly recommended for open-source projects to display the source code repository -->
<url type="vcs-browser">https://github.com/Vysp3r/ProtonPlus</url>
<!-- Should point to the software's bug tracking system, for users to report new bugs -->
<url type="bugtracker">https://github.com/Vysp3r/ProtonPlus/issues</url>
<!-- Should link a FAQ page for this software, to answer some of the most-asked questions in detail -->
<!-- URLs of this type should point to a webpage where users can submit or modify translations of the upstream project -->
<url type="translate">https://hosted.weblate.org/projects/protonplus/protonplus</url>

<metadata_license>FSFAP</metadata_license>
<project_license>GPL-3.0-or-later</project_license>
<translation type="gettext">fasdfa</translation>
<!-- All graphical applications having a desktop file must have this tag in the MetaInfo.
If this is present, appstreamcli compose will pull icons, keywords and categories from the desktop file. -->
<launchable type="desktop-id">com.vysp3r.ProtonPlus.desktop</launchable>
<!-- Use the OARS website (https://hughsie.github.io/oars/generate.html) to generate these and make sure to use oars-1.1 -->
<content_rating type="oars-1.1" />

<developer id="com.vysp3r">
<name>Vysp3r</name>
</developer>

<url type="homepage">https://github.com/Vysp3r/ProtonPlus</url>
<url type="bugtracker">https://github.com/Vysp3r/ProtonPlus/issues</url>
<url type="translate">https://hosted.weblate.org/projects/protonplus/protonplus/</url>
<!-- Applications should set a brand color in both light and dark variants like so -->
<branding>
<color type="primary" scheme_preference="light">#ff00ff</color>
<color type="primary" scheme_preference="dark">#993d3d</color>
</branding>

<screenshots>
<screenshot type="default">
Expand Down
2 changes: 1 addition & 1 deletion data/meson.build
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
subdir('ui')
subdir('css')
subdir('icons')
subdir('images')

#
install_subdir(
join_paths('logo', 'icons'),
install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'icons'),
Expand Down
29 changes: 29 additions & 0 deletions data/ui/gtk/help-overlay.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkShortcutsWindow" id="help_overlay">
<property name="modal">True</property>
<child>
<object class="GtkShortcutsSection">
<property name="section-name">shortcuts</property>
<property name="max-height">10</property>
<child>
<object class="GtkShortcutsGroup">
<property name="title" translatable="yes" context="shortcut window">General</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="title" translatable="yes" context="shortcut window">Show Shortcuts</property>
<property name="action-name">win.show-help-overlay</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="title" translatable="yes" context="shortcut window">Quit</property>
<property name="action-name">app.quit</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>
4 changes: 4 additions & 0 deletions data/ui/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ui_gresource = gnome.compile_resources(
'ui-resource',
'ui.gresource.xml'
)
6 changes: 6 additions & 0 deletions data/ui/ui.gresource.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/com/vysp3r/ProtonPlus">
<file preprocess="xml-stripblanks">gtk/help-overlay.ui</file>
</gresource>
</gresources>
18 changes: 16 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
project(
'com.vysp3r.ProtonPlus', ['c', 'vala'],
version: '0.4.20',
meson_version: '>= 0.62.0',
meson_version: '>= 1.0.0',
default_options: [ 'warning_level=2', 'werror=false', ],
)

i18n = import('i18n')
gnome = import('gnome')
valac = meson.get_compiler('vala')

src_dir = meson.project_source_root() / 'src'

config_h = configuration_data()
config_h.set_quoted('APP_NAME', meson.project_name().split('.')[2])
config_h.set_quoted('APP_ID', meson.project_name())
config_h.set_quoted('APP_VERSION', meson.project_version())
config_h.set_quoted('LOCALE_DIR', join_paths (get_option('prefix'), get_option('localedir')))
config_h.set_quoted('RESOURCE_BASE', '/com/vysp3r/ProtonPlus')
configure_file(output : 'config.h', configuration : config_h)

config_dep = valac.find_library ('config', dirs: src_dir)
config_inc = include_directories('.')

add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()), language: 'c')

subdir('po')
subdir('data')
subdir('src')
subdir('po')

gnome.post_install(
glib_compile_schemas: true,
Expand Down
74 changes: 37 additions & 37 deletions po/be.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: com.vysp3r.ProtonPlus\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-18 21:10-0500\n"
"POT-Creation-Date: 2025-01-19 11:19-0500\n"
"PO-Revision-Date: 2024-05-31 16:22+0000\n"
"Last-Translator: Yahor <[email protected]>\n"
"Language-Team: Belarusian <https://hosted.weblate.org/projects/protonplus/"
Expand All @@ -20,15 +20,20 @@ msgstr ""
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Weblate 5.6-dev\n"

#: src/widgets/sidebar.vala:11 src/widgets/info-box.vala:18
msgid "Toggle Sidebar"
#: src/widgets/sidebar.vala:20
#, fuzzy
msgid "Show Installed"
msgstr "Толькі ўсталяваныя"

#: src/widgets/info-box.vala:17
msgid "_Keyboard Shortcuts"
msgstr ""

#: src/widgets/info-box.vala:22
#: src/widgets/info-box.vala:18
msgid "_About ProtonPlus"
msgstr ""

#: src/widgets/info-box.vala:25
#: src/widgets/info-box.vala:21
msgid "Main Menu"
msgstr ""

Expand All @@ -48,8 +53,8 @@ msgstr ""
msgid "Closing in"
msgstr ""

#: src/widgets/release-row.vala:12 src/widgets/release-rows/basic.vala:39
#: src/widgets/release-rows/steamtinkerlaunch.vala:122
#: src/widgets/release-row.vala:12 src/widgets/release-rows/basic.vala:35
#: src/widgets/release-rows/steamtinkerlaunch.vala:118
#, c-format
msgid "Delete %s"
msgstr ""
Expand All @@ -67,45 +72,45 @@ msgstr ""
msgid "Load more"
msgstr "Загрузіць больш"

#: src/widgets/window.vala:80
#: src/widgets/window.vala:51
#, fuzzy, c-format
msgid "Welcome to %s"
msgstr "Вітаем у "

#: src/widgets/window.vala:80
#: src/widgets/window.vala:51
msgid "Install Steam, Lutris, Bottles or Heroic Games Launcher to get started."
msgstr ""
"Каб пачаць, усталюйце Steam, Lutris, Bottles або Heroic Games Launcher."

#: src/widgets/application.vala:59
#: src/widgets/application.vala:78
#, fuzzy
msgid "A modern compatibility tools manager for Linux."
msgstr ""
"Просты менеджэр інструментаў сумяшчальнасці на базе Wine і Proton для GNOME"

#: src/widgets/application.vala:65
#: src/widgets/application.vala:84
msgid "Special thanks to"
msgstr "Асаблівая падзяка"

#: src/widgets/release-rows/basic.vala:39
#: src/widgets/release-rows/steamtinkerlaunch.vala:122
#: src/widgets/release-rows/basic.vala:35
#: src/widgets/release-rows/steamtinkerlaunch.vala:118
#, c-format
msgid "You're about to remove %s from your system."
msgstr ""

#: src/widgets/release-rows/basic.vala:39
#: src/widgets/release-rows/steamtinkerlaunch.vala:122
#: src/widgets/release-rows/basic.vala:35
#: src/widgets/release-rows/steamtinkerlaunch.vala:118
#, fuzzy
msgid "Are you sure you want this?"
msgstr "Вы ўпэўнены, што хочаце выдаліць "

#: src/widgets/release-rows/basic.vala:41
#: src/widgets/release-rows/steamtinkerlaunch.vala:126
#: src/widgets/release-rows/basic.vala:37
#: src/widgets/release-rows/steamtinkerlaunch.vala:122
msgid "No"
msgstr ""

#: src/widgets/release-rows/basic.vala:42
#: src/widgets/release-rows/steamtinkerlaunch.vala:127
#: src/widgets/release-rows/basic.vala:38
#: src/widgets/release-rows/steamtinkerlaunch.vala:123
msgid "Yes"
msgstr ""

Expand All @@ -125,7 +130,7 @@ msgstr "Усталяванне "

#: src/widgets/release-rows/steamtinkerlaunch.vala:71
#: src/widgets/release-rows/steamtinkerlaunch.vala:85
#: src/widgets/release-rows/steamtinkerlaunch.vala:193
#: src/widgets/release-rows/steamtinkerlaunch.vala:181
msgid "OK"
msgstr ""

Expand All @@ -150,32 +155,32 @@ msgstr ""
msgid "Cancel"
msgstr ""

#: src/widgets/release-rows/steamtinkerlaunch.vala:120
#: src/widgets/release-rows/steamtinkerlaunch.vala:116
msgid "Check this to also remove your configuration files."
msgstr ""

#: src/widgets/release-rows/steamtinkerlaunch.vala:183
#: src/widgets/release-rows/steamtinkerlaunch.vala:187
#: src/widgets/release-rows/steamtinkerlaunch.vala:171
#: src/widgets/release-rows/steamtinkerlaunch.vala:175
#, c-format
msgid "%s is not supported"
msgstr ""

#: src/widgets/release-rows/steamtinkerlaunch.vala:183
#: src/widgets/release-rows/steamtinkerlaunch.vala:171
#, c-format
msgid "To install %s for the %s, please run the following command:"
msgstr ""

#: src/widgets/release-rows/steamtinkerlaunch.vala:187
#: src/widgets/release-rows/steamtinkerlaunch.vala:175
#, c-format
msgid "There's currently no known way for us to install %s for the %s."
msgstr ""

#: src/widgets/release-rows/steamtinkerlaunch.vala:213
#: src/widgets/release-rows/steamtinkerlaunch.vala:201
#, c-format
msgid "%s is up-to-date"
msgstr ""

#: src/widgets/release-rows/steamtinkerlaunch.vala:213
#: src/widgets/release-rows/steamtinkerlaunch.vala:201
#, c-format
msgid "Update %s to the latest version"
msgstr ""
Expand Down Expand Up @@ -329,13 +334,6 @@ msgstr ""
"Інструмент сумяшчальнасці Steam Play для запуску прыгодніцкіх гульняў з "
"выкарыстаннем націўнай Linux ScummVM."

#: src/models/runners/wine-ge.vala:6
msgid ""
"Based on Valve Proton Experimental's bleeding-edge Wine, built for Lutris."
msgstr ""
"Заснаваны на перадавой Wine ад Valve Proton Experimental, створанай для "
"Lutris."

#: src/models/runners/wine-lutris.vala:7
msgid ""
"Improved by Lutris to offer better compatibility or performance in certain "
Expand Down Expand Up @@ -387,9 +385,11 @@ msgstr "Выдаленне "
msgid "An unexpected error occurred while upgrading %s."
msgstr "Падчас распакавання адбылася нечаканая памылка "

#, fuzzy
#~ msgid "Only Installed"
#~ msgstr "Толькі ўсталяваныя"
#~ msgid ""
#~ "Based on Valve Proton Experimental's bleeding-edge Wine, built for Lutris."
#~ msgstr ""
#~ "Заснаваны на перадавой Wine ад Valve Proton Experimental, створанай для "
#~ "Lutris."

#, fuzzy
#~ msgid "There was an error while fetching data from the GitHub API."
Expand Down
Loading

0 comments on commit dbe2a31

Please sign in to comment.