Evan Martin (evan) wrote in evan_tech,
Evan Martin

translating file names

On a GNOME list they're discussing directory names. On a translated system, everything appears in your native language, until you open a file browser and discover your home directory is filled with directories named "Pictures", "Desktop", etc. What to do?
  1. Always create the directories with canonical, English names, and translate the names only when you display them in the GUI.

    Cons: GNOME apps will show one set of names for things, and Firefox, KDE apps, etc. will show another. Even GNOME apps that forget to canonicalize directory names will confuse users. Confuses terminal navigation because the names are wrong. What would typing in paths in a file chooser do--use the English path names or the translated ones?
  2. Or, when you create these directories the first time, translate the directory names depending on the user's language.

    Cons: screws up if the user switches languages. Screws up access via SSH if your terminal client doesn't support Unicode and your directory names are in Chinese. Screws up terminal navigation if the directory names are difficult to type. Screws up any program that doesn't understand Unicode filenames. Screws up any program's compile-time paths to files (though this could be addressed by an API that maps /home/luser/Desktop to /home/luser/Esktop-day).

Both sound pretty bad. For what it's worth OS X chose the former. Does anybody know what Windows did?

I remember discussing this with Brad for LJ's URL formats: we (I originally wrote he, but I didn't want to get it wrong and blame something on him; but I'm pretty sure it should be "he") wanted to not use English paths in user URLs, so (for example) the "archives" of the journal are just stored in date-numbered directories. Of course, you can't use Unicode in paths and there's still stuff like "friends", "?mode=reply", so you can't really win...

  • your vcs sucks

    I've been hacking on some Haskell stuff lately that's all managed in darcs and it's reminded me of an observation I made over two years ago now (see…

  • ghc llvm

    I read this thesis on an LLVM backend for GHC, primarily because I was curious to learn more about GHC internals. The thesis serves well as an…

  • found my bug!

    Not too interesting, but this has been bugging me for a week. Been working on a toy program that proxies a TCP connection. It was working fine for…

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.