Results 1 to 9 of 9

Thread: Translate name of folders in Home folder

  1. #1

    Default Translate name of folders in Home folder

    Hi everybody!

    I've just installed Opensuse 13.1 KDE using the live .ISO. Even if I chose to install the system in Italian, after the installation the system was almost completely in English. Anyway, I found several information on the internet and I finally localized it, but the folders in the home folder still have name in English (Documents, Downloads, Desktop ecc.). I would like to translate these folder in Italian (calling them Documenti, Scaricati ecc.), so I tried changing the file /home/.config/user.dirs.dir, and then giving xdg-user-dirs-update from the terminal. The problem is that, after the input, the file become again like the original one, and nothing changes. I also tried to change the file and reboot without giving xdg-user-dirs-update, nothing changes as well. Where's the mistake? I'm new of Opensuse, and this is the method I have always used on Debian based systems.

    I copy here the content of my user.dirs.dir file to be more clear. Thank you to everyone in advance.

    PHP Code:
    XDG_DESKTOP_DIR="$HOME/(here I tried to write the translation)"
    XDG_TEMPLATES_DIR="$HOME/"
    XDG_PUBLICSHARE_DIR="$HOME/"
    XDG_DOCUMENTS_DIR="$HOME/"
    XDG_MUSIC_DIR="$HOME/"
    XDG_PICTURES_DIR="$HOME/"
    XDG_VIDEOS_DIR="$HOME/"
    XDG_DOWNLOAD_DIR="$HOME/" 

  2. #2

    Default Re: Translate name of folders in Home folder

    Quote Originally Posted by milazzo87 View Post
    I've just installed Opensuse 13.1 KDE using the live .ISO. Even if I chose to install the system in Italian, after the installation the system was almost completely in English. Anyway, I found several information on the internet and I finally localized it, but the folders in the home folder still have name in English (Documents, Downloads, Desktop ecc.). I would like to translate these folder in Italian (calling them Documenti, Scaricati ecc.), so I tried changing the file /home/.config/user.dirs.dir, and then giving xdg-user-dirs-update from the terminal. The problem is that, after the input, the file become again like the original one, and nothing changes. I also tried to change the file and reboot without giving xdg-user-dirs-update, nothing changes as well. Where's the mistake? I'm new of Opensuse, and this is the method I have always used on Debian based systems.
    Try to configure those folders in KDE's systemsettings/"Configure Desktop"->User Account Informations->Paths.

    There should be an automatic way to translate them as well, but I'm not sure how this works exactly.
    What I do know is, that if the necessary translations are installed, they should be created translated for a new user.

    If you install from DVD, this works as intended.
    But you installed from the Live ISO which misses a lot of the translations because of space reasons.
    Therefore those folders were created in english on first login.

    Try to remove ~/.config/user-dirs.dirs and ~/.config/user-dirs.locale and they should get re-created in your user's locale, when you next login or call xdg-user-dirs-update.

    I _think_ xdg-user-dirs-gtk-update would re-translate them automatically (on login) if the locale changed, but you would have to install that first on a KDE system.
    At least "man xdg-user-dirs-update" says this:
    Code:
           On the first run a user-dirs.locale file is created containing the
           locale that was used for the translation. This is used later by gui
           tools like xdg-user-dirs-gtk-update to detect if the locale was
           changed, letting you to migrate from the old names.
    Or try ti use the --force option for xdg-user-dirs-update:
    Code:
           --force
               Update existing user-dirs.dir, but force a full reset. This means:
               Don't reset nonexisting directories to HOME, rather recreate the
               directory. Never use backwards compatible non-translated names.
               Always recreate user-dirs.locale.
    Last edited by wolfi323; 21-May-2014 at 03:39.

  3. #3

    Default Re: Translate name of folders in Home folder

    PS: Forget the part about xdg-user-dirs-gtk-update, that's unnecessary. Unless you want to have them automatically renamed on login I suppose. TBH, I wouldn't want that in any case.

    Just remove ~/.config/user-dirs.locale and run "xdg-user-dirs-update --force".
    Those directories should then be changed to translated versions according to your current locale.
    Last edited by wolfi323; 21-May-2014 at 04:01.

  4. #4

    Default Re: Translate name of folders in Home folder

    Thank you for your answer. I partially solved doing like this: I deleted the file users.dirs.dir and I rebooted. When the system restarted, I had the folders in Italian, but I still have the folders in English as well. To be clearer: I have one folder called Documents and one called Documenti, one folder called Music and one called Musica ecc.

    Can I delete the English named folder without any problem? This is my new users.dirs.dir (this is the one was auto-created after I deleted the old one):

    Code:
    XDG_DESKTOP_DIR="$HOME/Desktop"
    XDG_DOWNLOAD_DIR="$HOME/Scaricati"
    XDG_TEMPLATES_DIR="$HOME/Templates"
    XDG_PUBLICSHARE_DIR="$HOME/Public"
    XDG_DOCUMENTS_DIR="$HOME/Documenti"
    XDG_MUSIC_DIR="$HOME/Musica"
    XDG_PICTURES_DIR="$HOME/Immagini"
    XDG_VIDEOS_DIR="$HOME/Video"

  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Translate name of folders in Home folder

    On 2014-05-21 10:16, milazzo87 wrote:
    >
    > Hi everybody!
    >
    > I've just installed Opensuse 13.1 KDE using the live .ISO. Even if I
    > chose to install the system in Italian, after the installation the
    > system was almost completely in English.


    Most of the translations are not included on the live isos, they are too
    small. They should be included after the first update from Internet. Or,
    if you install from the full dvd image instead.

    > Anyway, I found several
    > information on the internet and I finally localized it, but the folders
    > in the home folder still have name in English (Documents, Downloads,
    > Desktop ecc.). I would like to translate these folder in Italian
    > (calling them Documenti, Scaricati ecc.), so I tried changing the file
    > /home/.config/user.dirs.dir, and then giving -xdg-user-dirs-update- from
    > the terminal. The problem is that, after the input, the file become
    > again like the original one, and nothing changes. I also tried to change
    > the file and reboot without giving -xdg-user-dirs-update,- nothing
    > changes as well. Where's the mistake? I'm new of Opensuse, and this is
    > the method I have always used on Debian based systems.


    Mmmm... I don't know... I actually prefer my directories in English, not
    Spanish, so I have not bothered much to know how it is done. I'm unsure
    if this is done only at first login, or it can be done anytime.

    (Actually, if new directories are created I would hate it. I have
    a test user with different directories for two languages, with
    files scattered all over them. They should be all symlinks to one
    another, IMO).

    Let me see. In yast there is a language module; select English for the
    system language (don't change keyboard), accept, then run it again, and
    this time select Italian. The idea is to make it think again if all the
    needed packages are installed.

    Then repeat the procedure with your desktop of choice.


    > I copy here the content of my user.dirs.dir file to be more clear. Thank
    > you to everyone in advance.


    Just one comment: use plain code tags (the '#' button in the forum
    editor), not php code tags. See
    photo


    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  6. #6

    Default Re: Translate name of folders in Home folder

    Quote Originally Posted by milazzo87 View Post
    Can I delete the English named folder without any problem?
    Yes.
    But you should copy/move any needed data in there first of course.

    xdg-user-dirs-update does not rename the folder, it creates new ones.

    If you select a different folder in KDE's settings as mentioned before, KDE will ask you whether you want to move the files from the old folder though.

  7. #7

    Default Re: Translate name of folders in Home folder

    Thank you to everybody! Last, stupid question: how can I edit the first message to add SOLVED to the title and to use the code tag instead the php tag? I can't see any option to edit... But don't be angry with me, I'm sure it's my poor sight's fault.

    EDIT: I'm able to edit the last one, but not the previous ones. I think it's because I can do it only for a certain amount of time.

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Translate name of folders in Home folder

    On 2014-05-21 13:06, milazzo87 wrote:
    >
    > Thank you for your answer. I partially solved doing like this: I deleted
    > the file -users.dirs.dir- and I rebooted. When the system restarted, I
    > had the folders in Italian, but I still have the folders in English as
    > well. To be clearer: I have one folder called Documents and one called
    > Documenti, one folder called Music and one called Musica ecc.


    That's precisely the problem I hate.

    I would not delete them, but make one a symlink to the other. It is
    safer, scripts and code in general that are not multilingual aware will
    work seamlessly.

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  9. #9

    Default Re: Translate name of folders in Home folder

    Quote Originally Posted by robin_listas View Post
    On 2014-05-21 13:06, milazzo87 wrote:
    >
    > Thank you for your answer. I partially solved doing like this: I deleted
    > the file -users.dirs.dir- and I rebooted. When the system restarted, I
    > had the folders in Italian, but I still have the folders in English as
    > well. To be clearer: I have one folder called Documents and one called
    > Documenti, one folder called Music and one called Musica ecc.


    That's precisely the problem I hate.

    I would not delete them, but make one a symlink to the other. It is
    safer, scripts and code in general that are not multilingual aware will
    work seamlessly.
    Those directories are defined by the XDG specs. And those specs also define how you get the specific folders the user has configured (i.e. the translated ones f.e.).
    And they _are_ translated on a fresh installation anyway (except if you install from the LiveISO as mentioned).

    So there should _not_ be any script/code that uses/needs those and will not find the translated ones (or let the user configure which one to use).

    PS: http://www.freedesktop.org/wiki/Software/xdg-user-dirs/
    Last edited by wolfi323; 21-May-2014 at 05:57.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •