Available Languages
The following languages are currently supported:English
Code:
enLocale: en-USDefault languageSpanish
Code:
esLocale: es-ESEspañolCatalan
Code:
caLocale: ca-ESCatalàItalian
Code:
itLocale: it-ITItalianoConfiguration
Set the language using thelocale input:
Default Behavior
If you specify an invalid locale, the action will:- Log a warning message
- Fall back to English (
en)
src/config/loader.ts:86-89:
Localized Content
The following content is localized:Reports
- Section headings (Summary, Repositories, Trends, etc.)
- Star change descriptions (“stars gained”, “stars lost”, “net change”)
- Trend indicators (“up”, “down”, “stable”)
- Repository status badges (“NEW”, “REMOVED”)
- Chart titles and labels
- Forecast section headings and predictions
- Stargazer information
Email Notifications
- Email subject line
- Email body content (HTML formatted)
- Sender default name
Badges
- Badge text (“Total Stars”)
Charts
- Axis labels
- Legend text
- Chart titles
Language Examples
English (en)
GitHub Star Tracker Report: 1,234 stars (+12)
Spanish (es)
Informe de Seguimiento de Estrellas en GitHub: 1,234 estrellas (+12)
Catalan (ca)
Informe de Seguiment d'Estrelles a GitHub: 1,234 estrelles (+12)
Italian (it)
Report Tracciamento Stelle GitHub: 1,234 stelle (+12)
Translation Keys
The translation system uses JSON files located insrc/i18n/. Here are the key categories:
Badge Translations
Report Translations
Email Translations
Trend Translations
Stargazer Translations
Forecast Translations
String Interpolation
Translations support variable interpolation using{variable} syntax:
src/i18n/index.ts:17-21:
Workflow Examples
Spanish Reports
.github/workflows/star-tracker-es.yml
Catalan Configuration File
star-tracker.yml
Italian with Notifications
.github/workflows/star-tracker-it.yml
Adding New Languages
To contribute a new language translation:- Create a new JSON file in
src/i18n/(e.g.,fr.jsonfor French) - Copy the structure from
en.jsonand translate all strings - Add the locale to
LOCALE_MAPinsrc/config/defaults.ts:
- Import and add to
TRANSLATIONSinsrc/i18n/index.ts:
- Submit a pull request!
Implementation Details
The localization system is implemented insrc/i18n/index.ts:
en, es, ca, it
Next Steps
Configuration Overview
Learn about all configuration options
Notifications
Set up email notifications in your language