Menu

#191 Make languages purely database-driven

v1.0 (example)
closed
None
5
2021-07-15
2021-07-15
Ahasuerus
No

Make languages purely database-driven. Currently, the list of supported languages is stored in 2 places: in the database table "languages" and in the global variable LANGUAGES, which is defined in common/isfdb.py. Whenever a new language is added, the two lists have to be kept in sync manually by the developer. The advantage of this design is that it saves a database call. The disadvantage is that it makes it impossible to fully automate the process of adding languages to the database. It also makes the process more error-prone. On balance, it is better to make the process fully database-driven and then create a Bureaucrat-only option to allow adding new languages via the regular UI.

Discussion

  • Ahasuerus

    Ahasuerus - 2021-07-15
    • status: open --> closed
    • assigned_to: Ahasuerus
     
  • Ahasuerus

    Ahasuerus - 2021-07-15

    Implemented in:

    common/SQLparsing.py
    common/isfdb.py
    

    Installed in SVN 683 on 2021-07-15. Closing the SR.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB