Skip to content
Open
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
91 changes: 0 additions & 91 deletions .github/workflows/analyze.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .github/workflows/analyze_comment.yml

This file was deleted.

88 changes: 88 additions & 0 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Deploy React Docs (Next.js) to GitHub Pages

on:
push:
branches: ["main"]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "yarn"

- name: Setup Yarn Classic
run: npm i -g yarn@1.22.22

- name: Setup GitHub Pages (Next.js)
uses: actions/configure-pages@v5
with:
static_site_generator: next

- name: Restore Next.js cache
uses: actions/cache@v4
with:
path: |
.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/*.[jt]s', '**/*.[jt]sx', '**/*.md', '**/*.mdx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build site
run: yarn build

- name: Patch encoded dynamic chunk filename for GitHub Pages
run: |
set -e
PAGES_CHUNKS_DIR="out/_next/static/chunks/pages"
if [ -d "$PAGES_CHUNKS_DIR" ]; then
for f in "$PAGES_CHUNKS_DIR"/\[\[...markdownPath\]\]-*.js; do
if [ -f "$f" ]; then
base="$(basename "$f")"
encoded="${base//\[\[...markdownPath\]\]/%5B%5B...markdownPath%5D%5D}"
cp "$f" "$PAGES_CHUNKS_DIR/$encoded"
fi
done
fi

- name: Verify output folder
run: |
ls -la
test -d out || (echo "ERROR: ./out not found after build" && exit 1)

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./out

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
27 changes: 0 additions & 27 deletions .github/workflows/site_lint.yml

This file was deleted.

94 changes: 94 additions & 0 deletions CONTRIBUTE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# CONTRIBUTE

מסמך זה מגדיר תהליך מלא לתרגום `he.react.dev` לעברית.

## מטרה

לתרגם את כל דפי התיעוד והתוכן באתר לעברית, תוך שמירה על קוד, API names, פונקציות, מזהים טכניים ושמות חבילות באנגלית.

## עקרונות תרגום

1. קוד נשאר באנגלית:
- בלוקי קוד (```)
- Inline code (טקסט בין `)
- שמות פונקציות, hooks, APIs, ספריות, נתיבים ופקודות
2. טקסט הסבר, כותרות ופסקאות מתורגמים לעברית מלאה.
3. שמירה על מבנה Markdown/MDX:
- אין למחוק Frontmatter
- אין לשנות `id`, `permalink`, anchors קיימים אלא אם יש החלטה מסודרת בפרויקט
4. קישורים:
- כתובות URL נשארות כפי שהן
- טקסט הקישור מתורגם לעברית כשאפשר
5. מונחים טכניים:
- React, JSX, Hooks, State, Props יכולים להישאר באנגלית אם התרגום פוגע בבהירות
- להשתמש במינוחים עקביים לאורך כל האתר

## היקף קבצים לתרגום

1. תוכן האתר:
- `src/content/**/*.md`
2. דפי קהילה ובלוג:
- `src/content/community/**/*.md`
- `src/content/blog/**/*.md`
3. דפי API ו-Reference:
- `src/content/reference/**/*.md`
4. קבצי מעטפת תיעוד:
- `README.md`
- `CONTRIBUTING.md` (או גרסה עברית ייעודית)

## תהליך עבודה מומלץ

1. יצירת ענף עבודה:
- `git checkout main`
- `git pull origin main`
- `git checkout -b docs/hebrew-full-translation`
2. תרגום לפי אצוות קטנות (batch):
- כל PR יכלול תחום אחד: `learn`, `reference`, `community` וכו'
3. בדיקה מקומית:
- `yarn`
- `yarn dev`
- פתיחה: `http://localhost:3000`
4. בדיקות איכות:
- `yarn check-all`
5. Commit ברור לכל אצווה:
- `git add -A`
- `git commit -m "Translate learn section to Hebrew (batch 1)"`

## צ'ק ליסט לכל קובץ מתורגם

1. הכותרת תורגמה לעברית ברורה.
2. הפסקאות תורגמו בלי לשנות משמעות טכנית.
3. קוד נשאר זהה למקור.
4. טבלאות, רשימות ובלוקי הערות מוצגים נכון.
5. קישורים תקינים.
6. אין שגיאות Markdown/MDX.

## QA לפני PR

1. מעבר ידני על הדפים ששונו (Desktop + Mobile).
2. בדיקת עקביות טרמינולוגית מול דפים סמוכים.
3. חיפוש מהיר למונחים שלא תורגמו בטעות:
- לדוגמה: משפטים ארוכים באנגלית מחוץ לבלוקי קוד.
4. וידוא שלא נשברו anchors של כותרות קיימות.

## מדיניות PR

1. PR קטן עד בינוני עדיף על PR ענק.
2. בכותרת PR לציין את האזור המתורגם.
3. בתיאור PR לכלול:
- רשימת קבצים
- סיכום החלטות טרמינולוגיה
- צילומי מסך במידת הצורך

## סטטוס תרגום (תבנית לעדכון)

- `learn`: in progress
- `reference`: pending
- `community`: pending
- `blog`: pending
- `warnings/errors`: pending
- `README/CONTRIBUTING`: in progress

## הערה חשובה

תרגום מלא לכל האתר הוא עבודה רחבה. מומלץ לבצע באצוות מסודרות ולשמור על איכות תרגום גבוהה ועקבית במקום שינוי חד-פעמי גדול מדי.
Loading