core: Replace gtk_get_default_locale usage

Clutter has an API to get the text direction but used to depend
on gtk3's translation domain. In order to avoid broken i18n
in case gtk3 is not installed, move the transtalable string to
clutter itself.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2407>
This commit is contained in:
Bilal Elmoussaoui
2022-05-09 11:29:11 +02:00
parent 64ee8d02f7
commit c710f14cc5
6 changed files with 20 additions and 6 deletions

View File

@@ -508,11 +508,11 @@ meta_external_binding_name_for_action (guint keybinding_action)
MetaLocaleDirection
meta_get_locale_direction (void)
{
switch (gtk_get_locale_direction ())
switch (clutter_get_text_direction ())
{
case GTK_TEXT_DIR_LTR:
case CLUTTER_TEXT_DIRECTION_LTR:
return META_LOCALE_DIRECTION_LTR;
case GTK_TEXT_DIR_RTL:
case CLUTTER_TEXT_DIRECTION_RTL:
return META_LOCALE_DIRECTION_RTL;
default:
g_assert_not_reached ();