Translating ccPublisher

From Creative Commons
Jump to: navigation, search

ccPublisher 2.2 (currently under development) will focus on providing internationalization (i18n) support. This document is a work in progress that describes the translation process which will be used once ccPublisher 2.2 release candidates are available.

Translations for ccPublisher are stored in gettext message catalogs. Message catalogs are text files which associate translated strings with identifiers used by the application. Each string to be translated is referred to as a "message".

Creating A Translation

When translating ccPublisher there are two files which must be copied and editted for the core application. Extensions may have their own message catalogs which need translating (see Translating Extensions for details on internationalizing ccPublisher extensions). The translation resources are located in the resources/locale subdirectory for a development sandbox. Use the following instructions to create a new translation for ccPublisher; these instructions are for translating ccPublisher to the fictional "ya" locale and assume a Linux development environment; Mac OS X should be similar.

  • Create a locale subdirectory for your new translation
 $ cd resources/locale
 $ mkdir ya
 $ mkdir ya/LC_MESSAGES
  • Copy the template files into the new directory
 $ cp ccpublisher.pot ya/ccpublisher.po
 $ cp p6.pot ya/p6.pot
  • Edit the new files with the translated content. Two areas need editted: the header information and the messages.
    • The header information should be updated with the translator's contact information, email address and the character set used. The character set should usually be utf-8.
    • Each message is defined by two lines; the translated content goes between the quotes on the msgstr line. The msgid line must not be changed.
 msgid "OK"
 msgstr ""
  • Compile the message catalogs:
 $ cd ya
 $ msgfmt -o LC_MESSAGES/ ccpublisher.po
 $ msgfmt -o LC_MESSAGES/ p6.po
  • Run ccPublisher with the --locale parameter; alternately if working on your default locale, omit the parameter and ccPublisher will use the operating system's default locale information.
 Change to the sandbox root directory
 $ cd ../../.. 
 $ python --locale ya

Submitting a Translation

Once you have completed or updated a translation and tested it, you can submit it to the ccPublisher developers using the Roundup bug tracking system. To submit your extension, do the the following:

  1. Go to and create an account if you don't already have one
  2. Log into your account and click the Create New link under the Issues heading along the left hand side.
  3. Your issue should include the following information:
    • Title the title should include the language you have translated.
    • Priority if this is a new translation, select Feature; if this corrects a problem with an existing translation, selected Bug.
    • Topics include the i18n
    • File attach a zip or tar file containing the translation files you've created or editted.
  4. After you submit your issue we'll add the translations to the ccPublisher source tree

Supported Languages

ccPublisher includes support for the following languages:

  • English

The following languages will be included in the next release: