Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25505

Suggest the translation keys and the languages of the wiki in the Edit Macro dialog of the translation macro

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 17.10.14, 18.8.0
    • Localization
    • None
    • Unknown

    Description

      The translation macro takes a translation key and a language in free text fields of the Edit Macro dialog, so the user has to know the exact key, case included, and an unknown language falls back silently.

      The main problem:

      • The keys and the languages of the wiki are only known at runtime, so both lists need a provider.

      A key that does not exist, or a locale that the wiki does not have, must also be reported, at least in the editor, instead of being displayed as the key or replaced by the current language, and a malformed locale must fail with a message giving the expected format, like fr or fr_FR.

      Depends on

      Most of these fields cannot be offered before these generic changes, each giving the macro the means to declare the expected value:

      • XWIKI-23045, which lets a parameter get its values from a provider, with or without custom values.

      KOs covered

      Macro Criterion Parameter Problem Depends on
      translation C4 input-assistance key A plain text field for the exact key: a typo displays the key. A picker suggesting the keys of the wiki with their text in the current language could be used. XWIKI-23045
      translation C4 input-assistance locale A free text field, although the useful values are the languages of the wiki: zz falls back silently. A select of the languages, like the one of the Localization administration, could be used. XWIKI-23045
      translation E2 errors key, locale, parameters A key that does not exist, a typo or a wrong case displays the key itself, which the user cannot tell from a translation; key="" displays nothing; locale="zz" falls back to the current language silently; a malformed locale gives "Invalid locale format" without the expected format; and too few parameters leave a placeholder like {1}

      in the text. Partly covered, see below.

       

      Impact found on macro fluidity

      These 3 KOs come from the WYSIWYG usability audit of the macros, under the criteria C4 input-assistance and E2 errors of its usability criteria. The page of each macro, linked in the table, has the full notes and the steps to reproduce. Fixing them means changing the declaration of the parameters in the macro definitions.

      The E2 errors KO of translation is only partly covered here, for these parameters. The same KO also reports other invalid values, covered by the other issues listed on the page of the macro, among them XCOMMONS-3847 for the conversion of the values and XRENDERING-823 for the wording of the error.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Lucas C Charpentier Lucas
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: