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

Strings in mail templates not extracted #13

Open
wordish opened this issue May 12, 2022 · 1 comment
Open

Strings in mail templates not extracted #13

wordish opened this issue May 12, 2022 · 1 comment

Comments

@wordish
Copy link

wordish commented May 12, 2022

  • fresh install of 8.5.7
  • install another locale
  • go to Translate Site Interface
  • reload strings
  • edit the strings for the locale
  • search for a string from one of the mail templates, such as "Dear "
  • no strings show up in the results
  • Note: copy a file from /concrete/mail to /application/mail and the strings will show up after reloading the strings.

Screenshot from 2022-05-12 14-27-00

/concrete/mail/forgot_password.php:

$body = t("

Dear %s,

You have requested a new password for the site %s 

Your username is: %s

You may change your password at the following address:

%s

Thanks for browsing the site!

", $uName, $siteName, $uName, $changePassURL);

Screenshot from 2022-05-12 14-29-56

@mlocati
Copy link
Member

mlocati commented May 13, 2022

The translatable strings under the /concrete directory aren't extracted by Translate Site Interface.
This occurs for the files in the concrete/mail folder, as well as for everything else (for example, the core dashboard pages).

Since those are "core" strings, they are extracted by https://translate.concretecms.org and you can translate them in that website.

For example, we have that the concrete/mail/basic_workflow_notification.php file contains this text:

<?php

defined('C5_EXECUTE') or die("Access Denied.");

$subject = $siteName . " " . t("Workflow Notification");
$body = t("Dear %s,

%s

You can review, approve or deny all pending actions from here:

%s
", $uName, $message, URL::to('/dashboard/welcome/me'));

and in the https://translate.concretecms.org we actually have this string:

immagine

Why people can't translate the core stuff in their Translate Site Interface? Because the core contains thousands of translatable strings (6,884 for v8, 7,747 for v9), and managing them (and finding the non-core ones) would be a nightmare.

If the problem is that people don't have a core translation string that's translated, they can do that in the https://translate.concretecms.org website, then they can update the core translations by using the "Update languages" page that's available in the dashboard page of the installed instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants