From kde-devel Tue Jun 01 22:59:15 1999 From: Aaron Levinson Date: Tue, 01 Jun 1999 22:59:15 +0000 To: kde-devel Subject: Example of commented POT file X-MARC-Message: https://marc.info/?l=kde-devel&m=92827721130693 I was asked to post a description of what I meant by a commented POT file to kde-devel. Here's a small portion of the Kmp3 base POT file: # Used for the balance slider to move the balance # all the way to the left (i.e. sound only comes # out of the left channel/speaker). The '&' is # used to indicate that with English, hitting the # 'L' key causes the same operation, for those people # that like to use the keyboard. #: ../src/KMBalanceSlider.cpp:158 msgid "&Left" msgstr "" # Used for the balance slider to move the balance # to the center (i.e. sound only comes equally out # of both the left and right channels/speakers). # The '&' is used to indicate that with English, # hitting the 'C' key causes the same operation, # for those people that like to use the keyboard. #: ../src/KMBalanceSlider.cpp:160 msgid "&Center" msgstr "" # Used for the balance slider to move the balance # all the way to the right (i.e. sound only comes # out of the right channel/speaker). The '&' is # used to indicate that with English, hitting the # 'R' key causes the same operation, for those people # that like to use the keyboard. #: ../src/KMBalanceSlider.cpp:162 msgid "&Right" msgstr "" # Used as an adjective, ala "Common [properties]" #: ../src/configDisplay.cpp:22 msgid "Common" msgstr "" # Used as a noun, i.e. "[These are the] # options [used to configure XYZ]." #: ../src/configMisc.cpp:71 msgid "Options" msgstr "" # Used to describe a type of # search, used as an adjective #: ../src/configMisc.cpp:86 msgid "strict" msgstr "" # There is a picture of the icon to use # for idle mode (the player is stopped) # for the docking icon to the right of # this text. #: ../src/configMisc.cpp:96 msgid "Idle icon:" msgstr "" # Used as an action, # i.e. stop playing #: ../src/docking.cpp:51 ../src/kmp3.cpp:158 ../src/kmp3.cpp:1727 msgid "Stop" msgstr "" # Go back ("go back" may either # mean go to the previous song # or go back to the beginning # of the current song--it # depends on how far Kmp3 is # into the current song) # (used as an action) #: ../src/docking.cpp:53 ../src/kmp3.cpp:160 ../src/kmp3.cpp:1732 msgid "Back" msgstr "" # Used as an adjective, # i.e. "Display [settings]" #: ../src/kmp3.cpp:552 msgid "Display" msgstr "" # Used as follows: # "Plugins [settings]" # or # "[Settings for] Plugins" #: ../src/kmp3.cpp:553 msgid "Plugins" msgstr "" As can be seen by the comments, the programmer is probably the best person to write them, since he/she is most familiar with a string's intended usage. In the case where the programmer does not know English as his/her native language, a comment would be extremely helpful to the translator, who could "correct" any English errors in the translations. After commenting the base POT file, I run a little script that does the following: 1. Convert already translated POT files to UNIX text file format (I've had translators send me translations in DOS text file format, which doesn't work with tupdate). 2. Remove all comments from already translated POT files using a sed script (so comments don't get duplicated later on). 3. Run tupdate with the base POT file and the already translated POT files (msgmerge doesn't work right on my system). To generate the base POT file, I run xgettext. Taking the comments from an old base POT file and putting them into the new file is a very tedious exercise. Currently, I'm using ediff (from emacs) to compare the old and new files, and I manually add each comment from the old file into the new file. If someone could come up with an automated way of doing this (via a script), I would be very grateful. Aaron Levinson