Skip to content

Commit

Permalink
Issue backdrop-contrib#410: Add context to translatable strings passe…
Browse files Browse the repository at this point in the history
…d to t() (backdrop-contrib#423)
  • Loading branch information
yorkshire-pudding authored and bugfolder committed Sep 7, 2024
1 parent 9698df7 commit 9f34bd5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ execute permissions have not been added to the file.
- Changed the version number normally present to be more meaningful and added the latest version number.
- Messages output at the conclusion of the operation are now output as text rather than tables.
- The Wiki is now edited via the `docs` folder of the main repo. Pages can be edited as part of a pull request.
- Added 'context' of 'Bee' to any translatable strings passed to `t()`.

### Fixed
- Unhandled Error if the executables called in the database commands does
Expand Down
5 changes: 4 additions & 1 deletion includes/miscellaneous.inc
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ function bee_message($message, $type = 'info') {
*/
function bt($string, array $args = array()) {
if (function_exists('t')) {
return t($string, $args);
$options = array(
'context' => 'Bee',
);
return t($string, $args, $options);
}
else {
if (!empty($args)) {
Expand Down

0 comments on commit 9f34bd5

Please sign in to comment.