Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

Weblate too restrictive in length limit of translated strings

Summary

The translators can't finish the translations (at least German and Italian) because of the char-limit of these strings.

The problem

Steps to reproduce

  1. Open the translations for these strings.
  2. Try to copy the original string for plural (English) to the translation field for plural (German), for example for that string: So put <xliff:g xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2" id="number" example="7">%d</xliff:g> min in the German translation field. We have then 101 chars instead of the 100 allowed.

What is the current behavior?

Weblate doesn't take this translation in account, since it is too long.

What is the expected correct behavior?

Weblate should accept more chars for these strings with the new, longer XML-tags

Relevant screenshots

weblate_problem_2021-06-07_19-41-07

Technical information

It seems the problem is caused by a Weblate default settings or a bug

From the Weblate documentation, we learn that translated string can't be more than ten times longer than source string.

It appears that for plural here, the source string is singular and is used to calculate the max length.

Solutions

Workaround

If I delete the following words from the XML-tag: example="7", the string is short enough so that Weblate accepts it. But Weblate will always flag that the XML-tags do not accord. Possible fixes

Allow more chars for the translations.

Edited by F Wildermuth