GDK로 코드 기여하기
이제 재미있는 부분입니다. 코드를 수정해 보겠습니다.
이 예제에서는 변경하고 싶은 UI 텍스트를 찾았습니다.
GitLab의 오른쪽 상단 모서리에서 아바타를 선택한 다음 Preferences를 선택했습니다.
Customize the color of GitLab
을 Customize the color theme of the GitLab UI
로 변경하고 싶습니다:
로컬 IDE를 사용하여 GDK 디렉토리의 코드를 수정합니다.
-
변경 사항을 위한 새 브랜치를 만듭니다:
git checkout -b ui-updates
-
gitlab-development-kit/gitlab
디렉토리에서Customize the color of GitLab
문자열을 검색합니다.결과에는 하나의
.haml
파일과 여러 개의.po
파일이 표시됩니다. -
app/views/profiles/preferences/show.html.haml
파일을 엽니다. - 문자열을
Customize the color of GitLab
에서
Customize the color theme of the GitLab UI
로 업데이트합니다. - 파일을 저장합니다.
-
성공했는지 확인할 수 있습니다:
gitlab-development-kit/gitlab
디렉토리에서git status
를 입력하여 수정한 파일을 표시합니다:modified: app/views/profiles/preferences/show.html.haml
-
GDK를 보고 있는 웹 브라우저를 새로 고칩니다.
변경 사항이 표시되어야 합니다. 스크린샷을 찍습니다. -
변경 사항을 커밋합니다:
git commit -a -m "Update UI text Standardizing the text on this page so that each area uses consistent language."
GitLab
커밋 메시지 가이드라인을 따릅니다. -
변경 사항을 새 브랜치에 푸시합니다:
git push --set-upstream origin ui-updates
- 코드 변경으로 병합 요청을 생성하거나 번역 파일을 업데이트합니다.
번역 파일 업데이트
영어 UI 문자열은 여러 언어로 현지화됩니다.
이 문자열은 .pot
파일에 저장되며, UI 텍스트를 업데이트할 때마다
다시 생성해야 합니다.
현지화 파일을 자동으로 다시 생성하려면:
-
gitlab-development-kit/gitlab
디렉토리에 있는지 확인합니다. -
다음 명령어를 실행합니다:
tooling/bin/gettext_extractor locale/gitlab.pot
/locale
디렉토리에.pot
파일이 생성됩니다.이제
gitlab-development-kit/gitlab
디렉토리에서git status
를 입력하면
두 파일이 나열되어야 합니다:modified: app/views/profiles/preferences/show.html.haml modified: locale/gitlab.pot
- 변경 사항을 커밋하고 푸시합니다.
- 병합 요청을 생성하거나 문서를 업데이트합니다.
현지화에 대한 자세한 내용은 국제화를 참조하세요.
문서 업데이트
GitLab 문서는 https://docs.gitlab.com에 게시됩니다.
기능을 추가하거나 업데이트하면 문서도 업데이트해야 합니다.
-
기능에 대한 문서를 찾으려면,
문서 사이트에서 검색하는 것이 가장 쉽습니다.
이 경우, 설정이 이 문서 페이지에 설명되어 있습니다:https://docs.gitlab.com/ee/user/profile/preferences.html
-
URL에서
/doc
디렉토리의 파일 위치를 보여줍니다.
이 경우 위치는:doc/user/profile/preferences.md
-
로컬
gitlab
리포지토리의 이 위치로 가서.md
파일과
관련 이미지를 업데이트합니다.이제
git status
를 실행하면 다음과 같은 출력이 표시되어야 합니다:modified: app/views/profiles/preferences/show.html.haml modified: doc/user/profile/img/profile-preferences-syntax-themes.png modified: doc/user/profile/preferences.md modified: locale/gitlab.pot
- 변경 사항을 커밋하고 푸시합니다.
- 병합 요청을 생성하거나 문서를 업데이트합니다.