Difference between revisions of "Website Maintenance"

From GnuCash
Jump to: navigation, search
(Managing Translations: New languages)
(Managing Translations: handling bitrotten)
Line 41: Line 41:
 
## If a language is new, add it in  
 
## If a language is new, add it in  
 
##;makefile: to <tt>languages</tt>
 
##;makefile: to <tt>languages</tt>
 +
## If a language is new or ''bitrotten'', add or enable in
 
##;externals/header.phtml: a line in <syntaxhighlight lang="html"><span id="language"></syntaxhighlight>
 
##;externals/header.phtml: a line in <syntaxhighlight lang="html"><span id="language"></syntaxhighlight>
 +
##;Note: A few languages are disabled here, because they are '''bitrotten'''.
 
## apply them and
 
## apply them and
 
## make the .mo files, e.g. with <pre>make mos</pre>
 
## make the .mo files, e.g. with <pre>make mos</pre>

Revision as of 06:21, 8 April 2018

Sometimes something should be improved on our website. This page is intended to collect the right procedure.

Introduction

www.gnucash.org is the webserver of the GnuCash project. The sources are public available at GitHub. Building is done by a simple GNU Make.

State

{sizing|develdocs}.phtml are currently (2017) hopeless outdated.

Adding or Changing Text

If you add or change text, keep in mind Gnucash and its website are multilingual. If you - like me and most other people - are not firm in all languages, you should ask the translators, to help you keeping the translations up to date.

"Coding" Style

 <?php echo T_("A translatable string");?>
  • Separate data (Numbers, URL, ...) from text:
Bad
 <?php echo T_("<span class=\"gnucash\">GnuCash</span> handles internationalized dates and currencies. The application's menus and popups have been translated to 21 languages, including Chinese, Danish, French, German, Hungarian, Italian, Japanese, Norwegian, Polish, Portuguese, Russian, Spanish, Swedish, Turkish, Ukrainian, and British English. Documentation is available in English, French, Portuguese and Spanish.");?></p>
Better
 <?php printf (T_("<span class=\"gnucash\">GnuCash</span> handles internationalized dates and currencies. The application's menus and popups have been translated to %u languages, including Chinese, Danish, French, German, Hungarian, Italian, Japanese, Norwegian, Polish, Portuguese, Russian, Spanish, Swedish, Turkish, Ukrainian, and British English. Documentation is available in English, French, Portuguese and Spanish."), 21);?></p>
Now an additional translation of the program will not break all website translations.
  • Try to avoid putting URLs in translatable strings, but
  • links to the wiki should be separate marked translatatable - there might be a translated page in the wiki.
  • addresses of images, which contain text should be translatable to link them to localized versions.
Fix me
Which methods should we use for the images? This needs documentation in Translation, too.

Managing Translations

After you finished editing the english text, you should prepare the translation by

  1. creating a new .pot file
    make pot
  2. msgmerge all existing .po files
    make msgmerge
    and commit the updates
  3. send a short mail to gnucash-devel about "Translators: Website changed ..."
    feel free to give them some clues, what changed like
    "complete new download page" or
    "fixed 42 typos in the english text".
  4. As patches with reworked .po files arrive,
    1. If a language is new, add it in
      makefile
      to languages
    2. If a language is new or bitrotten, add or enable in
      externals/header.phtml
      a line in
      <span id="language">
      
      Note
      A few languages are disabled here, because they are bitrotten.
    3. apply them and
    4. make the .mo files, e.g. with
      make mos
    5. commit
      po/LL.po and
      locale/LL/LC_MESSAGES/gnucash-htdocs.mo
      where LL is the language code.

Further details can be found on the Translation page.

Thanks for your time and work!

Testing

After pushing your commit press the W3C-Check button in the lower left corner of the website and fix any claimed errors.

Todo
Idea
Set up apache (or another webserver?)
Add your repository to your apache configuration /etc/apache2/conf.d/
View http://localhost/gnucash/