インデックスページへのリンクラベルをカタログ経由にしてリンク先タイトルと揃える#218
Merged
Merged
Conversation
[[lib:/]]・[[lib:_builtin]]・[[f:/]] のリンクラベルが 'All libraries' などの ハードコードされた英語で、日本語版ではリンク先のページタイトル (ライブラリ一覧・組み込みライブラリ・関数一覧)と食い違っていた。 メッセージカタログの既存キー(Library Index / Builtin Library / Function Index)を 参照するように変更し、catalog 未指定時は空カタログで英語キーに フォールバックする。 Fixes rurema#100 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
解決したい問題
Fixes #100
トップページなどで使われる
[[lib:/]]・[[lib:_builtin]]・[[f:/]]のリンクラベルがAll libraries・Builtin libraries・All C APIとハードコードされた英語のままで、日本語版ではリンク先のページタイトルと食い違っていました。
変更内容
RDCompiler#bracket_linkのハードコードされたラベルを、メッセージカタログの既存キー(
Library Index/Builtin Library/Function Index)の参照に変更library-index/library/function-indexの@title)と同じキーなので、表示が必ずリンク先タイトルと一致しますRDCompilerに catalog が渡されない場合は空のMessageCatalogにフォールバックするようにし、英語キーがそのまま表示される従来相当の挙動を維持(MDCompilerも同経路)表示の変化(ja)
[[lib:_builtin]][[lib:/]][[f:/]]テスト
[[lib:/]]/[[lib:_index]]/[[lib:_builtin]]のケースを追加test_bracket_link_with_catalogを追加ruby test/run_test.rb全件パス(17560 tests)🤖 Generated with Claude Code