Skip to content
Branch: master
Commits on Jun 18, 2019
  1. Add tests for multiple translation reuse options

    iafan committed Jun 18, 2019
    This includes:
    - reuse_translations
    - reuse_uncertain
    - reuse_as_fuzzy
    - reuse_fuzzy
    and their combinations.
  2. test_language: add `fuzzy_translations` option

    iafan committed Jun 18, 2019
    This option works similarly to `translations` map,
    but translations provided in `fuzzy_translations`
    are returned with the fuzzy flag set.
    This is needed primarily for tests
  3. Stabilize the translation selection with multiple variants

    iafan committed Jun 18, 2019
    Previously, if there would be multiple translation
    variants with the same fitness, the first one would be used;
    however, due to the fact that access to keys/values of a hash
    is random, this would mean a random translation would be used
    which is not good for consistency, and would fail repeated tests.
    With this change, translations sharing the best fitness are
    accumulated in an array, and then the first one in alphabetical
    sort order is pickedm which stabilizes the output.
Commits on Jun 17, 2019
  1. tests: always sort found config files alphabetically

    iafan committed Jun 17, 2019
    This will ensure the same order of execution,
    especially when there will be multiple configs
    per test that will need to be processed in a particular order
    for stable output.
  2. Fix the test

    iafan committed Jun 17, 2019
    (Somehow a few db properties were created in a wrong order)
  3. Add test for the `transform` plugin

    iafan committed Jun 17, 2019
  4. transform: cleanup unused code

    iafan committed Jun 17, 2019
  5. endpunc: make trailing punctuation more smart

    iafan committed Jun 17, 2019
    This change improves the guessing for strings that need to have
    trailing punctuation applied and wrapper tags added.
    Example: for strings like `<a>foo!</a>` the trailing punctuation
    is now properly detected as `!`.
  6. whitespace plugin: normalize whitespace instead of removing

    iafan committed Jun 17, 2019
    This will remove key collissions for strings that only differ
    in whitespace, e.g.: 'foo bar', 'foobar', 'f oob ar' and thus
    reduce the list of candidates transformations should be guessed for.
  7. Use Serge::DB::Cached instead of Serge::DB

    iafan committed Jun 17, 2019
    Reason: only the cached version now has the find_best_translation()
  8. Pass `reuse_orphaned` job parameter down to find_best_translation()

    iafan committed Jun 17, 2019
    It turns out that this parameter was never passed down,
    which resulted in not reusing orphaned translations in this plugin
    regardless of the per-job preference.
    Also: do not explicitly reset the translation when
    multiple variants found as fond_best_translation() does this
    now internally (see the previous commit).
  9. Actually use $allow_multiple_variants in find_best_translation()

    iafan committed Jun 17, 2019
    The $allow_multiple_variants paramater was added to this function
    quite a while ago, but was never used, as the checks/adjustments
    for multiple variants were made in the parent code.
    This commit obeys the flag and returns an empty translation
    in qualifying cases.
Commits on Jun 13, 2019
  1. Remove `output_bom YES`, since BOMs are illegal in JSON (#82)

    iafan committed Jun 13, 2019
    Note that this doesn't affect the output, since the encoding
    in this test was already set to Java, for which BOM is not generated.
  2. Replace gzip tool, which a custom tool for test purposes (#85)

    iafan committed Jun 13, 2019
    Snapshot tests require the output to be stable between runs.
    Using gzip wasn't the best choice because it's not readily available
    on Windows, and also stores file mtime, which may vary.
    This commit replaces gzip this with a small custom utility that
    calculates MD5 of the localized file.
Commits on Jun 12, 2019
  1. Make description for `source_exclude_dirs` more concise.

    iafan committed Jun 12, 2019
    Also: keep line lengths shorter as this affects the rendering
    of this configuration file on the documentation site.
  2. Add an explicit `zing` TS plugin with a cleaner API

    iafan committed Jun 12, 2019
    Reason: while `pootle` plugin can technically work both with Pootle
    and Zing, it's cleaner to have a dedicated `zing` plugin with
    proper documentation and a cleaner API (`executable` parameter instead
    of `manage_py_path`) going forward. `pootle` plugin will still ship with
    Serge for backward compatibility but will be essentially deprecated,
    as Pootle open-source project itself is no longer maintained.
Commits on Jun 11, 2019
  1. Add information about the `apply_xslt` plugin

    iafan committed Jun 11, 2019
You can’t perform that action at this time.