|
| 1 | +# Contributing to Input Language Screamer |
| 2 | + |
| 3 | +Thank you for your interest in contributing to Input Language Screamer! We welcome contributions from the community. |
| 4 | + |
| 5 | +## 🚀 Getting Started |
| 6 | + |
| 7 | +### Prerequisites |
| 8 | +- Visual Studio 2022 or VS Code |
| 9 | +- .NET 9.0 SDK |
| 10 | +- Windows 10/11 for testing |
| 11 | +- Git |
| 12 | + |
| 13 | +### Setting Up Development Environment |
| 14 | + |
| 15 | +1. **Fork the repository** |
| 16 | + ```bash |
| 17 | + # Fork on GitHub, then clone your fork |
| 18 | + git clone https://github.com/YOUR_USERNAME/OneBitSoftware.InputLanguageScreamer.git |
| 19 | + cd OneBitSoftware.InputLanguageScreamer |
| 20 | + ``` |
| 21 | + |
| 22 | +2. **Build the project** |
| 23 | + ```bash |
| 24 | + dotnet build |
| 25 | + ``` |
| 26 | + |
| 27 | +3. **Run the application** |
| 28 | + ```bash |
| 29 | + dotnet run --project Desktop/Desktop.csproj |
| 30 | + ``` |
| 31 | + |
| 32 | +## 🛠️ Development Guidelines |
| 33 | + |
| 34 | +### Code Style |
| 35 | +- Follow C# coding conventions |
| 36 | +- Use meaningful variable and method names |
| 37 | +- Add XML documentation comments for public APIs |
| 38 | +- Keep methods focused and single-purpose |
| 39 | + |
| 40 | +### Architecture |
| 41 | +- **`LanguageMonitorApp`**: System tray and application lifecycle |
| 42 | +- **`GlobalKeyboardHook`**: Windows API keyboard monitoring |
| 43 | +- **`LanguageAudioPlayer`**: Audio file management and playback |
| 44 | +- **`Program`**: Application entry point |
| 45 | + |
| 46 | +### Adding New Features |
| 47 | + |
| 48 | +1. **Create a feature branch** |
| 49 | + ```bash |
| 50 | + git checkout -b feature/your-feature-name |
| 51 | + ``` |
| 52 | + |
| 53 | +2. **Make your changes** |
| 54 | + - Follow existing code patterns |
| 55 | + - Add appropriate error handling |
| 56 | + - Include XML documentation |
| 57 | + |
| 58 | +3. **Test your changes** |
| 59 | + - Build the project: `dotnet build` |
| 60 | + - Test manually with different languages |
| 61 | + - Ensure no regressions |
| 62 | + |
| 63 | +4. **Commit and push** |
| 64 | + ```bash |
| 65 | + git add . |
| 66 | + git commit -m "Add: Your feature description" |
| 67 | + git push origin feature/your-feature-name |
| 68 | + ``` |
| 69 | + |
| 70 | +5. **Create a Pull Request** |
| 71 | + |
| 72 | +## 🎵 Adding Language Support |
| 73 | + |
| 74 | +To add support for a new language: |
| 75 | + |
| 76 | +1. **Identify the language name** |
| 77 | + - Check how Windows reports the language in `InputLanguage.Culture.EnglishName` |
| 78 | + - Example: "Spanish (Spain)" → "Spanish" |
| 79 | + |
| 80 | +2. **Update language mapping** (if needed) |
| 81 | + - Modify `GetLanguageDisplayName()` in `LanguageAudioPlayer.cs` |
| 82 | + - Add special handling for complex language names |
| 83 | + |
| 84 | +3. **Test with audio file** |
| 85 | + - Create a test MP3 file named after the language |
| 86 | + - Place it in the Audio folder |
| 87 | + - Test language switching |
| 88 | + |
| 89 | +## 🐛 Bug Reports |
| 90 | + |
| 91 | +When reporting bugs, please include: |
| 92 | + |
| 93 | +- **Operating System**: Windows version |
| 94 | +- **Application Version**: Version number |
| 95 | +- **Steps to Reproduce**: Clear steps to reproduce the issue |
| 96 | +- **Expected Behavior**: What should happen |
| 97 | +- **Actual Behavior**: What actually happens |
| 98 | +- **Audio Files**: Information about your MP3 files (if relevant) |
| 99 | + |
| 100 | +## 💡 Feature Requests |
| 101 | + |
| 102 | +We welcome feature requests! Please: |
| 103 | + |
| 104 | +- Check existing issues first |
| 105 | +- Describe the use case clearly |
| 106 | +- Explain why the feature would be valuable |
| 107 | +- Consider implementation complexity |
| 108 | + |
| 109 | +## 🔧 Common Development Tasks |
| 110 | + |
| 111 | +### Adding a New Audio Format |
| 112 | +1. Update `LanguageAudioPlayer.cs` |
| 113 | +2. Modify `FindAudioFileForLanguage()` method |
| 114 | +3. Test with the new format |
| 115 | + |
| 116 | +### Improving Language Detection |
| 117 | +1. Update `GetLanguageDisplayName()` method |
| 118 | +2. Add new language mappings |
| 119 | +3. Test with various Windows language settings |
| 120 | + |
| 121 | +### Enhancing System Tray |
| 122 | +1. Modify `LanguageMonitorApp.cs` |
| 123 | +2. Update `InitializeSystemTray()` method |
| 124 | +3. Test system tray interactions |
| 125 | + |
| 126 | +## 📋 Pull Request Process |
| 127 | + |
| 128 | +1. **Ensure your PR**: |
| 129 | + - Has a clear title and description |
| 130 | + - References any related issues |
| 131 | + - Includes appropriate tests |
| 132 | + - Follows coding standards |
| 133 | + |
| 134 | +2. **PR Review Process**: |
| 135 | + - Maintainers will review your code |
| 136 | + - Address any feedback promptly |
| 137 | + - Make requested changes |
| 138 | + - Ensure CI passes |
| 139 | + |
| 140 | +3. **After Approval**: |
| 141 | + - PR will be merged by maintainers |
| 142 | + - Your contribution will be credited |
| 143 | + |
| 144 | +## 🏷️ Versioning |
| 145 | + |
| 146 | +We use [Semantic Versioning](https://semver.org/): |
| 147 | +- **MAJOR**: Breaking changes |
| 148 | +- **MINOR**: New features (backward compatible) |
| 149 | +- **PATCH**: Bug fixes (backward compatible) |
| 150 | + |
| 151 | +## 📞 Getting Help |
| 152 | + |
| 153 | +- **GitHub Issues**: For bugs and feature requests |
| 154 | +- **GitHub Discussions**: For questions and general discussion |
| 155 | + |
| 156 | + |
| 157 | +## 🙏 Recognition |
| 158 | + |
| 159 | +Contributors will be: |
| 160 | +- Listed in the project contributors |
| 161 | +- Mentioned in release notes |
| 162 | +- Credited in the README |
| 163 | + |
| 164 | +Thank you for contributing to Input Language Screamer! 🎵 |
0 commit comments