(defvar sacha/i18n-bundle "~/notebook/proj/msiap/src/ApplicationResourcez.properties" "File containing message maps of the form name=value.") (defvar sacha/i18n-regexp nil "Regexp matching all the internationalized words we know about.") (defvar sacha/i18n-map nil "Map of all the internationalized words we know about.") (defun sacha/i18n-read-all (file) "Load i18n messages from FILE." (interactive "fFile: ") (find-file file) (goto-char (point-min)) (let (list) (while (not (eobp)) (when (search-forward "=" (line-end-position) t) (add-to-list 'list (cons (buffer-substring-no-properties (line-beginning-position) (1- (point))) (buffer-substring-no-properties (point) (line-end-position))))) (forward-line)) (setq sacha/i18n-regexp (regexp-opt (mapcar (lambda (item) (cdr item)) list))) (setq sacha/i18n-map list))) (defun sacha/i18n-find-next () (interactive) (re-search-forward sacha/i18n-regexp nil t)) (defun sacha/i18n-replace () (interactive) (replace-match (concat "") t t))