Stop committing generated .mo (and .po) files; generate them at build time
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- python
- 領域
- build-system, cli, localization
調査の方向性
Start by reading pyproject.toml, the existing doit localize task, the check-mo-freshness workflow, and the PyInstaller spec files. Verify how packaging currently includes locale data before choosing the build hook. Done means .mo files are generated during package builds, excluded from git, bundled correctly by PyInstaller, and the obsolete freshness workflow is removed.
索引モデルが issue の本文から書いたものです。
説明
The tabcmd/locales/*/LC_MESSAGES/tabcmd.mo files are checked into git today, and .po files are gitignored but still regenerated locally when someone runs doit localize. This has two problems:
-
Drift. The committed
.mofiles can - and do - go out of sync with the.propertiessources they are built from. Before #440 landed, a freshdoit localizeagainst the tip ofdevelopmentregenerated all 11 locale.mofiles with ~20 keys different from what was committed (mostly stale entries for old keys and missing entries for new keys added since the last regen). Users hitting the drifted keys would see stale translations or fall back to the raw key. -
Reviewer noise.
.modiffs are binary and unreadable in PRs. Reviewers cannot see whether a.mochange matches its intended.propertieschange.
The check-mo-freshness workflow added in #440 catches drift at PR time by regenerating and diffing. That closes the immediate leak but keeps the underlying pattern of "generated file committed to git."
Better long-term: treat .mo (and if practical .po) like tabcmd/_version.py - generate them during pip install / packaging, .gitignore them, and stop tracking them. pyproject.toml can wire the generation into the build backend so wheels and pyinstaller bundles include them. Contributors then only edit .properties; no regenerate-and-commit dance, no drift possible.
Prior art: most Python i18n projects (Babel, Django, Flask-Babel) treat .mo as build output.
Rough plan
- Add a build step that runs
doit localize(or the equivalentmsgfmtinvocations) atpip install/ wheel build time. - Verify pyinstaller still bundles the generated
.mofiles correctly (via--collect-data tabcmd.localeswhich is already in the spec files). .gitignore**/*.mo;git rm --cachedthe tracked ones.- Remove the
check-mo-freshnessworkflow (it becomes moot once nothing is committed to drift from).
- 主要言語
- Python
- スター
- 52
- フォーク
- 17
- 平均マージ
- 5日 20時間
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
tableau/tabcmd のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
feat: publish missing --description flag from tabcmd Classic対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
feat: creategroup missing --role flag from tabcmd Classic対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
似ている issue
-
[Bug]: Streamed /v1/chat/completions sends unredacted agent error text (keys) in the final chunk対応中かも @rodricksz4h5 が今日担当しました。 オープンarea/streaming comp/gateway P2 type/security
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NousResearch/hermes-agent#138245 ·
メンテナーはふだん 1 日以内に返信
-
[oblt-aw][autodoc] Update user onboarding guide for mandatory trigger CODEOWNERS step対応中かも @github-actions が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
correction metadata
難易度 2/5 1時間未満 初心者へのやさしさ 68/100
acl-org/acl-anthology#10378 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
cloudtrail_multi_region_enabled_logging_management_events fails when the advanced event selector has a custom name対応中かも @12YYCCYY16 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
prowler-cloud/prowler#13033 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
graygarbage/HermesKey#23 ·