Translations in `entities.acronyms.ent` are not reflected in the rendered output
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- php
- Lĩnh vực
- build-system, documentation
Hướng nghiên cứu
Theo dõi cách ngôn ngữ được truyền từ doc-base/configure.php:662 vào manual.xml và cách render.php chọn ngôn ngữ của nó, sau đó so sánh với template php/infrastructure build-docs-lang-rsync. Tái tạo đầu ra acronym pt_BR trên máy cục bộ và xác minh rằng các tiêu đề đã bản địa hóa cùng các feed ID dành riêng cho từng ngôn ngữ được tạo nhất quán.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Translating acronym expansions has no effect on the rendered localized manual. Here is what I see for CLI in pt_BR.
Translation: https://github.com/php/doc-pt_br/blob/d4429c51d33261cd7be1d6622e44da7212e7ba05/entities/entities.acronyms.ent#L95
Interface/Interpretador de Linha de Comando
Rendered output: https://www.php.net/manual/pt_BR/features.commandline.php
<abbr title="Command Line Interpreter/Interface">CLI</abbr>
Cause and options
Option 1: fix in the build
render.php reads <language>/entities/entities.acronyms.ent directly. #262 added support for other languages, but when nothing is specified, render.php takes the language to be the default en.
Passing --lang pt_BR in my local build produced the correct output:
-<abbr title="Command Line Interpreter/Interface">CLI</abbr>
+<abbr title="Interface/Interpretador de Linha de Comando">CLI</abbr>
So if the goal is only to fix the published manual, I think adding the language option to the build is the smallest change:
https://github.com/php/infrastructure/blob/61b6f2989bbfeae5dab7c7b293e954e6858a46f0/roles/properties/rsync/templates/build-docs-lang-rsync#L10-L16
Option 2: fix in render.php
Letting render.php pick up the language that configure.php was given may be the more fundamental fix. In most of the CI/CD setups and documentation across php/infrastructure, php/doc-base, php/phd and php/doc-*, render.php is called without a language. If it were the default, nobody would have to pass the option.
(I ran into this while translating entities.acronyms.ent, when I could not see the result in my local build.)
PhD is a bit complex for me, but the pieces to carry this setting through seem to already exist:
- Produced:
doc-base/configure.php:662writes<!ENTITY LANG '$lang'> - Used:
doc-base/manual.xml:34reads it in<set ... xml:lang="&LANG;">
I see no reason to give configure and render different languages, so making them agree when nothing is specified seems reasonable to me.
A small trade-off
Either way, the document IDs served in the Atom feeds contain the language, so the ID of every entry already published would change. For example, the ja feed:
https://www.php.net/manual/ja/feeds/features.commandline.atom
<id>tag:php.net,2009-10-13:/manual/en/file/features.commandline</id>
The ja document identifies itself as en. If anyone is subscribed to these, they would see every entry as new one time.
That feed URL is not linked from anywhere in the current manual, so I doubt many people are subscribed. The IDs also collide across all languages today, so I think having each feed identify its own language is worth the one-time churn.
- Ngôn ngữ chính
- PHP
- Star
- 91
- Fork
- 59
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của php/phd
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 50/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Can <subtitle> not be used?Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
-
Half of `doc-pl` is all boldĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
Issue tương tự
-
[Sync EN] Fix session read handler docs: false reports a failure, not a missing session (#5902)Đang mởsync-en
Độ khó 2/5 1-2 ngày Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 2 ngày
-
feature-request needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
aws/aws-sdk-php#3365 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 90/100
-
bug status: unverified
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
woocommerce/google-listings-and-ads#3884 ·
Maintainer thường phản hồi trong vòng 1 ngày