-
Notifications
You must be signed in to change notification settings - Fork 26
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add clarification on translation of HTML content #120
Add clarification on translation of HTML content #120
Conversation
Question: Are the SecureDrop Client strings in the same |
cabe0a0
to
9d1aca3
Compare
(Rebased.) |
The SecureDrop Client is not yet translatable. :( This is tracked in freedomofpress/securedrop-client#239 |
docs/development/l10n.rst
Outdated
Attribute ``alt`` | ||
""""""""""""""""" | ||
|
||
Image elements (``<img>``) in HTML place a picture on the | ||
page. People with visual impairments rely on a special note on the |
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.
I would write "Because people with visual impairments rely ..., it is necessary ...".
Right now you say "People with visual impairments rely ..., it is necessary ..." which sounds a bit odd in English because the two clauses of the sentence are not connected.
|
||
In particular, please make sure the attributes ``class``, ``id``, | ||
``height``, ``href``, ``rel``, ``src`` and ``width`` | ||
are never translated. |
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.
I defer to @rmol here, but it might be worth qualifying this a little bit for href
-- there may be situations where linking to a different URL in the target language would be appropriate. Perhaps simply asking translators to comment in Weblate when in doubt is the way to go here.
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.
Very good point. That will also be highly dependent on the URL.
Thinking aloud: in a case like this, could the localized URLs be given to the translators via string context?
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.
Haven't had coffee yet, but I'm thinking if a URL were to vary like that, it would probably be done via a {url}
placeholder, so the translators wouldn't have to worry about it. I'd keep href
in the list of things not to touch.
HTML elements (embraced by in ``<``, ``>``, example: ``<strong>``) | ||
can contain multiple so-called *attributes*. | ||
|
||
The text of the two attributes called ``alt`` and ``title`` |
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.
As a general note, I would suggest changing phrases like "the text of the attribute X" to "the text content of the attribute X", to make it even clearer that we are not talking about the attribute name itself.
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.
The additional explanatory text is really great, thanks @gonzalo-bulnes. Some nits in the review, and would appreciate a quick visual review from @rmol or @kushaldas on this one.
Thanks for the review @eloquence! I'll address the comments tonight or tomorrow. |
9d1aca3
to
9fd07fc
Compare
Applied the suggestions and rebased. Waiting for potential |
Add examples to demonstrate correct translations for both the 'alt' and 'title' tags in plausible contexts. Add list of currently used HTML attributes which values shall not be translated.
9fd07fc
to
c43120a
Compare
(Rebased.) |
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 @gonzalo-bulnes, per @rmol's comment re: href
translation I am merging as-is; we can add further clarification if needed.
Status
Ready for review
Description of Changes
Clarifies that both
alt
andtitle
HTML attributes must be translated, and no other attribute should. Add example to demonstrate correct translations for both thealt
andtitle
tags in plausible contexts.Also add a list of currently used HTML attributes which values should not be translated for explicitness. I tried to make clear that the list is not meant to be exhaustive, but listed all attributes currently in use in the SecureDrop Core translations.
Testing
Release
I don't think any special considerations are needed before releasing this change.
Checklist (Optional)
make docs-lint
) passed locallymake docs-linkcheck
) passedmake docs
) docs at http://localhost:8000