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

Misc translation 'ts' fixes #14467

Merged
merged 1 commit into from
Jun 6, 2019
Merged

Conversation

mlutfy
Copy link
Member

@mlutfy mlutfy commented Jun 6, 2019

Overview

Mostly NFC, this PR fixes a few places where the ts was incorrectly used. When incorrectly used, the strings are not extracted, not sent to Transifex, and probably not translated in the UI (in most cases).

The main exception might be the ts removal in CRM/Contact/Form/Search/Criteria.php or in CRM/Contact/Form/Task/AddToParentClass.php , but it's a hack, a bad example, and if they cause problems, they should be addressed correctly.

@civibot
Copy link

civibot bot commented Jun 6, 2019

(Standard links)

@civibot civibot bot added the master label Jun 6, 2019
@@ -133,7 +133,7 @@ public function buildQuickForm() {
$this->addButtons([
[
'type' => 'submit',
'name' => ts('Update ' . ucfirst($this::$entityShortname) . 's)'),
'name' => ts('Update'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this changes it from eg. "Update Membership" to "Update" - I think that's ok

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, fixing this was too complicated, and it seemed like the context was sufficient to understand what is being updated.

@@ -319,7 +319,7 @@ public static function validateCreditCard($values, &$errors, $processorID = NULL
if (!empty($values['credit_card_type'])) {
$processorCards = CRM_Financial_BAO_PaymentProcessor::getCreditCards($processorID);
if (!empty($processorCards) && !in_array($values['credit_card_type'], $processorCards)) {
$errors['credit_card_type'] = ts('This procesor does not support credit card type ' . $values['credit_card_type']);
$errors['credit_card_type'] = ts('This procesor does not support credit card type %1', [1 => $values['credit_card_type']]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bgm As we are touching this string can we correct the spelling: procesor => processor

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattwire Good catch, I updated my PR.

Copy link
Contributor

@mattwire mattwire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good @bgm There's one spelling it'd be nice to fix before merge

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.

4 participants