You are not logged in.
Pages: 1
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 , but on the desktop this localization is not applied
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
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.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Might help -> https://forum.xfce.org/viewtopic.php?id=11367
Offline
Might help -> https://forum.xfce.org/viewtopic.php?id=11367
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
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.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
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:
Looks like a bug report is necessary. Bug report 13387 created.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Seems like ToZ patch works perfectly for Desktop icon
But in Thunar there is no translation for Trash icon
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
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.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
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.
Last edited by ToZ (2017-02-27 21:47:06)
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Offline
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.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thank you a lot, ToZ!
Offline
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
Offline
Pages: 1
[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 604.72 KiB (Peak: 622 KiB) ]