-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a596e64
commit ce99aa2
Showing
24 changed files
with
1,195 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
{ | ||
"langCode": "en-US", | ||
"langName": "English, US", | ||
"interaction": { | ||
"commandHandler": { | ||
"error": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
{ | ||
"langCode": "es-ES", | ||
"langName": "Español" | ||
} | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
{ | ||
"langCode": "ru", | ||
"langName": "Русский" | ||
} | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import type Resources from "./resources"; | ||
|
||
declare module "i18next" { | ||
interface CustomTypeOptions { | ||
defaultNS: "main"; | ||
resources: Resources; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
interface Resources { | ||
"main": { | ||
"hooks": { | ||
"useConfirmOnLeave": "You have unsaved changes - are you sure you wish to leave this page?" | ||
}, | ||
"components": { | ||
"NavBar": { | ||
"supportEntry": "Support", | ||
"dashboardEntry": "Dashboard", | ||
"accountEntry": "Account" | ||
} | ||
}, | ||
"pages": { | ||
"error": { | ||
"errors": { | ||
"NotAuthenticated": "You are not logged in.", | ||
"NotAuthorized": "You are not authorized to access this page.", | ||
"NotFound": "The page you were looking for could not be found.", | ||
"InternalServerError": "An unexpected error occurred." | ||
}, | ||
"nav": { | ||
"homeBtn": "Go home", | ||
"tryAgainBtn": "Try again", | ||
"supportBtn": "Get support", | ||
"backBtn": "Go back" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
export default Resources; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Globe2Icon } from "lucide-react"; | ||
|
||
import { Button } from "@mc/ui/button"; | ||
import { | ||
DropdownMenu, | ||
DropdownMenuCheckboxItem, | ||
DropdownMenuContent, | ||
DropdownMenuTrigger, | ||
} from "@mc/ui/dropdown-menu"; | ||
|
||
import { useTranslation } from "~/i18n/client"; | ||
import { languageEntries } from "~/i18n/settings"; | ||
|
||
export function LanguageSelector() { | ||
const [_t, i18n] = useTranslation(); | ||
return ( | ||
<DropdownMenu> | ||
<DropdownMenuTrigger asChild> | ||
<Button variant="outline" size="icon"> | ||
<Globe2Icon className="h-4 w-4" /> | ||
</Button> | ||
</DropdownMenuTrigger> | ||
<DropdownMenuContent> | ||
{Object.entries(languageEntries).map(([code, label]) => ( | ||
<DropdownMenuCheckboxItem | ||
key={code} | ||
checked={code === i18n.language} | ||
onCheckedChange={() => i18n.changeLanguage(code)} | ||
> | ||
{label} | ||
</DropdownMenuCheckboxItem> | ||
))} | ||
</DropdownMenuContent> | ||
</DropdownMenu> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.