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

FilterEditor locale translations #1834

Closed
fperucic opened this issue Jul 25, 2022 · 8 comments
Closed

FilterEditor locale translations #1834

fperucic opened this issue Jul 25, 2022 · 8 comments
Assignees
Labels
bug Something isn't working stale

Comments

@fperucic
Copy link

Bug

Describe the bug
FilterEditor strings are not translated, they are hardcoded in english

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Geostyler Demo'
  2. Click on 'Edit filter'
  3. See error

Expected behavior
User should see the translated strings

Screenshots
image

@fperucic fperucic added the bug Something isn't working label Jul 25, 2022
@jansule
Copy link
Contributor

jansule commented Jul 26, 2022

Thanks for the info @fperucic. Are you planning on providing a fix for this?

@fperucic
Copy link
Author

Hi, tried to fix this, but with no luck, due to lack of experience with TypeSript/React.

Fixes to the FilterTree.tsx seem easy for my level, since the locale is already there, but I do not where to start with TextFilterField.tsx and AttributeCombo.tsx

@jansule
Copy link
Contributor

jansule commented Jul 26, 2022

Alright, no problem. The general approach for adding locales is as follows:

  1. import needed files (example)
  2. add locale as default prop (example)
  3. set default value to english locale (example)
  4. add new locales to locales type (example)
  5. add new locales to i18n files (example)
  6. wrap component into localize hoc (example)
  7. use locales where needed (example)

It might help to take a look at ColorField, as this component is very lightweight.

@jansule
Copy link
Contributor

jansule commented Sep 14, 2022

The different filters themselves will now be translated (kudos to @mholthausen #1866).

image

What's still missing is a translation for the Change Filter text, as well as translations for the input placeholders and error texts.

@github-actions
Copy link

This issue is stale because it has been open for 180 days with no activity. Feel free to unstale it at any time by adding a comment.

@github-actions github-actions bot added the stale label Mar 14, 2023
@jansule
Copy link
Contributor

jansule commented Mar 17, 2023

This is still relevant.

@jansule jansule removed the stale label Mar 17, 2023
@github-actions
Copy link

This issue is stale because it has been open for 180 days with no activity. Feel free to unstale it at any time by adding a comment.

@github-actions github-actions bot added the stale label Sep 14, 2023
@KaiVolland
Copy link
Collaborator

This is solved with #1866

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

3 participants