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

Issue #6520: Show config storage locations in status report #4739

Open
wants to merge 7 commits into
base: 1.x
Choose a base branch
from

Conversation

klonos
Copy link
Member

@klonos klonos commented May 9, 2024

@backdrop-ci
Copy link
Collaborator

Related to: backdrop/backdrop-issues#6520

@dragonbot
Copy link
Collaborator

Tugboat has finished building a preview for this pull request!

Website: https://pr4739-xqhithgkmztryqy7niib52hrhljn6muh.tugboatqa.com/
Username: admin
Password: 8ba05e7cebc3

This preview will automatically expire on the 14th of July, 2024.

$config_storage_active = config_get_config_storage('active');
$config_storage_staging = config_get_config_storage('staging');
$backend = array(
'@backend' => is_a($config_storage_active, 'ConfigFileStorage') ? t('files') : t('database'),
Copy link
Member

Choose a reason for hiding this comment

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

If we run this through t() and then also run it through t() in t('Active configuration: @backend', $backend) it's going to end up double escaped.

Can we do t('Active configuration: !backend', ...), instead?

'@backend' => is_a($config_storage_active, 'ConfigFileStorage') ? t('files') : t('database'),
);
$config_storage_locations = array(
'active' => t('Active configuration: @backend', $backend),
Copy link
Member

Choose a reason for hiding this comment

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

This isn't how t() works we need to pass it an array with keys that match what's in the string, like...

t('Active configuration: !backend', array('!backend' => $backend),

);
$config_storage_locations = array(
'active' => t('Active configuration: @backend', $backend),
'staging' => t('Staging configuration: @backend', $backend),
Copy link
Member

Choose a reason for hiding this comment

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

Same here, need to fix t().

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