-
Notifications
You must be signed in to change notification settings - Fork 14
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
Allow the display of different groups of suggestions depending on the language #711
Allow the display of different groups of suggestions depending on the language #711
Conversation
e5f06b5
to
ca6b324
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK c'est un peu complexe et discutable comme fonctionnalité, mais pourquoi pas.
docs/customization.md
Outdated
"type": 'trek' | 'service' | 'outdoor' | 'events' // if not set, default to `trek` | ||
} | ||
``` | ||
There are two ways to displays suggestions groups: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi donner les 2 méthodes, ça complique les choses.
Alors que la seconde méthode est dépréciée ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, i changed the documentation 👍
docs/customization.md
Outdated
} | ||
``` | ||
There are two ways to displays suggestions groups: | ||
- By using an `object` with the languages code as keys (feature available since 3.8.7 version). By this way you can optimize the valorization of a territory according to the selected language. If you don't need this feature (or if you want the same configuration for several language), use `default` key instead of a language code. The configuration in the example below displays 2 groups of suggestions for all languages except the English version with one different: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"By this way you can optimize the valorization..." à remplacer par "By this way you can differentiate the valorization..."
C'est pas forcément de l'optimisation... Mais uniquement de différencier les suggestions en fonction de la langue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 👍
On devrait aussi modifier le fichier d'exemple (https://github.com/GeotrekCE/Geotrek-rando-v3/blob/main/frontend/customization/config/home.json) pour mettre la nouvelle méthode d'écriture des suggestions, avec juste un bloc "default". |
dff7857
to
191d845
Compare
OK merci pour les modifications. |
191d845
to
fcf1316
Compare
With this PR there is now another way to display different suggestions group depending on the language
By setting an
object
with the languages code as keys instead of an array. By this way you can optimize the valorization of a territory according to the selected language. If you don't need this feature (or if you want the same configuration for several language), usedefault
key instead of a language code. The configuration in the example below displays 2 groups of suggestions for all languages except the English version with one different:For backward compatibility you can still use an
array
, this is the same behavior thatobject
with only adefault
key. For example: