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

feat: ai generated locales #780

Merged
merged 9 commits into from
Jul 28, 2023
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
40 changes: 40 additions & 0 deletions .github/workflows/locales.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Config
on:
push:
branches:
- main

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
Sync:
name: Generate missing locales with chatgpt
runs-on: ubuntu-latest
steps:
- name: Checkout code
id: checkout-code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Run generating script
run: |
yarn generate-locales
- name: Configure git
run: |
git config --global user.name "turtlesocks-bot"
git config --global user.email "[email protected]"
- name: Check for changes
run: |
if git diff --quiet; then
echo "changes_exist=false" >> $GITHUB_ENV
else
echo "changes_exist=true" >> $GITHUB_ENV
fi
- name: Commit and push changes
if: ${{ env.changes_exist == 'true' }}
run: |
git add --all
git commit --message "Sync CI/CD Config Items"
git push
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public/images/custom/*
# Ignore generated locales
public/locales/*
public/missing-locales/*
locales/missing-locales/*

# OS X
.DS_Store*
Expand Down
4 changes: 1 addition & 3 deletions ReactMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ process.env.FORCE_COLOR = 3
const { build } = require('vite')
const { log, HELPERS } = require('./server/src/services/logger')
const { generate } = require('./server/scripts/generateMasterfile')
const { locales } = require('./server/scripts/createLocales')
const viteConfig = require('./vite.config')

generate(true).then(() =>
locales()
.then(() => build(viteConfig))
build(viteConfig)
.then(() => log.info(HELPERS.build, 'React Map Compiled'))
.then(() => require('./server/src/index')),
)
13 changes: 11 additions & 2 deletions public/base-locales/de.json → locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -622,5 +622,14 @@
"level_circles": "Level Marker",
"min_level_circle": "min. Level Marker",
"mutation_auth_error": "Die Anfrage war nicht erfolgreich, da Du nicht angemeldet warst.",
"submitted_by": "Eingereicht von"
}
"submitted_by": "Eingereicht von",
"slider_size": "Größe",
"locale_selection_hi": "हिन्दी",
"locale_selection_id": "Bahasa Indonesia",
"locale_selection_tr": "Türkçe",
"s2cells_options": "S2 Zellen Optionen",
"global_search_pokemon": "Gib den Pokemon-Namen ein...",
"remove_webhook_entry": "Entferne von {{name}}",
"event_stops": "Event Stops",
"event_stop_timers": "Event Stop Timer"
}
File renamed without changes.
Loading