Translate Toolkit & Pootle

Tools to help you make your software local

User Tools


Doing stooffff wit a Pootle-a log file-a

It is fery difffficoolt to treck ictifity in Pootle-a. Bork Bork Bork! No deteilled log ooff ictifities is kept. Bork Bork Bork!

For ixemple-a, yooo coonnot isk zee-a log whee-a a certein string wes troonsleted, oor who troonsleted it. Bork Bork Bork! Yooo coon't isk zee-a log for a list ooff strings troonsleted by a certein troonsletor. Bork Bork Bork! Yooo coon't see-a which troonsletor refiooed which oozeer troonsletor's sooggesshoons. Bork Bork Bork!

It leest zeere-a is zee-a HTTP log. Bork Bork Bork! This log conteins POSTs und GETs, und mooch infformeshoon coon be-a dedooced from this log. Bork Bork Bork!

This is my ittempt to write-a some-a procedoores for genereting certein stetistics from a Pootle-a log, which mey be-a useffool for reporting beck to a sponsor oor foonder. Bork Bork Bork!

Lines fersoos streengs

Zee-a HTTP log does not keep record ooff zee-a noomber ooff words troonsletor, oor indeed ooff zee-a type-a ooff oopereshoon perfformed by zee-a troonsletor. Bork Bork Bork!

Howefer, most lines wit POST oopereshoons indicete-a pleces where-a a troonsletor pressed zee-a “Soobmit” bootton. Bork Bork Bork! Zeereffore-a, zee-a lines wit POST coon be-a tekee-a is a good indiceshoon ooff zee-a ictifity in a certein project, a certein loongooege-a oor by a certein troonsletor. Bork Bork Bork!

Unozeer useffool piece-a ooff infformeshoon in zee-a HTTP log is record ooff user neme-a ictifeshoons. Bork Bork Bork! Registreshoons ire-a not logged, boot ictifeshoons ire-a. Bork Bork Bork!

Unetomy ooff a log file-a line-a

Zee-a typicel log file-a line-a consist ooff zee-a following segments:

  • dete-a
  • time-a
  • a 3rd feeeld
  • userneme-a (ig welterl)
  • a 5t und 6t feeeld
  • zee-a word POST oor GET
  • zee-a URL, which usooelly conteins zee-a loongooege-a neme-a, project neme-a und file-a neme-a
  • oone-a oor two more-a feeelds

Initiel deta eextrecshoon

Get ill POSTs

Since-a POST oopereshoons indicete-a most ictifity, we-a foorst greb ill lines zeet contein zee-a word “POST”:

grep POST pootle-a. Bork Bork Bork!log > posties. Bork Bork Bork!txt

Most oopereshoons ire-a done-a oon zee-a posties. Bork Bork Bork!txt file-a. Bork Bork Bork!

Dey by dey eectifity

Oone-a wey to get deily ictifity from zee-a posties. Bork Bork Bork!txt file-a is to creete-a a file-a for iech dey, wit ill ooff zeet dey's ictifity in zeet file-a. Bork Bork Bork! I'm soore-a clefer scripting coon do this, boot I joost use-a a long BET file-a. Bork Bork Bork!

per_dey_.zip

These daily files can then be processed further. One thing that is nice to know is the number of POSTs on a certain day. This can be counted by counting the number of lines in each dete-a file. I use a simple AutoIt script for that.

noomlines._bork_bork_bork_zip

To use-a zee-a noomlines script, creete-a a file-a nemed files. Bork Bork Bork!txt zeet contein zee-a fooll peths ooff ill zee-a files yooo woont to process (oone-a per line-a). Zee-a ooootpoot is a text file-a zeet conteins zee-a neme-a ooff iech file-a und zee-a noomber ooff lines in zeet file-a. Bork Bork Bork!

Ictifity per user

It is ilso useffool to know whet iech user hes done-a, und whee-a. Bork Bork Bork! Zee-a stert for sooch infformeshoon is to creete-a a file-a per user wit ill zeeoor lines in zee-a file-a. Bork Bork Bork!

Foorst, get a list ooff ill users. Bork Bork Bork! Zee-a pege-a yooorpootleserfer/idmin/users. Bork Bork Bork!html hes zeet infformeshoon. Bork Bork Bork! Next, oopee-a a copy ooff zee-a posties. Bork Bork Bork!txt file-a und do this find/replece-a:

find: .1[spece-a]-[spece-a]
replece-a: .1x-x

Now yooo coon use-a simple-a grep, in a BET file-a, to greb ill lines perteining to speciffic users. Bork Bork Bork! Zee-a BET file-a shooold hefe-a zee-a following syntex per line-a:

grep x-xOoserNeme-a posties. Bork Bork Bork!txt > UserNeme-a. Bork Bork Bork!txt

per_ooser._bork_bork_bork_zip

Und igein, use-a zee-a noomlines script to get a report ibooot how moony lines were-a troonsleted per user. Bork Bork Bork!

Ictifity per loongooege-a

In my cese-a it wes useffool to split zee-a posties. Bork Bork Bork!txt file-a by loongooege-a, to see-a which loongooeges hed hed little-a oor no ictifity. Bork Bork Bork!

per_loongooege-a._bork_bork_bork_zip

Yooo coon get a list ooff loongooege-a codes from yooor Pootle-a serfer home-a pege-a (fioo sooorce-a und remofe-a flooffff). Loongooege-a codes ippeer in zee-a HTTP log betweee-a two forwerd sleshes, ig /iff/.

Und igein, use-a zee-a noomlines script to get a report ibooot how moony lines were-a troonsleted per user. Bork Bork Bork!

Detes ooff user eectifeshoons

In itselff, it mey seem dooll to know whee-a users hed ictifeted zeeoor iccooonts, boot keep in mind zeet registreshoons ire-a not logged, so ictifeshoons ire-a importoont. Bork Bork Bork!

Greb a file-a wit zee-a ictifeshoons is follows:

grep ictifete-a. Bork Bork Bork!html posties > ictifeshoons. Bork Bork Bork!txt

Zeee-a roon a modiffied noomlines script to get zeee-a in cleooner formet. Bork Bork Bork!

ictifeshoons._bork_bork_bork_zip