Skip to content

Commit

Permalink
Configure i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
sukso96100 committed Nov 27, 2024
1 parent 35b8f77 commit d03ecd2
Show file tree
Hide file tree
Showing 15 changed files with 1,451 additions and 64 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ninja_i18n.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

name: Ninja i18n action

on: pull_request_target

# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings
permissions:
pull-requests: write # Necessary to comment on PRs
issues: read # Necessary to read issue comments
contents: read # Necessary to access the repo content

jobs:
ninja-i18n:
name: Ninja i18n - GitHub Lint Action
runs-on: ubuntu-latest

steps:
- name: Run Ninja i18n
# @main ensures that the latest version of the action is used
uses: opral/ninja-i18n-action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

7 changes: 5 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"recommendations": ["astro-build.astro-vscode"],
"recommendations": [
"astro-build.astro-vscode",
"inlang.vs-code-extension"
],
"unwantedRecommendations": []
}
}
55 changes: 2 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,3 @@
# Astro Starter Kit: Basics
# website-template

```sh
npm create astro@latest -- --template basics
```

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/basics)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/basics/devcontainer.json)

> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
![just-the-basics](https://github.com/withastro/astro/assets/2244813/a0a5533c-a856-4198-8470-2d67b1d7c554)

## 🚀 Project Structure

Inside of your Astro project, you'll see the following folders and files:

```text
/
├── public/
│ └── favicon.svg
├── src/
│ ├── components/
│ │ └── Card.astro
│ ├── layouts/
│ │ └── Layout.astro
│ └── pages/
│ └── index.astro
└── package.json
```

Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.

There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.

Any static assets, like images, can be placed in the `public/` directory.

## 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |

## 👀 Want to learn more?

Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
Website template for UbuCon Asia
17 changes: 14 additions & 3 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
// @ts-check
import { defineConfig } from 'astro/config';

import react from '@astrojs/react';

import mdx from '@astrojs/mdx';
import paraglide from "@inlang/paraglide-astro"

// https://astro.build/config
export default defineConfig({
integrations: [react(), mdx()]
integrations: [
react(),
mdx(),
paraglide({
// recommended settings
project: "./project.inlang",
outdir: "./src/paraglide", //where your files should be
}),],
i18n: {
defaultLocale: "en",
locales: ["en", "ko"],
},

});
4 changes: 4 additions & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"mainBanner_dates": "August 30-31*"
}
4 changes: 4 additions & 0 deletions messages/ko.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"mainBanner_dates": "8월 30일-31일*"
}
Loading

0 comments on commit d03ecd2

Please sign in to comment.