Skip to content

Commit

Permalink
feat: add i18n support for chinese gh-60.
Browse files Browse the repository at this point in the history
fix: test instance connection loader.

ci: update actions version & platforms.
  • Loading branch information
riccox authored Sep 27, 2023
1 parent 63abf85 commit 40f1926
Show file tree
Hide file tree
Showing 67 changed files with 1,455 additions and 456 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/docker-build-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,30 @@ on:
jobs:
dockerhub-build-push:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm/v6
- linux/arm/v7
- linux/arm64
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: ${{ matrix.platform }}
tags: ${{ env.dockerhub_repository }}:${{ env.dockerhub_tag }}
18 changes: 13 additions & 5 deletions .github/workflows/docker-build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,31 @@ on:
jobs:
dockerhub-build-push:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm/v6
- linux/arm/v7
- linux/arm64
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: ${{ matrix.platform }}
push: true
tags: ${{ env.dockerhub_repository }}:${{ github.event.release.tag_name }}, ${{ env.dockerhub_repository }}:latest
- name: Update repo description
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/docker-build-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: docker-build-test

env:
dockerhub_repository: "riccoxie/meilisearch-ui"
dockerhub_tag: "test"

on:
push:
branches:
- test

jobs:
dockerhub-build-push:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm/v6
- linux/arm/v7
- linux/arm64
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: ${{ matrix.platform }}
tags: ${{ env.dockerhub_repository }}:${{ env.dockerhub_tag }}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
"echarts": "^5.4.3",
"echarts-for-react": "^3.0.2",
"fuse.js": "^6.6.2",
"i18next": "^23.5.1",
"i18next-browser-languagedetector": "^7.1.0",
"i18next-http-backend": "^2.2.2",
"immer": "^10.0.2",
"lodash": "^4.17.21",
"meilisearch": "^0.34.2",
Expand All @@ -42,6 +45,7 @@
"react-dom": "^18.2.0",
"react-error-boundary": "^4.0.11",
"react-hook-form": "^7.46.1",
"react-i18next": "^13.2.2",
"react-json-view": "^1.21.3",
"react-router-dom": "^6.16.0",
"sonner": "^0.7.4",
Expand Down
83 changes: 66 additions & 17 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions public/locales/en/common.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"or": "OR",
"unknown": "Unknown",
"uploading": "Uploading",
"search": "Search",
"save": "Save",
"submit": "Submit",
"forever": "Forever",
"actions": "Actions",
"create": "Create",
"delete": "Delete",
"update": "Update",
"confirm": "Confirm",
"cancel": "Cancel",
"edit": "Edit",
"system": "System",
"instance": "Instance",
"settings": "Settings",
"tasks": "Tasks",
"indexes": "Indexes",
"keys": "Keys",
"back": "Back",
"copy": "Copy",
"copied": "Copied",
"name": "Name",
"description": "Description",
"created_at": "Created At",
"updated_at": "Updated At",
"expired_at": "Expired At",
"learn_more": "Learn more",
"toast": {
"fail": "Fail, {{msg}}"
}
}
28 changes: 28 additions & 0 deletions public/locales/en/dashboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"slogan": "A Beautiful Meilisearch UI",
"instance": {
"updated_at": "Updated at",
"form": {
"title": {
"create": "Add a new instance",
"edit": "Edit instance"
},
"name": {
"label": "Name",
"placeholder": "name your instance, should be different from others"
},
"host": {
"label": "Host",
"tip": "Remember enable CORS in your instance server for this ui domain first"
},
"api_key": {
"label": "Api Key",
"tip": "Don't care! Your instance config will only be store in your local browser"
}
},
"remove": {
"title": "Remove this instance",
"tip": "Are you sure you want to remove this instance"
}
}
}
Loading

1 comment on commit 40f1926

@vercel
Copy link

@vercel vercel bot commented on 40f1926 Sep 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.