[pgadmin-hackers] [patch] Refactor: clipboard, translations, jasmine

Поиск
Список
Период
Сортировка
От Atira Odhner
Тема [pgadmin-hackers] [patch] Refactor: clipboard, translations, jasmine
Дата
Msg-id CA+Vc24o3DuvFOuULUxDDefDxhLzjJ_UWRK54DcvNujCexA0KVw@mail.gmail.com
обсуждение исходный текст
Ответы Re: [pgadmin-hackers] [patch] Refactor: clipboard, translations, jasmine
Re: [pgadmin-hackers] [patch] Refactor: clipboard, translations, jasmine
Список pgadmin-hackers
Hi hackers,

We made some changes to start to make the javascript testable:

    - Move clipboard copying into its own file so we can test the
      interaction with it when we start adding column selection
    - Create a translations.js and translate.js which uses flask to pull in translations, but
      lets us have the flask template rendering confined to that one file,
      enabling us to test javascript files that rely on translations
    - add jasmine javascript testing which currently runs from the browser
      at /static/SpecRunner.html when the app is up.
    - delete some dead code from sqleditor.js

Why we decided to make translate.js only support interpolations of the form "%(variable)s":
   - it matches functionality in python
   - having named variables allows for multiple interpolations in one sentence without the risk that a translation will swap the order

Future things we'd like to add to this:
   - make jasmine run from the commandline with the rest of the tests
   - support for translations with number formatting


Tira & Sarah
Вложения

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Dave Page
Дата:
Сообщение: [pgadmin-hackers] pgAdmin 4 commit: Add selenium to the Pip requirements for theautomate
Следующее
От: Atira Odhner
Дата:
Сообщение: Re: [pgadmin-hackers] [patch] Refactor: clipboard, translations, jasmine