Adding support for a new Language

  1. make system:

    Edit the toplevel CMakeLists.txt and add a new entry to the list of languages. Look for the variable KWAVE_LINGUAS and add a line for the new language. Each entry consists of a pair with a language code and language name, like this: <code>:<name>. Example:

    fr:Francais
    

    The language code is a 2-letter code which is used for directories and filenames, as it is also used in KDE. The language name is used internally for the docbook online documentation and the online help only. For a list of available language codes and names, please refer to the documentation of the international standard ISO 639.2.

  2. user interface:

    Go to the source directory of Kwave (not the build directory), change into the subdirectory po and copy the file kwave.pot to the corresponding .po file of the language you want to add: "<code>.po". After that you can translate the file using your favorite tool, like Lokalize. Example:

    % cd $HOME/src/kwave
    % cd po
    % cp kwave.pot fr.po
    % lokalize fr.po
    

  3. online help:

    This is similar to the procedure for the user interface, but requires some extra steps because the master file is in docbook format and the .pot template is a generated file. Go to the source directory of Kwave (not the build directory), change into the subdirectory doc and create an empty .po file:

    % cd $HOME/src/kwave
    % cd doc
    % touch help_fr.po
    

    Then change to your build directory (e.g. somewhere in /tmp), prepare for building and then generate the .pot template (you can safely ignore the error messages that come out at this stage). This template has to be copied to the .po file in the source directory of the online help. Example:

    % mkdir /tmp/kwave-build
    % cd /tmp/kwave-build
    % cmake $HOME/src/kwave
    % make doc
    % cp doc/help_en.pot $HOME/src/kwave/doc/help_fr.po
    

    Now you can translate the .po file, like above:

    % cd $HOME/src/kwave
    % cd doc
    % lokalize help_fr.po
    

  4. screenshots:

    For the online documentation you also need screenshots that use the translated messages. This requires a built and installed Kwave package, so you should follow the steps mentioned in the section about Manual Compilation and installation. Of course you must not pass the build option WITH_DOC=no or any other build option that removes functionality, otherwise you would not be able to get screenshots of components that you have disabled.

    For a list of screenshots you can look into one of the existing directories in the source tree, for example in $HOME/doc/de. All screenshots are in .png and should follow the KDE Documentation Screenshots Requirements. Here in short:

    • Window decoration: Oxygen

    • Widget style: Oxygen

    • Colors: Oxygen

    • Background: Flat color - Color must be white

    • Run X11 in 72dpi mode

    • Save the files in 8bpp

    • Try to keep the size of each file below 20kB

  5. desktop file:

    Add a Comment line for the new language to the file kwave/kwave.desktop.in. Please note that this file is UTF-8 encoded! Example:

    Comment[fr]=Un éditeur de sons pour KDE
    

Useful links: