Skip to content
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

Tidy up title attributes #21995

Merged
merged 1 commit into from
Nov 7, 2021
Merged

Conversation

braders
Copy link
Contributor

@braders braders commented Nov 6, 2021

Overview

Tidy up title attributes:
Wrap text in {ts} as appropriate (for translation)
Remove poorly worded or superflous title attributes

Before

Hardcoded title attributes, some of which were very pooly worded.

After

All title attributes can be translated.

Title attributes removed from templates/CRM/Activity/Selector/Activity.tpl and templates/CRM/Custom/Form/Field.tpl as they were poorly worded and didn't provide value.

Title attributes from templates/CRM/Event/Page/ManageEvent.tpl as they didn't provide additional context from the visible text shown, and so to avoid unnecessary translation effort.

@civibot
Copy link

civibot bot commented Nov 6, 2021

(Standard links)

@civibot civibot bot added the master label Nov 6, 2021
@colemanw
Copy link
Member

colemanw commented Nov 6, 2021

I agree with all these changes, but would also like to see the capitalization cleaned up.
CiviCRM has a loosely established convention to use Sentence case for title attributes. Some currently use Title Case which is not standard but not terrible, but the ones using all lower case e.g. "view details" really ought to be changed to Sentence case.

@braders
Copy link
Contributor Author

braders commented Nov 6, 2021

I agree with all these changes, but would also like to see the capitalization cleaned up. CiviCRM has a loosely established convention to use Sentence case for title attributes. Some currently use Title Case which is not standard but not terrible, but the ones using all lower case e.g. "view details" really ought to be changed to Sentence case.

I've updated the casing for "Select rows".

Occurances of "Contribution Count" and "view details" (with poor capitalisation) already exist elsewhere in the codebase, so I've not updated as presumably doing so would require re-translation?

@colemanw
Copy link
Member

colemanw commented Nov 6, 2021

I've not updated as presumably doing so would require re-translation?

In the short-term, yes but in general it's a pain for translators to have multiple inconsistent versions of the same string.
I think it's better to reconcile these inconsistencies so we don't leave translators having to deal with 2 strings "view details" + "View details" instead of just 1.

@braders
Copy link
Contributor Author

braders commented Nov 6, 2021

I've not updated as presumably doing so would require re-translation?

In the short-term, yes but in general it's a pain for translators to have multiple inconsistent versions of the same string. I think it's better to reconcile these inconsistencies so we don't leave translators having to deal with 2 strings "view details" + "View details" instead of just 1.

I can update, but just to be clear, at the moment there are no occurances of "View details" (with capital) only "view details" (lowercase) in templates/CRM/Contribute/Page/DashBoard.tpl. So if we move to uppercase I assume that template will want updating too?

@colemanw
Copy link
Member

colemanw commented Nov 6, 2021

I would say yes, update all occurrences of "view details" so that in the future translators will only need to deal with one version of that string.

Wrap text in {ts} as appropriate (for translation)
Remove poorly worded or superflous title attributes
@braders
Copy link
Contributor Author

braders commented Nov 7, 2021

Ok, "View details" is now capitalised.

@colemanw
Copy link
Member

colemanw commented Nov 7, 2021

Looks much better! And thanks for keeping it rebased to a single commit.
Tagging merge-on-pass.

@colemanw colemanw merged commit 567020b into civicrm:master Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants