[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

J'en fais quoi de mon patch pour gettext ?



J'ai fais deux fonctions en emacs lisp de rien du tout, mais qui sont
diablement pratiques : quand on fait M-x po-ispell, ispell est lancé sur
les chaines traduites (et seulement la). Terrible pour les
traducteurs. Bon, je suis sur que ca existe deja ailleurs, tellement c'est
utile, mais je le trouvais pas. Si non, comment je fais pour le voir
integrer à la distrib officielle ?

Voici le code, à charger apres que gettext.el et ispell.el soient chargés:

(defun po-ispell-next ()
  "Search the next entry to check"
	  (po-find-span-of-entry)
	  (let ((here (point)))
	    (goto-char po-end-of-entry)
	    (if (re-search-forward po-any-msgstr-regexp nil t)
		(progn
		  (goto-char (match-beginning 0))
		  (po-current-entry)
		  t)
	      nil)))
  
(defun po-ispell ()
  "Check the spelling of the po file"
  (interactive)
  (save-excursion
    (save-restriction
      (let ((buffer-read-only po-read-only))
	(po-first-entry)
	(while (po-ispell-next)
	  (po-find-span-of-entry)
	  (ispell-region (+ po-start-of-msgstr 6) po-end-of-entry))))))



Reply to: