geonode icon indicating copy to clipboard operation
geonode copied to clipboard

Does not display elements by selecting Persian language

Open milad000cu opened this issue 3 years ago • 5 comments

Expected Behavior

Show all elements in Persian Elements such as maps, documentation, dashboard and more Only the header is visible image

Actual Behavior

Show all elements and no difference in English and Persian

Steps to Reproduce the Problem

1.UI review in Persian language

Specifications

  • GeoNode version: master
  • Installation method (manual, GeoNode Docker, SPCGeoNode Docker):
  • Platform: demo
  • Additional details: image

milad000cu avatar Jan 20 '22 10:01 milad000cu

My guess is that this cannot work as https://github.com/GeoNode/geonode-mapstore-client/tree/master/geonode_mapstore_client/static/mapstore/gn-translations only knows about these translations: Bildschirmfoto 2022-01-21 um 09 43 34

@milad000cu contribution to language files is always welcome @giohappy maybe we should hide languages from the switcher that are not supported by ms-client

Bildschirmfoto 2022-01-21 um 09 44 53

t-book avatar Jan 21 '22 08:01 t-book

Isn't it possible to reuse some of the existing translations?

AlexGacon avatar Jan 21 '22 08:01 AlexGacon

@AlexGacon Unsure about it. As the translations target the new User Interface where things have been renamed (layer -> dataset). Also, it is in JSON format, not po as Django uses.

@gannebamm Up for a small code sprint when it fits for both of us? Maybe on a next conference if this will ever happen again. https://github.com/GeoNode/geonode-mapstore-client/blob/master/geonode_mapstore_client/static/mapstore/gn-translations/data.de-DE.json should be reviewed ;)

t-book avatar Jan 21 '22 08:01 t-book

Please check and we can translate it

milad000cu avatar Jan 21 '22 10:01 milad000cu

@milad000cu the situation with locales in master is a bit convoluted at the moment, and we hope it will be improved in the future. Some background:

  • the new client is based on the MapStore framework, which currently supports a fixed set of languages. This is the same set defined inside mapstore client repo, as reported by @t-book
  • extending this set requires adding languages to MapStore itself, and this is the point that we would like to improve / overcome
  • for the above reasons the default configured languages has been reduced in in https://github.com/GeoNode/geonode-mapstore-client/commit/11d85d716bfeeda727446d998c624343afa236c3 to make the client and GeoNode consistent.

The configuration only includes the 5 languages for which a real translation for the GeoNode client exists. 8 more languages would be available but, at the moment, thay don't have a translation. However, as soon as a translation for any of these 8 languages exist they can be activated buy simply changing the settings. On the other hand, if a language not included in this set is requried, a request for adding the language to MapStore is needed first.

If you have a contribution for persian I would invite you to send a Pull Request, then we will investigate how to overcome the current limitation or include it somehow inside the MapStore client.

I'm plaaning to add more information and documentation about locales as soon as things have been clarified.

giohappy avatar Jan 24 '22 09:01 giohappy