Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I18n Support #87

Merged
merged 8 commits into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github: ixartz
custom:
["https://donate.stripe.com/7sI5m5146ehfddm7tj", "https://nextlessjs.com"]
# github: ixartz
# custom:
# ["https://donate.stripe.com/7sI5m5146ehfddm7tj", "https://nextlessjs.com"]
1 change: 0 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: ${{ matrix.node_version }}
pnpm-version: 9
# - name: Install Node.js
# uses: actions/setup-node@v4
# with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vercel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
node-version: 20
- uses: pnpm/action-setup@v3
with:
version: 8
version: 9
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
Expand Down
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.16.0
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ Following are the steps to contribute to this project:
<!-- - [Docker](https://www.docker.com/) -->

- [VSCode](https://code.visualstudio.com/)
- [Node@20](https://nodejs.org/en/)
- [Taskfile](https://taskfile.dev/#/installation)
- [pnpm](https://pnpm.io/)
- [fnm](https://github.com/Schniz/fnm)

## Running Locally

Expand Down
4 changes: 3 additions & 1 deletion Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ tasks:
install:
desc: Install dependencies
cmds:
- fnm install
- corepack enable pnpm
- pnpm install
- pnpx playwright install chromium #--with-deps
- pnpx playwright install chromium --with-deps

storybook:
desc: Run storybook
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "avtoolz",
"version": "2.4.1",
"version": "2.4.2",
"scripts": {
"dev:spotlight": "spotlight-sidecar",
"dev:next": "open-cli http://localhost:3000 && next dev",
Expand Down Expand Up @@ -190,5 +190,6 @@
"author": "Ixartz (https://github.com/ixartz)",
"engines": {
"node": "=20"
}
},
"packageManager": "pnpm@9.4.0+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a"
}
19 changes: 9 additions & 10 deletions src/app/[locale]/(unauth)/tools/image-to-pdf/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
useDisclosure,
} from "@nextui-org/react";
import { wrap } from "comlink";
import { useTranslations } from "next-intl";
import { usePathname } from "next/navigation";
import { useEffect, useState } from "react";
const allowedFileTypes: MimeType[] = [
Expand All @@ -48,6 +49,7 @@ export default function Page() {
const tool = getToolByHref(path);
const [isLoading, setIsLoading] = useState(false);
const { isOpen, onOpen, onOpenChange } = useDisclosure();
const t = useTranslations();

const [pageOrientation, setPageOrientation] =
useState<(typeof PAGE_ORIENTATION)[number]>("Portrait");
Expand Down Expand Up @@ -84,7 +86,7 @@ export default function Page() {
reset();
setIsLoading(false);
}
}, [error]);
}, [error, onOpen, reset]);

return (
<>
Expand Down Expand Up @@ -203,7 +205,7 @@ export default function Page() {
<Spacer y={2} />
<div className="flex justify-center items-end">
<Button color="danger" variant="bordered" onPress={reset}>
Reset
{t("common.reset")}
</Button>
<Spacer x={2} />
<Button
Expand All @@ -214,7 +216,7 @@ export default function Page() {
isLoading={isLoading}
onPress={_doWork}
>
Convert to PDF
{t("image_to_pdf.convert_to_pdf")}
</Button>
</div>
</>
Expand All @@ -226,18 +228,15 @@ export default function Page() {
{(onClose) => (
<>
<ModalHeader className="flex flex-col gap-1">
Invalid File
{t("unsupported_file_error.invalid_file")}
</ModalHeader>
<ModalBody>
<p>
One or more of the files you have selected are not supported,
invalid, or corrupted.
</p>
<p>Please ensure that the file is valid and not corrupted.</p>
<p>{t("unsupported_file_error.error_msg_one_or_more")}</p>
<p>{t("unsupported_file_error.error_msg_warning")}</p>
</ModalBody>
<ModalFooter>
<Button color="danger" variant="flat" onPress={onClose}>
OK
{}
</Button>
</ModalFooter>
</>
Expand Down
4 changes: 2 additions & 2 deletions src/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { notFound } from "next/navigation";

import { Cmdk } from "@/components/cmdk";
import { Footer } from "@/components/footer";
import { Header } from "@/components/header";
import { Navbar } from "@/components/navbar";
import { routes } from "@/config/routes";
import { siteConfig } from "@/config/site";
import { AppConfig } from "@/utils/appConfig";
Expand Down Expand Up @@ -80,7 +80,7 @@ export default function RootLayout(props: {
locale={props.params.locale}
messages={messages}
>
<Header routes={routes.items.filter((r) => r.routes.length > 0)} />
<Navbar routes={routes.items.filter((r) => r.routes.length > 0)} />
{props.children}
<Footer />
<Cmdk />
Expand Down
19 changes: 0 additions & 19 deletions src/components/AddGuestbookForm.tsx

This file was deleted.

44 changes: 0 additions & 44 deletions src/components/DeleteGuestbookEntry.tsx

This file was deleted.

74 changes: 0 additions & 74 deletions src/components/EditableGuestbookEntry.tsx

This file was deleted.

95 changes: 0 additions & 95 deletions src/components/GuestbookForm.tsx

This file was deleted.

Loading
Loading