Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-67474

POLICY Strings Coding Style - leading and trailing spaces

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Deferred
    • Icon: Minor Minor
    • None
    • 3.8
    • Policy
    • None
    • MOODLE_38_STABLE

      It's a bad practice to design strings with trailing and leading whitespace:

      • it's too error prone
      • translations look ugly or even break in other languages (specially when syntax is not the same as in english)

      See related discussion: https://lang.moodle.org/mod/forum/discuss.php?d=7657

      I suggest to forbid such leading and trailing spaces in Moodle strings, and propose to amend the Coding Style documentation page to clarify this and add an example (BAD/GOOD) after "Language strings > Structure", under (new) "Language strings > Leading and trailing spaces": https://docs.moodle.org/dev/Coding_style#Language_strings.

            Unassigned Unassigned
            mina Nicolas Martignoni
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.