Grammalecte  Check-in [89b74dbf1b]

Overview
Comment:[lo] update: lexicon editor
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | lo | multid
Files: files | file ages | folders
SHA3-256: 89b74dbf1be2596eb2d76b677a4fa7e652d7826f5b8574384023c3c571fc7606
User & Date: olr on 2018-02-25 21:55:14
Other Links: branch diff | manifest | tags
Context
2018-02-26
18:46
[lo] update: lexicon editor check-in: db6da7d9a4 user: olr tags: lo, multid
2018-02-25
21:55
[lo] update: lexicon editor check-in: 89b74dbf1b user: olr tags: lo, multid
15:39
merge trunk check-in: 1ab530ddfa user: olr tags: multid
Changes

Modified gc_lang/fr/oxt/DictOptions/LexiconEditor.py from [bbbda73cc4] to [ad048a6895].

    81     81   
    82     82       def run (self, sLang):
    83     83           self.dUI = lxe_strings.getUI(sLang)
    84     84   
    85     85           # dialog
    86     86           self.xDialog = self.xSvMgr.createInstanceWithContext('com.sun.star.awt.UnoControlDialogModel', self.ctx)
    87     87           self.xDialog.Width = 620
    88         -        self.xDialog.Height = 300
           88  +        self.xDialog.Height = 292
    89     89           self.xDialog.Title = self.dUI.get('title', "#title#")
    90     90           xWindowSize = helpers.getWindowSize()
    91     91           self.xDialog.PositionX = int((xWindowSize.Width / 2) - (self.xDialog.Width / 2))
    92     92           self.xDialog.PositionY = int((xWindowSize.Height / 2) - (self.xDialog.Height / 2))
    93     93   
    94     94           # fonts
    95     95           xFDTitle = uno.createUnoStruct("com.sun.star.awt.FontDescriptor")
................................................................................
   106    106           nX1 = 10
   107    107           nX2 = 20
   108    108   
   109    109           nY1 = 5
   110    110           nY2 = nY1 + 25 # nom commun
   111    111           nY3 = nY2 + 95 # nom propre
   112    112           nY4 = nY3 + 45 # verbe
   113         -        nY5 = nY4 + 70 # adverbe
   114         -        nY6 = nY5 + 15 # autre
          113  +        nY5 = nY4 + 68 # adverbe
          114  +        nY6 = nY5 + 13 # autre
   115    115   
   116    116           nXB = nX1 + 195
   117    117           nXC = nXB + 205
   118    118   
   119    119           nHeight = 10
   120    120   
   121    121           #### Add word
   122    122           self._addWidget("add_section", 'FixedLine', nX1, nY1, 190, nHeight, Label = self.dUI.get("add_section", "#err"), FontDescriptor = xFDTitle)
   123    123           #self._addWidget('main_lemma_label', 'FixedText', nX1, nY1+10, 30, nHeight, Label = self.dUI.get('lemma', "#err"))
   124         -        self.xLemma = self._addWidget('main_lemma', 'Edit', nX1, nY1+10, 120, nHeight+2)
   125         -        
          124  +        self.xLemma = self._addWidget('main_lemma', 'Edit', nX1, nY1+10, 120, 14, FontDescriptor = xFDTitle)
          125  +        self._addWidget('close_button', 'Button', nX1+130, nY1+10, 60, 14, Label = self.dUI.get('close_button', "#err"), FontDescriptor = xFDTitle, TextColor = 0x550000)
          126  +
   126    127           # Radio buttons: main POS tag
   127    128           # Note: the only way to group RadioButtons is to create them successively
   128    129           self.xNA = self._addWidget('nom_adj', 'RadioButton', nX1, nY2+12, 60, nHeight, Label = self.dUI.get("nom_adj", "#err"))
   129    130           self.xN = self._addWidget('nom', 'RadioButton', nX1, nY2+22, 60, nHeight, Label = self.dUI.get("nom", "#err"))
   130    131           self.xA = self._addWidget('adj', 'RadioButton', nX1, nY2+32, 60, nHeight, Label = self.dUI.get("adj", "#err"))
   131    132           self.xM1 = self._addWidget('M1', 'RadioButton', nX1, nY3+12, 60, nHeight, Label = self.dUI.get("M1", "#err"))
   132    133           self.xM2 = self._addWidget('M2', 'RadioButton', nX1, nY3+22, 60, nHeight, Label = self.dUI.get("M2", "#err"))
................................................................................
   187    188           self._addWidget('flexion_label', 'FixedText', nX2, nY6+10, 85, nHeight, Label = self.dUI.get('flexion', "#err"))
   188    189           self.xFlexion = self._addWidget('flexion', 'Edit', nX2, nY6+20, 85, nHeight)
   189    190           self._addWidget('tags_label', 'FixedText', nX2+90, nY6+10, 85, nHeight, Label = self.dUI.get('tags', "#err"))
   190    191           self.xTags = self._addWidget('tags', 'Edit', nX2+90, nY6+20, 85, nHeight)
   191    192   
   192    193           #### Generated words
   193    194           self._addWidget("gwords_section", 'FixedLine', nXB, nY1, 200, nHeight, Label = self.dUI.get("new_section", "#err"), FontDescriptor = xFDTitle)
   194         -        self.xGridModelNew = self._addGrid("list_grid_gwords", nXB, nY1+10, 200, 200, [
   195         -            {"Title": self.dUI.get("lex_flex", "#err"), "ColumnWidth": 80},
          195  +        self.xGridModelNew = self._addGrid("list_grid_gwords", nXB, nY1+10, 200, 175, [
          196  +            {"Title": self.dUI.get("lex_flex", "#err"), "ColumnWidth": 65},
   196    197               {"Title": self.dUI.get("lex_lemma", "#err"), "ColumnWidth": 50},
   197         -            {"Title": self.dUI.get("lex_tags", "#err"), "ColumnWidth": 50}
          198  +            {"Title": self.dUI.get("lex_tags", "#err"), "ColumnWidth": 65}
   198    199           ])
   199         -        self._addWidget("dictionary_section", 'FixedLine', nXB, nY1+210, 200, nHeight, Label = self.dUI.get("dictionary_section", "#err"), FontDescriptor = xFDTitle)
          200  +        self._addWidget('add_button', 'Button', nXB, nY1+190, 95, 12, Label = self.dUI.get('add_button', "#err"), FontDescriptor = xFDTitle, TextColor = 0x005500)
          201  +        self._addWidget('delete_button', 'Button', nXB+100, nY1+190, 100, 12, Label = self.dUI.get('delete_button', "#err"), FontDescriptor = xFDTitle, TextColor = 0x550000)
          202  +
          203  +        nY2b = nY1 + 205
          204  +        # lexicon info section
          205  +        self._addWidget("lexicon_info_section", 'FixedLine', nXB, nY2b, 200, nHeight, Label = self.dUI.get("lexicon_info_section", "#err"), FontDescriptor = xFDTitle)
          206  +        self._addWidget("added_entries_label", 'FixedText', nXB, nY2b+10, 90, nHeight, Label = self.dUI.get("added_entries_label", "#err"))
          207  +        self._addWidget("deleted_entries_label", 'FixedText', nXB, nY2b+20, 90, nHeight, Label = self.dUI.get("deleted_entries_label", "#err"))
          208  +        self._addWidget("num_of_entries_label1", 'FixedText', nXB, nY2b+30, 90, nHeight, Label = self.dUI.get("num_of_entries_label", "#err"))
          209  +        self._addWidget('save_button', 'Button', nXB+150, nY2b+10, 50, 12, Label = self.dUI.get('save_button', "#err"), FontDescriptor = xFDSubTitle, TextColor = 0x005500)
          210  +        # dictionary section
          211  +        self._addWidget("dictionary_section", 'FixedLine', nXB, nY2b+45, 200, nHeight, Label = self.dUI.get("dictionary_section", "#err"), FontDescriptor = xFDTitle)
          212  +        self._addWidget("save_date_label", 'FixedText', nXB, nY2b+55, 90, nHeight, Label = self.dUI.get("save_date_label", "#err"))
          213  +        self._addWidget("num_of_entries_label2", 'FixedText', nXB, nY2b+65, 90, nHeight, Label = self.dUI.get("num_of_entries_label", "#err"))
          214  +        self._addWidget('export_button', 'Button', nXB+150, nY2b+55, 50, 12, Label = self.dUI.get('export_button', "#err"), FontDescriptor = xFDSubTitle, TextColor = 0x005500)
   200    215   
   201    216           #### Lexicon section
   202    217           self._addWidget("lexicon_section", 'FixedLine', nXC, nY1, 200, nHeight, Label = self.dUI.get("lexicon_section", "#err"), FontDescriptor = xFDTitle)
   203         -        self.xGridModelLex = self._addGrid("list_grid_lexicon", nXC, nY1+10, 200, 255, [
   204         -            {"Title": self.dUI.get("lex_flex", "#err"), "ColumnWidth": 80},
          218  +        self.xGridModelLex = self._addGrid("list_grid_lexicon", nXC, nY1+10, 200, 270, [
          219  +            {"Title": self.dUI.get("lex_flex", "#err"), "ColumnWidth": 65},
   205    220               {"Title": self.dUI.get("lex_lemma", "#err"), "ColumnWidth": 50},
   206         -            {"Title": self.dUI.get("lex_tags", "#err"), "ColumnWidth": 50}
          221  +            {"Title": self.dUI.get("lex_tags", "#err"), "ColumnWidth": 65}
   207    222           ])
   208         -        
   209         -        # Close
   210         -        self._addWidget('close_button', 'Button', self.xDialog.Width-60, self.xDialog.Height-20, 50, 14, Label = self.dUI.get('close_button', "#err"), FontDescriptor = xFDTitle, TextColor = 0x550000)
   211    223   
   212    224           # container
   213    225           self.xContainer = self.xSvMgr.createInstanceWithContext('com.sun.star.awt.UnoControlDialog', self.ctx)
   214    226           self.xContainer.setModel(self.xDialog)
   215    227           self.xGridControlNew = self.xContainer.getControl('list_grid_gwords')
   216    228           self.xGridControlLex = self.xContainer.getControl('list_grid_lexicon')
   217         -        #self.xContainer.getControl('add_button').addActionListener(self)
   218         -        #self.xContainer.getControl('add_button').setActionCommand('Add')
   219         -        #self.xContainer.getControl('delete_button').addActionListener(self)
   220         -        #self.xContainer.getControl('delete_button').setActionCommand('Delete')
   221         -        #self.xContainer.getControl('save_button').addActionListener(self)
   222         -        #self.xContainer.getControl('save_button').setActionCommand('Save')
          229  +        self.xContainer.getControl('add_button').addActionListener(self)
          230  +        self.xContainer.getControl('add_button').setActionCommand('Add')
          231  +        self.xContainer.getControl('delete_button').addActionListener(self)
          232  +        self.xContainer.getControl('delete_button').setActionCommand('Delete')
          233  +        self.xContainer.getControl('save_button').addActionListener(self)
          234  +        self.xContainer.getControl('save_button').setActionCommand('Save')
   223    235           self.xContainer.getControl('close_button').addActionListener(self)
   224    236           self.xContainer.getControl('close_button').setActionCommand('Close')
   225    237           self.xContainer.setVisible(False)
   226    238           xToolkit = self.xSvMgr.createInstanceWithContext('com.sun.star.awt.ExtToolkit', self.ctx)
   227    239           self.xContainer.createPeer(xToolkit, None)
   228    240           self.xContainer.execute()
   229    241   

Modified gc_lang/fr/oxt/DictOptions/lxe_strings.py from [9aa1470d84] to [1bb5475e12].

    14     14           # catégories
    15     15           "common_name": "Nom commun",
    16     16           "nom_adj": "Nom et adjectif",
    17     17           "nom": "Nom",
    18     18           "adj": "Adjectif",
    19     19           "alt_lemma": "[optionnel] Autre forme (masculine, féminine, variante, etc.)",
    20     20         
    21         -      	"proper_name": "Nom propre",
           21  +        "proper_name": "Nom propre",
    22     22           "M1": "Prénom",
    23     23           "M2": "Patronyme",
    24     24           "MP": "Autre",
    25     25   
    26     26           "gender": "Genre",
    27     27           "epi": "épicène",
    28     28           "mas": "masculin",
................................................................................
    46     46   
    47     47           "adverb": "Adverbe",
    48     48   
    49     49           "other": "Autre",
    50     50           "flexion": "Flexion",
    51     51           "tags": "Étiquettes",
    52     52   
    53         -        "add_button": "Ajouter",
    54         -
    55     53           # Lexicon
    56     54           "new_section": "Mots générés",
    57         -		"lexicon_section": "Votre lexique",
    58         -		"lex_#": "#",
    59         -		"lex_flex": "Flexions",
    60         -		"lex_lemma": "Lemmes",
    61         -		"lex_tags": "Étiquettes",
    62         -		"delete_button": "Supprimer",
           55  +        "lexicon_section": "Votre lexique",
           56  +        "lex_#": "#",
           57  +        "lex_flex": "Flexions",
           58  +        "lex_lemma": "Lemmes",
           59  +        "lex_tags": "Étiquettes",
           60  +
           61  +        "add_button": "Ajouter au lexique",
           62  +        "delete_button": "Supprimer la sélection",
           63  +
           64  +        # Informations
           65  +        "lexicon_info_section": "Lexique",
           66  +        "added_entries_label": "Nombre d’entrées ajoutées",
           67  +        "deleted_entries_label": "Nombre d’entrées effacées",
           68  +        "num_of_entries_label": "Nombre d’entrées",
           69  +        "save_button": "Enregistrer",
    63     70   
    64         -		# Dictionnaire
    65         -		"dictionary_section": "Dictionnaire enregistré",
    66         -		"num_of_entries": "Nombre d’entrées",
    67         -		"save_date": "Date d’enregistrement",
           71  +        "dictionary_section": "Dictionnaire enregistré",
           72  +        "save_date_label": "Date d’enregistrement",
           73  +        "export_button": "Exporter",
    68     74   
    69     75           #
    70     76           "close_button": "Fermer",
    71     77       },
    72     78       # Traduction délibérément limitée
    73     79       "en": {
    74     80           "title": "Grammalecte · Lexical editor",
    75     81           
    76     82           "close_button": "Close",
    77     83       },
    78     84   }