← Documents Documentation/doc-guide/checktransupdate.rst GitHub 원문 ↗

Linux 6.18.37 · Documentation Guide

Checking for Needed Translation Updates

checktransupdate.py로 locale별 번역과 영어 원문 commit의 차이를 추적하고 갱신 대상을 확인하는 방법을 설명합니다.

Source pathDocumentation/doc-guide/checktransupdate.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

checktransupdate.rst:1-54

checktransupdate.py로 locale별 번역과 영어 원문 commit의 차이를 추적하고 갱신 대상을 확인하는 방법을 설명합니다. 영어 원문 전체와 한국어 전문 번역을 함께 제공하며 명령, source path, commit, patch와 RST directive 및 원문 줄 좌표를 보존합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 Checking for needed translation updates
4 =======================================
5
6 This script helps track the translation status of the documentation in
7 different locales, i.e., whether the documentation is up-to-date with
8 the English counterpart.
9
10 How it works
11 ------------
12
13 It uses ``git log`` command to track the latest English commit from the
14 translation commit (order by author date) and the latest English commits
15 from HEAD. If any differences occur, the file is considered as out-of-date,
16 then commits that need to be updated will be collected and reported.
17
18 Features implemented
19
20 - check all files in a certain locale
21 - check a single file or a set of files
22 - provide options to change output format
23 - track the translation status of files that have no translation
24
25 Usage
26 -----
27
28 ::
29
30 ./scripts/checktransupdate.py --help
31
32 Please refer to the output of argument parser for usage details.
33
34 Samples
35
36 - ``./scripts/checktransupdate.py -l zh_CN``
37 This will print all the files that need to be updated in the zh_CN locale.
38 - ``./scripts/checktransupdate.py Documentation/translations/zh_CN/dev-tools/testing-overview.rst``
39 This will only print the status of the specified file.
40
41 Then the output is something like:
42
43 ::
44
45 Documentation/dev-tools/kfence.rst
46 No translation in the locale of zh_CN
47
48 Documentation/translations/zh_CN/dev-tools/testing-overview.rst
49 commit 42fb9cfd5b18 ("Documentation: dev-tools: Add link to RV docs")
50 1 commits needs resolving in total
51
52 Features to be implemented
53
54 - files can be a folder instead of only a file
55

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

필요한 번역 갱신 확인

1-9

이 스크립트는 여러 locale의 문서 번역이 영어 원문과 비교해 최신 상태인지 추적합니다. 문서에는 `GPL-2.0` 라이선스가 적용됩니다.

git log 기반 추적과 지원 기능

10-24

스크립트는 `git log`를 사용하여 번역 commit의 author date를 기준으로 그 시점의 최신 영어 commit과 현재 `HEAD`의 최신 영어 commit을 추적합니다. 차이가 있으면 파일을 오래된 상태로 간주하고 갱신이 필요한 commit을 수집해 보고합니다.

구현된 기능은 다음과 같습니다.

  • 특정 locale의 모든 파일 검사
  • 파일 하나 또는 파일 집합 검사
  • 출력 형식을 바꾸는 옵션 제공
  • 번역이 없는 파일의 번역 상태 추적

도움말과 사용법

25-33

사용법의 자세한 내용은 argument parser의 도움말 출력에서 확인합니다.

./scripts/checktransupdate.py --help

locale·단일 파일 검사 예제

34-51

`./scripts/checktransupdate.py -l zh_CN`은 `zh_CN` locale에서 갱신해야 하는 모든 파일을 출력합니다. `./scripts/checktransupdate.py Documentation/translations/zh_CN/dev-tools/testing-overview.rst`는 지정한 파일의 상태만 출력합니다.

예제 출력은 번역이 없는 원문과 번역 파일에 반영해야 할 영어 commit, 해결할 총 commit 수를 구분해 보여 줍니다.

Documentation/dev-tools/kfence.rst
No translation in the locale of zh_CN

Documentation/translations/zh_CN/dev-tools/testing-overview.rst
commit 42fb9cfd5b18 ("Documentation: dev-tools: Add link to RV docs")
1 commits needs resolving in total

추가 구현 예정 기능

52-54

앞으로 파일만이 아니라 폴더도 검사 대상으로 지정할 수 있게 할 예정입니다.