-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
i18n(ja): recipes/build-forms-api #12421
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for astro-docs-2 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a Japanese translation for the "build-forms-api" recipe documentation, translating content from English to Japanese while maintaining the same technical structure and code examples.
- Complete Japanese translation of the build-forms-api recipe documentation
- Preserves all original code examples and technical content
- Maintains proper markdown formatting and component structure
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
```ts title="src/pages/api/feedback.ts" "request.formData()" "post" | ||
export const prerender = false; // Not needed in 'server' mode | ||
import type { APIRoute } from "astro"; | ||
|
||
export const POST: APIRoute = async ({ request }) => { | ||
const data = await request.formData(); | ||
const name = data.get("name"); | ||
const email = data.get("email"); | ||
const message = data.get("message"); | ||
// Validate the data - you'll probably want to do more than this | ||
if (!name || !email || !message) { | ||
return new Response( | ||
JSON.stringify({ | ||
message: "Missing required fields", | ||
}), | ||
{ status: 400 } | ||
); | ||
} | ||
// Do something with the data, then return a success response |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few comments missing translation here, could you take a look and translate them? 🙌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed: 99d6a54
この例ではメッセージを含むJSONオブジェクトをクライアントへ返します。 | ||
|
||
```ts title="src/pages/api/feedback.ts" "request.formData()" "post" | ||
export const prerender = false; // Not needed in 'server' mode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one comment missing @Kenzo-Wada, then we are good to go!
Description (required)
japanese translation for
//recipes/build-forms-api/