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

Control over the "call" and "write" phrase #523

Closed
markuman opened this issue Jun 19, 2024 · 5 comments
Closed

Control over the "call" and "write" phrase #523

markuman opened this issue Jun 19, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@markuman
Copy link

#. TRANSLATORS Additional part of email - contact information WITHOUT phone number (only email). The last argument is email address.
#: /app/lib/Backend/DavListener.php:1026
#, php-format
msgid "If you have any questions please write to %s"
msgstr ""
#. TRANSLATORS Additional part of email - contact information WITH email AND phone number: If you have any questions please feel free to call {123-456-7890} or write to {[email protected]}
#: /app/lib/Backend/DavListener.php:1031
#, php-format
msgid ""
"If you have any questions please feel free to call %1$s or write to %2$s"
msgstr ""

I'd like to know what values/variables are used? Is it when the Users profiles has filled out a phone number?

@markuman
Copy link
Author

I've create two appointments, one with phonenumber

select json_extract(data, '$.phone') from oc_appointments_pref_v2 oapv where token = 'rGbtrds4t1VCV88' ;
json_extract(data, '$.phone')|
-----------------------------+
"03012345678"                 |

and one without

json_extract(data, '$.phone')|
-----------------------------+
                             |

The first one sends reminder information with the call phrase at its end.

Wenn du den Termin verschieben musst, rufe bitte 03012345678 an.

The second one also. I think it is a bug and the second one is choosing the wrong template.

Wenn du den Termin verschieben musst, rufe bitte an.

So it does not make differences here
https://github.com/SergeyMosin/Appointments/blob/370db1ca0ac992bdd99a07572e497f821d2a4f34/l10n/de_DE.js#L19C1-L19C8

like it did here

if (empty($org_phone)) {
$tmpl->addBodyText(...$this->formatEmailBodyHtml([
// TRANSLATORS Additional part of email - contact information WITHOUT phone number (only email). The last argument is email address.
$this->l10N->t("If you have any questions please write to %s", [$org_email])
]));
} else {
$tmpl->addBodyText(...$this->formatEmailBodyHtml([
// TRANSLATORS Additional part of email - contact information WITH email AND phone number: If you have any questions please feel free to call {123-456-7890} or write to {[email protected]}
$this->l10N->t('If you have any questions please feel free to call %1$s or write to %2$s', [$org_phone, $org_email])
]));
}

@SergeyMosin
Copy link
Owner

The $org_phone refers to the Organizer phone. If you add a phone number in Settings > Contact Information > Phone it will be shown to the attendees, but if the organizer does not provide a phone number then there is nothing to show.

@markuman
Copy link
Author

Yes, it $org_phone is defined as 03012345678, it will print

... If you need to reschedule, please call 03012345678.

But if it is not defined, it will print.

... If you need to reschedule, please call.

I would expect that it will print

... If you need to reschedule, please reply to this Email.

@SergeyMosin
Copy link
Owner

I see now, this is for reminder email. The bug is actually here:

$tmpl->addBodyText(...$this->formatEmailBodyHtml([
// TRANSLATORS Main part of email, Ex: This is a reminder from {{Organization Name}} about your upcoming appointment on {{Date And Time}}. If you need to reschedule, please call {{Organization Phone}}.
$this->l10N->t('This is a reminder from %1$s about your upcoming appointment on %2$s. If you need to reschedule, please call %3$s.', [$org_name, $date_time, $org_phone])
]));

The fix will be available in the next release.

Thank you for the report.

@SergeyMosin SergeyMosin added the bug Something isn't working label Jun 19, 2024
@SergeyMosin
Copy link
Owner

Fixed in v2.1.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants