ChangeSyncer Class Reference

Simple external changes syncer and conflict resolution. More...

List of all members.

Public Member Functions

 __construct (MessageGroup $group)
 setProgressCallback ($callback)
 getTimestampsFromSvn ($file)
 Fetch last changed timestamp for a versioned file for conflict resolution.
 getTimestampsFromGit ($file)
 Fetch last changed timestamp for a versioned file for conflict resolution.
 getTimestampsFromFs ($file)
 Fetch last changed timestamp for any file for conflict resolution.
 checkConflicts ($code, $startTs=false, $endTs=false, $changeTs=false)
 Do some conflict resolution for translations.
 color ($color, $text)
 Colors text for shell output.
 getLastGoodChange ($title, $startTs=false)
 Try to identify when the translation was last changed in the wiki.
 import ($title, $translation, $comment)
 Does the actual edit.

Public Attributes

 $norc = false
 $interactive = true
 $nocolor = false

Protected Member Functions

 reportProgress ($text, $channel, $severity= 'status')

Protected Attributes

 $progressCallback
 $group

Detailed Description

Simple external changes syncer and conflict resolution.

Definition at line 202 of file sync-group.php.


Constructor & Destructor Documentation

ChangeSyncer::__construct ( MessageGroup group  ) 
Parameters:
MessageGroup $group Message group to synchronise. can be relayed back.

Definition at line 222 of file sync-group.php.


Member Function Documentation

ChangeSyncer::checkConflicts ( code,
startTs = false,
endTs = false,
changeTs = false 
)

Do some conflict resolution for translations.

Parameters:
string $code Language code.
bool|int $startTs Time of the last export (changes in wiki after this will conflict)
bool|int $endTs Time of the last export (changes in source before this won't conflict)
bool|int $changeTs When change happened in the source.

Definition at line 308 of file sync-group.php.

Here is the call graph for this function:

ChangeSyncer::color ( color,
text 
)

Colors text for shell output.

Parameters:
string $color Either blue, green or bold.
string $text
Returns:
string

Definition at line 436 of file sync-group.php.

Referenced by checkConflicts().

ChangeSyncer::getLastGoodChange ( title,
startTs = false 
)

Try to identify when the translation was last changed in the wiki.

Parameters:
Title $title Title of the page which contains translation.
int|bool $startTs Timestamp how far back to go before giving up.
Returns:
int|bool Timestamp or false.

Definition at line 455 of file sync-group.php.

Referenced by checkConflicts().

ChangeSyncer::getTimestampsFromFs ( file  ) 

Fetch last changed timestamp for any file for conflict resolution.

Parameters:
string $file Filename with full path.
Returns:
string Timestamp or false.

Definition at line 289 of file sync-group.php.

ChangeSyncer::getTimestampsFromGit ( file  ) 

Fetch last changed timestamp for a versioned file for conflict resolution.

Parameters:
string $file Filename with full path.
Returns:
string|bool Timestamp or false.

Definition at line 272 of file sync-group.php.

ChangeSyncer::getTimestampsFromSvn ( file  ) 

Fetch last changed timestamp for a versioned file for conflict resolution.

Parameters:
string $file Filename with full path.
Returns:
string Timestamp or false.

Definition at line 244 of file sync-group.php.

ChangeSyncer::import ( title,
translation,
comment 
)

Does the actual edit.

Parameters:
Title $title
string $translation
string $comment Edit summary.

Definition at line 484 of file sync-group.php.

Here is the call graph for this function:

ChangeSyncer::reportProgress ( text,
channel,
severity = 'status' 
) [protected]
See also:
Maintenance::output for param docs

Definition at line 231 of file sync-group.php.

Referenced by checkConflicts(), and import().

ChangeSyncer::setProgressCallback ( callback  ) 

Definition at line 226 of file sync-group.php.


Member Data Documentation

ChangeSyncer::$group [protected]

Definition at line 216 of file sync-group.php.

ChangeSyncer::$interactive = true

Definition at line 210 of file sync-group.php.

ChangeSyncer::$nocolor = false

Definition at line 213 of file sync-group.php.

ChangeSyncer::$norc = false

Definition at line 207 of file sync-group.php.

ChangeSyncer::$progressCallback [protected]

Definition at line 204 of file sync-group.php.


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