-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
i18n
syntax additions with nested HTML
#9507
i18n
syntax additions with nested HTML
#9507
Conversation
I18n
syntax additions with nested HTMLi18n
syntax additions with nested HTML
54a5f0b
to
c9adfed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, @rebecca-shoptaw. Just one minor suggestion.
c9adfed
to
305858f
Compare
c06ff7d
to
57eac33
Compare
@scottbarnes It looks like one of my last |
11a6282
to
57eac33
Compare
The detect_missing_i18n script currently tries to process assignments, such as `$ details = _('See <a href="%s">details</a>.', change.url())` After consultation with @cdrini, it was decided to use exclude "$ " rather than "= _(" to better match the granularity of the existing exceptions.
This was on linked on /admin/loans and displayed a no longer used loans menu.
57eac33
to
61764b8
Compare
@rebecca-shoptaw, that makes sense about Inventaire.io; I put that back. For the issue with the i18n missing strings detection, I just ended up adding an exception to the script, and I am requesting a review from @cdrini. Also, while reviewing this, I noticed some other files may be eligible for deletion, and they may deserve investigation in a separate issue. It appears that Another candidate for deletion is Because I made a substantive change to |
@scottbarnes Sounds good, and thank you for digging into this!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm!
Oh and something for a future PR: We can delete the python code for admin/loans too! |
Subtask of #9486.
Fix. This PR adds
i18n
syntax in cases where the text to be translated includes HTML opening/closing tags. See the i18n guide for full syntax info and instructions.Technical
Separated the PR's by
i18n
syntax type for ease of review, this one is scoped to cover all the HTML tag-including syntax, i.e.$:_('Please <a href="">click here</a> to learn more')
.Also includes removing relevant files from
i18n
exclude list so as to confirm they now pass thedetect-missing-i18n
check.Testing
i18n
-ed phrase in one of the files that includes nested HTML:
$:_('Please <a href="">click here')</a>
is incorrectmessages.pot
filei18n
detection script withpre-commit run detect-missing-i18n --all-files
Screenshot
Stakeholders
@mekarpeles @cdrini @pidgezero-one