Skip to content

Reigns0622/netbox-zh-tw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NetBox 繁體中文翻譯包 / NetBox Traditional Chinese Translation

License: Apache 2.0 NetBox: 4.4.0

English summary: A community-maintained Traditional Chinese (zh-Hant) translation pack for NetBox. The official project ships only Simplified Chinese (zh); this package overlays a Traditional Chinese version localized for Taiwanese vocabulary, generated with OpenCC s2twp profile from the upstream zh translation. See the English section below.


中文說明

為什麼有這個專案?

NetBox 官方目前只提供簡體中文 (zh = zh-Hans),沒有繁體中文版本。 雖然簡繁字面類似,但某些詞彙在台灣使用情境下常造成困擾,因此本專案提供一份繁體中文 (zh-Hant) 翻譯包,方便台港澳使用者直接套用。

已有 issue #18919 申請過官方支援但未被採納。本專案為非官方社群維護版本。

適用版本

翻譯包版本 NetBox 版本
4.4.0 NetBox 4.4.x

轉換方式

本翻譯並非從零翻譯,而是基於 NetBox 官方 zh(簡體)翻譯,使用 OpenCCs2twp 設定檔轉換而成:

  • s2twp = Simplified Chinese → Traditional Chinese (Taiwan, with phrase conversion)
  • 包含台灣慣用詞彙轉換(例如「軟件→軟體」、「打印→列印」)
  • 原始簡體翻譯的譯者群名單保留在 django.po 檔頭

安裝方式

方法一:用 install.sh(推薦)

# 1. 下載
git clone https://github.com/Reigns0622/netbox-zh-tw.git
cd netbox-zh-tw

# 2. 執行安裝(預設 /opt/netbox)
sudo ./install.sh

# 或指定路徑
sudo ./install.sh /path/to/netbox

# 3. 重啟 NetBox
sudo systemctl restart netbox netbox-rq

方法二:手動複製

# 1. 備份原始檔
sudo cp /opt/netbox/netbox/translations/zh/LC_MESSAGES/django.po \
        /opt/netbox/netbox/translations/zh/LC_MESSAGES/django.po.bak

# 2. 複製翻譯檔
sudo cp translations/zh/LC_MESSAGES/django.po \
        /opt/netbox/netbox/translations/zh/LC_MESSAGES/django.po
sudo cp translations/zh/LC_MESSAGES/django.mo \
        /opt/netbox/netbox/translations/zh/LC_MESSAGES/django.mo

# 3. 重啟服務
sudo systemctl restart netbox netbox-rq

方法三:Docker 部署

如果你用 netbox-docker,把翻譯檔掛載進 container:

# docker-compose.override.yml
services:
  netbox:
    volumes:
      - ./netbox-zh-tw/translations/zh/LC_MESSAGES/django.po:/opt/netbox/netbox/translations/zh/LC_MESSAGES/django.po:ro
      - ./netbox-zh-tw/translations/zh/LC_MESSAGES/django.mo:/opt/netbox/netbox/translations/zh/LC_MESSAGES/django.mo:ro

接著 docker compose up -d --force-recreate netbox 即可。

啟用語系

安裝完成後,在 NetBox 介面操作:

  1. 右上角點頭像 → User Profile
  2. 切到 Preferences 分頁
  3. Language 選擇 Chinese(原本顯示簡中,套用後會變繁中)
  4. Save

注意:本翻譯包是覆蓋掉 zh(原本的簡體),所以選 Chinese 出來就會是繁體。

還原原始簡體中文

sudo ./install.sh --uninstall
sudo systemctl restart netbox netbox-rq

或重新從 NetBox repo 抓回原始檔:

cd /tmp
wget https://raw.githubusercontent.com/netbox-community/netbox/v4.4.0/netbox/translations/zh/LC_MESSAGES/django.po
sudo cp django.po /opt/netbox/netbox/translations/zh/LC_MESSAGES/
cd /opt/netbox && sudo -u netbox python manage.py compilemessages -l zh
sudo systemctl restart netbox netbox-rq

已知問題

  • 混用情況:NetBox 部分字串為動態組合(例如插件、資料庫遷移訊息),這些字串若未在原 django.po 出現則維持英文。
  • 新版相容:每次 NetBox 升級會新增字串,本翻譯包需要重新跑一次 OpenCC 轉換。新版發佈後本 repo 會更新。
  • HK/MO 詞彙:目前用 s2twp(台灣詞),香港使用者若要 s2hk(港式詞)版本歡迎開 issue。

貢獻方式

歡迎以下形式的貢獻:

  • issue 回報翻譯錯誤(請附原文截圖 + 期望翻譯)
  • PR 修正 django.po請一併 commit 重新編譯的 .mo:
    cd translations/zh/LC_MESSAGES
    msgfmt -o django.mo django.po
  • 若你是 NetBox 維護者看到這份 repo —— 我們很樂意把翻譯貢獻回上游!請見 #18919 後續

授權

本翻譯包以 Apache License 2.0 釋出,與 NetBox 主專案授權一致。 詳見 LICENSE

原始簡體翻譯版權屬於 NetBox 社群與 Transifex 上的譯者群(見 django.po 檔頭名單)。


English

Why this project?

NetBox officially ships only Simplified Chinese (zh = zh-Hans). While the writing systems are similar, vocabulary differences cause friction for users in Taiwan, Hong Kong, and Macau (e.g. 軟件 vs 軟體, 網絡 vs 網路, 打印機 vs 印表機). This community-maintained pack overlays a Traditional Chinese (zh-Hant) translation localized with Taiwanese vocabulary.

Issue #18919 requested official support but was closed as stale. This is an unofficial community package.

Compatibility

Pack version NetBox version
4.4.0 NetBox 4.4.x

How it's generated

These translations are not translated from scratch. They are derived from the upstream zh (Simplified) translation using OpenCC with the s2twp profile (Simplified → Traditional with Taiwan-specific phrase mapping). Original translator credits are preserved in the django.po header.

Installation

git clone https://github.com/Reigns0622/netbox-zh-tw.git
cd netbox-zh-tw
sudo ./install.sh                    # defaults to /opt/netbox
# or:
sudo ./install.sh /path/to/netbox
sudo systemctl restart netbox netbox-rq

Then in NetBox: User Profile → Preferences → Language → Chinese → Save. Because this pack overrides the existing zh slot, selecting "Chinese" now displays Traditional Chinese.

Uninstall

sudo ./install.sh --uninstall
sudo systemctl restart netbox netbox-rq

Docker

For netbox-docker, mount the files into the container — see the Chinese section above for an example docker-compose.override.yml.

Known limitations

  • Strings outside django.po (plugins, runtime messages) remain in English.
  • Each NetBox release adds new strings; this pack must be regenerated. New releases are tagged here.
  • Currently uses s2twp (Taiwan vocabulary). Open an issue for Hong Kong (s2hk) variants.

Contributing

  • File an issue for translation errors (please include an English screenshot + suggested translation).
  • PRs welcome — please commit both the edited django.po and a recompiled django.mo:
    msgfmt -o translations/zh/LC_MESSAGES/django.mo \
              translations/zh/LC_MESSAGES/django.po

License

Apache License 2.0, matching the upstream NetBox project. See LICENSE. Original Simplified-Chinese translator credits are retained in django.po.

Acknowledgments

About

Traditional Chinese (zh-Hant) translation pack for NetBox - generated with OpenCC s2twp from upstream Simplified Chinese.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages