generated from swsnr/gnome-shell-extension-typescript-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit 76a9b23.
- Loading branch information
Showing
7 changed files
with
250 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,12 @@ XGETTEXT_METADATA = \ | |
--copyright-holder "Sebastian Wiesner <[email protected]>" | ||
|
||
DIST-EXTRA-SRC = README.md LICENSE-GPL2 LICENSE-MPL2 icons/ | ||
UIDEFS = $(wildcard ui/*.ui) | ||
BLUEPRINTS = $(wildcard ui/*.blp) | ||
UIDEFS = $(addsuffix .ui,$(basename $(BLUEPRINTS))) | ||
CATALOGS = $(wildcard po/*.po) | ||
|
||
BLUEPRINT-COMPILER = "blueprint-compiler" | ||
|
||
.PHONY: dist | ||
dist: compile | ||
mkdir -p ./dist/ | ||
|
@@ -66,15 +69,17 @@ clean: | |
compile: $(UIDEFS) | ||
pnpm compile | ||
|
||
# For Gtk builder the Gtk development package needs to be installed; | ||
# otherwise xgettext uses its built-in fallback rule and fails to extract messages. | ||
# For blueprint, see https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/translations.html | ||
# The language doesn't really matter for blueprint, but xgettext warns if we don't set it | ||
.PHONY: pot | ||
pot: | ||
find src -name '*.ts' | \ | ||
xargs xgettext $(XGETTEXT_METADATA) \ | ||
--from-code=UTF-8 --language=JavaScript --output=po/$(UUID).pot | ||
xgettext $(XGETTEXT_METADATA) --from-code=UTF-8 --join-existing --output=po/$(UUID).pot \ | ||
--add-comments $(UIDEFS) | ||
xgettext $(XGETTEXT_METADATA) --from-code=UTF-8 --language=C \ | ||
--join-existing --output=po/$(UUID).pot \ | ||
--add-comments --keyword=_ --keyword=C_:1c,2 \ | ||
$(wildcard ui/*.blp) | ||
|
||
.PHONY: messages | ||
messages: $(CATALOGS) | ||
|
@@ -99,5 +104,8 @@ check: lint check-types | |
fix: format | ||
pnpm lint --fix | ||
|
||
$(UIDEFS): %.ui: %.blp | ||
$(BLUEPRINT-COMPILER) compile --output $@ $< | ||
|
||
$(CATALOGS): %.po: pot | ||
msgmerge --update --backup=none --lang=$(notdir $(basename $@)) $@ po/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: [email protected]\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-08-29 22:11+0200\n" | ||
"POT-Creation-Date: 2024-09-05 10:59+0200\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
|
@@ -192,6 +192,10 @@ msgctxt "Error Dialog" | |
msgid "Close" | ||
msgstr "" | ||
|
||
#: src/extension.ts:148 | ||
msgid "Picture of the Day" | ||
msgstr "" | ||
|
||
#: src/prefs.ts:123 | ||
msgid "XDG State directory" | ||
msgstr "" | ||
|
@@ -200,6 +204,48 @@ msgstr "" | |
msgid "Select download folder" | ||
msgstr "" | ||
|
||
#: src/extension.ts:148 | ||
msgid "Picture of the Day" | ||
#: ui/AboutPage.blp:7 | ||
msgid "About" | ||
msgstr "" | ||
|
||
#: ui/AboutPage.blp:37 | ||
msgid "Get a picture of the day as desktop background." | ||
msgstr "" | ||
|
||
#: ui/AboutPage.blp:46 | ||
msgctxt "about link" | ||
msgid "Github" | ||
msgstr "" | ||
|
||
#: ui/AboutPage.blp:51 | ||
msgctxt "about link" | ||
msgid "Issue tracker" | ||
msgstr "" | ||
|
||
#: ui/SourcesPage.blp:7 | ||
msgid "Picture Sources" | ||
msgstr "" | ||
|
||
#: ui/SourcesPage.blp:8 | ||
msgid "Configure sources for the Picture of the Day." | ||
msgstr "" | ||
|
||
#: ui/SourcesPage.blp:13 | ||
msgid "Selected source" | ||
msgstr "" | ||
|
||
#: ui/SourcesPage.blp:18 | ||
msgid "Refresh automatically" | ||
msgstr "" | ||
|
||
#: ui/SourcesPage.blp:24 | ||
msgid "Custom download folder" | ||
msgstr "" | ||
|
||
#: ui/SourcesPage.blp:43 | ||
msgid "API key" | ||
msgstr "" | ||
|
||
#: ui/SourcesPage.blp:47 | ||
msgid "Get API key" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
using Gtk 4.0; | ||
using Adw 1; | ||
|
||
translation-domain "[email protected]"; | ||
|
||
template $PictureOfTheDayAboutPage : Adw.PreferencesPage { | ||
title: _("About"); | ||
icon-name: "dialog-information-symbolic"; | ||
|
||
Adw.PreferencesGroup { | ||
valign: fill; | ||
halign: fill; | ||
|
||
Box { | ||
orientation: vertical; | ||
halign: center; | ||
margin-bottom: 15; | ||
|
||
Label extensionName { | ||
label: "The name of this extension"; | ||
margin-bottom: 5; | ||
styles ["title-1"] | ||
} | ||
|
||
Label extensionVersion { | ||
label: "0.0.0"; | ||
styles ["caption"] | ||
} | ||
} | ||
|
||
Box { | ||
orientation: vertical; | ||
halign: center; | ||
margin-bottom: 5; | ||
|
||
Label extensionDescription { | ||
label: _("Get a picture of the day as desktop background."); | ||
justify: center; | ||
} | ||
} | ||
|
||
Box { | ||
halign: center; | ||
|
||
LinkButton linkGithub { | ||
label: C_("about link", "Github"); | ||
|
||
} | ||
|
||
LinkButton linkIssues { | ||
label: C_("about link", "Issue tracker"); | ||
} | ||
} | ||
|
||
Box { | ||
orientation: vertical; | ||
vexpand: true; | ||
hexpand: true; | ||
|
||
ScrolledWindow { | ||
margin-top: 24; | ||
vexpand: true; | ||
hexpand: true; | ||
|
||
TextView extensionLicense { | ||
editable: false; | ||
cursor-visible: false; | ||
wrap-mode: word; | ||
justification: center; | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
DO NOT EDIT! | ||
This file was @generated by blueprint-compiler. Instead, edit the | ||
corresponding .blp file and regenerate this file with blueprint-compiler. | ||
--> | ||
<interface domain="[email protected]"> | ||
<requires lib="gtk" version="4.0"/> | ||
<template class="PictureOfTheDayAboutPage" parent="AdwPreferencesPage"> | ||
<property name="title" translatable="true">About</property> | ||
<property name="title" translatable="yes">About</property> | ||
<property name="icon-name">dialog-information-symbolic</property> | ||
<child> | ||
<object class="AdwPreferencesGroup"> | ||
|
@@ -39,7 +44,7 @@ | |
<property name="margin-bottom">5</property> | ||
<child> | ||
<object class="GtkLabel" id="extensionDescription"> | ||
<property name="label" translatable="true">Get a picture of the day as desktop background.</property> | ||
<property name="label" translatable="yes">Get a picture of the day as desktop background.</property> | ||
<property name="justify">2</property> | ||
</object> | ||
</child> | ||
|
@@ -50,12 +55,12 @@ | |
<property name="halign">3</property> | ||
<child> | ||
<object class="GtkLinkButton" id="linkGithub"> | ||
<property name="label" translatable="true" context="about link">Github</property> | ||
<property name="label" translatable="yes" context="about link">Github</property> | ||
</object> | ||
</child> | ||
<child> | ||
<object class="GtkLinkButton" id="linkIssues"> | ||
<property name="label" translatable="true" context="about link">Issue tracker</property> | ||
<property name="label" translatable="yes" context="about link">Issue tracker</property> | ||
</object> | ||
</child> | ||
</object> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using Gtk 4.0; | ||
using Adw 1; | ||
|
||
translation-domain "[email protected]"; | ||
|
||
template $PictureOfTheDaySourcesPage: Adw.PreferencesPage { | ||
title: _("Picture Sources"); | ||
description: _("Configure sources for the Picture of the Day."); | ||
icon-name: "picture-of-the-day-symbolic"; | ||
|
||
Adw.PreferencesGroup { | ||
Adw.ExpanderRow sourcesRow { | ||
title: _("Selected source"); | ||
styles ["property"] | ||
} | ||
|
||
Adw.SwitchRow refreshAutomatically { | ||
title: _("Refresh automatically"); | ||
} | ||
} | ||
|
||
Adw.PreferencesGroup { | ||
Adw.ActionRow downloadFolder { | ||
title: _("Custom download folder"); | ||
styles ["property"] | ||
|
||
[suffix] | ||
Gtk.Button selectDownloadFolder { | ||
icon-name: "folder-open-symbolic"; | ||
styles ["flat"] | ||
} | ||
|
||
[suffix] | ||
Gtk.Button resetDownloadFolder { | ||
icon-name: "edit-clear-symbolic"; | ||
styles ["flat"] | ||
} | ||
} | ||
} | ||
|
||
Adw.PreferencesGroup apodGroup { | ||
Adw.EntryRow apodApiKey { | ||
title: _("API key"); | ||
|
||
[suffix] | ||
Gtk.LinkButton { | ||
label: _("Get API key"); | ||
uri: "https://api.nasa.gov/"; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.