Skip to content

Commit

Permalink
Add Spanish
Browse files Browse the repository at this point in the history
¡Hola!

I didn't use any automated tool nor AI, so this should be good quality :)

I also made the shebang in the i18n recipe more generic (wasn't working
on NixOS).
  • Loading branch information
bodhike authored and futurepaul committed Feb 26, 2024
1 parent 737033b commit 27cf1a5
Show file tree
Hide file tree
Showing 5 changed files with 770 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ If you want to add Japanese you will create a file `/src/i18n/jp/translations.ts

```
export default {
Common: {
common: {
continue: "続ける",
...
}
Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pre:
pnpm run pre-commit

i18n LANG:
#!/bin/bash
#!/usr/bin/env bash
pnpm eslint-path "./src/i18n/{{LANG}}/translations.ts" --rule "{internal-rules/check-i18n-keys: warn}"
local:
Expand Down
4 changes: 4 additions & 0 deletions src/i18n/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@ import { use } from "i18next";
import LanguageDetector from "i18next-browser-languagedetector";

import en from "~/i18n/en/translations";
import es from "~/i18n/es/translations";
import ko from "~/i18n/ko/translations";
import pt from "~/i18n/pt/translations";

export const resources = {
en: {
translations: en
},
es: {
translations: es
},
pt: {
translations: pt
},
Expand Down
Loading

0 comments on commit 27cf1a5

Please sign in to comment.