Skip to content

Karina, a multiplatform and multilingual app (Lazarus project)

Andreas Jakobsche edited this page Oct 23, 2018 · 5 revisions

Equal UI or all desktop computers, growing number of languages The project is created and developed with the Lazarus IDE. You can download a binary version from karina/bin to use it or help to improve it by contributing to it.

Quickstart

If you find a compiled version for your system in the directory bin, you can download and use it. If there is no version working on your system, you can try to get a Lazarus IDE version for your system from lazarus-ide.org or another website that offers something compatible, then clone the repository karina, open the project karina.lpi and build (compile) it for your system. After that was successfully, you can make or update the content of the bin directory for your system by executing make within the project's main directory like described in the passage Contributing compiled binaries.

Contributing

For the basics, please read the file CONTRIBUTING.txt. It describes the best known procedure to contribute to this project. All other ways would require that I work more (longer) for not more effect. If it is usefully to you, you can be listed as co-worker or author of your work in the project documentation, for example your name and Website or e-mail address.

Contributing changes or extensions to the code

To start the collaboration read, what is described in the file CONTRIBUTING.txt! This is a good frame for all possible changes. Details for code changes:

  1. Fork karina to your GitHub account!
  2. Clone your fork locally!
  3. Install the Lazarus IDE with all tools it depends on!
  4. Open the project karina.lpi in Lazarus!
  5. Edit code or resources or add your new code or resources!
  6. Build the project with your changes to verify, that it works!
  7. If you have reached that state and are satisfied with your work, push it to your fork on GitHub!
  8. Send me a pull request!

Contributing to a translation of the UI

By experience, best translation is such by a human, who translates from a foreign language, he knows good, to his own language (mother tongue). It is also necessary, that the translator has understood, how to run a program on a computer and how this special program is used. The initial UI language - and thus default the language - of this project is German. Nevertheless, it should be no problem to translate it for somebody who understands English, because the English translation is the first, that is updated, when something has changed in the original language. It is also good to use the English translation as source, if there are passages you cannot or don't want to translate because you are in doubt, whether you would do it good enough. In that case, the English text will be displayed for an untranslated passage. A user might understand it better than a bad translation, and it offers the chance, that another contributor can provide a good translation to your language in future. The only file that has to be edited is the .xy.po file for the target language. If there is no file locale/*.xy.po with xy as the shortcut for your language, tell me, and I will create it for you together with an Item in the Language menu of the app, so that you can test your work always when you will want. The recommended tool to translate a .po file is poedit. It exists for several systems. For some systems exist other compatible editors. Because a .po file is a UTF-8 text file, you could also edit it with karina or another UTF-8 text editor. Every passage of a translation file has a msgid and a msgstr value. You must never change the msgid value, because this would remove your translation from the app. Only edit the msgstr value, if it is not a correct translation or you want to suggest a change. After you have made the changes in your fork (or locally to your computer and then pushed to your fork), you can send me a pull request.

The prototype UI was made in German, because I'm a German, and it started as a learning project for German beginners. Nevertheless, there is a translation to English, that can be selected via a main menu item containing an usual icon for every available language. If you don't understand German but want to provide a translation to your language, you can copy the file locale/karina.en.po to locale/karina.xy.po and edit locale/karina.xy.po. In that case you have to replace the English texts with text in your language with the shortcut xy. This is the procedure in short:

  1. If there is no file locale/karina.xy.po of your target language xy in locale, tell me, then wait, until it will be available.
  2. If you have no fork of karina in your GitHub account, create it!
  3. Clone your fork locally!
  4. Use poedit or a compatible program to translate or edit the translation. If there is a tranlation in English, replace it with your target language. If you prefer to translate from German, translate the msgid value (but don't change it)! Translations have always to be in msgstr.
  5. You can test your translation locally, if you copy the .po file to karina/bin/*/karina/locale/, then run karina/bin/*/karina/karina[.exe] and switch to the language of your choice.
  6. If you are satisfied with your result, push it to your fork on GitHub!
  7. Send me a pull request!

Contributing compiled binaries

Before you can do that, you should have a Free Pascal Compiler (fpc) and Lazarus IDE and all other necessary tools ready to compile for the target system you want to build for. To verify this, you can create and run a small application with Lazarus for your target system. Such project is usually loaded and ready to be built, if you open the Lazarus IDE the first time. Then continue with karina after the following procedure:

  1. Fork karina to your GitHub account!
  2. Clone your fork locally!
  3. Change to the local clone of karina, and run the make command within the project directory karina as follows:
    1. for Windows: make defaultwin Target_CPU=<anycpu> Target_OS=<anyos>
    2. else: make default Target_CPU=<anycpu> Target_OS=<anyos>

by replacing and with your target values! If this fails, you have to examine the messages of make or used commands. If lazbuild has problems, open the project in Lazarus and try to build it there to find the problems. If it is compiled without problems, lazbuild calls by make should also work. If you try to make binaries for a system that requires special things during the make run, you could edit the makefile to include your special rules or create a binary directory manually with your new build. The default project settings for Lazarus build the binary program file in a karina/lib subdirectory. Other necessary files might be there or in the project base directory karina. For example: To run the binary app file within Lazarus (debugging), it is necessary to copy or link the directory karina/locale into the directory lib/$(Target_CPU)-$(Target_OS)/. To get a working binary in the karina/bin tree, you have to copy the directory karina locale to the directory containing the executable app file.

Contributing graphics

If you have ideas to beautify the design of Karina, you can provide graphical images, that could be used in documentations, as program icon or for further things you want to suggest.

Clone this wiki locally