mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
use gettext cover for defaults
This commit is contained in:
parent
477f4ff441
commit
a45965637d
7 changed files with 16 additions and 16 deletions
|
|
@ -20,7 +20,7 @@ abstract class Button
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->gtk->set_label(
|
$this->gtk->set_label(
|
||||||
$this->_label
|
_($this->_label)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ abstract class Entry
|
||||||
$this->gtk = new \GtkEntry;
|
$this->gtk = new \GtkEntry;
|
||||||
|
|
||||||
$this->gtk->set_placeholder_text(
|
$this->gtk->set_placeholder_text(
|
||||||
$this->_placeholder
|
_($this->_placeholder)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->gtk->set_max_length(
|
$this->gtk->set_max_length(
|
||||||
|
|
@ -27,7 +27,7 @@ abstract class Entry
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->gtk->set_text(
|
$this->gtk->set_text(
|
||||||
$this->_value
|
_($this->_value)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->gtk->set_visibility(
|
$this->gtk->set_visibility(
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,9 @@ class Title
|
||||||
// Defaults
|
// Defaults
|
||||||
private int $_ellipsize = 3;
|
private int $_ellipsize = 3;
|
||||||
private int $_length = 16;
|
private int $_length = 16;
|
||||||
private ?string $_value = 'New page';
|
private string $_value = 'New page';
|
||||||
private ?string $_subtitle = null;
|
private string $_subtitle = '';
|
||||||
private ?string $_tooltip = null;
|
private string $_tooltip = '';
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
Page $page,
|
Page $page,
|
||||||
|
|
@ -68,7 +68,7 @@ class Title
|
||||||
): void
|
): void
|
||||||
{
|
{
|
||||||
$this->gtk->set_text(
|
$this->gtk->set_text(
|
||||||
is_null($value) ? $this->_value : trim(
|
is_null($value) ? _($this->_value) : trim(
|
||||||
$value
|
$value
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
@ -78,7 +78,7 @@ class Title
|
||||||
?string $subtitle = null
|
?string $subtitle = null
|
||||||
): void
|
): void
|
||||||
{
|
{
|
||||||
$this->subtitle = is_null($subtitle) ? $this->_subtitle : strtolower(
|
$this->subtitle = is_null($subtitle) ? _($this->_subtitle) : strtolower(
|
||||||
trim(
|
trim(
|
||||||
$subtitle
|
$subtitle
|
||||||
)
|
)
|
||||||
|
|
@ -90,7 +90,7 @@ class Title
|
||||||
): void
|
): void
|
||||||
{
|
{
|
||||||
$this->gtk->set_tooltip_text(
|
$this->gtk->set_tooltip_text(
|
||||||
is_null($tooltip) ? $this->_tooltip : trim(
|
is_null($tooltip) ? _($this->_tooltip) : trim(
|
||||||
$tooltip
|
$tooltip
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class Navigation
|
||||||
$this->gtk = new \GtkMenuButton;
|
$this->gtk = new \GtkMenuButton;
|
||||||
|
|
||||||
$this->gtk->set_tooltip_text(
|
$this->gtk->set_tooltip_text(
|
||||||
$this->_tooltip
|
_($this->_tooltip)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Init menu
|
// Init menu
|
||||||
|
|
|
||||||
|
|
@ -27,11 +27,11 @@ class Tab
|
||||||
$this->gtk = new \GtkButton;
|
$this->gtk = new \GtkButton;
|
||||||
|
|
||||||
$this->gtk->set_label(
|
$this->gtk->set_label(
|
||||||
$this->_label
|
_($this->_label)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->gtk->set_tooltip_text(
|
$this->gtk->set_tooltip_text(
|
||||||
$this->_tooltip
|
_($this->_tooltip)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,11 @@ class Add
|
||||||
|
|
||||||
// Init menu item
|
// Init menu item
|
||||||
$this->gtk = \GtkMenuItem::new_with_label(
|
$this->gtk = \GtkMenuItem::new_with_label(
|
||||||
$this->_label
|
_($this->_label)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->gtk->set_tooltip_text(
|
$this->gtk->set_tooltip_text(
|
||||||
$this->_tooltip
|
_($this->_tooltip)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,11 @@ class Close
|
||||||
|
|
||||||
// Init menu item
|
// Init menu item
|
||||||
$this->gtk = \GtkMenuItem::new_with_label(
|
$this->gtk = \GtkMenuItem::new_with_label(
|
||||||
$this->_label
|
_($this->_label)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->gtk->set_tooltip_text(
|
$this->gtk->set_tooltip_text(
|
||||||
$this->_tooltip
|
_($this->_tooltip)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue