diff --git a/.github/workflows/automated-checks.yml b/.github/workflows/automated-checks.yml index 02ebbc48..2b803edb 100644 --- a/.github/workflows/automated-checks.yml +++ b/.github/workflows/automated-checks.yml @@ -65,6 +65,7 @@ jobs: - '3.10' # [EOL] End of Life: 31 Oct 2026 - '3.11' # [EOL] End of Life: 31 Dec 2027 - '3.12' # [EOL] End of Life: 31 Dec 2028 + - '3.13' # [EOL] End of Life: 31 Oct 2029 # MySQL versions to test against database: # https://endoflife.date/mysql diff --git a/.gitignore b/.gitignore index 3201ead8..0f85899a 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ __pycache__ .coverage /coverage.xml alliance_auth.sqlite3 + +/fleetpings/locale/en/ diff --git a/.make/conf.d/django.mk b/.make/conf.d/django.mk index ec08e08d..99c4d03d 100644 --- a/.make/conf.d/django.mk +++ b/.make/conf.d/django.mk @@ -1,5 +1,34 @@ # Make targets for Django projects +# Create or update translation template (.pot file) +.PHONY: pot +pot: + @echo "Creating or updating .pot file …" + @django-admin makemessages \ + -l en \ + --keep-pot \ + --ignore 'build/*' + @current_app_version=$$(pip show $(appname) | grep 'Version: ' | awk '{print $$NF}'); \ + sed -i "/\"Project-Id-Version: /c\\\"Project-Id-Version: $(appname_verbose) $$current_app_version\\\n\"" $(translation_template); \ + sed -i "/\"Report-Msgid-Bugs-To: /c\\\"Report-Msgid-Bugs-To: $(git_repository_issues)\\\n\"" $(translation_template); + +# Add a new translation +.PHONY: add_translation +add_translation: + @echo "Adding a new translation" + @read -p "Enter the language code (e.g. 'en_GB'): " language_code; \ + django-admin makemessages \ + -l $$language_code \ + --keep-pot \ + --ignore 'build/*'; \ + current_app_version=$$(pip show $(appname) | grep 'Version: ' | awk '{print $$NF}'); \ + sed -i "/\"Project-Id-Version: /c\\\"Project-Id-Version: $(appname_verbose) $$current_app_version\\\n\"" $(translation_template); \ + sed -i "/\"Report-Msgid-Bugs-To: /c\\\"Report-Msgid-Bugs-To: $(git_repository_issues)\\\n\"" $(translation_template); \ + sed -i "/\"Project-Id-Version: /c\\\"Project-Id-Version: $(appname_verbose) $$current_app_version\\\n\"" $(translation_directory)/$$language_code/$(translation_file_relative_path); \ + sed -i "/\"Report-Msgid-Bugs-To: /c\\\"Report-Msgid-Bugs-To: $(git_repository_issues)\\\n\"" $(translation_directory)/$$language_code/$(translation_file_relative_path); \ + echo "New translation added for $$language_code"; \ + echo "Please remember to add '-l $$language_code \' to the 'translations' target in the Makefile"; + # Translation files .PHONY: translations translations: @@ -20,6 +49,20 @@ translations: -l zh_Hans \ --keep-pot \ --ignore 'build/*' + @current_app_version=$$(pip show $(appname) | grep 'Version: ' | awk '{print $$NF}'); \ + sed -i "/\"Project-Id-Version: /c\\\"Project-Id-Version: $(appname_verbose) $$current_app_version\\\n\"" $(translation_template); \ + sed -i "/\"Report-Msgid-Bugs-To: /c\\\"Report-Msgid-Bugs-To: $(git_repository_issues)\\\n\"" $(translation_template); \ + subdircount=$$(find $(translation_directory) -mindepth 1 -maxdepth 1 -type d | wc -l); \ + if [[ $$subdircount -gt 1 ]]; then \ + for path in $(translation_directory)/*/; do \ + [ -d "$$path/LC_MESSAGES" ] || continue; \ + if [[ -f "$$path/$(translation_file_relative_path)" ]] \ + then \ + sed -i "/\"Project-Id-Version: /c\\\"Project-Id-Version: $(appname_verbose) $$current_app_version\\\n\"" $$path/$(translation_file_relative_path); \ + sed -i "/\"Report-Msgid-Bugs-To: /c\\\"Report-Msgid-Bugs-To: $(git_repository_issues)\\\n\"" $$path/$(translation_file_relative_path); \ + fi; \ + done; \ + fi; # Compile translation files .PHONY: compile_translations @@ -55,9 +98,14 @@ migrations: # Help message .PHONY: help help:: - @echo " $(TEXT_UNDERLINE)Translation:$(TEXT_UNDERLINE_END)" - @echo " migrate Migrate all database changes" - @echo " migrations Create or update migrations" - @echo " translations Create or update translation files" - @echo " compile_translations Compile translation files" + @echo " $(TEXT_UNDERLINE)Django:$(TEXT_UNDERLINE_END)" + @echo " Migration handling:" + @echo " migrate Migrate all database changes" + @echo " migrations Create or update migrations" + @echo "" + @echo " Translation handling:" + @echo " add_translation Add a new translation" + @echo " compile_translations Compile translation files" + @echo " pot Create or update translation template (.pot file)" + @echo " translations Create or update translation files" @echo "" diff --git a/.make/conf.d/git.mk b/.make/conf.d/git.mk new file mode 100644 index 00000000..4567edb4 --- /dev/null +++ b/.make/conf.d/git.mk @@ -0,0 +1,27 @@ +.PHONY: git-clean-untracked +git-clean-untracked: + @echo "Cleaning untracked files and directories …" + @git clean -fd + +.PHONY: git-garbage-collection +git-garbage-collection: + @echo "Optimizing the repository with garbage collection …" + @git gc --prune=now --aggressive + +.PHONY: git-prune +git-prune: + @echo "Pruning unreachable objects …" + @git prune + +.PHONY: git-housekeeping +git-housekeeping: git-clean-untracked git-prune git-garbage-collection + @echo "Git housekeeping done …" + +.PHONY: help +help:: + @echo " $(TEXT_UNDERLINE)Git:$(TEXT_UNDERLINE_END)" + @echo " git-clean-untracked Cleaning untracked files and directories" + @echo " git-garbage-collection Optimizing the repository with garbage collection" + @echo " git-prune Pruning unreachable objects" + @echo " git-housekeeping Run all git housekeeping commands" + @echo "" diff --git a/.make/conf.d/tests.mk b/.make/conf.d/tests.mk index c8c408bb..816d2d1d 100644 --- a/.make/conf.d/tests.mk +++ b/.make/conf.d/tests.mk @@ -3,7 +3,7 @@ # Coverage .PHONY: coverage coverage: - @echo "Running tests and creating a coverage report" + @echo "Running tests and creating a coverage report …" @rm -rf htmlcov @coverage run ../myauth/manage.py \ test \ @@ -16,14 +16,14 @@ coverage: # Build test .PHONY: build_test build_test: - @echo "Building the package" + @echo "Building the package …" @rm -rf dist @python3 -m build # Tox tests .PHONY: tox_tests tox_tests: - @echo "Running tests with tox" + @echo "Running tests with tox …" @export USE_MYSQL=False; \ tox -v -e allianceauth-latest; \ rm -rf .tox/ diff --git a/CHANGELOG.md b/CHANGELOG.md index d4644383..c3b41005 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,16 @@ Section Order: ### Security --> +## [3.4.3] - 2024-12-14 + +### Added + +- Python 3.13 to the test matrix + +### Changed + +- Translations updated + ## [3.4.2] - 2024-11-28 ### Added diff --git a/Makefile b/Makefile index b66f3838..aac43d3b 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,9 @@ appname = aa-fleetpings appname_verbose = AA Fleet Pings package = fleetpings -translation_template = $(package)/locale/django.pot +translation_directory = $(package)/locale +translation_template = $(translation_directory)/django.pot +translation_file_relative_path = LC_MESSAGES/django.po git_repository = https://github.com/ppfeufer/$(appname) git_repository_issues = $(git_repository)/issues @@ -34,7 +36,7 @@ confirm: # Graph models .PHONY: graph_models graph_models: - @echo "Creating a graph of the models" + @echo "Creating a graph of the models …" @python ../myauth/manage.py \ graph_models \ $(package) \ @@ -44,13 +46,24 @@ graph_models: # Prepare a new release # Update the graph of the models, translation files and the version in the package .PHONY: prepare-release -prepare-release: graph_models translations +prepare-release: graph_models pot @echo "" - @echo "Preparing a release" + @echo "Preparing a release …" @read -p "New Version Number: " new_version; \ sed -i "/__version__/c\__version__ = \"$$new_version\"" $(package)/__init__.py; \ sed -i "/\"Project-Id-Version: /c\\\"Project-Id-Version: $(appname_verbose) $$new_version\\\n\"" $(translation_template); \ sed -i "/\"Report-Msgid-Bugs-To: /c\\\"Report-Msgid-Bugs-To: $(git_repository_issues)\\\n\"" $(translation_template); \ +# subdircount=$$(find $(translation_directory) -mindepth 1 -maxdepth 1 -type d | wc -l); \ +# if [[ $$subdircount -gt 1 ]]; then \ +# for path in $(translation_directory)/*/; do \ +# [ -d "$$path/LC_MESSAGES" ] || continue; \ +# if [[ -f "$$path/$(translation_file_relative_path)" ]] \ +# then \ +# sed -i "/\"Project-Id-Version: /c\\\"Project-Id-Version: $(appname_verbose) $$new_version\\\n\"" $$path/$(translation_file_relative_path); \ +# sed -i "/\"Report-Msgid-Bugs-To: /c\\\"Report-Msgid-Bugs-To: $(git_repository_issues)\\\n\"" $$path/$(translation_file_relative_path); \ +# fi; \ +# done; \ +# fi; echo "Updated version in $(TEXT_BOLD)$(package)/__init__.py$(TEXT_BOLD_END)" # Help diff --git a/fleetpings/__init__.py b/fleetpings/__init__.py index c1cfd77e..e3d794f1 100644 --- a/fleetpings/__init__.py +++ b/fleetpings/__init__.py @@ -6,5 +6,5 @@ # Django from django.utils.translation import gettext_lazy as _ -__version__ = "3.4.2" +__version__ = "3.4.3" __title__ = _("Fleet Pings") diff --git a/fleetpings/locale/cs_CZ/LC_MESSAGES/django.po b/fleetpings/locale/cs_CZ/LC_MESSAGES/django.po index 7e896d71..4a20841a 100644 --- a/fleetpings/locale/cs_CZ/LC_MESSAGES/django.po +++ b/fleetpings/locale/cs_CZ/LC_MESSAGES/django.po @@ -5,8 +5,8 @@ # Peter Pfeufer , 2024. msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" +"Project-Id-Version: AA Fleet Pings 3.4.2\n" +"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetpings/issues\n" "POT-Creation-Date: 2024-11-28 00:00+0100\n" "PO-Revision-Date: 2024-11-09 11:25+0000\n" "Last-Translator: Peter Pfeufer \n" diff --git a/fleetpings/locale/de/LC_MESSAGES/django.po b/fleetpings/locale/de/LC_MESSAGES/django.po index 3e63597a..e8f48e4f 100644 --- a/fleetpings/locale/de/LC_MESSAGES/django.po +++ b/fleetpings/locale/de/LC_MESSAGES/django.po @@ -4,8 +4,8 @@ # "H. Peter Pfeufer" , 2023, 2024. msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" +"Project-Id-Version: AA Fleet Pings 3.4.2\n" +"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetpings/issues\n" "POT-Creation-Date: 2024-11-28 00:00+0100\n" "PO-Revision-Date: 2024-11-27 23:06+0000\n" "Last-Translator: Peter Pfeufer \n" diff --git a/fleetpings/locale/django.pot b/fleetpings/locale/django.pot index a8464c68..dacd106d 100644 --- a/fleetpings/locale/django.pot +++ b/fleetpings/locale/django.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-28 00:00+0100\n" +"Project-Id-Version: AA Fleet Pings 3.4.2\n" +"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetpings/issues\n" +"POT-Creation-Date: 2024-12-14 17:49+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/fleetpings/locale/es/LC_MESSAGES/django.po b/fleetpings/locale/es/LC_MESSAGES/django.po index 4423d9cd..cf7e3fd6 100644 --- a/fleetpings/locale/es/LC_MESSAGES/django.po +++ b/fleetpings/locale/es/LC_MESSAGES/django.po @@ -6,8 +6,8 @@ # Geovanny David Morales De la cruz , 2023, 2024. msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" +"Project-Id-Version: AA Fleet Pings 3.4.2\n" +"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetpings/issues\n" "POT-Creation-Date: 2024-11-28 00:00+0100\n" "PO-Revision-Date: 2024-12-02 17:40+0000\n" "Last-Translator: Peter Pfeufer \n" diff --git a/fleetpings/locale/fr_FR/LC_MESSAGES/django.po b/fleetpings/locale/fr_FR/LC_MESSAGES/django.po index 6af06698..33099a26 100644 --- a/fleetpings/locale/fr_FR/LC_MESSAGES/django.po +++ b/fleetpings/locale/fr_FR/LC_MESSAGES/django.po @@ -10,8 +10,8 @@ # balbozorre , 2024. msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" +"Project-Id-Version: AA Fleet Pings 3.4.2\n" +"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetpings/issues\n" "POT-Creation-Date: 2024-11-28 00:00+0100\n" "PO-Revision-Date: 2024-12-13 16:15+0000\n" "Last-Translator: Peter Pfeufer \n" diff --git a/fleetpings/locale/it_IT/LC_MESSAGES/django.po b/fleetpings/locale/it_IT/LC_MESSAGES/django.po index 64ad7bdb..36942923 100644 --- a/fleetpings/locale/it_IT/LC_MESSAGES/django.po +++ b/fleetpings/locale/it_IT/LC_MESSAGES/django.po @@ -5,8 +5,8 @@ # Peter Pfeufer , 2024. msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" +"Project-Id-Version: AA Fleet Pings 3.4.2\n" +"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetpings/issues\n" "POT-Creation-Date: 2024-11-28 00:00+0100\n" "PO-Revision-Date: 2024-11-09 11:25+0000\n" "Last-Translator: Peter Pfeufer \n" diff --git a/fleetpings/locale/ja/LC_MESSAGES/django.po b/fleetpings/locale/ja/LC_MESSAGES/django.po index d8b6c9a8..3f867b22 100644 --- a/fleetpings/locale/ja/LC_MESSAGES/django.po +++ b/fleetpings/locale/ja/LC_MESSAGES/django.po @@ -6,8 +6,8 @@ # Peter Pfeufer , 2024. msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" +"Project-Id-Version: AA Fleet Pings 3.4.2\n" +"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetpings/issues\n" "POT-Creation-Date: 2024-11-28 00:00+0100\n" "PO-Revision-Date: 2024-11-09 11:25+0000\n" "Last-Translator: Peter Pfeufer \n" diff --git a/fleetpings/locale/ko_KR/LC_MESSAGES/django.po b/fleetpings/locale/ko_KR/LC_MESSAGES/django.po index eab85500..774ebc99 100644 --- a/fleetpings/locale/ko_KR/LC_MESSAGES/django.po +++ b/fleetpings/locale/ko_KR/LC_MESSAGES/django.po @@ -6,8 +6,8 @@ # Mind of the Raven , 2024. msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" +"Project-Id-Version: AA Fleet Pings 3.4.2\n" +"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetpings/issues\n" "POT-Creation-Date: 2024-11-28 00:00+0100\n" "PO-Revision-Date: 2024-11-09 11:25+0000\n" "Last-Translator: Peter Pfeufer \n" diff --git a/fleetpings/locale/nl_NL/LC_MESSAGES/django.po b/fleetpings/locale/nl_NL/LC_MESSAGES/django.po index a2e7561f..c4fd4177 100644 --- a/fleetpings/locale/nl_NL/LC_MESSAGES/django.po +++ b/fleetpings/locale/nl_NL/LC_MESSAGES/django.po @@ -5,8 +5,8 @@ # msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" +"Project-Id-Version: AA Fleet Pings 3.4.2\n" +"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetpings/issues\n" "POT-Creation-Date: 2024-11-28 00:00+0100\n" "PO-Revision-Date: 2024-05-10 14:05+0000\n" "Last-Translator: Anonymous \n" diff --git a/fleetpings/locale/pl_PL/LC_MESSAGES/django.po b/fleetpings/locale/pl_PL/LC_MESSAGES/django.po index 0e9ca4a9..f8dd166e 100644 --- a/fleetpings/locale/pl_PL/LC_MESSAGES/django.po +++ b/fleetpings/locale/pl_PL/LC_MESSAGES/django.po @@ -4,8 +4,8 @@ # Peter Pfeufer , 2024. msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" +"Project-Id-Version: AA Fleet Pings 3.4.2\n" +"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetpings/issues\n" "POT-Creation-Date: 2024-11-28 00:00+0100\n" "PO-Revision-Date: 2024-05-10 14:05+0000\n" "Last-Translator: Peter Pfeufer \n" diff --git a/fleetpings/locale/ru/LC_MESSAGES/django.po b/fleetpings/locale/ru/LC_MESSAGES/django.po index 345506c1..583da31c 100644 --- a/fleetpings/locale/ru/LC_MESSAGES/django.po +++ b/fleetpings/locale/ru/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ # Roycce_ , 2024. msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" +"Project-Id-Version: AA Fleet Pings 3.4.2\n" +"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetpings/issues\n" "POT-Creation-Date: 2024-11-28 00:00+0100\n" "PO-Revision-Date: 2024-11-09 11:25+0000\n" "Last-Translator: Peter Pfeufer \n" diff --git a/fleetpings/locale/sk/LC_MESSAGES/django.po b/fleetpings/locale/sk/LC_MESSAGES/django.po index 011aa116..8288059b 100644 --- a/fleetpings/locale/sk/LC_MESSAGES/django.po +++ b/fleetpings/locale/sk/LC_MESSAGES/django.po @@ -5,8 +5,8 @@ # msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" +"Project-Id-Version: AA Fleet Pings 3.4.2\n" +"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetpings/issues\n" "POT-Creation-Date: 2024-11-28 00:00+0100\n" "PO-Revision-Date: 2024-05-10 14:05+0000\n" "Last-Translator: Anonymous \n" diff --git a/fleetpings/locale/uk/LC_MESSAGES/django.po b/fleetpings/locale/uk/LC_MESSAGES/django.po index 40f3d725..02bc8ab7 100644 --- a/fleetpings/locale/uk/LC_MESSAGES/django.po +++ b/fleetpings/locale/uk/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ # Madz Cooper , 2024. msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" +"Project-Id-Version: AA Fleet Pings 3.4.2\n" +"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetpings/issues\n" "POT-Creation-Date: 2024-11-28 00:00+0100\n" "PO-Revision-Date: 2024-11-09 11:25+0000\n" "Last-Translator: Peter Pfeufer \n" diff --git a/fleetpings/locale/zh_Hans/LC_MESSAGES/django.po b/fleetpings/locale/zh_Hans/LC_MESSAGES/django.po index 8c0eb712..726e0ba2 100644 --- a/fleetpings/locale/zh_Hans/LC_MESSAGES/django.po +++ b/fleetpings/locale/zh_Hans/LC_MESSAGES/django.po @@ -8,8 +8,8 @@ # Peter Pfeufer , 2024. msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" +"Project-Id-Version: AA Fleet Pings 3.4.2\n" +"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetpings/issues\n" "POT-Creation-Date: 2024-11-28 00:00+0100\n" "PO-Revision-Date: 2024-11-09 11:25+0000\n" "Last-Translator: Peter Pfeufer \n" diff --git a/tox.ini b/tox.ini index 32a61268..775f8a13 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ requires = tox>=4.2 env_list = allianceauth-{latest, testing} - py{312, 311, 310} + py{313, 312, 311, 310} no_package = true usedevelop = True