Xfce Forum

Sub domains
 

You are not logged in.

#1 2017-02-26 00:58:09

desolve
Member
Registered: 2017-02-25
Posts: 13

no proper traslation for "Trash" desktop icon

Hi all! I've strange issue with translation of some of the desktop icons. I'm from Russia and I prefer to use russian locale:

[viktor@desolve-nettop ~]$ locale
LANG=ru_RU.UTF-8
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=
[viktor@desolve-nettop ~]$ cat /etc/locale.conf 
LANG=en_US.UTF-8
[viktor@desolve-nettop ~]$ cat ~/.config/locale.conf 
LANG=ru_RU.UTF-8

As you can see I use per-user configuration of locales. All parts of XFCE desktop and other applications uses the right locale and I can see text messages and labels in Russian. The one exception is the "Trash" desktop icon. The most mysterious part is that I see the right localization of "Trash" (which is in Russian stands for "Корзина") in desktop settings 1057108510801084108610821101108210881072108510722017-02-2603-50-15.png, but on the desktop this localization is not applied 1057108510801084108610821101108210881072108510722017-02-2603-50-44.png

This problem arised after reinstalling Arch Linux, in my previous installation there were no problems with localizations. I use XFCE 4.12.1

Could you help me with this problem?

Last edited by desolve (2017-02-26 00:59:13)

Offline

#2 2017-02-26 02:19:42

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 3,861

Re: no proper traslation for "Trash" desktop icon

I'm seeing the same:
screenshot2017-02-2521-17-09.png

I think this is a gvfs issue, not an xfdesktop issue. I think the translation comes from gvfs. There is also this bug report for pcmanfm when managing the desktop that is the same.


How To Ask For Help           Xfce FAQ                            Xfce Release Information
The Xfce Community          Xfce Tips and Tricks

Offline

#3 2017-02-26 08:20:45

k-3.14
Member
From: Rhineland
Registered: 2017-02-18
Posts: 87

Re: no proper traslation for "Trash" desktop icon

Offline

#4 2017-02-26 12:42:34

desolve
Member
Registered: 2017-02-25
Posts: 13

Re: no proper traslation for "Trash" desktop icon

Thank you for link, but this workaround allows only change one German translation for another one. In out case we're really faced with the gvfs bug, as ToZ mentioned above.

Offline

#5 2017-02-26 15:31:12

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 3,861

Re: no proper traslation for "Trash" desktop icon

Unfortunately, xfdesktop's translation files don't include a translation string for the Trash icon. It does include one for the Trash checkbox in the settings dialog as displayed in the original post though.

A quick look through the source, doesn't find Trash being treated in the same manner as File System and Home (see: https://git.xfce.org/xfce/xfdesktop/tre … con.c#n288). Since @desolve stated that this started happening only recently and there haven't really been any changes to xfdesktop, this leads me to believe that the translated string is coming from gvfs.


How To Ask For Help           Xfce FAQ                            Xfce Release Information
The Xfce Community          Xfce Tips and Tricks

Offline

#6 2017-02-26 16:08:02

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 3,861

Re: no proper traslation for "Trash" desktop icon

Well, it looks like it might be an issue with a missing translation string. I added a translation string for the Trash desktop item to the xfdesktop source and manually added the entry to the hr.po file for my language (I don't know the exact mechanics behind translations in Xfce) and got the desired result:
screenshot2017-02-2611-02-11.png

Looks like a bug report is necessary. Bug report 13387 created.


How To Ask For Help           Xfce FAQ                            Xfce Release Information
The Xfce Community          Xfce Tips and Tricks

Offline

#7 2017-02-26 22:07:39

desolve
Member
Registered: 2017-02-25
Posts: 13

Re: no proper traslation for "Trash" desktop icon

Seems like ToZ patch works perfectly for Desktop icon
2017-02-2701-03-10.php

But in Thunar there is no translation for Trash icon
2017-02-2701-06-51.php

PS: I haven't added any extra translation into the po/ru.po file. From the first glance there is translation string for Trash already - at least for ru.po and hr.po files

Last edited by desolve (2017-02-26 22:12:50)

Offline

#8 2017-02-27 14:39:12

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 3,861

Re: no proper traslation for "Trash" desktop icon

desolve wrote:

Seems like ToZ patch works perfectly for Desktop icon

Eric has added the patch to the git tree. It will be available for the next release (or immediately if you build directly from git).

But in Thunar there is no translation for Trash icon

Let me poke around Thunar to see if I can find where the translation strings are missing.

PS: I haven't added any extra translation into the po/ru.po file. From the first glance there is translation string for Trash already - at least for ru.po and hr.po files

Thanks.


How To Ask For Help           Xfce FAQ                            Xfce Release Information
The Xfce Community          Xfce Tips and Tricks

Offline

#9 2017-02-27 21:41:41

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 3,861

Re: no proper traslation for "Trash" desktop icon

Try this patch for Thunar:

diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index c7aae58a..9485b4ed 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -1071,6 +1071,8 @@ thunar_file_info_reload (ThunarFile   *file,
             {
               if (strcmp (display_name, "/") == 0)
                 file->display_name = g_strdup (_("File System"));
+	      else if (strcmp (display_name, "Trash") == 0)
+		file->display_name = g_strdup (_("Trash"));
               else
                 file->display_name = g_strdup (display_name);
             }
diff --git a/thunar/thunar-gio-extensions.c b/thunar/thunar-gio-extensions.c
index d365d20f..50e3a094 100644
--- a/thunar/thunar-gio-extensions.c
+++ b/thunar/thunar-gio-extensions.c
@@ -237,6 +237,11 @@ thunar_g_file_get_display_name (GFile *file)
           display_name = g_strdup (_("File System"));
           g_free (base_name);
         }
+      else if (strcmp (base_name, "Trash") == 0)
+        {
+          display_name = g_strdup (_("Trash"));
+          g_free (base_name);
+        }
       else if (g_utf8_validate (base_name, -1, NULL))
        {
          display_name = base_name;
diff --git a/thunar/thunar-shortcuts-model.c b/thunar/thunar-shortcuts-model.c
index ef2a5d26..bc845b18 100644
--- a/thunar/thunar-shortcuts-model.c
+++ b/thunar/thunar-shortcuts-model.c
@@ -1036,6 +1036,7 @@ thunar_shortcuts_model_shortcut_places (ThunarShortcutsModel *model)
         {
           shortcut = g_slice_new0 (ThunarShortcut);
           shortcut->group = THUNAR_SHORTCUT_GROUP_PLACES_TRASH;
+	  shortcut->name = g_strdup (_("Trash"));
           shortcut->file = file;
           shortcut->hidden = thunar_shortcuts_model_get_hidden (model, shortcut);
           thunar_shortcuts_model_add_shortcut (model, shortcut);

Note that I had to add a translation string in po file for it work as no such string currently exists.

Also, I haven't tested this beyond looking at thunar to see if the string translated properly.

Edit:
t2134.png

Last edited by ToZ (2017-02-27 21:47:06)


How To Ask For Help           Xfce FAQ                            Xfce Release Information
The Xfce Community          Xfce Tips and Tricks

Offline

#10 2017-03-05 14:02:16

desolve
Member
Registered: 2017-02-25
Posts: 13

Re: no proper traslation for "Trash" desktop icon

Hello! Found some time to test your patch. Seems like things works properly! Thank you!
2017-03-0517-01-10.php

PS: how can we influence on translators and developers to review such area of code and translations and fix missing objects?

Last edited by desolve (2017-03-05 14:04:31)

Offline

#11 2017-03-05 14:52:17

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 3,861

Re: no proper traslation for "Trash" desktop icon

Thunar bug report with patch created: https://bugzilla.xfce.org/show_bug.cgi?id=13409.

PS: how can we influence on translators and developers to review such area of code and translations and fix missing objects?

I believe it boils down to a resource issue. I think the first step is for someone to identify, on a per-component basis, the missing translation strings and create one bug report per component that identifies these missing translations.

If such bug reports existed, I for one would be willing to investigate and provide patches when time permits.


How To Ask For Help           Xfce FAQ                            Xfce Release Information
The Xfce Community          Xfce Tips and Tricks

Offline

#12 2017-03-05 20:48:47

desolve
Member
Registered: 2017-02-25
Posts: 13

Re: no proper traslation for "Trash" desktop icon

Thank you a lot, ToZ!

Offline

#13 2017-03-06 03:40:07

MountainDewManiac
Member
From: USA police-state welfare-state
Registered: 2013-03-24
Posts: 858

Re: no proper traslation for "Trash" desktop icon

desolve wrote:

Thank you a lot, ToZ!

And a general "thank you!" from me, too. You consistently help many of us here. You are a forum moderator. You write patches when people discover issues and offer code when someone needs a solution. I may have read that you're even maintaining some bit of software or other.

You deserve a "thank you" from all of us.

Regards,
MDM


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

Board footer

Powered by FluxBB