You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So a translation key would be search-bar.dropdown.export-maps
This was a bad choice.
This format introduces a lot of duplication, makes it time-consuming to find the right place to add new translations, and complicates inferring the correct translation key to use in React components. Additionally, it increases the risk of using invalid translation keys.
Solution
We need to switch to this format for translations:
"Search a map": "Search a map",
"Filters": "Filters",
"Export maps": "Export maps""Delete maps": "Delete maps""Delete duplicates": "Delete duplicates"
(For the English translation, keys and values will almost always be the same)
With this format, there's no need to figure out where to place new translations : just add them at the end.
All duplicated translations will be merged into a single translation key.
We can infer a Translatable type directly from the translation file:
And any invalid translation key will be handled by TypeScript:
The text was updated successfully, but these errors were encountered:
Problem
At the beginning of the project, we chose this format for translations:
So a translation key would be
search-bar.dropdown.export-maps
This was a bad choice.
This format introduces a lot of duplication, makes it time-consuming to find the right place to add new translations, and complicates inferring the correct translation key to use in React components. Additionally, it increases the risk of using invalid translation keys.
Solution
We need to switch to this format for translations:
(For the English translation, keys and values will almost always be the same)
With this format, there's no need to figure out where to place new translations : just add them at the end.

All duplicated translations will be merged into a single translation key.
We can infer a
Translatable
type directly from the translation file:And any invalid translation key will be handled by TypeScript:
The text was updated successfully, but these errors were encountered: