Websites/workflow

From FedoraProject

< Websites(Difference between revisions)
Jump to: navigation, search
(i18n)
m (Actual used branches for each (sub)domain)
Line 104: Line 104:
 
| '''Domain''' ||'''Branch'''
 
| '''Domain''' ||'''Branch'''
 
|-
 
|-
| fedoraproject.org || master
+
| [http://fedoraproject.org fedoraproject.org] || master
 
|-
 
|-
| stg.fedoraproject.org || f19-alpha
+
| [http://stg.fedoraproject.org stg.fedoraproject.org] || f19-alpha
 
|-
 
|-
| spins.fedoraproject.org || master
+
| [http://spins.fedoraproject.org spins.fedoraproject.org] || master
 
|-
 
|-
| spins.stg.fedoraproject.org || f19-alpha
+
| [http://spins.stg.fedoraproject.org spins.stg.fedoraproject.org] || f19-alpha
 
|-
 
|-
| boot.fedoraproject.org || master
+
| [http://boot.fedoraproject.org boot.fedoraproject.org] || master
 
|-
 
|-
| fedoracommunity.org || master
+
| [http://fedoracommunity.org fedoracommunity.org] || master
 
|-
 
|-
| fedorahosted.org || master
+
| [http://fedorahosted.org fadorahosted.org] || master
 
|-
 
|-
| fedorapeople.org || master
+
| [http://fedorapeople.org fedorapeople.org] || master
 
|-
 
|-
| fudcon.fedoraproject.org || master
+
| [http://fudcon.fedoraproject.org fudcon.fedoraproject.org] || master
 
|-
 
|-
| mirrors.fedoraproject.org || master
+
| [http://start.fedoraproject.org start.fedoraproject.org] || master
|-
+
| serverbeach1.fedoraproject.org || master
+
|-
+
| start.fedoraproject.org || master
+
|-
+
| talk.fedoraproject.org || master
+
 
|-
 
|-
 
|}
 
|}
Line 153: Line 147:
 
| start.fedoraproject.org || [https://fedora.transifex.com/projects/p/fedora-web/resource/start-fedoraproject-org/ start.fedoraproject.org] || {{check}}
 
| start.fedoraproject.org || [https://fedora.transifex.com/projects/p/fedora-web/resource/start-fedoraproject-org/ start.fedoraproject.org] || {{check}}
 
|-
 
|-
 +
 
|}
 
|}
  

Revision as of 12:21, 4 March 2013

Contents


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 stg.fedoraproject.org and spins.stg.fedoraproject.org.

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

Coding

insert graph here

Architecture

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

   .
   |-- boot.fedoraproject.org
   |   |-- 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.

i18n

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;') % 'http://fedoraproject.org')}
  4. ${_('%(size)s, DVD ISO disc image for %(arch)s-bit PC') % {'size':'3.1 GB', 'arch':'32'}}
  5. ${Markup(_('If you think you\'ve found a bug, read <a href="%s">here</a> fist.') % ('http://fedoraproject.org/wiki/Common_F'+global_variables.release['prev_id']+'_bugs'))}

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.

Variables

As described in the examples above, you will note there are a lot of variables instead of hard codes. These variables have been set to make it easier to update our webpages. When merging from one branch to the next, i.e. from beta to final release, all the content of our pages can be updated by editing simply one single file, where all the variables are defined.
This file actually is used in the sites of fedoraproject.org and in spins.fedoraproject.org and in both cases is located in ~/build/globalvar.py

l10n

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, transifex.com. 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 translation.py file, and the languages.conf file.

Here is the tree:

   .
   |-- boot.fedoraproject.org
   |   |-- build
   |   |       `-- translations.py
   |   |-- httpd
   |   |       `-- conf
   |   |              `-- languages.conf.in
   |   `-- po
   |        `--LINGUAS
   `-- l10N_update.sh

The script "l10N_update.sh" 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 translation.py and languages.conf.in 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)

  .
  |-- boot.fedoraproject.org
  |   |-- 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.

Joining/helping

Please read the Websites/Join and How to fix bugs pages.

Actual used branches for each (sub)domain

This overview should help you to understand which git-branch is used to build a single subdomain or domain.
Usually the subdomains are build with master-branch, while the main fedoraproject domain and the spins are build with the 'release-state' branch.

Domain Branch
fedoraproject.org master
stg.fedoraproject.org f19-alpha
spins.fedoraproject.org master
spins.stg.fedoraproject.org f19-alpha
boot.fedoraproject.org master
fedoracommunity.org master
fadorahosted.org master
fedorapeople.org master
fudcon.fedoraproject.org master
start.fedoraproject.org master


The following table will show you which transifex resources are defined on each websites, and if the builder actually pull them. It should reflect the .tx/config file.

Website Transifex Resource Pulling
fedoraproject.org fedoraproject.org Checkmark.png
stg.fedoraproject.org fedoraproject.org Checkmark.png
spins.fedoraproject.org spins.fedoraproject.org Checkmark.png
spins.stg.fedoraproject.org spins.fedoraproject.org Checkmark.png
fudcon.fedoraproject.org fudcon.fedoraproject.org Checkmark.png
fudcon.stg.fedoraproject.org fudcon.fedoraproject.org Checkmark.png
start.fedoraproject.org start.fedoraproject.org Checkmark.png

Checkmark.png : Branched − the builder update the translations

Warning.png : Not branched − POs freezed, builder not pulling translations