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

Improve translation #382

Open
wants to merge 3 commits into
base: gh-pages
Choose a base branch
from
Open

Conversation

fbarbe00
Copy link

This pull request includes updates to the internationalization (i18n) files for multiple languages and improvements to the translation handling in the codebase.
A new t function fetches the translation based on the selected language, with a fallback to English if the translation is not available, or to the key name if it's not available in English.

@frodrigo
Copy link
Member

Please, again. Make small atomic commit and PR. It is more easy to accept small PR with a clear point. I still have too many doubt on what the PR contains and doubts and questions retain the whole changes.

@fbarbe00
Copy link
Author

@frodrigo I have added a commit and improved the commit messages.

@frodrigo
Copy link
Member

Where come from the new translation key ? And in especially 'Bike', 'Car', 'Foot', 'Train'

This introduces a new function t(), which can be called to retrieve a
translation for a certain key value in a certain language.
If no translation is found in the current language, it defaults to
english. If no english translation is found, it returns the given key.
This is to avoid displaying "undefined" or no message at all.
Allow translation of service labels to other languages
@fbarbe00
Copy link
Author

Where come from the new translation key ? And in especially 'Bike', 'Car', 'Foot', 'Train'

These are translations of common label for services. Currently, the default service (backend) is named Car (fastest), but I suggested renaming it to Car in #381 . The other labels are also included by default in the routers (except for Train) in #381 . I can see why you don't want to have them here, in which case I can just remove them and have the user manually translate each service name they add, but I thought it'd be a nice addition.

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

Successfully merging this pull request may close these issues.

2 participants