Overview
Comment: | [lo] lexicon editor: update |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | lo | multid |
Files: | files | file ages | folders |
SHA3-256: |
5cc5b32dc703a2e82da9e7d64b06b6a3 |
User & Date: | olr on 2018-02-28 15:29:01 |
Other Links: | branch diff | manifest | tags |
Context
2018-02-28
| ||
16:27 | [lo] lexicon editor: update check-in: 00fe4c5157 user: olr tags: lo, multid | |
15:29 | [lo] lexicon editor: update check-in: 5cc5b32dc7 user: olr tags: lo, multid | |
15:28 | [graphspell][py] dawg: get JSON object instead of JSON string check-in: 1b8133065d user: olr tags: graphspell, multid | |
Changes
Modified gc_core/py/oxt/OptionsDialog.xcs from [412b78821f] to [3732fcdcec].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - - - - + + + + + + | ${xcs_options} </group> <group oor:name="o_${lang}"> <info> <desc>The data for one leaf.</desc> </info> |
︙ |
Modified gc_lang/fr/oxt/DictOptions/DictOptions.py from [0df543aa25] to [afd6778ebd].
︙ | |||
107 108 109 110 111 112 113 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | - + - - + + - + | toolkit = self.xSvMgr.createInstanceWithContext('com.sun.star.awt.ExtToolkit', self.ctx) self.xContainer.createPeer(toolkit, None) self.xContainer.execute() # XActionListener def actionPerformed (self, xActionEvent): try: |
︙ | |||
141 142 143 144 145 146 147 | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | - - + + - + | dialog.run() except: traceback.print_exc() def _loadOptions (self): try: xChild = self.xSettingNode.getByName("o_fr") |
Modified gc_lang/fr/oxt/DictOptions/LexiconEditor.py from [34785f0710] to [3fd0784e8d].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | + + | # Lexicon Editor # by Olivier R. # License: GPL 3 import unohelper import uno import json import re import traceback import helpers import lxe_strings import lxe_conj_data import grammalecte.graphspell as sc import grammalecte.graphspell.dawg as dawg import grammalecte.graphspell.ibdawg as ibdawg import grammalecte.fr.conj as conj from com.sun.star.task import XJobExecutor from com.sun.star.awt import XActionListener from com.sun.star.awt import XKeyListener |
︙ | |||
51 52 53 54 55 56 57 58 59 60 61 62 63 64 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | + + | self.xDesktop = self.xSvMgr.createInstanceWithContext("com.sun.star.frame.Desktop", self.ctx) self.xDocument = self.xDesktop.getCurrentComponent() self.xContainer = None self.xDialog = None self.oSpellChecker = None # data self.lGeneratedFlex = [] # options node self.xSettingNode = helpers.getConfigSetting("/org.openoffice.Lightproof_grammalecte/Other/", True) def _addWidget (self, name, wtype, x, y, w, h, **kwargs): xWidget = self.xDialog.createInstance('com.sun.star.awt.UnoControl%sModel' % wtype) xWidget.Name = name xWidget.PositionX = x xWidget.PositionY = y xWidget.Width = w |
︙ | |||
83 84 85 86 87 88 89 90 91 92 93 94 95 96 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | + | xColumnModel.addColumn(xCol) for k, w in kwargs.items(): setattr(xGridModel, k, w) self.xDialog.insertByName(name, xGridModel) return xGridModel def run (self, sLang): # ui lang self.dUI = lxe_strings.getUI(sLang) # dialog self.xDialog = self.xSvMgr.createInstanceWithContext('com.sun.star.awt.UnoControlDialogModel', self.ctx) self.xDialog.Width = 620 self.xDialog.Height = 292 self.xDialog.Title = self.dUI.get('title', "#title#") |
︙ | |||
201 202 203 204 205 206 207 | 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | - + + + + + + - + + - + + | #### Generated words self._addWidget("gwords_section", 'FixedLine', nXB, nY1, 200, nHeight, Label = self.dUI.get("new_section", "#err"), FontDescriptor = xFDTitle) self.xGridModelNew = self._addGrid("list_grid_gwords", nXB, nY1+10, 200, 175, [ {"Title": self.dUI.get("lex_flex", "#err"), "ColumnWidth": 65}, {"Title": self.dUI.get("lex_lemma", "#err"), "ColumnWidth": 50}, {"Title": self.dUI.get("lex_tags", "#err"), "ColumnWidth": 65} |
︙ | |||
262 263 264 265 266 267 268 | 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | + + - + - + - - + + | for sName in lNames: self.xContainer.getControl(sName).addActionListener(self) self.xContainer.getControl(sName).setActionCommand(sAction) # XActionListener def actionPerformed (self, xActionEvent): try: if xActionEvent.ActionCommand == "Update": self.updateGenWords() |
︙ | |||
291 292 293 294 295 296 297 | 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | - + + + - + + + + + + + + + + + + + + + + + + + + | try: xDialog = LexiconEditor(self.ctx) xDialog.run() except: traceback.print_exc() # Code |
︙ | |||
490 491 492 493 494 495 496 497 498 499 | 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 | + + - - - + + + + + + + + + + | xGridDataModelNew = self.xGridModelNew.GridDataModel xGridDataModelLex = self.xGridModelLex.GridDataModel nStart = xGridDataModelLex.RowCount for i in range(xGridDataModelNew.RowCount): sFlexion, sLemma, sTag = xGridDataModelNew.getRowData(i) xGridDataModelLex.addRow(nStart + i, (sFlexion, sLemma, sTag)) self.xSave.Enabled = True self.xNumAdded.Label = str(int(self.xNumAdded.Label) + xGridDataModelNew.RowCount) self.xNumLex.Label = str(int(self.xNumLex.Label) + xGridDataModelNew.RowCount) self._resetWidgets() @_waitPointer |