Re: [Tuxpaint-i18n] Localized names of file paths?
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
From: Mark K. <mar...@gm...> - 2024-04-29 00:38:42
|
Resending to the mailing list without the attachment (it was blocked). The attachment was sent directly to Bill. Thanks, Mark On Sat, Apr 27, 2024 at 4:07 PM Mark Kim <mar...@gm...> wrote: > Hi Bill, > > When you run macOS in a non-native language, the names of the system > folders do not change on the underlying file system. This allows a program > written for one language expecting the system folders in specific paths to > be able to run on macOS running in another language mode. > > However, the GUI (Finder) may display the folder with a localized name. > FYI, the way Finder does this for a system folder as follows: If the folder > contains a 0-size hidden file named ".localized" in the folder, it looks > for the localized version of the folder name from > /System/Library/CoreServices/SystemFolderLocalizations/<lang>[_variant].lproj/SystemFolderLocalizations.strings. > *.strings are basically Apple's version of *.mo files. > > It took some effort but I managed to get all *.strings files in > /System/Library/CoreServices/SystemFolderLocalizations/<lang>[_variant].lproj/SystemFolderLocalizations.strings > decoded on the version of macOS I'm running.* Their outputs are attached if > you want to use them for the translations. > > * — In case anyone finds it useful, you can decode *.strings file using > `plutil -p <filename.strings>`. It turns out *.strings have the same > format as *.plist, and *.plist can be decoded using plutil as per this > post <https://stackoverflow.com/a/15907321/20025913> on StackOverflow. > > > Thanks, > Mark > > On Sat, Apr 27, 2024 at 2:31 PM Bill Kendrick <nb...@so...> wrote: > >> >> I'm doing a little bit of work over in the `tuxpaint-docs` repo >> (the PHP + gettext source of the HTML docs that are then sync'd >> over to the main `tuxpaint` repo, to be part of a release) to >> modularize how filenames and paths are managed. >> >> That is, rather than every time I want to mention the file >> "/home/tuxpaint/.tuxpaintrc" (the user-level configuration >> file for Tux Paint, on Linux/Unix) -- which sometimes I might >> instead describe as "~/.tuxpaintrc" or "$HOME/.tuxpaintrc", >> I'll instead use a little bit of PHP that will grab a string >> that will be consistent across all of the documentation. >> (e.g., "<?= $PATHS["linux"]["config"]["user"] ?>"). >> >> To that end, it seems that some operating systems provide >> localized versions of their rather descriptive paths, >> e.g. on Windows there's "Program Files", and "Application Data". >> (And for example, it looks like the latter is actually named >> "Anwendungsdaten" (German), "Dati applicazioni" (Italian), >> "Datos de programa" (Spanish), & "Dane aplikacji", per a random >> Stackoverflow question I just landed on[*]. >> >> I haven't figured it out yet, but does macOS or other OSes do >> this (e.g., macOS has folders named "Library", "Application Support", >> "Users", etc. -- do they have different names under different locales?) >> >> Basically, I want to make sure we do some amount of reasonable >> localizing in the documentation, without going wild (and without >> being inaccurate; e.g., if it's _always_ "Application Support", >> even on a German Mac, there's no reason to _mis_-label it with >> a localized string, in our docs). >> >> Thanks in advance for whatever you can share, >> >> [*] >> https://stackoverflow.com/questions/4899985/windows-documents-and-settings-in-another-languages >> >> -- >> -bill! >> Sent from my computer >> >> >> _______________________________________________ >> Tuxpaint-i18n mailing list >> Tux...@li... >> https://lists.sourceforge.net/lists/listinfo/tuxpaint-i18n >> > |