Skip to content

Commit 942363c

Browse files
authored
Merge pull request #193 from vedansh-5/language
Internationalization
2 parents a29363b + 07740c7 commit 942363c

File tree

17 files changed

+1207
-91
lines changed

17 files changed

+1207
-91
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,36 @@ $ npm install
138138
GitHub tokens allow the extension to make authenticated requests, increasing your API rate limit and enabling access to private repositories if you grant those permissions.
139139

140140

141+
## Adding a New Language
142+
143+
You can add a new language to Scrum Helper for your own use, or contribute it to the project.
144+
145+
### Using a New Language Locally
146+
147+
1. **Create a Locale Folder**
148+
- Go to `src/_locales`.
149+
- Create a new folder named with the [ISO language code](https://developer.chrome.com/docs/extensions/reference/i18n/#localeTable) (e.g., `it` for Italian, `fr` for French).
150+
151+
2. **Add a `messages.json` File**
152+
- Copy the `messages.json` from `src/_locales/en/messages.json` or any other language as a template.
153+
- Translate only the `"message"` values into your language.
154+
**Do not translate the extension name ("Scrum Helper") or the footer ("Made with ❤️ by ...").**
155+
156+
3. **Test the Extension**
157+
- Reload the extension in your browser.
158+
- Change your browser or system language to your new locale (see your browser’s language settings).
159+
- The extension will use your translation automatically if your language is set.
160+
161+
> **You do not need to make a pull request to use your language locally.**
162+
163+
### Contributing Your Translation
164+
165+
If you want to share your translation with others:
166+
- Make a pull request with your new locale folder and `messages.json` file.
167+
- We recommend double-checking your translations for accuracy and clarity.
168+
169+
For more details, see the [Chrome i18n documentation](https://developer.chrome.com/docs/extensions/reference/i18n/).
170+
141171
## About contributing
142172

143173
- Follow the Issues and PRs templates as far as possible.

src/_locales/de/messages.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"appName": { "message": "Scrum Helper" },
3+
"appDescription": { "message": "Berichten Sie über Ihren Entwicklungsfortschritt, indem Sie Ihre Git-Aktivität für einen ausgewählten Zeitraum automatisch abrufen" },
4+
"disableLabel": { "message": "Deaktivieren" },
5+
"enableLabel": { "message": "Aktivieren" },
6+
"homeButtonTitle": { "message": "Zum Bericht" },
7+
"projectNameLabel": { "message": "Ihr Projektname" },
8+
"projectNamePlaceholder": { "message": "Geben Sie Ihren Projektnamen ein" },
9+
"githubUsernameLabel": { "message": "Ihr GitHub-Benutzername" },
10+
"githubUsernamePlaceholder": { "message": "Erforderlich, um Ihre Beiträge abzurufen" },
11+
"contributionsLabel": { "message": "Ihre Beiträge abrufen für:" },
12+
"last7DaysLabel": { "message": "Letzte 7 Tage" },
13+
"last1DayLabel": { "message": "Gestern" },
14+
"startDateLabel": { "message": "Startdatum:" },
15+
"endDateLabel": { "message": "Enddatum:" },
16+
"showOpenClosedLabel": { "message": "Offen/Geschlossen-Status anzeigen" },
17+
"blockersLabel": { "message": "Was hindert Sie am Fortschritt?" },
18+
"blockersPlaceholder": { "message": "Geben Sie hier den Grund ein" },
19+
"scrumReportLabel": { "message": "Scrum-Bericht" },
20+
"generateReportButton": { "message": "Bericht erstellen" },
21+
"copyReportButton": { "message": "Bericht kopieren" },
22+
"settingsOrgNameLabel": { "message": "Name der Organisation" },
23+
"settingsOrgNamePlaceholder": { "message": "Namen der Organisation eingeben" },
24+
"setButton": { "message": "Festlegen" },
25+
"githubTokenLabel": { "message": "Ihr GitHub-Token" },
26+
"githubTokenPlaceholder": { "message": "Für authentifizierte Anfragen erforderlich" },
27+
"showCommitsLabel": { "message": "Commits in offenen PRs innerhalb des Zeitraums anzeigen" },
28+
"cacheTTLLabel": { "message": "Cache-TTL eingeben" },
29+
"cacheTTLUnit": { "message": "(in Minuten)" },
30+
"cacheTTLPlaceholder": { "message": "Cache-TTL in Minuten (Standard: 10)" },
31+
"refreshDataButton": { "message": "Daten aktualisieren (Cache umgehen)" },
32+
"refreshDataInfo": { "message": "Verwenden Sie diese Schaltfläche, um neue Daten sofort abzurufen." },
33+
"noteTitle": { "message": "Hinweis:" },
34+
"viewCodeButton": { "message": "Code ansehen" },
35+
"reportIssueButton": { "message": "Problem melden" },
36+
"repoFilterLabel": { "message": "Nach Repositories filtern" },
37+
"enableFilteringLabel": { "message": "Filterung aktivieren" },
38+
"tokenRequiredWarning": { "message": "Für die Repository-Filterung ist ein GitHub-Token erforderlich. Bitte fügen Sie einen in den Einstellungen hinzu." },
39+
"repoSearchPlaceholder": { "message": "Repository zum Hinzufügen suchen..." },
40+
"repoPlaceholder": { "message": "Keine Repositories ausgewählt (alle werden einbezogen)" },
41+
"repoCountNone": { "message": "0 Repositories ausgewählt" },
42+
"repoCount": { "message": "$1 Repositories ausgewählt" },
43+
"repoLoading": { "message": "Lade Repositories..." },
44+
"repoLoaded": { "message": "$1 Repositories geladen." },
45+
"repoNotFound": { "message": "Keine Repositories gefunden" },
46+
"repoRefetching": { "message": "Lade Repositories neu..." },
47+
"repoLoadFailed": { "message": "Laden der Repositories fehlgeschlagen." },
48+
"repoTokenPrivate": { "message": "Token ist ungültig oder hat keine Rechte für private Repos." },
49+
"repoRefetchFailed": { "message": "Neuladen der Repositories fehlgeschlagen." },
50+
"orgSetMessage": { "message": "Organisation erfolgreich festgelegt." },
51+
"orgClearedMessage": { "message": "Organisation gelöscht. Klicken Sie auf 'Bericht erstellen', um alle Aktivitäten abzurufen." },
52+
"orgNotFoundMessage": { "message": "Organisation auf GitHub nicht gefunden." },
53+
"orgValidationErrorMessage": { "message": "Fehler bei der Validierung der Organisation." },
54+
"refreshingButton": { "message": "Wird aktualisiert..." },
55+
"cacheClearFailed": { "message": "Cache-Löschung fehlgeschlagen." },
56+
"madeWithLoveBy": { "message": "Made with ❤️ by" },
57+
"generatingButton": { "message": "Wird generiert..." },
58+
"copiedButton": { "message": "Kopiert!" },
59+
"orgChangedMessage": { "message": "Organisation geändert. Klicken Sie auf 'Bericht erstellen', um die GitHub-Aktivitäten abzurufen." },
60+
"cacheClearedMessage": { "message": "Cache erfolgreich geleert. Klicken Sie auf 'Bericht erstellen', um neue Daten abzurufen." },
61+
"cacheClearedButton": { "message": "Cache geleert!" },
62+
"extensionDisabledMessage": { "message": "Erweiterung ist deaktiviert. Aktivieren Sie sie in den Einstellungen, um Scrum-Berichte zu erstellen." },
63+
"notePoint1": { "message": "Die abgerufenen PRs basieren auf der letzten Überprüfung durch einen beliebigen Beitragenden. Wenn Sie einen PR vor 10 Tagen überprüft haben und jemand anderes ihn vor 2 Tagen, wird er trotzdem in Ihrer Aktivität der letzten Woche angezeigt." },
64+
"notePoint2": { "message": "Bitte beachten Sie, dass es im generierten Scrum zu Abweichungen kommen kann. Wir empfehlen, den Bericht vor dem Teilen manuell zu überprüfen, um die Genauigkeit sicherzustellen." },
65+
"noteSeeIssue": { "message": "Siehe dieses Issue" }
66+
}

src/_locales/en/messages.json

Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
1+
{
2+
"appName": {
3+
"message": "Scrum Helper",
4+
"description": "The name of the extension."
5+
},
6+
"appDescription": {
7+
"message": "Report your development progress by auto-fetching your Git activity for a selected period",
8+
"description": "A brief description of what the extension does."
9+
},
10+
"disableLabel": {
11+
"message": "Disable",
12+
"description": "Label for the toggle switch to disable the extension."
13+
},
14+
"enableLabel": {
15+
"message": "Enable",
16+
"description": "Label for the toggle switch to enable the extension."
17+
},
18+
"homeButtonTitle": {
19+
"message": "Go to Report",
20+
"description": "Tooltip for the home button."
21+
},
22+
"projectNameLabel": {
23+
"message": "Your Project Name",
24+
"description": "Label for the project name input field."
25+
},
26+
"projectNamePlaceholder": {
27+
"message": "Enter your project name",
28+
"description": "Placeholder text for the project name input."
29+
},
30+
"githubUsernameLabel": {
31+
"message": "Your Github Username",
32+
"description": "Label for the GitHub username input field."
33+
},
34+
"githubUsernamePlaceholder": {
35+
"message": "Required for fetching your contributions",
36+
"description": "Placeholder text for the GitHub username input."
37+
},
38+
"contributionsLabel": {
39+
"message": "Fetch your contributions between:",
40+
"description": "Label for the date range selection."
41+
},
42+
"last7DaysLabel": {
43+
"message": "Last 7 days",
44+
"description": "Radio button option for the last 7 days."
45+
},
46+
"last1DayLabel": {
47+
"message": "Last 1 day",
48+
"description": "Radio button option for the last 1 day."
49+
},
50+
"startDateLabel": {
51+
"message": "Start Date:",
52+
"description": "Label for the start date picker."
53+
},
54+
"endDateLabel": {
55+
"message": "End Date:",
56+
"description": "Label for the end date picker."
57+
},
58+
"showOpenClosedLabel": {
59+
"message": "Show Open/Closed Label",
60+
"description": "Label for the checkbox to show open/closed status on PRs/issues."
61+
},
62+
"blockersLabel": {
63+
"message": "What is blocking you from making progress?",
64+
"description": "Label for the input field for blockers."
65+
},
66+
"blockersPlaceholder": {
67+
"message": "Enter your reason",
68+
"description": "Placeholder text for the blockers input field."
69+
},
70+
"scrumReportLabel": {
71+
"message": "Scrum Report",
72+
"description": "Heading for the generated scrum report."
73+
},
74+
"generateReportButton": {
75+
"message": "Generate Report",
76+
"description": "Text for the 'Generate Report' button."
77+
},
78+
"copyReportButton": {
79+
"message": "Copy Report",
80+
"description": "Text for the 'Copy Report' button."
81+
},
82+
"settingsOrgNameLabel": {
83+
"message": "Organization Name",
84+
"description": "Label for the organization name input in settings."
85+
},
86+
"settingsOrgNamePlaceholder": {
87+
"message": "Enter organization name",
88+
"description": "Placeholder for the organization name input."
89+
},
90+
"setButton": {
91+
"message": "Set",
92+
"description": "Text for the 'Set' button for the organization."
93+
},
94+
"githubTokenLabel": {
95+
"message": "Your Github Token",
96+
"description": "Label for the GitHub token input."
97+
},
98+
"githubTokenPlaceholder": {
99+
"message": "Required for making authenticated requests",
100+
"description": "Placeholder for the GitHub token input."
101+
},
102+
"showCommitsLabel": {
103+
"message": "Show commits made within date range in Open PRs",
104+
"description": "Label for the checkbox to show commits in open PRs."
105+
},
106+
"cacheTTLLabel": {
107+
"message": "Enter cache TTL",
108+
"description": "Label for the cache time-to-live input."
109+
},
110+
"cacheTTLUnit": {
111+
"message": "(in minutes)",
112+
"description": "Unit for the cache TTL."
113+
},
114+
"cacheTTLPlaceholder": {
115+
"message": "Write Cache TTL in minutes (Default 10 minutes)",
116+
"description": "Placeholder for the cache TTL input."
117+
},
118+
"refreshDataButton": {
119+
"message": "Refresh Data (bypass cache)",
120+
"description": "Text for the button to refresh data, ignoring the cache."
121+
},
122+
"refreshDataInfo": {
123+
"message": "Use this button to fetch fresh data immediately.",
124+
"description": "Informational text below the refresh button."
125+
},
126+
"noteTitle": {
127+
"message": "Note:",
128+
"description": "Title for the notes section."
129+
},
130+
"viewCodeButton": {
131+
"message": "View Code",
132+
"description": "Text for the button to view the source code on GitHub."
133+
},
134+
"reportIssueButton": {
135+
"message": "Report Issue",
136+
"description": "Text for the button to report an issue on GitHub."
137+
},
138+
"repoFilterLabel": {
139+
"message": "Filter by repositories",
140+
"description": "Label for the repository filter section."
141+
},
142+
"enableFilteringLabel": {
143+
"message": "Enable filtering",
144+
"description": "Label for the checkbox to enable repository filtering."
145+
},
146+
"tokenRequiredWarning": {
147+
"message": "A GitHub token is required for repository filtering. Please add one in the settings.",
148+
"description": "Warning message shown when repo filtering is enabled without a token."
149+
},
150+
"repoSearchPlaceholder": {
151+
"message": "Search for a repository to add...",
152+
"description": "Placeholder for the repository search input."
153+
},
154+
"repoPlaceholder": {
155+
"message": "No repositories selected (all will be included)",
156+
"description": "Placeholder text when no repositories are selected for filtering."
157+
},
158+
"repoCountNone": {
159+
"message": "0 repositories selected",
160+
"description": "Text showing the count of selected repositories when it's zero."
161+
},
162+
"repoCount": {
163+
"message": "$1 repositories selected",
164+
"description": "Text showing the count of selected repositories. $1 is a placeholder for the number."
165+
},
166+
"repoLoading": {
167+
"message": "Loading repositories...",
168+
"description": "Status message when repositories are being loaded."
169+
},
170+
"repoLoaded": {
171+
"message": "Loaded $1 repositories.",
172+
"description": "Status message after repositories have been successfully loaded. $1 is a placeholder for the number."
173+
},
174+
"repoNotFound": {
175+
"message": "No repositories found",
176+
"description": "Message shown in the dropdown when a search yields no results."
177+
},
178+
"repoRefetching": {
179+
"message": "Refetching repositories...",
180+
"description": "Status message when repositories are being refetched."
181+
},
182+
"repoLoadFailed": {
183+
"message": "Failed to load repositories.",
184+
"description": "Error message when repository loading fails."
185+
},
186+
"repoTokenPrivate": {
187+
"message": "Token is invalid or does not have rights for private repos.",
188+
"description": "Error message when the token is invalid or lacks permissions."
189+
},
190+
"repoRefetchFailed": {
191+
"message": "Failed to refetch repositories.",
192+
"description": "Error message when refetching repositories fails."
193+
},
194+
"orgSetMessage": {
195+
"message": "Organization set successfully.",
196+
"description": "Success toast message when an organization is set."
197+
},
198+
"orgClearedMessage": {
199+
"message": "Organization cleared. Click 'Generate Report' to fetch all activities.",
200+
"description": "Message shown when the organization is cleared."
201+
},
202+
"orgNotFoundMessage": {
203+
"message": "Organization not found on GitHub.",
204+
"description": "Error toast message when an organization is not found."
205+
},
206+
"orgValidationErrorMessage": {
207+
"message": "Error validating organization.",
208+
"description": "Error toast message for general organization validation errors."
209+
},
210+
"refreshingButton": {
211+
"message": "Refreshing...",
212+
"description": "Text on the refresh button while it's in a loading state."
213+
},
214+
"cacheClearFailed": {
215+
"message": "Cache clear failed.",
216+
"description": "Error message when clearing the cache fails."
217+
},
218+
"madeWithLoveBy": {
219+
"message": "Made with ❤️ by",
220+
"description": "Footer credit text."
221+
},
222+
"generatingButton": {
223+
"message": "Generating...",
224+
"description": "Text shown on the generate button when the report is being created."
225+
},
226+
"copiedButton": {
227+
"message": "Copied!",
228+
"description": "Text shown on the copy button after a successful copy."
229+
},
230+
"orgChangedMessage": {
231+
"message": "Organization changed. Click Generate button to fetch the GitHub activities.",
232+
"description": "Message shown in the report area after the organization is changed."
233+
},
234+
"cacheClearedMessage": {
235+
"message": "Cache cleared successfully. Click \"Generate Report\" to fetch fresh data.",
236+
"description": "Message shown in the report area after the cache is cleared."
237+
},
238+
"cacheClearedButton": {
239+
"message": "Cache Cleared!",
240+
"description": "Text on the refresh button after the cache is cleared."
241+
},
242+
"extensionDisabledMessage": {
243+
"message": "Extension is disabled. Enable it from the options to generate scrum reports.",
244+
"description": "Message shown when the extension is disabled."
245+
},
246+
"notePoint1": {
247+
"message": "The PRs fetched are based on the most recent review by any contributor. If you reviewed a PR 10 days ago and someone else reviewed it 2 days ago, it will still appear in your activity for the past week.",
248+
"description": "First point in the notes section."
249+
},
250+
"notePoint2": {
251+
"message": "Please note that some discrepancies may occur in the generated SCRUM. We recommend manually reviewing and editing the report to ensure accuracy before sharing.",
252+
"description": "Second point in the notes section."
253+
},
254+
"noteSeeIssue": {
255+
"message": "See this issue",
256+
"description": "Link text for the GitHub issue in the notes."
257+
}
258+
}

0 commit comments

Comments
 (0)