Skip to content

Commit

Permalink
feat: update toggle theme accessible label in i18n schema and transla…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
adrian-ub committed Oct 6, 2024
1 parent 2201098 commit 9add943
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/components/ToggleTheme.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a class="select-none" title="Toggle Color Scheme" id="toggle-dark">
<a class="select-none" title={Astro.locals.t('toggleTheme.accessibleLabel')} id="toggle-dark">
<div i-ri-sun-line dark:i-ri-moon-line></div>
</a>

Expand Down
10 changes: 1 addition & 9 deletions src/schemas/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,10 @@ export function builtinI18nSchema() {
function vitesseI18nSchema() {
return z
.object({
'themeSelect.accessibleLabel': z
'toggleTheme.accessibleLabel': z
.string()
.describe('Accessible label for the theme selection dropdown.'),

'themeSelect.dark': z.string().describe('Name of the dark color theme.'),

'themeSelect.light': z.string().describe('Name of the light color theme.'),

'themeSelect.auto': z
.string()
.describe('Name of the automatic color theme that syncs with system preferences.'),

'languageSelect.accessibleLabel': z
.string()
.describe('Accessible label for the language selection dropdown.'),
Expand Down
5 changes: 1 addition & 4 deletions src/translations/en.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"themeSelect.accessibleLabel": "Select theme",
"themeSelect.dark": "Dark",
"themeSelect.light": "Light",
"themeSelect.auto": "Auto",
"toggleTheme.accessibleLabel": "Toggle Color Scheme",
"languageSelect.accessibleLabel": "Select language",
"i18n.untranslatedContent": "This content is not available in your language yet.",
"page.draft": "This content is a draft and will not be included in production builds.",
Expand Down
5 changes: 1 addition & 4 deletions src/translations/es.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"themeSelect.accessibleLabel": "Seleccionar tema",
"themeSelect.dark": "Oscuro",
"themeSelect.light": "Claro",
"themeSelect.auto": "Automático",
"toggleTheme.accessibleLabel": "Alternar combinación de colores",
"languageSelect.accessibleLabel": "Seleccionar idioma",
"i18n.untranslatedContent": "Esta página aún no está disponible en tu idioma.",
"page.draft": "Este contenido es un borrador y no se incluirá en las versiones de producción.",
Expand Down

0 comments on commit 9add943

Please sign in to comment.