Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direction map with langusge #388

Open
Sanazzzmi opened this issue Nov 15, 2024 · 1 comment
Open

Direction map with langusge #388

Sanazzzmi opened this issue Nov 15, 2024 · 1 comment
Labels

Comments

@Sanazzzmi
Copy link

Sanazzzmi commented Nov 15, 2024

Module

geospatial/base_geoengine

Describe the bug

First Issue:

For languages like Arabic and Persian, which have a right-to-left (RTL) text direction, the map view's popup location behaves incorrectly when the user's language is changed in Odoo.

Proposed Fix:

In the file geospatial/base_geoengine/static/src/js/views/geoengine/geoengine_renderer/geoengine_renderer.xml, update line 6 by adding the following style attribute to the div with the class map_container:

<div class="map_container" style="/*rtl:ignore*/ direction: ltr /*rtl:ignore*/;">
    <div id="olmap" />
</div>

Second Issue:

The text inside the popup also displays incorrectly.

Proposed Fix:

In the same file, update line 16 by adding the text-start class to the div with the ID popup as follows:

<div id="popup" class="ol-popup text-start">

To Reproduce

Affected versions: All Odoo versions where the base_geoengine module is implemented.

Steps to reproduce the behavior:

  1. Change the user language to a right-to-left language like Arabic or Persian.
  2. Open the map view in the affected module.
  3. Observe the incorrect behavior of the popup's position and text alignment.

Expected behavior

The popup should display correctly with proper positioning and text alignment, regardless of the language's text direction.

@Sanazzzmi Sanazzzmi added the bug label Nov 15, 2024
@fardinmardani
Copy link

fardinmardani commented Nov 15, 2024

Comment:

Thank you for bringing attention to these issues with RTL text direction in the map view. Given the importance of supporting right-to-left languages like Arabic and Persian for our users, I urge that these proposed fixes be applied as soon as possible. Proper positioning and text alignment in popups are crucial for usability and accessibility.

I appreciate your prompt attention to this matter and look forward to seeing these changes implemented in the next update. If there’s any way I can assist in expediting this process, please let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants