diff --git a/config/prod.exs b/config/prod.exs index fc98b346f..718bc6289 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -30,6 +30,7 @@ config :mobilizon, :cldr, "fr", "gd", "gl", + "hr", "hu", "id", "it", diff --git a/js/src/components/Event/FullAddressAutoComplete.vue b/js/src/components/Event/FullAddressAutoComplete.vue index 0e6cfb510..eaaa92915 100644 --- a/js/src/components/Event/FullAddressAutoComplete.vue +++ b/js/src/components/Event/FullAddressAutoComplete.vue @@ -356,9 +356,6 @@ const queryText = ref(); const queryTextWithDefault = computed({ get() { - console.log("queryTextWithDefault 1", queryText.value); - console.log("queryTextWithDefault 2", selectedAddressText.value); - console.log("queryTextWithDefault 3", props.defaultText); return ( queryText.value ?? selectedAddressText.value ?? props.defaultText ?? "" ); diff --git a/js/src/components/NavBar.vue b/js/src/components/NavBar.vue index 423a662d3..bd0bff4cf 100644 --- a/js/src/components/NavBar.vue +++ b/js/src/components/NavBar.vue @@ -123,8 +123,8 @@ { }); const showMobileMenu = ref(false); + +const { oruga } = useProgrammatic(); + +const performLogout = async () => { + console.debug("Logging out client..."); + await logout(); + oruga.notification.open({ + message: t("You have been logged-out"), + variant: "success", + position: "bottom-right", + duration: 5000, + }); + + if (route.meta["requiredAuth"] === true) { + return router.push({ name: RouteName.HOME }); + } +}; diff --git a/js/src/i18n/en_US.json b/js/src/i18n/en_US.json index c45617d6e..4690f637d 100644 --- a/js/src/i18n/en_US.json +++ b/js/src/i18n/en_US.json @@ -371,7 +371,6 @@ "You can add tags by hitting the Enter key or by adding a comma": "You can add tags by hitting the Enter key or by adding a comma", "You can try another search term or drag and drop the marker on the map": "You can try another search term or drag and drop the marker on the map", "You don't follow any instances yet.": "You don't follow any instances yet.", - "You have been disconnected": "You have been disconnected", "You have cancelled your participation": "You have cancelled your participation", "You have one event in {days} days.": "You have no events in {days} days | You have one event in {days} days. | You have {count} events in {days} days", "You have one event today.": "You have no events today | You have one event today. | You have {count} events today", @@ -1563,5 +1562,7 @@ "This application asks for the following permissions:": "This application asks for the following permissions:", "This application will be allowed to see all of your events organized, the events you participate to, as well as every data from your groups.": "This application will be allowed to see all of your events organized, the events you participate to, as well as every data from your groups.", "This application will be allowed to publish and manage events, post and manage comments, participate to events, manage all of your groups, including group events, resources, posts and discussions. It will also be allowed to manage your account and profile settings.": "This application will be allowed to publish and manage events, post and manage comments, participate to events, manage all of your groups, including group events, resources, posts and discussions. It will also be allowed to manage your account and profile settings.", - "No apps authorized yet": "No apps authorized yet" + "No apps authorized yet": "No apps authorized yet", + "You have been logged-out": "You have been logged-out", + "An “application programming interface” or “API” is a communication protocol that allows software components to communicate with each other. The Mobilizon API, for example, can allow third-party software tools to communicate with Mobilizon instances to carry out certain actions, such as posting events on your behalf, automatically and remotely.": "An “application programming interface” or “API” is a communication protocol that allows software components to communicate with each other. The Mobilizon API, for example, can allow third-party software tools to communicate with Mobilizon instances to carry out certain actions, such as posting events on your behalf, automatically and remotely." } \ No newline at end of file diff --git a/js/src/i18n/fr_FR.json b/js/src/i18n/fr_FR.json index 2510c96a2..2b12e4bd9 100644 --- a/js/src/i18n/fr_FR.json +++ b/js/src/i18n/fr_FR.json @@ -1240,7 +1240,6 @@ "You don't have any upcoming events. Maybe try another filter?": "Vous n'avez pas d'événements à venir. Essayez peut-être un autre filtre ?", "You excluded member {member}.": "Vous avez exclu le ou la membre {member}.", "You have attended {count} events in the past.": "Vous n'avez participé à aucun événement par le passé.|Vous avez participé à un événement par le passé.|Vous avez participé à {count} événements par le passé.", - "You have been disconnected": "Vous avez été déconnecté⋅e", "You have been invited by {invitedBy} to the following group:": "Vous avez été invité par {invitedBy} à rejoindre le groupe suivant :", "You have been removed from this group's members.": "Vous avez été exclu⋅e des membres de ce groupe.", "You have cancelled your participation": "Vous avez annulé votre participation", @@ -1559,5 +1558,7 @@ "This application asks for the following permissions:": "Cette application demande les autorisations suivantes :", "This application will be allowed to see all of your events organized, the events you participate to, as well as every data from your groups.": "Cette application vous permettra de voir tous les événements que vous avez organisés, les événements auxquels vous participez, ainsi que toutes les données de vos groupes.", "This application will be allowed to publish and manage events, post and manage comments, participate to events, manage all of your groups, including group events, resources, posts and discussions. It will also be allowed to manage your account and profile settings.": "Cette application sera autorisée à publier et à gérer des événements, à publier et à gérer des commentaires, à participer à des événements, à gérer tous vos groupes, y compris les événements de groupe, les ressources, les messages et les discussions. Elle pourra également gérer les paramètres de votre compte et de votre profil.", - "No apps authorized yet": "Aucune application autorisée pour le moment" + "No apps authorized yet": "Aucune application autorisée pour le moment", + "You have been logged-out": "Vous avez été déconnecté·e", + "An “application programming interface” or “API” is a communication protocol that allows software components to communicate with each other. The Mobilizon API, for example, can allow third-party software tools to communicate with Mobilizon instances to carry out certain actions, such as posting events on your behalf, automatically and remotely.": "Une « interface de programmation d’application » ou « API » est un protocole de communication qui permet aux composants logiciels de communiquer entre eux. L'API Mobilizon, par exemple, peut permettre à des outils logiciels tiers de communiquer avec les instances Mobilizon pour effectuer certaines actions, telles que la publication d'événements en votre nom, automatiquement et à distance." } diff --git a/js/src/i18n/langs.json b/js/src/i18n/langs.json index e0a717dd7..f7ab603a8 100644 --- a/js/src/i18n/langs.json +++ b/js/src/i18n/langs.json @@ -12,9 +12,11 @@ "fr": "Français", "gd": "Gàidhlig", "gl": "Galego", + "hr": "Hrvatski", "hu": "Magyar", "id": "Bahasa Indonesia", "it": "Italiano", + "ja": "日本語", "nl": "Nederlands", "nn": "Nynorsk", "oc": "Occitan", diff --git a/js/src/i18n/sv.json b/js/src/i18n/sv.json index cc10ddd60..06ba7dbde 100644 --- a/js/src/i18n/sv.json +++ b/js/src/i18n/sv.json @@ -1183,7 +1183,7 @@ "your notification settings": "", "{'@'}{username}": "", "{approved} / {total} seats": "{approved} / {total} platser", - "{available}/{capacity} available places": "Inga platser kvar|{tillgängliga}/{kapacitet} tillgängliga platser", + "{available}/{capacity} available places": "Inga platser kvar|{available}/{capacity} tillgängliga platser", "{count} km": "", "{count} members": "", "{count} members or followers": "", diff --git a/js/src/views/About/GlossaryView.vue b/js/src/views/About/GlossaryView.vue index d18b5b210..7ac4e1d62 100644 --- a/js/src/views/About/GlossaryView.vue +++ b/js/src/views/About/GlossaryView.vue @@ -10,7 +10,7 @@ }}

-
{{ t("Instance") }}
+
{{ t("Instance") }}
{{ config.name }} -
{{ t("Instance administrator") }}
-
+
{{ t("Instance administrator") }}
+
{{ t( "The instance administrator is the person or entity that runs this Mobilizon instance." ) }}
-
{{ t("Application") }}
-
+
{{ t("Application") }}
+
{{ t( "In the following context, an application is a software, either provided by the Mobilizon team or by a 3rd-party, used to interact with your instance." ) }}
-
{{ t("API") }}
-
+
{{ t("API") }}
+
{{ t( "An “application programming interface” or “API” is a communication protocol that allows software components to communicate with each other. The Mobilizon API, for example, can allow third-party software tools to communicate with Mobilizon instances to carry out certain actions, such as posting events on your behalf, automatically and remotely." ) }}
-
{{ t("SSL/TLS") }}
+
{{ t("SSL/TLS") }}
-
{{ t("Cookies and Local storage") }}
-
+
{{ t("Cookies and Local storage") }}
+
{{ t( "A cookie is a small file containing information that is sent to your computer when you visit a website. When you visit the site again, the cookie allows that site to recognize your browser. Cookies may store user preferences and other information. You can configure your browser to refuse all cookies. However, this may result in some website features or services partially working. Local storage works the same way but allows you to store more data." diff --git a/js/src/views/HomeView.vue b/js/src/views/HomeView.vue index b82ae1a0b..15cacd6f3 100644 --- a/js/src/views/HomeView.vue +++ b/js/src/views/HomeView.vue @@ -236,9 +236,7 @@ const { result: aboutConfigResult } = useQuery<{ IConfig, "name" | "description" | "slogan" | "registrationsOpen" >; -}>(ABOUT, undefined, { - fetchPolicy: "cache-only", -}); +}>(ABOUT); const config = computed(() => aboutConfigResult.value?.config); diff --git a/js/src/views/SearchView.vue b/js/src/views/SearchView.vue index ad09e1d23..5d76def9c 100644 --- a/js/src/views/SearchView.vue +++ b/js/src/views/SearchView.vue @@ -868,20 +868,6 @@ const contentType = useRouteQuery( enumTransformer(ContentType) ); -watch(contentType, (newContentType: ContentType) => { - switch (newContentType) { - case ContentType.ALL: - page.value = 1; - break; - case ContentType.EVENTS: - eventPage.value = 1; - break; - case ContentType.GROUPS: - groupPage.value = 1; - break; - } -}); - const isOnline = useRouteQuery("isOnline", false, booleanTransformer); const categoryOneOf = useRouteQuery("categoryOneOf", [], arrayTransformer); const statusOneOf = useRouteQuery( @@ -1261,6 +1247,40 @@ const boostLanguagesQuery = computed((): string[] => { return Array.from(languages); }); +// When search criteria changes, reset page number to 1 +watch( + [ + contentType, + searchDebounced, + geoHashLocation, + start, + end, + radius, + isOnline, + categoryOneOf, + statusOneOf, + languageOneOf, + searchTarget, + bbox, + zoom, + sortBy, + boostLanguagesQuery, + ], + ([newContentType]) => { + switch (newContentType) { + case ContentType.ALL: + page.value = 1; + break; + case ContentType.EVENTS: + eventPage.value = 1; + break; + case ContentType.GROUPS: + groupPage.value = 1; + break; + } + } +); + const { result: searchElementsResult, loading: searchLoading } = useQuery<{ searchEvents: Paginate>; searchGroups: Paginate>; diff --git a/js/src/views/Settings/AccountSettings.vue b/js/src/views/Settings/AccountSettings.vue index fbe1a1414..001328f04 100644 --- a/js/src/views/Settings/AccountSettings.vue +++ b/js/src/views/Settings/AccountSettings.vue @@ -187,7 +187,8 @@ :placeholder="t('Password')" />