Welcome to docs.opsview.com

Translating Opsview

Opsview uses gettext for translating strings in Opsview.

We welcome any help with translation files.

Getting translation files

The po files are available on your Opsview server under /usr/local/opsview-web/lib/Opsview/Web/I18N. The default file is i_default.po, which provides the fallback to English. Please use the latest files as these will be updated with the newest strings in the application.

Alternatively, you can access the latest files in the repository from:

Files in this directory are official language files which have been verified by a translator.

Official languages will be listed at http://opsview.org/translators.

We have also included some files in the contrib subdirectory which are first passes at translations based on Google's translation service (with thanks to the excellent WebService::Google::Language perl module). You can re-generate these files with the utils/auto_translate script.

If your language is not available, you can take a copy of the messages.pot file and update.

Note: As language files change between releases, it is possible that there are some entries that are removed in newer versions for strings still used in older versions. The best tactic for changes is to update local language files and ensure the latest SVN file is up to date with your changes. Then newer releases of Opsview should work.

Committing changes

Official translators will be given access to update the Opsview SVN repository under opsview/trunk/opsview-web/lib/Opsview/Web/I18N.

The workflow is:

  • Checkout the language files. You can do this over an Opsview installation:
su - nagios
cd /usr/local/opsview-web/lib/Opsview/Web
mv I18N I18N.backup
svn co https://secure.opsera.com/svn/opsview/trunk/opsview-web/lib/Opsview/Web/I18N I18N
cd I18N
  • Change the files. If you are creating a new language file, use messages.pot as a starting point
  • To see your changes, you need to restart the Opsview Web server: /etc/init.d/opsview-web restart
  • When happy with your changes, commit the changes:
svn diff    # to view differences
svn commit  # Add a message about the changes
  • You will need to enter your username and password (svn will try to commit with the nagios user first, but if you give an incorrect password, you can then use a different password)

Tools for translating files

There are various tools available for translating. We recommend Poedit, however some people have suggested KBabel when comparing two different languages together.

Poedit

Download the appropriate software and install.

Load the en.po file:

and the other language po file:

Start translating!

Guidelines

  • Text should not have any encodings in it (such as >) - it should be plain English
  • However, if the message key has html in it, then this is passed through as pure HTML to the application. You should preserve the html parts closely, otherwise the application could break
  • Labels and titles should follow guidelines in title_capitalisation, unless this does not apply to the target language
  • Try to stick to the same punctuation: if the default translation has a full stop at the end, you should also have a full stop in your translation
  • %1, %2, etc reference the variables that maybe passed to the message. You may put the value back in a different order if suitable
  • If you need to introduce a line feed, it needs to be escaped. However, some software already handle this (Poedit will automatically add the escape for you)
  • Menu section and entry names are auto generated with a prefix of ui.menu.section. and ui.menu.entry. respectively. Spaces are removed and characters are converted to lower case, so “Host - All” will look for a key called ui.menu.entry.host-all. If a translation does not exist, then it will default to the original name

Submitting translation files

Send your translated files to us and we'll evaluate them for inclusion into a future version of Opsview.

New messages

As we add new features to Opsview, new messages will be created. We will always update the shipping language files with the new message strings, but we set the translations to blank. This means Opsview will fallback to the English version, but it will be easy for translators to pick up the latest PO file and translate just these newer strings.

Although we strive to update the po files with the newest strings, this is done as required. You can force this to occur on a development server by running:

cd opsview-web
make gettext

All language files will then be updated with any missing strings.