Scripts
[ class tree: Scripts ] [ index: Scripts ] [ all elements ]

Procedural File: client2pot.php

Source Location: /scripts/client2pot.php



Page Details:

client2pot.php - rips gettext strings from smarty template and client .ini

This command line script rips gettext strings from smarty file and .ini, and save one file per project. If file already exists, calls msgmerge.

Usage: ./client2pot.php

Original code was tsmarty2c.php written by Sagi Bashari <sagi@boom.org.il>




Tags:

author:  Yves Bolognini <yves.bolognini@camptocamp.com>


Includes:

require_once('./pot_tools.php') [line 24]





CARTOCLIENT_HOME [line 21]

CARTOCLIENT_HOME = realpath(dirname(__FILE__).'/..').'/'
Home dirs


[ Top ]



CARTOCLIENT_PODIR [line 22]

CARTOCLIENT_PODIR = CARTOCLIENT_HOME.'po/'

[ Top ]




do_dir [line 91]

void do_dir( string $dir, string $project, array &$texts, array &$plurals)

Goes through a directory



Parameters

string   $dir  
string   $project   project name or 'default'
array   &$texts   map text_to_translate => references
array   &$plurals   map of texts plurals
[ Top ]



do_file [line 56]

void do_file( string $file, array &$texts, array &$plurals)

Rips gettext strings from $file and prints them in POT format



Parameters

string   $file  
array   &$texts   map text_to_translate => references
array   &$plurals   map of texts plurals
[ Top ]



fs [line 43]

string fs( string $str)

"Fix" string - strip slashes, escape and convert new lines to \n



Parameters

string   $str  
[ Top ]



parseIni [line 133]

boolean parseIni( string $project, array &$texts)

Parses an INI file looking for variable ending with '.label'



Parameters

string   $project  
array   &$texts   map text_to_translate => references
[ Top ]



Documentation generated on Wed, 6 Apr 2005 12:06:29 +0200 by phpDocumentor 1.3.0RC3