Sign in Join
FPDoc Onlineexperiment

TPOFile.FillItem procedure

Member of TPOFilepublicIn unit Translations

Stores argument values to the specified translation entry.

Declaration

pascal
procedure FillItem(var CurrentItem: TPOFileItem; Identifier: string; 
 Original: string; Translation: string; 
 Comments: string; Context: string; Flags: string; 
 PreviousID: string; LineNr: Integer=- 1)

Arguments

CurrentItem

TPOFileItem instance where the argument values are stored.

Identifier

Identifier (msgid) for the translation entry.

Original

Untranslated value (msgstr) for the message identifier.

Translation

Translated value for the entry.

Comments

Comments for the translation entry.

Context

Context (msgctxt) for the translation entry.

Flags

Comma-delimited list of flag values for the translation entry.

PreviousID

Previous (older) message identifier for the translation entry.

LineNr

Line number in the .po file for the first line in the translation entry.

Description

FillItem is a method used to store values passed in the specified arguments to the TPOFileItem instance in CurrentItem. If CurrentItem is Nil, a new TPOFileItem instance is created and used to stored the argument values. It is added to the Items in the class instance.

FillItem retrieves an existing TPOFileItem instance in Items and merges its properties into the values in CurrentItem. The value in CurrentItem is subsequently used to replace the translation entry in Items.

FillItem is used in methods like ReadPOText and UpdateItem in TPOFile.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.