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

Move untranslatable strings from langconfig (regression from MDL-83873)

XMLWordPrintable

    • MOODLE_500_STABLE
    • MOODLE_500_STABLE
    • MDL-84697-main
    • Hide

      Setup

      1. Login as admin.
      2. Go to Site administration > Language > Language packs and install Catalan and German language packs.
      3. Open the calendar.php file for the Catalan language file (it should be placed in your moodledata folder, into lang/ca/calendar.php) and add the following lines at the end of the file:

        $string['timerelativetoday'] = 'Avui, {$a}';
        $string['timerelativetomorrow'] = 'Demà, {$a}';
        $string['timerelativeyesterday'] = 'Ahir, {$a}';
        

      4. Open the calendar.php file for the German language file (it should be placed in your moodledata folder, into lang/de/calendar.php) and add the following lines at the end of the file:

        $string['timerelativetoday'] = 'Heute, {$a}';
        $string['timerelativetomorrow'] = 'Morgen, {$a}';
        $string['timerelativeyesterday'] = 'Gestern, {$a}';
        

      5. Go to the Dashboard and create:
        • A user event for yesterday.
        • A user event for today.
        • A user event for tomorrow
      6. Enable edit mode and add the Upcoming events block.
         

      Testing instructions

      1. Go to the Dashboard.
      2. In the Upcoming events block, check there are a couple of events, which are displaying, in red, the Today and Tomorrow strings (near the date).
      3. In the Calendar, click yesterday's event. Check the modal displays the date "Yesterday, xxxxx".
      4. Switch the language to Catalan.
      5. In the "Esdeveniments propers" block, check these events are displaying "Avui" for Today entry and "Demà" for "Tomorrow".
      6. In the Calendar, click yesterday's event. Check the modal displays the date "Ahir, xxxxx".
      7. Switch the language to German.
      8. In the "Aktuelle Termine" block, check these events are displaying "Heute" for Today entry and "Morgen" for "Tomorrow". Check there is a dot after the day number.
      9. In the Calendar, click yesterday's event. Check the modal displays the date "Gestern, xxxxx". Check there is a dot after the day number.
      Show
      Setup Login as admin. Go to Site administration > Language > Language packs and install Catalan and German language packs. Open the calendar.php file for the Catalan language file (it should be placed in your moodledata folder, into lang/ca/calendar.php) and add the following lines at the end of the file: $string['timerelativetoday'] = 'Avui, {$a}'; $string['timerelativetomorrow'] = 'Demà, {$a}'; $string['timerelativeyesterday'] = 'Ahir, {$a}'; Open the calendar.php file for the German language file (it should be placed in your moodledata folder, into lang/de/calendar.php) and add the following lines at the end of the file: $string['timerelativetoday'] = 'Heute, {$a}'; $string['timerelativetomorrow'] = 'Morgen, {$a}'; $string['timerelativeyesterday'] = 'Gestern, {$a}'; Go to the Dashboard and create: A user event for yesterday. A user event for today. A user event for tomorrow Enable edit mode and add the Upcoming events block.   Testing instructions Go to the Dashboard. In the Upcoming events block, check there are a couple of events, which are displaying, in red, the Today and Tomorrow strings (near the date). In the Calendar, click yesterday's event. Check the modal displays the date "Yesterday, xxxxx". Switch the language to Catalan. In the "Esdeveniments propers" block, check these events are displaying "Avui" for Today entry and "Demà" for "Tomorrow". In the Calendar, click yesterday's event. Check the modal displays the date "Ahir, xxxxx". Switch the language to German. In the "Aktuelle Termine" block, check these events are displaying "Heute" for Today entry and "Morgen" for "Tomorrow". Check there is a dot after the day number. In the Calendar, click yesterday's event. Check the modal displays the date "Gestern, xxxxx". Check there is a dot after the day number.
    • Hide

      Code verified against automated checks.

      Checked MDL-84697 using repository: https://github.com/sarjona/moodle.git

      More information about this report

      Built on: Tue Mar 4 09:06:23 UTC 2025

      Show
      Code verified against automated checks. Checked MDL-84697 using repository: https://github.com/sarjona/moodle.git main (0 errors / 0 warnings) [branch: MDL-84697-main | CI Job ] More information about this report Built on: Tue Mar 4 09:06:23 UTC 2025
    • 1
    • HQ 2025 Sprint I1.2 Moppies

      As raised by Iñigo and Helen in the moodle.org forums (https://lang.moodle.org/mod/forum/discuss.php?d=9554), the new strings added to langconfig.php as part of MDL-83873:

      $string['strftimerelativetoday'] = 'Today, %d %B';
      $string['strftimerelativetomorrow'] = 'Tomorrow, %d %B';
      $string['strftimerelativeyesterday'] = 'Yesterday, %d %B'

      the words Today, Tomorrow and Yesterday can't be translated by translators and will always display in English and not the language of the user.

      This problem is reported as MDL-79461 and may be resolved by MDL-79545.

      However, for now, these strings should be moved to a different place to guarantee they can be translated properly.

        1. upcoming events with untranslated text.png
          19 kB
          Sara Arjona (@sarjona)
        2. MDL-84697.png
          715 kB
          Ron Carl Alfon Yu

            sarjona Sara Arjona (@sarjona)
            sarjona Sara Arjona (@sarjona)
            Carlos Escobedo Carlos Escobedo
            Amaia Anabitarte Amaia Anabitarte
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            6 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 7 minutes
                3h 7m

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