From Fedora Project Wiki

< Websites

Revision as of 15:16, 29 November 2012 by Shaiton (talk | contribs) (Created page with "{{ Admon/warning | In progress. Any help appreciated. | This is a start page for a detailed Websites team presentation. You can edit freely.}} __TOC__ == The websites arch ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In progress. Any help appreciated.
This is a start page for a detailed Websites team presentation. You can edit freely.

The websites arch (build, dev and trans)

Our build system

Our websites are rebuilt hourly. This is done using the syncStatic script which is puppet managed. In other words, you need to be on the infra team to change it. A sample copy is uploaded there. This is where we decide against which branch we build each websites. There is also a specific syncStatic.stg script for the staging websites. Example of stg websites are and

For release time, please refer to our specific documentation there.


insert graph here


There is a specific folder for each websites under which you will find the following tree:

   |   |-- build
   |   |-- ChangeLog
   |   |-- data
   |   |-- httpd
   |   |-- Makefile
   |   |-- po
   |   -- static
   -- TODO

There are several folders, one for each websites. The main one have the same tree: a build folder where we have some python scripts for Genshi, the Makefile which is used to run the build, po which hold the translation files, data who has some templates and the HTML sources (in data/content/), and static where are some static files (pictures, JS scripts, CSS..). The httpd folder is used to set a local apache server in order to run a testing instance.


We use the Genshi framework for internationalization. Our current templates need to have special markup around the strings in order to mark them as translatable.

There are several way to use the markups.

  1. ${_('String')}
  2. ${Markup(_('String with &gt; html code'))}
  3. ${Markup(_('String with a &lt;a href="%s"&gt;link&lt;/a&gt;') % '')}
  4. ${_('%(size)s, DVD ISO disc image for %(arch)s-bit PC') % {'size':'3.1 GB', 'arch':'32'}}

Fist you have the simplest example. Then the markup that could be used everywhere (it works with embedded html code, not as the first one). Then, you have an example using a variable. That is really useful in order to avoid having translators to translate again the string when changing the variable. The last example is a most complete one which shows you how to deal with multiple variables. The translator will be able to change the variable order using it's name.

To test that you haven't missed anything (for example you need to escape the simple quote from the string), try with make en test in order to build the website for the en language.

Once it's correct, you need to generate the new translation template file (POT) with make pot.


All POs are download hourly. Any error should be reported to our tracking system.

Whenever the HTML content change, we need to update the POT as explained on the previous section. Then, we need to push this POT to the translation platform, This is done by the command make pushpot. But only the maintainers of the fedora-web release are able to push a new POT. Ask them if you need to do so. Please, open a new ticket.

If you need to add a new language, you need to update the LINGUAS file, the file, and the languages.conf file.

Here is the tree:

   |   |-- build
   |   |       --
   |   |-- httpd
   |   |       -- conf
   |   |              --
   |   -- po
   |        --LINGUAS

The script "" could be used to generate a new LINGUAS file as well as to upload a new POT and to backup the PO files. There is a redesign on going in order to automatize this, and have only one and files. This is ticket #90.

The Hot (comming) New Websites Arch

The idea is to have a different tree using a recursive make. The syncStatic script will have few changes. Like the following (not sure about the httpd folder)

  |   |-- build
  |   |-- data
  |   |-- httpd
  |   |-- Makefile
  |   |-- po
  |   -- static
  |-- build
  |-- Makefile
  |-- static
  |-- templates
  -- TODO

This is directly related to ticket #90. To help, get in touch with shaiton.

How to join/help

Joining the websites team is not very difficult and doesn't differ too much from the join procedure of the other Sub-Projects.
Obviously the best starting point is the join page, where you should follow the points step by step. PHP and Python skills are welcome, because our sites are build with HTML/CSS and the Genshi framework for internationalization as mentioned above.
It would be a good idea taking a look at the 960 grid system, because there are many divs in our sources.
First of all join the websites mailing list and send a self introduction.

To get started, you need also:

Clone the websites repository

  • Ensure you have the Package-x-generic-16.pnggit package and the Apache web server installed:
su -c 'yum shell'
> install git gettext python-genshi python-setuptools babel python-feedparser
> groupinstall 'Web Server'
> run
  • Set up at least your name and email address in your global git configuration:
git config --global "John Smith"
git config --global ""
git config --global color.ui auto
  • Make sure you are in a directory to which you have write access, such as your home directory or a subdirectory, and clone the websites repository. This takes several minutes on a fast connection.
cd $HOME
git clone git://
  • Change directory to the website you want to change. The repository carries several sites, including,, and others.
cd fedora-web/
  • You can make a fresh, new branch for your changes, or you can do your work against an existing branch of the fedora-web project. To make a fresh branch for your own use only ("mynewbranch" is a name you can choose):
git checkout -b mynewbranch

If you want to work on something that already exists as a branch on websites, like a redesign branch, you can set up your branch to track the changes on that branch. That allows you to build on the existing work without worrying about whether you're overwriting the existing team's work. For example, if you want to help with the "fpo-redesign" branch:

git checkout -b mynewbranch --track origin/fpo-redesign

Make your changes. It's best to make a set of related changes together, but don't make many unrelated changes at once. For instance, it's OK to make several spelling fixes together, but don't combine those with an additional navigation menu option.

Test your changes.


After the make completes successfully and the website will now be available in your /out/ directory. Now run a local sandbox test of the website:

make test

Point your web browser at http://localhost:5000 to view the sandbox site. When you are done viewing, stop the temporary web server:

make stoptest

If everything looks OK, stage the files you changed:

git add data/content/file1.html data/content/file2.html

Commit the staged changes:

git commit -m 'Fix spelling errors'

Sending in your changes

  • When you're done, create patch files for your changes:
git format-patch origin/master
  • Now you can send the patches you've created, which will have names such as 0001-my-change.patch, to the websites list or upload your patch to our track if you fixed a ticket.

Join the FAS Group

Log in at and join the websites group.

Work on tickets

Start working on open tickets, take a look also on the easyfix page.

Join IRC channel and Mailing List

Please ask if you have any doubts, writing to the Websites Mailing List or on IRC channel #fedora-websites, located on the freenode server.

Request sponsorship to the 'gitfedora-web' group

After you've done successfully your first changes and sent them as patch for the websites team, you can request sponsorhip to the 'gitfedora-web' group, which will allow you to commit to the fedora-web repository (where the website source code is at).