The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Changes for version 1.4

  • Support `--lang` parameter in `serge pull-ts` and `serge push-ts` (gives an ability to specify one or more languages which should be synchronized with the translation service). Previously this parameter worked only for `serge sync` and `serge localize` and only affected the localization step.
  • Properly handle `leave_untranslated_blank` job option in .properties, .ts, .rrc and .strings parsers (previously this option wouldn't affect untranslated strings in the generated localized files leaving source string values instead).
  • POT parser can now generate compiled .mo files in addition to producing localized .po files.
  • Make Serge installable via `./Build install`
  • Git plugin now always uses `reset --hard` instead of `rebase` when doing updates so that it can recover from history rewrites on a remote server.
  • Better error reporting when spawning child processes.
  • `output_default_lang_file` config setting now works correctly with the `limit_languages` plugin. Additionally, the list of target languages is now de-duplicated and sorted before job runs.
  • Implemented cache eviction optimizations to make sure the process uses less memory on large databases.
  • Implemented four different caching strategies ('db', 'namespace', 'file', and 'string') that can be set with SERGE_DB_CACHING_STRATEGY environment variable. The more granular the level, the less memory Serge uses, at the potential expense of longer execution time. The default is 'db', which is backward-compatible with the old behavior where the entire database would be cached in memory.
  • `add_dev_comment` callback is now deprecated in favor of `add_hint` callback which provides more parameters than the old one.
  • New `keys_language` plugin that allows one to generate globally unique keys in place of translation. An ability to uniquely address any string opens possibilities for some advanced techniques like dynamic localization and integration with external tools.
  • parse_ts parser improved to support proper string literal escaping/unescaping, which now supports sequences like \NNN, \xNN, \uNNNN, \u{NNNNN}. \n and \t sequences are properly converted to raw line breaks and tabulation symbols, respectively.
  • parse_master can now be configured to use custom opening/closing markers and delimiters.
  • Added feature branch config generator tool (see `bin/tools/feature-branch-config-generator` folder for the tool itself, examples and documentation). This tool scans your Git repository, determines the list of actively maintained branches that match the provided name masks, and generates a Serge config to localize all these branches based on the provided config template.
  • `if` plugin can now capture content using regular expressions and keep it around for child plugin classes, as well as use them in test statements (`has_capture`, `has_no_capture`, `has_all_captures`). `append_hint_message` plugin can now replace `%CAPTURE:...%` macros with the values of such captures. This is useful, for example, to extract a specific string from the header of the source file and expose it as a hint (comment) in all translation units.
  • Net::SMTP is now used instead of deprecated Net::SMTP::SSL.
  • An ability to use XLIFF 1.2 as a translation interchange format added (previously the only supported interchange format was .po). Using XLIFF for translation might come in handy when working with certain CAT tools or online services.
  • Added `rewrite_relative_ts_file_path` and `rewrite_absolute_ts_file_path` phases that allow one to manipulate TS file names with plugins.
  • Added `after_serialize_ts_file` and `before_deserialize_ts_file` phases that allow one to manipulate the translation interchange file contents.
  • Added `apply_xslt` plugin, which allows one to apply XSLT transformations to source or target XML resource files, as well as XLIFF translation interchange files.
  • Split `pootle` and `zing` translation plugins for better clarity.
  • Git sync plugin now supports 'fetch_params', `commit_params` and `push_params` configuration parameters in addition to a previously existed `clone_params`. This allows one to pass extra parameters to `git` during different stages of its work. This is useful for e.g. shallow cloning and fetching, or for bypassing commit and push hooks.
  • Improved `transform` plugin logic to make trailing punctuation detection more smart when it is combined with wrapper tags. It also deals better with whitespace, reducing the list of candidates to guess transformations for.
  • `transform` plugin now always returns guessed translations as fuzzy; its previous configuration parameters (`as_fuzzy_default`, `as_fuzzy` and `as_not_fuzzy`) are now deprecated. You will see a corresponding notice in the command line output if you still have these parameters in your configuration file.
  • Fixed a bug where `reuse_orphaned` job parameter would not be passed down to the code that expected it, which resulted in not reusing orphaned translations in the `transform` plugin.
  • Refactored `feature_branch` plugin to more accurately reuse master branch translations in dependent branches. This required to selectively disable optimizations when localizing master files, so handling localization with `feature_branch` might become a bit slower.
  • `parse_keyvalue` plugin now exports keys explicitly (in addition to extracting them as translation hints).
  • Added support for `use_keys_as_context` job parameter (#89).
  • Added new `show` command to display expanded .serge configurations (#40).
  • Miscellaneous smaller fixes and improvements.

Documentation

Clear all merge flags from the database.
Migrate data between translation databases
Feature branch config generator.
Run transformation plugin against the given string.
Normalizes leading/trailing whitespaces for all translations in the database
Delete orphaned translation files
Generate HTML docs from POD
Show help on Serge and its commands
Import translations from already existing resource files
Perform localization cycle
Pull translation files from translation server
Pull project files from source control
Push translation files to translation server
Push project files to source control
Show expanded version of a configuration file
Perform a full synchronization + localization cycle
Test parser against any given file
Serge command launcher

Modules

Solution for continuous localization

Provides

in lib/Serge/Application.pm
in lib/Serge/Command.pm
in lib/Serge/Command/clean_ts.pm
in lib/Serge/Command/gendocs.pm
in lib/Serge/Command/help.pm
in lib/Serge/Command/import.pm
in lib/Serge/Command/show.pm
in lib/Serge/Command/sync.pm
in lib/Serge/Command/test_parser.pm
in lib/Serge/Config.pm
in lib/Serge/Config/Collector.pm
in lib/Serge/DB.pm
in lib/Serge/DB/Cached.pm
in lib/Serge/Engine.pm
in lib/Serge/Engine/Job.pm
in lib/Serge/Engine/Plugin/Base/Parser.pm
in lib/Serge/Engine/Plugin/Base/Serializer.pm
in lib/Serge/Engine/Plugin/Base/Transform.pm
in lib/Serge/Engine/Plugin/Transform/case.pm
in lib/Serge/Engine/Plugin/Transform/endpunc.pm
in lib/Serge/Engine/Plugin/Transform/tags.pm
in lib/Serge/Engine/Plugin/Transform/whitespace.pm
in lib/Serge/Engine/Plugin/Transform/wrappertag.pm
in lib/Serge/Engine/Plugin/append_hint_message.pm
in lib/Serge/Engine/Plugin/apply_xslt.pm
in lib/Serge/Engine/Plugin/completeness.pm
in lib/Serge/Engine/Plugin/control_commands.pm
in lib/Serge/Engine/Plugin/feature_branch.pm
in lib/Serge/Engine/Plugin/if.pm
in lib/Serge/Engine/Plugin/keys_language.pm
in lib/Serge/Engine/Plugin/limit_languages.pm
in lib/Serge/Engine/Plugin/metaparser.pm
in lib/Serge/Engine/Plugin/parse_android.pm
in lib/Serge/Engine/Plugin/parse_bypass.pm
in lib/Serge/Engine/Plugin/parse_chrome_json.pm
in lib/Serge/Engine/Plugin/parse_csv.pm
in lib/Serge/Engine/Plugin/parse_dtd.pm
in lib/Serge/Engine/Plugin/parse_go.pm
in lib/Serge/Engine/Plugin/parse_hash.pm
in lib/Serge/Engine/Plugin/parse_js.pm
in lib/Serge/Engine/Plugin/parse_json.pm
in lib/Serge/Engine/Plugin/parse_json_keyvalue.pm
in lib/Serge/Engine/Plugin/parse_key_space_value.pm
in lib/Serge/Engine/Plugin/parse_keyvalue.pm
in lib/Serge/Engine/Plugin/parse_master.pm
in lib/Serge/Engine/Plugin/parse_php_xhtml.pm
in lib/Serge/Engine/Plugin/parse_plist.pm
in lib/Serge/Engine/Plugin/parse_pot.pm
in lib/Serge/Engine/Plugin/parse_properties.pm
in lib/Serge/Engine/Plugin/parse_rc.pm
in lib/Serge/Engine/Plugin/parse_resx.pm
in lib/Serge/Engine/Plugin/parse_rrc.pm
in lib/Serge/Engine/Plugin/parse_strings.pm
in lib/Serge/Engine/Plugin/parse_ts.pm
in lib/Serge/Engine/Plugin/parse_wxl.pm
in lib/Serge/Engine/Plugin/parse_xliff.pm
in lib/Serge/Engine/Plugin/parse_xml.pm
in lib/Serge/Engine/Plugin/parse_yaml.pm
in lib/Serge/Engine/Plugin/process_if.pm
in lib/Serge/Engine/Plugin/replace_strings.pm
in lib/Serge/Engine/Plugin/run_command.pm
in lib/Serge/Engine/Plugin/serialize_csv.pm
in lib/Serge/Engine/Plugin/serialize_po.pm
in lib/Serge/Engine/Plugin/serialize_xliff.pm
in lib/Serge/Engine/Plugin/test_language.pm
in lib/Serge/Engine/Plugin/trademarks.pm
in lib/Serge/Engine/Plugin/transform.pm
in lib/Serge/Engine/Processor.pm
in lib/Serge/FindFiles.pm
in lib/Serge/Importer.pm
in lib/Serge/Interface/PluginHost.pm
in lib/Serge/Interface/SysCmdRunner.pm
in lib/Serge/Mail.pm
in lib/Serge/Plugin/Base.pm
in lib/Serge/Plugin/Base/Callback.pm
in lib/Serge/Pod.pm
in lib/Serge/ScanTSFiles.pm
in lib/Serge/Sync.pm
in lib/Serge/Sync/Plugin/Base/TranslationService.pm
in lib/Serge/Sync/Plugin/Base/VCS.pm
in lib/Serge/Sync/Plugin/TranslationService/command.pm
in lib/Serge/Sync/Plugin/TranslationService/pootle.pm
in lib/Serge/Sync/Plugin/TranslationService/zing.pm
in lib/Serge/Sync/Plugin/VCS/gerrit.pm
in lib/Serge/Sync/Plugin/VCS/git.pm
in lib/Serge/Sync/Plugin/VCS/mercurial.pm
in lib/Serge/Sync/Plugin/VCS/svn.pm
in lib/Serge/Sync/Util.pm
in lib/Serge/Util.pm
in lib/Serge/Util/CLDRPlurals.pm
in lib/Serge/Util/LangID.pm
in lib/Serge/Util/Pager.pm
in lib/Serge/Util/WordStats.pm

Examples