|
| 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.
h2. 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.
h2. KOs covered ||Macro||Criterion||Parameter||Problem||Depends on|| |[translation|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/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|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/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|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/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.| | h2. Impact found on macro fluidity These 2 3 KOs come from the [WYSIWYG usability audit of the macros|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/], under the criterion criteria C4 input-assistance and E2 errors of its [usability criteria|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Usability%20criteria/]. 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. |
|