« lib/Serge/Engine/Plugin/Base/Transform.pm
↑ Summary
lib/Serge/Sync/Plugin/Base/TranslationService.pm »
| 1 | package Serge::Engine::Plugin::Base::Serializer; | ||
| 2 | 2 | ▶ | use parent Serge::Plugin::Base::Callback; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | |||
| 4 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | # serialize takes the following parameters: | ||
| 7 | # $units -- an array of hashes that store unit data | ||
| 8 | # $file -- relative file name | ||
| 9 | # $lang -- target language | ||
| 10 | # and produces a serialized representation of translation file; | ||
| 11 | # each hash item in the array represents a translation unit containing | ||
| 12 | # a set of recognized fields like 'source', 'target', 'comment', 'fuzzy' | ||
| 13 | # | ||
| 14 | # virtual method, implementation must be provided in child classes | ||
| 15 | sub serialize { | ||
| 16 | 0 | ▶ | my ($self, $units, $file, $lang) = @_; |
|
Subroutine
serialize: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 17 | 0 | die "Please define your serialize method"; | |
| 18 | } | ||
| 19 | |||
| 20 | # deserialize takes text representation of a transaltion file | ||
| 21 | # and returns an array of hashes (see `serialize` method above) | ||
| 22 | # | ||
| 23 | # virtual method, implementation must be provided in child classes | ||
| 24 | sub deserialize { | ||
| 25 | 0 | ▶ | my ($self, $textref) = @_; |
|
Subroutine
deserialize: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 26 | 0 | die "Please define your deserialize method"; | |
| 27 | } | ||
| 28 | |||
| 29 | 2 | 1; | |