Grammalecte  Check-in [095697c359]

Overview
Comment:[core][py] capitalization for errors
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | core
Files: files | file ages | folders
SHA3-256: 095697c359f5e7d99eb9ff12a984b1472880b70926004db865b140f7e45658b8
User & Date: olr on 2018-11-23 10:45:53
Other Links: manifest | tags
Context
2018-11-23
10:49
[core][js] capitalization for errors check-in: 866f1c680d user: olr tags: trunk, core
10:45
[core][py] capitalization for errors check-in: 095697c359 user: olr tags: trunk, core
10:45
[fr] màj: performance check-in: e801548afc user: olr tags: trunk, fr
Changes

Modified gc_core/py/lang_core/gc_engine.py from [c275dc26cb] to [2de9c1ae19].

603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
            sSugg = globals()[sRepl[1:]](sText, m)
            lSugg = sSugg.split("|")  if sSugg  else []
        elif sRepl == "_":
            lSugg = []
        else:
            lSugg = m.expand(sRepl).split("|")
        if bUppercase and lSugg and m.group(iGroup)[0:1].isupper():
            lSugg = list(map(str.capitalize, lSugg))
        # Message
        sMessage = globals()[sMsg[1:]](sText, m)  if sMsg[0:1] == "="  else  m.expand(sMsg)
        if bShowRuleId:
            sMessage += "  # " + sLineId + " # " + sRuleId
        #
        if _bWriterError:
            return self._createErrorForWriter(nStart, nEnd - nStart, sRuleId, sOption, sMessage, lSugg, sURL)







|







603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
            sSugg = globals()[sRepl[1:]](sText, m)
            lSugg = sSugg.split("|")  if sSugg  else []
        elif sRepl == "_":
            lSugg = []
        else:
            lSugg = m.expand(sRepl).split("|")
        if bUppercase and lSugg and m.group(iGroup)[0:1].isupper():
            lSugg = list(map(lambda s: s[0:1].upper()+s[1:], lSugg))
        # Message
        sMessage = globals()[sMsg[1:]](sText, m)  if sMsg[0:1] == "="  else  m.expand(sMsg)
        if bShowRuleId:
            sMessage += "  # " + sLineId + " # " + sRuleId
        #
        if _bWriterError:
            return self._createErrorForWriter(nStart, nEnd - nStart, sRuleId, sOption, sMessage, lSugg, sURL)