Skip to content

Commit

Permalink
Version 3.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel-jimenez committed Dec 10, 2024
1 parent 4f97ee2 commit df2df22
Show file tree
Hide file tree
Showing 12 changed files with 123 additions and 94 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/ \
Expand All @@ -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 }}
Expand Down
15 changes: 15 additions & 0 deletions package/Changelog → package/CHANGELOG
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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
Expand Down
134 changes: 67 additions & 67 deletions package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-<ver>.plasmoid

Install: $ plasmapkg2 -i Luna3-<ver>.plasmoid
Update:

Update: $ plasmapkg2 -u Luna3-<ver>.plasmoid
$ plasmapkg2 -u Luna3-<ver>.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-<ver>.plasmoid

Update: # plasmapkg2 -g -u Luna3-<ver>.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-<ver>.plasmoid

C. CMake, installs to /usr/local/share/plasma/plasmoids
Update:

# plasmapkg2 -g -u Luna3-<ver>.plasmoid

WARNING: this works but is not really maintained.
Uninstall:

0. Unpack Luna3-<ver>.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 <path to source dir>
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 <[email protected]>
Copyright 2016, 2017 Bill Binder <[email protected]>
Copyright (C) 2011, 2012, 2013 Glad Deschrijver <[email protected]>
Copyright 2019 Ismael <[email protected]>
Copyright 2016, 2017 Bill Binder <[email protected]>
Copyright (C) 2011, 2012, 2013 Glad Deschrijver <[email protected]>
Copyright (C) 2024 Samuel Jimenez <[email protected]>

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 <[email protected]>
Copyright 1998,2000 Stephan Kulow <[email protected]>
Copyright 2008 by Davide Bettio <[email protected]>
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 <[email protected]>
Copyright 1998,2000 Stephan Kulow <[email protected]>
Copyright 2008 by Davide Bettio <[email protected]>
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 <[email protected]>, 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/)

Expand All @@ -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).

44 changes: 29 additions & 15 deletions package/README_TRANSLATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <locale>.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
Expand Down Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion package/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions package/po/es/plasma_applet_org.kde.userbase.plasma.luna3.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>\n"
"Language-Team: Spanish <[email protected]>\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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>\n"
"Language-Team: n/a\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>\n"
"Language-Team: Croatian <[email protected]>\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>\n"
"Language-Team: Dutch <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion package/po/plasma_applet_org.kde.userbase.plasma.luna3.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>\n"
"Language-Team: n/a\n"
Expand Down
2 changes: 1 addition & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} $@

0 comments on commit df2df22

Please sign in to comment.