Skip to content

Commit 9449330

Browse files
authored
Refactor/add portuguese locale (JhaSourav07#570)
* refactor(i18n): add Portuguese locale to badge labels * style(readme): format Portuguese locale docs
1 parent f278227 commit 9449330

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ URL Parameter > Theme Default > System Fallback
155155
| `hide_background` | `boolean` | No | `false` | Remove the background rect, letting the monolith float on the page |
156156
| `hide_stats` | `boolean` | No | `false` | Hides the bottom row displaying Current Streak, Annual Sync Total, and Peak Streak stats when set to `true` or `1`. |
157157
| `tz` | `string` | No | Omitted = UTC | IANA timezone (e.g. `Asia/Kolkata`, `America/New_York`) — aligns "today" with the user local midnight. Note: `?tz=UTC` is valid but cached separately from omitting `tz`. |
158-
| `lang` | `string` | No | `en` | Language code for labels (`en`, `es`, `hi`, `fr`) |
158+
| `lang` | `string` | No | `en` | Language code for labels (`en`, `es`, `hi`, `fr`, `pt`) |
159159
| `view` | `string` | No | `default` | Rendering mode: `default` (3D Monolith) or `monthly` (Compact monthly stats) |
160160
| `delta_format` | `string` | No | `percent` | Format for month-over-month delta in monthly view: `percent` (e.g. +12%), `absolute` (e.g. +15 commits), or `both` |
161161
| `width` | `number` | No | `300` | Custom width for the SVG canvas (currently only applies to `view=monthly`) |

lib/i18n/badgeLabels.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ export const labels: Record<string, BadgeLabels> = {
2828
COMMITS_THIS_MONTH: 'इस महीने के कमिट्स',
2929
VS_LAST_MONTH: 'पिछले महीने की तुलना में',
3030
},
31+
pt: {
32+
CURRENT_STREAK: 'SÉRIE_ATUAL',
33+
ANNUAL_SYNC_TOTAL: 'TOTAL_ANUAL',
34+
PEAK_STREAK: 'SÉRIE_MÁXIMA',
35+
COMMITS_THIS_MONTH: 'COMMITS ESTE MÊS',
36+
VS_LAST_MONTH: 'vs mês passado',
37+
},
3138
fr: {
3239
CURRENT_STREAK: 'SÉRIE_ACTUELLE',
3340
ANNUAL_SYNC_TOTAL: 'TOTAL_ANNUEL',

0 commit comments

Comments
 (0)