From df2df22c565bd7f37e86e187de8c9678bc537095 Mon Sep 17 00:00:00 2001 From: samuel <53528911+samuel-jimenez@users.noreply.github.com> Date: Tue, 10 Dec 2024 10:36:51 -0600 Subject: [PATCH] Version 3.0.2 --- .github/workflows/release.yml | 6 +- package/{Changelog => CHANGELOG} | 15 ++ package/README.md | 134 +++++++++--------- package/README_TRANSLATIONS.md | 44 ++++-- package/metadata.json | 2 +- ...ma_applet_org.kde.userbase.plasma.luna3.po | 4 +- ...ma_applet_org.kde.userbase.plasma.luna3.po | 2 +- ...ma_applet_org.kde.userbase.plasma.luna3.po | 2 +- ...ma_applet_org.kde.userbase.plasma.luna3.po | 2 +- ...a_applet_org.kde.userbase.plasma.luna3.pot | 2 +- ...ma_applet_org.kde.userbase.plasma.luna3.po | 2 +- release.sh | 2 +- 12 files changed, 123 insertions(+), 94 deletions(-) rename package/{Changelog => CHANGELOG} (88%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f0bbbae..c417dab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,8 +39,8 @@ jobs: run: | VERSION=${GITHUB_REF_NAME#v} echo "path=Luna3-${VERSION}.plasmoid" >> "$GITHUB_OUTPUT" - sed -Eie 's#"Version": "[0-9.]+",#"Version": "${{ github.ref }}",#' package/metadata.json - sed -Eie 's#refs/tags/v##' package/metadata.json + sed -Ei 's#"Version": "[0-9.]+",#"Version": "${{ github.ref }}",#' package/metadata.json + sed -Ei 's#refs/tags/v##' package/metadata.json podman run \ --mount type=bind,src=${GITHUB_WORKSPACE},dst=/root/,Z \ --workdir=/root/ \ @@ -56,7 +56,7 @@ jobs: run: gh release create ${tag} -t "${title}" - name: Upload Release Asset - id: upload-release-asset + id: upload-release-asset env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} tag: ${{ github.ref_name }} diff --git a/package/Changelog b/package/CHANGELOG similarity index 88% rename from package/Changelog rename to package/CHANGELOG index 79fbb74..2e391fc 100644 --- a/package/Changelog +++ b/package/CHANGELOG @@ -1,3 +1,17 @@ +version 3.0.2 (2024-12-10) +- As of Plasma6, translations no longer need to be manually installed. Updated translation documentation to reflect this. +- Fixed bug where CI build systems create extra files. + +version 3.0.1 (2024-12-05) +- Reworked JavaScript lunation code. + - Fixed errors due to time zone calculations. + - Condensed and cleaned up lunation logic and tooltip messages. + +version 3.0.0 (2024-11-22) +- Ported plasmoid to Plasma 6. + + + version 2.1.2 (2019-10-13) - localisation, hr (VladimirMikulic) version 2.1.1 (2019-09-28) @@ -30,6 +44,7 @@ version 2.0.1 (2017-02-11) - zip now now contains the content of the package directory version 2.0 (2016-12-01) - modified to be a Plasma 5 plasmoid + version 1.4 (2013-05-16): - the dialog now scrolls in and out instead of just appearing or disappearing when the plasmoid is added in a panel diff --git a/package/README.md b/package/README.md index 8e8459d..01846c8 100644 --- a/package/README.md +++ b/package/README.md @@ -8,97 +8,109 @@ future moon phases by clicking the arrow keys. Clicking the middle button returns to the current dates. -This plasmoid is a port to Plasma 6 of Luna II (https://store.kde.org/p/1165459/), +This plasmoid is a port to Plasma 6 of Luna II (https://store.kde.org/p/1165459/), which is a port to Plasma 5 of Luna QML 1.4 (https://store.kde.org/p/1002036/) Installation ------------ -A. Command line, installs to ~/local/share/plasma/plasmoids +#### A. Command line, installs to `~/local/share/plasma/plasmoids`. + This works the same way as loading a new widget from "Add Widgets..." + +Install: - This works the same way as loading a new widget from "Add Widgets..." + $ plasmapkg2 -i Luna3-.plasmoid - Install: $ plasmapkg2 -i Luna3-.plasmoid +Update: - Update: $ plasmapkg2 -u Luna3-.plasmoid + $ plasmapkg2 -u Luna3-.plasmoid - Uninstall: $ plasmapkg2 -r org.kde.userbase.plasma.Luna3 +Uninstall: - See README_TRANSLATIONS.md (Step 4) for installing localizations. + $ plasmapkg2 -r org.kde.userbase.plasma.Luna3 -B. Command line, installs to /usr/local/share/plasma/plasmoids - Install: # plasmapkg2 -g -i Luna3-.plasmoid - Update: # plasmapkg2 -g -u Luna3-.plasmoid +#### B. Command line, installs to `/usr/local/share/plasma/plasmoids` - Uninstall: # plasmapkg2 -g -r org.kde.userbase.plasma.Luna3 +Install: + # plasmapkg2 -g -i Luna3-.plasmoid -C. CMake, installs to /usr/local/share/plasma/plasmoids +Update: + + # plasmapkg2 -g -u Luna3-.plasmoid - WARNING: this works but is not really maintained. +Uninstall: - 0. Unpack Luna3-.plasmoid - it's a zip file. + # plasmapkg2 -g -r org.kde.userbase.plasma.Luna3 + + +#### C. CMake, installs to `/usr/local/share/plasma/plasmoids` + + 0. Clone/download source from [Github](https://github.com/samuel-jimenez/Luna3) or +[opencode.net](https://www.opencode.net/samuel-jimenez/Luna3). 1. The top directory contains the CMakeLists.txt file - 2. Create an empty directory, Luna3-plasmoid-build, and cd into it - 3. Run: # cmake - 4. Run: # make install + 2. Run: ``` # make install``` Custom Date Formats ------------------- -For example: dddd, dd-MM-yyyy => Saturday, 10-Dec-2016 - - d the day as number without a leading zero (1 to 31) - dd the day as number with a leading zero (01 to 31) - ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). Uses QDate::shortDayName(). - dddd the long localized day name (e.g. 'Monday' to 'Qt::Sunday'). Uses QDate::longDayName(). - M the month as number without a leading zero (1-12) - MM the month as number with a leading zero (01-12) - MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). Uses QDate::shortMonthName(). - MMMM the long localized month name (e.g. 'January' to 'December'). Uses QDate::longMonthName(). - yy the year as two digit number (00-99) - yyyy the year as four digit number +For example: `dddd, dd-MM-yyyy` => Saturday, 10-Dec-2016 + + d the day as number without a leading zero (1 to 31) + dd the day as number with a leading zero (01 to 31) + ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). Uses QDate::shortDayName(). + dddd the long localized day name (e.g. 'Monday' to 'Qt::Sunday'). Uses QDate::longDayName(). + M the month as number without a leading zero (1-12) + MM the month as number with a leading zero (01-12) + MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). Uses QDate::shortMonthName(). + MMMM the long localized month name (e.g. 'January' to 'December'). Uses QDate::longMonthName(). + yy the year as two digit number (00-99) + yyyy the year as four digit number In addition the following expressions can be used to specify the time: - h the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display) - hh the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display) - m the minute without a leading zero (0 to 59) - mm the minute with a leading zero (00 to 59) - s the second without a leading zero (0 to 59) - ss the second with a leading zero (00 to 59) - z the milliseconds without leading zeroes (0 to 999) - zzz the milliseconds with leading zeroes (000 to 999) - AP use AM/PM display. AP will be replaced by either "AM" or "PM". - ap use am/pm display. ap will be replaced by either "am" or "pm". + + h the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display) + hh the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display) + m the minute without a leading zero (0 to 59) + mm the minute with a leading zero (00 to 59) + s the second without a leading zero (0 to 59) + ss the second with a leading zero (00 to 59) + z the milliseconds without leading zeroes (0 to 999) + zzz the milliseconds with leading zeroes (000 to 999) + AP use AM/PM display. AP will be replaced by either "AM" or "PM". + ap use am/pm display. ap will be replaced by either "am" or "pm". License ------- -Copyright 2019 Ismael -Copyright 2016, 2017 Bill Binder -Copyright (C) 2011, 2012, 2013 Glad Deschrijver +Copyright 2019 Ismael +Copyright 2016, 2017 Bill Binder +Copyright (C) 2011, 2012, 2013 Glad Deschrijver +Copyright (C) 2024 Samuel Jimenez The JavaScript code is based on the C++ code of the original Luna plasmoid -in the KDE Plasma Workspace. This C++ code is licensed as follows: - Copyright 1996 Christopher Osburn - Copyright 1998,2000 Stephan Kulow - Copyright 2008 by Davide Bettio - licensed under the GNU GPL version 2 or later. +in the KDE Plasma Workspace. This C++ code is licensed as follows: + + Copyright 1996 Christopher Osburn + Copyright 1998,2000 Stephan Kulow + Copyright 2008 by Davide Bettio + licensed under the GNU GPL version 2 or later. Several fixes in the changes for 2.1 series were based on the Gealach plasmoid by koffeinfriedhof , in particular the resizing of the LunaWidget when different date formats are selected. -The luna image, gskbyte13.svg, was extracted from the luna SVG file created by: - Copyright 2009 Jose Alcala (project manager), Dan Gerhards (moon artwork), - Jeremy M. Todaro (shadows and layout) - (available at http://kde-look.org/content/show.php/luna.svgz+(full+SVG+image)?content=106013 - original available at http://www.public-domain-photos.com/free-cliparts/science/astronomy/the_moon_dan_gerhards_01-5094.htm) - released in the public domain +The luna image, `gskbyte13.svg`, was extracted from the luna SVG file created by: + + Copyright 2009 Jose Alcala (project manager), Dan Gerhards (moon artwork), + Jeremy M. Todaro (shadows and layout) + (available at http://kde-look.org/content/show.php/luna.svgz+(full+SVG+image)?content=106013 + original available at http://www.public-domain-photos.com/free-cliparts/science/astronomy/the_moon_dan_gerhards_01-5094.htm) + released in the public domain -The luna images, fife-moon.svg & full-moon-dark.svg, were generated from photos +The luna images, `fife-moon.svg` & `full-moon-dark.svg`, were generated from photos by Bill Binder. Released 2017 under Creative Commons Attribution-ShareAlike 3.0 (http://creativecommons.org/licenses/by-sa/3.0/) @@ -111,16 +123,4 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -Possible bug warning --------------------- - -In contents/code/lunacalc.js a reasonable lower approximation for the number -of lunations since the New Moon of January 6, 2000 is calculated in order to -reduce the number of iterations in a costly while loop and thus speed up the -startup of the plasmoid. Since the lunation duration is not fixed, it may -happen that the calculated number of lunations is too high, and then the -plasmoid will display phases of the moon which are one month in the future. -Since the average lunation duration is used, this bug will only occasionaly -appear, if it appears at all. This can be solved by setting the variable -lunationDuration to a higher value (with the negative impact that the startup -of the plasmoid may be slower). + diff --git a/package/README_TRANSLATIONS.md b/package/README_TRANSLATIONS.md index 9d0b752..33e221e 100644 --- a/package/README_TRANSLATIONS.md +++ b/package/README_TRANSLATIONS.md @@ -7,12 +7,26 @@ translations for this plasmoid. If any of the instructions are unclear or you encounter any difficulties please contact the author. -[Step 4](#step-4-install-the-mo-file) covers how to install existing translations. +Existing translations no longer need to be installed. If you previously installed them and are encountering problems, try removing them, e.g., +```bash +rm /usr/share/locale/*/LC_MESSAGES/plasma_applet_org.kde.userbase.plasma.luna3.mo +rm ~/.local/share/locale/*/LC_MESSAGES/plasma_applet_org.kde.userbase.plasma.luna3.mo +``` + --------------------------------------------- Step 1: Creating a new .po file --------------------------------------------- +First locate where the plasmoid has been installed. + +If it was installed using Add Widgets menu, it will probably be: + `~/.local/share/plasma/plasmoids/org.kde.userbase.plasma.luna3/` + +If you did a global install of the plasmoid, it's probably under: + `/usr/share/plasma/plasmoids/org.kde.userbase.plasma.luna3/` + + Under the `po` folder, make a folder for the locale, e.g.: `fr/` Make a copy of @@ -55,31 +69,31 @@ The .mo files are placed in the `locale` directory under `contents`, e.g. `locale/fr/LC_MESSAGES/plasma_applet_org.kde.userbase.plasma.luna3.mo` ---------------------------- -Step 4: Install the .mo file +Step 4: Test the .mo file ---------------------------- -First locate where the plasmoid has been installed. +Finally, install the plasmoid and test your translations. -if it was installed using Add Widgets menu, it will probably be: - `~/.local/share/plasma/plasmoids/org.kde.userbase.plasma.luna3/` -Copy the `contents/locale` directory into `~/.local/share`. +Update the plasmoid installation: +```bash +plasmapkg2 -u package +``` -If you did a global install of the plasmoid, it's probably under: - `/usr/share/plasma/plasmoids/org.kde.userbase.plasma.luna3/` -In this case, there will be a `/usr/share/locale` directory already; -copy the `contents/locale` directory into `/usr/share`. +Test your translations (if not part of configuration menu): +```bash +LANGUAGE=fr plasmawindowed -d org.kde.userbase.plasma.luna3 +``` -Logout and back in - it should pick up the translations. +Or simply logout and back in - it should pick up the translations. ---------------------------------------------------------- Step 5: Send the translation for inclusion with the widget ---------------------------------------------------------- Once you are happy with the translation please send the .po file to the -author along with translations for the following two strings (see +author along with translations for the following two strings for the "Add Widgets" screen (see `metadata.json`): -For the "add widgets" screen: - "Luna 3" - "Display moon phases for your location" + - "Luna 3" + - "Display moon phases for your location" Please send the translations for these two strings only when the translation is not yet in `metadata.json`. diff --git a/package/metadata.json b/package/metadata.json index 2f696be..ba27cd4 100644 --- a/package/metadata.json +++ b/package/metadata.json @@ -73,7 +73,7 @@ "Name[uk]": "Луна 3", "Name[x-test]": "xxLuna 3xx", "Name[zh_CN]": "月相", - "Version": "3.0.1", + "Version": "3.0.2", "Website": "http://userbase.kde.org/Plasma" }, "X-Plasma-API-Minimum-Version": "6.0", diff --git a/package/po/es/plasma_applet_org.kde.userbase.plasma.luna3.po b/package/po/es/plasma_applet_org.kde.userbase.plasma.luna3.po index ae3f405..1b50cb0 100644 --- a/package/po/es/plasma_applet_org.kde.userbase.plasma.luna3.po +++ b/package/po/es/plasma_applet_org.kde.userbase.plasma.luna3.po @@ -11,11 +11,11 @@ msgid "" msgstr "" "Project-Id-Version: 2.1\n" "Report-Msgid-Bugs-To: https://github.com/samuel-jimenez/Luna3/issues\n" -"POT-Creation-Date: 2024-12-06 11:47-0600\n" +"POT-Creation-Date: 2024-12-10 10:35-0600\n" "PO-Revision-Date: 2019-07-21 14:17+0200\n" "Last-Translator: Ismael \n" "Language-Team: Spanish \n" -"Language: fr_FR\n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/package/po/fr/plasma_applet_org.kde.userbase.plasma.luna3.po b/package/po/fr/plasma_applet_org.kde.userbase.plasma.luna3.po index 9decb78..3841a81 100644 --- a/package/po/fr/plasma_applet_org.kde.userbase.plasma.luna3.po +++ b/package/po/fr/plasma_applet_org.kde.userbase.plasma.luna3.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: 2.1\n" "Report-Msgid-Bugs-To: https://github.com/samuel-jimenez/Luna3/issues\n" -"POT-Creation-Date: 2024-12-06 11:47-0600\n" +"POT-Creation-Date: 2024-12-10 10:35-0600\n" "PO-Revision-Date: 2017-07-01 23:54+0100\n" "Last-Translator: Bill Binder \n" "Language-Team: n/a\n" diff --git a/package/po/hr/plasma_applet_org.kde.userbase.plasma.luna3.po b/package/po/hr/plasma_applet_org.kde.userbase.plasma.luna3.po index 64098c3..63b7128 100644 --- a/package/po/hr/plasma_applet_org.kde.userbase.plasma.luna3.po +++ b/package/po/hr/plasma_applet_org.kde.userbase.plasma.luna3.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://github.com/samuel-jimenez/Luna3/issues\n" -"POT-Creation-Date: 2024-12-06 11:47-0600\n" +"POT-Creation-Date: 2024-12-10 10:35-0600\n" "PO-Revision-Date: 2019-10-06 18:41+0100\n" "Last-Translator: Vladimir Mikulic \n" "Language-Team: Croatian \n" diff --git a/package/po/nl/plasma_applet_org.kde.userbase.plasma.luna3.po b/package/po/nl/plasma_applet_org.kde.userbase.plasma.luna3.po index 77a7094..de3d987 100644 --- a/package/po/nl/plasma_applet_org.kde.userbase.plasma.luna3.po +++ b/package/po/nl/plasma_applet_org.kde.userbase.plasma.luna3.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://github.com/samuel-jimenez/Luna3/issues\n" -"POT-Creation-Date: 2024-12-06 11:47-0600\n" +"POT-Creation-Date: 2024-12-10 10:35-0600\n" "PO-Revision-Date: 2019-09-22 13:13+0200\n" "Last-Translator: Heimen Stoffels \n" "Language-Team: Dutch \n" diff --git a/package/po/plasma_applet_org.kde.userbase.plasma.luna3.pot b/package/po/plasma_applet_org.kde.userbase.plasma.luna3.pot index d6c02d8..3f325c3 100644 --- a/package/po/plasma_applet_org.kde.userbase.plasma.luna3.pot +++ b/package/po/plasma_applet_org.kde.userbase.plasma.luna3.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/samuel-jimenez/Luna3/issues\n" -"POT-Creation-Date: 2024-12-06 11:47-0600\n" +"POT-Creation-Date: 2024-12-10 10:35-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/package/po/ru/plasma_applet_org.kde.userbase.plasma.luna3.po b/package/po/ru/plasma_applet_org.kde.userbase.plasma.luna3.po index 7eb2abc..3910394 100644 --- a/package/po/ru/plasma_applet_org.kde.userbase.plasma.luna3.po +++ b/package/po/ru/plasma_applet_org.kde.userbase.plasma.luna3.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 2.1\n" "Report-Msgid-Bugs-To: https://github.com/samuel-jimenez/Luna3/issues\n" -"POT-Creation-Date: 2024-12-06 11:47-0600\n" +"POT-Creation-Date: 2024-12-10 10:35-0600\n" "PO-Revision-Date: 2017-07-01 14:29+0100\n" "Last-Translator: Bill Binder \n" "Language-Team: n/a\n" diff --git a/release.sh b/release.sh index ff61617..1e91c2c 100755 --- a/release.sh +++ b/release.sh @@ -9,6 +9,6 @@ VERSION=${1#v} VERSION=${VERSION:?Must provide version number.} shift -sed -Eie 's#"Version": "[0-9.]+",#"Version": "'"${VERSION}"'",#' package/metadata.json +sed -Ei 's#"Version": "[0-9.]+",#"Version": "'"${VERSION}"'",#' package/metadata.json git commit -a -m "Version ${VERSION}" git tag v${VERSION} $@