Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .devcontainer/development/Containerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM registry.opensuse.org/opensuse/tumbleweed:latest

RUN zypper -n install sudo vim gawk git openssh-clients bash-completion \
npm22 nodejs22 glib2-tools gettext-tools jq rsync zip
RUN zypper -n install sudo man vim gawk git openssh-clients bash-completion \
npm22 nodejs22 glib2-tools gettext-tools jq yq rsync zip

RUN npm install --global yarn

Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/development/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"dbaeumer.vscode-eslint",
"github.vscode-github-actions",
"mrorz.language-gettext",
"SonarSource.sonarlint-vscode"
"SonarSource.sonarlint-vscode",
"jq-syntax-highlighting.jq-syntax-highlighting"
]
}
}
Expand Down
8 changes: 8 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Alexandre Dufournet <[email protected]> <[email protected]>
Alexandre Dufournet <[email protected]> <[email protected]>
Alexandre Dufournet <[email protected]> <[email protected]>
Alexandre Dufournet <[email protected]> Alex Dufournet
Alexandre Dufournet <[email protected]> alexduf
Alexandre Dufournet <[email protected]> alex

Benjamin Balder Bach <[email protected]> <[email protected]>
4 changes: 4 additions & 0 deletions changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
1.0.0:
Released: ~
Changes:
- Intial Release
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
"main": "extension.js",
"repository": "[email protected]:mackdk/gnome-github-notifications.git",
"author": "Thomas Florio <[email protected]>",
"contributors": [
"Alexandre Dufournet <[email protected]>",
"Mohammad Amin Chitgarha <[email protected]>"
],
"license": "GPL-2.0-or-later",
"scripts": {
"clean": "rm -rf build",
Expand All @@ -19,7 +15,7 @@
"deploy": "yarn build && yarn sync",
"test": "TS_NODE_PROJECT='src/test/tsconfig.json' yarn run nyc mocha",
"followLogs": "journalctl -f | grep \"\\[$(jq -r .name src/main/resources/metadata.json)\\]\"",
"updateTranslations": "test -d build/dist && (cd build/dist && xgettext --no-location -L JavaScript -o ../../src/main/po/gnome-github-manager.pot *.js && xgettext --no-location -L Glade -j -o ../../src/main/po/gnome-github-manager.pot ui/*.ui; sed -i 's/\"POT-Creation-Date[^\"]*\"/\"POT-Creation-Date: \\\\n\"/' ../../src/main/po/gnome-github-manager.pot) || echo 'Compile the extension first!'",
"updateTranslations": "test -d build/dist && (cd build/dist && xgettext --no-location --from-code UTF-8 -L JavaScript -o ../../src/main/po/gnome-github-manager.pot *.js && xgettext --no-location --from-code UTF-8 -L Glade -j -o ../../src/main/po/gnome-github-manager.pot ui/*.ui; sed -i 's/\"POT-Creation-Date[^\"]*\"/\"POT-Creation-Date: \\\\n\"/' ../../src/main/po/gnome-github-manager.pot) || echo 'Compile the extension first!'",
"createZip": "test -d build/dist && (cd build/dist && zip -r ../gnome-github-manager-v$(jq -r .version ../../package.json).zip ./*) || echo 'Compile the extension first!'",
"package": "yarn build && yarn createZip"
},
Expand Down Expand Up @@ -53,6 +49,7 @@
"dependencies": {
"@girs/gjs": "4.0.0-beta.36",
"@girs/gnome-shell": "48.0.4",
"@girs/gnomedesktop-4.0": "^4.0.0-4.0.0-beta.36",
"@girs/soup-3.0": "3.6.5-4.0.0-beta.36"
},
"resolutions": {
Expand Down
44 changes: 16 additions & 28 deletions rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const explicitMappings = new Map<string, string>(
'@girs/gio-2.0': 'gi://Gio',
'@girs/glib-2.0': 'gi://GLib',
'@girs/gobject-2.0': 'gi://GObject',
'@girs/gnomedesktop-4.0': 'gi://GnomeDesktop?version=4.0',
'@girs/gtk-4.0': 'gi://Gtk',
'@girs/soup-3.0': 'gi://Soup?version=3.0',
'@girs/st-16': 'gi://St',
Expand Down Expand Up @@ -66,30 +67,6 @@ const typescriptPluginOptions: RollupTypescriptOptions = {
},
};

// prettier-ignore
// JQ template to convert a property file to a json
const jqPropertiesToJson =
// Start by splitting every line
'split("\\n")' +
// Discard empty lines
'| map(select(length > 0)) ' +
// Discards comments
'| map(select(startswith("#") | not)) ' +
// Split on equals to divide the key from value
'| map(split("=")) ' +
// map to the json object
'| map({' +
// convert property key to json field removing initial and final spaces
'(.[0] | gsub("(^\\\\s+|\\\\s+$)"; "")): ' +
// convert property value to json value, splitting comma separated values into an array and removing spaces
'.[1] | tostring | gsub("(^\\\\s+|\\\\s+$)"; "") | gsub("\\\\s+"; " ") | gsub(",\\\\s+"; ",") | split(",")' +
'}) ' +
// add the new entry
'| add';

// JQ template to convert from package.json to extension-info.json adding the translators
const jqPackageToExtensionInfo = '{("version"): .version, ("authors"): [.author, .contributors[]]} + {$translators}';

export default defineConfig([
{
input: `${typescriptSourcesPath}/extension.ts`,
Expand Down Expand Up @@ -130,13 +107,24 @@ export default defineConfig([
// Generate extension-info.json
// prettier-ignore
'generate-extension-info': 'jq ' +
// Translators are extract from the PO files
'--argjson translators "$(' +
`sed -nr 's/.*(Project-Id-Version|Language-Team): ([^\\"]+).*$/\\2/p' src/main/po/*.po ` +
'| paste -d "=" - - ' +
`| jq -R -s '${jqPropertiesToJson}'` +
'jq -Rscf ./src/support/jq/po-header-to-json.jq src/main/po/*.po' +
')" ' +
// Authors are extract from the git shortlog, considering only the commits after the fork
'--argjson authors "$(' +
'git shortlog -sn gnome-github-notifications..HEAD | jq -Rscf src/support/jq/shortlog-to-authors.jq' +
')" ' +
// Original authors are extract from the git shortlog, considering only the commits BEFORE the fork
'--argjson originalAuthors "$(' +
'git shortlog -sn gnome-github-notifications | jq -Rscf src/support/jq/shortlog-to-authors.jq' +
')" ' +
// Changelog data
'--argjson changelog "$(yq eval -o json changelog.yaml)" ' +
// Just to keep consistent indentation with other JSON files
'--indent 4 ' +
`'${jqPackageToExtensionInfo}' ` +
// Combine everything together
'--from-file ./src/support/jq/package-to-extension-info.jq ' +
'package.json ' +
`> ${distributionPath}/extension-info.json`,
}),
Expand Down
23 changes: 16 additions & 7 deletions src/main/po/gnome-github-manager.pot
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,34 @@ msgid ""
"All the customizations made will be lost. This operation cannot be undone."
msgstr ""

msgid "Version {0} r{1}"
msgstr ""

msgid ""
"Integrate GitHub within the GNOME Desktop Environment.\n"
"\n"
"Based on GitHub Notifications by Alexandre Dufournet."
msgstr ""

msgid "Source code on GitHub"
msgid "User Guide"
msgstr ""

msgid "Reset to default"
msgid "GitHub Manager contributors"
msgstr ""

msgid "GitHub Notifications contributors"
msgstr ""

msgid "Translation to {0}"
msgstr ""

msgid "Version {0} (development)"
msgstr ""

msgid "Report an issue"
msgid "Version {0} released on {1}"
msgstr ""

msgid "Reset to default"
msgstr ""

msgid "User guide"
msgid "Report an Issue"
msgstr ""

msgid "About GitHub Manager"
Expand Down
34 changes: 23 additions & 11 deletions src/main/po/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ msgstr ""
"Project-Id-Version: Italiano\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2023-04-30 20:45+0200\n"
"PO-Revision-Date: 2025-03-14 12:13+0100\n"
"Last-Translator: \n"
"Language-Team: Thomas Florio\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.1.1\n"
"X-Generator: Poedit 3.4\n"

msgid "Github Notifications"
msgstr "Notifiche di GitHub"
Expand Down Expand Up @@ -44,9 +44,6 @@ msgstr ""
"Tutte le personalizzazioni verranno perse. Questa operazione non può essere "
"annullata."

msgid "Version {0} r{1}"
msgstr "Versione {0} r{1}"

msgid ""
"Integrate GitHub within the GNOME Desktop Environment.\n"
"\n"
Expand All @@ -56,18 +53,30 @@ msgstr ""
"\n"
"Basato su GitHub Notifications di Alexandre Dufournet."

msgid "Source code on GitHub"
msgstr "Codice sorgente su GitHub"
msgid "User Guide"
msgstr "Manuale Utente"

msgid "GitHub Manager contributors"
msgstr "Sviluppatori di GitHub Manager"

msgid "GitHub Notifications contributors"
msgstr "Sviluppatori di GitHub Notifications"

msgid "Translation to {0}"
msgstr "Traduzione in {0}"

msgid "Version {0} (development)"
msgstr "Versione {0} (ramo di sviluppo)"

msgid "Version {0} released on {1}"
msgstr "Versione {0} rilasciata il {1}"

msgid "Reset to default"
msgstr "Ripristina predefiniti"

msgid "Report an issue"
msgid "Report an Issue"
msgstr "Segnala un problema"

msgid "User guide"
msgstr "Manuale utente"

msgid "About GitHub Manager"
msgstr "Informazioni su GitHub Manager"

Expand Down Expand Up @@ -161,3 +170,6 @@ msgstr "Pulsante secondario"

msgid "Secondary action button, shown on the left."
msgstr "L'azione secondaria, mostrata a sinistra."

#~ msgid "Source code on GitHub"
#~ msgstr "Codice sorgente su GitHub"
4 changes: 2 additions & 2 deletions src/main/resources/ui/AdwPreferences.ui
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
</section>
<section>
<item>
<attribute name="label" translatable="yes">Report an issue</attribute>
<attribute name="label" translatable="yes">Report an Issue</attribute>
<attribute name="action">actions.reportBug</attribute>
</item>
<item>
<attribute name="label" translatable="yes">User guide</attribute>
<attribute name="label" translatable="yes">User Guide</attribute>
<attribute name="action">actions.userGuide</attribute>
</item>
</section>
Expand Down
2 changes: 1 addition & 1 deletion src/main/typescript/core/GitHubManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class GitHubManager implements Disposable {
public constructor(name: string, path: string, settings: Gio.Settings) {
GitHubManager.LOGGER.trace('Building and wiring components');

this.githubIcon = Gio.icon_new_for_string(`${path}/github.svg`);
this.githubIcon = Gio.icon_new_for_string(`${path}/gnome-github-manager.svg`);

this.eventDispatcher = new EventDispatcher();
this.settings = new SettingsWrapper(settings, this.eventDispatcher);
Expand Down
Loading
Loading