Changeset 13121 for main/waeup.kofa
- Timestamp:
- 1 Jul 2015, 06:41:23 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/docs/source/userdocs/customization.rst
r13120 r13121 4 4 ******************** 5 5 6 Portal customization requires profound knowledge of the Python programming language. Customization is part of the portal deployment process. It can only be done by the custom package manager and activated by the system administrator, who is allowed to update/upgrade the package on the server and restart the portal. Usually, custom packages are not designed for regular reconfiguration. Due to the complexity of school fee computation at Nigerian universities, however, a lot of configuration had to be done in the Python code and can thus not be subject to online configuration. Technically speaking, the parameters are only loaded and registered once during start-up and are not stored in the database like the configuration parameters described in :ref:`configuration`. 6 Portal customization requires profound knowledge of the Python 7 programming language. Customization is part of the portal deployment 8 process. It can only be done by the custom package manager and 9 activated by the system administrator, who is allowed to 10 update/upgrade the package on the server and restart the portal. 11 Usually, custom packages are not designed for regular 12 reconfiguration. Due to the complexity of school fee computation at 13 Nigerian universities, however, a lot of configuration had to be 14 done in the Python code and can thus not be subject to online 15 configuration. Technically speaking, the parameters are only loaded 16 and registered once during start-up and are not stored in the 17 database like the configuration parameters described in 18 :ref:`configuration`. 7 19 8 Kofa must not be customized by manipulating original Kofa code, i.e. by editing Python files, Zope page templates or ZCML configuration files in the Kofa base package. Customization is done by deploying a custom package which can inherit all the Python classes from the base package, in order to override distinct attributes and methods and register these customized classes instead of the orginal classes during start-up. It would go beyond the scope of the user handbook to explain, how to build such a Kofa custom package. This will be done in the :ref:`developer_handbook`. Here we roughly describe the three different customization approaches with a focus on the third approach, the customization of utility attributes and methods. 20 Kofa must not be customized by manipulating original Kofa code, i.e. 21 by editing Python files, Zope page templates or ZCML configuration 22 files in the Kofa base package. Customization is done by deploying a 23 custom package which can inherit all the Python classes from the 24 base package, in order to override distinct attributes and methods 25 and register these customized classes instead of the orginal classes 26 during start-up. It would go beyond the scope of the user handbook 27 to explain, how to build such a Kofa custom package. This will be 28 done in the :ref:`developer_handbook`. Here we roughly describe the 29 three different customization approaches with a focus on the third 30 approach, the customization of utility attributes and methods. 9 31 10 32 Localization 11 33 ============ 34 35 The base language of the Kofa User Interface (Kofa UI) is English. 36 The English language regime has been specified by WAeUP's first 37 customer, the University of Benin in Nigeria. Kofa is language-aware, 38 which means it has been translated into different languages (German 39 and French so far), and the preferred language can be selected via 40 the UI. The Kofa UI translations and also the English language 41 regime can be localized in custom packages by overriding single 42 entries of the language files. Headlines, field labels, field 43 descriptions, navigation tabs, buttons, page comments, flash 44 messages etc. can be easily adjusted to the needs of the institution 45 which wants to deploy Kofa. 46 47 Kofa is using the `GNU gettext utilities 48 <http://www.gnu.org/software/gettext>`_ for translation and 49 localization. Translation is done via ``po`` text files which are 50 located in the ``locales`` folder of a package. Each language has 51 its own subfolder. Localized English Kofa terms, for intance, can be 52 found in ``locales/en/LC_MESSAGES/waeup.kofa.po``. A single 53 entry/message consists of two lines. 54 55 Example:: 56 57 msgid "Login" 58 msgstr "Let me in" 59 60 ``msgid`` contains the original term from the base package, 61 ``msgstr`` contains its localized/translated version, which results 62 into a renamed login tab on the right side of the navigation bar. 63 64 ``po`` files must be compiled before restarting the portal. Editing 65 and compilation of ``po`` files can be done with a nice tool called 66 'Poedit' which is `available <https://poedit.net/download>`_ for 67 various operating systems. 68 12 69 13 70 Zope Interfaces … … 29 86 30 87 31 32
Note: See TracChangeset for help on using the changeset viewer.