Skip to content
maidis edited this page Jul 20, 2012 · 7 revisions

LibreOffice/OpenOffice.org için yeni bir dilbilgisi denetleyicisi yapımı

Kural geliştirme

Bir kural (Lightproof .dat) dosyası oluşturmak için Lightproof düzenleyicisini (LibreOffice Writer araç çubuğu eklentisi) kullanın. Daha fazla bilgi için sözdizimi belgesine bakınız.

LibreOffice bütünleşmesinden sonra dahili dilbilgisi denetleyici bileşenini Araçlar > Özellikler > Dil Ayarları > Yazım Yardımı bölümünden kapatın. Örneğin "Lightproof grammar checker (English)" gibi mevcut dil modüllerini kapatın. "Lightproof editor" bileşenini etkinleştirin ve sonra LibreOffice'yi kural geliştirmek için yeniden başlatın.

Henüz isteğe bağlı özellikler (dlg dosyası) için görsel bir düzenleyici yoktur. Ama düzenleyicideki tüm isteğe bağlı kuralları Apply all rules simgesine basarak derleyip test edebilirsiniz. Ayrıca kural ve iletişim penceresi tanımlama dosyalarını src/editor dizinine kopyalayarak geliştirilmiş bir düzenleyici eklentisi derleyebilirsiniz:

python make.py src/editor/editor.cfg

Not: the default locales of the editor (supported languages of the edited rule document) cover only the languages with Hunspell dictionaries. Choose such languages for editing in Writer (eg. Esperanto), or add your language to the "locales" section of the src/editor/editor.cfg and compile the editor extension.

Eklenti geliştirimi

  1. Copy src/en/en.cfg, dat and dlg files under the name src/your_locale/your_locale.cfg, dat and dlg.

  2. Set cfg, translate messages, dat and dlg files (see doc/dialog.txt).

  3. Compile and install your data (see README)

LibreOffice bütünleşmesi

Short description about the Lightproof integration with the dictionary extensions (it is not an automatic process yet):

  1. Copy dialog/* and pythonpath/* directories and Lightproof.py, Linguistic.xcu of your Lightproof extension to the dictionaries/your_language/ directory of LibreOffice. (Note: pythonpath/lightproof_compiler* doesn't need for the integration.)

  2. Extend COMPONENT_FILES variable of makefile.mk with these new files.

  3. Extend manifest.xml with the following elements:

    <manifest:file-entry manifest:full-path="dialog/OptionsDialog.xcs"

manifest:media-type="application/vnd.sun.star.configuration-schema" /> <manifest:file-entry manifest:full-path="dialog/OptionsDialog.xcu"

manifest:media-type="application/vnd.sun.star.configuration-data" /> <manifest:file-entry manifest:media-type="application/vnd.sun.star.uno-component;type=Python" manifest:full-path="Lightproof.py"/> <manifest:file-entry

manifest:media-type="application/vnd.sun.star.configuration-data" manifest:full-path="Linguistic.xcu" />

  1. Change extension ID of dialog/OptionsDialog.xcu to the ID of the dictionary extension (see in description.xml):
org.openoffice.en.hunspell.dictionaries

Clone this wiki locally