Skip to content

Commit 6994e40

Browse files
committed
feat: Enhance multi-language support and improve standalone version
This commit introduces significant improvements to the JSON Format Converter: 1. Extended Multi-language Support: - Added 9 additional languages: Japanese, Korean, German, French, Spanish, Russian, Arabic, Portuguese, and Traditional Chinese - Updated all language files with new translations including helpLink and inputEmpty keys - Ensured consistency across all language files 2. Standalone Version Improvements: - Fixed language loading issues by updating build script to copy _locales directory - Improved UI layout to fill entire viewport height using flexbox - Updated help page link to use relative path for better deployment compatibility - Added GitHub project links to standalone and help pages 3. Code Quality & Bug Fixes: - Fixed hardcoded error messages to use i18n translations - Restored i18n-loader.js to original implementation to avoid breaking CRX build - Enhanced build script to properly copy language files to standalone version 4. Documentation Updates: - Updated README files with new multi-language support information - Added v0.1.1 changelog with recent improvements - Improved keyboard shortcuts documentation These changes enhance the user experience for international users while maintaining compatibility with existing Chrome extension functionality.
1 parent 45dcf61 commit 6994e40

35 files changed

+4565
-994
lines changed

.github/workflows/deploy.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
17+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
18+
concurrency:
19+
group: "pages"
20+
cancel-in-progress: false
21+
22+
jobs:
23+
# Build job
24+
build:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Setup Just
31+
uses: extractions/setup-just@v3
32+
33+
- name: Build project
34+
run: |
35+
just build-new
36+
37+
- name: Prepare GitHub Pages content
38+
run: |
39+
# Copy standalone build to pages directory
40+
mkdir -p pages
41+
cp -r dist/standalone/* pages/
42+
43+
# Ensure index.html exists
44+
if [ ! -f pages/index.html ]; then
45+
cp pages/standalone.html pages/index.html
46+
fi
47+
48+
- name: Setup Pages
49+
uses: actions/configure-pages@v4
50+
51+
- name: Upload artifact
52+
uses: actions/upload-pages-artifact@v3
53+
with:
54+
path: './pages'
55+
56+
# Deployment job
57+
deploy:
58+
environment:
59+
name: github-pages
60+
url: ${{ steps.deployment.outputs.page_url }}
61+
runs-on: ubuntu-latest
62+
needs: build
63+
if: github.ref == 'refs/heads/main'
64+
steps:
65+
- name: Deploy to GitHub Pages
66+
id: deployment
67+
uses: actions/deploy-pages@v4

.github/workflows/release.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ jobs:
1313
- name: Checkout code
1414
uses: actions/checkout@v4
1515

16-
- name: Setup Python
17-
uses: actions/setup-python@v4
18-
with:
19-
python-version: '3.x'
20-
2116
- name: Setup Just
2217
uses: extractions/setup-just@v3
2318

@@ -56,18 +51,24 @@ jobs:
5651
echo "### 📦 Installation" >> $GITHUB_OUTPUT
5752
echo "" >> $GITHUB_OUTPUT
5853
echo "#### Chrome Extension" >> $GITHUB_OUTPUT
54+
echo "**🌟 Recommended**: [Install from Chrome Web Store](https://chromewebstore.google.com/detail/${{ vars.CHROME_EXTENSION_ID }})" >> $GITHUB_OUTPUT
55+
echo "" >> $GITHUB_OUTPUT
56+
echo "**Manual Installation**:" >> $GITHUB_OUTPUT
5957
echo "1. Download \`json-format-converter-extension-v${{ steps.get_version.outputs.VERSION }}.zip\`" >> $GITHUB_OUTPUT
6058
echo "2. Extract the ZIP file" >> $GITHUB_OUTPUT
6159
echo "3. Open Chrome and navigate to \`chrome://extensions/\`" >> $GITHUB_OUTPUT
6260
echo "4. Enable \"Developer mode\" in the top right" >> $GITHUB_OUTPUT
6361
echo "5. Click \"Load unpacked\" and select the extracted folder" >> $GITHUB_OUTPUT
6462
echo "" >> $GITHUB_OUTPUT
6563
echo "#### Standalone Web App" >> $GITHUB_OUTPUT
64+
echo "**🌟 Online**: [https://idev-sig.github.io/json-format-converter/](https://idev-sig.github.io/json-format-converter/)" >> $GITHUB_OUTPUT
65+
echo "" >> $GITHUB_OUTPUT
66+
echo "**Download**:" >> $GITHUB_OUTPUT
6667
echo "1. Download \`json-format-converter-standalone-v${{ steps.get_version.outputs.VERSION }}.zip\`" >> $GITHUB_OUTPUT
6768
echo "2. Extract to your web server or open \`index.html\` locally" >> $GITHUB_OUTPUT
6869
echo "" >> $GITHUB_OUTPUT
6970
echo "### 🔧 Technical Information" >> $GITHUB_OUTPUT
70-
echo "- Python: 3.x" >> $GITHUB_OUTPUT
71+
echo "- Extension ID: \`${{ vars.CHROME_EXTENSION_ID }}\`" >> $GITHUB_OUTPUT
7172
echo "- Manifest Version: 3" >> $GITHUB_OUTPUT
7273
echo "- Build Time: $(date -u '+%Y-%m-%d %H:%M:%S UTC')" >> $GITHUB_OUTPUT
7374
echo "- License: Apache 2.0" >> $GITHUB_OUTPUT
@@ -111,14 +112,14 @@ jobs:
111112

112113
# Optional: Publish to Chrome Web Store (requires setup of secrets)
113114
# Uncomment and configure the following steps if you want to auto-publish to Chrome Web Store
114-
# - name: Publish to Chrome Web Store
115-
# uses: puzzlers-labs/chrome-webstore-publish@v1
116-
# with:
117-
# mode: publish
118-
# extension_id: ${{ vars.CHROME_EXTENSION_ID }}
119-
# zip_file_path: ./json-format-converter-extension.zip
120-
# client_id: ${{ secrets.GOOGLE_CLIENT_ID }}
121-
# client_secret: ${{ secrets.GOOGLE_CLIENT_SECRET }}
122-
# refresh_token: ${{ secrets.GOOGLE_REFRESH_TOKEN }}
123-
# publish_target: public
124-
# expedited_review: true
115+
- name: Publish to Chrome Web Store
116+
uses: puzzlers-labs/chrome-webstore-publish@v1
117+
with:
118+
mode: publish
119+
extension_id: ${{ vars.CHROME_EXTENSION_ID }}
120+
zip_file_path: ./json-format-converter-extension.zip
121+
client_id: ${{ secrets.GOOGLE_CLIENT_ID }}
122+
client_secret: ${{ secrets.GOOGLE_CLIENT_SECRET }}
123+
refresh_token: ${{ secrets.GOOGLE_REFRESH_TOKEN }}
124+
publish_target: public
125+
expedited_review: true

CHROME_STORE.md

Lines changed: 0 additions & 181 deletions
This file was deleted.

0 commit comments

Comments
 (0)