Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > e4bbdaa133bf14de79621d7fdfa39df4 > files > 135

transifex-0.9.1-1.fc13.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Running Transifex &mdash; Transifex v0.9.1 documentation</title>
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '0.9.1',
        COLLAPSE_MODINDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="Transifex v0.9.1 documentation" href="../index.html" />
    <link rel="up" title="Getting started" href="index.html" />
    <link rel="next" title="Credits" href="credits.html" />
    <link rel="prev" title="Installation Guide" href="install.html" /> 
  </head>
  <body>

    <div class="document">
  <div id="custom-doc" class="yui-t6">
    <div id="hd">
      <h1><a href="../index.html">Transifex v0.9.1 documentation</a></h1>
      <div id="global-nav">
        <a title="Home page" href="../index.html">Home</a>  |
        <a title="Table of contents" href="../contents.html">Table of contents</a>  |
        <a title="Global index" href="../genindex.html">Index</a>  |
        <a title="Search" href="../modindex.html">Modules</a>
      </div>
      <div class="nav">
    &laquo; <a href="install.html" title="Installation Guide">previous</a> 
     |
    <a href="../contents.html" title="Table of Contents" accesskey="U">up</a>
   |
    <a href="credits.html" title="Credits">next</a> &raquo;</div>
    </div>
    
    <div id="bd">
      <div id="yui-main">
        <div class="yui-b">
          <div class="yui-g" id="intro-running">
            
  <div class="section" id="running-transifex">
<span id="intro-running"></span><h1>Running Transifex<a class="headerlink" href="#running-transifex" title="Permalink to this headline">¶</a></h1>
<p>At this point you probably have Transifex up and running, probably with some
initial data. This section will help you with some common tasks around how to
run and customize Transifex.</p>
<div class="section" id="customizing-your-transifex-instance">
<h2>Customizing your Transifex instance<a class="headerlink" href="#customizing-your-transifex-instance" title="Permalink to this headline">¶</a></h2>
<div class="section" id="administrator-accounts">
<h3>Administrator accounts<a class="headerlink" href="#administrator-accounts" title="Permalink to this headline">¶</a></h3>
<p>Admin users are able to login to Transifex&#8217;s admin panel, at <tt class="docutils literal"><span class="pre">/admin/</span></tt> and
have full control over the whole website content. If you haven&#8217;t created one
in the steps above, you can do so as follows:</p>
<div class="highlight-python"><pre>$ python manage.py createsuperuser
Username (Leave blank to use 'mits'): myadminuser
E-mail address: admin@example.com
Password:
Password (again):
Superuser created successfully.</pre>
</div>
</div>
<div class="section" id="site-domain-and-name">
<h3>Site Domain and Name<a class="headerlink" href="#site-domain-and-name" title="Permalink to this headline">¶</a></h3>
<p>Transifex leverages the power of Django&#8217;s <a class="reference external" href="http://docs.djangoproject.com/en/dev/ref/contrib/sites">Sites</a> framework to make it easy
to have instances of Transifex on differnet domains using the same models
and database.</p>
<p>If you have imported the sample data, a single website is created in the
database called &#8216;example.com&#8217;. If you haven&#8217;t, you&#8217;ll need to create it.</p>
<p>This value is used in a number of places, including emails sent by the system.
You can edit or create your default website in two ways:</p>
<ul>
<li><p class="first">Using the <a class="reference external" href="http://www.djangobook.com/en/1.0/chapter06/">Django admin panel</a>: By default Transifex comes with a handy
admin panel. This is mounted by default at <tt class="docutils literal"><span class="pre">/admin/</span></tt> (this value can be
changed from your settings file).</p>
<p>Login to the admin panel using the credentials you created during the
database creation step, and navigate to the <tt class="docutils literal"><span class="pre">Sites</span></tt> model. There, you can
either edit the default site or create your own.</p>
</li>
<li><p class="first">Alternatively, you may use the command line:</p>
<div class="highlight-pycon"><div class="highlight"><pre><span class="go">$ cd transifex</span>
<span class="go">$ python manage.py shell</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">django.contrib.sites.models</span> <span class="kn">import</span> <span class="n">Site</span>

<span class="gp">&gt;&gt;&gt; </span><span class="c"># To edit the existing one:</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">current_site</span> <span class="o">=</span> <span class="n">Site</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">get_current</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">current_site</span><span class="o">.</span><span class="n">domain</span> <span class="o">=</span> <span class="s">&#39;mydomain.com&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">current_site</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s">&#39;Transifex&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">current_site</span><span class="o">.</span><span class="n">save</span><span class="p">()</span>

<span class="gp">&gt;&gt;&gt; </span><span class="c"># To create your own:</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">s</span> <span class="o">=</span> <span class="n">Site</span><span class="p">(</span><span class="n">domain</span><span class="o">=</span><span class="s">&#39;mydomain.com&#39;</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s">&#39;Transifex&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">s</span><span class="o">.</span><span class="n">save</span><span class="p">()</span>
</pre></div>
</div>
</li>
</ul>
<p>You can now proceed to the next section to import some data, or read about
managing your instance right away.</p>
</div>
<div class="section" id="user-interface">
<h3>User Interface<a class="headerlink" href="#user-interface" title="Permalink to this headline">¶</a></h3>
<p>The default Transifex interface lives in the <tt class="docutils literal"><span class="pre">templates</span></tt> directory and can
be customized at will.</p>
<p>You can also customize the theme by copying this directory to a differnet
location and updating the <tt class="docutils literal"><span class="pre">TEMPLATE_DIR</span></tt> setting with this new location.</p>
<p>Finally, Django supports multiple locations of template source files, which it
searches in order. Instead of copying the entire template directory, you can
simply copy particular files you&#8217;d like to override and define the
<tt class="docutils literal"><span class="pre">TEMPLATE_DIR</span></tt> setting as a tuple in the order you&#8217;d like the directories
to be searched (first entry takes preference over second, etc).</p>
</div>
<div class="section" id="automating-statistics-generation">
<h3>Automating statistics generation<a class="headerlink" href="#automating-statistics-generation" title="Permalink to this headline">¶</a></h3>
<p>As mentioned before, the command <tt class="docutils literal"><span class="pre">./manage.py</span> <span class="pre">txstatsrefresh</span></tt> is responsible
for updating all the statistics of your instance. It pulls new changesets from
VCS-type projects, msgmerge the PO files with the POT, and calculates
translation compeletion statistics.</p>
<p>This command is usually used in a cronjob to refresh Transifex&#8217;s cache and
translation statistics every once in a while for translators. Here&#8217;s a sample
cronjob for your pleasure:</p>
<div class="highlight-python"><pre>$ crontab -l
SHELL=/bin/bash
MAILTO=admin
0 3,15 * * * python &lt;TxPath&gt;&gt;/transifex/manage.py txstatsrefresh --skip &gt; \
/var/log/transifex/"txstatsrefresh.out.$(date +\%F_\%k).log"</pre>
</div>
</div>
</div>
<div class="section" id="setting-up-submissions">
<h2>Setting up Submissions<a class="headerlink" href="#setting-up-submissions" title="Permalink to this headline">¶</a></h2>
<p>Now you should be able to add your own projects and present
translation completion statistics for them. This applies if you have added your
repositories over protocols which do not require authentication, such as
<tt class="docutils literal"><span class="pre">http</span></tt>, <tt class="docutils literal"><span class="pre">git</span></tt> and so on.</p>
<p>You&#8217;ll also be able to submit files to these repositories, if they support
anonymous pushing. But since most repositories require authentication for
pushing, you can setup Transifex to also be able to use the <tt class="docutils literal"><span class="pre">ssh</span></tt> for
communicating with versioning systems.</p>
<p>To push over ssh, you&#8217;ll need <strong>ssh-agent</strong> an SSH keypair: the private key
will be on the Transifex server and the public key on the remote server to
which Tx will ssh to.</p>
<p>To create the SSH keypairs, just run <tt class="docutils literal"><span class="pre">ssh-keygen</span></tt>. The public key should be
put in the <tt class="docutils literal"><span class="pre">~/.ssh/</span></tt> directory of the remote system, and the private key
in <tt class="docutils literal"><span class="pre">~/.ssh/</span></tt> of the local system, where <tt class="docutils literal"><span class="pre">~</span></tt> is the home directory of the
user Transifex is run as.</p>
<p>You can hook-up <tt class="docutils literal"><span class="pre">ssh-agent</span></tt> with Transifex in the usual way: The simple way
is firing up the agent, then <tt class="docutils literal"><span class="pre">ssh-add</span></tt> the keys and run your webserver in
that environment. This basically allows Transifex to run with the appropriate
environment variables setup (basically, it&#8217;s the <tt class="docutils literal"><span class="pre">SSH_AUTH_SOCK</span></tt>. In a
production environment, all you need is to run Transifex with the necessary
environment variable set, and ssh should work.</p>
<div class="section" id="testing-submissions">
<h3>Testing submissions<a class="headerlink" href="#testing-submissions" title="Permalink to this headline">¶</a></h3>
<p>First of all, test the access of the SSH key: Ride your agent by setting up
<tt class="docutils literal"><span class="pre">SSH_AUTH_SOCK</span></tt> and try a connection to the remote SSH machine (the following
will differ in your case):</p>
<div class="highlight-python"><pre>export SSH_AUTH_SOCK=/tmp/keyring-qse2vh/ssh
hg clone ssh://example.com/myrepo</pre>
</div>
<p>If the above clone succeeds, ssh access work for this project. If you have
certain ACLs on the server, you might also need to test push support by
issuing a dummy commit on a file in your repo:</p>
<div class="highlight-python"><pre>echo ' ' &gt;&gt; myfile
hg commit -m 'Testing Transifex access -- please ignore!"
hg push</pre>
</div>
<p>To test an SSH submission through Transifex, create a project and component
which uses ssh as the protocol. Enable submissions on the <em>Edit Component</em> page,
<em>Submissions</em> tab. Then click on <em>Refresh Stats</em>. It should take some time and
then present some nice charts on the page.</p>
</div>
</div>
</div>


      <div class="nav">
    &laquo; <a href="install.html" title="Installation Guide">Installation Guide</a> 
     |
    <a href="../contents.html" title="Table of Contents" accesskey="U">up</a>
   |
    <a href="credits.html" title="Credits">Credits</a> &raquo;</div>
          </div>         
        </div>
      </div>
      
          <div class="yui-b" id="sidebar">
            
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../index.html">
              <img class="logo" src="../_static/transifex-logo.png" alt="Logo"/>
            </a></p>
            <h3><a href="../index.html">Table Of Contents</a></h3>
            <ul>
<li><a class="reference external" href="#">Running Transifex</a><ul>
<li><a class="reference external" href="#customizing-your-transifex-instance">Customizing your Transifex instance</a><ul>
<li><a class="reference external" href="#administrator-accounts">Administrator accounts</a></li>
<li><a class="reference external" href="#site-domain-and-name">Site Domain and Name</a></li>
<li><a class="reference external" href="#user-interface">User Interface</a></li>
<li><a class="reference external" href="#automating-statistics-generation">Automating statistics generation</a></li>
</ul>
</li>
<li><a class="reference external" href="#setting-up-submissions">Setting up Submissions</a><ul>
<li><a class="reference external" href="#testing-submissions">Testing submissions</a></li>
</ul>
</li>
</ul>
</li>
</ul>

  <h3>Browse</h3>
  <ul>
    
      <li>Prev: <a href="install.html">Installation Guide</a></li>
    
    
      <li>Next: <a href="credits.html">Credits</a></li>
    
  </ul>
  <h3>You are here:</h3>
  <ul>
      <li>
        <a href="../index.html">Transifex v0.9.1 documentation</a>
        
          <ul><li><a href="../contents.html">Table of Contents</a>
        
          <ul><li><a href="index.html">Getting started</a>
        
        <ul><li>Running Transifex</li></ul>
        </li></ul></li></ul>
      </li>
  </ul>  

            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="../_sources/intro/running.txt"
                     rel="nofollow">Show Source</a></li>
            </ul>
          <div id="searchbox" style="display: none">
            <h3>Quick search</h3>
              <form class="search" action="../search.html" method="get">
                <input type="text" name="q" size="18" />
                <input type="submit" value="Go" />
                <input type="hidden" name="check_keywords" value="yes" />
                <input type="hidden" name="area" value="default" />
              </form>
              <p class="searchtip" style="font-size: 90%">
              Enter search terms or a module, class or function name.
              </p>
          </div>
          <script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
              <h3>Last update:</h3>
              <p class="topless">Sep 24, 2010</p>
          </div> 
      
    </div>
    
    <div id="ft">
      <div class="nav">
    &laquo; <a href="install.html" title="Installation Guide">previous</a> 
     |
    <a href="../contents.html" title="Table of Contents" accesskey="U">up</a>
   |
    <a href="credits.html" title="Credits">next</a> &raquo;</div>
    </div>
  </div>

      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy; Copyright <a href="http://www.indifex.com">Indifex</a> and the <a href="http://transifex.org/">Transifex</a> Community.
      Last updated on Sep 24, 2010 using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
    </div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-4362397-5");
pageTracker._trackPageview();
} catch(err) {}</script>
  </body>
</html>