Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thai translation #7032

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/_langs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
- [:uk: English](/)
- [:cn: 中文](/zh-cn/)
- [:fr: Français](/fr-fr/)
- [🇹🇭 ไทย](/th-th/)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GitHub emoji code for the Thai flag is :thailand: however this doesn't seem to work in Docsify.

There is an open PR for extending the emoji support, but the URL that would be generated for the Thai flag 404s. Maybe we should just use the Unicode character directly for all languages as has been done here.

2 changes: 2 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@
paths: 'auto',
placeholder: {
'/zh-cn/': '搜索',
'/th-th/': 'ค้นหา',
'/': 'Search'
},
noData: {
'/zh-cn/': '没有结果!',
'/th-th/': 'ไม่พบข้อมูล!',
'/': 'No results!'
},
depth: 6
Expand Down
34 changes: 34 additions & 0 deletions docs/th-th/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Quantum Mechanical Keyboard Firmware

[![เวอร์ชันปัจจุบัน](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags)
[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware)
[![Discord](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh)
[![Docs Status](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm)
[![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly)
[![GitHub forks](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/)

## QMK Firmware คืออะไร?

QMK (*Quantum Mechanical Keyboard*) คือคอมมูนิตี้โอเพ่นซอร์สที่ดูแลโปรเจกต์ QMK Firmware, QMK Toolbox, qmk.fm, และเอกสารนี้ ซึ่ง QMK Firmware คือเฟิร์มแวร์ที่ต่อยอดมาจาก [tmk\_keyboard](http://github.com/tmk/tmk_keyboard) ที่เพิ่มฟีเจอร์สำหรับ Atmel AVR เช่นคีย์บอร์ดจาก [OLKB](http://olkb.com), [ErgoDox EZ](http://www.ergodox-ez.com), และ [Clueboard](http://clueboard.co/) นอกจากนี้ยังสามารถใช้กับชิป ARM ด้วย ChibiOS หรือจะเป็นคีย์บอร์ดแบบ Handwired (ทำมือ) ก็สามารถใช้ได้เช่นกัน

## วิธีใช้

ถ้าต้องการเพิ่มคีย์แมป (Keymap), คียบอร์ดใหม่ หรือฟีเจอร์ใหม่ให้กับ QMK ให้ทำการ [Fork โปรเจกต์ผ่าน Github](https://github.com/qmk/qmk_firmware#fork-destination-box) แล้ว Clone ไปแก้ไข จากนั้น Push และเปิด [Pull Request](https://github.com/qmk/qmk_firmware/pulls) จาก Fork ของคุณ

หรือถ้าต้องการใช้งาน ให้ดาวน์โหลดโดยตรง ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)) หรือ Clone ด้วย Git (`git@github.com:qmk/qmk_firmware.git`) / https (`https://github.com/qmk/qmk_firmware.git`)

## วิธีคอมไพล์

ก่อนที่จะคอมไพล์ได้ต้อง [ติดตั้ง Build Tool](getting_started_build_tools.md) สำหรับ AVR และ/หรือ ARM เมื่อติดตั้งครบแล้วจะสามารถใช้คำสั่ง `make` เพื่อ Build คีย์บอร์ดและคีย์แมป เช่น

make planck/rev4:default

จะเป็นการ Build คีย์บอร์ด `planck` รุ่น `rev4` และใช้คีย์แมป `default` ถ้าคีย์บอร์ดที่ใช้ไม่มีชื่อรุ่นหรือโปรเจกต์ย่อย ให้เว้นรุ่นได้ เช่น

make preonic:default

จะเป็นการ Build คีย์บอร์ด `preonic` และใช้คีย์แมป `default`

## วิธีการปรับแต่ง

QMK มี[ฟีเจอร์](features.md)ให้ใช้มากมาย สามารถดูเอกสารและข้อมูลทั้งหมดได้ที่ http://docs.qmk.fm ซื่งส่วนมากจะเป็นการปรับแต่งหรือเพิ่ม[คีย์แมป](keymap.md) และแก้ไข[คีย์โค้ด (Keycodes)](keycodes.md)
135 changes: 135 additions & 0 deletions docs/th-th/getting_started_build_tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# ติดตั้ง Build Tools

คู่มือหน้านี้อธิบายการเตรียม Build Environment เพื่อใช้งาน QMK ซึ่งรวมถึง AVR Processors (เช่น atmega32u4).

<!-- FIXME: We should have ARM instructions somewhere. -->

**Note:** ถ้าไม่เคยอ่านมาก่อน โปรดอ่าน [ไกด์สำหรับมือใหม่](newbs.md)

ก่อนจะทำอะไรต่อ เช็คว่า Submodules ต่างๆ​ อัปเดตเป็นเวอร์ชั่นล่าสุดแล้ว โดยการรัน `make git-submodule`

## Linux

เพิ่อให้แน่ใจว่าเป็นเวอร์ชั่นล่าสุด รันคำสั่ง `sudo util/qmk_install.sh` ซึ่งจะติดตั้ง Dependencies ทั้งหมดที่ต้องการ **คำสั่งจะรัน `apt-get upgrade`** หรือคุณจะลงมือติดตั้งทุกอย่างเองก็ได้ ซึ่งแพคเกจทั้งหมดมีดังนี้

```
build-essential
gcc
unzip
wget
zip
gcc-avr
binutils-avr
avr-libc
dfu-programmer
dfu-util
gcc-arm-none-eabi
binutils-arm-none-eabi
libnewlib-arm-none-eabi
git
```

อาจมีแพคเกจบางตัวที่ไม่ต้องใช้ ขึ้นกับการใช้งาน

ลงแพจเกจเหล่านี้ผ่าน Package Manager

ตัวอย่างสำหรับ Debian / Ubuntu:

sudo apt-get update
sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi

ตัวอย่างสำหรับ Fedora / Red Hat:

sudo dnf install gcc unzip wget zip dfu-util dfu-programmer avr-gcc avr-libc binutils-avr32-linux-gnu arm-none-eabi-gcc-cs arm-none-eabi-binutils-cs arm-none-eabi-newlib

ตัวอย่างสำหรับ Arch / Manjaro:

pacman -S base-devel gcc unzip wget zip avr-gcc avr-binutils avr-libc dfu-util arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib git dfu-programmer dfu-util

## Nix

สำหรับ [NixOS](https://nixos.org/) หรือใช้ Nix บน Linux ทรือ macOS, รัน `nix-shell` จาก repository root

โดยจะทำการดาวน์โหลดคอมไพเลอร์สำหรับ AVR และ ARM ถ้าไม่ต้องการทั้งคู่ ให้ปิดผ่าน Arguments `avr` หรือ `arm` เช่น

nix-shell --arg arm false # ปิดการดาวน์โหลด ARM Compiler

## macOS
ติดตั้ง [homebrew](http://brew.sh/) แล้วใช้คำสั่งเหล่านี้:

brew tap osx-cross/avr
brew tap PX4/homebrew-px4
brew update
brew install avr-gcc@8
brew link --force avr-gcc@8
brew install dfu-programmer
brew install dfu-util
brew install gcc-arm-none-eabi
brew install avrdude

ช่วง `make` กับ `make install` ในขณะที่ติดตั้ง `avr-gcc@8` อาจใช้ CPU มาก และใช้เวลาเกินกว่า 20 นาที

## Windows ผ่าน msys2 (แนะนำ)

วิธีที่ดีที่สุดสำหรับ Windows Vista ขึ้นไปคือ [msys2](http://www.msys2.org) (ทดสอบบน Windows 7 และ Windows 10 แล้ว)

* ติดตั้ง msys2 จาก http://www.msys2.org
* เปิด ``MSYS2 MingGW 64-bit`` ผ่าน shortcut
* เข้าไปยัง QMK repository เช่น ถ้า QMK อยู่ที่ `C:\qmk_firmware`
* `$ cd /c/qmk_firmware`
* รัน `util/qmk_install.sh` แล้วทำตามคำสั่ง

## Windows 10 (เลิกใช้)
ต่อไปนี้คือวิธีติดตั้งเก่าสำหรับ Windows 10 เราแนะนำให้คุณใช้วิธี MSYS2 ด้านบนแทน

### Creators Update
ถ้ามี Windows 10 ที่มี Creators Update หรือใหม่กว่า คุณสามารถ Build และ Flash Firmware ได้โดยตรง แต่ถ้ายังไม่มี Creators Update จะทำได้แค่ Build อย่างเดียว อ่าน[วิธีติดตั้ง](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update).

### Windows Subsystem for Linux
นอกจาก Creators Update ต้องมี Windows 10 Subystem for Linux ด้วย [วิธีติดตั้ง](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/) และ[อัปเกรด](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/) เป็นรุ่น 16.04LTS เพราะบาง Keyboard คอมไพล์บน 14.04LTS ไม่ได้

### Git
(ข้ามส่วนนี้ไปถ้าทำการ Clone repository ผ่าน Git แล้ว)

เพื่อทำการ Clone repository ให้ใช้ Git for Windows (**ไม่ใช้** WSL Git) [ดาวน์โหลด Git](https://git-scm.com/download/win) แล้ว[ติดตั้ง](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) และถ้าจะ Contribute ให้ทำการเซ็ตอัป e-mail และ username ด้วย

เมื่อติดตั้ง Git แล้ว เปิด Git Base แล้วเปลี่ยน Directory ไปยังจุดที่ต้องการโคลนโค้ด QMK เช่น `C:\download` ให้ใชง `cd /c/download` (ใช้ forward slash `/`) แล้วรัน `git clone --recurse-submodules https://github.com/qmk/qmk_firmware` คำสั่งจะสร้างโฟลเดอร์ `qmk_firmware` ขึ้นมา

### Toolchain Setup
วิธี Toolchain setup ทำผ่าน Windows Subsystem for Linux

1. เปิด "Bash On Ubuntu On Windows" จาก start menu
2. ไปที่ directory ที่โคลนโค้ด `qmk_firmware` ซึ่งจะขึ้นตันด้วย `/mnt/` ใน WSL เช่น `cd /mnt/c/path/to/qmk_firmware` ถ้าอยู่ที่ `C:\path\to\qmk_firmware
3. รัน `util/wsl_install.sh` แล้วทำตามคำสั่ง
4. เปิดและเปิด "Bash On Ubuntu On Windows" ใหม่

### ข้อควรสำคัญ
* รัน `util/wsl_install.sh` เพื่อรับอัพเดตล่าสุด
* QMK repository ต้องอยู่บน Windows file system path เนื่องจาก WSL ไม่สามารถรัน exe ข้างนอกได้
* WSL Git ไม่เข้ากันกับ Windows Git ให้ใช้ Windows Git Bash หรือ Git GUI สำหรับทุกคำสั่ง Git
* ถ้าต้องการแก้ไขไฟล์ให้ระวัง Line ending เพราะไฟล์ต่างๆ เป็น Unix line endings

## Docker

ถ้าใช้ [Docker](https://docs.docker.com/install/#supported-platforms) ให้รันคำสั่งจาก `qmk_firmware` directory เพื่อ build keyboard/keymap:
```bash
util/docker_build.sh keyboard:keymap
# ตัวอย่าง: util/docker_build.sh ergodox_ez:steno
```
คำสั่งนี้จะทำการคอมไพล์ keyboard/keymap และได้เป็นไฟล์ `.hex` or `.bin` สำหรับ flash ถ้าเว้น `:keymap` ด้านหลัง จะใช้ `default` keymap สังเกตว่า Parameter จะหน้าตาเหมือน Build ด้วยคำสั่ง `make`

หรือถ้ารันโดยไม่ใช้ Parameter เลย จะสามารถพิมพ์ชี่อ keyboard/keymap ตามลงไปได้
```bash
util/docker_build.sh
```

ถ้าจะ Build แล้ว Flash ผ่าน Docker ให้กำหนด `target` ต่อท้าย:
```bash
util/docker_build.sh keyboard:keymap:target
# ตัวอย่าง: util/docker_build.sh planck/rev6:default:dfu-util
```

!> การใช้ Docker for Windows ต้องเปิด [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v) ซึ่งไม่มีบน Windows 7 Windows 8 และ **Windows 10 Home**

## Vagrant
อ่าน [วิธีติดตั้งผ่าน Vagrant](getting_started_vagrant.md).