Skip to content

Commit c1bc50f

Browse files
authored
add action to translate readme (#151)
* add action to translate readme * feat: add French README for generative AI course * fix: update translation workflow to correctly handle README.md and JSON files * fix: correct file pattern for translation workflow to include nested JSON files * add french translations * Add French translations for lessons * fix: correct path in translation script and add usage data for new lessons * Add French translation for Lesson 7: Model Context Protocol (MCP) * fix: update translation workflow to include lesson README files and remove unnecessary branch * Add French translations for additional lessons and update usage data * update some translations * better handling of alerts * fix: correct formatting in French translations and update usage data for structured output lessons * fix: correct formatting for notes and important sections in French translations * translate image alt * fix: add section for non-translatable technical terms in glossary * Update French translations for RAG lesson and related files - Revised the French translation of Ada's example in the RAG lesson to improve clarity and accuracy. - Updated the corresponding JSON translation file to reflect the changes made in the RAG lesson. - Added usage statistics for the RAG lesson translation in the usage log. * fix: update CSV link and improve French translation for RAG lesson example * fix: correct formatting for important notes in French translations
1 parent 9bf4376 commit c1bc50f

File tree

15 files changed

+5117
-1
lines changed

15 files changed

+5117
-1
lines changed

.github/workflows/translation.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Continuous Translation
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "README.md"
9+
- lessons/*/README.md
10+
permissions:
11+
contents: write
12+
models: read
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
jobs:
17+
continuous_translation:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: actions/cache@v4
22+
with:
23+
path: .genaiscript/cache/**
24+
key: continuous-translation-${{ github.run_id }}
25+
restore-keys: |
26+
continuous-translation-
27+
- uses: pelikhan/action-continuous-translation@v0
28+
with:
29+
github_token: ${{ secrets.GITHUB_TOKEN }}
30+
lang: fr
31+
files: |
32+
- README.md
33+
- lessons/*/README.md
34+
- uses: stefanzweifel/git-auto-commit-action@v5
35+
with:
36+
file_pattern: "**.md* **/translations/*.json"
37+
commit_message: "[cai] translated docs"
38+
commit_user_name: "genaiscript"

README.fr.md

Lines changed: 155 additions & 0 deletions
Large diffs are not rendered by default.

glossary.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,9 @@ A comprehensive list of technical terms used throughout the lessons.
4343
- **Tokenizer**: A tool used to convert text into tokens, providing structure for how data is inputted or analyzed by models.
4444
- **Vector Search**: Retrieval technique comparing encoded vectors to find semantically similar information in AI applications.
4545
- **XML (eXtensible Markup Language)**: A markup language formatting structured data for information storage, exchange, or generative model input/output.
46+
47+
## Technical Terms
48+
49+
The following terms should NOT be translated:
50+
51+
- prompt

lessons/01-intro-to-genai/translations/README.fr.md

Lines changed: 348 additions & 0 deletions
Large diffs are not rendered by default.

lessons/02-first-ai-app/translations/README.fr.md

Lines changed: 501 additions & 0 deletions
Large diffs are not rendered by default.

lessons/03-prompt-engineering/translations/README.fr.md

Lines changed: 339 additions & 0 deletions
Large diffs are not rendered by default.

lessons/04-structured-output/translations/README.fr.md

Lines changed: 561 additions & 0 deletions
Large diffs are not rendered by default.

lessons/05-rag/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ RAG can be considered as an advanced form of *prompt engineering*.
193193

194194
### Code example
195195

196-
**Ada:** Practice makes perfect, so let’s apply what we’ve learned with an example. We’ll build a simple retrieval system into a JavaScript app using a [CSV](https://fr.wikipedia.org/wiki/Comma-separated_values) file of hybrid car data and a basic search algorithm to pull relevant info based on a user’s question.
196+
**Ada:** Practice makes perfect, so let’s apply what we’ve learned with an example. We’ll build a simple retrieval system into a JavaScript app using a [CSV](https://en.wikipedia.org/wiki/Comma-separated_values) file of hybrid car data and a basic search algorithm to pull relevant info based on a user’s question.
197197

198198
```javascript
199199
// This example demonstrates how to use the Retrieval Augmented Generation (RAG)

lessons/05-rag/translations/README.fr.md

Lines changed: 343 additions & 0 deletions
Large diffs are not rendered by default.

lessons/06-tool-calling/translations/README.fr.md

Lines changed: 440 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)