Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 217e6383eb6489cdd39856d7152d5d5ba0ba25ee
Ticket: 3544988fffffffffffffffffffffffffffffffff
Add msgcat current file local
User & Date: oehhar on 2012-07-17 09:32:28
Changes

  1. assignee changed to: "oehhar"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Message catalog files have names: "<locale>.msg" and consist of entries like:
    mcset <locale> <ori> <translation>
    
    Example:
    --de.msg--
    mcset de File Datei
    mcset de Exit Verlassen
    --eof--
    
    The locale is repeated for each command, even if it could be known by the file name.
    I often do errors here specially if I copy- and paste message catalogue file contents and forget to change the locale.
    
    The feature request proposes the notion of a locale generated from the message catalog file name which is extracted and stored in the msgcat package.
    
    Interface:
    Get MC File locale:
    msgcat::mcconfig -mcfilelocale
    It might also be set (for example within message files):
    msgcat::mcconfig -mcfilelocale de_CH
    A new mcset uses this mc file locale implicitly:
    msgcat::mcflset <ori> <translation>
    And its multi-counterpart:
    msgcat::mcflmset {ori1 trans1 ori2 trans2 ...}
    
    Example use:
    --de.msg--
    mcflset File Datei
    mcflset Exit Verlassen
    --eof--
    
    Attached is a ready to use msgcat-1.5.1.tm file and a diff against msgcat-1.5.0.tm from TIP 399 contained in feature request # 3511941
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "oehhar"
  10. subsystem changed to: "30. msgcat Package"
  11. title changed to: "Add msgcat current file local"
  12. type changed to: "RFE"