Localization support
- Langage dominant
- Java
- Étoiles
- 102
- Forks
- 18
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Intake should provide some sort of support for localizations. This affects two fields:
1. **Internal localization:** All hard-coded strings should be externalized in a Java ResourceBundle and some behaviour might need to be updated in order to work as expected in an localized environment. Some points might need discussion:
- Intake has several internal runtime exceptions that the end-user should never see (e.g. `ParametricException`). These might not need localization.
- It might be a good idea to allow users to alter or replace the internal localization logic by providing custom translations. In that case the two entry points are `ParametricBuilder` and `CommandGraph`.
2. **External localization:** The values in command annotations, specifically description and help, need localization support. The entry point here is the `ParametricBuilder`.
- If localizations use key -> value relationships, as enforced by Java resource bundles, description and help methods would need to return the key. This contradicts the current behaviour where both methods return the actual value, so a support for that old, non localised behaviour is needed.
On both fields, the support should be as flexible as possible and do not enforce any specific way of handling `Locales` on the user.
---
Since I need localization support in MyWarp, I have implemented a limited localization support in my own Intake fork ([i18n branch](https://github.com/TheE/Intake/tree/i18n)). I would be happy to contribute these changes in a PR so there is something to discuss about, if the general direction fits.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par examiner la branche i18n existante ainsi que les points d’entrée ParametricBuilder et CommandGraph mentionnés dans l’issue, puis suivez la trace des messages d’exécution codés en dur et des descriptions et de l’aide des annotations de commandes. Comparez l’approche Java ResourceBundle proposée avec le comportement actuel et la discussion des neuf commentaires. Le travail sera considéré comme terminé lorsqu’une conception de localisation flexible et approuvée couvrira les messages internes et le texte des commandes externes.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java
- Domaine
- cli, internationalization
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 25/100