mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-02 19:36:08 +01:00
Fix for translations not substituting text properly #567
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
* Better error handling when `obj->validate()` fails with exception [#594](https://github.com/getgrav/grav-plugin-admin/issues/564)
|
||||
* Improve markup of update and add package dependencies in update modal [#560](https://github.com/getgrav/grav-plugin-admin/issues/560)
|
||||
1. [](#bugfix)
|
||||
* Fix for admin translation filter (`|tu`) not substituting text - [#567](https://github.com/getgrav/grav-plugin-admin/issues/567)
|
||||
* Translated "Publishing" tab text [#561](https://github.com/getgrav/grav-plugin-admin/issues/561)
|
||||
* Fix invalid argument supplied in foreach [#563](https://github.com/getgrav/grav-plugin-admin/issues/563)
|
||||
* CSS fixes for editor button alignment
|
||||
|
||||
@@ -966,9 +966,6 @@ class Admin
|
||||
{
|
||||
if (is_array($args)) {
|
||||
$lookup = array_shift($args);
|
||||
if (!empty($args)) {
|
||||
$languages = array_shift($args);
|
||||
}
|
||||
} else {
|
||||
$lookup = $args;
|
||||
$args = [];
|
||||
|
||||
@@ -45,9 +45,9 @@ class AdminTwigExtension extends \Twig_Extension
|
||||
];
|
||||
}
|
||||
|
||||
public function tuFilter()
|
||||
public function tuFilter($args, $lang = null)
|
||||
{
|
||||
return $this->grav['admin']->translate(func_get_args());
|
||||
return $this->grav['admin']->translate($args, $lang);
|
||||
}
|
||||
|
||||
public function toYamlFilter($value, $inline = true)
|
||||
|
||||
Reference in New Issue
Block a user