Skip to content

Commit 4f4b561

Browse files
authored
Merge branch 'main' into issue#928
2 parents d1bcb10 + 31b5d84 commit 4f4b561

File tree

169 files changed

+22556
-9121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+22556
-9121
lines changed

.github/actions/translation-tracker/index.js

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -371,14 +371,15 @@ class GitHubCommitTracker {
371371
const englishFile = fileTranslations.englishFile;
372372
const outdatedLanguages = fileTranslations.outdatedLanguages;
373373
const missingLanguages = fileTranslations.missingLanguages;
374+
const englishCommit = fileTranslations.englishCommit;
374375

375376
let body = `## 🌍 Translation Update Needed
376377
377378
**File**: \`${englishFile}\`
378379
**Branch**: \`${this.currentBranch}\`
379380
380381
### 📅 Timeline
381-
- **Latest English update**: ${fileTranslations.englishCommit.date.toLocaleDateString()} by ${fileTranslations.englishCommit.author}
382+
- **Latest English update**: ${englishCommit.date.toLocaleDateString()} by ${englishCommit.author}
382383
383384
`;
384385

@@ -420,7 +421,7 @@ class GitHubCommitTracker {
420421
- [ ] Ensure translation is accurate and culturally appropriate
421422
422423
### 📝 Summary of English File Changes
423-
**Last commit**: [${fileTranslations.englishCommit.message}](${fileTranslations.englishCommit.url})
424+
**Last commit**: [${englishCommit.message}](${englishCommit.url})
424425
425426
${outdatedLanguages.length > 0 || missingLanguages.length > 0 ? `**Change Type**: English file was updated. ${outdatedLanguages.length > 0 ? `${outdatedLanguages.map(l => this.getLanguageDisplayName(l.language)).join(', ')} translation${outdatedLanguages.length > 1 ? 's' : ''} may be outdated.` : ''} ${missingLanguages.length > 0 ? `${missingLanguages.map(l => this.getLanguageDisplayName(l.language)).join(', ')} translation${missingLanguages.length > 1 ? 's are' : ' is'} missing.` : ''}` : ''}
426427
@@ -543,12 +544,22 @@ async function checkTranslationStatus(changedFiles, githubTracker = null, create
543544
const fileTranslationMap = translationStatus.fileTranslationMap;
544545

545546
for (const englishFile of changedFiles) {
547+
548+
let englishCommit = null;
549+
if (githubTracker) {
550+
englishCommit = await githubTracker.getLastCommit(englishFile);
551+
if (!englishCommit) {
552+
console.log(`⚠️ Skipping ${englishFile} - could not retrieve commit data`);
553+
continue;
554+
}
555+
}
556+
546557
const fileTranslations = {
547558
englishFile,
548559
outdatedLanguages: [],
549560
missingLanguages: [],
550561
upToDateLanguages: [],
551-
englishCommit: null
562+
englishCommit
552563
};
553564

554565
for (const language of SUPPORTED_LANGUAGES) {
@@ -569,17 +580,8 @@ async function checkTranslationStatus(changedFiles, githubTracker = null, create
569580

570581

571582
if (githubTracker) {
572-
// Get English commit only once per file
573-
if (!fileTranslations.englishCommit) {
574-
fileTranslations.englishCommit = await githubTracker.getLastCommit(englishFile);
575-
}
576-
const englishCommit = fileTranslations.englishCommit;
577583
const translationCommit = await githubTracker.getLastCommit(translationPath);
578584

579-
if (!englishCommit) {
580-
continue;
581-
}
582-
583585
if (!translationCommit) {
584586
const missingItem = {
585587
englishFile,

.github/workflows/translation-sync.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
- 'src/content/tutorials/en/**'
99
workflow_dispatch:
1010

11+
permissions:
12+
contents: read
13+
issues: write
14+
pull-requests: read
15+
1116
jobs:
1217
track-translation-changes:
1318
runs-on: ubuntu-latest

astro.config.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ if (shouldSkipCompress) {
2020
export default defineConfig({
2121
site: 'https://p5js.org',
2222
compressHTML: false,
23+
legacy: {
24+
collections: true
25+
},
2326
integrations: [
2427
mermaid({autoTheme: true}),
2528
preact({
@@ -78,7 +81,7 @@ export default defineConfig({
7881
},
7982
markdown: {
8083
shikiConfig: {
81-
theme: 'github-light',
84+
theme: 'github-light-high-contrast',
8285
},
8386
},
8487
});

docs/localization_hi.md

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# Hindi (हिन्दी) Localization Guide
2+
3+
This document contains the standardized Hindi translations for technical and p5.js-specific terms used across the p5.js website. Translators should refer to this glossary to maintain consistency.
4+
5+
For the general localization architecture, see [localization.md](./localization.md).
6+
7+
## Programming-Specific Terms
8+
9+
| English | Hindi (हिन्दी) |
10+
| --- | --- |
11+
| array | सरणी |
12+
| asynchronous | अतुल्यकालिक |
13+
| attribute | गुण |
14+
| blob tracking | बूँद ट्रैकिंग |
15+
| boolean | बूलियन |
16+
| byte | बाइट |
17+
| callback | कॉलबैक |
18+
| camera frustrum | कैमरा दृष्टिकोण |
19+
| changelog | परिवर्तन लॉग |
20+
| class | क्लास |
21+
| code editor | कोड संपादक |
22+
| color space | रंग स्थान |
23+
| command line | कमांड लाइन |
24+
| comment | टिप्पणी |
25+
| compile | संकलन |
26+
| component | अवयव |
27+
| conditionals | शर्तें |
28+
| console | कंसोल |
29+
| constant | स्थिरांक |
30+
| constructor function | कंस्ट्रक्टर फ़ंक्शन |
31+
| control statement | नियंत्रण कथन |
32+
| coordinate | निर्देशांक |
33+
| curly brace | घुंघराले कोष्ठक |
34+
| debug | डीबग |
35+
| default value | डिफ़ॉल्ट मान |
36+
| deprecated | पदावनत |
37+
| depth | गहराई |
38+
| error | गलती |
39+
| event | आयोजन |
40+
| fields | फील्ड |
41+
| file | दस्तावेज़ |
42+
| floating-point number | चल बिन्दु संख्या |
43+
| framework | रूपरेखा |
44+
| function | कार्य |
45+
| functional programming | कार्यात्मक कार्यरचना |
46+
| HTML | एचटीएमएल |
47+
| HTML tag | एचटीएमएल टैग |
48+
| indent | मांगपत्र |
49+
| index | अनुक्रमणिका |
50+
| iteration | पुनरावर्तन |
51+
| matrix | आव्यूह |
52+
| minify | छोटा करना |
53+
| modelview | मॉडलव्यू |
54+
| motion detection | गति का पता लगाना |
55+
| noise | शोर |
56+
| object | ऑब्जेक्ट |
57+
| object oriented programming | ऑब्जेक्ट ओरिएंटेड प्रोग्रामिंग |
58+
| operator | ऑपरेटर |
59+
| optimize | अनुकूलन |
60+
| optional argument | वैकल्पिक तर्क |
61+
| parameter/argument | पैरामीटर/तर्क |
62+
| parentheses | कोष्टक |
63+
| pixel | पिक्सेल |
64+
| programming library | प्रोग्रामिंग (कंप्यूटिंग) लाइब्रेरी |
65+
| radian | कांति |
66+
| raster | रेखापुंज |
67+
| recursion | प्रत्यावर्तन |
68+
| reference/documentation | संदर्भ/दस्तावेज़ीकरण |
69+
| render/rendering | प्रस्तुत करना/प्रतिपादन करना |
70+
| repository | कोष |
71+
| return | वापसी विवरण |
72+
| scope | दायरा |
73+
| screen | पर्दा |
74+
| server | सर्वर |
75+
| source code | स्रोत कोड |
76+
| square bracket | वर्गाकार ब्रैकेट |
77+
| string | स्ट्रिंग |
78+
| stylesheet | शैली पत्रक |
79+
| subclass | सब-क्लास |
80+
| superclass | सुपर-क्लास |
81+
| syntax | वाक्य - विन्यास |
82+
| test driven development | परीक्षण संचालित विकास |
83+
| transform | परिवर्तन |
84+
| unit testing | इकाई का परीक्षण |
85+
| variable | चर |
86+
| vector | वेक्टर |
87+
| vertex | शिखर |
88+
| video | वीडियो |
89+
90+
## p5.js-Specific Terms
91+
92+
| English | Hindi (हिन्दी) |
93+
| --- | --- |
94+
| access | पहुँच |
95+
| accessibility | उपलब्धता |
96+
| addon library | ऐडऑन लाइब्रेरी |
97+
| audio | आवाज़ |
98+
| bezier | बेइजेर |
99+
| brightness | चमक |
100+
| button | बटन |
101+
| canvas | कैनवास |
102+
| coding | कोडिंग (संकेतीकरण) |
103+
| community | समुदाय |
104+
| creative coding | रचनात्मक कोडिंग |
105+
| emulation | अनुकरण |
106+
| frame | फ्रेम |
107+
| gradient (color) | ग्रेडियेंट |
108+
| gradient (math) | क्रमिक |
109+
| graphics buffer | ग्राफ़िक्स बफ़र |
110+
| hue | रंग |
111+
| image | छवि |
112+
| input | इनपुट |
113+
| instance mode | उदाहरण मोड |
114+
| linear interpolation | रेखिक आंतरिक |
115+
| port | पोर्ट |
116+
| project | प्रोजैक्ट |
117+
| saturation | संतृप्ति |
118+
| sketch | स्केच |
119+
| sketchbook | स्केचबुक |
120+
| sound | आवाज़ |
121+
| stroke (outline) | रूपरेखा |
122+
| video | वीडियो |
123+
| webcam | वेबकैम |

docs/technical_overview.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ The website code is divided into a few main folders:
3535
- `src/content/` this is where almost all content authoring happens in the repo. These files contain the content that is used to generate the website.
3636
- `src/components/` holds UI elements that are rendered on different pages of the website. Things like basic buttons, as well as more specialized things like the top navigation menus are here.
3737
- `src/layouts/` this contains the basic visual structure of each page. If you are looking to edit a specific page of the website, finding the layout for it in this folder is a great place to start.
38-
- `src/pages/` these files are primarily used to create the routes (the different URLs) for the pages of the website and pull content from `src/content/`. Note that every route basically exists twice: once in `src/pages/` and again in `src/[locale]/pages/` to support localized urls. Read more about this in [./localization-architecture.md]
38+
39+
- `src/pages/` these files are primarily used to create the routes (the different URLs) for the pages of the website and pull content from `src/content/`. Note that every route basically exists twice: once in `src/pages/` and again in `src/pages/[locale]/` to support localized urls. Read more about this in `[./localization.md]`
3940
- `src/api/` holds the logic for fetching information from the OpenProcessing API, where all the gallery sketches for this website are stored
4041
- `src/i18n/` holds the utilities and configuration for working with translations
4142
- `src/scripts/` contains utility scripts that update the files in `src/content/` with changes in the p5.js repo

0 commit comments

Comments
 (0)