ProcessMessageChanges Class Reference

Script for processing message changes in file based message groups. More...

List of all members.

Public Member Functions

 __construct ()

Protected Member Functions

 writeChanges ()
 processMessageGroup (FileBasedMessageGroup $group)
 processLanguage (FileBasedMessageGroup $group, $code)
 addMessageUpdateChanges (FileBasedMessageGroup $group, $code, $reason, $cache)
 This is the detective roman.
 addChange ($type, $group, $language, $key, $content)

Static Protected Member Functions

static compareContent ($a, $b)
 Compares two strings.

Protected Attributes

 $changes = array()
 $counter

Detailed Description

Script for processing message changes in file based message groups.

We used to process changes during web request, but that was too slow. With this command line script we can do all the work needed even if it takes some time.

Since:
2012-04-23

Definition at line 30 of file processMessageChanges.php.


Constructor & Destructor Documentation

ProcessMessageChanges::__construct (  ) 

Definition at line 38 of file processMessageChanges.php.


Member Function Documentation

ProcessMessageChanges::addChange ( type,
group,
language,
key,
content 
) [protected]

Definition at line 274 of file processMessageChanges.php.

Referenced by addMessageUpdateChanges().

Here is the call graph for this function:

ProcessMessageChanges::addMessageUpdateChanges ( FileBasedMessageGroup group,
code,
reason,
cache 
) [protected]

This is the detective roman.

We have three sources of information:

  • current message state in the file
  • current message state in the wiki
  • cached message state since cache was last build (usually after export from wiki) Now we must try to guess what in earth has driven the file state and wiki state out of sync. Then we must compile list of events that would bring those to sync. Types of events are addition, deletion, (content) change and possible rename in the future. After that the list of events are stored for later processing of a translation administrator, who can decide what actions to take on those events to bring the state more or less in sync.

Definition at line 180 of file processMessageChanges.php.

Referenced by processLanguage().

Here is the call graph for this function:

static ProcessMessageChanges::compareContent ( a,
b 
) [static, protected]

Compares two strings.

Since:
2012-05-08
Parameters:
string $a
string $b
Returns:
bool Whether two strings are equal

Definition at line 289 of file processMessageChanges.php.

ProcessMessageChanges::processLanguage ( FileBasedMessageGroup group,
code 
) [protected]

Definition at line 147 of file processMessageChanges.php.

Referenced by processMessageGroup().

Here is the call graph for this function:

ProcessMessageChanges::processMessageGroup ( FileBasedMessageGroup group  )  [protected]

Definition at line 133 of file processMessageChanges.php.

Here is the call graph for this function:

ProcessMessageChanges::writeChanges (  )  [protected]

Definition at line 113 of file processMessageChanges.php.

Here is the call graph for this function:


Member Data Documentation

ProcessMessageChanges::$changes = array() [protected]

Definition at line 31 of file processMessageChanges.php.

ProcessMessageChanges::$counter [protected]

Definition at line 36 of file processMessageChanges.php.


The documentation for this class was generated from the following file:
Generated on Tue Oct 29 00:00:51 2013 for MediaWiki Translate Extension by  doxygen 1.6.3