兔兔教大本營
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- title: README | tailwindcss.tw 翻譯工作 Git 簡易操作流程 tags: README, git --- # README | tailwindcss.tw 翻譯工作 Git 簡易操作流程 ## 先加入兔兔教 ## 設定 git 1. 先申請 [github](https://github.com/) 帳號 2. 向可樂大申請加入 tailwindcss.tw 組織 3. 本機切換到要同步 git 的資料夾,將資料 clone 下來 * `git clone https://xxxxxxxxxxx` * git: https://github.com/tailwindcss-tw/tailwindcss.com.git :::info 可樂大:clone 下來之後就會預設 pull default branch 了 ::: ## 作業流程 ### 1. 取得 git 文件最新版本 `git pull origin tw` ### 2. 開個分支 `git checkout -b lang/branch_name` :::info * lang/ 前綴代表為翻譯文件 * branch_name 可自訂名稱,例如用自己的 github 帳號當名稱 ::: ### 3. 進行翻譯 * 可樂大希望大家優先翻譯 `src\pages\doc\` 裡面的資料 * 為避免大家重複翻譯到同一篇,請先至 [github](https://github.com/) 建立 issue 註明正在翻譯的文章。==目前翻譯中的文章列表請參考 [github projects](https://github.com/tailwindcss-tw/tailwindcss.com/projects/2)== * 翻譯時可參考 [官網](https://tailwindcss.com/) 及 [簡中版](https://www.tailwindcss.cn) 內文 * 專有名詞統一用詞:請依照兔子編 [Tailwind CSS 繁體中文技術文件](https://hackmd.io/NO8Gt-vxTS6CIpdegP236g) * 中英文間半形空白原則,請參考 [中文文案排版指北](https://github.com/sparanoid/chinese-copywriting-guidelines) #### 翻譯規範 * title, heading : * 情形一、中文在前,原文加上括號做為參考,例: `響應式設計 (RWD)` https://tailwindcss.tw/docs/responsive-design * 情形二、不用翻的就放英文,例如下例標題裡的 hover, focus: `Hover, Focus 以及其他狀態` https://tailwindcss.tw/docs/hover-focus-and-other-states * 情形三、要翻的就放中文,例: `函數與指令` https://tailwindcss.tw/docs/functions-and-directives :::info 兔兔補充: 屬於 css 原本功能的 是保留英文 (中文在後);可是像核心概念區的、不是css 功能的 就中文在前。 ::: * 翻譯的原文需保留,將其註解並放在該句中文翻譯的上一行(段) * 專有名詞的翻譯用詞參考: * [laravel-taiwan 規範&專有名詞對照](https://github.com/laravel-taiwan/docs/wiki/規範&專有名詞對照) * [國家教育研究院](https://terms.naer.edu.tw) * Responsive的敘述部份 請參考 [Backdrop Sepia](https://tailwindcss.tw/docs/backdrop-sepia) 的翻法 * 常見句子的公版: * 原文:For more information about Tailwind's _____ , check out the _____ documentation. * 譯文:更多有關 _____ 的資訊,可參考 _____ 文件。 * Resonsive 的 import (錯誤與正確的例子) : ![](https://i.imgur.com/yPFKdV2.png) * "you" 請翻譯成 "你",而不是 "您" :::info * 可樂大: 想了一下,技術文件裡面用"你"好了,一來你比較平易近人,二來技術文件不需要有上下位等的關係,有特殊案例覺得用您比較好的話,再提出來大家討論。 ::: ### 4. 翻譯完成後 將檔案推送回 git #### (1) 將檔案加入 git 中 `git add 檔案名稱` // 可指定特定檔案 或 `git add . ` // 會一次加入所有變更過的檔案 #### (2) 撰寫 commit message `git commit` :::info 可樂:推薦使用 `npx git-cz` 代替 ::: ##### commit message 範例 主要描述這個 commit 做了什麼事,例如修改 Home page: `Update: HomePage` #### ==(3) 在 rebase 之前先取得最新的 origin== `git fetch origin` #### ==(4) rebase 一定要記得做!== `git rebase origin/tw` 此時線圖會長這樣 (lang/optimizingForProduction 是你開出來翻譯的分支),只要該分支尾巴與 origin/tw 分支是接在一起的,就代表 rebase 是成功的 ![](https://i.imgur.com/xUxkTIt.png) #### (5) 將結果 push 至 git `git push` :::info 可樂: * 第一次執行應該會出現一行指令叫你打,類似: `git push --set-upstream origin xxxxxxx` 照著打送出即可(這只有第一次要打,以後只要打 `git push` 即可) * 如果同一個 branch 之前有 push 過而需要重新強制 push 的話可以使用 `git push -f` 通常容易發生在重新 rebase 之後 ::: 補充可樂說的 `git push -f`: * 有 `push` 過的 branch,`git push` 的時候,cli 會出現下方(圖一)的提示。 * (圖二)請看 remote 還有一支 `lang/optimizingForProduction`,這樣子情況會沒辦法 `git push`。 圖一 ![](https://i.imgur.com/xGQHLyH.png) 圖二 ![](https://i.imgur.com/kdA4PKE.png) #### (5) 輸入 github 帳號密碼,輸入後便會完成 push ### 5. push 成功之後要上去 [github](https://github.com/) 建立 pull request #### (1) 按下Pull Request 再按下new pull request ![](https://i.imgur.com/dMZfLZg.png) #### (2) 在 base repository 選 tailwindcss-tw ![](https://i.imgur.com/8orUmNH.png) #### (3) 在 base 再選一次tw ![](https://i.imgur.com/Lz0nUDw.png) #### (4) 右邊的 compare: 選擇你的分支 lang/xxxxx #### (5) 按下create new pull request 就完成了 ### 成功後,過不久就能在 [https://tailwindcss.tw](https://tailwindcss.tw) 看到成果囉 :smile: :::info ### 【重要】接下來每次翻譯的步驟: 1. 切換到 tw `git checkout tw` 2. 取得最新 tw `git fetch origin` `git pull` 3. ==刪除原先的本地分支 (如果想要用同名的分支開發)== `git branch -d lang/****` 4. 從最新的 tw 開分支出來開發 `git checkout -b lang/****` (自己設的分支) 5. 重覆「[4. 翻譯完成後 將檔案推送回 git](#4-翻譯完成後-將檔案推送回-git)」的操作 ### Remark: code review 後的修改 ==PR後,如需修改。修改完直接接「[4. 翻譯完成後 將檔案推送回 git](#4-翻譯完成後-將檔案推送回-git)」== ::: ## 其他常用 git 指令 ### 查看目前本機的 git 狀態 `git status` ### 查看目前的分支 `git branch` ### 放棄本機所有變更(以遠端 git 資料覆蓋本機資料) `git reset --hard origin/tw` ## MDX * 請安裝 MDX 插件 [VS code](https://marketplace.visualstudio.com/items?itemName=silvenon.mdx) * 語法可參考 [這裡](https://mdxjs.com/table-of-components) * 註解語法: [點我](https://github.com/mdx-js/mdx/pull/185) ## 參考資源 * [為你自己學 Git](https://gitbook.tw):git 指令教學 * [連猴子都能懂的 Git 入門指南](https://backlog.com/git-tutorial/tw/) * [Fork](https://git-fork.com):a fast and friendly git client for Mac and Windows * [Learn Git Branching](https://learngitbranching.js.org/?locale=zh_TW) ==推薦!線上練習git概念== * 如果你是用VS Code,記得裝MDX extension https://marketplace.visualstudio.com/items?itemName=silvenon.mdx

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully