Repository: digitalfabrik/integreat-cms

Issue:
Rename points of interest
### Motivation
<!-- A clear and concise description of what the motivation for the new feature is, and what problem it is solving. -->
The term "points of interest" (POIs) is not recognized as locations on the map.

### Proposed Solution
<!-- A clear and concise description of the feature you would like to add, and how it solves the motivating problem. -->
Change the wording, e.g.
- English: "Locations on map"
- German: "Orte auf Karte"
Rename points of interest
### Motivation
<!-- A clear and concise description of what the motivation for the new feature is, and what problem it is solving. -->
The term "points of interest" (POIs) is not recognized as locations on the map.

### Proposed Solution
<!-- A clear and concise description of the feature you would like to add, and how it solves the motivating problem. -->
Change the wording, e.g.
- English: "Locations on map"
- German: "Orte auf Karte"


Discussion:
Hey, @timoludwig I would like to work on this.
Can you please guide in which file I need to rename?
> Hey, @timoludwig I would like to work on this.

Nice, we really appreciate it!

> Can you please guide in which file I need to rename?

The string "Points of Interest" with "Locations on map" in following files:
- [src/cms/templates/_base.html](https://github.com/Integreat/cms-django/tree/develop/src/cms/templates/_base.html)
- [src/cms/templates/pois/poi_list.html](https://github.com/Integreat/cms-django/tree/develop/src/cms/templates/pois/poi_list.html)
- [src/cms/templates/pois/poi_list_archived.html](https://github.com/Integreat/cms-django/tree/develop/src/cms/templates/pois/poi_list_archived.html)

The string "POI" with "Locations on map" (only in strings, not in class names) in the following files:
- [src/cms/views/pois/poi_view.py](https://github.com/Integreat/cms-django/tree/develop/src/cms/views/pois/poi_view.py)
- [src/cms/views/pois/poi_actions.py](https://github.com/Integreat/cms-django/tree/develop/src/cms/views/pois/poi_actions.py)
- [src/cms/views/pois/poi_list_view.py](https://github.com/Integreat/cms-django/tree/develop/src/cms/views/pois/poi_list_view.py)

Please keep an eye on lower/upper case.
After that, execute `./dev-tools/translate.sh` to re-create the language file [src/cms/locale/de/LC_MESSAGES/django.po](https://github.com/Integreat/cms-django/tree/develop/src/cms/locale/de/LC_MESSAGES/django.po).
Then, insert the German translation "Orte auf Karte" in the related `msgstr` sections of the language file.

Feel free to ask any questions, if you feel uncomfortable with the German translations, you can also only change the English strings and we will add the rest. Thanks in advance!
@timoludwig I made all the changes but I could not run the ./dev-tools/install.sh command hence the ./dev-tools/translate.sh.
I am using windows (cmd prompt) could you please guide me which software I need to download so that I can run ./dev-tools/translate.sh command.
Thanks for your guidance.
I was able to install our CMS on Windows using the [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/). See [our documentation](https://integreat.github.io/cms-django/installation.html) for more information.

If you think this is too much work for this task, you can just push your changes and I will adjust the translations.
Hey, @timoludwig I would like to work on this.
Can you please guide in which file I need to rename?
> Hey, @timoludwig I would like to work on this.

Nice, we really appreciate it!

> Can you please guide in which file I need to rename?

The string "Points of Interest" with "Locations on map" in following files:
- [src/cms/templates/_base.html](https://github.com/Integreat/cms-django/tree/develop/src/cms/templates/_base.html)
- [src/cms/templates/pois/poi_list.html](https://github.com/Integreat/cms-django/tree/develop/src/cms/templates/pois/poi_list.html)
- [src/cms/templates/pois/poi_list_archived.html](https://github.com/Integreat/cms-django/tree/develop/src/cms/templates/pois/poi_list_archived.html)

The string "POI" with "Locations on map" (only in strings, not in class names) in the following files:
- [src/cms/views/pois/poi_view.py](https://github.com/Integreat/cms-django/tree/develop/src/cms/views/pois/poi_view.py)
- [src/cms/views/pois/poi_actions.py](https://github.com/Integreat/cms-django/tree/develop/src/cms/views/pois/poi_actions.py)
- [src/cms/views/pois/poi_list_view.py](https://github.com/Integreat/cms-django/tree/develop/src/cms/views/pois/poi_list_view.py)

Please keep an eye on lower/upper case.
After that, execute `./dev-tools/translate.sh` to re-create the language file [src/cms/locale/de/LC_MESSAGES/django.po](https://github.com/Integreat/cms-django/tree/develop/src/cms/locale/de/LC_MESSAGES/django.po).
Then, insert the German translation "Orte auf Karte" in the related `msgstr` sections of the language file.

Feel free to ask any questions, if you feel uncomfortable with the German translations, you can also only change the English strings and we will add the rest. Thanks in advance!
@timoludwig I made all the changes but I could not run the ./dev-tools/install.sh command hence the ./dev-tools/translate.sh.
I am using windows (cmd prompt) could you please guide me which software I need to download so that I can run ./dev-tools/translate.sh command.
Thanks for your guidance.
I was able to install our CMS on Windows using the [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/). See [our documentation](https://integreat.github.io/cms-django/installation.html) for more information.

If you think this is too much work for this task, you can just push your changes and I will adjust the translations.

Resolving patch:
diff --git a/src/cms/views/pois/poi_actions.py b/src/cms/views/pois/poi_actions.py
--- a/src/cms/views/pois/poi_actions.py
+++ b/src/cms/views/pois/poi_actions.py
@@ -24,7 +24,7 @@ def archive_poi(request, poi_id, region_slug, language_code):
     poi.archived = True
     poi.save()
 
-    messages.success(request, _("POI was successfully archived."))
+    messages.success(request, _("Location was successfully archived."))
 
     return redirect(
         "pois",
@@ -44,7 +44,7 @@ def restore_poi(request, poi_id, region_slug, language_code):
     poi.archived = False
     poi.save()
 
-    messages.success(request, _("POI was successfully restored."))
+    messages.success(request, _("Location was successfully restored."))
 
     return redirect(
         "pois",
@@ -61,7 +61,7 @@ def delete_poi(request, poi_id, region_slug, language_code):
 
     poi = POI.objects.get(id=poi_id)
     poi.delete()
-    messages.success(request, _("POI was successfully deleted."))
+    messages.success(request, _("Location was successfully deleted."))
 
     return redirect(
         "pois",
diff --git a/src/cms/views/pois/poi_list_view.py b/src/cms/views/pois/poi_list_view.py
--- a/src/cms/views/pois/poi_list_view.py
+++ b/src/cms/views/pois/poi_list_view.py
@@ -44,7 +44,9 @@ def get(self, request, *args, **kwargs):
         else:
             messages.error(
                 request,
-                _("Please create at least one language node before creating POIs."),
+                _(
+                    "Please create at least one language node before creating locations."
+                ),
             )
             return redirect(
                 "language_tree",
@@ -56,7 +58,9 @@ def get(self, request, *args, **kwargs):
         if language != region.default_language:
             messages.warning(
                 request,
-                _("You can only create POIs in the default language (%(language)s).")
+                _(
+                    "You can only create locations in the default language (%(language)s)."
+                )
                 % {"language": region.default_language.translated_name},
             )
 
diff --git a/src/cms/views/pois/poi_view.py b/src/cms/views/pois/poi_view.py
--- a/src/cms/views/pois/poi_view.py
+++ b/src/cms/views/pois/poi_view.py
@@ -42,7 +42,7 @@ def get(self, request, *args, **kwargs):
 
         if poi and poi.archived:
             messages.warning(
-                request, _("You cannot edit this POI because it is archived.")
+                request, _("You cannot edit this location because it is archived.")
             )
 
         poi_form = POIForm(instance=poi)
@@ -117,10 +117,10 @@ def post(self, request, *args, **kwargs):
             if not poi_instance:
                 if published:
                     messages.success(
-                        request, _("POI was successfully created and published.")
+                        request, _("Location was successfully created and published.")
                     )
                 else:
-                    messages.success(request, _("POI was successfully created."))
+                    messages.success(request, _("Location was successfully created."))
                 return redirect(
                     "edit_poi",
                     **{
@@ -130,9 +130,9 @@ def post(self, request, *args, **kwargs):
                     }
                 )
             if published:
-                messages.success(request, _("POI was successfully published."))
+                messages.success(request, _("Location was successfully published."))
             else:
-                messages.success(request, _("POI was successfully saved."))
+                messages.success(request, _("Location was successfully saved."))
 
         return render(
             request,


Test patch: