From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 12 Nov 2001 12:41:16 +0300 From: Valek Filippov To: sisyphus@altlinux.ru Subject: Re: [sisyphus] about translation (Was: evolution messages) Message-Id: <20011112124116.21d53242.DF@pinto> In-Reply-To: <20011112122057.0d405fea.andrei@tvcell.ru> References: <20011112114646.09e54c25.vyt@vzljot.ru> <20011112120112.6f9eac30.DF@pinto> <20011112122057.0d405fea.andrei@tvcell.ru> Organization: DF X-Mailer: Sylpheed version 0.6.5 (GTK+ 1.2.10; i586-alt-linux) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="jdSXk3x1,o?9=.hB" Sender: sisyphus-admin@altlinux.ru Errors-To: sisyphus-admin@altlinux.ru X-BeenThere: sisyphus@altlinux.ru X-Mailman-Version: 2.0 Precedence: bulk Reply-To: sisyphus@altlinux.ru List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Archived-At: List-Archive: --jdSXk3x1,o?9=.hB Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit Привет! > имеются ли у нас какие-нибудь ресурсы по > стадартизации переводов интерфейсов? Да, существует глоссарий Sun, который правда на русский не переведён. У команды КДЕ по идее были какие-то файлы, и у www.gnu.org.ru. > Валентин, Вы смотрели программу gtranslator? Посмотрите на её ru.po =) > она вроде бы позволяет создавать библиотеку > стандартных переводов, называемую UMTF/learn buffers. > с их помощью перевод мог бы несколько упроститься(?). Угу "translation memory" это называется. Позволяет автоматически перевести все неуникальные строки типа "File", "Open" и т.п. > есть ли какие-нибудь аналогичные программы? Есть po-toys имени Karl Eichwalder. Ниже кусок из переписки на эту тему в списке gnome-i18n. Валек >> > Comment on fuzzy status: In KBabel there is a DIFF mode to find out >> > changes made in a message. It compares the current message and one in the >> > translation memory. Maybe GTranslator should incorporate such a >> > function? >> >> It would certainly help those who are using KBabel or GTranslator. But >> it won't help those who are editing po-files directly. >> >> And this will also only help if you have the old translation in the >> translation memory. > > I'll try to provide a similar feature for Emacs/po-mode.el (using > ediff). Or is such a patch already available? Here's a way to query a compendium file; set `po-lookup-compendium' to the file name that holds your translations: (setq po-compendium-file "~/Projects/trans/compendium-LL.po") I'm interested to know whether it works for encodings besides Latin-1. When the PO file you wish to edit already contains a translation this translation will put into the edit buffer, too, and marked accordingly. I've prepared another function to edit those translation variants using ediff. I can send or post a pre-release po-mode.el on request. Here's the code: (define-key po-mode-map "l" 'po-lookup-compendium) (defvar po-compendium-file nil "*Set to FILENAME of the compendium file.") (defun po-lookup-compendium () "Lookup `po-compendium-file' for a translation." (interactive) (let ((dev-null (cond ((boundp 'null-device) null-device) ; since Emacs 20.3 ((memq system-type '(windows-nt windows-95)) "NUL") (t "/dev/null"))) (oldbuf (current-buffer)) start end) (if (null po-compendium-file) (error "No compendium file set; check `po-compendium-file'") (po-find-span-of-entry) (setq start po-start-of-entry end po-start-of-msgstr) (save-current-buffer (set-buffer (get-buffer-create " *po-lookup")) (setq buffer-read-only nil) (erase-buffer) (insert-buffer-substring oldbuf start end) (insert "msgstr \"\"\n") (call-process-region (point-min) (point-max) "msgmerge" t t t "-C" (expand-file-name po-compendium-file) null-device "-q" "-o" "-" "-") (po-mode) (po-kill-ring-save-msgstr)) (po-edit-msgstr) (if (looking-at "[#<]") ;; edit buffer is empty; just yank (progn (yank) (if (looking-at "#") (insert "\n"))) (save-excursion (insert "\n#-#-#-#-# old translation #-#-#-#-#\n")) (yank))))) -- --jdSXk3x1,o?9=.hB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE775limJYAF+DAd5YRAqIOAJ0fM8wDcqLukp1K3YtBlXmoNHDFZQCgjg66 YzMwdPaI85XWwBZNaw9nTHY= =HFnJ -----END PGP SIGNATURE----- --jdSXk3x1,o?9=.hB--