Skip to content

Commit db7e623

Browse files
committed
retranslated
1 parent 7b25191 commit db7e623

File tree

5 files changed

+181
-4
lines changed

5 files changed

+181
-4
lines changed

i18n/cn/docusaurus-plugin-content-docs/current/news/whats_new.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ description: 您可以了解 DHTMLX Kanban 的最新特性和更新,查看其
88

99
如果您正在从旧版本升级 Kanban,建议查阅 [迁移到新版本](/news/migration.md) 以获取更多信息。
1010

11+
## 版本 1.6.5
12+
13+
发布日期:2025 年 7 月 14 日
14+
15+
### 修复
16+
17+
- `disabled: true` 配置对菜单项无效
18+
- 当向未定义结构的 Kanban 添加行时,行头未显示
1119

1220
## 版本 1.6.4
1321

@@ -19,7 +27,6 @@ description: 您可以了解 DHTMLX Kanban 的最新特性和更新,查看其
1927
- 上传列表按钮缺少本地化标签
2028
- 商业版本包中缺少自述文件
2129

22-
2330
## 版本 1.6.3
2431

2532
发布日期:2025 年 4 月 8 日

i18n/de/docusaurus-plugin-content-docs/current/news/whats_new.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ description: Informieren Sie sich über die neuesten Funktionen und Updates von
88

99
Wenn Sie Kanban von einer älteren Version aktualisieren, empfiehlt es sich, [Migration zu neueren Versionen](/news/migration.md) für weitere Informationen zu prüfen.
1010

11+
## Version 1.6.5
12+
13+
Veröffentlicht am 14. Juli 2025
14+
15+
### Fehlerbehebungen
16+
17+
- Die `disabled: true` Konfiguration funktioniert nicht für Menüeinträge
18+
- Wenn Sie eine Zeile zu Kanban hinzufügen, ohne dass eine vordefinierte Zeilenstruktur vorhanden ist, erscheinen keine Zeilenköpfe
1119

1220
## Version 1.6.4
1321

@@ -19,7 +27,6 @@ Veröffentlicht am 12. Juni 2025
1927
- Fehlende Locale-Labels für Uploader-Listen-Buttons
2028
- Fehlende Readme-Dateien in kommerziellen Versionen der Pakete
2129

22-
2330
## Version 1.6.3
2431

2532
Veröffentlicht am 8. April 2025

i18n/ko/docusaurus-plugin-content-docs/current/news/whats_new.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,16 @@ description: DHTMLX Kanban의 최신 기능과 업데이트, 릴리스 이력,
66

77
# 새로운 소식
88

9-
Kanban을 이전 버전에서 업데이트할 때는 [새 버전으로 마이그레이션](/news/migration.md) 참고하는 것이 좋습니다.
9+
Kanban을 이전 버전에서 업데이트하는 경우 [새 버전으로 마이그레이션](/news/migration.md) 안내를 참고하는 것이 좋습니다.
1010

11+
## 버전 1.6.5
12+
13+
2025년 7월 14일 릴리스
14+
15+
### 수정 사항
16+
17+
- `disabled: true` 설정이 메뉴 항목에 대해 동작하지 않음
18+
- 미리 정의된 행 구조가 없는 상태에서 Kanban에 행을 추가하면 행 헤더가 나타나지 않음
1119

1220
## 버전 1.6.4
1321

i18n/ru/docusaurus-plugin-content-docs/current/news/whats_new.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ description: Здесь вы можете узнать о последних ф
88

99
При обновлении Kanban с более старой версии рекомендуется ознакомиться с разделом [Переход на новые версии](/news/migration.md) для получения дополнительной информации.
1010

11+
## Версия 1.6.5
12+
13+
Релиз 14 июля 2025
14+
15+
### Исправления
16+
17+
- Конфиг `disabled: true` не работает для пунктов меню
18+
- При добавлении строки в Kanban без предопределённой структуры строк заголовки строк не отображаются
1119

1220
## Версия 1.6.4
1321

@@ -110,7 +118,7 @@ description: Здесь вы можете узнать о последних ф
110118

111119
- Кнопка "Make cover" не отображается, если расширение файла в верхнем регистре
112120
- Клик по неактивному Multiselect вызывает ошибку
113-
- После использования [`addCard()`](/api/methods/js_kanban_addcard_method) прокрутка может привести к ошибкам при включенных прокрутке колонок и ленивом рендере
121+
- После использования [`addCard()`](/api/methods/js_kanban_addcard_method) прокрутка может привести к ошибкам при включённых прокрутке колонок и ленивом рендере
114122
- Отсутствие комментариев сохраняется как пустая строка вместо пустого массива
115123
- Стили редактора могут быть переопределены глобальными стилями с таким же именем класса. [См. раздел по миграции](/news/migration.md/#1512---1513)
116124

retranslate.sh

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
#!/bin/bash
2+
3+
# Translation Update Script
4+
# Usage: ./update_translations.sh <repo_path> <source_folder> <target_folder> <revision>
5+
6+
set -e # Exit on any error
7+
8+
# Check if required arguments are provided
9+
if [ $# -ne 5 ]; then
10+
echo "Usage: $0 <repo_path> <source_folder> <target_folder> <revision> <prompt>"
11+
echo " repo_path: Path to the git repository"
12+
echo " source_folder: Source folder path relative to repo (e.g., 'docs/markdown')"
13+
echo " target_folder: Target folder where processed results are stored"
14+
echo " revision: Git revision to compare against (e.g., HEAD~1, commit_hash)"
15+
echo " lang: target language"
16+
exit 1
17+
fi
18+
19+
REPO_PATH="$1"
20+
SOURCE_FOLDER="$2"
21+
TARGET_FOLDER="$3"
22+
REVISION="$4"
23+
LANG="$5"
24+
25+
# Validate paths
26+
if [ ! -d "$REPO_PATH" ]; then
27+
echo "Error: Repository path '$REPO_PATH' does not exist"
28+
exit 1
29+
fi
30+
31+
if [ ! -d "$REPO_PATH/.git" ]; then
32+
echo "Error: '$REPO_PATH' is not a git repository"
33+
exit 1
34+
fi
35+
36+
if [ ! -d "$TARGET_FOLDER" ]; then
37+
echo "Error: Target folder '$TARGET_FOLDER' does not exist"
38+
exit 1
39+
fi
40+
41+
# Change to repository directory
42+
cd "$REPO_PATH"
43+
44+
# Verify revision exists
45+
if ! git rev-parse --verify "$REVISION" >/dev/null 2>&1; then
46+
echo "Error: Revision '$REVISION' does not exist in the repository"
47+
exit 1
48+
fi
49+
50+
echo "Repository: $REPO_PATH"
51+
echo "Source folder: $SOURCE_FOLDER"
52+
echo "Target folder: $TARGET_FOLDER"
53+
echo "Comparing against revision: $REVISION ($(git rev-parse --short $REVISION))"
54+
echo "Current revision: $(git rev-parse --short HEAD)"
55+
echo ""
56+
57+
# Get list of modified markdown files since the specified revision
58+
echo "Finding modified markdown files since revision $REVISION..."
59+
MODIFIED_FILES=$(git diff --name-only --diff-filter=AM "$REVISION" HEAD -- "$SOURCE_FOLDER" | grep '\.md$' || true)
60+
61+
if [ -z "$MODIFIED_FILES" ]; then
62+
echo "No modified markdown files found in '$SOURCE_FOLDER' since revision $REVISION"
63+
exit 0
64+
fi
65+
66+
echo "Found modified markdown files:"
67+
echo "$MODIFIED_FILES"
68+
echo ""
69+
70+
# Process each modified file
71+
while IFS= read -r file; do
72+
if [ -z "$file" ]; then
73+
continue
74+
fi
75+
76+
echo "Processing: $file"
77+
78+
# Extract filename without path
79+
filename=$(basename "$file")
80+
81+
# Get original content from the specified revision
82+
echo " Reading original content from revision $REVISION..."
83+
TEMP_PROMPT_ORIGINAL=$(git show "$REVISION:$file" 2>/dev/null || echo "")
84+
if [ -z "$TEMP_PROMPT_ORIGINAL" ]; then
85+
echo " Warning: Could not get file content from revision $REVISION (file might be new)"
86+
fi
87+
88+
# Get diff content
89+
echo " Creating diff..."
90+
TEMP_PROMPT_DIFF=$(git diff "$REVISION" HEAD -- "$file" || echo "")
91+
92+
# Find corresponding target file (processed result) and read its content
93+
# Remove source folder prefix and look for the file in target folder
94+
# Handle both cases: with and without trailing slash in SOURCE_FOLDER
95+
if [[ "$file" == "$SOURCE_FOLDER/"* ]]; then
96+
relative_path="${file#$SOURCE_FOLDER/}"
97+
else
98+
relative_path="${file#$SOURCE_FOLDER}"
99+
relative_path="${relative_path#/}" # Remove leading slash if present
100+
fi
101+
target_file="$TARGET_FOLDER/$relative_path"
102+
103+
echo " Reading previous translation..."
104+
if [ -f "$target_file" ]; then
105+
TEMP_PROMPT_TRANSLATION=$(cat "$target_file")
106+
echo " Found existing target file: $target_file"
107+
else
108+
TEMP_PROMPT_TRANSLATION=""
109+
echo " Warning: Target file not found: $target_file"
110+
echo " Creating directory structure..."
111+
mkdir -p "$(dirname "$target_file")"
112+
echo " Attempt direct translation $file"
113+
result=$(cat $file | gptit complete --model gpt-4.1 --prompt translate-v1/en-$LANG)
114+
echo "$result" > "$target_file"
115+
continue
116+
fi
117+
118+
# Export environment variables with content
119+
export TEMP_PROMPT_ORIGINAL
120+
export TEMP_PROMPT_TRANSLATION
121+
export TEMP_PROMPT_DIFF
122+
123+
echo "Environment variables set with content:"
124+
echo " TEMP_PROMPT_ORIGINAL (${#TEMP_PROMPT_ORIGINAL} characters)"
125+
echo " TEMP_PROMPT_TRANSLATION (${#TEMP_PROMPT_TRANSLATION} characters)"
126+
echo " TEMP_PROMPT_DIFF (${#TEMP_PROMPT_DIFF} characters)"
127+
echo ""
128+
129+
result=$(gptit complete --prompt translate-v1/en-$LANG-update --model gpt-4.1 "")
130+
# Save the result to the target file
131+
if [ -n "$result" ]; then
132+
echo "$result" > "$target_file"
133+
echo " result (${#result} characters)"
134+
echo " Updated target file: $target_file"
135+
else
136+
echo " Error: Processing returned empty result"
137+
fi
138+
139+
# Clean up environment variables for security
140+
unset TEMP_PROMPT_ORIGINAL
141+
unset TEMP_PROMPT_TRANSLATION
142+
unset TEMP_PROMPT_DIFF
143+
144+
echo ""
145+
done <<< "$MODIFIED_FILES"
146+
147+
echo "Processing completed!"

0 commit comments

Comments
 (0)