Untranslated strings in update.php
Description of the bug
There are some strings in update.php that are not translated.
Additional information
Add any other information that could help, such as:
- Backdrop CMS version: 1.32.0
I will propose a PR
A PR is ready for reviewing. There is one check failed, but I believe it's not a matter of the code but of the check itself.
Even in Drupal 7, none of the strings used in the updated.php file is translated, despite drupal_language_initialize() is called.
That's not true in backdrop. Some of the strings ARE translated, but not all of them. This PR fixes it.
The code looks good to me, except for the first change (the PHP version check) which results in a fatal error. I haven't fully tested but I suspect the rest of the changes are safe.
I meant that not even the code in the Drupal 7's update.php file uses t() for the strings shown in the update page. I am not sure whether the translation of those strings is expected not to work, nor if that applies to Backdrop too.
@avpaderno, backdrop already uses t() to translate some of the strings in update.php. I'm just adding the rest of them.
Thanks, @herbdool, I'll check that fatal error.
@herbdool, left that line without t() function to avoid the fatal error.
There are still lines without translatable strings, for example line 503 and 505.
backdrop_set_title('Requirements problem');
$task_list = update_task_list('requirements');
$status_report = 'Resolve the problems and <a href="' . check_url(backdrop_requirements_url($severity)) . '">try again</a>.';
$status_report .= '<br><br>';
thanks @avpaderno just added those lines also to the commit
Some code comments in the PR.
Added @bugfolder's suggestions to PR
Looks mostly good, some tweaks to indentation suggested to make PHPCS happier.
Commited
There's one uncommitted suggestion: https://github.com/robertgarrigos/backdrop/pull/9/files#r2672588650
Done. Thanks.
Code LGTM!
There's only one failing test, and it appears unrelated to this PR. This is RTBC.