Skip to content

Commit

Permalink
[Fixes #6534] Missing translation tags in layer_list and layer_detail (
Browse files Browse the repository at this point in the history
…#6565)

* updated geo limit texts and cart [#6131]

* iso-categories translation msgid fix

* layer detail trans tags [FIXES #6534]

* adds layer list objects and layer detail iso category translations.

* Revert " - Add django-grappelli==2.14.2 admin interface"

This reverts commit c9f594c

* get Iso categories po texts back and updated german trans for geoapps. Defuzzied some strings

* added compiled .mo file

* - Revert "grappelli" removal

Co-authored-by: Alessio Fabiani <alessio.fabiani@geo-solutions.it>
(cherry picked from commit 437914c)
  • Loading branch information
gannebamm authored and afabiani committed Nov 10, 2020
1 parent 67390a1 commit 7f9cdff
Show file tree
Hide file tree
Showing 6 changed files with 302 additions and 401 deletions.
7 changes: 4 additions & 3 deletions geonode/api/resourcebase_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
GroupResource,
FILTER_TYPES)
from .paginator import CrossSiteXHRPaginator
from django.utils.translation import gettext as _

if settings.HAYSTACK_SEARCH:
from haystack.query import SearchQuerySet # noqa
Expand Down Expand Up @@ -767,7 +768,7 @@ def format_objects(self, objects):
formatted_obj['owner__username'] = username
formatted_obj['owner_name'] = full_name
if obj.category:
formatted_obj['category__gn_description'] = obj.category.gn_description
formatted_obj['category__gn_description'] = _(obj.category.gn_description)
if obj.group:
formatted_obj['group'] = obj.group
try:
Expand Down Expand Up @@ -969,7 +970,7 @@ def format_objects(self, objects):
formatted_obj['owner__username'] = username
formatted_obj['owner_name'] = full_name
if obj.category:
formatted_obj['category__gn_description'] = obj.category.gn_description
formatted_obj['category__gn_description'] = _(obj.category.gn_description)
if obj.group:
formatted_obj['group'] = obj.group
try:
Expand Down Expand Up @@ -1049,7 +1050,7 @@ def format_objects(self, objects):
formatted_obj['owner__username'] = username
formatted_obj['owner_name'] = full_name
if obj.category:
formatted_obj['category__gn_description'] = obj.category.gn_description
formatted_obj['category__gn_description'] = _(obj.category.gn_description)
if obj.group:
formatted_obj['group'] = obj.group
try:
Expand Down
40 changes: 20 additions & 20 deletions geonode/base/fixtures/initial_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"pk": 1,
"model": "base.topiccategory",
"fields": {
"description": "information pertaining to earth sciences. Examples: geophysical features and processes, geology, minerals, sciences dealing with the composition, structure and origin of the earth s rocks, risks of earthquakes, volcanic activity, landslides, gravity information, soils, permafrost, hydrogeology, erosion",
"description": "Information pertaining to earth sciences. Examples: geophysical features and processes, geology, minerals, sciences dealing with the composition, structure and origin of the earth s rocks, risks of earthquakes, volcanic activity, landslides, gravity information, soils, permafrost, hydrogeology, erosion.",
"gn_description": "Geoscientific Information",
"is_choice": true,
"fa_class": "fa-bullseye",
Expand All @@ -14,7 +14,7 @@
"pk": 2,
"model": "base.topiccategory",
"fields": {
"description": "rearing of animals and/or cultivation of plants. Examples: agriculture, irrigation, aquaculture, plantations, herding, pests and diseases affecting crops and livestock",
"description": "Rearing of animals and/or cultivation of plants. Examples: agriculture, irrigation, aquaculture, plantations, herding, pests and diseases affecting crops and livestock.",
"gn_description": "Farming",
"is_choice": true,
"fa_class": "fa-lemon-o",
Expand All @@ -25,7 +25,7 @@
"pk": 3,
"model": "base.topiccategory",
"fields": {
"description": "height above or below sea level. Examples: altitude, bathymetry, digital elevation models, slope, derived products",
"description": "Height above or below sea level. Examples: altitude, bathymetry, digital elevation models, slope, derived products.",
"gn_description": "Elevation",
"is_choice": true,
"fa_class": "fa-flag",
Expand All @@ -36,7 +36,7 @@
"pk": 4,
"model": "base.topiccategory",
"fields": {
"description": "energy, water and waste systems and communications infrastructure and services. Examples: hydroelectricity, geothermal, solar and nuclear sources of energy, water purification and distribution, sewage collection and disposal, electricity and gas distribution, data communication, telecommunication, radio, communication networks",
"description": "Energy, water and waste systems and communications infrastructure and services. Examples: hydroelectricity, geothermal, solar and nuclear sources of energy, water purification and distribution, sewage collection and disposal, electricity and gas distribution, data communication, telecommunication, radio, communication networks.",
"gn_description": "Utilities Communication",
"is_choice": true,
"fa_class": "fa-phone",
Expand All @@ -47,7 +47,7 @@
"pk": 5,
"model": "base.topiccategory",
"fields": {
"description": "features and characteristics of salt water bodies (excluding inland waters). Examples: tides, tidal waves, coastal information, reefs",
"description": "Features and characteristics of salt water bodies (excluding inland waters). Examples: tides, tidal waves, coastal information, reefs.",
"gn_description": "Oceans",
"is_choice": true,
"fa_class": "fa-anchor",
Expand All @@ -58,7 +58,7 @@
"pk": 6,
"model": "base.topiccategory",
"fields": {
"description": "legal land descriptions. Examples: political and administrative boundaries",
"description": "Legal land descriptions. Examples: political and administrative boundaries.",
"gn_description": "Boundaries",
"is_choice": true,
"fa_class": "fa-ellipsis-h",
Expand All @@ -69,7 +69,7 @@
"pk": 7,
"model": "base.topiccategory",
"fields": {
"description": "inland water features, drainage systems and their characteristics. Examples: rivers and glaciers, salt lakes, water utilization plans, dams, currents, floods, water quality, hydrographic charts",
"description": "Inland water features, drainage systems and their characteristics. Examples: rivers and glaciers, salt lakes, water utilization plans, dams, currents, floods, water quality, hydrographic charts.",
"gn_description": "Inland Waters",
"is_choice": true,
"fa_class": "fa-tint",
Expand All @@ -80,7 +80,7 @@
"pk": 8,
"model": "base.topiccategory",
"fields": {
"description": "military bases, structures, activities. Examples: barracks, training grounds, military transportation, information collection",
"description": "Military bases, structures, activities. Examples: barracks, training grounds, military transportation, information collection.",
"gn_description": "Intelligence Military",
"is_choice": true,
"fa_class": "fa-fighter-jet",
Expand All @@ -91,7 +91,7 @@
"pk": 9,
"model": "base.topiccategory",
"fields": {
"description": "environmental resources, protection and conservation. Examples: environmental pollution, waste storage and treatment, environmental impact assessment, monitoring environmental risk, nature reserves, landscape",
"description": "Environmental resources, protection and conservation. Examples: environmental pollution, waste storage and treatment, environmental impact assessment, monitoring environmental risk, nature reserves, landscape.",
"gn_description": "Environment",
"is_choice": true,
"fa_class": "fa-tree",
Expand All @@ -102,7 +102,7 @@
"pk": 10,
"model": "base.topiccategory",
"fields": {
"description": "positional information and services. Examples: addresses, geodetic networks, control points, postal zones and services, place names",
"description": "Positional information and services. Examples: addresses, geodetic networks, control points, postal zones and services, place names.",
"gn_description": "Location",
"is_choice": true,
"fa_class": "fa-map-marker",
Expand All @@ -113,7 +113,7 @@
"pk": 11,
"model": "base.topiccategory",
"fields": {
"description": "economic activities, conditions and employment. Examples: production, labour, revenue, commerce, industry, tourism and ecotourism, forestry, fisheries, commercial or subsistence hunting, exploration and exploitation of resources such as minerals, oil and gas",
"description": "Economic activities, conditions and employment. Examples: production, labour, revenue, commerce, industry, tourism and ecotourism, forestry, fisheries, commercial or subsistence hunting, exploration and exploitation of resources such as minerals, oil and gas.",
"gn_description": "Economy",
"is_choice": true,
"fa_class": "fa-shopping-cart",
Expand All @@ -124,7 +124,7 @@
"pk": 12,
"model": "base.topiccategory",
"fields": {
"description": "information used for appropriate actions for future use of the land. Examples: land use maps, zoning maps, cadastral surveys, land ownership",
"description": "Information used for appropriate actions for future use of the land. Examples: land use maps, zoning maps, cadastral surveys, land ownership.",
"gn_description": "Planning Cadastre",
"is_choice": true,
"fa_class": "fa-home",
Expand All @@ -135,7 +135,7 @@
"pk": 13,
"model": "base.topiccategory",
"fields": {
"description": "flora and/or fauna in natural environment. Examples: wildlife, vegetation, biological sciences, ecology, wilderness, sealife, wetlands, habitat",
"description": "Flora and/or fauna in natural environment. Examples: wildlife, vegetation, biological sciences, ecology, wilderness, sealife, wetlands, habitat.",
"gn_description": "Biota",
"is_choice": true,
"fa_class": "fa-leaf",
Expand All @@ -146,7 +146,7 @@
"pk": 14,
"model": "base.topiccategory",
"fields": {
"description": "health, health services, human ecology, and safety. Examples: disease and illness, factors affecting health, hygiene, substance abuse, mental and physical health, health services",
"description": "Health, health services, human ecology, and safety. Examples: disease and illness, factors affecting health, hygiene, substance abuse, mental and physical health, health services.",
"gn_description": "Health",
"is_choice": true,
"fa_class": "fa-stethoscope",
Expand All @@ -157,7 +157,7 @@
"pk": 15,
"model": "base.topiccategory",
"fields": {
"description": "base maps. Examples: land cover, topographic maps, imagery, unclassified images, annotations",
"description": "Base maps. Examples: land cover, topographic maps, imagery, unclassified images, annotations.",
"gn_description": "Imagery Base Maps Earth Cover",
"is_choice": true,
"fa_class": "fa-globe",
Expand All @@ -168,7 +168,7 @@
"pk": 16,
"model": "base.topiccategory",
"fields": {
"description": "means and aids for conveying persons and/or goods. Examples: roads, airports/airstrips, shipping routes, tunnels, nautical charts, vehicle or vessel location, aeronautical charts, railways",
"description": "Means and aids for conveying persons and/or goods. Examples: roads, airports/airstrips, shipping routes, tunnels, nautical charts, vehicle or vessel location, aeronautical charts, railways.",
"gn_description": "Transportation",
"is_choice": true,
"fa_class": "fa-truck",
Expand All @@ -179,7 +179,7 @@
"pk": 17,
"model": "base.topiccategory",
"fields": {
"description": "characteristics of society and cultures. Examples: settlements, anthropology, archaeology, education, traditional beliefs, manners and customs, demographic data, recreational areas and activities, social impact assessments, crime and justice, census information",
"description": "Characteristics of society and cultures. Examples: settlements, anthropology, archaeology, education, traditional beliefs, manners and customs, demographic data, recreational areas and activities, social impact assessments, crime and justice, census information.",
"gn_description": "Society",
"is_choice": true,
"fa_class": "fa-comments",
Expand All @@ -190,7 +190,7 @@
"pk": 18,
"model": "base.topiccategory",
"fields": {
"description": "man-made construction. Examples: buildings, museums, churches, factories, housing, monuments, shops, towers",
"description": "Man-made construction. Examples: buildings, museums, churches, factories, housing, monuments, shops, towers.",
"gn_description": "Structure",
"is_choice": true,
"fa_class": "fa-building",
Expand All @@ -201,7 +201,7 @@
"pk": 19,
"model": "base.topiccategory",
"fields": {
"description": "processes and phenomena of the atmosphere. Examples: cloud cover, weather, climate, atmospheric conditions, climate change, precipitation",
"description": "Processes and phenomena of the atmosphere. Examples: cloud cover, weather, climate, atmospheric conditions, climate change, precipitation.",
"gn_description": "Climatology Meteorology Atmosphere",
"is_choice": true,
"fa_class": "fa-cloud",
Expand All @@ -212,7 +212,7 @@
"pk": 20,
"model": "base.topiccategory",
"fields": {
"description": "settlements, anthropology, archaeology, education, traditional beliefs, manners and customs, demographic data, recreational areas and activities, social impact assessments, crime and justice, census information. Economic activities, conditions and employment",
"description": "Settlements, anthropology, archaeology, education, traditional beliefs, manners and customs, demographic data, recreational areas and activities, social impact assessments, crime and justice, census information. Economic activities, conditions and employment.",
"gn_description": "Population",
"is_choice": true,
"fa_class": "fa-male",
Expand Down
4 changes: 2 additions & 2 deletions geonode/base/templates/base/_resourcebase_info_panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@

{% if resource.category %}
<dt>{% trans "Category" %}</dt>
<dd><a href="{% url "search" %}?category__identifier__in={{ resource.category.identifier }}">{{ resource.category }}</a> {% if resource.category.description %}<a href="#category-more" data-toggle="collapse" data-target=".category-more"><i class="fa fa-info-circle"></i></a>{% endif %}</dd>
<dd><a href="{% url "search" %}?category__identifier__in={{ resource.category.identifier }}">{% trans resource.category.gn_description %}</a> {% if resource.category.description %}<a href="#category-more" data-toggle="collapse" data-target=".category-more"><i class="fa fa-info-circle"></i></a>{% endif %}</dd>
{% if resource.category.description %}
<dd class="category-more collapse">
{{ resource.category.description }}
{% trans resource.category.description %}
</dd>
{% endif %}
{% endif %}
Expand Down
Binary file modified geonode/locale/de/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit 7f9cdff

Please sign in to comment.