[sisyphus] about translation (Was: evolution messages)
Valek Filippov
=?iso-8859-1?q?DF_=CE=C1_cannabis=2Edataforce=2Enet?=
Пн Ноя 12 12:41:16 MSK 2001
Привет!
> имеются ли у нас какие-нибудь ресурсы по
> стадартизации переводов интерфейсов?
Да, существует глоссарий 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)))))
--
----------- следующая часть -----------
Было удалено вложение не в текстовом формате...
Имя : =?iso-8859-1?q?=CF=D4=D3=D5=D4=D3=D4=D7=D5=C5=D4?=
Тип : application/pgp-signature
Размер : 189 байтов
Описание: =?iso-8859-1?q?=CF=D4=D3=D5=D4=D3=D4=D7=D5=C5=D4?=
Url : <http://lists.altlinux.org/pipermail/sisyphus/attachments/20011112/817ec49e/attachment-0012.bin>
Подробная информация о списке рассылки Sisyphus