Skip to content

Commit 45b14e6

Browse files
committed
docs: translate all documentation and code comments to English
- Translate README.md to English with full documentation - Translate code comments in src/index.js and src/hooks/useKanjiFurigana.js - Create CHANGELOG.md following Keep a Changelog format - Add CONTRIBUTING.md with detailed contribution guidelines - Add RELEASE.md with automated and manual release processes - Add QUICK_START.md for quick reference - Update readme.txt for WordPress.org compatibility - Add GitHub Actions workflow for automated releases - Add GitHub issue templates (bug report, feature request) - Add GitHub Pull Request template - Translate webpack.config.js comments
1 parent e0f778e commit 45b14e6

File tree

13 files changed

+1359
-62
lines changed

13 files changed

+1359
-62
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug to help us improve
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## 🐛 Bug Description
10+
11+
A clear and concise description of what the bug is.
12+
13+
## 📋 Steps to Reproduce
14+
15+
1. Go to '...'
16+
2. Click on '...'
17+
3. Scroll down to '...'
18+
4. See error
19+
20+
## ✅ Expected Behavior
21+
22+
A clear and concise description of what you expected to happen.
23+
24+
## ❌ Actual Behavior
25+
26+
What actually happened instead.
27+
28+
## 📸 Screenshots
29+
30+
If applicable, add screenshots to help explain your problem.
31+
32+
## 🌍 Environment
33+
34+
**WordPress:**
35+
36+
- Version: [e.g., 6.7]
37+
- Multisite: [Yes/No]
38+
- Active Theme: [e.g., Twenty Twenty-Four]
39+
40+
**Plugin:**
41+
42+
- WP Kakitai Version: [e.g., 1.0.0]
43+
44+
**Browser:**
45+
46+
- Name and Version: [e.g., Chrome 120, Firefox 121, Safari 17]
47+
48+
**Server:**
49+
50+
- PHP Version: [e.g., 8.1]
51+
- Database: [e.g., MySQL 8.0]
52+
53+
## 📝 Additional Context
54+
55+
Add any other context about the problem here. For example:
56+
57+
- Does it happen with all Japanese text or specific characters?
58+
- Does it work with a default theme?
59+
- Are there any JavaScript errors in the console?
60+
- Any PHP errors in the debug log?
61+
62+
## 🔍 Console Errors
63+
64+
If applicable, paste any JavaScript console errors here:
65+
66+
```
67+
[Paste console errors here]
68+
```
69+
70+
## 📎 Related Issues
71+
72+
Link any related issues here.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## 💡 Feature Description
10+
11+
A clear and concise description of the feature you'd like to see.
12+
13+
## 🎯 Problem / Use Case
14+
15+
Describe the problem this feature would solve or the use case it addresses.
16+
17+
**Example:**
18+
"As a Japanese language teacher, I want to be able to [do something] so that [outcome]."
19+
20+
## 🔧 Proposed Solution
21+
22+
Describe how you envision this feature working.
23+
24+
## 🤔 Alternatives Considered
25+
26+
Have you considered any alternative solutions or workarounds?
27+
28+
## 📸 Mockups / Examples
29+
30+
If applicable, add mockups, screenshots, or examples of similar features in other applications.
31+
32+
## 📊 Priority
33+
34+
How important is this feature to you?
35+
36+
- [ ] Critical - I can't use the plugin without this
37+
- [ ] High - Would significantly improve my workflow
38+
- [ ] Medium - Nice to have
39+
- [ ] Low - Just an idea
40+
41+
## 🎓 Use Case Details
42+
43+
**Target audience:** [e.g., language learners, teachers, content creators]
44+
45+
**Frequency of use:** [e.g., daily, weekly, occasionally]
46+
47+
**Block types affected:** [e.g., Paragraph, Heading, List, etc.]
48+
49+
## 💬 Additional Context
50+
51+
Add any other context, screenshots, or examples about the feature request here.
52+
53+
## 🔗 Related Issues
54+
55+
Link any related issues or discussions here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
## 📝 Description
2+
3+
<!-- Provide a brief description of the changes in this PR -->
4+
5+
## 🔗 Related Issue
6+
7+
<!-- Link to the issue this PR addresses. Use "Fixes #123" or "Closes #123" to auto-close the issue when merged -->
8+
9+
Fixes #
10+
11+
## 🎯 Type of Change
12+
13+
<!-- Check all that apply -->
14+
15+
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
16+
- [ ] ✨ New feature (non-breaking change which adds functionality)
17+
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
18+
- [ ] 📝 Documentation update
19+
- [ ] 🎨 Style/UI update (non-functional changes)
20+
- [ ] ♻️ Code refactoring (no functional changes)
21+
- [ ] ⚡ Performance improvement
22+
- [ ] ✅ Test update
23+
24+
## 🧪 Testing
25+
26+
<!-- Describe the tests you ran and how to reproduce them -->
27+
28+
### Test Environment
29+
30+
- WordPress Version:
31+
- PHP Version:
32+
- Browser(s) Tested:
33+
- Theme Tested:
34+
35+
### Test Steps
36+
37+
1.
38+
2.
39+
3.
40+
41+
### Test Results
42+
43+
- [ ] Tested in Gutenberg editor
44+
- [ ] Tested with Paragraph blocks
45+
- [ ] Tested with Heading blocks
46+
- [ ] No JavaScript console errors
47+
- [ ] No PHP errors in debug log
48+
- [ ] Works with different Japanese text samples
49+
50+
## 📸 Screenshots / Videos
51+
52+
<!-- If applicable, add screenshots or screen recordings to demonstrate the changes -->
53+
54+
**Before:**
55+
56+
**After:**
57+
58+
## ✅ Checklist
59+
60+
<!-- Check all items before submitting -->
61+
62+
- [ ] My code follows the WordPress coding standards
63+
- [ ] I have performed a self-review of my code
64+
- [ ] I have commented my code, particularly in hard-to-understand areas
65+
- [ ] I have made corresponding changes to the documentation
66+
- [ ] My changes generate no new warnings or errors
67+
- [ ] I have tested my changes in the Gutenberg editor
68+
- [ ] I have updated CHANGELOG.md (if applicable)
69+
- [ ] All linters pass (`npm run lint:js`, `npm run lint:css`, `composer lint`)
70+
- [ ] Build succeeds (`npm run build`)
71+
72+
## 📖 Additional Notes
73+
74+
<!-- Any additional information that reviewers should know -->
75+
76+
## 🙋 Questions for Reviewers
77+
78+
<!-- Any specific areas you'd like reviewers to focus on or questions you have -->

.github/workflows/release.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '20'
23+
cache: 'npm'
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Build plugin
29+
run: npm run build
30+
31+
- name: Create plugin ZIP
32+
run: |
33+
# Create temporary folder for the plugin
34+
mkdir -p wp-kakitai
35+
36+
# Copy necessary files
37+
cp -r build wp-kakitai/
38+
cp wp-kakitai.php wp-kakitai/
39+
cp readme.txt wp-kakitai/
40+
cp LICENSE wp-kakitai/
41+
42+
# Create the archive
43+
zip -r wp-kakitai.zip wp-kakitai
44+
45+
# Verify contents
46+
echo "📦 Archive contents:"
47+
unzip -l wp-kakitai.zip
48+
49+
- name: Extract version from tag
50+
id: get_version
51+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
52+
53+
- name: Create Release
54+
uses: softprops/action-gh-release@v1
55+
with:
56+
files: wp-kakitai.zip
57+
generate_release_notes: true
58+
name: Version ${{ steps.get_version.outputs.VERSION }}
59+
body: |
60+
## 🎉 Version ${{ steps.get_version.outputs.VERSION }}
61+
62+
### Installation
63+
64+
1. Download the `wp-kakitai.zip` file
65+
2. In WordPress, go to Plugins → Add New
66+
3. Click "Upload Plugin"
67+
4. Select the ZIP file and click "Install Now"
68+
5. Activate the plugin
69+
70+
### Usage
71+
72+
In the Gutenberg editor:
73+
1. Select Japanese text containing kanji
74+
2. Click the "Furigana" button (language icon) in the toolbar
75+
3. Furigana are automatically added
76+
4. Click again to remove them
77+
78+
---
79+
80+
📝 See the [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for more details.
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [1.0.0] - 2025-10-26
11+
12+
### Added
13+
14+
- Initial release
15+
- Automatic furigana addition for Japanese kanji using Kuromoji.js
16+
- Toggle functionality to add/remove furigana
17+
- Integration with Gutenberg editor toolbar
18+
- Support for Paragraph and Heading blocks
19+
- Uses standard HTML `<ruby>`, `<rt>`, and `<rp>` tags
20+
- Client-side morphological analysis with caching
21+
- Hiragana conversion from katakana readings
22+
- Webpack configuration with Node.js polyfills for browser compatibility
23+
- Dictionary files bundled with the plugin
24+
25+
### Technical Details
26+
27+
- Built with WordPress Gutenberg Block API
28+
- React hooks for state management
29+
- Kuromoji.js for Japanese tokenization
30+
- Webpack 5 with custom configuration
31+
- Node.js polyfills: path, zlib, stream, buffer, util
32+
- Dictionary files automatically copied to build directory
33+
34+
[Unreleased]: https://github.com/firestar300/wp-kakitai/compare/v1.0.0...HEAD
35+
[1.0.0]: https://github.com/firestar300/wp-kakitai/releases/tag/v1.0.0

0 commit comments

Comments
 (0)