Commit avant changement d'agent vers devstral
This commit is contained in:
98
locales/README.md
Normal file
98
locales/README.md
Normal file
@ -0,0 +1,98 @@
|
||||
# Localization Files
|
||||
|
||||
This directory contains translation files for the Personotes application.
|
||||
|
||||
## Available Languages
|
||||
|
||||
- **English** (`en.json`) - Default language
|
||||
- **Français** (`fr.json`) - French translation
|
||||
|
||||
## File Structure
|
||||
|
||||
Each language file is a JSON file with nested keys for organizing translations:
|
||||
|
||||
```json
|
||||
{
|
||||
"app": {
|
||||
"name": "Personotes",
|
||||
"tagline": "Simple Markdown note-taking"
|
||||
},
|
||||
"menu": {
|
||||
"home": "Home",
|
||||
"search": "Search"
|
||||
},
|
||||
"errors": {
|
||||
"internalError": "Internal error"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Adding a New Language
|
||||
|
||||
To add support for a new language:
|
||||
|
||||
1. **Create a new JSON file** named with the language code (e.g., `es.json` for Spanish, `de.json` for German)
|
||||
2. **Copy the structure** from `en.json`
|
||||
3. **Translate all strings** to the target language
|
||||
4. **Keep placeholders intact**: Use `{{variable}}` syntax as-is (e.g., `{{filename}}`, `{{date}}`)
|
||||
5. **Test your translation** by setting the language in the application
|
||||
|
||||
### Language Codes
|
||||
|
||||
Use standard ISO 639-1 codes:
|
||||
- `en` - English
|
||||
- `fr` - Français (French)
|
||||
- `es` - Español (Spanish)
|
||||
- `de` - Deutsch (German)
|
||||
- `it` - Italiano (Italian)
|
||||
- `pt` - Português (Portuguese)
|
||||
- `ja` - 日本語 (Japanese)
|
||||
- `zh` - 中文 (Chinese)
|
||||
|
||||
## Variable Interpolation
|
||||
|
||||
Some strings contain variables in the format `{{variableName}}`. Keep these exactly as they are:
|
||||
|
||||
```json
|
||||
{
|
||||
"editor": {
|
||||
"confirmDelete": "Are you sure you want to delete this note ({{filename}})?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
In French:
|
||||
```json
|
||||
{
|
||||
"editor": {
|
||||
"confirmDelete": "Êtes-vous sûr de vouloir supprimer cette note ({{filename}}) ?"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Guidelines for Translators
|
||||
|
||||
1. **Consistency**: Use consistent terminology throughout
|
||||
2. **Context**: Consider the UI context (button labels should be short, help text can be longer)
|
||||
3. **Formality**: Match the tone of the original language
|
||||
4. **Special Characters**: Ensure proper encoding for special characters
|
||||
5. **Testing**: Test in the actual application to see how translations fit in the UI
|
||||
|
||||
## Contributing
|
||||
|
||||
To contribute a new translation:
|
||||
|
||||
1. Fork the repository
|
||||
2. Create your translation file (e.g., `locales/es.json`)
|
||||
3. Add the language to `languages` section in your file:
|
||||
```json
|
||||
"languages": {
|
||||
"en": "English",
|
||||
"fr": "Français",
|
||||
"es": "Español"
|
||||
}
|
||||
```
|
||||
4. Update this README with your language
|
||||
5. Submit a pull request
|
||||
|
||||
Thank you for helping make Personotes accessible to more users! 🌍
|
||||
Reference in New Issue
Block a user