TPOFile.UpdateItem procedure
Adds or updates a translation entry which has the specified Identifier.
Declaration
procedure UpdateItem(const Identifier: string; const Original: string;
const Flags: string='';
const ProcessingTranslation: Boolean=False)Arguments
Identifier | Identifier (msgid) for the translation entry. |
Original | Untranslated value for the specified identifier. |
Flags | Optional comma-delimited list of flags for the translation entry. |
ProcessingTranslation |
Description
UpdateItem is a method used to update a translation entry in Items
with the msgid specified in the
Identifier argument. It stores the
values from the Identifier,
Original, and
Flags
arguments to the
TPOFileItem instance. If a translation entry with
the specified identifier is not found in Items (POItems), it is added.
The ProcessingTranslation argument indicates whether values in the
Flags argument are synchronized to the values in the TPOFileItem instance.
When set to True, the "fuzzy" flag value in the POItems entry is
retained and merged with the new Flag values.
UpdateItem calls the FillItem method to validate and apply the updated translation entry to the TPOFileItem instance in Items.
UpdateItem is used in methods like UpdateStrings and UpdateTranslation in TPOFile.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
