Score:0

What defines the name of Desktop vs. Arbeitsplatz vs. Schreibtisch in Xubuntu

in flag

I have a German localized version of Xubuntu 22.04. I have encountered cases, when the desktop was called "Arbeitsplatz" and other cases, where it was called "Schreibtisch".

What is the place where this definition is made? Which configuration app shall I use when I want to change such a name?

user535733 avatar
cn flag
It might be helpful if you could provide a specific example that we can reproduce. You might be describing a translation bug, or you might be describing differing translations between two applications, or you might be describing something else.
in flag
There might be a translation bug in the comment at the beginning of `~/.config/user-dirs.dirs`. I have the solution but can't post it here, perhaps because someone has downvoted the question to -1 - although the question is clear: In the past, the localized German directory for the desktop was "Schreibtisch" and it has become "Arbeitsplatz". Apparently the translations of directories has changed - but in a not consistent manner ultimately resulting in a consequential problem discussed in #1466343.
Will avatar
id flag
I don’t know why you’ve had a downvote - your question seems fine to me.
Score:0
in flag

The translated file names are defined in ~/.config/user-dirs.dirs. After first deleting this file and then issuing the command xdg-user-dirs-update it became

# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
# 
XDG_DESKTOP_DIR="$HOME/Schreibtisch"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Vorlagen"
XDG_PUBLICSHARE_DIR="$HOME/Öffentlich"
XDG_DOCUMENTS_DIR="$HOME/"
XDG_MUSIC_DIR="$HOME/"
XDG_PICTURES_DIR="$HOME/Bilder"
XDG_VIDEOS_DIR="$HOME/"
The line about XDG_DESKTOP_DIR read
XDG_DESKTOP_DIR=“$HOME”

In my case, before the deletion, the line with XDG_DESKTOP_DIR was:

XDG_DESKTOP_DIR="$HOME/"

which explains the strange behavior which triggered my question.

It is not sufficient to just change this line to

XDG_DESKTOP_DIR="$HOME/Schreibtisch"

because one first has to log out and then to log in in order that the changed setting become effective, because xdg-user-dirs-update is run very early in the login phase.

The prefix of user-dirs.dir says, all changes to it are retained at the next startup. But I have observed that they are reverted. Has someone stumbled over a language hurdle when writing the description?

man xdg-user-dirs-update tells us

"... updates the current state of the file user-dirs.dir. If none exists before calling it, then one is created based on the system default values, or falling back to the old non-translated filenames if such directories exists. The list of old directories used are: ~/Desktop, ~/Templates and ~/Public.

...

Additionally, any configured directories that point to non-existing locations are reset by pointing then to the users home directory."

The last sentence probably describes what deleted the name of the second user's desktop directory name from $XDG_DESKTOP_DIR.

Unfortunately man xdg-user-dirs-update does not tell from where it takes the defaults if the other user specific sources in ~/ don't exist, as it was in my case. Probably it is in one of the paths named in $XDG_CONFIG_DIRS:

XDG_CONFIG_DIRS=/etc/xdg/xdg-xubuntu:/etc/xdg:/etc/xdg

(surprisingly /etc/xdg is named there twice!)

There is a file /etc/xdg/user-dirs.defaults which might be the master template effective if no localization has happened. But I could not determine, which file actually makes the localized template for xdg-user-dirs-update.

Levente avatar
cn flag
Does the information in this post answer your question, or is the quesition still open, looking for a satisfactory solution? If the case is the latter, you run the risk that this post will be removed on grounds of being "not an answer". You might consider moving this information up into the question body, where it could serve as further details about your intent (that others already suggested being insufficient).
Levente avatar
cn flag
I also suggest changing the question's title to "How to permanently override localized strings in Xubuntu 22.04 in the context of XDG_DESKTOP_DIR?"
in flag
I posed two questions. The second one is "Which configuration app shall I use when I want to change such a name?" The last sentence of my answer indicates, that this one is still open: What actually makes the localized template for `xdg-user-dirs-update`? Would heading be better for the whole problem than the current one? - If you have an idea for it, I would add it to my Answer. - Or should I delete my second question from above: Then my answer would be complete and I would add a green hook to it.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.