From 2c4e494e6e87ac3f4aac5a64adc479b135625bf5 Mon Sep 17 00:00:00 2001 From: Anne Schuth Date: Sat, 19 Oct 2024 18:51:10 +0200 Subject: [PATCH] Rename phase to lifecycle --- amt/locale/base.pot | 9 +++------ amt/locale/en_US/LC_MESSAGES/messages.mo | Bin 451 -> 451 bytes amt/locale/en_US/LC_MESSAGES/messages.po | 15 +++++++++------ amt/locale/nl_NL/LC_MESSAGES/messages.mo | Bin 10830 -> 10765 bytes amt/locale/nl_NL/LC_MESSAGES/messages.po | 17 ++++------------- amt/repositories/projects.py | 12 ++++++------ amt/site/templates/parts/filter_list.html.j2 | 4 ++-- 7 files changed, 24 insertions(+), 33 deletions(-) diff --git a/amt/locale/base.pot b/amt/locale/base.pot index f025a5a4..1841aea2 100644 --- a/amt/locale/base.pot +++ b/amt/locale/base.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2024-10-17 13:18+0000\n" +"POT-Creation-Date: 2024-10-20 07:35+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -397,7 +397,8 @@ msgid "Algorithm system name" msgstr "" #: amt/site/templates/parts/filter_list.html.j2:99 -msgid "Phase" +#: amt/site/templates/projects/new.html.j2:37 +msgid "Lifecycle" msgstr "" #: amt/site/templates/parts/header.html.j2:7 @@ -602,10 +603,6 @@ msgstr "" msgid "Your algorithm system name here" msgstr "" -#: amt/site/templates/projects/new.html.j2:37 -msgid "Lifecycle" -msgstr "" - #: amt/site/templates/projects/new.html.j2:39 msgid "Select the lifecycle your algorithm system is currently in." msgstr "" diff --git a/amt/locale/en_US/LC_MESSAGES/messages.mo b/amt/locale/en_US/LC_MESSAGES/messages.mo index ff2d43bd6caf604e9e6a02360ed6b6b6d2426be3..83f6740ce03c99aa4007d33ff6fee79a0dd3e5ae 100644 GIT binary patch delta 22 dcmX@ie3*H{1a2b(1p{*{V^eJdqm8pQ7y(Y321Nh> delta 22 dcmX@ie3*H{1a3of1w&&iLkn#KgN?H_7y(Yo21ft@ diff --git a/amt/locale/en_US/LC_MESSAGES/messages.po b/amt/locale/en_US/LC_MESSAGES/messages.po index 3b18d751..2520304a 100644 --- a/amt/locale/en_US/LC_MESSAGES/messages.po +++ b/amt/locale/en_US/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2024-10-17 13:18+0000\n" +"POT-Creation-Date: 2024-10-20 07:35+0200\n" "PO-Revision-Date: 2024-07-25 21:01+0200\n" "Last-Translator: FULL NAME \n" "Language: en_US\n" @@ -398,7 +398,8 @@ msgid "Algorithm system name" msgstr "" #: amt/site/templates/parts/filter_list.html.j2:99 -msgid "Phase" +#: amt/site/templates/projects/new.html.j2:37 +msgid "Lifecycle" msgstr "" #: amt/site/templates/parts/header.html.j2:7 @@ -603,10 +604,6 @@ msgstr "" msgid "Your algorithm system name here" msgstr "" -#: amt/site/templates/projects/new.html.j2:37 -msgid "Lifecycle" -msgstr "" - #: amt/site/templates/projects/new.html.j2:39 msgid "Select the lifecycle your algorithm system is currently in." msgstr "" @@ -713,3 +710,9 @@ msgstr "" #~ "manner." #~ msgstr "" +#~ msgid "Lifecyle" +#~ msgstr "" + +#~ msgid "Phase" +#~ msgstr "" + diff --git a/amt/locale/nl_NL/LC_MESSAGES/messages.mo b/amt/locale/nl_NL/LC_MESSAGES/messages.mo index 1c81be2b8f8fb80a0a1be4b519e0c6430ca5e466..783970a91a18dc0d23d4b7e1f46ea17aef1b39d7 100644 GIT binary patch delta 2426 zcmYM!e@K;A9LMpmdNpra&Yxw@x~7#)niuV-R&0xkjGD{ak6Bc641+|Xwti7ONu&j} z($!jy1(Rf~g=@PMV)U04V`RuM*jTguAzQ6Kl932?y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jS&n{;Bj>|Bf(rONYM~S=P_G^Lp$Zs89j^CLfk#m59YSrz7ubY9;|7dy@N)FR z=me_eJ*dF@aTwo4WqRLYPBd;pwe(}m#YyW$)N6Ygb!Ps?JoIxC31A9Pg_NLLUWYW< zG+~xr*zH_6Omv|Z9zeBb2({25R7J<}Asj<>#J|+5un5(G#i;x4!~jMyA7iL>8__sU z%5hq@b|#%29qq}^u1r&4ZJxjL*^b1^nY~2~S+hDa--d4Zg3)`N=<-$3`kF{2Gd1tt U{7i1RJImMDmh8y%RQLM+1ARpAVE_OC diff --git a/amt/locale/nl_NL/LC_MESSAGES/messages.po b/amt/locale/nl_NL/LC_MESSAGES/messages.po index c1124e6e..b5fa9ca5 100644 --- a/amt/locale/nl_NL/LC_MESSAGES/messages.po +++ b/amt/locale/nl_NL/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2024-10-17 13:18+0000\n" +"POT-Creation-Date: 2024-10-20 07:35+0200\n" "PO-Revision-Date: 2024-07-25 21:01+0200\n" "Last-Translator: FULL NAME \n" "Language: nl_NL\n" @@ -416,8 +416,9 @@ msgid "Algorithm system name" msgstr "Algoritme systeem naam" #: amt/site/templates/parts/filter_list.html.j2:99 -msgid "Phase" -msgstr "Fase" +#: amt/site/templates/projects/new.html.j2:37 +msgid "Lifecycle" +msgstr "Levenscyclus" #: amt/site/templates/parts/header.html.j2:7 msgid "Beta Version" @@ -623,10 +624,6 @@ msgstr "Algoritmekader" msgid "Your algorithm system name here" msgstr "Jouw algoritme systeem naam hier" -#: amt/site/templates/projects/new.html.j2:37 -msgid "Lifecycle" -msgstr "Levenscyclus" - #: amt/site/templates/projects/new.html.j2:39 msgid "Select the lifecycle your algorithm system is currently in." msgstr "" @@ -689,9 +686,3 @@ msgstr "Creƫer Algoritme Systeem" msgid "Copy results and close" msgstr "Resultaten overnemen en sluiten" -#~ msgid "About us" -#~ msgstr "Over ons" - -#~ msgid "Contact" -#~ msgstr "Contact" - diff --git a/amt/repositories/projects.py b/amt/repositories/projects.py index b2a968fe..0df74d43 100644 --- a/amt/repositories/projects.py +++ b/amt/repositories/projects.py @@ -16,14 +16,14 @@ logger = logging.getLogger(__name__) -def sort_by_phase(project: Project) -> int: +def sort_by_lifecycle(project: Project) -> int: if project.lifecycle: return project.lifecycle.index else: return -1 -def sort_by_phase_reversed(project: Project) -> int: +def sort_by_lifecycle_reversed(project: Project) -> int: if project.lifecycle: return -project.lifecycle.index else: @@ -105,11 +105,11 @@ def paginate( # noqa result = list(self.session.execute(statement).scalars()) # todo: the good way to do sorting is to use an enum field (or any int field) # in the database so we can sort on that - if result and sort and "phase" in sort: - if sort["phase"] == "ascending": - result = sorted(result, key=sort_by_phase) + if result and sort and "lifecycle" in sort: + if sort["lifecycle"] == "ascending": + result = sorted(result, key=sort_by_lifecycle) else: - result = sorted(result, key=sort_by_phase_reversed) + result = sorted(result, key=sort_by_lifecycle_reversed) return result # noqa except Exception as e: logger.exception("Error paginating projects") diff --git a/amt/site/templates/parts/filter_list.html.j2 b/amt/site/templates/parts/filter_list.html.j2 index 18ef734c..534ea4f1 100644 --- a/amt/site/templates/parts/filter_list.html.j2 +++ b/amt/site/templates/parts/filter_list.html.j2 @@ -96,8 +96,8 @@ {{ sort_button('name', sort_by) }} - {% trans %}Phase{% endtrans %} - {{ sort_button('phase', sort_by) }} + {% trans %}Lifecycle{% endtrans %} + {{ sort_button('lifecycle', sort_by) }} {% trans %}Last updated{% endtrans %}