Thank you for your interest in contributing to Email Expiration Manager! This document provides guidelines for contributing to this GPLv3-licensed project.
By contributing to this project, you agree that your contributions will be licensed under the GNU General Public License v3.0 (GPLv3), the same license that covers the project.
- ✅ Your code will be free and open-source
- ✅ Others can use, modify, and distribute your contributions
- ✅ Any derivative works must also be GPLv3
- ✅ You retain copyright of your contributions
- Check if the bug is already reported in Issues
- Use the bug report template
- Include: OS, Thunderbird version, steps to reproduce, console logs
- Check if the feature is already requested
- Explain the use case and benefit
- Consider environmental impact (this project aims to reduce email storage)
- Copy
_locales/en/messages.json - Create a new folder
_locales/[language-code]/ - Translate all message values (keep keys unchanged)
- Test with Thunderbird in that language
See the development guidelines below
- Fix typos
- Add examples
- Improve clarity
- Update for new features
- Thunderbird 102 or higher
- Git
- Text editor (VS Code recommended)
- Basic knowledge of JavaScript and WebExtensions API
-
Fork the repository
# Click "Fork" on GitHub -
Clone your fork
git clone https://github.com/YOUR-USERNAME/Email-Expiration-Manager.git cd Email-Expiration-Manager -
Create a branch
git checkout -b feature/my-awesome-feature # OR git checkout -b fix/bug-description -
Load in Thunderbird
- Open Thunderbird
- Menu → Add-ons → Debug Add-ons
- Load Temporary Add-on
- Select
manifest.json
-
Make your changes
- Follow the code style (see below)
- Add comments in English
- Test thoroughly
-
Test your changes
- Enable dry run mode first
- Test with real emails (non-critical)
- Check browser console for errors (Ctrl+Shift+J)
- Test on multiple folders
-
Commit your changes
git add . git commit -m "Add feature: description of changes"
-
Push to your fork
git push origin feature/my-awesome-feature
-
Create a Pull Request
- Go to your fork on GitHub
- Click "Pull Request"
- Describe your changes
- Reference any related issues
/**
* Function description
* @param {type} paramName - Description
* @returns {type} Description
*/
function myFunction(paramName) {
// Use camelCase for variables and functions
const myVariable = 'value';
// Use descriptive names
const totalExpired = 0; // ✅ Good
const te = 0; // ❌ Bad
// Add comments for complex logic
// This calculates...
// Use async/await for promises
const result = await someAsyncFunction();
return result;
}- Variables & Functions:
camelCase - Constants:
UPPER_SNAKE_CASEorcamelCase - Classes:
PascalCase(if used) - Files:
kebab-case.js
- Write comments in English
- Explain why, not what (code should be self-explanatory)
- Use JSDoc for functions
- Add TODO comments for future improvements
try {
await riskyOperation();
} catch (error) {
console.error('Descriptive error message:', error);
// Handle gracefully
}- Test in dry run mode first
- Test with expired emails
- Test with non-expired emails
- Test with large mailboxes (1000+ emails)
- Test all settings combinations
- Check browser console for errors
- Test on Linux, Windows, and/or macOS
- Installation: Extension loads without errors
- Configuration: All settings save correctly
- Dry Run: No emails are modified
- Move Action: Emails move to correct folder
- Delete Action: Emails go to trash or are deleted
- Startup Check: Runs on Thunderbird start (if enabled)
- Periodic Check: Runs at specified interval
- Notifications: Display correctly
- Logs: Record actions accurately
- Performance: No freezing or excessive CPU usage
-
Create folder structure
mkdir -p _locales/[language-code]
-
Copy English messages
cp _locales/en/messages.json _locales/[language-code]/
-
Translate
- Translate only the
"message"values - Keep all
"description"values in English - Preserve placeholders like
$1,$2 - Test with Thunderbird in that language
- Translate only the
-
Language codes
- Use standard codes:
fr,de,es,it,pt,ja,zh_CN, etc. - See: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Internationalization#locales
- Use standard codes:
Your pull request will be reviewed for:
- Functionality: Does it work as intended?
- Code quality: Is it readable and maintainable?
- Performance: Does it impact extension speed?
- Security: Are there any security concerns?
- Compatibility: Works with Thunderbird 102+?
- License: Code is compatible with GPLv3?
- Documentation: Are changes documented?
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Translation
- [ ] Documentation
- [ ] Performance improvement
## Testing
- [ ] Tested in dry run mode
- [ ] Tested with real emails
- [ ] No console errors
- [ ] Works on: Linux / Windows / macOS
## Screenshots (if applicable)
Add screenshots here
## Related Issues
Fixes #(issue number)
## Checklist
- [ ] Code follows project style guidelines
- [ ] Comments are in English
- [ ] Tested thoroughly
- [ ] Documentation updated (if needed)
- [ ] I agree to license my contributions under GPLv3- ❌ Proprietary or copyrighted code
- ❌ Code from non-GPLv3 compatible licenses
- ❌ Personal information (emails, passwords, API keys)
- ❌ Binary files (except icons in standard formats)
- ❌ Minified code (always provide source)
- Issues: For bugs and feature requests
- Pull Requests: For code contributions
- Discussions: For questions and ideas (if enabled)
We especially welcome contributions in:
- 🌍 Translations: More language support
- 🧪 Testing: Windows and macOS testing
- 📖 Documentation: User guides and tutorials
- 🐛 Bug fixes: Known issues
- ♿ Accessibility: Improving UI accessibility
Contributors will be:
- Listed in the project README
- Credited in release notes
- Mentioned in commit history
If you have questions about contributing:
Remember: All contributions must be compatible with GPLv3. By submitting a pull request, you confirm that your contribution is your original work and can be licensed under GPLv3.
Thank you for contributing to a more sustainable email future! 🌱